# HG changeset patch # User hurons@caf4f556-3d62-0410-8435-a86758001935 # Date 1261590933 0 # Node ID 03b0d1493584918089c53ef9b1997ed5f39ed139 wordpress 2.8 () with the following extensions : - add-to-any - categories page - Event calendar (a custom version for IRI-Theme) - Executable PHP widget - FD feedburner - ggis subscribe - Google Xml site maple - post of current category - page redirection - related post by category AND IRI-Theme diff -r 000000000000 -r 03b0d1493584 sql/cybunkcom7.sql.gz Binary file sql/cybunkcom7.sql.gz has changed diff -r 000000000000 -r 03b0d1493584 web/.htaccess --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/.htaccess Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,11 @@ + +# BEGIN WordPress + +RewriteEngine On +RewriteBase /iritest/ +RewriteCond %{REQUEST_FILENAME} !-f +RewriteCond %{REQUEST_FILENAME} !-d +RewriteRule . /iritest/index.php [L] + + +# END WordPress diff -r 000000000000 -r 03b0d1493584 web/_wp-config.tmpl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/_wp-config.tmpl Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,84 @@ + \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/license.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/license.txt Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 web/readme.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/readme.html Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,100 @@ + + + + + WordPress › Lisez moi + + + +

+ WordPress +
Version 2.8.6 + +

+

Plateforme de publication personnelle.

+ +

Préambule

+

Bienvenue. WordPress est un projet très spécial pour moi. Chaque développeur et contributeur ajoute quelque chose d'unique à ce projet, et ensemble nous créons quelque chose de beau, et dont je suis fier de faire partie. Nous avons passé des milliers d'heures sur le développement WordPress, et nous nous attachons tous les jours à vous faciliter la vie. Merci d'en faire une partie d'un morceau de votre monde.

+

— Matt Mullenweg

+ +

Installation : la fameuse installation en 5 minutes

+
    +
  1. Décompressez l'archive dans un dossier vide.
  2. + +
  3. Ouvrez le fichier wp-config-sample.php avec votre éditeur de texte préféré, comme WordPad ou similaire, et complétez les informations liées à votre base de données.
  4. +
  5. Sauvegardez le fichier sous le nom wp-config.php
  6. +
  7. Envoyez le tout sur votre FTP.
  8. +
  9. Ouvrez la page /wp-admin/install.php dans votre navigateur. Celle-ci devrait installer les tables de données nécessaires à votre blog. Si vous obtenez une erreur, vérifiez le contenu du fichier wp-config.php, et réessayez. Si cela échoue encore une fois, rendez-vous sur les forums d'entraides et soyez le plus précis possible dans vos explications. Si tout se passe bien, passez à l'étape suivante.
  10. + +
  11. Notez le mot de passe qui vous sera donné.
  12. +
  13. Une fois l'installation terminée, le script d'installation vous renverra vers la page de connexion. Connectez-vous avec l'identifiant admin et le mot de passe généré durant l'installation. Vous pouvez ensuite cliquer sur "Votre Profil" pour modifier votre mot de passe.
  14. +
+ +

Mise à jour

+

Avant tout, soyez sûr de sauvegarder tous les fichiers que vous avez modifiés, par exemple index.php.

+ +

Mise à jour depuis toutes les versions inférieures à WordPress 2.8.6 :

+
    +
  1. Effacez vos anciens fichiers WordPress, sauf le dossier /wp-content/.
  2. +
  3. Envoyez les nouveaux fichiers.
  4. +
  5. Allez sur la page /wp-admin/upgrade.php avec votre navigateur internet.
  6. + +
  7. Vous vous attendiez à plus dur ? C'est tout !
  8. +
+

Modification dans les thèmes

+

Si vous avez modifié votre thème, vous aurez probablement quelques modifications à faire. Si vous souhaitez convertir un thème conçu pour la version 1.2 de WordPress (ou une version inférieure), nous avons créé un guide spécial pour vous (en anglais).

+ +

Ressources en ligne

+

Si vous vous posez des questions dont les réponses ne figurent pas sur ce document, merci de prendre connaissance des ressources en ligne d'aide WordPress :

+
+
Le Codex WordPress
+
Le Codex est l'encyclopédie liée à tout le fonctionnement de WordPress. Il s'agit de la source d'informations la plus complète qui soit.
+
Le Blog développeur
+
C'est ici que vous trouverez les dernières informations à propos des mises à jour et des nouveautés de WordPress. Ajoutez cette page à vos favoris et jetez-y un coup d'oeil fréquemment.
+
Planète WordPress
+
La Planète WordPress est un agrégateur de news qui distille les articles de plusieurs blogs WordPress à travers le web.
+
Support WordPress (en anglais)
+
Si vous avez cherché partout et que malgré cela vous n'avez trouvé aucune réponse, les forums sont très actifs et son immense communauté sera prête à vous aider. Pour un traitement efficace de votre problème, faites en sorte d'utiliser, lors de la création de votre sujet, un titre et une description aussi pertinents et clairs que possible.
+
Canal IRC WordPress
+
Enfin, il existe un canal IRC qui est le rendez-vous des utilisateurs WordPress, et occasionnellement, propose son aide aux sujets liés au support. La page Wiki devrait vous indiquer la bonne direction.
+
+ +

Pré-requis système

+ + +

WordPress est la continuité officielle de b2/cafélog, provenant de Michel V. Le travail a continué d'être assuré par les développeurs WordPress. Si vous voulez apporter un soutien à WordPress, n'hésitez pas à faire un don.

+ +

Mettre à jour à partir d'un autre outil de blog

+ +

WordPress est en mesure d'importer à partir d'un certain nombre de moteurs de blogs. Avant tout, vous devez installer WordPress en suivant la procédure décrite ci-dessus.

+ +

XML-RPC et interface Atom

+ +

Il vous est désormais possible d'écrire vos articles via des outils de publication comme Windows Live Writer, Ecto, Bloggar, Radio Userland (ce qui signifie que vous pouvez utiliser leur fonction "email-to-blog"), NewzCrawler, et d'autres outils qui utilisent les APIs de bloguage :) Pour en savoir davantage, merci de vous rendre sur la page du Codex liée au support XML-RPC.

+ +

Publier via courriel

+ +

Il vous est possible d'écrire directement vos articles à partir d'un logiciel de courriel ! Pour faire cela, vous devez vous rendre sur la page d'options "Ecriture" et indiquer les détails de votre compte POP3 secret. Ensuite vous devez configurer wp-mail.php pour s'exécuter de manière périodique et parcourir votre boite aux lettres à la recherche de nouveaux articles. Vous pouvez réaliser une tâche Cron, ou si votre hébergeur ne supporte pas cette possibilité, il existe de nombreux sites proposant un service similaire de monitoring : il vous suffira d'indiquer l'adresse de votre fichier wp-mail.php

+

Publier devient facile : n'importe quel courriel envoyé à l'adresse que vous aurez spécifiée sera publié, le sujet du courriel étant le titre de l'article. Il est préférable de conserver discrètement cette adresse. Le script effacera automatiquement les courriels qui auront été publiés avec succès

+ +

Grades d'utilisateurs

+

Nous avons éliminé les grades d'utilisateurs dans le but de d'avoir une plus grande souplesse que le système existant introduit depuis la branche 2.0. Référez-vous à la partie du codex liée aux grades des utilisateurs.

+ +

Pour finir

+ + +

Partagez l'Amour !

+

WordPress ne possède pas une kyrielle de millions de dollars pour s'offrir une campagne marketing, ni de célèbres sponsors, mais nous avons bien mieux : VOUS. Si vous appréciez WordPress, n'hésitez pas à en parler à votre entourage, vos amis, en aidant d'autres personnes ayant un niveau inférieur au votre, ou encore écrire un article faisant référence à notre travail.

+ +

Copyright

+

WordPress est disponible sous la licence GPL (voir license.txt (en anglais)).

+ + + \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/sitemap.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/sitemap.xml Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,374 @@ + + + + + + http://www.cybunk.com/iritest/ + 2009-12-23T16:37:06+00:00 + daily + 1.0 + + + + + http://www.cybunk.com/iritest/evenement/museologie-2008-2009/ + 2009-12-23T16:37:06+00:00 + monthly + 0.2 + + + + http://www.cybunk.com/iritest/projets/cine-cast/ + 2009-12-23T14:38:07+00:00 + monthly + 0.2 + + + + http://www.cybunk.com/iritest/actualites/attention-en-raison-dun-mouvement-social-du-personnel-du-centre-pompidou/ + 2009-12-23T14:35:01+00:00 + monthly + 0.2 + + + + http://www.cybunk.com/iritest/evenement/seminaire-museologie-museographie-2008-2009/ + 2009-12-22T16:34:44+00:00 + monthly + 0.2 + + + + http://www.cybunk.com/iritest/projets/cinecast/ + 2009-12-22T13:40:28+00:00 + monthly + 0.2 + + + + http://www.cybunk.com/iritest/actualites/carrefour-des-possibles-de-la-fing-le-17-decembre-a-17h30-au-cnam-metro-arts-et-metiers-liri-y-fera-une-presentation-du-projet-fingers-dance-sur-la-table-tactile-microsoft-surface/ + 2009-12-22T09:19:50+00:00 + monthly + 0.2 + + + + http://www.cybunk.com/iritest/ressources/fonds-documentaires/ + 2009-12-22T09:13:02+00:00 + monthly + 0.2 + + + http://www.cybunk.com/iritest/seminaire/ + 2009-12-22T09:07:09+00:00 + weekly + 0.6 + + + + http://www.cybunk.com/iritest/atelier/ma-ville-vue-par/ + 2009-12-21T17:47:07+00:00 + monthly + 0.2 + + + + http://www.cybunk.com/iritest/projets/tictac/ + 2009-12-21T17:33:24+00:00 + monthly + 0.2 + + + + http://www.cybunk.com/iritest/pied/a-propos/ + 2009-12-21T17:26:03+00:00 + monthly + 0.2 + + + + http://www.cybunk.com/iritest/ressources/faq-ligne-de-temps/ + 2009-12-21T17:14:12+00:00 + monthly + 0.2 + + + + http://www.cybunk.com/iritest/ressources/espaces-critiques/ + 2009-12-21T17:13:35+00:00 + monthly + 0.2 + + + + http://www.cybunk.com/iritest/seminaire/305/ + 2009-12-21T15:43:17+00:00 + monthly + 0.2 + + + + http://www.cybunk.com/iritest/seminaire/les-figures-de-l%e2%80%99amateur/ + 2009-12-21T15:37:20+00:00 + monthly + 0.2 + + + + http://www.cybunk.com/iritest/seminaire/seminaire-desir-et-technologies/ + 2009-12-21T15:36:32+00:00 + monthly + 0.2 + + + + http://www.cybunk.com/iritest/seminaire/images-et-visages/ + 2009-12-21T15:34:15+00:00 + monthly + 0.2 + + + + http://www.cybunk.com/iritest/non-classe/seminaire-nanotechnologies-2009/ + 2009-12-21T15:33:21+00:00 + monthly + 0.2 + + + + http://www.cybunk.com/iritest/seminaire/seminaire-nanotechnologies-2008/ + 2009-12-21T15:27:01+00:00 + monthly + 0.2 + + + + http://www.cybunk.com/iritest/seminaire/seminaire-pratique-et-jugement/ + 2009-12-21T15:25:17+00:00 + monthly + 0.2 + + + + http://www.cybunk.com/iritest/seminaire/seminaire-modernites/ + 2009-12-21T15:23:45+00:00 + monthly + 0.2 + + + + http://www.cybunk.com/iritest/non-classe/seminaire-culture-2-0/ + 2009-12-21T15:19:16+00:00 + monthly + 0.2 + + + + http://www.cybunk.com/iritest/seminaire/seminaire-experiences-theoriques/ + 2009-12-21T15:17:26+00:00 + monthly + 0.2 + + + + http://www.cybunk.com/iritest/evenement/sur-la-faculte-de-jouer/ + 2009-12-21T15:14:58+00:00 + monthly + 0.2 + + + + http://www.cybunk.com/iritest/atelier/lignes-de-temps/ + 2009-12-21T14:46:49+00:00 + monthly + 0.2 + + + + http://www.cybunk.com/iritest/atelier/atelier-ihm-2007/ + 2009-12-21T14:38:48+00:00 + monthly + 0.2 + + + + http://www.cybunk.com/iritest/actualites/les-videos-des-entretiens-du-nouveau-monde-industriel-sont-accessibles-sur-httpenmi-tivipro-tv/ + 2009-12-21T14:34:44+00:00 + monthly + 0.2 + + + + http://www.cybunk.com/iritest/actualites/dossier-de-presse-de-liri-mai-2009/ + 2009-12-21T14:33:04+00:00 + monthly + 0.2 + + + + http://www.cybunk.com/iritest/actualites/conference-de-presse-du-14-mai-2009-dans-lignes-de-temps/ + 2009-12-21T14:32:33+00:00 + monthly + 0.2 + + + + http://www.cybunk.com/iritest/evenement/entretiens-du-nouveau-monde-industriel-2009/ + 2009-12-21T14:13:16+00:00 + monthly + 0.2 + + + + http://www.cybunk.com/iritest/pied/contact/ + 2009-12-21T13:48:45+00:00 + monthly + 0.2 + + + + http://www.cybunk.com/iritest/evenement/politiques-et-technologies-de-l%e2%80%99amateur/ + 2009-12-21T11:25:43+00:00 + monthly + 0.2 + + + + http://www.cybunk.com/iritest/evenement/experiences-theoriques/ + 2009-12-21T10:44:35+00:00 + monthly + 0.2 + + + + http://www.cybunk.com/iritest/evenement/enmi-2007/ + 2009-12-21T10:35:28+00:00 + monthly + 0.2 + + + + http://www.cybunk.com/iritest/actualites/un-article-presentant-linstitut-juillet-2008/ + 2009-12-18T11:20:37+00:00 + monthly + 0.2 + + + + http://www.cybunk.com/iritest/projets/anthroponet/ + 2009-12-18T11:12:03+00:00 + monthly + 0.2 + + + + http://www.cybunk.com/iritest/recherches/ingenierie-des-connaissances/ + 2009-12-18T11:08:31+00:00 + monthly + 0.2 + + + + http://www.cybunk.com/iritest/recherches/technologies-collaboratives/ + 2009-12-18T11:06:18+00:00 + monthly + 0.2 + + + + http://www.cybunk.com/iritest/projets/eulalie-2/ + 2009-12-18T11:05:15+00:00 + monthly + 0.2 + + + + http://www.cybunk.com/iritest/projets/glitner/ + 2009-12-18T11:04:02+00:00 + monthly + 0.2 + + + + http://www.cybunk.com/iritest/recherches/interfaces-multimodales/ + 2009-12-18T10:59:42+00:00 + monthly + 0.2 + + + + http://www.cybunk.com/iritest/projets/tic-tac/ + 2009-12-17T15:25:23+00:00 + monthly + 0.2 + + + + http://www.cybunk.com/iritest/projets/cinelab/ + 2009-12-16T17:07:37+00:00 + monthly + 0.2 + + + + http://www.cybunk.com/iritest/non-classe/home/ + 2009-12-16T13:57:52+00:00 + monthly + 0.2 + + + http://www.cybunk.com/iritest/a-propos/ + 2009-12-16T11:52:51+00:00 + weekly + 0.6 + + + http://www.cybunk.com/iritest/recherches/ + 2009-12-16T11:46:41+00:00 + weekly + 0.6 + + + http://www.cybunk.com/iritest/test-ma-page-dans-ma-rub/ + 2009-12-16T11:04:54+00:00 + weekly + 0.6 + + + http://www.cybunk.com/iritest/atelier/ + 2009-12-16T10:20:20+00:00 + weekly + 0.6 + + + http://www.cybunk.com/iritest/calendar/ + 2009-12-15T16:29:39+00:00 + weekly + 0.6 + + + http://www.cybunk.com/iritest/a-propos/ma-page-de-test/ + 2009-12-15T15:48:29+00:00 + weekly + 0.6 + + + + http://www.cybunk.com/iritest/atelier/atelier-regard-signes/ + 2009-12-15T15:43:47+00:00 + monthly + 0.2 + + + + http://www.cybunk.com/iritest/atelier/atelier-lecture-signes/ + 2009-12-15T15:43:42+00:00 + monthly + 0.2 + + + + + + + \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/sitemap.xml.gz Binary file web/sitemap.xml.gz has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/admin-ajax.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/admin-ajax.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,1356 @@ +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( $_POST['action']) ) + do_action( 'wp_ajax_nopriv_' . $_POST['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 ( 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; +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() ); + + $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']; + } + + $comment_count = wp_count_comments(); + $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 + check_ajax_referer( "delete-comment_$id" ); + if ( !$comment = get_comment( $id ) ) + die( (string) time() ); + if ( !current_user_can( 'edit_post', $comment->comment_post_ID ) ) + die('-1'); + + if ( isset($_POST['spam']) && 1 == $_POST['spam'] ) { + if ( 'spam' == wp_get_comment_status( $comment->comment_ID ) ) + die( (string) time() ); + $r = wp_set_comment_status( $comment->comment_ID, 'spam' ); + } else { + $r = wp_delete_comment( $comment->comment_ID ); + } + 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' : + check_ajax_referer( "delete-tag_$id" ); + if ( !current_user_can( 'manage_categories' ) ) + die('-1'); + + if ( !empty($_POST['taxonomy']) ) + $taxonomy = $_POST['taxonomy']; + else + $taxonomy = 'post_tag'; + + $tag = get_term( $id, $taxonomy ); + if ( !$tag || is_wp_error( $tag ) ) + die('1'); + + if ( wp_delete_term($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 '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 ) ) + die('-1'); + if ( !current_user_can( 'moderate_comments' ) ) + die('-1'); + + $current = wp_get_comment_status( $comment->comment_ID ); + if ( $_POST['new'] == $current ) + die( (string) time() ); + + $r = 0; + if ( in_array( $current, array( 'unapproved', 'spam' ) ) ) { + check_ajax_referer( "approve-comment_$id" ); + $result = wp_set_comment_status( $comment->comment_ID, 'approve', true ); + } else { + check_ajax_referer( "unapprove-comment_$id" ); + $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 = isset( $_POST['popular_ids'] ) ? + array_map( 'absint', explode( ',', $_POST['popular_ids'] ) ) : + false; + + $x = new WP_Ajax_Response(); + 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(); + $x->add( array( + 'what' => 'category', + 'id' => $cat_id, + 'data' => $data, + 'position' => -1 + ) ); + } + if ( $parent ) { // Foncy - replace the parent and all its children + $parent = get_category( $parent ); + ob_start(); + dropdown_categories( 0, $parent ); + $data = ob_get_contents(); + ob_end_clean(); + $x->add( array( + 'what' => 'category', + 'id' => $parent->term_id, + 'old_id' => $parent->term_id, + 'data' => $data, + 'position' => -1 + ) ); + + } + $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'); + + if ( '' === trim($_POST['name']) ) { + $x = new WP_Ajax_Response( array( + 'what' => 'tag', + 'id' => new WP_Error( 'name', __('You did not enter a tag name.') ) + ) ); + $x->send(); + } + + if ( !empty($_POST['taxonomy']) ) + $taxonomy = $_POST['taxonomy']; + else + $taxonomy = 'post_tag'; + + $tag = wp_insert_term($_POST['name'], $taxonomy, $_POST ); + + if ( is_wp_error($tag) ) { + $x = new WP_Ajax_Response( array( + 'what' => 'tag', + 'id' => $tag + ) ); + $x->send(); + } + + if ( !$tag || (!$tag = get_term( $tag['term_id'], $taxonomy )) ) + die('0'); + + $tag_full_name = $tag->name; + $tag_full_name = esc_attr($tag_full_name); + + $x = new WP_Ajax_Response( array( + 'what' => 'tag', + 'id' => $tag->term_id, + 'position' => '-1', + 'data' => _tag_row( $tag, '', $taxonomy ), + 'supplemental' => array('name' => $tag_full_name, 'show-link' => sprintf(__( 'Tag %s added' ), "tag-$tag->term_id", $tag_full_name)) + ) ); + $x->send(); + 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_post', $id ) ) + 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') ) ) + 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(); + + $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']; + if($_POST['post_type'] == 'post') { + if(current_user_can('edit_post', $ID)) + die(wp_create_nonce('update-post_' . $ID)); + } + if($_POST['post_type'] == 'page') { + if(current_user_can('edit_page', $ID)) { + die(wp_create_nonce('update-page_' . $ID)); + } + } + 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', 'pagesubmitdiv', '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' : + if ( !empty($_POST['taxonomy']) ) + $taxonomy = $_POST['taxonomy']; + else + $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); + } 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(create_function('$a', 'return trim($a, "\\"\'\\n\\r ");'), $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 $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 = __('Unpublished'); + 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').''.__('Time').''.__('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; +default : + do_action( 'wp_ajax_' . $_POST['action'] ); + die('0'); + break; +endswitch; +?> diff -r 000000000000 -r 03b0d1493584 web/wp-admin/admin-footer.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/admin-footer.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,44 @@ + + +
+
+
+ + + + + + + + diff -r 000000000000 -r 03b0d1493584 web/wp-admin/admin-functions.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/admin-functions.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,16 @@ + \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-admin/admin-header.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/admin-header.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,128 @@ + + + > + + +<?php echo $title; ?> ‹ <?php bloginfo('name') ?> — WordPress + + + + + + +"> + + +
+
+ + +
+ + +
+ \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-admin/admin.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/admin.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,159 @@ +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(); + +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', 'popuptitle', 'popupurl', '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 000000000000 -r 03b0d1493584 web/wp-admin/async-upload.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/async-upload.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,59 @@ + 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 000000000000 -r 03b0d1493584 web/wp-admin/categories.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/categories.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,306 @@ +%s category: this is the default one"), $cat_name)); + + 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.') ); + + foreach ( (array) $_GET['delete'] as $cat_ID ) { + $cat_name = get_cat_name($cat_ID); + + // Don't delete the default cats. + if ( $cat_ID == get_option('default_category') ) + wp_die(sprintf(__("Can’t delete the %s category: this is the default one"), $cat_name)); + + 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 000000000000 -r 03b0d1493584 web/wp-admin/comment.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/comment.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,240 @@ +

$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.') ); + + $comment = get_comment_to_edit( $comment_id ); + + include('edit-form-comment.php'); + + break; + +case 'cdc' : +case 'mac' : + + require_once('admin-header.php'); + + $comment_id = absint( $_GET['c'] ); + $formaction = 'cdc' == $action ? 'deletecomment' : 'approvecomment'; + $nonce_action = 'cdc' == $action ? 'delete-comment_' : 'approve-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( 'cdc' == $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.') ); +?> +
+ +
+ + +

+ +

+ +
+ + + + + + +
' onclick="self.location='" />
+ + + + + + + + + +
+ + + + + + +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 ( 'spam' == $_REQUEST['dt'] ) + wp_set_comment_status( $comment->comment_ID, 'spam' ); + else + wp_delete_comment( $comment->comment_ID ); + + if ( '' != wp_get_referer() && false == $noredir && false === strpos(wp_get_referer(), 'comment.php' ) ) + wp_redirect( wp_get_referer() ); + else if ( '' != wp_get_original_referer() && false == $noredir ) + wp_redirect( wp_get_original_referer() ); + else + wp_redirect( admin_url('edit-comments.php') ); + + die; + break; + +case 'unapprovecomment' : + $comment_id = absint( $_GET['c'] ); + check_admin_referer( 'unapprove-comment_' . $comment_id ); + + if ( isset( $_GET['noredir'] ) ) + $noredir = true; + else + $noredir = false; + + 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 ) ) + comment_footer_die( __('You are not allowed to edit comments on this post, so you cannot disapprove this comment.') ); + + wp_set_comment_status( $comment->comment_ID, 'hold' ); + + if ( '' != wp_get_referer() && false == $noredir ) + wp_redirect( wp_get_referer() ); + else + wp_redirect( admin_url('edit-comments.php?p=' . absint( $comment->comment_post_ID ) . '#comments') ); + + exit(); + break; + +case 'approvecomment' : + $comment_id = absint( $_GET['c'] ); + check_admin_referer( 'approve-comment_' . $comment_id ); + + if ( isset( $_GET['noredir'] ) ) + $noredir = true; + else + $noredir = false; + + 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) ) + comment_footer_die( __('You are not allowed to edit comments on this post, so you cannot approve this comment.') ); + + wp_set_comment_status( $comment->comment_ID, 'approve' ); + + if ( '' != wp_get_referer() && false == $noredir ) + wp_redirect( wp_get_referer() ); + else + wp_redirect( admin_url('edit-comments.php?p=' . absint( $comment->comment_post_ID ) . '#comments') ); + + 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'); + +?> \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,1671 @@ +html { + background-color: #f7f6f1; +} + +* html input, +* html .widget { + border-color: #8cbdd5; +} + +textarea, +input, +select { + border-color: #dfdfdf; +} + +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 { + 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 { + 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 { + 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; +} + +.describe input[type="text"], +.describe textarea { + border-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; +} + +.button:active, +.submit input:active, +.button-secondary:active { + background: #eee url(../images/white-grad-active.png) repeat-x scroll left top; +} + +.button-primary, +.submit .button-primary, +#login form .submit input { + border-color: #5b86ab !important; + font-weight: bold; + color: #fff !important; + background: #5580a6 url(../images/button-grad-vs.png) repeat-x scroll left top; +} + +.button-primary:active, +#login form .submit input:active { + background: #21759b url(../images/button-grad-active-vs.png) repeat-x scroll left top !important; +} + +.button[disabled], +.button:disabled, +.button-secondary[disabled], +.button-secondary:disabled, +a.button.disabled { + color: #ccc !important; + border-color: #ccc; +} + +.button-primary[disabled], +.button-primary:disabled { + color: #80a3d2 !important; +} + +a:active, +a:focus { + color: #d54e21; +} + +a:hover, +#wphead #viewsite a:hover, +#adminmenu a:hover, +#adminmenu ul.wp-submenu a:hover, +#the-comment-list .comment a:hover, +#rightnow a:hover, +#login form .submit input: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; +} + +.button-primary:hover, +#login form .submit input:hover { + border-color: #2e5475 !important; + color: #eaf2fa !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, +a.delete { + 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 #login_error, +.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 { + 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 .unapproved, +#the-comment-list .unapproved th, +#the-comment-list .unapproved td { + background-color: #ffffe0; +} + +#the-comment-list .approve a { + color: #006505; +} + +#the-comment-list .unapprove a { + color: #d98500; +} + +#the-comment-list .delete 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; +} + +#login form input { + color: #555; +} + +#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, +.delete 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; +} + +.submit input, +.button, +.button-primary, +.button-secondary, +.button-highlighted, +#postcustomstuff .submit input { + text-shadow: rgba(255,255,255,1) 0 1px 0; +} + +.button-primary, +.submit .button-primary { + text-shadow: rgba(0,0,0,0.3) 0 -1px 0; +} + +#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; +} diff -r 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,1660 @@ +html { + background-color: #f9f9f9; +} + +* html input, +* html .widget { + border-color: #dfdfdf; +} + +textarea, +input, +select { + border-color: #DFDFDF; +} + +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 { + 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 { + 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 { + 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; +} + +.describe input[type="text"], +.describe textarea { + border-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; +} + +.button:active, +.submit input:active, +.button-secondary:active { + background: #eee url(../images/white-grad-active.png) repeat-x scroll left top; +} + +.button-primary, +.submit .button-primary, +#login form .submit input { + border-color: #298cba !important; + font-weight: bold; + color: #FFF !important; + background: #21759B url(../images/button-grad.png) repeat-x scroll left top; +} + +.button-primary:active, +#login form .submit input:active { + background: #21759b url(../images/button-grad-active.png) repeat-x scroll left top !important; +} + +.button[disabled], +.button:disabled, +.button-secondary[disabled], +.button-secondary:disabled, +a.button.disabled { + color: #ccc !important; + border-color: #ccc; +} + +.button-primary[disabled], +.button-primary:disabled { + color: #2fa0d5 !important; +} + +a:active, +a:focus { + color: #d54e21; +} + +a:hover, +#wphead #viewsite a:hover, +#adminmenu a:hover, +#adminmenu ul.wp-submenu a:hover, +#the-comment-list .comment a:hover, +#rightnow a:hover, +#login form .submit input: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; +} + +.button-primary:hover, +#login form .submit input:hover { + border-color: #13455b !important; + color: #EAF2FA !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, +a.delete { + 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 #login_error, +.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 { + 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 .unapproved, +#the-comment-list .unapproved th, +#the-comment-list .unapproved td { + background-color: #ffffe0; +} + +#the-comment-list .approve a { + color: #006505; +} + +#the-comment-list .unapprove a { + color: #d98500; +} + +#the-comment-list .delete 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; +} + +#login form input { + color: #555; +} + +#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, +.delete 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; +} + +.submit input, +.button, +.button-primary, +.button-secondary, +.button-highlighted, +#postcustomstuff .submit input { + text-shadow: rgba(255,255,255,1) 0 1px 0; +} + +.button-primary, +.submit .button-primary { + text-shadow: rgba(0,0,0,0.3) 0 -1px 0; +} + +#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; +} diff -r 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 web/wp-admin/css/dashboard.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/css/dashboard.css Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,390 @@ +.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 td.first, +#dashboard_right_now td.last { + width: 1px; +} + +#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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,7 @@ +.farbtastic .color, .farbtastic .overlay { + left: 0; + right: 47px; +} +.farbtastic .marker { + margin: -8px -8px 0 0; +} diff -r 000000000000 -r 03b0d1493584 web/wp-admin/css/farbtastic.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/css/farbtastic.css Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,83 @@ +/* 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; + right:-1000em; +} +} \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-admin/css/global.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/css/global.css Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,487 @@ +/* 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; + vertical-align: text-top; +} + +.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; +} + +.widefat .num, +.column-comments, +.column-links, +.column-posts, +.column-parent { + 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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,91 @@ +* 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; +} diff -r 000000000000 -r 03b0d1493584 web/wp-admin/css/ie.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/css/ie.css Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,401 @@ +/* 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 .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; +} + +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; +} + diff -r 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 web/wp-admin/css/install.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/css/install.css Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 web/wp-admin/css/login.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/css/login.css Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,111 @@ +* { 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; } + +#login form .submit input { + 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; + text-shadow: rgba(0,0,0,0.3) 0 -1px 0; +} + +#login form p { + margin-bottom: 0; +} + +label { + color: #777; + font-size: 13px; +} + +form .forgetmenot label { + font-size: 11px; + line-height: 19px; +} + +form .submit { 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; +} + +.clear { + clear: both; +} diff -r 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,93 @@ +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; +} +.media-item .pinkynail { + float: right; +} +.describe-toggle-on, +.describe-toggle-off { + float: left; + margin-right: 0; + margin-left: 20px; +} +/* 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 000000000000 -r 03b0d1493584 web/wp-admin/css/media.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/css/media.css Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,400 @@ +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; +} + +.media-upload-form label, +.media-upload-form legend { + display: block; + font-weight: bold; + font-size: 13px; + margin-bottom: 0.5em; + margin: 0 0 0.5em 0; +} + +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 */ +.align .field label { + display: inline; + padding: 0 0 0 28px; + margin: 0 1em 0 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; +} + +tr.image-size label { + display: inline; + margin: 0 0 0 1em; +} + +.pinkynail { + max-width: 40px; + max-height: 40px; +} + +#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; +} + +.media-item .pinkynail { + float: left; + margin: 2px; + height: 32px; + max-width: 40px; +} + +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 0 0; +} + +.describe td.A1 { + width: 132px; +} + +.describe input[type="text"], +.describe textarea { + width: 460px; + border-width: 1px; + border-style: solid; +} + +.describe-toggle-on, +.describe-toggle-off { + display: block; + line-height: 36px; + float: right; + margin-right: 20px; +} + +.describe-toggle-off { + display: none; +} + +.hidden { + height: 0; + width: 0; + overflow: hidden; + border: none; +} + +/* Specific to Uploader */ + +#media-upload .media-upload-form p { + margin: 0 1em 1em 0; +} + +#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: .5em; + 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: 25%; + text-align: center; +} + +#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; + border-bottom-style: solid; + border-bottom-width: 1px; + font-family: Georgia,"Times New Roman",Times,serif; + font-size: 1.6em; + border-bottom-color: #DADADA; + color: #5A5A5A; +} + +h3.media-title { + color: #5A5A5A; + font-family: Georgia,"Times New Roman",Times,serif; + font-size: 1.6em; + font-weight: normal; +} + +#gallery-settings .describe td { + vertical-align: middle; + height: 3.5em; +} + +#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; + border: 1px solid #dfdfdf; +} + +#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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,559 @@ +body { + font: 13px "Lucida Grande", Verdana, Arial, "Bitstream Vera Sans", sans-serif; + color: #333; + margin: 0; + padding: 0; +} + +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 { + padding-left: 10px; + margin-top: 10px; +} + +div.zerosize { + border: 0 none; + height: 0; + margin: 0; + overflow: hidden; + padding: 0; + position: absolute; + width: 0; +} + +#poststuff #edButtonPreview.active, +#poststuff #edButtonHTML.active { + display: none; +} + +.posting { + margin-right: 228px; + position: relative; + left: 0; +} + +#side-info-column { + float: right; + width: 218px; + position: absolute; + right: 0; + margin-right: 10px; +} + +#side-info-column .sleeve { + padding-top: 5px; + padding-left: 10px; +} + +#poststuff .inside { + font-size: 11px; + margin: 0 12px 12px; +} + +#poststuff h2, #poststuff h3 { + font-size: 12px; + font-weight: bold; + line-height: 1; + margin: 0 0 10px; + padding: 7px 9px; +} + +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; +} + +#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: 98%; +} + +.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 { + position: relative; + padding-top: 25px; +} + +#actions { + clear: both; + float: right; + margin-top: -19px; + position: relative; +} + +#extra_fields #actions { + clear: both; + position: relative; + right: 0px; + margin: -24px 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; +} + +#extra_fields .postbox { + margin-bottom: 5px; +} + +#extra_fields .titlewrap { + padding: 0; + overflow: auto; + height: 100px; +} + +#img_container { + position: relative; +} + +#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 0; + font-size: 10px; + clear: both; +} + +#viewsite .button { + margin: 0; + display: block; +} + +.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 */ +.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 { + width: 96% !important; + margin-left: 1%; + margin-bottom: 10px; + border: 0 none; + height: 365px; +} + +/* 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; +} diff -r 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,3 @@ +#templateside { + float: left; +} diff -r 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 web/wp-admin/css/widgets.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/css/widgets.css Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,365 @@ +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 { + width: 250px; + margin: 0 auto 20px; + overflow: hidden; +} + +#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 000000000000 -r 03b0d1493584 web/wp-admin/custom-header.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/custom-header.php Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,211 @@ + + + + + + + + + + + + + + + +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, array(80, 60), true ) ) { +?> + + + + + +>
+ ID))); ?> +

+ ID) ) + $actions['edit'] = '' . __('Edit') . ''; + if ( current_user_can('delete_post', $post->ID) ) + $actions['delete'] = "ID) . "' onclick=\"if ( confirm('" . esc_js(sprintf( ('draft' == $post->post_status) ? __("You are about to delete this attachment '%s'\n 'Cancel' to stop, 'OK' to delete.") : __("You are about to delete this attachment '%s'\n 'Cancel' to stop, 'OK' to delete."), $post->post_title )) . "') ) { return true;}return false;\">" . __('Delete') . ""; + $actions['view'] = '' . __('View') . ''; + $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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,84 @@ +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, 'hierarchical' => true, 'show_option_none' => __('None'))); ?>
+ +

+
+

+ +
+
diff -r 000000000000 -r 03b0d1493584 web/wp-admin/edit-comments.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/edit-comments.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,386 @@ +escape( $_REQUEST['pagegen_timestamp'] ); + if ( current_user_can('moderate_comments')) { + $deleted_spam = $wpdb->query( "DELETE FROM $wpdb->comments WHERE comment_approved = 'spam' AND '$delete_time' > comment_date_gmt" ); + } else { + $deleted_spam = 0; + } + $redirect_to = 'edit-comments.php?comment_status=spam&deleted=' . (int) $deleted_spam; + if ( $post_id ) + $redirect_to = add_query_arg( 'p', absint( $post_id ), $redirect_to ); + wp_redirect( $redirect_to ); +} elseif ( isset($_REQUEST['delete_comments']) && isset($_REQUEST['action']) && ( -1 != $_REQUEST['action'] || -1 != $_REQUEST['action2'] ) ) { + check_admin_referer('bulk-comments'); + $doaction = ( -1 != $_REQUEST['action'] ) ? $_REQUEST['action'] : $_REQUEST['action2']; + + $deleted = $approved = $unapproved = $spammed = 0; + foreach ( (array) $_REQUEST['delete_comments'] as $comment_id) : // Check the permissions on each + $comment_id = (int) $comment_id; + $_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 'markspam' : + wp_set_comment_status($comment_id, 'spam'); + $spammed++; + break; + case 'delete' : + wp_set_comment_status($comment_id, 'delete'); + $deleted++; + break; + case 'approve' : + wp_set_comment_status($comment_id, 'approve'); + $approved++; + break; + case 'unapprove' : + wp_set_comment_status($comment_id, 'hold'); + $unapproved++; + break; + } + endforeach; + + $redirect_to = 'edit-comments.php?deleted=' . $deleted . '&approved=' . $approved . '&spam=' . $spammed . '&unapproved=' . $unapproved; + 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')) ) + $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 || $spam > 0 ) { + echo '

'; + + if ( $approved > 0 ) { + printf( _n( '%s comment approved', '%s comments approved', $approved ), $approved ); + echo '
'; + } + + if ( $deleted > 0 ) { + printf( _n( '%s comment deleted', '%s comments deleted', $deleted ), $deleted ); + echo '
'; + } + + if ( $spam > 0 ) { + printf( _n( '%s comment marked as spam', '%s comments marked as spam', $spam ), $spam ); + 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)') + ); +$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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,669 @@ +View post'), get_permalink($post_ID)); +$messages[2] = __('Custom field updated.'); +$messages[3] = __('Custom field deleted.'); +$messages[4] = __('Post updated.'); +$messages[6] = sprintf(__('Post published. View post'), get_permalink($post_ID)); +$messages[7] = __('Post saved.'); +$messages[8] = sprintf(__('Post submitted. Preview post'), add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ); + +if ( isset($_GET['revision']) ) + $messages[5] = sprintf( __('Post restored to revision from %s'), wp_post_revision_title( (int) $_GET['revision'], false ) ); + +$notice = false; +$notices[1] = __( 'There is an autosave of this post that is more recent than the version below. View the autosave.' ); + +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( $notices[1], 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). + +/** + * Display post submit form fields. + * + * @since 2.7.0 + * + * @param object $post + */ +function post_submit_meta_box($post) { + global $action; + + $can_publish = current_user_can('publish_posts'); +?> +
+ +
+ + +
+ +
+ +
+
+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 ( is_sticky( $post->ID ) ) { + $visibility = 'public'; + $visibility_trans = __('Public, Sticky'); +} else { + $visibility = 'public'; + $visibility_trans = __('Public'); +} + +?> + +
+ +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 ?> +
+ + + +
+
+ + +
+
+
+ +
+ + + +
+post_status, array('publish', 'future', 'private') ) || 0 == $post->ID ) { + if ( current_user_can('publish_posts') ) : + if ( !empty($post->post_date_gmt) && time() < strtotime( $post->post_date_gmt . ' +0000' ) ) : ?> + + + + + + + + + + + + +
+
+
+
+ +helps) ? esc_attr($taxonomy->helps) : __('Separate tags with commas.'); +?> +
+
+
+

+
+ + + + + +
+

+
+
+ +label) ? esc_attr($taxonomy->label) : $tax_name; + + add_meta_box('tagsdiv-' . $tax_name, $label, 'post_tags_meta_box', 'post', 'side', 'core'); + } +} + +/** + * Display post categories form fields. + * + * @since 2.6.0 + * + * @param object $post + */ +function post_categories_meta_box($post) { +?> + + + + +
+ +
+ + +
+

+

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

+
+ +

+

+

+

+ + +

Learn more about manual excerpts.'); ?>

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

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

'; + } + +?> +


()

+

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 ); +?> + + + + + + + + +

+ + +post_status || 'private' == $post->post_status ) + add_meta_box('commentsdiv', __('Comments'), 'post_comment_meta_box', 'post', 'normal', 'core'); + +/** + * Display post slug form fields. + * + * @since 2.6.0 + * + * @param object $post + */ +function post_slug_meta_box($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 ) : +/** + * Display form field with list of authors. + * + * @since 2.6.0 + * + * @param object $post + */ +function post_author_meta_box($post) { + global $current_user, $user_ID; + $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; +?> + $authors, 'name' => 'post_author_override', 'selected' => empty($post->ID) ? $user_ID : $post->post_author) ); ?> + + + + + + +
+ +

+ +

+ + +

+ +
+ + + + + + + + + +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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) . "' onclick=\"if ( confirm('" . esc_js(__("You are about to delete this comment. \n 'Cancel' to stop, 'OK' to delete.")) . "') ){return true;}return false;\">" . __('Delete') . "\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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,228 @@ +%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_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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,89 @@ +' . __('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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,422 @@ +Links / Edit Link' ), 'link-manager.php' ); + $submit_text = __('Update Link'); + $form = ' diff -r 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,499 @@ +View page'), get_permalink($post_ID)); +$messages[2] = __('Custom field updated.'); +$messages[3] = __('Custom field deleted.'); +$messages[5] = sprintf(__('Page published. View page'), get_permalink($post_ID)); +$messages[6] = sprintf(__('Page submitted. Preview page'), add_query_arg( 'preview', 'true', get_permalink($post_ID) ) ); + +if ( isset($_GET['revision']) ) + $messages[5] = sprintf( __('Page restored to revision from %s'), wp_post_revision_title( (int) $_GET['revision'], false ) ); + +$notice = false; +$notices[1] = __( 'There is an autosave of this page that is more recent than the version below. View the autosave.' ); + +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( $notices[1], get_edit_post_link( $autosave->ID ) ); +} + +$temp_ID = (int) $temp_ID; +$user_ID = (int) $user_ID; + +/** + * Display submit form fields. + * + * @since 2.7.0 + * + * @param object $post + */ +function page_submit_meta_box($post) { + global $action; + + $can_publish = current_user_can('publish_pages'); +?> +
+ +
+ + +
+ +
+ +
+
+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'); +} else { + $visibility = 'public'; + $visibility_trans = __('Public'); +} + +echo esc_html( $visibility_trans ); ?> + + + +
+ + + + />
+ />
+
+ />
+ +

+

+
+ + +
+ +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 ?> +
+ + +
+
+ +
+
+
+ +
+ + + +
+post_status, array('publish', 'future', 'private') ) || 0 == $post->ID ) { ?> +post_date_gmt) && time() < strtotime( $post->post_date_gmt . ' +0000' ) ) : ?> + + + + + + + + + + + + +
+
+
+
+ +

+

+

+

+ +
+ + $post->ID, 'selected' => $post->post_parent, 'name' => 'parent_id', 'show_option_none' => __('Main Page (no parent)'), 'sort_column'=> 'menu_order, post_title')); ?> +

+ +
+ +

+ +
+

+

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

use in your theme.'); ?>

+ + +

+

+

trackbacks and pingbacks.'); ?>

+ + +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 ) { + /** + * Display page author form fields, when more than one author exists. + * + * @since 2.6.0 + * + * @param object $post + */ + function page_author_meta_box($post){ + global $current_user, $user_ID; + $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; +?> + $authors, 'name' => 'post_author_override', 'selected' => empty($post->ID) ? $user_ID : $post->post_author) ); ?> + + +
+ +

+ +
+ +

+ + +

+ + +'; +?> + + + + + + + + +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 000000000000 -r 03b0d1493584 web/wp-admin/edit-pages.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/edit-pages.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,324 @@ +post_type == 'attachment' ) { + if ( ! wp_delete_attachment($post_id_del) ) + wp_die( __('Error in deleting...') ); + } else { + if ( !wp_delete_post($post_id_del) ) + wp_die( __('Error in deleting...') ); + } + $deleted++; + } + } + break; + case 'edit': + if ( isset($_GET['post']) && isset($_GET['bulk_edit']) ) { + check_admin_referer('bulk-pages'); + + if ( -1 == $_GET['_status'] ) { + $_GET['post_status'] = null; + unset($_GET['_status'], $_GET['post_status']); + } else { + $_GET['post_status'] = $_GET['_status']; + } + + $done = bulk_edit_posts($_GET); + } + break; + } + + $sendback = wp_get_referer(); + if (strpos($sendback, 'page.php') !== false) $sendback = admin_url('page-new.php'); + elseif (strpos($sendback, 'attachments.php') !== false) $sendback = admin_url('attachments.php'); + if ( isset($done) ) { + $done['updated'] = count( $done['updated'] ); + $done['skipped'] = count( $done['skipped'] ); + $done['locked'] = count( $done['locked'] ); + $sendback = add_query_arg( $done, $sendback ); + } + if ( isset($deleted) ) + $sendback = add_query_arg('deleted', $deleted, $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')) + ); + +$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() ) ); ?> +

+ + +

+ +

+ + + +

|

+ + +
+ + + + + + + + + + +
+ +post_count / $per_page); +$page_links = paginate_links( array( + 'base' => add_query_arg( 'pagenum', '%#%' ), + 'format' => '', + 'prev_text' => __('«'), + 'next_text' => __('»'), + 'total' => $num_pages, + 'current' => $pagenum +)); + +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,54 @@ + +

+ + +
+ +

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

+


+
+

+ +
+
diff -r 000000000000 -r 03b0d1493584 web/wp-admin/edit-tags.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/edit-tags.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,320 @@ + + +
+ +

' . __('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 000000000000 -r 03b0d1493584 web/wp-admin/edit.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/edit.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,303 @@ +post_type == 'attachment' ) { + if ( ! wp_delete_attachment($post_id_del) ) + wp_die( __('Error in deleting...') ); + } else { + if ( !wp_delete_post($post_id_del) ) + wp_die( __('Error in deleting...') ); + } + $deleted++; + } + } + break; + case 'edit': + if ( isset($_GET['post']) && isset($_GET['bulk_edit']) ) { + check_admin_referer('bulk-posts'); + + if ( -1 == $_GET['_status'] ) { + $_GET['post_status'] = null; + unset($_GET['_status'], $_GET['post_status']); + } else { + $_GET['post_status'] = $_GET['_status']; + } + + $done = bulk_edit_posts($_GET); + } + break; + } + + $sendback = wp_get_referer(); + if ( strpos($sendback, 'post.php') !== false ) $sendback = admin_url('post-new.php'); + elseif ( strpos($sendback, 'attachments.php') !== false ) $sendback = admin_url('attachments.php'); + if ( isset($done) ) { + $done['updated'] = count( $done['updated'] ); + $done['skipped'] = count( $done['skipped'] ); + $done['locked'] = count( $done['locked'] ); + $sendback = add_query_arg( $done, $sendback ); + } + if ( isset($deleted) ) + $sendback = add_query_arg('deleted', $deleted, $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'); + +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() ) ); ?> +

+ + +

|

+ + + +

+ +

+ + +
+ + + + + + + + + + + + +
+ add_query_arg( 'paged', '%#%' ), + 'format' => '', + 'prev_text' => __('«'), + 'next_text' => __('»'), + 'total' => $wp_query->max_num_pages, + 'current' => $_GET['paged'] +)); + +?> + +
+ + + + +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 000000000000 -r 03b0d1493584 web/wp-admin/gears-manifest.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/gears-manifest.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,51 @@ + +{ +"betaManifestVersion" : 1, +"version" : "", +"entries" : [ + + +]} diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/align-center.png Binary file web/wp-admin/images/align-center.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/align-left.png Binary file web/wp-admin/images/align-left.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/align-none.png Binary file web/wp-admin/images/align-none.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/align-right.png Binary file web/wp-admin/images/align-right.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/archive-link.png Binary file web/wp-admin/images/archive-link.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/blue-grad.png Binary file web/wp-admin/images/blue-grad.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/browse-happy.gif Binary file web/wp-admin/images/browse-happy.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/bubble_bg-rtl.gif Binary file web/wp-admin/images/bubble_bg-rtl.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/bubble_bg.gif Binary file web/wp-admin/images/bubble_bg.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/button-grad-active-vs.png Binary file web/wp-admin/images/button-grad-active-vs.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/button-grad-active.png Binary file web/wp-admin/images/button-grad-active.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/button-grad-vs.png Binary file web/wp-admin/images/button-grad-vs.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/button-grad.png Binary file web/wp-admin/images/button-grad.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/comment-grey-bubble.png Binary file web/wp-admin/images/comment-grey-bubble.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/date-button.gif Binary file web/wp-admin/images/date-button.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/ed-bg-vs.gif Binary file web/wp-admin/images/ed-bg-vs.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/ed-bg.gif Binary file web/wp-admin/images/ed-bg.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/fade-butt.png Binary file web/wp-admin/images/fade-butt.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/fav-arrow-rtl.gif Binary file web/wp-admin/images/fav-arrow-rtl.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/fav-arrow-vs.gif Binary file web/wp-admin/images/fav-arrow-vs.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/fav-arrow.gif Binary file web/wp-admin/images/fav-arrow.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/fav-top-vs.gif Binary file web/wp-admin/images/fav-top-vs.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/fav-top.png Binary file web/wp-admin/images/fav-top.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/fav-vs.png Binary file web/wp-admin/images/fav-vs.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/fav.png Binary file web/wp-admin/images/fav.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/generic.png Binary file web/wp-admin/images/generic.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/gray-grad.png Binary file web/wp-admin/images/gray-grad.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/icons32-vs.png Binary file web/wp-admin/images/icons32-vs.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/icons32.png Binary file web/wp-admin/images/icons32.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/list-vs.png Binary file web/wp-admin/images/list-vs.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/list.png Binary file web/wp-admin/images/list.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/loading-publish.gif Binary file web/wp-admin/images/loading-publish.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/loading.gif Binary file web/wp-admin/images/loading.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/logo-ghost.png Binary file web/wp-admin/images/logo-ghost.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/logo-login.gif Binary file web/wp-admin/images/logo-login.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/logo.gif Binary file web/wp-admin/images/logo.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/marker.png Binary file web/wp-admin/images/marker.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/mask.png Binary file web/wp-admin/images/mask.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/media-button-image.gif Binary file web/wp-admin/images/media-button-image.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/media-button-music.gif Binary file web/wp-admin/images/media-button-music.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/media-button-other.gif Binary file web/wp-admin/images/media-button-other.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/media-button-video.gif Binary file web/wp-admin/images/media-button-video.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/menu-arrows.gif Binary file web/wp-admin/images/menu-arrows.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/menu-bits-rtl-vs.gif Binary file web/wp-admin/images/menu-bits-rtl-vs.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/menu-bits-rtl.gif Binary file web/wp-admin/images/menu-bits-rtl.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/menu-bits-vs.gif Binary file web/wp-admin/images/menu-bits-vs.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/menu-bits.gif Binary file web/wp-admin/images/menu-bits.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/menu-dark-rtl.gif Binary file web/wp-admin/images/menu-dark-rtl.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/menu-dark.gif Binary file web/wp-admin/images/menu-dark.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/menu-vs.png Binary file web/wp-admin/images/menu-vs.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/menu.png Binary file web/wp-admin/images/menu.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/no.png Binary file web/wp-admin/images/no.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/required.gif Binary file web/wp-admin/images/required.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/resize.gif Binary file web/wp-admin/images/resize.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/screen-options-left.gif Binary file web/wp-admin/images/screen-options-left.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/screen-options-right-up.gif Binary file web/wp-admin/images/screen-options-right-up.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/screen-options-right.gif Binary file web/wp-admin/images/screen-options-right.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/se.png Binary file web/wp-admin/images/se.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/star.gif Binary file web/wp-admin/images/star.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/toggle-arrow-rtl.gif Binary file web/wp-admin/images/toggle-arrow-rtl.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/toggle-arrow.gif Binary file web/wp-admin/images/toggle-arrow.gif has changed diff -r 000000000000 -r 03b0d1493584 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 000000000000 -r 03b0d1493584 web/wp-admin/images/visit-site-button-grad.gif Binary file web/wp-admin/images/visit-site-button-grad.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/wheel.png Binary file web/wp-admin/images/wheel.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/white-grad-active.png Binary file web/wp-admin/images/white-grad-active.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/white-grad.png Binary file web/wp-admin/images/white-grad.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/wordpress-logo.png Binary file web/wp-admin/images/wordpress-logo.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/wp-logo-vs.gif Binary file web/wp-admin/images/wp-logo-vs.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/wp-logo.gif Binary file web/wp-admin/images/wp-logo.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/wpspin_dark.gif Binary file web/wp-admin/images/wpspin_dark.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/wpspin_light.gif Binary file web/wp-admin/images/wpspin_light.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/xit.gif Binary file web/wp-admin/images/xit.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/images/yes.png Binary file web/wp-admin/images/yes.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-admin/import.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/import.php Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 web/wp-admin/import/blogger.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/import/blogger.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,1062 @@ + + ".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?') ); + $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 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]+)|', create_function('$match', 'return "<" . strtolower($match[1]);'), $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]+)|', create_function('$match', 'return "<" . strtolower($match[1]);'), $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_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(); + $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 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($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($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 000000000000 -r 03b0d1493584 web/wp-admin/import/blogware.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/import/blogware.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,215 @@ +'; + 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 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]+)|', create_function('$match', 'return "<" . strtolower($match[1]);'), $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]+)|', create_function('$match', 'return "<" . strtolower($match[1]);'), $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 000000000000 -r 03b0d1493584 web/wp-admin/import/dotclear.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/import/dotclear.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,729 @@ +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)); + + if($cinfo = comment_exists($name, $comment_dt)) + { + // Update comments + $ret_id = wp_update_comment(array( + 'comment_ID' => $cinfo, + '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) + ); + } + else + { + // Insert comments + $ret_id = wp_insert_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) + ); + } + $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 Login 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 login!'), '../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 000000000000 -r 03b0d1493584 web/wp-admin/import/greymatter.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/import/greymatter.php Wed Dec 23 17:55:33 2009 +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 into 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 000000000000 -r 03b0d1493584 web/wp-admin/import/livejournal.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/import/livejournal.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,1054 @@ + '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 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]+)|', create_function( '$match', 'return "<" . strtolower( $match[1] );' ), $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 ); + $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]+)|', create_function( '$match', 'return "<" . strtolower( $match[1] );' ), $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' ); + } + + // Login 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 000000000000 -r 03b0d1493584 web/wp-admin/import/mt.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/import/mt.php Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 web/wp-admin/import/opml.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/import/opml.php Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 web/wp-admin/import/rss.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/import/rss.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,198 @@ +'; + 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 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]+)|', create_function('$match', 'return "<" . strtolower($match[1]);'), $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 000000000000 -r 03b0d1493584 web/wp-admin/import/stp.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/import/stp.php Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 web/wp-admin/import/textpattern.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/import/textpattern.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,700 @@ +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); + + if($cinfo = comment_exists($name, $posted)) + { + // Update comments + $ret_id = wp_update_comment(array( + 'comment_ID' => $cinfo, + 'comment_post_ID' => $comment_post_ID, + 'comment_author' => $name, + 'comment_author_email' => $email, + 'comment_author_url' => $web, + 'comment_date' => $posted, + 'comment_content' => $message, + 'comment_approved' => $comment_approved) + ); + } + else + { + // Insert comments + $ret_id = wp_insert_comment(array( + 'comment_post_ID' => $comment_post_ID, + 'comment_author' => $name, + 'comment_author_email' => $email, + 'comment_author_url' => $web, + 'comment_author_IP' => $ip, + 'comment_date' => $posted, + 'comment_content' => $message, + 'comment_approved' => $comment_approved) + ); + } + $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 Login 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 login!'), 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 000000000000 -r 03b0d1493584 web/wp-admin/import/utw.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/import/utw.php Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 web/wp-admin/import/wordpress.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/import/wordpress.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,807 @@ +'; + 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, '') ) { + $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'); + echo '
      '; + $j = -1; + foreach ($authors as $author) { + ++ $j; + echo '
    1. '.__('Import author:').' '.$author.'
      '; + $this->users_form($j, $author); + echo '
    2. '; + } + + 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_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 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' ); + $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]+)|', create_function('$match', 'return "<" . strtolower($match[1]);'), $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]+)|', create_function('$match', 'return "<" . strtolower($match[1]);'), $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 ( 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; + if ( $comments) { foreach ($comments as $comment) { + $comment_author = $this->get_tag( $comment, 'wp:comment_author'); + $comment_author_email = $this->get_tag( $comment, 'wp:comment_author_email'); + $comment_author_IP = $this->get_tag( $comment, 'wp:comment_author_IP'); + $comment_author_url = $this->get_tag( $comment, 'wp:comment_author_url'); + $comment_date = $this->get_tag( $comment, 'wp:comment_date'); + $comment_date_gmt = $this->get_tag( $comment, 'wp:comment_date_gmt'); + $comment_content = $this->get_tag( $comment, 'wp:comment_content'); + $comment_approved = $this->get_tag( $comment, 'wp:comment_approved'); + $comment_type = $this->get_tag( $comment, 'wp:comment_type'); + $comment_parent = $this->get_tag( $comment, 'wp:comment_parent'); + + // if this is a new post we can skip the comment_exists() check + if ( !$post_exists || !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_date_gmt', 'comment_content', 'comment_approved', 'comment_type', 'comment_parent'); + wp_insert_comment($commentdata); + $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(); + $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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 web/wp-admin/includes/admin.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/includes/admin.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,54 @@ + \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-admin/includes/bookmark.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/includes/bookmark.php Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,903 @@ +__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; + if(ip2long($ip) === -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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,6285 @@ +zipname = $p_zipname; + $this->zip_fd = 0; + $this->magic_quotes_status = -1; + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 1); + 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) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, 'PclZip::create', "filelist='$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(); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "$v_size arguments passed to the method"); + + // ----- 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)) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Variable list of options detected"); + + // ----- 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) { + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0); + return 0; + } + } + + // ----- Look for 2 args + // Here we need to support the first historic synopsis of the + // method. + else { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Static synopsis"); + + // ----- 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"); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + 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"); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0); + 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 { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Ignore an empty filename"); + } + } + } + + // ----- 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) { + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0); + return 0; + } + } + + // ----- Expand the filelist (expand directories) + $v_result = $this->privFileDescrExpand($v_filedescr_list, $v_options); + if ($v_result != 1) { + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0); + return 0; + } + + // ----- Call the create fct + $v_result = $this->privCreate($v_filedescr_list, $p_result_list, $v_options); + if ($v_result != 1) { + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0); + return 0; + } + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $p_result_list); + 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) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, 'PclZip::add', "filelist='$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(); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "$v_size arguments passed to the method"); + + // ----- 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)) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Variable list of options detected"); + + // ----- 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) { + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0); + return 0; + } + } + + // ----- Look for 2 args + // Here we need to support the first historic synopsis of the + // method. + else { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Static synopsis"); + + // ----- 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + 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"); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0); + 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) { + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0); + return 0; + } + } + + // ----- Expand the filelist (expand directories) + $v_result = $this->privFileDescrExpand($v_filedescr_list, $v_options); + if ($v_result != 1) { + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0); + return 0; + } + + // ----- Call the create fct + $v_result = $this->privAdd($v_filedescr_list, $p_result_list, $v_options); + if ($v_result != 1) { + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0); + return 0; + } + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $p_result_list); + 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() + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, 'PclZip::listContent', ""); + $v_result=1; + + // ----- Reset the error handler + $this->privErrorReset(); + + // ----- Check archive + if (!$this->privCheckFormat()) { + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0); + return(0); + } + + // ----- Call the extracting fct + $p_list = array(); + if (($v_result = $this->privList($p_list)) != 1) + { + unset($p_list); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0, PclZip::errorInfo()); + return(0); + } + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $p_list); + 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() + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::extract", ""); + $v_result=1; + + // ----- Reset the error handler + $this->privErrorReset(); + + // ----- Check archive + if (!$this->privCheckFormat()) { + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0); + 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(); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "$v_size arguments passed to the method"); + + // ----- 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)) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Variable list of options"); + + // ----- 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) { + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0); + 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 { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Static synopsis"); + + // ----- 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0, PclZip::errorInfo()); + return 0; + } + } + } + + // ----- Look for default option values + $this->privOptionDefaultThreshold($v_options); + + // ----- Trace + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "path='$v_path', remove_path='$v_remove_path', remove_all_path='".($v_remove_path?'true':'false')."'"); + + // ----- 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); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0, PclZip::errorInfo()); + return(0); + } + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $p_list); + 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) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::extractByIndex", "index='$p_index', ..."); + $v_result=1; + + // ----- Reset the error handler + $this->privErrorReset(); + + // ----- Check archive + if (!$this->privCheckFormat()) { + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0); + 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(); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "$v_size arguments passed to the method"); + + // ----- 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)) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Variable list of options"); + + // ----- 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) { + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0); + 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; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Option PCLZIP_OPT_EXTRACT_AS_STRING not set."); + } + else { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Option PCLZIP_OPT_EXTRACT_AS_STRING set."); + } + } + + // ----- Look for 2 args + // Here we need to support the first historic synopsis of the + // method. + else { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Static synopsis"); + + // ----- 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return 0; + } + } + } + + // ----- Trace + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "index='$p_index', path='$v_path', remove_path='$v_remove_path', remove_all_path='".($v_remove_path?'true':'false')."'"); + + // ----- 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) { + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0); + 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) { + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0, PclZip::errorInfo()); + return(0); + } + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $p_list); + 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() + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::delete", ""); + $v_result=1; + + // ----- Reset the error handler + $this->privErrorReset(); + + // ----- Check archive + if (!$this->privCheckFormat()) { + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0); + return(0); + } + + // ----- Set default values + $v_options = array(); + + // ----- Look for variable options arguments + $v_size = func_num_args(); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "$v_size arguments passed to the method"); + + // ----- 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) { + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0); + 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); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0, PclZip::errorInfo()); + return(0); + } + + // ----- Magic quotes trick + $this->privSwapBackMagicQuotes(); + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_list); + return $v_list; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : deleteByIndex() + // Description : + // ***** Deprecated ***** + // delete(PCLZIP_OPT_BY_INDEX, $p_index) should be prefered. + // -------------------------------------------------------------------------------- + function deleteByIndex($p_index) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::deleteByIndex", "index='$p_index'"); + + $p_list = $this->delete(PCLZIP_OPT_BY_INDEX, $p_index); + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $p_list); + 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() + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::properties", ""); + + // ----- Reset the error handler + $this->privErrorReset(); + + // ----- Magic quotes trick + $this->privDisableMagicQuotes(); + + // ----- Check archive + if (!$this->privCheckFormat()) { + $this->privSwapBackMagicQuotes(); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0); + 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 + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary read mode"); + 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), 0); + return 0; + } + + // ----- Read the central directory informations + $v_central_dir = array(); + if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1) + { + $this->privSwapBackMagicQuotes(); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0); + 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_prop); + 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) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::duplicate", ""); + $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')) + { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "The parameter is valid PclZip object '".$p_archive->zipname."'"); + + // ----- 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)) + { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "The parameter is a filename '$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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::merge", ""); + $v_result = 1; + + // ----- Reset the error handler + $this->privErrorReset(); + + // ----- Check archive + if (!$this->privCheckFormat()) { + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0); + 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')) + { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "The parameter is valid PclZip object"); + + // ----- 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)) + { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "The parameter is a filename"); + + // ----- 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privCheckFormat", ""); + $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."'"); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, false, PclZip::errorInfo()); + 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."'"); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, false, PclZip::errorInfo()); + return(false); + } + + // ----- Check the magic code + // TBC + + // ----- Check the central header + // TBC + + // ----- Check each file header + // TBC + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privParseOptions", ""); + $v_result=1; + + // ----- Read the options + $i=0; + while ($i<$p_size) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Looking for table index $i, option = '".PclZipUtilOptionText($p_options_list[$i])."(".$p_options_list[$i].")'"); + + // ----- 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + + // ----- Get the value + $v_result_list[$p_options_list[$i]] = PclZipUtilTranslateWinPath($p_options_list[$i+1], FALSE); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($p_options_list[$i])." = '".$v_result_list[$p_options_list[$i]]."'"); + $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])."'"); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + 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'"); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + 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])."'"); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + + // ----- Get the value (and convert it in bytes) + $v_result_list[$p_options_list[$i]] = $v_value*1048576; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($p_options_list[$i])." = '".$v_result_list[$p_options_list[$i]]."'"); + $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'"); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + + $v_result_list[$p_options_list[$i]] = true; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($p_options_list[$i])." = '".$v_result_list[$p_options_list[$i]]."'"); + 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'"); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + 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'"); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + + $v_result_list[$p_options_list[$i]] = true; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($p_options_list[$i])." = '".$v_result_list[$p_options_list[$i]]."'"); + 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + 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); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($p_options_list[$i])." = '".$v_result_list[$p_options_list[$i]]."'"); + $i++; + } + else { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($p_options_list[$i])." set with an empty value is ignored."); + } + 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + ////--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($p_options_list[$i])." = '".$v_result_list[$p_options_list[$i]]."'"); + $i++; + break; + + // ----- Look for options that request an EREG or PREG expression + case PCLZIP_OPT_BY_EREG : + 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($p_options_list[$i])." = '".$v_result_list[$p_options_list[$i]]."'"); + $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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($p_options_list[$i])." = '".$v_result_list[$p_options_list[$i]]."'"); + $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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + + // ----- Get the value + $v_work_list = array(); + if (is_string($p_options_list[$i+1])) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Index value is a 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])) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Index value is an 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])) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Index value is an array"); + $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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + + // ----- Get the value + $v_result_list[$p_options_list[$i]] = $p_options_list[$i+1]; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($p_options_list[$i])." = '".$v_result_list[$p_options_list[$i]]."'"); + $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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + + // ----- Get the value + $v_function_name = $p_options_list[$i+1]; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "call-back ".PclZipUtilOptionText($p_options_list[$i])." = '".$v_function_name."'"); + + // ----- 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + 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') { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Detect a mandatory option : ".PclZipUtilOptionText($key)."(".$key.")"); + // ----- Look if present + if (!isset($v_result_list[$key])) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Missing mandatory parameter ".PclZipUtilOptionText($key)."(".$key.")"); + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + } + } + } + + // ----- Look for default values + if (!isset($v_result_list[PCLZIP_OPT_TEMP_FILE_THRESHOLD])) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3,"Calculate auto threshold"); + + } + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privOptionDefaultThreshold() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privOptionDefaultThreshold(&$p_options) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privOptionDefaultThreshold", ""); + $v_result=1; + + if (isset($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD]) + || isset($p_options[PCLZIP_OPT_TEMP_FILE_OFF])) { + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3,"Create an auto-threshold for use of temporay files"); + // ----- 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); + + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3,"Current memory usage : ".memory_get_usage(TRUE)." bytes"); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3,"Threshold value is : ".$p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD]." bytes"); + + // ----- Sanity check : No threshold if value lower than 1M + if ($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD] < 1048576) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3,"Unset the threshold (value ".$p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD].") because under 1Mo sanity check)"); + unset($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD]); + } + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privFileDescrParseAtt", ""); + $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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + 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)."'"); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + + $p_filedescr['filename'] = PclZipUtilPathReduction($v_value); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($v_key)." = '".$v_value."'"); + + if ($p_filedescr['filename'] == '') { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid empty filename for attribute '".PclZipUtilOptionText($v_key)."'"); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + 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)."'"); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + + $p_filedescr['new_short_name'] = PclZipUtilPathReduction($v_value); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($v_key)." = '".$v_value."'"); + + if ($p_filedescr['new_short_name'] == '') { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid empty short filename for attribute '".PclZipUtilOptionText($v_key)."'"); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + 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)."'"); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + + $p_filedescr['new_full_name'] = PclZipUtilPathReduction($v_value); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($v_key)." = '".$v_value."'"); + + if ($p_filedescr['new_full_name'] == '') { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid empty full filename for attribute '".PclZipUtilOptionText($v_key)."'"); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + 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)."'"); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + + $p_filedescr['comment'] = $v_value; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($v_key)." = '".$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)."'"); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + + $p_filedescr['mtime'] = $v_value; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($v_key)." = '".$v_value."'"); + break; + + case PCLZIP_ATT_FILE_CONTENT : + $p_filedescr['content'] = $v_value; + ////--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($v_key)." = '".$v_value."'"); + break; + + default : + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, + "Unknown parameter '".$v_key."'"); + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + 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') { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Detect a mandatory option : ".PclZipUtilOptionText($key)."(".$key.")"); + // ----- Look if present + if (!isset($p_file_list[$key])) { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Missing mandatory parameter ".PclZipUtilOptionText($key)."(".$key.")"); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + } + } + } + + // end foreach + } + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privFileDescrExpand", ""); + $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) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Looking for '".$v_item_handler."' in the directory"); + + // ----- 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']) { + 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 { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Unable to open dir '".$v_descr['filename']."' in read mode. Skipped."); + // 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) { + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + // ----- Concat the resulting list + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Merging result list (size '".sizeof($v_result_list)."') with dirlist (size '".sizeof($v_dirlist_descr)."')"); + $v_result_list = array_merge($v_result_list, $v_dirlist_descr); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "merged result list is size '".sizeof($v_result_list)."'"); + } + else { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Nothing in this folder to expand."); + } + + // ----- Free local array + unset($v_dirlist_descr); + } + } + + // ----- Get the result list + $p_filedescr_list = $v_result_list; + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privCreate() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privCreate($p_filedescr_list, &$p_result_list, &$p_options) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privCreate", "list"); + $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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privAdd() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privAdd($p_filedescr_list, &$p_result_list, &$p_options) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privAdd", "list"); + $v_result=1; + $v_list_detail = array(); + + // ----- Look if the archive exists or is empty + if ((!is_file($this->zipname)) || (filesize($this->zipname) == 0)) + { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Archive does not exist, or is empty, create it."); + + // ----- Do a create + $v_result = $this->privCreate($p_filedescr_list, $p_result_list, $p_options); + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + // ----- Magic quotes trick + $this->privDisableMagicQuotes(); + + // ----- Open the zip file + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary read mode"); + if (($v_result=$this->privOpenFd('rb')) != 1) + { + // ----- Magic quotes trick + $this->privSwapBackMagicQuotes(); + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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(); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + // ----- Go to beginning of File + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position in file : ".ftell($this->zip_fd)."'"); + @rewind($this->zip_fd); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position in file : ".ftell($this->zip_fd)."'"); + + // ----- Creates a temporay file + $v_zip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.tmp'; + + // ----- Open the temporary file in write mode + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary read 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + 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); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read $v_read_size bytes"); + $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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + // ----- Store the offset of the central dir + $v_offset = @ftell($this->zip_fd); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "New offset of central dir : $v_offset"); + + // ----- 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); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read $v_read_size bytes"); + $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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privOpenFd() + // Description : + // Parameters : + // -------------------------------------------------------------------------------- + function privOpenFd($p_mode) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privOpenFd", 'mode='.$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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + + // ----- Open the zip file + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Open file in '.$p_mode.' mode'); + 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privCloseFd() + // Description : + // Parameters : + // -------------------------------------------------------------------------------- + function privCloseFd() + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privCloseFd", ""); + $v_result=1; + + if ($this->zip_fd != 0) + @fclose($this->zip_fd); + $this->zip_fd = 0; + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privAddList", "list"); + $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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privAddFileList", "filedescr_list"); + $v_result=1; + $v_header = array(); + + // ----- Recuperate the current number of elt in list + $v_nb = sizeof($p_result_list); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Before add, list have ".$v_nb." elements"); + + // ----- Loop on the files + for ($j=0; ($jprivAddFile($p_filedescr_list[$j], $v_header, + $p_options); + if ($v_result != 1) { + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + // ----- Store the file infos + $p_result_list[$v_nb++] = $v_header; + } + } + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "After add, list have ".$v_nb." elements"); + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privAddFile() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privAddFile($p_filedescr, &$p_header, &$p_options) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privAddFile", "filename='".$p_filedescr['filename']."'"); + $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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + + // ----- Look for a stored different filename + /* TBC : Removed + if (isset($p_filedescr['stored_filename'])) { + $v_stored_filename = $p_filedescr['stored_filename']; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, 'Stored filename is NOT the same "'.$v_stored_filename.'"'); + } + else { + $v_stored_filename = $p_filedescr['stored_filename']; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, 'Stored filename is the same'); + } + */ + + // ----- 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']); + } + + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Header external extension '".sprintf("0x%X",$p_header['external'])."'"); + + // ----- Look for filetime + if (isset($p_filedescr['mtime'])) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3,"Overload mtime value with :'".$p_filedescr['mtime']."'"); + $p_header['mtime'] = $p_filedescr['mtime']; + } + else if ($p_filedescr['type'] == 'virtual_file') { + $p_header['mtime'] = time(); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Virtual file : use current time '".$p_header['mtime']."' for mtime value."); + } + 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])) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "A pre-callback '".$p_options[PCLZIP_CB_PRE_ADD]."()') is defined for the extraction"); + + // ----- 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. + eval('$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']); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "New stored filename is '".$p_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 { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2,"In memory compression."); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2,"Current memory usage : ".memory_get_usage(TRUE)." bytes"); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2,"Current memory peak : ".memory_get_peak_usage(TRUE)." bytes"); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "'".$p_filename."' is a file"); + + // ----- 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"); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + + // ----- Read the file content + $v_content = @fread($v_file, $p_header['size']); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2,"Memory usage after reading file : ".memory_get_usage(TRUE)." bytes"); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2,"Memory peak after reading file : ".memory_get_peak_usage(TRUE)." bytes"); + + // ----- 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]) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "File will not be compressed"); + // ----- Set header parameters + $p_header['compressed_size'] = $p_header['size']; + $p_header['compression'] = 0; + } + + // ----- Look for normal compression + else { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "File will be compressed"); + // ----- Compress the content + $v_content = @gzdeflate($v_content); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2,"Memory usage after gzdeflate : ".memory_get_usage(TRUE)." bytes"); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2,"Memory peak after gzdeflate : ".memory_get_peak_usage(TRUE)." bytes"); + + // ----- 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); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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') { + + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Add by string"); + $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]) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "File will not be compressed"); + // ----- Set header parameters + $p_header['compressed_size'] = $p_header['size']; + $p_header['compression'] = 0; + } + + // ----- Look for normal compression + else { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "File will be compressed"); + // ----- 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); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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') { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "'".$p_filename."' is a 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) + { + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + } + } + + // ----- Look for post-add callback + if (isset($p_options[PCLZIP_CB_POST_ADD])) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "A post-callback '".$p_options[PCLZIP_CB_POST_ADD]."()') is defined for the extraction"); + + // ----- 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. + eval('$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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privAddFileUsingTempFile() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privAddFileUsingTempFile($p_filedescr, &$p_header, &$p_options) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privAddFileUsingTempFile", "filename='".$p_filedescr['filename']."'"); + $v_result=PCLZIP_ERR_NO_ERROR; + + // ----- Working variable + $p_filename = $p_filedescr['filename']; + + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "'".$p_filename."' is a file"); + + // ----- 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"); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + 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'); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + 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); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read ".$v_read_size." bytes"); + $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 + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "gzip file size ".filesize($v_gzip_temp_name)); + 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'); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + 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'); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + 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 + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, '$v_data_header[id1]='.bin2hex($v_data_header['id1'])); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, '$v_data_header[id2]='.bin2hex($v_data_header['id2'])); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, '$v_data_header[cm]='.bin2hex($v_data_header['cm'])); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, '$v_data_header[flag]='.bin2hex($v_data_header['flag'])); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, '$v_data_header[mtime]='.$v_data_header['mtime']); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, '$v_data_header[xfl]='.bin2hex($v_data_header['xfl'])); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, '$v_data_header[os]='.bin2hex($v_data_header['os'])); + $v_data_header['os'] = bin2hex($v_data_header['os']); + + // ----- Read the gzip file footer + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "File position after header ".ftell($v_file_compressed)); + @fseek($v_file_compressed, filesize($v_gzip_temp_name)-8); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "File position at beginning of footer ".ftell($v_file_compressed)); + $v_binary_data = @fread($v_file_compressed, 8); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "File position after footer ".ftell($v_file_compressed)); + $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']; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Compressed size ".(filesize($v_gzip_temp_name)-18)); + $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) { + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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'); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + + // ----- Read the file by PCLZIP_READ_BLOCK_SIZE octets blocks + fseek($v_file_compressed, 10); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "File position before reading compressed data ".ftell($v_file_compressed)); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, ' '.$p_header['compressed_size'].' bytes to read'); + $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); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read ".$v_read_size." bytes"); + $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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privCalculateStoredFilename", "filename='".$p_filedescr['filename']."'"); + $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 = ''; + } + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Remove path ='".$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']); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Changing full name of '".$p_filename."' for '".$v_stored_filename."'"); + } + + // ----- 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']; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Changing short name of '".$p_filename."' for '".$v_stored_filename."'"); + } + 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); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Remove all path selected change '".$p_filename."' for '".$v_stored_filename."'"); + } + // ----- Look for partial path remove + else if ($p_remove_dir != "") { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Partial path to remove"); + 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 = ""; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Path to remove is the current folder"); + } + else { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Remove path '$p_remove_dir' in file '$v_stored_filename'"); + $v_stored_filename = substr($v_stored_filename, + strlen($p_remove_dir)); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Result is '$v_stored_filename'"); + } + } + } + + // ----- 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; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Add path '$p_add_dir' in file '$p_filename' = '$v_stored_filename'"); + } + } + + // ----- Filename (reduce the path of stored name) + $v_stored_filename = PclZipUtilPathReduction($v_stored_filename); + $p_filedescr['stored_filename'] = $v_stored_filename; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Stored filename will be '".$p_filedescr['stored_filename']."', strlen ".strlen($p_filedescr['stored_filename'])); + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privWriteFileHeader() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privWriteFileHeader(&$p_header) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privWriteFileHeader", 'file="'.$p_header['filename'].'", stored as "'.$p_header['stored_filename'].'"'); + $v_result=1; + + // ----- Store the offset position of the file + $p_header['offset'] = ftell($this->zip_fd); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, 'File offset of the header :'.$p_header['offset']); + + // ----- Transform UNIX mtime to DOS format mdate/mtime + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Date : \''.date("d/m/y H:i:s", $p_header['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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privWriteCentralFileHeader() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privWriteCentralFileHeader(&$p_header) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privWriteCentralFileHeader", 'file="'.$p_header['filename'].'", stored as "'.$p_header['stored_filename'].'"'); + $v_result=1; + + // TBC + //for(reset($p_header); $key = key($p_header); next($p_header)) { + // //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "header[$key] = ".$p_header[$key]); + //} + + // ----- Transform UNIX mtime to DOS format mdate/mtime + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Date : \''.date("d/m/y H:i:s", $p_header['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']; + + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Comment size : \''.$p_header['comment_len'].'\''); + + // ----- 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privWriteCentralHeader() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privWriteCentralHeader($p_nb_entries, $p_size, $p_offset, $p_comment) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privWriteCentralHeader", 'nb_entries='.$p_nb_entries.', size='.$p_size.', offset='.$p_offset.', comment="'.$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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privList() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privList(&$p_list) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privList", "list"); + $v_result=1; + + // ----- Magic quotes trick + $this->privDisableMagicQuotes(); + + // ----- Open the zip file + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary read mode"); + 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + + // ----- Read the central directory informations + $v_central_dir = array(); + if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1) + { + $this->privSwapBackMagicQuotes(); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + // ----- Go to beginning of Central Dir + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Offset : ".$v_central_dir['offset']."'"); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Position in file : ".ftell($this->zip_fd)."'"); + @rewind($this->zip_fd); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Position in file : ".ftell($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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Position in file : ".ftell($this->zip_fd)."'"); + + // ----- 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(); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privConvertHeader2FileInfo", "Filename='".$p_header['filename']."'"); + $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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privExtractByRule", "path='$p_path', remove_path='$p_remove_path', remove_all_path='".($p_remove_all_path?'true':'false')."'"); + $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) == "/") + { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Destination path [$p_path] ends by '/'"); + $p_path = substr($p_path, 0, strlen($p_path)-1); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Modified to [$p_path]"); + } + } + + // ----- 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 + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary read mode"); + if (($v_result = $this->privOpenFd('rb')) != 1) + { + $this->privSwapBackMagicQuotes(); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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(); + + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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++) + { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Read next file header entry : '$i'"); + + // ----- Read next Central dir entry + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Position before rewind : ".ftell($this->zip_fd)."'"); + @rewind($this->zip_fd); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Position after rewind : ".ftell($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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Position after fseek : ".ftell($this->zip_fd)."'"); + + // ----- Read the file header + $v_header = array(); + if (($v_result = $this->privReadCentralFileHeader($v_header)) != 1) + { + // ----- Close the zip file + $this->privCloseFd(); + $this->privSwapBackMagicQuotes(); + + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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)) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extract with rule 'ByName'"); + + // ----- 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])) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "The directory is in the file path"); + $v_extract = true; + } + } + // ----- Look for a filename + elseif ($v_header['stored_filename'] == $p_options[PCLZIP_OPT_BY_NAME][$j]) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "The file is the right one."); + $v_extract = true; + } + } + } + + // ----- Look for extract by ereg rule + else if ( (isset($p_options[PCLZIP_OPT_BY_EREG])) + && ($p_options[PCLZIP_OPT_BY_EREG] != "")) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extract by ereg '".$p_options[PCLZIP_OPT_BY_EREG]."'"); + + if (ereg($p_options[PCLZIP_OPT_BY_EREG], $v_header['stored_filename'])) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Filename match the regular expression"); + $v_extract = true; + } + } + + // ----- Look for extract by preg rule + else if ( (isset($p_options[PCLZIP_OPT_BY_PREG])) + && ($p_options[PCLZIP_OPT_BY_PREG] != "")) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extract with rule 'ByEreg'"); + + if (preg_match($p_options[PCLZIP_OPT_BY_PREG], $v_header['stored_filename'])) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Filename match the regular expression"); + $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)) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extract with rule 'ByIndex'"); + + // ----- 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'])) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Found as part of an index range"); + $v_extract = true; + } + if ($i>=$p_options[PCLZIP_OPT_BY_INDEX][$j]['end']) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Do not look this index range for next loop"); + $j_start = $j+1; + } + + if ($p_options[PCLZIP_OPT_BY_INDEX][$j]['start']>$i) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Index range is greater than index, stop loop"); + break; + } + } + } + + // ----- Look for no rule, which means extract all the archive + else { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extract with no rule (extract all)"); + $v_extract = true; + } + + // ----- Check compression method + if ( ($v_extract) + && ( ($v_header['compression'] != 8) + && ($v_header['compression'] != 0))) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Unsupported compression method (".$v_header['compression'].")"); + $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)) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "PCLZIP_OPT_STOP_ON_ERROR is selected, extraction will be stopped"); + + $this->privSwapBackMagicQuotes(); + + PclZip::privErrorLog(PCLZIP_ERR_UNSUPPORTED_COMPRESSION, + "Filename '".$v_header['stored_filename']."' is " + ."compressed by an unsupported compression " + ."method (".$v_header['compression'].") "); + + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + } + + // ----- Check encrypted files + if (($v_extract) && (($v_header['flag'] & 1) == 1)) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Unsupported file encryption"); + $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)) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "PCLZIP_OPT_STOP_ON_ERROR is selected, extraction will be stopped"); + + $this->privSwapBackMagicQuotes(); + + PclZip::privErrorLog(PCLZIP_ERR_UNSUPPORTED_ENCRYPTION, + "Unsupported encryption for " + ." filename '".$v_header['stored_filename'] + ."'"); + + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + } + + // ----- Look for real extraction + if (($v_extract) && ($v_header['status'] != 'ok')) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "No need for extract"); + $v_result = $this->privConvertHeader2FileInfo($v_header, + $p_file_list[$v_nb_extracted++]); + if ($v_result != 1) { + $this->privCloseFd(); + $this->privSwapBackMagicQuotes(); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + $v_extract = false; + } + + // ----- Look for real extraction + if ($v_extract) + { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extracting file '".$v_header['filename']."', index '$i'"); + + // ----- Go to the file position + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position before rewind : ".ftell($this->zip_fd)."'"); + @rewind($this->zip_fd); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position after rewind : ".ftell($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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position after fseek : ".ftell($this->zip_fd)."'"); + + // ----- Look for extraction as string + if ($p_options[PCLZIP_OPT_EXTRACT_AS_STRING]) { + + // ----- Extracting the file + $v_result1 = $this->privExtractFileAsString($v_header, $v_string); + if ($v_result1 < 1) { + $this->privCloseFd(); + $this->privSwapBackMagicQuotes(); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result1); + 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(); + + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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(); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result1); + 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(); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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(); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result1); + 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(); + + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + // ----- Look for user callback abort + if ($v_result1 == 2) { + break; + } + } + } + } + + // ----- Close the zip file + $this->privCloseFd(); + $this->privSwapBackMagicQuotes(); + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, 'PclZip::privExtractFile', "path='$p_path', remove_path='$p_remove_path', remove_all_path='".($p_remove_all_path?'true':'false')."'"); + $v_result=1; + + // ----- Read the file header + if (($v_result = $this->privReadFileHeader($v_header)) != 1) + { + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Found file '".$v_header['filename']."', size '".$v_header['size']."'"); + + // ----- 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) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "The entry is a folder : need to be filtered"); + + $p_entry['status'] = "filtered"; + + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "All path is removed"); + // ----- Get the basename of the path + $p_entry['filename'] = basename($p_entry['filename']); + } + + // ----- Look for path to remove + else if ($p_remove_path != "") + { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Look for some path to remove"); + if (PclZipUtilPathInclusion($p_remove_path, $p_entry['filename']) == 2) + { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "The folder is the same as the removed path '".$p_entry['filename']."'"); + + // ----- Change the file status + $p_entry['status'] = "filtered"; + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + $p_remove_path_size = strlen($p_remove_path); + if (substr($p_entry['filename'], 0, $p_remove_path_size) == $p_remove_path) + { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Found path '$p_remove_path' to remove in file '".$p_entry['filename']."'"); + + // ----- Remove the path + $p_entry['filename'] = substr($p_entry['filename'], $p_remove_path_size); + + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Resulting file is '".$p_entry['filename']."'"); + } + } + + // ----- 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])) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Check the extract directory restriction"); + $v_inclusion + = PclZipUtilPathInclusion($p_options[PCLZIP_OPT_EXTRACT_DIR_RESTRICTION], + $p_entry['filename']); + if ($v_inclusion == 0) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "PCLZIP_OPT_EXTRACT_DIR_RESTRICTION is selected, file is outside restriction"); + + PclZip::privErrorLog(PCLZIP_ERR_DIRECTORY_RESTRICTION, + "Filename '".$p_entry['filename']."' is " + ."outside PCLZIP_OPT_EXTRACT_DIR_RESTRICTION"); + + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + } + + // ----- Look for pre-extract callback + if (isset($p_options[PCLZIP_CB_PRE_EXTRACT])) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "A pre-callback '".$p_options[PCLZIP_CB_PRE_EXTRACT]."()') is defined for the extraction"); + + // ----- 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);'); + if ($v_result == 0) { + // ----- Change the file status + $p_entry['status'] = "skipped"; + $v_result = 1; + } + + // ----- Look for abort result + if ($v_result == 2) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "User callback abort the extraction"); + // ----- 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']; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "New filename is '".$p_entry['filename']."'"); + } + + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extracting file (with path) '".$p_entry['filename']."', size '$v_header[size]'"); + + // ----- 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'])) + { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "File '".$p_entry['filename']."' already exists"); + + // ----- Look if file is a directory + if (is_dir($p_entry['filename'])) + { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Existing file '".$p_entry['filename']."' is a directory"); + + // ----- 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)) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "PCLZIP_OPT_STOP_ON_ERROR is selected, extraction will be stopped"); + + PclZip::privErrorLog(PCLZIP_ERR_ALREADY_A_DIRECTORY, + "Filename '".$p_entry['filename']."' is " + ."already used by an existing directory"); + + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + } + // ----- Look if file is write protected + else if (!is_writeable($p_entry['filename'])) + { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Existing file '".$p_entry['filename']."' is write protected"); + + // ----- 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)) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "PCLZIP_OPT_STOP_ON_ERROR is selected, extraction will be stopped"); + + PclZip::privErrorLog(PCLZIP_ERR_WRITE_OPEN_FAIL, + "Filename '".$p_entry['filename']."' exists " + ."and is write protected"); + + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + } + + // ----- Look if the extracted file is older + else if (filemtime($p_entry['filename']) > $p_entry['mtime']) + { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Existing file '".$p_entry['filename']."' is newer (".date("l dS of F Y h:i:s A", filemtime($p_entry['filename'])).") than the extracted file (".date("l dS of F Y h:i:s A", $p_entry['mtime']).")"); + // ----- Change the file status + if ( (isset($p_options[PCLZIP_OPT_REPLACE_NEWER])) + && ($p_options[PCLZIP_OPT_REPLACE_NEWER]===true)) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "PCLZIP_OPT_REPLACE_NEWER is selected, file will be replaced"); + } + else { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "File will not be replaced"); + $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)) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "PCLZIP_OPT_STOP_ON_ERROR is selected, extraction will be stopped"); + + PclZip::privErrorLog(PCLZIP_ERR_WRITE_OPEN_FAIL, + "Newer version of '".$p_entry['filename']."' exists " + ."and option PCLZIP_OPT_REPLACE_NEWER is not selected"); + + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + } + } + else { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Existing file '".$p_entry['filename']."' is older than the extrated one - will be replaced by the extracted one (".date("l dS of F Y h:i:s A", filemtime($p_entry['filename'])).") than the extracted file (".date("l dS of F Y h:i:s A", $p_entry['mtime']).")"); + } + } + + // ----- 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) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Unable to create path for '".$p_entry['filename']."'"); + + // ----- Change the file status + $p_entry['status'] = "path_creation_fail"; + + // ----- Return + ////--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + //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) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extracting an un-compressed file"); + + // ----- Opening destination file + if (($v_dest_file = @fopen($p_entry['filename'], 'wb')) == 0) + { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Error while opening '".$p_entry['filename']."' in write binary mode"); + + // ----- Change the file status + $p_entry['status'] = "write_error"; + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Read '".$p_entry['size']."' bytes"); + + // ----- 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); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Read $v_read_size bytes"); + $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 { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extracting a compressed file (Compression method ".$p_entry['compression'].")"); + // ----- TBC + // Need to be finished + if (($p_entry['flag'] & 1) == 1) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "File is encrypted"); + PclZip::privErrorLog(PCLZIP_ERR_UNSUPPORTED_ENCRYPTION, 'File \''.$p_entry['filename'].'\' is encrypted. Encrypted files are not supported.'); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + 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 { + + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Read '".$p_entry['compressed_size']."' compressed bytes"); + + // ----- 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) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Unable to inflate compressed file"); + + // ----- Change the file status + // TBC + $p_entry['status'] = "error"; + + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + // ----- Opening destination file + if (($v_dest_file = @fopen($p_entry['filename'], 'wb')) == 0) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Error while opening '".$p_entry['filename']."' in write binary mode"); + + // ----- Change the file status + $p_entry['status'] = "write_error"; + + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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])) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "chmod option activated '".$p_options[PCLZIP_OPT_SET_CHMOD]."'"); + + // ----- Change the mode of the file + @chmod($p_entry['filename'], $p_options[PCLZIP_OPT_SET_CHMOD]); + } + + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extraction done"); + } + } + + // ----- 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])) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "A post-callback '".$p_options[PCLZIP_CB_POST_EXTRACT]."()') is defined for the extraction"); + + // ----- 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_POST_EXTRACT].'(PCLZIP_CB_POST_EXTRACT, $v_local_header);'); + + // ----- Look for abort result + if ($v_result == 2) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "User callback abort the extraction"); + $v_result = PCLZIP_ERR_USER_ABORTED; + } + } + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privExtractFileUsingTempFile() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privExtractFileUsingTempFile(&$p_entry, &$p_options) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, 'PclZip::privExtractFileUsingTempFile', "filename='".$p_entry['filename']."'"); + $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'); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Start extraction of '".$p_entry['filename']."'"); + + // ----- 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']; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Compressed Size :".$v_size.""); + while ($v_size != 0) + { + $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Read ".$v_read_size." bytes"); + $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) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Error while opening '".$p_entry['filename']."' in write binary mode"); + $p_entry['status'] = "write_error"; + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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'); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, 'File size is '.filesize($v_gzip_temp_name)); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Reading '".$p_entry['size']."' bytes"); + + // ----- Read the file by PCLZIP_READ_BLOCK_SIZE octets blocks + $v_size = $p_entry['size']; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Size :".$v_size.""); + while ($v_size != 0) { + $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Read ".$v_read_size." bytes"); + $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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privExtractFileInOutput() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privExtractFileInOutput(&$p_entry, &$p_options) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, 'PclZip::privExtractFileInOutput', ""); + $v_result=1; + + // ----- Read the file header + if (($v_result = $this->privReadFileHeader($v_header)) != 1) { + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Found file '".$v_header['filename']."', size '".$v_header['size']."'"); + + // ----- 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])) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "A pre-callback '".$p_options[PCLZIP_CB_PRE_EXTRACT]."()') is defined for the extraction"); + + // ----- 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);'); + if ($v_result == 0) { + // ----- Change the file status + $p_entry['status'] = "skipped"; + $v_result = 1; + } + + // ----- Look for abort result + if ($v_result == 2) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "User callback abort the extraction"); + // ----- 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']; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "New filename is '".$p_entry['filename']."'"); + } + + // ----- Trace + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extracting file (with path) '".$p_entry['filename']."', size '$v_header[size]'"); + + // ----- 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']) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extracting an un-compressed file"); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Reading '".$p_entry['size']."' bytes"); + + // ----- 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 { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extracting a compressed file"); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Reading '".$p_entry['size']."' bytes"); + + // ----- 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); + } + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extraction done"); + } + } + + // ----- 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])) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "A post-callback '".$p_options[PCLZIP_CB_POST_EXTRACT]."()') is defined for the extraction"); + + // ----- 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_POST_EXTRACT].'(PCLZIP_CB_POST_EXTRACT, $v_local_header);'); + + // ----- Look for abort result + if ($v_result == 2) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "User callback abort the extraction"); + $v_result = PCLZIP_ERR_USER_ABORTED; + } + } + + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privExtractFileAsString() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privExtractFileAsString(&$p_entry, &$p_string) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, 'PclZip::privExtractFileAsString', "p_entry['filename']='".$p_entry['filename']."'"); + $v_result=1; + + // ----- Read the file header + $v_header = array(); + if (($v_result = $this->privReadFileHeader($v_header)) != 1) + { + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Found file '".$v_header['filename']."', size '".$v_header['size']."'"); + + // ----- Check that the file header is coherent with $p_entry info + if ($this->privCheckFileHeaders($v_header, $p_entry) != 1) { + // TBC + } + + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extracting file in string (with path) '".$p_entry['filename']."', size '$v_header[size]'"); + + // ----- 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) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extracting an un-compressed file"); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Reading '".$p_entry['size']."' bytes"); + + // ----- Reading the file + $p_string = @fread($this->zip_fd, $p_entry['compressed_size']); + } + else { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extracting a compressed file (compression method '".$p_entry['compression']."')"); + + // ----- 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 + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extraction done"); + } + else { + // TBC : error : can not extract a folder in a string + } + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privReadFileHeader() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privReadFileHeader(&$p_header) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privReadFileHeader", ""); + $v_result=1; + + // ----- Read the 4 bytes signature + $v_binary_data = @fread($this->zip_fd, 4); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Binary data is : '".sprintf("%08x", $v_binary_data)."'"); + $v_data = unpack('Vid', $v_binary_data); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Binary signature is : '".sprintf("0x%08x", $v_data['id'])."'"); + + // ----- Check signature + if ($v_data['id'] != 0x04034b50) + { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Invalid File header"); + + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Invalid archive structure'); + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + 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"; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Invalid block size : ".strlen($v_binary_data)); + + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Invalid block size : ".strlen($v_binary_data)); + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + + // ----- Extract the values + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Header : '".$v_binary_data."'"); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Header (Hex) : '".bin2hex($v_binary_data)."'"); + $v_data = unpack('vversion/vflag/vcompression/vmtime/vmdate/Vcrc/Vcompressed_size/Vsize/vfilename_len/vextra_len', $v_binary_data); + + // ----- Get filename + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "File name length : ".$v_data['filename_len']); + $p_header['filename'] = fread($this->zip_fd, $v_data['filename_len']); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Filename : \''.$p_header['filename'].'\''); + + // ----- Get extra_fields + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extra field length : ".$v_data['extra_len']); + if ($v_data['extra_len'] != 0) { + $p_header['extra'] = fread($this->zip_fd, $v_data['extra_len']); + } + else { + $p_header['extra'] = ''; + } + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Extra field : \''.bin2hex($p_header['extra']).'\''); + + // ----- Extract properties + $p_header['version_extracted'] = $v_data['version']; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Version need to extract : ('.$p_header['version_extracted'].') \''.($p_header['version_extracted']/10).'.'.($p_header['version_extracted']%10).'\''); + $p_header['compression'] = $v_data['compression']; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Compression method : \''.$p_header['compression'].'\''); + $p_header['size'] = $v_data['size']; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Size : \''.$p_header['size'].'\''); + $p_header['compressed_size'] = $v_data['compressed_size']; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Compressed Size : \''.$p_header['compressed_size'].'\''); + $p_header['crc'] = $v_data['crc']; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'CRC : \''.sprintf("0x%X", $p_header['crc']).'\''); + $p_header['flag'] = $v_data['flag']; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Flag : \''.$p_header['flag'].'\''); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Flag bit 11 (from right) : \''.($p_header['flag']&0x0400).'\''); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Flag bit 11 (from left) : \''.($p_header['flag']&0x0020).'\''); + $p_header['filename_len'] = $v_data['filename_len']; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Filename_len : \''.$p_header['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); + + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Date : \''.date("d/m/y H:i:s", $p_header['mtime']).'\''); + } + else + { + $p_header['mtime'] = time(); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Date is actual : \''.date("d/m/y H:i:s", $p_header['mtime']).'\''); + } + + // TBC + //for(reset($v_data); $key = key($v_data); next($v_data)) { + // //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Attribut[$key] = ".$v_data[$key]); + //} + + // ----- Set the stored filename + $p_header['stored_filename'] = $p_header['filename']; + + // ----- Set the status field + $p_header['status'] = "ok"; + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privReadCentralFileHeader() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privReadCentralFileHeader(&$p_header) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privReadCentralFileHeader", ""); + $v_result=1; + + // ----- Read the 4 bytes signature + $v_binary_data = @fread($this->zip_fd, 4); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Binary data is : '".sprintf("%08x", $v_binary_data)."'"); + $v_data = unpack('Vid', $v_binary_data); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Binary signature is : '".sprintf("0x%08x", $v_data['id'])."'"); + + // ----- Check signature + if ($v_data['id'] != 0x02014b50) + { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Invalid Central Dir File signature"); + + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Invalid archive structure'); + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + 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"; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Invalid block size : ".strlen($v_binary_data)); + + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Invalid block size : ".strlen($v_binary_data)); + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + + // ----- Extract the values + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Header : '".$v_binary_data."'"); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Header (Hex) : '".bin2hex($v_binary_data)."'"); + $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 + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "File name length : ".$p_header['filename_len']); + if ($p_header['filename_len'] != 0) + $p_header['filename'] = fread($this->zip_fd, $p_header['filename_len']); + else + $p_header['filename'] = ''; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Filename : \''.$p_header['filename'].'\''); + + // ----- Get extra + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Extra length : ".$p_header['extra_len']); + if ($p_header['extra_len'] != 0) + $p_header['extra'] = fread($this->zip_fd, $p_header['extra_len']); + else + $p_header['extra'] = ''; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Extra : \''.$p_header['extra'].'\''); + + // ----- Get comment + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Comment length : ".$p_header['comment_len']); + if ($p_header['comment_len'] != 0) + $p_header['comment'] = fread($this->zip_fd, $p_header['comment_len']); + else + $p_header['comment'] = ''; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Comment : \''.$p_header['comment'].'\''); + + // ----- Extract properties + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Version : \''.($p_header['version']/10).'.'.($p_header['version']%10).'\''); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Version need to extract : \''.($p_header['version_extracted']/10).'.'.($p_header['version_extracted']%10).'\''); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Size : \''.$p_header['size'].'\''); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Compressed Size : \''.$p_header['compressed_size'].'\''); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'CRC : \''.sprintf("0x%X", $p_header['crc']).'\''); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Flag : \''.$p_header['flag'].'\''); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Offset : \''.$p_header['offset'].'\''); + + // ----- 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); + + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Date : \''.date("d/m/y H:i:s", $p_header['mtime']).'\''); + } + else + { + $p_header['mtime'] = time(); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Date is actual : \''.date("d/m/y H:i:s", $p_header['mtime']).'\''); + } + + // ----- 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 + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Internal (Hex) : '".sprintf("Ox%04X", $p_header['internal'])."'"); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "External (Hex) : '".sprintf("Ox%04X", $p_header['external'])."' (".(($p_header['external']&0x00000010)==0x00000010?'is a folder':'is a file').')'); + if (substr($p_header['filename'], -1) == '/') { + //$p_header['external'] = 0x41FF0010; + $p_header['external'] = 0x00000010; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Force folder external : \''.sprintf("Ox%04X", $p_header['external']).'\''); + } + + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Header of filename : \''.$p_header['filename'].'\''); + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privCheckFileHeaders() + // Description : + // Parameters : + // Return Values : + // 1 on success, + // 0 on error; + // -------------------------------------------------------------------------------- + function privCheckFileHeaders(&$p_local_header, &$p_central_header) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privCheckFileHeaders", ""); + $v_result=1; + + // ----- Check the static values + // TBC + if ($p_local_header['filename'] != $p_central_header['filename']) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Bad check "filename" : TBC To Be Completed'); + } + if ($p_local_header['version_extracted'] != $p_central_header['version_extracted']) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Bad check "version_extracted" : TBC To Be Completed'); + } + if ($p_local_header['flag'] != $p_central_header['flag']) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Bad check "flag" : TBC To Be Completed'); + } + if ($p_local_header['compression'] != $p_central_header['compression']) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Bad check "compression" : TBC To Be Completed'); + } + if ($p_local_header['mtime'] != $p_central_header['mtime']) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Bad check "mtime" : TBC To Be Completed'); + } + if ($p_local_header['filename_len'] != $p_central_header['filename_len']) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Bad check "filename_len" : TBC To Be Completed'); + } + + // ----- Look for flag bit 3 + if (($p_local_header['flag'] & 8) == 8) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Purpose bit flag bit 3 set !'); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'File size, compression size and crc found in central header'); + $p_local_header['size'] = $p_central_header['size']; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Size : \''.$p_local_header['size'].'\''); + $p_local_header['compressed_size'] = $p_central_header['compressed_size']; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Compressed Size : \''.$p_local_header['compressed_size'].'\''); + $p_local_header['crc'] = $p_central_header['crc']; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'CRC : \''.sprintf("0x%X", $p_local_header['crc']).'\''); + } + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privReadEndCentralDir() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privReadEndCentralDir(&$p_central_dir) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privReadEndCentralDir", ""); + $v_result=1; + + // ----- Go to the end of the zip file + $v_size = filesize($this->zipname); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Size of the file :$v_size"); + @fseek($this->zip_fd, $v_size); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Position at end of zip file : \''.ftell($this->zip_fd).'\''); + 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + 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) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Look for central dir with no comment'); + @fseek($this->zip_fd, $v_size-22); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Position after min central position : \''.ftell($this->zip_fd).'\''); + 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + + // ----- Read for bytes + $v_binary_data = @fread($this->zip_fd, 4); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Binary data is : '".sprintf("%08x", $v_binary_data)."'"); + $v_data = @unpack('Vid', $v_binary_data); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Binary signature is : '".sprintf("0x%08x", $v_data['id'])."'"); + + // ----- Check signature + if ($v_data['id'] == 0x06054b50) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Found central dir at the default position."); + $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) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Start extended search of end central dir'); + $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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Position after max central position : \''.ftell($this->zip_fd).'\''); + + // ----- 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) + { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Found End Central Dir signature at position : \''.ftell($this->zip_fd).'\''); + $v_pos++; + break; + } + + $v_pos++; + } + + // ----- Look if not found end of central dir + if ($v_pos == $v_size) + { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Unable to find End of Central Dir Record signature"); + + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Unable to find End of Central Dir Record signature"); + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + 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) + { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Invalid End of Central Dir Record size : ".strlen($v_binary_data)); + + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Invalid End of Central Dir Record size : ".strlen($v_binary_data)); + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + + // ----- Extract the values + ////--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Central Dir Record : '".$v_binary_data."'"); + ////--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Central Dir Record (Hex) : '".bin2hex($v_binary_data)."'"); + $v_data = unpack('vdisk/vdisk_start/vdisk_entries/ventries/Vsize/Voffset/vcomment_size', $v_binary_data); + + // ----- Check the global size + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Comment length : ".$v_data['comment_size']); + if (($v_pos + $v_data['comment_size'] + 18) != $v_size) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "The central dir is not at the end of the archive. Some trailing bytes exists after the archive."); + + // ----- 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + } + + // ----- Get comment + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Comment size : \''.$v_data['comment_size'].'\''); + if ($v_data['comment_size'] != 0) { + $p_central_dir['comment'] = fread($this->zip_fd, $v_data['comment_size']); + } + else + $p_central_dir['comment'] = ''; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Comment : \''.$p_central_dir['comment'].'\''); + + $p_central_dir['entries'] = $v_data['entries']; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Nb of entries : \''.$p_central_dir['entries'].'\''); + $p_central_dir['disk_entries'] = $v_data['disk_entries']; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Nb of entries for this disk : \''.$p_central_dir['disk_entries'].'\''); + $p_central_dir['offset'] = $v_data['offset']; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Offset of Central Dir : \''.$p_central_dir['offset'].'\''); + $p_central_dir['size'] = $v_data['size']; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Size of Central Dir : \''.$p_central_dir['size'].'\''); + $p_central_dir['disk'] = $v_data['disk']; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Disk number : \''.$p_central_dir['disk'].'\''); + $p_central_dir['disk_start'] = $v_data['disk_start']; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Start disk number : \''.$p_central_dir['disk_start'].'\''); + + // TBC + //for(reset($p_central_dir); $key = key($p_central_dir); next($p_central_dir)) { + // //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "central_dir[$key] = ".$p_central_dir[$key]); + //} + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privDeleteByRule() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privDeleteByRule(&$p_result_list, &$p_options) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privDeleteByRule", ""); + $v_result=1; + $v_list_detail = array(); + + // ----- Open the zip file + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary read mode"); + if (($v_result=$this->privOpenFd('rb')) != 1) + { + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + // ----- Read the central directory informations + $v_central_dir = array(); + if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1) + { + $this->privCloseFd(); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + // ----- Go to beginning of File + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position in file : ".ftell($this->zip_fd)."'"); + @rewind($this->zip_fd); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position in file : ".ftell($this->zip_fd)."'"); + + // ----- Scan all the files + // ----- Start at beginning of Central Dir + $v_pos_entry = $v_central_dir['offset']; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position before rewind : ".ftell($this->zip_fd)."'"); + @rewind($this->zip_fd); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position after rewind : ".ftell($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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position after fseek : ".ftell($this->zip_fd)."'"); + + // ----- Read each entry + $v_header_list = array(); + $j_start = 0; + for ($i=0, $v_nb_extracted=0; $i<$v_central_dir['entries']; $i++) + { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Read next file header entry (index '$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(); + + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Filename (index '$i') : '".$v_header_list[$v_nb_extracted]['stored_filename']."'"); + + // ----- 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)) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extract with rule 'ByName'"); + + // ----- 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])) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "The directory is in the file path"); + $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])) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "The entry is the searched directory"); + $v_found = true; + } + } + // ----- Look for a filename + elseif ($v_header_list[$v_nb_extracted]['stored_filename'] == $p_options[PCLZIP_OPT_BY_NAME][$j]) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "The file is the right one."); + $v_found = true; + } + } + } + + // ----- Look for extract by ereg rule + else if ( (isset($p_options[PCLZIP_OPT_BY_EREG])) + && ($p_options[PCLZIP_OPT_BY_EREG] != "")) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extract by ereg '".$p_options[PCLZIP_OPT_BY_EREG]."'"); + + if (ereg($p_options[PCLZIP_OPT_BY_EREG], $v_header_list[$v_nb_extracted]['stored_filename'])) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Filename match the regular expression"); + $v_found = true; + } + } + + // ----- Look for extract by preg rule + else if ( (isset($p_options[PCLZIP_OPT_BY_PREG])) + && ($p_options[PCLZIP_OPT_BY_PREG] != "")) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extract with rule 'ByEreg'"); + + if (preg_match($p_options[PCLZIP_OPT_BY_PREG], $v_header_list[$v_nb_extracted]['stored_filename'])) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Filename match the regular expression"); + $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)) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extract with rule 'ByIndex'"); + + // ----- 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'])) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Found as part of an index range"); + $v_found = true; + } + if ($i>=$p_options[PCLZIP_OPT_BY_INDEX][$j]['end']) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Do not look this index range for next loop"); + $j_start = $j+1; + } + + if ($p_options[PCLZIP_OPT_BY_INDEX][$j]['start']>$i) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Index range is greater than index, stop loop"); + break; + } + } + } + else { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "No argument mean remove all file"); + $v_found = true; + } + + // ----- Look for deletion + if ($v_found) + { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "File '".$v_header_list[$v_nb_extracted]['stored_filename']."', index '$i' need to be deleted"); + unset($v_header_list[$v_nb_extracted]); + } + else + { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "File '".$v_header_list[$v_nb_extracted]['stored_filename']."', index '$i' will not be deleted"); + $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 + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary write mode"); + if (($v_result = $v_temp_zip->privOpenFd('wb')) != 1) { + $this->privCloseFd(); + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + // ----- Look which file need to be kept + for ($i=0; $izip_fd)."'"); + @rewind($this->zip_fd); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position after rewind : ".ftell($this->zip_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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position after fseek : ".ftell($this->zip_fd)."'"); + + // ----- 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Offset for this file is '".$v_header_list[$i]['offset']."'"); + + // ----- 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + } + + // ----- Store the offset of the central dir + $v_offset = @ftell($v_temp_zip->zip_fd); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "New offset of central dir : $v_offset"); + + // ----- Re-Create the Central Dir files header + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Creates the new central directory"); + for ($i=0; $iprivWriteCentralFileHeader($v_header_list[$i])) != 1) { + $v_temp_zip->privCloseFd(); + $this->privCloseFd(); + @unlink($v_zip_temp_name); + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + // ----- Transform the header to a 'usable' info + $v_temp_zip->privConvertHeader2FileInfo($v_header_list[$i], $p_result_list[$i]); + } + + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Creates the central directory footer"); + + // ----- 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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) { + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + if (($v_result = $this->privWriteCentralHeader(0, 0, 0, '')) != 1) { + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + $this->privCloseFd(); + } + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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; + + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privDirCheck", "entry='$p_dir', is_dir='".($p_is_dir?"true":"false")."'"); + + // ----- Remove the final '/' + if (($p_is_dir) && (substr($p_dir, -1)=='/')) + { + $p_dir = substr($p_dir, 0, strlen($p_dir)-1); + } + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Looking for entry '$p_dir'"); + + // ----- Check the directory availability + if ((is_dir($p_dir)) || ($p_dir == "")) + { + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, "'$p_dir' is a directory"); + return 1; + } + + // ----- Extract parent directory + $p_parent_dir = dirname($p_dir); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Parent directory is '$p_parent_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) + { + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + } + } + + // ----- Create the directory + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Create directory '$p_dir'"); + if (!@mkdir($p_dir, 0777)) + { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_DIR_CREATE_FAIL, "Unable to create directory '$p_dir'"); + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result, "Directory '$p_dir' created"); + 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) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privMerge", "archive='".$p_archive_to_add->zipname."'"); + $v_result=1; + + // ----- Look if the archive_to_add exists + if (!is_file($p_archive_to_add->zipname)) + { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Archive to add does not exist. End of merge."); + + // ----- Nothing to merge, so merge is a success + $v_result = 1; + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + // ----- Look if the archive exists + if (!is_file($this->zipname)) + { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Archive does not exist, duplicate the archive_to_add."); + + // ----- Do a duplicate + $v_result = $this->privDuplicate($p_archive_to_add->zipname); + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + // ----- Open the zip file + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary read mode"); + if (($v_result=$this->privOpenFd('rb')) != 1) + { + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + // ----- Read the central directory informations + $v_central_dir = array(); + if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1) + { + $this->privCloseFd(); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + // ----- Go to beginning of File + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position in zip : ".ftell($this->zip_fd)."'"); + @rewind($this->zip_fd); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position in zip : ".ftell($this->zip_fd)."'"); + + // ----- Open the archive_to_add file + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open archive_to_add in binary read mode"); + if (($v_result=$p_archive_to_add->privOpenFd('rb')) != 1) + { + $this->privCloseFd(); + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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(); + + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + // ----- Go to beginning of File + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position in archive_to_add : ".ftell($p_archive_to_add->zip_fd)."'"); + @rewind($p_archive_to_add->zip_fd); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position in archive_to_add : ".ftell($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 + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary read 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + 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); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read $v_read_size bytes"); + $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); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read $v_read_size bytes"); + $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); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "New offset of central dir : $v_offset"); + + // ----- 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); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read $v_read_size bytes"); + $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); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read $v_read_size bytes"); + $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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privDuplicate() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privDuplicate($p_archive_filename) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privDuplicate", "archive_filename='$p_archive_filename'"); + $v_result=1; + + // ----- Look if the $p_archive_filename exists + if (!is_file($p_archive_filename)) + { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Archive to duplicate does not exist. End of duplicate."); + + // ----- Nothing to duplicate, so duplicate is a success. + $v_result = 1; + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + // ----- Open the zip file + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary read mode"); + if (($v_result=$this->privOpenFd('wb')) != 1) + { + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + // ----- Open the temporary file in write mode + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary read 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + 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); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Read $v_read_size bytes"); + $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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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() + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, 'PclZip::privDisableMagicQuotes', ""); + $v_result=1; + + // ----- Look if function exists + if ( (!function_exists("get_magic_quotes_runtime")) + || (!function_exists("set_magic_quotes_runtime"))) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Functions *et_magic_quotes_runtime are not supported"); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + // ----- Look if already done + if ($this->magic_quotes_status != -1) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "magic_quote already disabled"); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + // ----- Get and memorize the magic_quote value + $this->magic_quotes_status = @get_magic_quotes_runtime(); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Current magic_quotes_runtime status is '".($this->magic_quotes_status==0?'disable':'enable')."'"); + + // ----- Disable magic_quotes + if ($this->magic_quotes_status == 1) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Disable magic_quotes"); + @set_magic_quotes_runtime(0); + } + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privSwapBackMagicQuotes() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privSwapBackMagicQuotes() + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, 'PclZip::privSwapBackMagicQuotes', ""); + $v_result=1; + + // ----- Look if function exists + if ( (!function_exists("get_magic_quotes_runtime")) + || (!function_exists("set_magic_quotes_runtime"))) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Functions *et_magic_quotes_runtime are not supported"); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + // ----- Look if something to do + if ($this->magic_quotes_status != -1) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "magic_quote not modified"); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + // ----- Swap back magic_quotes + if ($this->magic_quotes_status == 1) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Enable back magic_quotes"); + @set_magic_quotes_runtime($this->magic_quotes_status); + } + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + // -------------------------------------------------------------------------------- + + } + // End of class + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : PclZipUtilPathReduction() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function PclZipUtilPathReduction($p_dir) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZipUtilPathReduction", "dir='$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; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Invalid path is unchanged"); + $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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZipUtilPathInclusion", "dir='$p_dir', path='$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); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Replacing ./ by full path in p_dir '".$p_dir."'"); + } + if ( ($p_path == '.') + || ((strlen($p_path) >=2) && (substr($p_path, 0, 2) == './'))) { + $p_path = PclZipUtilTranslateWinPath(getcwd(), FALSE).'/'.substr($p_path, 1); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Replacing ./ by full path in p_path '".$p_path."'"); + } + + // ----- 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)) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Working on dir($i)='".$v_list_dir[$i]."' and path($j)='".$v_list_path[$j]."'"); + + // ----- 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] != '')) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Items ($i,$j) are different"); + $v_result = 0; + } + + // ----- Next items + $i++; + $j++; + } + + // ----- Look if everything seems to be the same + if ($v_result) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Look for tie break"); + // ----- 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++; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Looking on dir($i)='".($i < $v_list_dir_size?$v_list_dir[$i]:'')."' and path($j)='".($j < $v_list_path_size?$v_list_path[$j]:'')."'"); + + 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZipUtilCopyBlock", "size=$p_size, mode=$p_mode"); + $v_result = 1; + + if ($p_mode==0) + { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Src offset before read :".(@ftell($p_src))); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Dest offset before write :".(@ftell($p_dest))); + while ($p_size != 0) + { + $v_read_size = ($p_size < PCLZIP_READ_BLOCK_SIZE ? $p_size : PCLZIP_READ_BLOCK_SIZE); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read $v_read_size bytes"); + $v_buffer = @fread($p_src, $v_read_size); + @fwrite($p_dest, $v_buffer, $v_read_size); + $p_size -= $v_read_size; + } + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Src offset after read :".(@ftell($p_src))); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Dest offset after write :".(@ftell($p_dest))); + } + else if ($p_mode==1) + { + while ($p_size != 0) + { + $v_read_size = ($p_size < PCLZIP_READ_BLOCK_SIZE ? $p_size : PCLZIP_READ_BLOCK_SIZE); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read $v_read_size bytes"); + $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); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read $v_read_size bytes"); + $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); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read $v_read_size bytes"); + $v_buffer = @gzread($p_src, $v_read_size); + @gzwrite($p_dest, $v_buffer, $v_read_size); + $p_size -= $v_read_size; + } + } + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZipUtilRename", "source=$p_src, destination=$p_dest"); + $v_result = 1; + + // ----- Try to rename the files + if (!@rename($p_src, $p_dest)) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Fail to rename file, try copy+unlink"); + + // ----- Try to copy & unlink the src + if (!@copy($p_src, $p_dest)) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Fail to copy file"); + $v_result = 0; + } + else if (!@unlink($p_src)) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Fail to unlink old filename"); + $v_result = 0; + } + } + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZipUtilOptionText", "option='".$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)) { + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_key); + return $v_key; + } + } + + $v_result = 'Unknown'; + + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,283 @@ +method = 'direct'; + $this->errors = new WP_Error(); + } + function connect() { + return true; + } + function setDefaultPermissions($perm) { + $this->permission = $perm; + } + function get_contents($file) { + return @file_get_contents($file); + } + function get_contents_array($file) { + return @file($file); + } + 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; + } + function cwd() { + return @getcwd(); + } + function chdir($dir) { + return @chdir($dir); + } + 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; + } + function chmod($file, $mode = false, $recursive = false) { + if ( ! $this->exists($file) ) + return false; + + if ( ! $mode ) { + if ( $this->permission ) + $mode = $this->permission; + elseif ( $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; + } + 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; + } + function owner($file) { + $owneruid = @fileowner($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($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 ( ! @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, $incdot = false, $recursive = false) { + if ( $this->is_file($path) ) { + $limitFile = basename($path); + $path = dirname($path); + } else { + $limitFile = false; + } + if ( ! $this->is_dir($path) ) + return false; + + $ret = array(); + $dir = @dir($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 ( '.' == $struc['name'][0] && !$incdot) + continue; + if ( $limitFile && $struc['name'] != $limitFile) + 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'], $incdot, $recursive); + else + $struc['files'] = array(); + } + + $ret[ $struc['name'] ] = $struc; + } + $dir->close(); + unset($dir); + return $ret; + } +} +?> diff -r 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,378 @@ +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: + 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'], $this->timeout); + else + $this->link = @ftp_connect($this->options['hostname'], $this->options['port'], $this->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 ); + + return true; + } + + function setDefaultPermissions($perm) { + $this->permission = $perm; + } + + 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($dir); + } + function chgrp($file, $group, $recursive = false ) { + return false; + } + function chmod($file, $mode = false, $recursive = false) { + if( ! $mode ) + $mode = $this->permission; + if( ! $mode ) + return false; + if ( ! $this->exists($file) && ! $this->is_dir($file) ) + 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_rawlist($this->link, $file, false); + 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 ) + $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 = '.', $incdot = false, $recursive = false) { + if( $this->is_file($path) ) { + $limitFile = basename($path); + $path = dirname($path) . '/'; + } else { + $limitFile = 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; + + $dirlist[ $entry['name'] ] = $entry; + } + + if ( ! $dirlist ) + return false; + if ( empty($dirlist) ) + return array(); + + $ret = array(); + foreach ( $dirlist as $struc ) { + + if ( 'd' == $struc['type'] ) { + $struc['files'] = array(); + + if ( $incdot ){ + //We're including the doted starts + if( '.' != $struc['name'] && '..' != $struc['name'] ){ //Ok, It isnt a special folder + if ($recursive) + $struc['files'] = $this->dirlist($path . '/' . $struc['name'], $incdot, $recursive); + } + } else { //No dots + if ($recursive) + $struc['files'] = $this->dirlist($path . '/' . $struc['name'], $incdot, $recursive); + } + } + //File + $ret[$struc['name']] = $struc; + } + return $ret; + } + + function __destruct(){ + if( $this->link ) + ftp_close($this->link); + } +} + +?> diff -r 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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->Verbose = true; + + 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); + return true; + } + + function setDefaultPermissions($perm) { + $this->permission = $perm; + } + + 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 ) + $mode = $this->permission; + if( ! $mode ) + return false; + //if( ! $this->exists($file) ) + // 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 ) + $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 = '.', $incdot = false, $recursive = false ) { + if( $this->is_file($path) ) { + $limitFile = basename($path); + $path = dirname($path) . '/'; + } else { + $limitFile = false; + } + + $list = $this->ftp->dirlist($path); + if( ! $list ) + return false; + if( empty($list) ) + return array(); + + $ret = array(); + foreach ( $list as $struc ) { + + if ( 'd' == $struc['type'] ) { + $struc['files'] = array(); + + if ( $incdot ){ + //We're including the doted starts + if( '.' != $struc['name'] && '..' != $struc['name'] ){ //Ok, It isnt a special folder + if ($recursive) + $struc['files'] = $this->dirlist($path . '/' . $struc['name'], $incdot, $recursive); + } + } else { //No dots + if ($recursive) + $struc['files'] = $this->dirlist($path . '/' . $struc['name'], $incdot, $recursive); + } + } + //File + $ret[$struc['name']] = $struc; + } + return $ret; + } + + function __destruct() { + $this->ftp->quit(); + } +} + +?> diff -r 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,383 @@ +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, $this->timeout ); + $data = stream_get_contents( $stream ); + fclose( $stream ); + + if ( $returnbool ) + return ( $data === false ) ? false : '' != trim($data); + else + return $data; + } + return false; + } + + function setDefaultPermissions($perm) { + $this->debug("setDefaultPermissions();"); + if ( $perm ) + $this->permission = $perm; + } + + 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 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( ! $mode ) + $mode = $this->permission; + if( ! $mode ) + return false; + if ( ! $this->exists($file) ) + 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 = null, $chown = false, $chgrp = false) { + $path = untrailingslashit($path); + $chmod = !empty($chmod) ? $chmod : $this->permission; + 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, $incdot = false, $recursive = false) { + if ( $this->is_file($path) ) { + $limitFile = basename($path); + $path = dirname($path); + } else { + $limitFile = 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 ( '.' == $struc['name'][0] && !$incdot) + continue; + if ( $limitFile && $struc['name'] != $limitFile) + 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'], $incdot, $recursive); + else + $struc['files'] = array(); + } + + $ret[ $struc['name'] ] = $struc; + } + $dir->close(); + unset($dir); + return $ret; + } +} diff -r 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,1059 @@ +__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 ) { + if ( ABSPATH == $dir && ! $wp_filesystem->abspath() ) + return new WP_Error('fs_no_root_dir', $this->strings['fs_no_root_dir']); + + elseif ( WP_CONTENT_DIR == $dir && ! $wp_filesystem->wp_content_dir() ) + return new WP_Error('fs_no_content_dir', $this->strings['fs_no_content_dir']); + + elseif ( WP_PLUGIN_DIR == $dir && ! $wp_filesystem->wp_plugins_dir() ) + return new WP_Error('fs_no_plugins_dir', $this->strings['fs_no_plugins_dir']); + + elseif ( WP_CONTENT_DIR . '/themes' == $dir && ! $wp_filesystem->find_folder(WP_CONTENT_DIR . '/themes') ) + return new WP_Error('fs_no_themes_dir', $this->strings['fs_no_themes_dir']); + + elseif ( ! $wp_filesystem->find_folder($dir) ) + return new WP_Error('fs_no_folder', sprintf($strings['fs_no_folder'], $dir)); + } + 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 we're not clearing the destination folder, and something exists there allready, Bail. + if ( ! $clear_destination && $wp_filesystem->exists($remote_destination) ) { + $wp_filesystem->delete($remote_source, true); //Clear out the source files. + return new WP_Error('folder_exists', $this->strings['folder_exists'], $remote_destination ); + } else if ( $clear_destination ) { + //We're going to clear the destination if theres something there + $this->skin->feedback('remove_old'); + + $removed = true; + if ( $wp_filesystem->exists($remote_destination) ) + $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']); + } + + //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, + '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; + } + + $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(); + $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; + + 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'); + } + + //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() { + $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)); + } +} + +/** + * 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 000000000000 -r 03b0d1493584 web/wp-admin/includes/comment.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/includes/comment.php Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,493 @@ + get_option('home'), + 'link' => apply_filters( 'dashboard_incoming_links_link', 'http://blogsearch.google.com/blogsearch?hl=en&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?hl=en&scoring=d&ie=utf-8&num=20&output=rss&partner=wordpress&q=link:' . trailingslashit( get_option('home') ) ), + 'items' => isset($widget_options['dashboard_incoming_links']['items']) ? $widget_options['dashboard_incoming_links']['items'] : 10, + '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 = "

    $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 ORDER BY 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 = '#'; + + $delete_url = esc_url( wp_nonce_url( "comment.php?action=deletecomment&p=$comment->comment_post_ID&c=$comment->comment_ID", "delete-comment_$comment->comment_ID" ) ); + $approve_url = esc_url( wp_nonce_url( "comment.php?action=approvecomment&p=$comment->comment_post_ID&c=$comment->comment_ID", "approve-comment_$comment->comment_ID" ) ); + $unapprove_url = esc_url( wp_nonce_url( "comment.php?action=unapprovecomment&p=$comment->comment_post_ID&c=$comment->comment_ID", "unapprove-comment_$comment->comment_ID" ) ); + $spam_url = esc_url( wp_nonce_url( "comment.php?action=deletecomment&dt=spam&p=$comment->comment_post_ID&c=$comment->comment_ID", "delete-comment_$comment->comment_ID" ) ); + + $actions = array(); + + $actions_string = ''; + if ( current_user_can('edit_post', $comment->comment_post_ID) ) { + $actions['approve'] = "" . __( 'Approve' ) . ''; + $actions['unapprove'] = "" . __( 'Unapprove' ) . ''; + $actions['edit'] = "". __('Edit') . ''; + //$actions['quickedit'] = '' . __('Quick Edit') . ''; + $actions['reply'] = '' . __('Reply') . ''; + $actions['spam'] = "" . /* translators: mark as spam link */ _x( 'Spam', 'verb' ) . ''; + $actions['delete'] = "" . __('Delete') . ''; + + $actions = apply_filters( 'comment_row_actions', $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 ); ?>

    +

    + + +

    +

    + + +
    +
    +' . __( '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"; + 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"; + +} + +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() ) { + return false; + } else { + echo '
    '; + wp_widget_rss_output( $rss, $widgets['dashboard_secondary'] ); + echo '
    '; + } +} + +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"; + } +} + +/** + * 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(strip_tags($rss->get_title())); + else + $widget_options[$widget_id]['title'] = htmlentities(__('Unknown Feed')); + } + 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 000000000000 -r 03b0d1493584 web/wp-admin/includes/export.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/includes/export.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,334 @@ +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'); + +/** + * {@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 + */ +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; ?> + + + 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); ?> + +<?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 000000000000 -r 03b0d1493584 web/wp-admin/includes/file.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/includes/file.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,807 @@ + __( '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; +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param string $folder Optional. Full path to folder + * @param int $levels Optional. Levels of folders to follow, Default: 100 (PHP Loop limit). + * @return bool|array + */ +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; +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @return unknown + */ +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/'; +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $filename + * @param unknown_type $dir + * @return unknown + */ +function wp_tempnam($filename = '', $dir = ''){ + if ( empty($dir) ) + $dir = get_temp_dir(); + $filename = basename($filename); + if ( empty($filename) ) + $filename = time(); + + $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 = '' ) { + $file = stripslashes( $file ); + + $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 ); + } + } + + // 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_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.' )); + + // 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 file using the Snoopy HTTP Class. + * + * @since unknown + * @todo Transition over to using the new HTTP Request API (jacob). + * + * @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' => 60)); + + 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; +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $file + * @param unknown_type $to + * @return unknown + */ +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 + @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; +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $from + * @param unknown_type $to + * @return unknown + */ +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; + } + } +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $args + * @return unknown + */ +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); + + 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; +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $args + * @param string $context Full path to the directory that is tested for being writable. + * @return unknown + */ +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 . '.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); +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $form_post + * @param unknown_type $type + * @param unknown_type $error + * @return unknown + */ +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']) ? $_POST['hostname'] : $credentials['hostname']); + $credentials['username'] = defined('FTP_USER') ? FTP_USER : (!empty($_POST['username']) ? $_POST['username'] : $credentials['username']); + $credentials['password'] = defined('FTP_PASS') ? FTP_PASS : (!empty($_POST['password']) ? $_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']) ? $_POST['public_key'] : ''); + $credentials['private_key'] = defined('FTP_PRIKEY') ? FTP_PRIKEY : (!empty($_POST['private_key']) ? $_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); + else + unset($credentials['port']); + + if ( defined('FTP_SSH') || (defined('FS_METHOD') && 'ssh' == FS_METHOD) ) + $credentials['connection_type'] = 'ssh'; + else if ( defined('FTP_SSL') && 'ftpext' == $type ) //Only the FTP Extension understands SSL + $credentials['connection_type'] = 'ftps'; + else if ( !empty($_POST['connection_type']) ) + $credentials['connection_type'] = $_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 . '

    '; + } +?> + +
    +
    + +

    +

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

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

    + +

    +
    +
    + diff -r 000000000000 -r 03b0d1493584 web/wp-admin/includes/image.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/includes/image.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,330 @@ + 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 000000000000 -r 03b0d1493584 web/wp-admin/includes/import.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/includes/import.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,87 @@ + 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 000000000000 -r 03b0d1493584 web/wp-admin/includes/manifest.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/includes/manifest.php Wed Dec 23 17:55:33 2009 +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; + } + + if ( intval($_REQUEST['post_id']) ) + $attachments = intval($wpdb->get_var($wpdb->prepare("SELECT count(*) FROM $wpdb->posts WHERE post_type = 'attachment' AND post_parent = %d", $_REQUEST['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, $alt, $title, $align, $url='', $rel = false, $size='medium') { + + $htmlalt = ( empty($alt) ) ? $title : $alt; + + $html = get_image_tag($id, $htmlalt, $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, $alt, $title, $align, $url, $size ); + + 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, $alt, $title, $align, $url, $size ) { + + if ( empty($alt) || apply_filters( 'disable_captions', '' ) ) + return $html; + + $id = ( 0 < (int) $id ) ? 'attachment_' . $id : ''; + + preg_match( '/width="([0-9]+)/', $html, $matches ); + if ( ! isset($matches[1]) ) + return $html; + + $width = $matches[1]; + + $html = preg_replace( '/(class=["\'][^\'"]*)align(none|left|right|center)\s?/', '$1', $html ); + if ( empty($align) ) + $align = 'none'; + + $alt = ! empty($alt) ? addslashes($alt) : ''; + + $shcode = '[caption id="' . $id . '" align="align' . $align + . '" width="' . $width . '" caption="' . $alt . '"]' . $html . '[/caption]'; + + return apply_filters( 'image_add_caption_shortcode', $shcode, $html ); +} +add_filter( 'image_send_to_editor', 'image_add_caption', 20, 7 ); + +/** + * {@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 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 $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($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']) ) { + $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, $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) ) { + $file_array['name'] = basename($file); + $tmp = download_url($file); + $file_array['tmp_name'] = $tmp; + $desc = @$desc; + + if ( is_wp_error($tmp) ) { + @unlink($file_array['tmp_name']); + $file_array['tmp_name'] = ''; + } + + $id = media_handle_sideload($file_array, $post_id, $desc); + $src = $id; + + if ( is_wp_error($id) ) { + @unlink($file_array['tmp_name']); + return $id; + } + } + + 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 = 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 = 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, $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 = '' ) { + + $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, $checked = '' ) { + + // 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')); + + foreach ( $size_names as $size => $name ) { + $downsize = image_downsize($post->ID, $size); + + // 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 ( $checked && !$enabled ) + $checked = ''; + // if $checked was not specified, default to the first available size that's bigger than a thumbnail + if ( !$checked && $enabled && 'thumbnail' != $size ) + $checked = $size; + + $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); + + $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' ) { + $form_fields['post_title']['required'] = true; + $file = wp_get_attachment_url($post->ID); + + $form_fields['image_url']['value'] = $file; + + $form_fields['post_excerpt']['label'] = __('Caption'); + $form_fields['post_excerpt']['helps'][] = __('Also used as alternate text for the image'); + + $form_fields['post_content']['label'] = __('Description'); + + $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')); + } + 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']; + + if ( isset($attachment['align']) ) + $align = $attachment['align']; + else + $align = 'none'; + + if ( !empty($attachment['image-size']) ) + $size = $attachment['image-size']; + else + $size = 'medium'; + + $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); + } + + 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, + ), + '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' => isset($edit_post->post_url) ? $edit_post->post_url : '', + '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 ( $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; + + $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 ); + + global $post_mime_types; + if ( ( $attachment_id = intval($attachment_id) ) && $thumb_url = get_attachment_icon_src( $attachment_id ) ) + $thumb_url = $thumb_url[0]; + else + return false; + + $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)); + } + + $type = ''; + if ( isset($post_mime_types) ) { + $keys = array_keys(wp_match_mime_types(array_keys($post_mime_types), $post->post_mime_type)); + $type = array_shift($keys); + $type = ""; + } + + $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; + } + } + + $item = " + $type + $toggle_links + $order + $display_title + + + + + + + + + + + \n"; + + $defaults = array( + 'input' => 'text', + 'required' => false, + 'value' => '', + 'extra_rows' => array(), + ); + + $delete_href = wp_nonce_url("post.php?action=delete-post&post=$attachment_id", 'delete-post_' . $attachment_id); + if ( $send ) + $send = ""; + if ( $delete ) + $delete = "" . __('Delete') . ""; + if ( ( $send || $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
    $filename
    $post->post_mime_type
    " . mysql2date($post->post_date, get_option('time_format')) . "
    " . apply_filters('media_meta', '', $post) . "
    $send $delete +
    " . sprintf(__("You are about to delete %s."), $filename) . " " . __('Continue') . " + " . __('Cancel') . "
    "; + 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 ) ) { ?> + + + + + +
    + +
    +
    +
    + +
    + + + + + + +
    + + +
    +

    + + +

    +
    + + + + + required + + + + + + + + * + +

    + + + + + + + +

    ' . $alt_help . '

    + + + +

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

    ' . __('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 000000000000 -r 03b0d1493584 web/wp-admin/includes/misc.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/includes/misc.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,641 @@ + $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(); + 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->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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 web/wp-admin/includes/plugin.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/includes/plugin.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,1151 @@ + + * /* + * 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 ) { + // We don't need to write to the file, so just open for reading. + $fp = fopen($plugin_file, 'r'); + + // Pull only the first 8kiB of the file in. + $plugin_data = fread( $fp, 8192 ); + + // PHP will close file handle, but we are good citizens. + fclose($fp); + + preg_match( '|Plugin Name:(.*)$|mi', $plugin_data, $name ); + preg_match( '|Plugin URI:(.*)$|mi', $plugin_data, $uri ); + preg_match( '|Version:(.*)|i', $plugin_data, $version ); + preg_match( '|Description:(.*)$|mi', $plugin_data, $description ); + preg_match( '|Author:(.*)$|mi', $plugin_data, $author_name ); + preg_match( '|Author URI:(.*)$|mi', $plugin_data, $author_uri ); + preg_match( '|Text Domain:(.*)$|mi', $plugin_data, $text_domain ); + preg_match( '|Domain Path:(.*)$|mi', $plugin_data, $domain_path ); + + foreach ( array( 'name', 'uri', 'version', 'description', 'author_name', 'author_uri', 'text_domain', 'domain_path' ) as $field ) { + if ( !empty( ${$field} ) ) + ${$field} = _cleanup_header_comment(${$field}[1]); + else + ${$field} = ''; + } + + $plugin_data = array( + 'Name' => $name, 'Title' => $name, 'PluginURI' => $uri, 'Description' => $description, + 'Author' => $author_name, 'AuthorURI' => $author_uri, 'Version' => $version, + 'TextDomain' => $text_domain, 'DomainPath' => $domain_path + ); + 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'], dirname($plugin_file). $plugin_data['DomainPath']); + else + load_plugin_textdomain($plugin_data['TextDomain'], 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, 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); + update_option('active_plugins', $current); + do_action('activate_' . $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; + array_splice($current, array_search( $plugin, $current), 1 ); // Fixed Array-fu! + if ( ! $silent ) //Used by Plugin updater to internally deactivate plugin, however, not to notify plugins of the fact to prevent plugin output. + do_action('deactivate_' . 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 = 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 = '' ) { + 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 )) + 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); + + $menu[] = array ( $menu_title, $access_level, $file, $page_title, 'menu-top ' . $hookname, $hookname, $icon_url ); + + $_registered_pages[$hookname] = true; + + return $hookname; +} + +function add_object_page( $page_title, $menu_title, $access_level, $file, $function = '', $icon_url = '') { + global $menu, $admin_page_hooks, $_wp_last_object_menu, $_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 )) + add_action( $hookname, $function ); + + if ( empty($icon_url) ) + $icon_url = 'images/generic.png'; + + $_wp_last_object_menu++; + + $menu[$_wp_last_object_menu] = array ( $menu_title, $access_level, $file, $page_title, 'menu-top ' . $hookname, $hookname, $icon_url ); + + $_registered_pages[$hookname] = true; + + return $hookname; +} + +function add_utility_page( $page_title, $menu_title, $access_level, $file, $function = '', $icon_url = '') { + global $menu, $admin_page_hooks, $_wp_last_utility_menu, $_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 )) + 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); + + $_wp_last_utility_menu++; + + $menu[$_wp_last_utility_menu] = array ( $menu_title, $access_level, $file, $page_title, 'menu-top ' . $hookname, $hookname, $icon_url ); + + $_registered_pages[$hookname] = true; + + return $hookname; +} + +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. Can be anything. + * @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 000000000000 -r 03b0d1493584 web/wp-admin/includes/post.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/includes/post.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,1430 @@ + 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.') ); + } + + $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 ( current_user_can( 'edit_others_posts' ) && isset( $post_data['sticky'] ) ) { + 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() { + if ( !empty( $_REQUEST['post_title'] ) ) + $post_title = esc_html( stripslashes( $_REQUEST['post_title'] )); + else if ( !empty( $_REQUEST['popuptitle'] ) ) { + $post_title = esc_html( stripslashes( $_REQUEST['popuptitle'] )); + $post_title = funky_javascript_fix( $post_title ); + } else { + $post_title = ''; + } + + $post_content = ''; + if ( !empty( $_REQUEST['content'] ) ) + $post_content = esc_html( stripslashes( $_REQUEST['content'] )); + else if ( !empty( $post_title ) ) { + $text = esc_html( stripslashes( urldecode( $_REQUEST['text'] ) ) ); + $text = funky_javascript_fix( $text); + $popupurl = esc_url($_REQUEST['popupurl']); + $post_content = ''.$post_title.''."\n$text"; + } + + if ( !empty( $_REQUEST['excerpt'] ) ) + $post_excerpt = esc_html( stripslashes( $_REQUEST['excerpt'] )); + else + $post_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( trim( $_POST['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) ); + 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) ); + wp_cache_delete($post_id, 'post_meta'); + + return $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->postmeta WHERE meta_id = %d", $mid) ); +} + +/** + * 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) ); + wp_cache_delete($post_id, 'post_meta'); + + $meta_value = maybe_serialize( stripslashes( $meta_value ) ); + $meta_id = (int) $meta_id; + + $data = compact( 'meta_key', 'meta_value' ); + $where = compact( 'meta_id' ); + + return $wpdb->update( $wpdb->postmeta, $data, $where ); +} + +// +// 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 ) { + + $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; + $post_replace[$i] = preg_replace( "#href=(\"|')[^'\"]*\\1#e", "stripslashes( 'href=\\1' ).get_attachment_link( $id ).stripslashes( '\\1' )", $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); +} + +/** + * 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; + return $wpdb->update($wpdb->posts, array('post_parent' => $new_ID), array('post_parent' => $old_ID) ); +} + +/** + * {@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)')), + ); + + $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 = get_user_option('edit_per_page'); + if ( empty($posts_per_page) ) + $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); +} + +/** + * {@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'] = 'any'; + $media_per_page = get_user_option('upload_per_page'); + if ( empty($media_per_page) ) + $media_per_page = 20; + $q['posts_per_page'] = $media_per_page; + $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)')), + ); + $post_mime_types = apply_filters('post_mime_types', $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 unknown_type $id + * @param unknown_type $title + * @param unknown_type $name + * @return unknown + */ +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; +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $id + * @param unknown_type $new_title + * @param unknown_type $new_slug + * @return unknown + */ +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'); + + if ( false === strpos($permalink, '%postname%') && false === strpos($permalink, '%pagename%') ) { + $return = '' . __('Permalink:') . "\n" . '' . $permalink . "\n"; + if ( current_user_can( 'manage_options' ) ) + $return .= '' . __('Change Permalinks') . "\n"; + if ( isset($view_post) ) + $return .= "$view_post\n"; + + return $return; + } + + $title = __('Click to edit this part of the permalink'); + 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 $return; +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $post_id + * @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; +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $post_id + * @return unknown + */ +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; + 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. + */ +function wp_tiny_mce( $teeny = 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', 'autosave', 'fullscreen') ); + $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, + 'save_callback' => 'switchEditors.saveCallback', + 'wpeditimage_disable_captions' => $no_captions, + 'plugins' => "$plugins" + ); + + $mce_css = trim(apply_filters('mce_css', ''), ' ,'); + + if ( ! empty($mce_css) ) + $initArray['content_css'] = "$mce_css"; + + // 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"; +?> + + +has_cap( 'collation' ) ) { + if ( ! empty($wpdb->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->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,blog_id,option_name), + 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 screws up mkdir(), so we must use a flat structure. + $uploads_use_yearmonth_folders = 0; + $upload_path = WP_CONTENT_DIR; + } else { + $uploads_use_yearmonth_folders = 1; + $upload_path = WP_CONTENT_DIR . '/uploads'; + } + + $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_excerpt_length' => 50, + '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' => $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' => '' + ); + + // 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', 'rewrite_rules', 'update_core', 'update_plugins', 'update_themes', 'doing_cron', 'random_seed'); + foreach ($unusedoptions as $option) + delete_option($option); +} + +/** + * 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 000000000000 -r 03b0d1493584 web/wp-admin/includes/taxonomy.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/includes/taxonomy.php Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 web/wp-admin/includes/template.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/includes/template.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,3751 @@ + 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 .= "$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 .= "$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 2.8 + * + * @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 2.8 + * + * @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 ( $helper == $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 ) { + 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'); + } + + // 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"; + ?> + + + + 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 .= "$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="iedit alternate"' : ' class="iedit"', $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'); + if ( !isset($_GET['post_status']) || !in_array($_GET['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 = 'all'; + if ( !empty($_GET['post_status']) ) + $post_status = $_GET['post_status']; + 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 + if ( $authors && count( $authors ) > 1 ) : + $users_opt = array('include' => $authors, 'name' => 'post_author', 'class'=> 'authors', 'multi' => 1); + if ( $bulk ) + $users_opt['show_option_none'] = __('- No Change -'); +?> + + + + + + +
    + + + + + + +
    + + + +
    + + + +
    + + + + +
      + +
    +
    + + + +
    + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    + + + +
    + + + +
    + + + + +
    + + + + + + + + + + + + + + + + +
    + +
    + + $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; + static $rowclass; + + $global_post = $post; + $post = $a_post; + setup_postdata($post); + + $rowclass = 'alternate' == $rowclass ? '' : 'alternate'; + global $current_user; + $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 ) ) { ?> + ID) ) { + $actions['edit'] = '' . __('Edit') . ''; + $actions['inline hide-if-no-js'] = '' . __('Quick Edit') . ''; + } + if ( current_user_can('delete_post', $post->ID) ) { + $actions['delete'] = "ID) . "' onclick=\"if ( confirm('" . esc_js(sprintf( ('draft' == $post->post_status) ? __("You are about to delete this draft '%s'\n 'Cancel' to stop, 'OK' to delete.") : __("You are about to delete this post '%s'\n 'Cancel' to stop, 'OK' to delete."), $post->post_title )) . "') ) { return true;}return false;\">" . __('Delete') . ""; + } + if ( in_array($post->post_status, array('pending', 'draft')) ) { + if ( current_user_can('edit_post', $post->ID) ) + $actions['view'] = '' . __('Preview') . ''; + } else { + $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 ) ) { ?> + ID) ) { + $actions['edit'] = '' . __('Edit') . ''; + $actions['inline'] = '' . __('Quick Edit') . ''; + } + if ( current_user_can('delete_page', $page->ID) ) { + $actions['delete'] = "ID) . "' onclick=\"if ( confirm('" . esc_js(sprintf( ('draft' == $page->post_status) ? __("You are about to delete this draft '%s'\n 'Cancel' to stop, 'OK' to delete.") : __("You are about to delete this page '%s'\n 'Cancel' to stop, 'OK' to delete."), $page->post_title )) . "') ) { return true;}return false;\">" . __('Delete') . ""; + } + if ( in_array($post->post_status, array('pending', 'draft')) ) { + if ( current_user_can('edit_page', $page->ID) ) + $actions['view'] = '' . __('Preview') . ''; + } else { + $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 ); + $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 unknown_type $status + * @param unknown_type $s + * @param unknown_type $start + * @param unknown_type $num + * @param unknown_type $post + * @param unknown_type $type + * @return unknown + */ +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 = "comment_approved = '0'"; + $total = $count->moderated; + } elseif ( 'approved' == $status ) { + $approved = "comment_approved = '1'"; + $total = $count->approved; + } elseif ( 'spam' == $status ) { + $approved = "comment_approved = 'spam'"; + $total = $count->spam; + } else { + $approved = "( comment_approved = '0' OR comment_approved = '1' )"; + $total = $count->moderated + $count->approved; + $index = 'USE INDEX (comment_date_gmt)'; + } + + if ( $post ) { + $total = ''; + $post = " AND comment_post_ID = '$post'"; + $orderby = "ORDER BY comment_date_gmt ASC LIMIT $start, $num"; + } else { + $post = ''; + $orderby = "ORDER BY comment_date_gmt DESC LIMIT $start, $num"; + } + + if ( 'comment' == $type ) + $typesql = "AND comment_type = ''"; + elseif ( 'pingback' == $type ) + $typesql = "AND comment_type = 'pingback'"; + elseif ( 'trackback' == $type ) + $typesql = "AND comment_type = 'trackback'"; + elseif ( 'pings' == $type ) + $typesql = "AND ( comment_type = 'pingback' OR comment_type = 'trackback' )"; + else + $typesql = ''; + + if ( !empty($type) ) + $total = ''; + + if ( $s ) { + $total = ''; + $s = $wpdb->escape($s); + $query = "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 + $approved + $typesql"; + } else { + $query = "FROM $wpdb->comments $index WHERE $approved $post $typesql"; + } + + $comments = $wpdb->get_results("SELECT * $query $orderby"); + if ( '' === $total ) + $total = $wpdb->get_var("SELECT COUNT(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 ); + + $delete_url = esc_url( wp_nonce_url( "comment.php?action=deletecomment&p=$post->ID&c=$comment->comment_ID", "delete-comment_$comment->comment_ID" ) ); + $approve_url = esc_url( wp_nonce_url( "comment.php?action=approvecomment&p=$post->ID&c=$comment->comment_ID", "approve-comment_$comment->comment_ID" ) ); + $unapprove_url = esc_url( wp_nonce_url( "comment.php?action=unapprovecomment&p=$post->ID&c=$comment->comment_ID", "unapprove-comment_$comment->comment_ID" ) ); + $spam_url = esc_url( wp_nonce_url( "comment.php?action=deletecomment&dt=spam&p=$post->ID&c=$comment->comment_ID", "delete-comment_$comment->comment_ID" ) ); + + 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'), get_comment_link($comment->comment_ID), get_comment_date(__('Y/m/d')), get_comment_date(__('g:ia'))); + echo '
    '; + comment_text(); ?> + + comment_ID:unapproved:e7e7d3:e7e7d3:new=approved vim-a' title='" . __( 'Approve this comment' ) . "'>" . __( 'Approve' ) . ''; + $actions['unapprove'] = "" . __( 'Unapprove' ) . ''; + if ( $comment_status && 'all' != $comment_status ) { // not looking at all comments + if ( 'approved' == $the_comment_status ) { + $actions['unapprove'] = "" . __( 'Unapprove' ) . ''; + unset($actions['approve']); + } else { + $actions['approve'] = "" . __( 'Approve' ) . ''; + unset($actions['unapprove']); + } + } + if ( 'spam' != $the_comment_status ) + $actions['spam'] = "" . /* translators: mark as spam link */ _x( 'Spam', 'verb' ) . ''; + $actions['delete'] = "" . __('Delete') . ''; + $actions['edit'] = "". __('Edit') . ''; + $actions['quickedit'] = '' . __('Quick Edit') . ''; + if ( 'spam' != $the_comment_status ) + $actions['reply'] = '' . __('Reply') . ''; + + $actions = apply_filters( 'comment_row_actions', $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'; + + 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 = ''; + /* 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; +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $action + */ +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]) ) { + if ( 'page' == $page ) + $hidden = array('pageslugdiv'); + elseif ( 'post' == $page ) + $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']); + 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 = get_user_option($option); + if ( empty($per_page) ) { + if ( 'plugins' == $screen ) + $per_page = 999; + else + $per_page = 20; + } + + $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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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']; + 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; +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @return unknown + */ +function get_page_templates() { + $themes = get_themes(); + $theme = get_current_theme(); + $templates = $themes[$theme]['Template Files']; + $page_templates = array (); + + if ( is_array( $templates ) ) { + foreach ( $templates as $template ) { + $template_data = implode( '', file( WP_CONTENT_DIR.$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( $template ); + } + } + } + + return $page_templates; +} + +?> diff -r 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,264 @@ +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 000000000000 -r 03b0d1493584 web/wp-admin/includes/update.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/includes/update.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,220 @@ + '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 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 '
    '; +} +add_action( 'after_plugin_row', 'wp_plugin_update_row', 10, 2 ); + +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 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 000000000000 -r 03b0d1493584 web/wp-admin/includes/upgrade.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/includes/upgrade.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,1659 @@ +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(); + 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(); + + 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) ); + $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(); +} + + +// 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; + } + } +} + +?> diff -r 000000000000 -r 03b0d1493584 web/wp-admin/includes/user.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/includes/user.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,838 @@ +id || $wp_roles->role_objects[$_POST['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[$_POST['role']]) + wp_die(__('You can’t give users that role.')); + + $user = new WP_User( $user_id ); + $user->set_role( $_POST['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 ( isset( $_POST['user_login'] )) + $user->user_login = esc_html( trim( $_POST['user_login'] )); + + $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' ) ) { + + // 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[$_POST['role']]->has_cap( 'edit_users' )) + $user->role = $_POST['role']; + + // If the new role isn't editable by the logged-in user die with error + $editable_roles = get_editable_roles(); + if (!$editable_roles[$_POST['role']]) + wp_die(__('You can’t give users that role.')); + } + + if ( isset( $_POST['email'] )) + $user->user_email = esc_html( trim( $_POST['email'] )); + if ( isset( $_POST['url'] ) ) { + if ( empty ( $_POST['url'] ) || $_POST['url'] == 'http://' ) { + $user->user_url = ''; + } else { + $user->user_url = esc_url( trim( $_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 = esc_html( trim( $_POST['first_name'] )); + if ( isset( $_POST['last_name'] )) + $user->last_name = esc_html( trim( $_POST['last_name'] )); + if ( isset( $_POST['nickname'] )) + $user->nickname = esc_html( trim( $_POST['nickname'] )); + if ( isset( $_POST['display_name'] )) + $user->display_name = esc_html( trim( $_POST['display_name'] )); + if ( isset( $_POST['description'] )) + $user->description = trim( $_POST['description'] ); + if ( isset( $_POST['jabber'] )) + $user->jabber = esc_html( trim( $_POST['jabber'] )); + if ( isset( $_POST['aim'] )) + $user->aim = esc_html( trim( $_POST['aim'] )); + if ( isset( $_POST['yim'] )) + $user->yim = esc_html( trim( $_POST['yim'] )); + if ( !$update ) + $user->rich_editing = 'true'; // Default to true for new users. + else if ( isset( $_POST['rich_editing'] ) ) + $user->rich_editing = $_POST['rich_editing']; + else + $user->rich_editing = 'true'; + + $user->comment_shortcuts = isset( $_POST['comment_shortcuts'] )? $_POST['comment_shortcuts'] : ''; + + $user->use_ssl = 0; + if ( !empty($_POST['use_ssl']) ) + $user->use_ssl = 1; + + if ( !$update ) + $user->admin_color = 'fresh'; // Default to fresh for new users. + else if ( isset( $_POST['admin_color'] ) ) + $user->admin_color = $_POST['admin_color']; + else + $user->admin_color = 'fresh'; + + $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 there 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->user_login = esc_attr($user->user_login); + $user->user_email = esc_attr($user->user_email); + $user->user_url = esc_url($user->user_url); + $user->first_name = esc_attr($user->first_name); + $user->last_name = esc_attr($user->last_name); + $user->display_name = esc_attr($user->display_name); + $user->nickname = esc_attr($user->nickname); + $user->aim = isset( $user->aim ) && !empty( $user->aim ) ? esc_attr($user->aim) : ''; + $user->yim = isset( $user->yim ) && !empty( $user->yim ) ? esc_attr($user->yim) : ''; + $user->jabber = isset( $user->jabber ) && !empty( $user->jabber ) ? esc_attr($user->jabber) : ''; + $user->description = isset( $user->description ) && !empty( $user->description ) ? esc_html($user->description) : ''; + + 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 000000000000 -r 03b0d1493584 web/wp-admin/includes/widgets.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/includes/widgets.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,210 @@ + $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 ); + } +} + +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param string $sidebar + */ +function wp_list_widget_controls( $sidebar ) { + add_filter( 'dynamic_sidebar_params', 'wp_list_widget_controls_dynamic_sidebar' ); + + echo "\t
    \n"; + dynamic_sidebar( $sidebar ); + echo "\t
    \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 000000000000 -r 03b0d1493584 web/wp-admin/index.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/index.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,44 @@ + + +
    + +

    + +
    + + + +
    +
    + +
    + + diff -r 000000000000 -r 03b0d1493584 web/wp-admin/install-helper.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/install-helper.php Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 web/wp-admin/install.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/install.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,156 @@ + + +> + + + <?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.').'

    ');} + +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 web/wp-admin/js/cat.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/js/cat.js Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,42 @@ +jQuery(document).ready(function($) { + var options = false, addAfter, addAfter2, 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() + "").html(); + id = $('cat', r).attr('id'); + options[options.length] = new Option(name, id); + + addAfter2( r, settings ); + } + + addAfter2 = function( x, r ) { + var t = $(r.parsed.responses[0].data); + if ( t.length == 1 ) + inlineEditTax.addEvents($(t.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({ addAfter: addAfter2, delBefore: delBefore }); + + $('.delete a[class^="delete"]').click(function(){return false;}); +}); diff -r 000000000000 -r 03b0d1493584 web/wp-admin/js/categories.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/js/categories.js Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,1 @@ +jQuery(document).ready(function(d){var b=false,f,e,c,a;if(document.forms.addcat.category_parent){b=document.forms.addcat.category_parent.options}f=function(i,h){var g,j;g=d(""+d("name",i).text()+"").html();j=d("cat",i).attr("id");b[b.length]=new Option(g,j);e(i,h)};e=function(g,i){var h=d(i.parsed.responses[0].data);if(h.length==1){inlineEditTax.addEvents(d(h.id))}};a=function(h,g){var j=d("cat",h).attr("id"),i;for(i=0;i' + + $( '#mm option[value=' + $('#mm').val() + ']' ).text() + ' ' + + $('#jj').val() + ', ' + + $('#aa').val() + ' @ ' + + $('#hh').val() + ':' + + $('#mn').val() + ' ' + ); + return false; + }); +}); \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-admin/js/comment.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/js/comment.js Wed Dec 23 17:55:33 2009 +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(){b("#timestampdiv").slideUp("normal");b(".edit-timestamp").show();b("#timestamp").html(commentL10n.submittedOn+" "+b("#mm option[value="+b("#mm").val()+"]").text()+" "+b("#jj").val()+", "+b("#aa").val()+" @ "+b("#hh").val()+":"+b("#mn").val()+" ");return false})}); \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,267 @@ +var showNotice, adminMenu, columns; +(function($){ +// sidebar admin menu +adminMenu = { + + init : function() { + $('#adminmenu div.wp-menu-toggle').each( function() { + if ( $(this).siblings('.wp-submenu').length ) + $(this).click(function(){ adminMenu.toggle( $(this).siblings('.wp-submenu') ); }); + else + $(this).hide(); + }); + + this.favorites(); + + $('a.separator').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() { + $('#adminmenu li.wp-has-submenu').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) { + + el['slideToggle'](150, function(){el.css('display','');}).parent().toggleClass( 'wp-menu-open' ); + + $('#adminmenu li.wp-has-submenu').each(function(i, e) { + 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 = m.parent().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() + $('body').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) } ); + + $('#favorite-toggle, #favorite-inside').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').click( function() { + var column = $(this).val(), show = $(this).attr('checked'); + if ( show ) { + $('.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();}); + +})(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; + + // pulse + $('.fade').animate( { backgroundColor: '#ffffe0' }, 300).animate( { backgroundColor: '#fffbcc' }, 300).animate( { backgroundColor: '#ffffe0' }, 300).animate( { backgroundColor: '#fffbcc' }, 300); + + // Move .updated and .error alert boxes + $('div.wrap h2 ~ div.updated, div.wrap h2 ~ div.error').addClass('below-h2'); + $('div.updated, div.error').not('.below-h2').insertAfter('div.wrap h2:first'); + + // show warnings + $('#doaction, #doaction2').click(function(){ + if ( $('select[name="action"]').val() == 'delete' || $('select[name="action2"]').val() == 'delete' ) { + return showNotice.warn(); + } + }); + + // 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; + }); + $('#contextual-help-link-wrap, #screen-options-link-wrap').show(); + + // check all checkboxes + $( 'table:visible tbody .check-column :checkbox' ).click( function(e) { + if ( 'undefined' == e.shiftKey ) { return true; } + if ( e.shiftKey ) { + if ( !lastClicked ) { return true; } + checks = $( lastClicked ).parents( 'form:first' ).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).parents('tr').is(':visible') ) + return checked ? 'checked' : ''; + + return ''; + }); + } + } + lastClicked = this; + return true; + } ); + $( 'thead :checkbox, tfoot :checkbox' ).click( function(e) { + var c = $(this).attr('checked'), kbtoggle = 'undefined' == typeof toggleWithKeyboard ? false : toggleWithKeyboard, toggle = e.shiftKey || kbtoggle; + + + $(this).parents( 'form:first' ).find( 'table tbody:visible' ).find( '.check-column :checkbox' ).attr( 'checked', function() { + if ( $(this).parents('tr').is(':hidden') ) + return ''; + if ( toggle ) + return $(this).attr( 'checked' ) ? '' : 'checked'; + else if (c) + return 'checked'; + return ''; + }); + $(this).parents( 'form:first' ).find( 'table thead:visible, table tfoot:visible').find( '.check-column :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 = $('.turbo-nag'); + + 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 000000000000 -r 03b0d1493584 web/wp-admin/js/common.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/js/common.js Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,1 @@ +var showNotice,adminMenu,columns;(function(a){adminMenu={init:function(){a("#adminmenu div.wp-menu-toggle").each(function(){if(a(this).siblings(".wp-submenu").length){a(this).click(function(){adminMenu.toggle(a(this).siblings(".wp-submenu"))})}else{a(this).hide()}});this.favorites();a("a.separator").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("#adminmenu li.wp-has-submenu").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){b.slideToggle(150,function(){b.css("display","")}).parent().toggleClass("wp-menu-open");a("#adminmenu li.wp-has-submenu").each(function(d,f){var c=a(f).hasClass("wp-menu-open")?"o":"c";setUserSetting("m"+d,c)});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=d.parent().offset().top+d.height()+1;g=a("#wpwrap").height();k=60+c-g;i=a(window).height()+a("body").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)});a("#favorite-toggle, #favorite-inside").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").click(function(){var c=a(this).val(),b=a(this).attr("checked");if(b){a(".column-"+c).show()}else{a(".column-"+c).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()})})(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(".fade").animate({backgroundColor:"#ffffe0"},300).animate({backgroundColor:"#fffbcc"},300).animate({backgroundColor:"#ffffe0"},300).animate({backgroundColor:"#fffbcc"},300);d("div.wrap h2 ~ div.updated, div.wrap h2 ~ div.error").addClass("below-h2");d("div.updated, div.error").not(".below-h2").insertAfter("div.wrap h2:first");d("#doaction, #doaction2").click(function(){if(d('select[name="action"]').val()=="delete"||d('select[name="action2"]').val()=="delete"){return showNotice.warn()}});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("#contextual-help-link-wrap, #screen-options-link-wrap").show();d("table:visible tbody .check-column :checkbox").click(function(g){if("undefined"==g.shiftKey){return true}if(g.shiftKey){if(!f){return true}a=d(f).parents("form:first").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 000000000000 -r 03b0d1493584 web/wp-admin/js/dashboard.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/js/dashboard.js Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,391 @@ +var theList, theExtraList, toggleWithKeyboard = false; +(function($) { + +setCommentsList = function() { + var totalInput, perPageInput, pageInput, lastConfidentTime = 0, dimAfter, delBefore, updateTotalCount, delAfter; + + totalInput = $('#comments-form .tablenav :input[name="_total"]'); + perPageInput = $('#comments-form .tablenav :input[name="_per_page"]'); + pageInput = $('#comments-form .tablenav :input[name="_page"]'); + + 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; + n = a.html().replace(/[ ,.]+/g, ''); + n = parseInt(n,10); + if ( isNaN(n) ) return; + n = n + ( $('#' + settings.element).is('.' + settings.dimClass) ? 1 : -1 ); + if ( n < 0 ) { n = 0; } + a.parents('#awaiting-mod')[ 0 == n ? 'addClass' : 'removeClass' ]('count-0'); + n = n.toString(); + if ( n.length > 3 ) + n = n.substr(0, n.length-3)+' '+n.substr(-3); + a.html(n); + }); + }; + + // Send current total, page, per_page and url + delBefore = function( settings ) { + settings.data._total = totalInput.val(); + settings.data._per_page = perPageInput.val(); + settings.data._page = pageInput.val(); + settings.data._url = document.location.href; + + if ( 'undefined' != showNotice && settings.data.action && settings.data.action == 'delete-comment' && !settings.data.spam ) + return showNotice.warn() ? settings : false; + + return settings; + }; + + /* Updates the current total (as displayed visibly) + */ + updateTotalCount = function( total, time, setConfidentTime ) { + if ( time < lastConfidentTime ) { + return; + } + totalInput.val( total.toString() ); + if ( setConfidentTime ) { + lastConfidentTime = time; + } + $('span.total-type-count').each( function() { + var a = $(this), n; + n = totalInput.val().toString(); + if ( n.length > 3 ) + n = n.substr(0, n.length-3)+' '+n.substr(-3); + a.html(n); + }); + + }; + + // In admin-ajax.php, we send back the unix time stamp instead of 1 on success + delAfter = function( r, settings ) { + $('span.pending-count').each( function() { + var a = $(this), n; + n = a.html().replace(/[ ,.]+/g, ''); + n = parseInt(n,10); + if ( isNaN(n) ) return; + if ( $('#' + settings.element).is('.unapproved') ) { // we deleted a formerly unapproved comment + n = n - 1; + } else if ( $(settings.target).parents( 'span.unapprove' ).size() ) { // we "deleted" an approved comment from the approved list by clicking "Unapprove" + n = n + 1; + } + if ( n < 0 ) { n = 0; } + a.parents('#awaiting-mod')[ 0 == n ? 'addClass' : 'removeClass' ]('count-0'); + n = n.toString(); + if ( n.length > 3 ) + n = n.substr(0, n.length-3)+' '+n.substr(-3); + a.html(n); + }); + + $('span.spam-count').each( function() { + var a = $(this), n; + n = a.html().replace(/[ ,.]+/g, ''); + n = parseInt(n,10); + if ( isNaN(n) ) return; + if ( $(settings.target).parents( 'span.spam' ).size() ) { // we marked a comment as spam + n = n + 1; + } else if ( $('#' + settings.element).is('.spam') ) { // we approved or deleted a comment marked as spam + n = n - 1; + } + if ( n < 0 ) { n = 0; } + n = n.toString(); + if ( n.length > 3 ) + n = n.substr(0, n.length-3)+' '+n.substr(-3); + a.html(n); + }); + + + // XML response + if ( ( 'object' == typeof r ) && lastConfidentTime < settings.parsed.responses[0].supplemental.time ) { + // Set the total to the known good value (even if this value is a little old, newer values should only be a few less, and so shouldn't mess up the page links) + updateTotalCount( settings.parsed.responses[0].supplemental.total, settings.parsed.responses[0].supplemental.time, true ); + if ( $.trim( settings.parsed.responses[0].supplemental.pageLinks ) ) { + $('.tablenav-pages').find( '.page-numbers' ).remove().end().append( $( settings.parsed.responses[0].supplemental.pageLinks ) ); + } else if ( 'undefined' != typeof settings.parsed.responses[0].supplemental.pageLinks ) { + $('.tablenav-pages').find( '.page-numbers' ).remove(); + } + } else { + // Decrement the total + var total = parseInt( totalInput.val(), 10 ); + if ( total-- < 0 ) + total = 0; + updateTotalCount( total, r, false ); + } + + if ( theExtraList.size() == 0 || theExtraList.children().size() == 0 ) { + 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' } ); + +}; + +commentReply = { + + 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() { + $(this.o).fadeIn('fast').css('backgroundColor', ''); + $('#com-reply').append( $('#replyrow') ); + $('#replycontent').val(''); + $('#edithead input').val(''); + $('#replysubmit .error').html('').hide(); + $('#replysubmit .waiting').hide(); + if ( $.browser.msie ) + $('#replycontainer, #replycontent').css('height', '120px'); + else + $('#replycontainer').resizable('destroy').css('height', '120px'); + }, + + open : function(id, p, a) { + var t = this, editRow, act, h; + t.close(); + t.o = '#comment-'+id; + + $('#replyrow td').attr('colspan', $('.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 = $(t.o).height(); + if ( h > 220 ) + if ( $.browser.msie ) + $('#replycontainer, #replycontent', editRow).height(h-105); + else + $('#replycontainer', editRow).height(h-105); + + $(t.o).after(editRow.hide()).fadeOut('fast', function(){ + $('#replyrow').fadeIn('fast'); + }); + } else { + $('#edithead, #savebtn', editRow).hide(); + $('#replyhead, #replybtn', editRow).show(); + $(t.o).after(editRow); + $('#replyrow').hide().fadeIn('fast'); + } + + 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 : wpListL10n.url, + 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; + } + + if ( 'edit-comment' == this.act ) + $(this.o).remove(); + + r = r.responses[0]; + c = r.data; + + $(c).hide() + $('#replyrow').after(c); + + this.o = id = '#comment-'+r.id; + 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; + $('#comments-form thead #cb input:checkbox').click().attr('checked', ''); + toggleWithKeyboard = false; + } + make_bulk = function(value) { + return function(event, _) { + $('option[value='+value+']').attr('selected', 'selected'); + $('form#comments-form')[0].submit(); + } + }; + $.table_hotkeys($('table.widefat'),['a', 'u', 's', 'd', 'r', 'q', ['e', edit_comment], + ['shift+a', make_bulk('approve')], ['shift+s', make_bulk('markspam')], + ['shift+d', make_bulk('delete')], ['shift+x', toggle_all], + ['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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,1 @@ +var theList,theExtraList,toggleWithKeyboard=false;(function(a){setCommentsList=function(){var g,i,h,f=0,c,e,d,b;g=a('#comments-form .tablenav :input[name="_total"]');i=a('#comments-form .tablenav :input[name="_per_page"]');h=a('#comments-form .tablenav :input[name="_page"]');c=function(k,j){var l=a("#"+j.element);if(l.is(".unapproved")){l.find("div.comment_status").html("0")}else{l.find("div.comment_status").html("1")}a("span.pending-count").each(function(){var m=a(this),o;o=m.html().replace(/[ ,.]+/g,"");o=parseInt(o,10);if(isNaN(o)){return}o=o+(a("#"+j.element).is("."+j.dimClass)?1:-1);if(o<0){o=0}m.parents("#awaiting-mod")[0==o?"addClass":"removeClass"]("count-0");o=o.toString();if(o.length>3){o=o.substr(0,o.length-3)+" "+o.substr(-3)}m.html(o)})};e=function(j){j.data._total=g.val();j.data._per_page=i.val();j.data._page=h.val();j.data._url=document.location.href;if("undefined"!=showNotice&&j.data.action&&j.data.action=="delete-comment"&&!j.data.spam){return showNotice.warn()?j:false}return j};d=function(j,k,l){if(k3){o=o.substr(0,o.length-3)+" "+o.substr(-3)}m.html(o)})};b=function(l,j){a("span.pending-count").each(function(){var m=a(this),o;o=m.html().replace(/[ ,.]+/g,"");o=parseInt(o,10);if(isNaN(o)){return}if(a("#"+j.element).is(".unapproved")){o=o-1}else{if(a(j.target).parents("span.unapprove").size()){o=o+1}}if(o<0){o=0}m.parents("#awaiting-mod")[0==o?"addClass":"removeClass"]("count-0");o=o.toString();if(o.length>3){o=o.substr(0,o.length-3)+" "+o.substr(-3)}m.html(o)});a("span.spam-count").each(function(){var m=a(this),o;o=m.html().replace(/[ ,.]+/g,"");o=parseInt(o,10);if(isNaN(o)){return}if(a(j.target).parents("span.spam").size()){o=o+1}else{if(a("#"+j.element).is(".spam")){o=o-1}}if(o<0){o=0}o=o.toString();if(o.length>3){o=o.substr(0,o.length-3)+" "+o.substr(-3)}m.html(o)});if(("object"==typeof l)&&f 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(){a(this.o).fadeIn("fast").css("backgroundColor","");a("#com-reply").append(a("#replyrow"));a("#replycontent").val("");a("#edithead input").val("");a("#replysubmit .error").html("").hide();a("#replysubmit .waiting").hide();if(a.browser.msie){a("#replycontainer, #replycontent").css("height","120px")}else{a("#replycontainer").resizable("destroy").css("height","120px")}},open:function(i,g,c){var e=this,d,b,f;e.close();e.o="#comment-"+i;a("#replyrow td").attr("colspan",a(".widefat thead th:visible").length);d=a("#replyrow"),rowData=a("#inline-"+i);b=e.act=(c=="edit")?"edit-comment":"replyto-comment";a("#action",d).val(b);a("#comment_post_ID",d).val(g);a("#comment_ID",d).val(i);if(c=="edit"){a("#author",d).val(a("div.author",rowData).text());a("#author-email",d).val(a("div.author-email",rowData).text());a("#author-url",d).val(a("div.author-url",rowData).text());a("#status",d).val(a("div.comment_status",rowData).text());a("#replycontent",d).val(a("textarea.comment",rowData).val());a("#edithead, #savebtn",d).show();a("#replyhead, #replybtn",d).hide();f=a(e.o).height();if(f>220){if(a.browser.msie){a("#replycontainer, #replycontent",d).height(f-105)}else{a("#replycontainer",d).height(f-105)}}a(e.o).after(d.hide()).fadeOut("fast",function(){a("#replyrow").fadeIn("fast")})}else{a("#edithead, #savebtn",d).hide();a("#replyhead, #replybtn",d).show();a(e.o).after(d);a("#replyrow").hide().fadeIn("fast")}if(!a.browser.msie){a("#replycontainer").resizable({handles:"s",axis:"y",minHeight:80,stop:function(){a("#replycontainer").width("auto")}})}setTimeout(function(){var l,j,m,h,k;l=a("#replyrow").offset().top;j=l+a("#replyrow").height();m=window.pageYOffset||document.documentElement.scrollTop;h=document.documentElement.clientHeight||self.innerHeight||0;k=m+h;if(k-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("#comments-form thead #cb input:checkbox").click().attr("checked","");toggleWithKeyboard=false};d=function(f){return function(h,g){a("option[value="+f+"]").attr("selected","selected");a("form#comments-form")[0].submit()}};a.table_hotkeys(a("table.widefat"),["a","u","s","d","r","q",["e",b],["shift+a",d("approve")],["shift+s",d("markspam")],["shift+d",d("delete")],["shift+x",c],["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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,179 @@ + +jQuery(document).ready(function($){ + var h = wpCookies.getHash('TinyMCE_content_size'); + + if ( getUserSetting( 'editor' ) == 'html' ) { + if ( h ) + $('#content').css('height', h.ch - 15 + 'px'); + } else { + $('#content').css('color', 'white'); + $('#quicktags').hide(); + } +}); + +var switchEditors = { + + mode : '', + + I : function(e) { + return document.getElementById(e); + }, + + edInit : function() { + }, + + saveCallback : function(el, content, body) { + + if ( tinyMCE.activeEditor.isHidden() ) + content = this.I(el).value; + else + content = this.pre_wpautop(content); + + return content; + }, + + pre_wpautop : function(content) { + var blocklist1, blocklist2; + + // Protect pre|script tags + content = content.replace(/<(pre|script)[^>]*>[\s\S]+?<\/\1>/g, function(a) { + a = a.replace(/
    [\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|tr|th|td|div|h[1-6]|p'; + content = content.replace(new RegExp('\\s*\\s*', 'mg'), '\n'); + content = content.replace(new RegExp('\\s*<(('+blocklist1+')[^>]*)>', 'mg'), '\n<$1>'); + + // Mark

    if it has any attributes. + content = content.replace(new RegExp('(

    ]+>.*?)

    ', 'mg'), '$1'); + + // Sepatate
    containing

    + content = content.replace(new RegExp(']*)>\\s*

    ', 'mgi'), '\n\n'); + + // Remove

    and
    + content = content.replace(new RegExp('\\s*

    ', 'mgi'), ''); + content = content.replace(new RegExp('\\s*

    \\s*', 'mgi'), '\n\n'); + content = content.replace(new RegExp('\\n\\s*\\n', 'mgi'), '\n\n'); + content = content.replace(new RegExp('\\s*
    \\s*', 'gi'), '\n'); + + // Fix some block element newline issues + content = content.replace(new RegExp('\\s*\\s*', 'mg'), '
    \n'); + content = content.replace(new RegExp('\\s*\\[caption([^\\[]+)\\[/caption\\]\\s*', 'gi'), '\n\n[caption$1[/caption]\n\n'); + content = content.replace(new RegExp('caption\\]\\n\\n+\\[caption', 'g'), 'caption]\n\n[caption'); + + blocklist2 = 'blockquote|ul|ol|li|table|thead|tr|th|td|h[1-6]|pre'; + content = content.replace(new RegExp('\\s*<(('+blocklist2+') ?[^>]*)\\s*>', 'mg'), '\n<$1>'); + content = content.replace(new RegExp('\\s*\\s*', 'mg'), '\n'); + content = content.replace(new RegExp(']*)>', 'g'), '\t'); + + if ( content.indexOf('/g, function(a){ + return a.replace(/[\r\n]+/g, ''); + }); + } + + // Unmark special paragraph closing tags + content = content.replace(new RegExp('', 'g'), '

    \n'); + content = content.replace(new RegExp('\\s*(

    ]+>.*

    )', 'mg'), '\n$1'); + + // Trim whitespace + content = content.replace(new RegExp('^\\s*', ''), ''); + content = content.replace(new RegExp('[\\s\\u00a0]*$', ''), ''); + + // put back the line breaks in pre|script + content = content.replace(//g, '\n'); + + // Hope. + return content; + }, + + go : function(id, mode) { + id = id || 'content'; + mode = mode || this.mode || ''; + + var ed, qt = this.I('quicktags'), H = this.I('edButtonHTML'), P = this.I('edButtonPreview'), ta = this.I(id); + + try { ed = tinyMCE.get(id); } + catch(e) { ed = false; } + + if ( 'tinymce' == mode ) { + if ( ed && ! ed.isHidden() ) + return false; + + setUserSetting( 'editor', 'tinymce' ); + this.mode = 'html'; + + P.className = 'active'; + H.className = ''; + edCloseAllTags(); // :-( + qt.style.display = 'none'; + + ta.value = this.wpautop(ta.value); + + if ( ed ) { + ed.show(); + } else { + try{tinyMCE.execCommand("mceAddControl", false, id);} + catch(e){} + } + } else { + setUserSetting( 'editor', 'html' ); + ta.style.color = '#000'; + this.mode = 'tinymce'; + H.className = 'active'; + P.className = ''; + + if ( ed && !ed.isHidden() ) { + ta.style.height = ed.getContentAreaContainer().offsetHeight + 24 + 'px'; + ed.hide(); + } + + qt.style.display = 'block'; + } + return false; + }, + + wpautop : function(pee) { + 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]'; + + 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(new RegExp('
    \\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(new RegExp("\\r\\n|\\r", 'g'), "\n"); + pee = pee.replace(new RegExp("\\n\\s*\\n+", 'g'), "\n\n"); + pee = pee.replace(new RegExp('([\\s\\S]+?)\\n\\n', 'mg'), "

    $1

    \n"); + pee = pee.replace(new RegExp('

    \\s*?

    ', 'gi'), ''); + pee = pee.replace(new RegExp('

    \\s*(]*>)\\s*

    ', 'gi'), "$1"); + pee = pee.replace(new RegExp("

    (", 'gi'), "$1"); + pee = pee.replace(new RegExp('

    \\s*]*)>', 'gi'), "

    "); + pee = pee.replace(new RegExp('\\s*

    ', 'gi'), '

    '); + pee = pee.replace(new RegExp('

    \\s*(]*>)', 'gi'), "$1"); + pee = pee.replace(new RegExp('(]*>)\\s*

    ', 'gi'), "$1"); + pee = pee.replace(new RegExp('\\s*\\n', 'gi'), "
    \n"); + pee = pee.replace(new RegExp('(]*>)\\s*
    ', 'gi'), "$1"); + pee = pee.replace(new RegExp('
    (\\s*)', 'gi'), '$1'); + pee = pee.replace(new RegExp('(?:

    |
    )*\\s*\\[caption([^\\[]+)\\[/caption\\]\\s*(?:

    |
    )*', 'gi'), '[caption$1[/caption]'); + + // 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; + } +}; diff -r 000000000000 -r 03b0d1493584 web/wp-admin/js/editor.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/js/editor.js Wed Dec 23 17:55:33 2009 +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{b("#content").css("color","white");b("#quicktags").hide()}});var switchEditors={mode:"",I:function(a){return document.getElementById(a)},edInit:function(){},saveCallback:function(b,c,a){if(tinyMCE.activeEditor.isHidden()){c=this.I(b).value}else{c=this.pre_wpautop(c)}return c},pre_wpautop: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|tr|th|td|div|h[1-6]|p";b=b.replace(new RegExp("\\s*\\s*","mg"),"\n");b=b.replace(new RegExp("\\s*<(("+c+")[^>]*)>","mg"),"\n<$1>");b=b.replace(new RegExp("(

    ]+>.*?)

    ","mg"),"$1");b=b.replace(new RegExp("]*)>\\s*

    ","mgi"),"\n\n");b=b.replace(new RegExp("\\s*

    ","mgi"),"");b=b.replace(new RegExp("\\s*

    \\s*","mgi"),"\n\n");b=b.replace(new RegExp("\\n\\s*\\n","mgi"),"\n\n");b=b.replace(new RegExp("\\s*
    \\s*","gi"),"\n");b=b.replace(new RegExp("\\s*\\s*","mg"),"\n");b=b.replace(new RegExp("\\s*\\[caption([^\\[]+)\\[/caption\\]\\s*","gi"),"\n\n[caption$1[/caption]\n\n");b=b.replace(new RegExp("caption\\]\\n\\n+\\[caption","g"),"caption]\n\n[caption");a="blockquote|ul|ol|li|table|thead|tr|th|td|h[1-6]|pre";b=b.replace(new RegExp("\\s*<(("+a+") ?[^>]*)\\s*>","mg"),"\n<$1>");b=b.replace(new RegExp("\\s*\\s*","mg"),"\n");b=b.replace(new RegExp("]*)>","g"),"\t");if(b.indexOf("/g,function(d){return d.replace(/[\r\n]+/g,"")})}b=b.replace(new RegExp("","g"),"

    \n");b=b.replace(new RegExp("\\s*(

    ]+>.*

    )","mg"),"\n$1");b=b.replace(new RegExp("^\\s*",""),"");b=b.replace(new RegExp("[\\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.value=this.wpautop(a.value);if(b){b.show()}else{try{tinyMCE.execCommand("mceAddControl",false,i)}catch(f){}}}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},wpautop: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]";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(new RegExp("
    \\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(new RegExp("\\r\\n|\\r","g"),"\n");a=a.replace(new RegExp("\\n\\s*\\n+","g"),"\n\n");a=a.replace(new RegExp("([\\s\\S]+?)\\n\\n","mg"),"

    $1

    \n");a=a.replace(new RegExp("

    \\s*?

    ","gi"),"");a=a.replace(new RegExp("

    \\s*(]*>)\\s*

    ","gi"),"$1");a=a.replace(new RegExp("

    (","gi"),"$1");a=a.replace(new RegExp("

    \\s*]*)>","gi"),"

    ");a=a.replace(new RegExp("\\s*

    ","gi"),"

    ");a=a.replace(new RegExp("

    \\s*(]*>)","gi"),"$1");a=a.replace(new RegExp("(]*>)\\s*

    ","gi"),"$1");a=a.replace(new RegExp("\\s*\\n","gi"),"
    \n");a=a.replace(new RegExp("(]*>)\\s*
    ","gi"),"$1");a=a.replace(new RegExp("
    (\\s*)","gi"),"$1");a=a.replace(new RegExp("(?:

    |
    )*\\s*\\[caption([^\\[]+)\\[/caption\\]\\s*(?:

    |
    )*","gi"),"[caption$1[/caption]");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}}; \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-admin/js/farbtastic.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/js/farbtastic.js Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,204 @@ +jQuery(document).ready(function($) { + var gallerySortable, gallerySortableInit, w, desc = false; + + gallerySortableInit = function() { + gallerySortable = $('#media-items').sortable( { + items: '.media-item', + placeholder: 'sorthelper', + axis: 'y', + distance: 2, + 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 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); + }, + + addEvents : function(r) { + r.each(function() { + var row = $(this); + $('a.editinline', row).click(function() { inlineEditPost.edit(this); return false; }); + }); + }, + + setBulk : function() { + var te = '', type = this.type, tax; + 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') ) { + var id = $(this).val(), theTitle; + theTitle = $('#inline_'+id+' .post_title').text() || inlineEditL10n.notitle; + te += '
    X'+theTitle+'
    '; + } + }); + + $('#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); + 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; + + 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' + }; + + fields = $('#edit-'+id+' :input').fieldSerialize(); + 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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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+"-";c.rows=a("tr.iedit");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","")}});c.addEvents(c.rows);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)},addEvents:function(b){b.each(function(){var c=a(this);a("a.editinline",c).click(function(){inlineEditPost.edit(this);return false})})},setBulk:function(){var d="",c=this.type,b;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(f){if(a(this).attr("checked")){var g=a(this).val(),e;e=a("#inline_"+g+" .post_title").text()||inlineEditL10n.notitle;d+='
    X'+e+"
    "}});a("#bulk-titles").html(d);a("#bulk-titles a").click(function(){var e=a(this).attr("id").substr(1);a('table.widefat input[value="'+e+'"]').attr("checked","");a("#ttle"+e).remove()});if(c=="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);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(d){var c,b;if(typeof(d)=="object"){d=this.getId(d)}a("table.widefat .inline-edit-save .waiting").show();c={action:"inline-save",post_type:this.type,post_ID:d,edit_date:"true"};b=a("#edit-"+d+" :input").fieldSerialize();c=b+"&"+a.param(c);a.post("admin-ajax.php",c,function(e){a("table.widefat .inline-edit-save .waiting").hide();if(e){if(-1!=e.indexOf("]*?>/g,"");a("#edit-"+d+" .inline-edit-save").append(''+e+"")}}else{a("#edit-"+d+" .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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,129 @@ + +(function($) { +inlineEditTax = { + + init : function() { + var t = this, row = $('#inline-edit'); + + t.type = $('#the-list').attr('className').substr(5); + t.what = '#'+t.type+'-'; + + // get all editable rows + t.rows = $('tr.iedit'); + + // 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); }); + + // add events + t.addEvents(t.rows); + + $('#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); + }, + + addEvents : function(r) { + r.each(function() { + $(this).find('a.editinline').click(function() { inlineEditTax.edit(this); return false; }); + }); + }, + + 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').fieldSerialize(); + 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)},addEvents:function(b){b.each(function(){a(this).find("a.editinline").click(function(){inlineEditTax.edit(this);return false})})},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").fieldSerialize();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 000000000000 -r 03b0d1493584 web/wp-admin/js/link.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/js/link.js Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,63 @@ +// 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); + } + + 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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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)}}}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 000000000000 -r 03b0d1493584 web/wp-admin/js/media.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/js/media.js Wed Dec 23 17:55:33 2009 +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:checked").val()){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 000000000000 -r 03b0d1493584 web/wp-admin/js/page.dev.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/js/page.dev.js Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,185 @@ +jQuery(document).ready( function($) { + postboxes.add_postbox_toggles('page'); + make_slugedit_clickable(); + + $('#title').blur( function() { if ( ($("#post_ID").val() > 0) || ($("#title").val().length == 0) ) return; autosave(); } ); + + var stamp = $('#timestamp').html(), visibility = $('#post-visibility-display').html(); + + function updateVisibility() { + if ( $('#post-visibility-select input:radio:checked').val() != 'public' ) { + $('#sticky').attr('checked', false); + $('#sticky-span').hide(); + } else { + $('#sticky-span').show(); + } + if ( $('#post-visibility-select input:radio:checked').val() != 'password' ) { + $('#password-span').hide(); + } else { + $('#password-span').show(); + } + } + + function updateText() { + var attemptedDate, originalDate, currentDate, publishOn; + + attemptedDate = new Date( $('#aa').val(), $('#mm').val() -1, $('#jj').val(), $('#hh').val(), $('#mn').val()); + 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 > 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; + $('#publish').val( postL10n.update ); + } + if ( originalDate.toUTCString() == attemptedDate.toUTCString() ) { //hack + $('#timestamp').html(stamp); + } else { + $('#timestamp').html( + publishOn + ' ' + + $( '#mm option[value=' + $('#mm').val() + ']' ).text() + ' ' + + $('#jj').val() + ', ' + + $('#aa').val() + ' @ ' + + $('#hh').val() + ':' + + $('#mn').val() + ' ' + ); + } + + if ( $('#post-visibility-select input:radio:checked').val() == 'private' ) { + $('#publish').val( postL10n.update ); + if ( $('#post_status option[value=publish]').length == 0 ) { + $('#post_status').append(''); + } + $('#post_status option[value=publish]').html( postL10n.privatelyPublished ); + $('#post_status option[value=publish]').attr('selected', true); + $('.edit-post-status').hide(); + } else { + if ( $('#original_post_status').val() == 'future' || $('#original_post_status').val() == 'draft' ) { + if ( $('#post_status option[value=publish]').length != 0 ) { + $('#post_status option[value=publish]').remove(); + $('#post_status').val($('#hidden_post_status').val()); + } + } else { + $('#post_status option[value=publish]').html( postL10n.published ); + } + $('.edit-post-status').show(); + } + $('#post-status-display').html($('#post_status :selected').text()); + if ( $('#post_status :selected').val() == 'private' || $('#post_status :selected').val() == 'publish' ) { + $('#save-post').hide(); + } else { + $('#save-post').show(); + if ( $('#post_status :selected').val() == 'pending' ) { + $('#save-post').show().val( postL10n.savePending ); + } else { + $('#save-post').show().val( postL10n.saveDraft ); + } + } + } + + $('.edit-visibility').click(function () { + if ($('#post-visibility-select').is(":hidden")) { + updateVisibility(); + $('#post-visibility-select').slideDown("normal"); + $('.edit-visibility').hide(); + } + return false; + }); + + $('.cancel-post-visibility').click(function () { + $('#post-visibility-select').slideUp("normal"); + $('#visibility-radio-' + $('#hidden-post-visibility').val()).attr('checked', true); + $('#post_password').val($('#hidden_post_password').val()); + $('#post-visibility-display').html(visibility); + $('.edit-visibility').show(); + updateText(); + return false; + }); + + $('.save-post-visibility').click(function () { // crazyhorse - multiple ok cancels + $('#post-visibility-select').slideUp("normal"); + $('.edit-visibility').show(); + updateText(); + + $('#post-visibility-display').html( + postL10n[$('#post-visibility-select input:radio:checked').val()] + ); + + return false; + }); + + $('#post-visibility-select input:radio').change(function() { + updateVisibility(); + }); + + $('.edit-timestamp').click(function () { + if ($('#timestampdiv').is(":hidden")) { + $('#timestampdiv').slideDown("normal"); + $('.edit-timestamp').hide(); + } + + return false; + }); + + $('.cancel-timestamp').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()); + $('.edit-timestamp').show(); + + updateText(); + return false; + }); + + $('.save-timestamp').click(function () { // crazyhorse - multiple ok cancels + $('#timestampdiv').slideUp("normal"); + $('.edit-timestamp').show(); + updateText(); + + return false; + }); + + $('.edit-post-status').click(function() { + if ($('#post-status-select').is(":hidden")) { + $('#post-status-select').slideDown("normal"); + $(this).hide(); + } + + return false; + }); + + $('.save-post-status').click(function() { + $('#post-status-select').slideUp("normal"); + $('.edit-post-status').show(); + updateText(); + return false; + }); + + $('.cancel-post-status').click(function() { + $('#post-status-select').slideUp("normal"); + $('#post_status').val($('#hidden_post_status').val()); + $('.edit-post-status').show(); + + updateText(); + return false; + }); + + // Custom Fields + $('#the-list').wpList( { addAfter: function( xml, s ) { + $('table#list-table').show(); + if ( $.isFunction( autosave_update_post_ID ) ) { + autosave_update_post_ID(s.parsed.responses[0].supplemental.postid); + } + }, addBefore: function( s ) { + s.data += '&post_id=' + $('#post_ID').val(); + return s; + } + }); +}); diff -r 000000000000 -r 03b0d1493584 web/wp-admin/js/page.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/js/page.js Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,1 @@ +jQuery(document).ready(function(e){postboxes.add_postbox_toggles("page");make_slugedit_clickable();e("#title").blur(function(){if((e("#post_ID").val()>0)||(e("#title").val().length==0)){return}autosave()});var b=e("#timestamp").html(),a=e("#post-visibility-display").html();function d(){if(e("#post-visibility-select input:radio:checked").val()!="public"){e("#sticky").attr("checked",false);e("#sticky-span").hide()}else{e("#sticky-span").show()}if(e("#post-visibility-select input:radio:checked").val()!="password"){e("#password-span").hide()}else{e("#password-span").show()}}function c(){var f,h,g,i;f=new Date(e("#aa").val(),e("#mm").val()-1,e("#jj").val(),e("#hh").val(),e("#mn").val());h=new Date(e("#hidden_aa").val(),e("#hidden_mm").val()-1,e("#hidden_jj").val(),e("#hidden_hh").val(),e("#hidden_mn").val());g=new Date(e("#cur_aa").val(),e("#cur_mm").val()-1,e("#cur_jj").val(),e("#cur_hh").val(),e("#cur_mn").val());if(f>g&&e("#original_post_status").val()!="future"){i=postL10n.publishOnFuture;e("#publish").val(postL10n.schedule)}else{if(f<=g&&e("#original_post_status").val()!="publish"){i=postL10n.publishOn;e("#publish").val(postL10n.publish)}else{i=postL10n.publishOnPast;e("#publish").val(postL10n.update)}}if(h.toUTCString()==f.toUTCString()){e("#timestamp").html(b)}else{e("#timestamp").html(i+" "+e("#mm option[value="+e("#mm").val()+"]").text()+" "+e("#jj").val()+", "+e("#aa").val()+" @ "+e("#hh").val()+":"+e("#mn").val()+" ")}if(e("#post-visibility-select input:radio:checked").val()=="private"){e("#publish").val(postL10n.update);if(e("#post_status option[value=publish]").length==0){e("#post_status").append('")}e("#post_status option[value=publish]").html(postL10n.privatelyPublished);e("#post_status option[value=publish]").attr("selected",true);e(".edit-post-status").hide()}else{if(e("#original_post_status").val()=="future"||e("#original_post_status").val()=="draft"){if(e("#post_status option[value=publish]").length!=0){e("#post_status option[value=publish]").remove();e("#post_status").val(e("#hidden_post_status").val())}}else{e("#post_status option[value=publish]").html(postL10n.published)}e(".edit-post-status").show()}e("#post-status-display").html(e("#post_status :selected").text());if(e("#post_status :selected").val()=="private"||e("#post_status :selected").val()=="publish"){e("#save-post").hide()}else{e("#save-post").show();if(e("#post_status :selected").val()=="pending"){e("#save-post").show().val(postL10n.savePending)}else{e("#save-post").show().val(postL10n.saveDraft)}}}e(".edit-visibility").click(function(){if(e("#post-visibility-select").is(":hidden")){d();e("#post-visibility-select").slideDown("normal");e(".edit-visibility").hide()}return false});e(".cancel-post-visibility").click(function(){e("#post-visibility-select").slideUp("normal");e("#visibility-radio-"+e("#hidden-post-visibility").val()).attr("checked",true);e("#post_password").val(e("#hidden_post_password").val());e("#post-visibility-display").html(a);e(".edit-visibility").show();c();return false});e(".save-post-visibility").click(function(){e("#post-visibility-select").slideUp("normal");e(".edit-visibility").show();c();e("#post-visibility-display").html(postL10n[e("#post-visibility-select input:radio:checked").val()]);return false});e("#post-visibility-select input:radio").change(function(){d()});e(".edit-timestamp").click(function(){if(e("#timestampdiv").is(":hidden")){e("#timestampdiv").slideDown("normal");e(".edit-timestamp").hide()}return false});e(".cancel-timestamp").click(function(){e("#timestampdiv").slideUp("normal");e("#mm").val(e("#hidden_mm").val());e("#jj").val(e("#hidden_jj").val());e("#aa").val(e("#hidden_aa").val());e("#hh").val(e("#hidden_hh").val());e("#mn").val(e("#hidden_mn").val());e(".edit-timestamp").show();c();return false});e(".save-timestamp").click(function(){e("#timestampdiv").slideUp("normal");e(".edit-timestamp").show();c();return false});e(".edit-post-status").click(function(){if(e("#post-status-select").is(":hidden")){e("#post-status-select").slideDown("normal");e(this).hide()}return false});e(".save-post-status").click(function(){e("#post-status-select").slideUp("normal");e(".edit-post-status").show();c();return false});e(".cancel-post-status").click(function(){e("#post-status-select").slideUp("normal");e("#post_status").val(e("#hidden_post_status").val());e(".edit-post-status").show();c();return false});e("#the-list").wpList({addAfter:function(f,g){e("table#list-table").show();if(e.isFunction(autosave_update_post_ID)){autosave_update_post_ID(g.parsed.responses[0].supplemental.postid)}},addBefore:function(f){f.data+="&post_id="+e("#post_ID").val();return f}})}); \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,490 @@ +// 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 new_tag_remove_tag() { + var id = jQuery( this ).attr( 'id' ), num = id.split('-check-num-')[1], taxbox = jQuery(this).parents('.tagsdiv'), current_tags = taxbox.find( '.the-tags' ).val().split(','), new_tags = []; + delete current_tags[num]; + + jQuery.each( current_tags, function(key, val) { + val = jQuery.trim(val); + if ( val ) { + new_tags.push(val); + } + }); + + taxbox.find('.the-tags').val( new_tags.join(',').replace(/\s*,+\s*/, ',').replace(/,+/, ',').replace(/,+\s+,+/, ',').replace(/,+\s*$/, '').replace(/^\s*,+/, '') ); + + tag_update_quickclicks(taxbox); + return false; +} + +function tag_update_quickclicks(taxbox) { + if ( jQuery(taxbox).find('.the-tags').length == 0 ) + return; + + var current_tags = jQuery(taxbox).find('.the-tags').val().split(','); + jQuery(taxbox).find('.tagchecklist').empty(); + shown = false; + + jQuery.each( current_tags, function( key, val ) { + var txt, button_id; + + val = jQuery.trim(val); + if ( !val.match(/^\s+$/) && '' != val ) { + button_id = jQuery(taxbox).attr('id') + '-check-num-' + key; + txt = 'X ' + val + ' '; + jQuery(taxbox).find('.tagchecklist').append(txt); + jQuery( '#' + button_id ).click( new_tag_remove_tag ); + } + }); + if ( shown ) + jQuery(taxbox).find('.tagchecklist').prepend(''+postL10n.tagsUsed+'
    '); +} + +function tag_flush_to_text(id, a) { + a = a || false; + var taxbox, text, tags, newtags; + + taxbox = jQuery('#'+id); + text = a ? jQuery(a).text() : taxbox.find('input.newtag').val(); + + // is the input box empty (i.e. showing the 'Add new tag' tip)? + if ( taxbox.find('input.newtag').hasClass('form-input-tip') && ! a ) + return false; + + tags = taxbox.find('.the-tags').val(); + newtags = tags ? tags + ',' + text : text; + + // massage + newtags = newtags.replace(/\s+,+\s*/g, ',').replace(/,+/g, ',').replace(/,+\s+,+/g, ',').replace(/,+\s*$/g, '').replace(/^\s*,+/g, ''); + newtags = array_unique_noempty(newtags.split(',')).join(','); + taxbox.find('.the-tags').val(newtags); + tag_update_quickclicks(taxbox); + + if ( ! a ) + taxbox.find('input.newtag').val('').focus(); + + return false; +} + +function tag_save_on_publish() { + jQuery('.tagsdiv').each( function(i) { + if ( !jQuery(this).find('input.newtag').hasClass('form-input-tip') ) + tag_flush_to_text(jQuery(this).parents('.tagsdiv').attr('id')); + } ); +} + +function tag_press_key( e ) { + if ( 13 == e.which ) { + tag_flush_to_text(jQuery(e.target).parents('.tagsdiv').attr('id')); + return false; + } +}; + +function tag_init() { + + jQuery('.ajaxtag').show(); + jQuery('.tagsdiv').each( function(i) { + tag_update_quickclicks(this); + } ); + + // add the quickadd form + jQuery('.ajaxtag input.tagadd').click(function(){tag_flush_to_text(jQuery(this).parents('.tagsdiv').attr('id'));}); + jQuery('.ajaxtag input.newtag').focus(function() { + if ( !this.cleared ) { + this.cleared = true; + jQuery(this).val( '' ).removeClass( 'form-input-tip' ); + } + }); + + jQuery('.ajaxtag input.newtag').blur(function() { + if ( this.value == '' ) { + this.cleared = false; + jQuery(this).val( postL10n.addTag ).addClass( 'form-input-tip' ); + } + }); + + // auto-save tags on post save/publish + jQuery('#publish').click( tag_save_on_publish ); + jQuery('#save-post').click( tag_save_on_publish ); + + // catch the enter key + jQuery('.ajaxtag input.newtag').keypress( tag_press_key ); +} + +var commentsBox, tagCloud; +(function($){ + + 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; + } + }; + + tagCloud = { + init : function() { + $('.tagcloud-link').click(function(){ + tagCloud.get($(this).attr('id')); + $(this).unbind().click(function(){ + $(this).siblings('.the-tagcloud').toggle(); + return false; + }); + 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(){ + var id = $(this).parents('p').attr('id'); + tag_flush_to_text(id.substr(id.indexOf('-')+1), this); + return false; + }); + + $('#'+id).after(r); + }); + } + }; + + $(document).ready(function(){tagCloud.init();}); +})(jQuery); + +jQuery(document).ready( function($) { + var noSyncChecks = false, syncChecks, catAddAfter, stamp = $('#timestamp').html(), visibility = $('#post-visibility-display').html(), sticky = ''; + + // postboxes + postboxes.add_postbox_toggles('post'); + + // Editable slugs + make_slugedit_clickable(); + + // prepare the tag UI + tag_init(); + + $('#title').blur( function() { + if ( ($("#post_ID").val() > 0) || ($("#title").val().length == 0) ) + return; + + if ( typeof(autosave) != 'undefined' ) + autosave(); + }); + + // auto-suggest stuff + $('.newtag').each(function(){ + var tax = $(this).parents('div.tagsdiv').attr('id'); + $(this).suggest( 'admin-ajax.php?action=ajax-tag-search&tax='+tax, { delay: 500, minchars: 2, multiple: true, multipleSep: ", " } ); + }); + + // category tabs + $('#category-tabs a').click(function(){ + var t = $(this).attr('href'); + $(this).parent().addClass('tabs').siblings('li').removeClass('tabs'); + $('.tabs-panel').hide(); + $(t).show(); + if ( '#categories-all' == t ) + deleteUserSetting('cats'); + else + setUserSetting('cats','pop'); + return false; + }); + if ( getUserSetting('cats') ) + $('#category-tabs a[href="#categories-pop"]').click(); + + // Ajax Cat + $('#newcat').one( 'focus', function() { $(this).val( '' ).removeClass( 'form-input-tip' ) } ); + $('#category-add-sumbit').click(function(){$('#newcat').focus();}); + + syncChecks = function() { + if ( noSyncChecks ) + return; + noSyncChecks = true; + var th = jQuery(this), c = th.is(':checked'), id = th.val().toString(); + $('#in-category-' + id + ', #in-popular-category-' + id).attr( 'checked', c ); + noSyncChecks = false; + }; + + popularCats = $('#categorychecklist-pop :checkbox').map( function() { return parseInt(jQuery(this).val(), 10); } ).get().join(','); + catAddBefore = function( s ) { + if ( !$('#newcat').val() ) + return false; + s.data += '&popular_ids=' + popularCats + '&' + jQuery( '#categorychecklist :checked' ).serialize(); + return s; + }; + + catAddAfter = function( r, s ) { + var newCatParent = jQuery('#newcat_parent'), newCatParentOption = newCatParent.find( 'option[value="-1"]' ); + $(s.what + ' response_data', r).each( function() { + var t = $($(this).text()); + t.find( 'label' ).each( function() { + var th = $(this), val = th.find('input').val(), id = th.find('input')[0].id, name, o; + $('#' + id).change( syncChecks ).change(); + if ( newCatParent.find( 'option[value="' + val + '"]' ).size() ) + return; + name = $.trim( th.text() ); + o = $( '' ).text( name ); + newCatParent.prepend( o ); + } ); + newCatParentOption.attr( 'selected', 'selected' ); + } ); + }; + + $('#categorychecklist').wpList( { + alt: '', + response: 'category-ajax-response', + addBefore: catAddBefore, + addAfter: catAddAfter + } ); + + $('#category-add-toggle').click( function() { + $('#category-adder').toggleClass( 'wp-hidden-children' ); + $('#category-tabs a[href="#categories-all"]').click(); + return false; + } ); + + $('.categorychecklist .popular-category :checkbox').change( syncChecks ).filter( ':checked' ).change(), sticky = ''; + + function updateVisibility() { + if ( $('#post-visibility-select input:radio:checked').val() != 'public' ) { + $('#sticky').attr('checked', false); + $('#sticky-span').hide(); + } else { + $('#sticky-span').show(); + } + if ( $('#post-visibility-select input:radio:checked').val() != 'password' ) { + $('#password-span').hide(); + } else { + $('#password-span').show(); + } + } + + function updateText() { + var attemptedDate, originalDate, currentDate, publishOn; + + attemptedDate = new Date( $('#aa').val(), $('#mm').val() -1, $('#jj').val(), $('#hh').val(), $('#mn').val()); + 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 > 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; + $('#publish').val( postL10n.update ); + } + if ( originalDate.toUTCString() == attemptedDate.toUTCString() ) { //hack + $('#timestamp').html(stamp); + } else { + $('#timestamp').html( + publishOn + ' ' + + $( '#mm option[value=' + $('#mm').val() + ']' ).text() + ' ' + + $('#jj').val() + ', ' + + $('#aa').val() + ' @ ' + + $('#hh').val() + ':' + + $('#mn').val() + ' ' + ); + } + + if ( $('#post-visibility-select input:radio:checked').val() == 'private' ) { + $('#publish').val( postL10n.update ); + if ( $('#post_status option[value=publish]').length == 0 ) { + $('#post_status').append(''); + } + $('#post_status option[value=publish]').html( postL10n.privatelyPublished ); + $('#post_status option[value=publish]').attr('selected', true); + $('.edit-post-status').hide(); + } else { + if ( $('#original_post_status').val() == 'future' || $('#original_post_status').val() == 'draft' ) { + if ( $('#post_status option[value=publish]').length != 0 ) { + $('#post_status option[value=publish]').remove(); + $('#post_status').val($('#hidden_post_status').val()); + } + } else { + $('#post_status option[value=publish]').html( postL10n.published ); + } + $('.edit-post-status').show(); + } + $('#post-status-display').html($('#post_status :selected').text()); + if ( $('#post_status :selected').val() == 'private' || $('#post_status :selected').val() == 'publish' ) { + $('#save-post').hide(); + } else { + $('#save-post').show(); + if ( $('#post_status :selected').val() == 'pending' ) { + $('#save-post').show().val( postL10n.savePending ); + } else { + $('#save-post').show().val( postL10n.saveDraft ); + } + } + } + + $('.edit-visibility').click(function () { + if ($('#post-visibility-select').is(":hidden")) { + updateVisibility(); + $('#post-visibility-select').slideDown("normal"); + $('.edit-visibility').hide(); + } + return false; + }); + + $('.cancel-post-visibility').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').show(); + updateText(); + return false; + }); + + $('.save-post-visibility').click(function () { // crazyhorse - multiple ok cancels + $('#post-visibility-select').slideUp("normal"); + $('.edit-visibility').show(); + updateText(); + if ( $('#post-visibility-select input:radio:checked').val() != 'public' ) { + $('#sticky').attr('checked', false); + } + + if ( true == $('#sticky').attr('checked') ) { + sticky = 'Sticky'; + } else { + sticky = ''; + } + + $('#post-visibility-display').html( + postL10n[$('#post-visibility-select input:radio:checked').val() + sticky] + ); + + return false; + }); + + $('#post-visibility-select input:radio').change(function() { + updateVisibility(); + }); + + $('.edit-timestamp').click(function () { + if ($('#timestampdiv').is(":hidden")) { + $('#timestampdiv').slideDown("normal"); + $('.edit-timestamp').hide(); + } + + return false; + }); + + $('.cancel-timestamp').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()); + $('.edit-timestamp').show(); + updateText(); + return false; + }); + + $('.save-timestamp').click(function () { // crazyhorse - multiple ok cancels + $('#timestampdiv').slideUp("normal"); + $('.edit-timestamp').show(); + updateText(); + + return false; + }); + + $('.edit-post-status').click(function() { + if ($('#post-status-select').is(":hidden")) { + $('#post-status-select').slideDown("normal"); + $(this).hide(); + } + + return false; + }); + + $('.save-post-status').click(function() { + $('#post-status-select').slideUp("normal"); + $('.edit-post-status').show(); + updateText(); + return false; + }); + + $('.cancel-post-status').click(function() { + $('#post-status-select').slideUp("normal"); + $('#post_status').val($('#hidden_post_status').val()); + $('.edit-post-status').show(); + updateText(); + return false; + }); + + // Custom Fields + $('#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; + } + }); +}); diff -r 000000000000 -r 03b0d1493584 web/wp-admin/js/post.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/js/post.js Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,1 @@ +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 new_tag_remove_tag(){var e=jQuery(this).attr("id"),a=e.split("-check-num-")[1],c=jQuery(this).parents(".tagsdiv"),b=c.find(".the-tags").val().split(","),d=[];delete b[a];jQuery.each(b,function(f,g){g=jQuery.trim(g);if(g){d.push(g)}});c.find(".the-tags").val(d.join(",").replace(/\s*,+\s*/,",").replace(/,+/,",").replace(/,+\s+,+/,",").replace(/,+\s*$/,"").replace(/^\s*,+/,""));tag_update_quickclicks(c);return false}function tag_update_quickclicks(b){if(jQuery(b).find(".the-tags").length==0){return}var a=jQuery(b).find(".the-tags").val().split(",");jQuery(b).find(".tagchecklist").empty();shown=false;jQuery.each(a,function(e,f){var c,d;f=jQuery.trim(f);if(!f.match(/^\s+$/)&&""!=f){d=jQuery(b).attr("id")+"-check-num-"+e;c='X '+f+" ";jQuery(b).find(".tagchecklist").append(c);jQuery("#"+d).click(new_tag_remove_tag)}});if(shown){jQuery(b).find(".tagchecklist").prepend(""+postL10n.tagsUsed+"
    ")}}function tag_flush_to_text(g,b){b=b||false;var e,f,c,d;e=jQuery("#"+g);f=b?jQuery(b).text():e.find("input.newtag").val();if(e.find("input.newtag").hasClass("form-input-tip")&&!b){return false}c=e.find(".the-tags").val();d=c?c+","+f:f;d=d.replace(/\s+,+\s*/g,",").replace(/,+/g,",").replace(/,+\s+,+/g,",").replace(/,+\s*$/g,"").replace(/^\s*,+/g,"");d=array_unique_noempty(d.split(",")).join(",");e.find(".the-tags").val(d);tag_update_quickclicks(e);if(!b){e.find("input.newtag").val("").focus()}return false}function tag_save_on_publish(){jQuery(".tagsdiv").each(function(a){if(!jQuery(this).find("input.newtag").hasClass("form-input-tip")){tag_flush_to_text(jQuery(this).parents(".tagsdiv").attr("id"))}})}function tag_press_key(a){if(13==a.which){tag_flush_to_text(jQuery(a.target).parents(".tagsdiv").attr("id"));return false}}function tag_init(){jQuery(".ajaxtag").show();jQuery(".tagsdiv").each(function(a){tag_update_quickclicks(this)});jQuery(".ajaxtag input.tagadd").click(function(){tag_flush_to_text(jQuery(this).parents(".tagsdiv").attr("id"))});jQuery(".ajaxtag input.newtag").focus(function(){if(!this.cleared){this.cleared=true;jQuery(this).val("").removeClass("form-input-tip")}});jQuery(".ajaxtag input.newtag").blur(function(){if(this.value==""){this.cleared=false;jQuery(this).val(postL10n.addTag).addClass("form-input-tip")}});jQuery("#publish").click(tag_save_on_publish);jQuery("#save-post").click(tag_save_on_publish);jQuery(".ajaxtag input.newtag").keypress(tag_press_key)}var commentsBox,tagCloud;(function(a){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}};tagCloud={init:function(){a(".tagcloud-link").click(function(){tagCloud.get(a(this).attr("id"));a(this).unbind().click(function(){a(this).siblings(".the-tagcloud").toggle();return false});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(){var f=a(this).parents("p").attr("id");tag_flush_to_text(f.substr(f.indexOf("-")+1),this);return false});a("#"+c).after(e)})}};a(document).ready(function(){tagCloud.init()})})(jQuery);jQuery(document).ready(function(g){var d=false,i,e,a=g("#timestamp").html(),b=g("#post-visibility-display").html(),h="";postboxes.add_postbox_toggles("post");make_slugedit_clickable();tag_init();g("#title").blur(function(){if((g("#post_ID").val()>0)||(g("#title").val().length==0)){return}if(typeof(autosave)!="undefined"){autosave()}});g(".newtag").each(function(){var j=g(this).parents("div.tagsdiv").attr("id");g(this).suggest("admin-ajax.php?action=ajax-tag-search&tax="+j,{delay:500,minchars:2,multiple:true,multipleSep:", "})});g("#category-tabs a").click(function(){var j=g(this).attr("href");g(this).parent().addClass("tabs").siblings("li").removeClass("tabs");g(".tabs-panel").hide();g(j).show();if("#categories-all"==j){deleteUserSetting("cats")}else{setUserSetting("cats","pop")}return false});if(getUserSetting("cats")){g('#category-tabs a[href="#categories-pop"]').click()}g("#newcat").one("focus",function(){g(this).val("").removeClass("form-input-tip")});g("#category-add-sumbit").click(function(){g("#newcat").focus()});i=function(){if(d){return}d=true;var j=jQuery(this),l=j.is(":checked"),k=j.val().toString();g("#in-category-"+k+", #in-popular-category-"+k).attr("checked",l);d=false};popularCats=g("#categorychecklist-pop :checkbox").map(function(){return parseInt(jQuery(this).val(),10)}).get().join(",");catAddBefore=function(j){if(!g("#newcat").val()){return false}j.data+="&popular_ids="+popularCats+"&"+jQuery("#categorychecklist :checked").serialize();return j};e=function(m,k){var j=jQuery("#newcat_parent"),l=j.find('option[value="-1"]');g(k.what+" response_data",m).each(function(){var n=g(g(this).text());n.find("label").each(function(){var q=g(this),s=q.find("input").val(),t=q.find("input")[0].id,p,r;g("#"+t).change(i).change();if(j.find('option[value="'+s+'"]').size()){return}p=g.trim(q.text());r=g('').text(p);j.prepend(r)});l.attr("selected","selected")})};g("#categorychecklist").wpList({alt:"",response:"category-ajax-response",addBefore:catAddBefore,addAfter:e});g("#category-add-toggle").click(function(){g("#category-adder").toggleClass("wp-hidden-children");g('#category-tabs a[href="#categories-all"]').click();return false});g(".categorychecklist .popular-category :checkbox").change(i).filter(":checked").change(),h="";function f(){if(g("#post-visibility-select input:radio:checked").val()!="public"){g("#sticky").attr("checked",false);g("#sticky-span").hide()}else{g("#sticky-span").show()}if(g("#post-visibility-select input:radio:checked").val()!="password"){g("#password-span").hide()}else{g("#password-span").show()}}function c(){var j,l,k,m;j=new Date(g("#aa").val(),g("#mm").val()-1,g("#jj").val(),g("#hh").val(),g("#mn").val());l=new Date(g("#hidden_aa").val(),g("#hidden_mm").val()-1,g("#hidden_jj").val(),g("#hidden_hh").val(),g("#hidden_mn").val());k=new Date(g("#cur_aa").val(),g("#cur_mm").val()-1,g("#cur_jj").val(),g("#cur_hh").val(),g("#cur_mn").val());if(j>k&&g("#original_post_status").val()!="future"){m=postL10n.publishOnFuture;g("#publish").val(postL10n.schedule)}else{if(j<=k&&g("#original_post_status").val()!="publish"){m=postL10n.publishOn;g("#publish").val(postL10n.publish)}else{m=postL10n.publishOnPast;g("#publish").val(postL10n.update)}}if(l.toUTCString()==j.toUTCString()){g("#timestamp").html(a)}else{g("#timestamp").html(m+" "+g("#mm option[value="+g("#mm").val()+"]").text()+" "+g("#jj").val()+", "+g("#aa").val()+" @ "+g("#hh").val()+":"+g("#mn").val()+" ")}if(g("#post-visibility-select input:radio:checked").val()=="private"){g("#publish").val(postL10n.update);if(g("#post_status option[value=publish]").length==0){g("#post_status").append('")}g("#post_status option[value=publish]").html(postL10n.privatelyPublished);g("#post_status option[value=publish]").attr("selected",true);g(".edit-post-status").hide()}else{if(g("#original_post_status").val()=="future"||g("#original_post_status").val()=="draft"){if(g("#post_status option[value=publish]").length!=0){g("#post_status option[value=publish]").remove();g("#post_status").val(g("#hidden_post_status").val())}}else{g("#post_status option[value=publish]").html(postL10n.published)}g(".edit-post-status").show()}g("#post-status-display").html(g("#post_status :selected").text());if(g("#post_status :selected").val()=="private"||g("#post_status :selected").val()=="publish"){g("#save-post").hide()}else{g("#save-post").show();if(g("#post_status :selected").val()=="pending"){g("#save-post").show().val(postL10n.savePending)}else{g("#save-post").show().val(postL10n.saveDraft)}}}g(".edit-visibility").click(function(){if(g("#post-visibility-select").is(":hidden")){f();g("#post-visibility-select").slideDown("normal");g(".edit-visibility").hide()}return false});g(".cancel-post-visibility").click(function(){g("#post-visibility-select").slideUp("normal");g("#visibility-radio-"+g("#hidden-post-visibility").val()).attr("checked",true);g("#post_password").val(g("#hidden_post_password").val());g("#sticky").attr("checked",g("#hidden-post-sticky").attr("checked"));g("#post-visibility-display").html(b);g(".edit-visibility").show();c();return false});g(".save-post-visibility").click(function(){g("#post-visibility-select").slideUp("normal");g(".edit-visibility").show();c();if(g("#post-visibility-select input:radio:checked").val()!="public"){g("#sticky").attr("checked",false)}if(true==g("#sticky").attr("checked")){h="Sticky"}else{h=""}g("#post-visibility-display").html(postL10n[g("#post-visibility-select input:radio:checked").val()+h]);return false});g("#post-visibility-select input:radio").change(function(){f()});g(".edit-timestamp").click(function(){if(g("#timestampdiv").is(":hidden")){g("#timestampdiv").slideDown("normal");g(".edit-timestamp").hide()}return false});g(".cancel-timestamp").click(function(){g("#timestampdiv").slideUp("normal");g("#mm").val(g("#hidden_mm").val());g("#jj").val(g("#hidden_jj").val());g("#aa").val(g("#hidden_aa").val());g("#hh").val(g("#hidden_hh").val());g("#mn").val(g("#hidden_mn").val());g(".edit-timestamp").show();c();return false});g(".save-timestamp").click(function(){g("#timestampdiv").slideUp("normal");g(".edit-timestamp").show();c();return false});g(".edit-post-status").click(function(){if(g("#post-status-select").is(":hidden")){g("#post-status-select").slideDown("normal");g(this).hide()}return false});g(".save-post-status").click(function(){g("#post-status-select").slideUp("normal");g(".edit-post-status").show();c();return false});g(".cancel-post-status").click(function(){g("#post-status-select").slideUp("normal");g("#post_status").val(g("#hidden_post_status").val());g(".edit-post-status").show();c();return false});g("#the-list").wpList({addAfter:function(j,k){g("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="+g("#post_ID").val();return j}})}); \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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(postboxL10n.requestFile, { + 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( postboxL10n.requestFile, postVars ); + }, + + /* Callbacks */ + pbshow : false, + + pbhide : false + }; + +}(jQuery)); diff -r 000000000000 -r 03b0d1493584 web/wp-admin/js/postbox.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/js/postbox.js Wed Dec 23 17:55:33 2009 +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(postboxL10n.requestFile,{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(postboxL10n.requestFile,b)},pbshow:false,pbhide:false}}(jQuery)); \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 web/wp-admin/js/slug.dev.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/js/slug.dev.js Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,44 @@ +function edit_permalink(post_id) { + var i, c = 0, e = jQuery('#editable-post-name'), revert_e = e.html(), real_slug = jQuery('#post_name'), revert_slug = real_slug.html(), b = jQuery('#edit-slug-buttons'), revert_b = b.html(), full = jQuery('#editable-post-name-full').html(); + + jQuery('#view-post-btn').hide(); + b.html(''+slugL10n.save+' '+slugL10n.cancel+''); + b.children('.save').click(function() { + var new_slug = e.children('input').val(); + jQuery.post(slugL10n.requestFile, { + action: 'sample-permalink', + post_id: post_id, + new_slug: new_slug, + new_title: jQuery('#title').val(), + samplepermalinknonce: jQuery('#samplepermalinknonce').val()}, function(data) { + jQuery('#edit-slug-box').html(data); + b.html(revert_b); + real_slug.attr('value', new_slug); + make_slugedit_clickable(); + jQuery('#view-post-btn').show(); + }); + return false; + }); + jQuery('#edit-slug-buttons .cancel').click(function() { + jQuery('#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.charCode ? e.charCode : e.keyCode ? 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(); +} + +function make_slugedit_clickable() { + jQuery('#editable-post-name').click(function() {jQuery('#edit-slug-buttons').children('.edit-slug').click()}); +} + diff -r 000000000000 -r 03b0d1493584 web/wp-admin/js/slug.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/js/slug.js Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,1 @@ +function edit_permalink(a){var d,h=0,g=jQuery("#editable-post-name"),j=g.html(),m=jQuery("#post_name"),n=m.html(),k=jQuery("#edit-slug-buttons"),l=k.html(),f=jQuery("#editable-post-name-full").html();jQuery("#view-post-btn").hide();k.html(''+slugL10n.save+' '+slugL10n.cancel+"");k.children(".save").click(function(){var b=g.children("input").val();jQuery.post(slugL10n.requestFile,{action:"sample-permalink",post_id:a,new_slug:b,new_title:jQuery("#title").val(),samplepermalinknonce:jQuery("#samplepermalinknonce").val()},function(c){jQuery("#edit-slug-box").html(c);k.html(l);m.attr("value",b);make_slugedit_clickable();jQuery("#view-post-btn").show()});return false});jQuery("#edit-slug-buttons .cancel").click(function(){jQuery("#view-post-btn").show();g.html(j);k.html(l);m.attr("value",n);return false});for(d=0;df.length/4)?"":f;g.html('').children("input").keypress(function(c){var b=c.charCode?c.charCode:c.keyCode?c.keyCode:0;if(13==b){k.children(".save").click();return false}if(27==b){k.children(".cancel").click();return false}m.attr("value",this.value)}).focus()}function make_slugedit_clickable(){jQuery("#editable-post-name").click(function(){jQuery("#edit-slug-buttons").children(".edit-slug").click()})}; \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,37 @@ +jQuery(document).ready(function($) { + var options = false, addAfter, addAfter2, delBefore, delAfter; + + addAfter = function( r, settings ) { + var name = $("" + $('name', r).text() + "").html(), id = $('tag', r).attr('id'); + options[options.length] = new Option(name, id); + } + + addAfter2 = function( x, r ) { + var t = $(r.parsed.responses[0].data); + if ( t.length == 1 ) + inlineEditTax.addEvents($(t.id)); + } + + delAfter = function( r, settings ) { + var id = $('tag', r).attr('id'), o; + for ( o = 0; o < options.length; o++ ) + if ( id == options[o].value ) + options[o] = null; + } + + delBefore = function(s) { + s.data.taxonomy = $('input[name="taxonomy"]').val(); + + 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({ addAfter: addAfter2, delBefore: delBefore }); + + $('.delete a[class^="delete"]').click(function(){return false;}); +}); \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-admin/js/tags.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/js/tags.js Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,1 @@ +jQuery(document).ready(function(d){var b=false,f,e,c,a;f=function(i,h){var g=d(""+d("name",i).text()+"").html(),j=d("tag",i).attr("id");b[b.length]=new Option(g,j)};e=function(g,i){var h=d(i.parsed.responses[0].data);if(h.length==1){inlineEditTax.addEvents(d(h.id))}};a=function(h,g){var j=d("tag",h).attr("id"),i;for(i=0;i' + 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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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]+>/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.addEvents(ui.item); + 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'); + } + }).not(':visible').sortable('disable'); + wpWidgets.resize(); + wpWidgets.fixLabels(); + }, + + saveOrder : function(sb) { + if ( sb ) + $('#' + sb).parents('.widgets-holder-wrap').find('.ajax-feedback').css('visibility', 'visible'); + + var a = { + action: 'widgets-order', + savewidgets: $('#_wpnonce_widgets').val(), + sidebars: [] + }; + + $('.widgets-sortables').each( function() { + a['sidebars[' + $(this).attr('id') + ']'] = $(this).sortable('toArray').join(','); + }); + + $.post( ajaxurl, a, function() { + $('.ajax-feedback').css('visibility', 'hidden'); + }); + this.resize(); + }, + + save : function(widget, del, animate, order) { + var sb = widget.parents('.widgets-sortables').attr('id'), data = widget.find('form').serialize(), a; + widget = $(widget); + widget.find('.ajax-feedback').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 ( !$('.widget_number', widget).val() ) { + id = $('.widget-id', widget).val(); + $('#available-widgets .widget-id').each(function(){ + if ( $(this).val() == id ) + $(this).parents('.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 ) { + $('.widget-content', widget).html(r); + wpWidgets.appendTitle(widget); + wpWidgets.fixLabels(widget); + } + } + if ( order ) + wpWidgets.saveOrder(); + }); + }, + + appendTitle : function(widget) { + $('input[type="text"]', widget).each(function(){ + var title; + if ( this.id.indexOf('title') != -1 ) { + title = $(this).val().replace(/<[^<>]+>/g, '').replace(//g, '>'); + if ( title ) + $('.widget-title .in-widget-title', widget).html(': ' + title); + return false; + } + }); + }, + + resize : function() { + $('.widgets-sortables').not('#wp_inactive_widgets').each(function(){ + var h = 50, H = $('.widget', this).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(sc) { + sc = sc || document; + + $('.widget-inside label', sc).each(function(){ + var f = $(this).attr('for'); + + if ( f && f == $('input', this).attr('id') ) + $(this).removeAttr('for'); + }); + }, + + close : function(widget) { + widget.find('.widget-inside').slideUp('fast', function(){ + widget.css({'width':'','marginLeft':''}); + }); + }, + + addEvents : function(sc) { + sc = sc || document; + $('a.widget-action', sc).click(function(){ + var w = parseInt( $(this).parents('.widget').find('.widget-width').val(), 10 ), css = {}, inside = $(this).parents('.widget-top').siblings('.widget-inside'); + if ( inside.is(':hidden') ) { + if ( w > 250 && inside.parents('.widgets-sortables').length ) { + css['width'] = w + 30 + 'px'; + if ( inside.parents('.widget-liquid-right').length ) + css['marginLeft'] = 235 - w + 'px'; + inside.parents('.widget').css(css); + } + inside.slideDown('fast'); + } else { + inside.slideUp('fast', function(){ inside.parents('.widget').css({'width':'','marginLeft':''}); }); + } + return false; + }); + $('.widget-control-save', sc).click(function(){ + wpWidgets.save( $(this).parents('.widget'), 0, 1, 0 ); + return false; + }); + $('.widget-control-remove', sc).click(function(){ + wpWidgets.save( $(this).parents('.widget'), 1, 1, 0 ); + return false; + }); + $('.widget-control-close', sc).click(function(){ + wpWidgets.close( $(this).parents('.widget') ); + return false; + }); + } +}; +$(document).ready(function(){wpWidgets.init();}); + +})(jQuery); diff -r 000000000000 -r 03b0d1493584 web/wp-admin/js/widgets.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/js/widgets.js Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,1 @@ +var wpWidgets;(function(a){wpWidgets={init:function(){var b;if(a("body").hasClass("widgets_access")){return}a("#widgets-right div.sidebar-name").click(function(){var d=a(this).siblings(".widgets-sortables");if(d.is(":visible")){d.sortable("disable");a(this).parent().addClass("closed")}else{a(this).parent().removeClass("closed");d.sortable("enable").sortable("refresh")}});a("#widgets-left div.sidebar-name").click(function(){if(a(this).siblings(".widget-holder").is(":visible")){a(this).parent().addClass("closed")}else{a(this).parent().removeClass("closed")}});a("#widgets-right .widget, #wp_inactive_widgets .widget").each(function(){wpWidgets.appendTitle(this)});this.addEvents();a(".widget-error").parents(".widget").find("a.widget-action").click();a("#available-widgets").droppable({tolerance:"pointer",accept:function(c){return a(c).parent().attr("id")!="widget-list"},drop:function(d,c){c.draggable.addClass("deleting");a("#removing-widget").hide().children("span").html("")},over:function(d,c){c.draggable.addClass("deleting");a(".widget-placeholder").hide();if(c.draggable.hasClass("ui-sortable-helper")){a("#removing-widget").show().children("span").html(c.draggable.find(".widget-title h4").html())}},out:function(d,c){c.draggable.removeClass("deleting");a(".widget-placeholder").show();a("#removing-widget").hide().children("span").html("")}});a("#widget-list .widget").draggable({connectToSortable:".widgets-sortables",handle:".widget-title",distance:2,helper:"clone",zIndex:5,containment:"document",start:function(d,c){wpWidgets.fixWebkit(1);c.helper.find(".widget-description").hide()},stop:function(d,c){if(b){a(b).hide()}b="";wpWidgets.fixWebkit()}});a(".widgets-sortables").sortable({placeholder:"widget-placeholder",connectWith:".widgets-sortables",items:".widget",handle:".widget-title",cursor:"move",distance:2,containment:"document",start:function(d,c){wpWidgets.fixWebkit(1);c.item.find(".widget-inside").hide();c.item.css({marginLeft:"",width:""})},stop:function(f,c){if(c.item.hasClass("ui-draggable")){c.item.draggable("destroy")}if(c.item.hasClass("deleting")){wpWidgets.save(c.item,1,0,1);c.item.remove();return}var d=c.item.find("input.add_new").val(),i=c.item.find("input.multi_number").val(),h=c.item.attr("id"),g=a(this).attr("id");c.item.css({marginLeft:"",width:""});wpWidgets.fixWebkit();if(d){if("multi"==d){c.item.html(c.item.html().replace(/<[^<>]+>/g,function(e){return e.replace(/__i__|%i%/g,i)}));c.item.attr("id",h.replace(/__i__|%i%/g,i));i++;a("div#"+h).find("input.multi_number").val(i)}else{if("single"==d){c.item.attr("id","new-"+h);b="div#"+h}}wpWidgets.addEvents(c.item);wpWidgets.save(c.item,0,0,1);c.item.find("input.add_new").val("");c.item.find("a.widget-action").click();return}wpWidgets.saveOrder(g)},receive:function(d,c){if(!a(this).is(":visible")){a(this).sortable("cancel")}}}).not(":visible").sortable("disable");wpWidgets.resize();wpWidgets.fixLabels()},saveOrder:function(c){if(c){a("#"+c).parents(".widgets-holder-wrap").find(".ajax-feedback").css("visibility","visible")}var b={action:"widgets-order",savewidgets:a("#_wpnonce_widgets").val(),sidebars:[]};a(".widgets-sortables").each(function(){b["sidebars["+a(this).attr("id")+"]"]=a(this).sortable("toArray").join(",")});a.post(ajaxurl,b,function(){a(".ajax-feedback").css("visibility","hidden")});this.resize()},save:function(g,d,e,b){var h=g.parents(".widgets-sortables").attr("id"),f=g.find("form").serialize(),c;g=a(g);g.find(".ajax-feedback").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(".widget_number",g).val()){j=a(".widget-id",g).val();a("#available-widgets .widget-id").each(function(){if(a(this).val()==j){a(this).parents(".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(".widget-content",g).html(i);wpWidgets.appendTitle(g);wpWidgets.fixLabels(g)}}if(b){wpWidgets.saveOrder()}})},appendTitle:function(b){a('input[type="text"]',b).each(function(){var c;if(this.id.indexOf("title")!=-1){c=a(this).val().replace(/<[^<>]+>/g,"").replace(//g,">");if(c){a(".widget-title .in-widget-title",b).html(": "+c)}return false}})},resize:function(){a(".widgets-sortables").not("#wp_inactive_widgets").each(function(){var c=50,b=a(".widget",this).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=b||document;a(".widget-inside label",b).each(function(){var c=a(this).attr("for");if(c&&c==a("input",this).attr("id")){a(this).removeAttr("for")}})},close:function(b){b.find(".widget-inside").slideUp("fast",function(){b.css({width:"",marginLeft:""})})},addEvents:function(b){b=b||document;a("a.widget-action",b).click(function(){var d=parseInt(a(this).parents(".widget").find(".widget-width").val(),10),e={},c=a(this).parents(".widget-top").siblings(".widget-inside");if(c.is(":hidden")){if(d>250&&c.parents(".widgets-sortables").length){e.width=d+30+"px";if(c.parents(".widget-liquid-right").length){e.marginLeft=235-d+"px"}c.parents(".widget").css(e)}c.slideDown("fast")}else{c.slideUp("fast",function(){c.parents(".widget").css({width:"",marginLeft:""})})}return false});a(".widget-control-save",b).click(function(){wpWidgets.save(a(this).parents(".widget"),0,1,0);return false});a(".widget-control-remove",b).click(function(){wpWidgets.save(a(this).parents(".widget"),1,1,0);return false});a(".widget-control-close",b).click(function(){wpWidgets.close(a(this).parents(".widget"));return false})}};a(document).ready(function(){wpWidgets.init()})})(jQuery); \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,96 @@ + +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 = window.location.protocol + window.location.host; + + name = name.replace(/[\/\\:*"?<>|;,]+/g, '_'); // gears beta doesn't allow certain chars in the store name + 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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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=window.location.protocol+window.location.host;a=a.replace(/[\/\\:*"?<>|;,]+/g,"_");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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 web/wp-admin/js/xfn.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/js/xfn.js Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 web/wp-admin/link-category.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/link-category.php Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 web/wp-admin/link-manager.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/link-manager.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,277 @@ + + +
    + +

    ' . __('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 000000000000 -r 03b0d1493584 web/wp-admin/link.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/link.php Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 web/wp-admin/load-scripts.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/load-scripts.php Wed Dec 23 17:55:33 2009 +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') ) { + 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 000000000000 -r 03b0d1493584 web/wp-admin/load-styles.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/load-styles.php Wed Dec 23 17:55:33 2009 +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') ) { + 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 000000000000 -r 03b0d1493584 web/wp-admin/media-new.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/media-new.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,14 @@ + \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-admin/media-upload.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/media-upload.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,110 @@ + +
    + +

    + +
    + + + + + + +
    +

    + +

    +
    +
    + + diff -r 000000000000 -r 03b0d1493584 web/wp-admin/media.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/media.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,119 @@ +

    $message

    \n"; + +?> + +
    + +

    + +
    +
    +
    + false, 'send' => false, 'delete' => false, 'show_title' => false, 'errors' => $errors ) ); ?> +
    +
    + +

    + + + + + + +

    +
    + +
    + + diff -r 000000000000 -r 03b0d1493584 web/wp-admin/menu-header.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/menu-header.php Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 web/wp-admin/menu.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/menu.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,312 @@ +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(__('Add New'), '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 submenu is empty... + if ( empty($submenu[$data[2]]) ) { + // And user doesn't have privs, remove menu. + if ( ! current_user_can($data[1]) ) { + $_wp_menu_nopriv[$data[2]] = true; + 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 000000000000 -r 03b0d1493584 web/wp-admin/moderation.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/moderation.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,12 @@ + diff -r 000000000000 -r 03b0d1493584 web/wp-admin/options-discussion.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/options-discussion.php Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 web/wp-admin/options-general.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/options-general.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,283 @@ + + + + +
    + +

    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + += 0) ? '+' : '') . $offnum; +} +?> + + + + + + + + + + + + + + + + + + +
    +
    " />
    " /> +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 000000000000 -r 03b0d1493584 web/wp-admin/options-head.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/options-head.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,17 @@ + + + +

    + \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-admin/options-media.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/options-media.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,78 @@ + + +
    + +

    + +
    + + +

    +

    + + + + + + + + + + + + + + + + + + +
    + + + +
    +/> + +
    + + + + +
    + + + + +
    + + + +

    + +

    + +
    + +
    + + diff -r 000000000000 -r 03b0d1493584 web/wp-admin/options-misc.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/options-misc.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,79 @@ + + +
    + +

    + +
    + + +

    + + + + + + + + + + + + + + + +
    +wp-content/uploads'); ?> +
    + +
    + +
    + + + + + + + + +
    + +
    + + + +

    + +

    + +
    +
    + + diff -r 000000000000 -r 03b0d1493584 web/wp-admin/options-permalink.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/options-permalink.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,248 @@ + + +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.') ?>

    + + +

    .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 000000000000 -r 03b0d1493584 web/wp-admin/options-privacy.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/options-privacy.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,51 @@ + + +
    + +

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

    /> +

    +

    /> +

    + +
    + + + +

    + +

    +
    + +
    + + diff -r 000000000000 -r 03b0d1493584 web/wp-admin/options-reading.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/options-reading.php Wed Dec 23 17:55:33 2009 +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!'); ?> +

    +
    + +
    + +
    +


    +

    +
    +recommended)') ?>
    + + + +

    + +

    +
    +
    + diff -r 000000000000 -r 03b0d1493584 web/wp-admin/options-writing.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/options-writing.php Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 web/wp-admin/options.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/options.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,143 @@ + 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' ), + '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']; + } + + 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 000000000000 -r 03b0d1493584 web/wp-admin/page-new.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/page-new.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,31 @@ + diff -r 000000000000 -r 03b0d1493584 web/wp-admin/page.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/page.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,179 @@ +ID) ) wp_die( __('You attempted to edit a page that doesn’t exist. Perhaps it was deleted?') ); + + if ( 'page' != $post->post_type ) { + wp_redirect( get_edit_post_link( $post_ID, 'url' ) ); + exit(); + } + + wp_enqueue_script('page'); + if ( user_can_richedit() ) + wp_enqueue_script('editor'); + add_thickbox(); + wp_enqueue_script('media-upload'); + wp_enqueue_script('word-count'); + + if ( current_user_can('edit_page', $page_ID) ) { + 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'); + } + } + + if ( !current_user_can('edit_page', $page_ID) ) + die ( __('You are not allowed to edit this page.') ); + + 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 '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...') ); + } + + $sendback = wp_get_referer(); + if (strpos($sendback, 'page.php') !== false) $sendback = admin_url('edit-pages.php?deleted=1'); + elseif (strpos($sendback, 'attachments.php') !== false) $sendback = admin_url('attachments.php'); + else $sendback = add_query_arg('deleted', 1, $sendback); + wp_redirect($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 000000000000 -r 03b0d1493584 web/wp-admin/plugin-editor.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/plugin-editor.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,230 @@ +'.__('You do not have sufficient permissions to edit templates for this blog.').'

    '); + + $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")); + exit; + } + wp_redirect("plugin-editor.php?file=$file&a=te"); + } else { + wp_redirect("plugin-editor.php?file=$file"); + } + exit; + +break; + +default: + + if ( !current_user_can('edit_plugins') ) + wp_die('

    '.__('You do not have sufficient permissions to edit plugins for this blog.').'

    '); + + 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"); + 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 = (array) $_POST['checked']; + $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); + + error_reporting( E_ALL ^ E_NOTICE ); + @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 = (array) $_POST['checked']; + $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'); + + $plugins = (array) $_REQUEST['checked']; //$_POST = from the plugin form; $_GET = from the FTP details screen. + $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 = get_user_option('plugins_per_page'); +if ( empty($plugins_per_page) ) + $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 000000000000 -r 03b0d1493584 web/wp-admin/post-new.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/post-new.php Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 web/wp-admin/post.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/post.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,220 @@ +ID) ) wp_die( __('You attempted to edit a post that doesn’t exist. Perhaps it was deleted?') ); + + 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 ( current_user_can('edit_post', $post_ID) ) { + 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'); + + if ( !current_user_can('edit_post', $post_ID) ) + die ( __('You are not allowed to edit this 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 '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.') ); + + if ( $post->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...') ); + } + + $sendback = wp_get_referer(); + if (strpos($sendback, 'post.php') !== false) $sendback = admin_url('edit.php?deleted=1'); + elseif (strpos($sendback, 'attachments.php') !== false) $sendback = admin_url('attachments.php'); + else $sendback = add_query_arg('deleted', 1, $sendback); + wp_redirect($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 000000000000 -r 03b0d1493584 web/wp-admin/press-this.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/press-this.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,562 @@ + $image) + // see if files exist in content - we don't want to upload non-used selected files. + if( strpos($_REQUEST['content'], $image) !== false ) { + $desc = isset($_REQUEST['photo_description'][$key]) ? $_REQUEST['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($image, '/').'\\\?(\2)([^>\/]*)\/*>/is', $upload, $content); + } + + // set the post_content and status + $quick['post_status'] = isset($_REQUEST['publish']) ? 'publish' : 'draft'; + $quick['post_content'] = $content; + // error handling for $post + if ( is_wp_error($post_ID)) { + wp_die($id); + wp_delete_post($post_ID); + // error handling for media_sideload + } elseif ( is_wp_error($upload)) { + wp_die($upload); + wp_delete_post($post_ID); + } 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=(\"|\')([^<>]+?\.(png|jpeg|jpg|jpe|gif))[^<>\'\"]*(\2)([^>\/]*)\/*>/is'; + 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_url($src); + } + return "'" . implode("','", $sources) . "'"; + } + $url = urldecode($url); + $url = str_replace(' ', '%20', $url); + 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 = ""; + 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(document).ready(function() { + jQuery('#extra_fields').html('

    Photo ()

    '); + jQuery('.close').click(function() { + jQuery('#extra_fields').hide(); + jQuery('#extra_fields').html(''); + }); + jQuery('.refresh').click(function() { + show('photo'); + }); + jQuery('#img_container').html(strtoappend); + jQuery('#photo_add_url').attr('href', '?ajax=photo_thickbox_url&height=200&width=500'); + tb_init('#extra_fields .thickbox'); + + + }); + + + > + + + <?php _e('Press This') ?> + + + + + + + + + +
    +
    +
    +
    +

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

    +
    +

    + + + + +

    + + +

    +
    +
    + +
    +

    +
    + +
    +
      + +
    +
    + +
    + +

    + + 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 000000000000 -r 03b0d1493584 web/wp-admin/profile.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/profile.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,19 @@ + diff -r 000000000000 -r 03b0d1493584 web/wp-admin/revision.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/revision.php Wed Dec 23 17:55:33 2009 +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 ); + +?> + +
    + +wp-config-sample.php. Veuillez remettre en ligne ce fichier depuis votre archive WordPress.'); + +$configFile = file(ABSPATH . 'wp-config-sample.php'); + +if ( !is_writable(ABSPATH)) + wp_die("Je suis désolé, mais je ne peux pas écrire dans le répertoire. Il vous faut soit modifier les permissions de votre répertoire WordPress, soit créer votre fichier wp-config.php manuellement."); + +// Check if wp-config.php has been created +if (file_exists(ABSPATH . 'wp-config.php')) + wp_die("

    Le fichier 'wp-config.php' existe déjà. Si vous devez mettre à zéro les éléments de configuration de ce fichier, veuillez l'effacer avant de continuer. Vous pouvez lancer l'installateur maintenant.

    "); + +// 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("

    Le fichier 'wp-config.php' existe déjà dans un répertoire supérieur à votre installation de WordPress. Si vous avez besoin de réinitialiser un élément de configuration de ce fichier, merci de l'effacer d'abord. Vous maintenant procéder l'installation.

    "); + +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

    + + +

    Bienvenue dans WordPress. Avant de nous lancer, nous avons besoin de quelques informations à propos de la base de données. Il vous faudra connaître les points suivants pour aller plus loin.

    +
      +
    1. Le nom de la base de données
    2. +
    3. Votre identifiant de base de données
    4. +
    5. Votre mot de passe de base de données
    6. +
    7. L'hôte de la base de données
    8. +
    9. Le préfixe de table (si vous voulez installer plus d'un blog WordPress sur la même base de données)
    10. +
    +

    Si pour une raison quelconque la création automatique du fichier ne fonctionnait pas, ne paniquez pas : elle ne fait que remplir les informations de la base de données dans un fichier de configuration. Vous pouvez donc simplement ouvrir wp-config-sample.php dans un éditeur de texte, y entrer vos informations, et enregistrer le fichier sous le nouveau nom wp-config.php.

    +

    Normalement, ces informations vous ont été fournies par votre hébergeur. Si vous ne les avez pas, il vous faudra le contacter pour continuer. Si vous êtes prêt…

    + +

    Allons-y !

    + +
    +

    Entrez ci-dessous les détails de connexion à votre base de données. Si vous ne les connaissez pas avec certitude, contactez votre hébergeur.

    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Le nom de la base dans laquelle vous voulez installer WP.
    Votre identifiant MySQL.
    ...et votre mot de passe MySQL.
    Dans 99% des cas, vous n'aurez pas à modifier cette valeur.
    Si vous voulez installer plusieurs blogs WordPress dans une même base de données, modifiez ce champ.
    +

    +
    +error) ) + wp_die($wpdb->error->get_error_message()); + + $handle = fopen(ABSPATH . 'wp-config.php', 'w'); + + foreach ($configFile as $line_num => $line) { + switch (substr($line,0,16)) { + case "define('DB_NAME'": + fwrite($handle, str_replace("votre_nom_de_bdd", $dbname, $line)); + break; + case "define('DB_USER'": + fwrite($handle, str_replace("'votre_utilisateur_de_bdd'", "'$uname'", $line)); + break; + case "define('DB_PASSW": + fwrite($handle, str_replace("'votre_mdp_de_bdd'", "'$passwrd'", $line)); + break; + case "define('DB_HOST'": + fwrite($handle, str_replace("localhost", $dbhost, $line)); + break; + case '$table_prefix =': + fwrite($handle, str_replace('wp_', $prefix, $line)); + break; + default: + fwrite($handle, $line); + } + } + fclose($handle); + chmod(ABSPATH . 'wp-config.php', 0666); + + display_header(); +?> +

    Très bien, mon grand ! Nous sommes arrivés au terme de cette partie de l'installation. WordPress peut maintenant communiquer avec votre base de données. Si vous êtes prêt, il est grand temps de…

    + +

    Lancer l'installateur !

    + + + \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-admin/sidebar.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/sidebar.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,128 @@ + + + + +<?php bloginfo('name') ?> › <?php _e('Sidebar'); ?> + + + + +
    +
    + + + + + +

    ' . __('Post published.') . '

    '; +elseif ( 'c' == $_GET['a'] ) + echo '

    ' . __('Post saved.') . '

    '; +?> +

    + + +

    + +

    + + +

    + +
    + + +

    +
    + +

    + + + + +

    +
    + + + + diff -r 000000000000 -r 03b0d1493584 web/wp-admin/theme-editor.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/theme-editor.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,233 @@ +'.__('You do not have sufficient permissions to edit templates for this blog.').'

    '); + + $newcontent = stripslashes($_POST['newcontent']); + $theme = urlencode($theme); + if (is_writeable($real_file)) { + //is_writable() not always reliable, check return value. see comments @ http://uk.php.net/is_writable + $f = fopen($real_file, 'w+'); + if ($f !== FALSE) { + fwrite($f, $newcontent); + fclose($f); + $location = "theme-editor.php?file=$file&theme=$theme&a=te"; + } else { + $location = "theme-editor.php?file=$file&theme=$theme"; + } + } else { + $location = "theme-editor.php?file=$file&theme=$theme"; + } + + $location = wp_kses_no_null($location); + $strip = array('%0d', '%0a', '%0D', '%0A'); + $location = _deep_replace($strip, $location); + header("Location: $location"); + exit(); + +break; + +default: + + if ( !current_user_can('edit_themes') ) + wp_die('

    '.__('You do not have sufficient permissions to edit themes for this blog.').'

    '); + + require_once('admin-header.php'); + + update_recently_edited($file); + + if ( !is_file($real_file) ) + $error = 1; + + if ( !$error && filesize($real_file) > 0 ) { + $f = fopen($real_file, 'r'); + $content = fread($f, filesize($real_file)); + + if ( '.php' == substr( $real_file, strrpos( $real_file, '.' ) ) ) { + $functions = wp_doc_link_parse( $content ); + + $docs_select = ''; + } + + $content = htmlspecialchars( $content ); + $codepress_lang = codepress_get_lang($real_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( $template_file, $filedesc ); + } + } else { + $template_mapping[ $description ] = array( $template_file, $filedesc ); + } + } + ksort( $template_mapping ); + while ( list( $template_sorted_key, list( $template_file, $filedesc ) ) = each( $template_mapping ) ) : + ?> +
    • &theme=">
    • + +
    +

    +
      +($style_show)" : "$description"; + $filedesc = ( $style_file == $file ) ? "$description ($style_show)" : $filedesc; + $template_mapping[ $description ] = array( $style_file, $filedesc ); + } + ksort( $template_mapping ); + while ( list( $template_sorted_key, list( $style_file, $filedesc ) ) = each( $template_mapping ) ) : + ?> +
    • &theme=">
    • + +
    + +
    + + +
    + +
    + + + +
    + +
    + + + +
    + + +
    + +

    +"; +?> +

    + +

    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, $ct->template_dir, $ct->stylesheet_dir, $ct->title, $ct->parent_theme); ?>

    + +

    %2$s.'), $ct->title, $ct->template_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, $template_dir, $stylesheet_dir, $title, $parent_theme); ?>

    + +

    %2$s.'), $title, $template_dir, $stylesheet_dir); ?>

    + + +

    + + + +
    + +

    + +
    + + +
    +$page_links_text
    "; ?> +
    +
    + + +
    + + + +

    +

    + + + + + + + + + + "; + } +?> +
    $title$description
    + + + + diff -r 000000000000 -r 03b0d1493584 web/wp-admin/tools.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/tools.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,97 @@ + +
    +

    + +
    + +
    +

    +


    +

    +

    +

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

    +

    + +

    +

    +

    +
    + +
    + diff -r 000000000000 -r 03b0d1493584 web/wp-admin/update-core.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/update-core.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,237 @@ +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() { + $updates = get_core_updates(); +?> +
    + +

    +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(); + echo '
    '; +} + + +/** + * Upgrade WordPress core display. + * + * @since 2.7 + * + * @return null + */ +function do_core_upgrade( $reinstall = false ) { + global $wp_filesystem; + + if ( $reinstall ) + $url = 'update-core.php?action=do-core-reinstall'; + else + $url = 'update-core.php?action=do-core-upgrade'; + $url = wp_nonce_url($url, 'upgrade-core'); + if ( false === ($credentials = request_filesystem_credentials($url, '', false, ABSPATH)) ) + return; + + $version = isset( $_POST['version'] )? $_POST['version'] : false; + $locale = isset( $_POST['locale'] )? $_POST['locale'] : 'en_US'; + $update = find_core_update( $version, $locale ); + if ( !$update ) + return; + + + if ( ! WP_Filesystem($credentials, ABSPATH) ) { + request_filesystem_credentials($url, '', true, ABSPATH); //Failed to connect, Error and request again + return; + } +?> +
    + +

    +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') ); +} + +$action = isset($_GET['action']) ? $_GET['action'] : 'upgrade-core'; + +if ( 'upgrade-core' == $action ) { + wp_version_check(); + $title = __('Upgrade WordPress'); + $parent_file = 'tools.php'; + require_once('admin-header.php'); + core_upgrade_preamble(); + include('admin-footer.php'); +} elseif ( 'do-core-upgrade' == $action || 'do-core-reinstall' == $action ) { + check_admin_referer('upgrade-core'); + $title = __('Upgrade WordPress'); + $parent_file = 'tools.php'; + // 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); + include('admin-footer.php'); + +}?> diff -r 000000000000 -r 03b0d1493584 web/wp-admin/update-links.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/update-links.php Wed Dec 23 17:55:33 2009 +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); + $wdpdb->update( $wpdb->links, array('link_updated' => $time), array('link_url' => $uri) ); +} + +?> diff -r 000000000000 -r 03b0d1493584 web/wp-admin/update.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/update.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,193 @@ +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.') . '

    '; + error_reporting( E_ALL ^ E_NOTICE ); + @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 000000000000 -r 03b0d1493584 web/wp-admin/upgrade-functions.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/upgrade-functions.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,13 @@ + diff -r 000000000000 -r 03b0d1493584 web/wp-admin/upgrade.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/upgrade.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,95 @@ + + +> + + + <?php _e( 'WordPress › Upgrade' ); ?> + + + +

    WordPress

    + + + +

    +

    +

    + + +

    +

    +

    +

    + +

    +

    +

    + + + + + + diff -r 000000000000 -r 03b0d1493584 web/wp-admin/upload.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/upload.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,417 @@ +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( 'detached' => 1, 'attached' => $attached ) , $location ); + wp_redirect($location); + exit; + } + +} elseif ( isset($_GET['action']) && isset($_GET['media']) && ( -1 != $_GET['action'] || -1 != $_GET['action2'] ) ) { + check_admin_referer('bulk-media'); + $doaction = ( -1 != $_GET['action'] ) ? $_GET['action'] : $_GET['action2']; + + if ( 'delete' == $doaction ) { + foreach( (array) $_GET['media'] as $post_id_del ) { + $post_del = & get_post($post_id_del); + + if ( !current_user_can('delete_post', $post_id_del) ) + wp_die( __('You are not allowed to delete this post.') ); + + if ( $post_del->post_type == 'attachment' ) + if ( ! wp_delete_attachment($post_id_del) ) + wp_die( __('Error in deleting...') ); + } + + $location = 'upload.php'; + if ( $referer = wp_get_referer() ) { + if ( false !== strpos($referer, 'upload.php') ) + $location = $referer; + } + + $location = add_query_arg('message', 2, $location); + $location = remove_query_arg('posted', $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 = __('Media Library'); +$parent_file = 'upload.php'; + +if ( ! isset( $_GET['paged'] ) || $_GET['paged'] < 1 ) + $_GET['paged'] = 1; + +if ( isset($_GET['detached']) ) { + + if ( !empty($lost) ) { + $start = ( $_GET['paged'] - 1 ) * 50; + $page_links_total = ceil(count($lost) / 50); + $lost = implode(',', $lost); + + $orphans = $wpdb->get_results( "SELECT * FROM $wpdb->posts WHERE post_type = 'attachment' AND ID IN ($lost) LIMIT $start, 50" ); + } else { + $start = ( $_GET['paged'] - 1 ) * 25; + $orphans = $wpdb->get_results( "SELECT SQL_CALC_FOUND_ROWS * FROM $wpdb->posts WHERE post_type = 'attachment' AND post_parent < 1 LIMIT $start, 25" ); + $page_links_total = ceil($wpdb->get_var( "SELECT FOUND_ROWS()" ) / 25); + } + + $post_mime_types = array( + '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)')), + ); + $post_mime_types = apply_filters('post_mime_types', $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(); +} + +wp_enqueue_script('media'); +require_once('admin-header.php'); ?> + + + + + +
    + +

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

    + + +

    + + + + +
    + +
    + +
    +
    +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, array(80, 60), true ) ) { ?> + +
    + ID))); ?> + +
    + ID) ) + $actions['edit'] = '' . __('Edit') . ''; + if ( current_user_can('delete_post', $post->ID) ) + $actions['delete'] = "ID) . "' onclick=\"if ( confirm('" . esc_js(sprintf( ('draft' == $post->post_status) ? __("You are about to delete this attachment '%s'\n 'Cancel' to stop, 'OK' to delete.") : __("You are about to delete this attachment '%s'\n 'Cancel' to stop, 'OK' to delete."), $post->post_title )) . "') ) { return true;}return false;\">" . __('Delete') . ""; + $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'); ?>
    + + +

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

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

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

    +

    +
    +
    +

    +
    + + + +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 000000000000 -r 03b0d1493584 web/wp-admin/user-new.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/user-new.php Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 web/wp-admin/users.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/users.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,403 @@ +'; +} 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(); ?>
    + + +
    + + +
    + +
    +
    + + + +
    +
    + + 'user_login', 'first_name' => 'user_firstname', 'last_name' => 'user_lastname', 'email' => 'user_email', 'url' => 'user_uri', 'role' => 'user_role') as $formpost => $var ) { + $var = 'new_' . $var; + $$var = isset($_REQUEST[$formpost]) ? esc_attr(stripslashes($_REQUEST[$formpost])) : ''; + } + unset($name); +?> + +
    + diff -r 000000000000 -r 03b0d1493584 web/wp-admin/widgets.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-admin/widgets.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,392 @@ + __('Inactive Widgets'), + 'id' => 'wp_inactive_widgets', + '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; + } 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'); + +/** Post Template API */ +require_once(ABSPATH . WPINC . '/post-template.php'); + +/** Atom Publishing Protocol Class */ +require_once(ABSPATH . WPINC . '/atomlib.php'); + +/** Feed Handling API */ +require_once(ABSPATH . WPINC . '/feed.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); + } +} + +if ( !function_exists('wp_set_current_user') ) : +/** + * @ignore + */ +function wp_set_current_user($id, $name = '') { + global $current_user; + + if ( isset($current_user) && ($id == $current_user->ID) ) + return $current_user; + + $current_user = new WP_User($id, $name); + + return $current_user; +} +endif; + +/** + * 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()); + 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($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 000000000000 -r 03b0d1493584 web/wp-atom.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-atom.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,12 @@ + \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-blog-header.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-blog-header.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,20 @@ + \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-comments-post.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-comments-post.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,92 @@ +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', 'pending') ) ) { + do_action('comment_on_draft', $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 000000000000 -r 03b0d1493584 web/wp-commentsrss2.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-commentsrss2.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,12 @@ + \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-config-sample.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-config-sample.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,84 @@ + \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/languages/continents-cities-fr_FR.mo Binary file web/wp-content/languages/continents-cities-fr_FR.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/languages/continents-cities-fr_FR.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/languages/continents-cities-fr_FR.po Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,1968 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR WordPress +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: WordPress 2.8\n" +"Report-Msgid-Bugs-To: wp-polyglots@lists.automattic.com\n" +"POT-Creation-Date: 2009-06-09 11:07+0000\n" +"PO-Revision-Date: 2009-06-10 14:26+0100\n" +"Last-Translator: Xavier Borderie \n" +"Language-Team: WordPress Francophone \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" + +#: wp-admin/includes/continents-cities.php:7 +msgid "Africa" +msgstr "Afrique" + +#: wp-admin/includes/continents-cities.php:8 +msgid "Abidjan" +msgstr "" + +#: wp-admin/includes/continents-cities.php:9 +msgid "Accra" +msgstr "" + +#: wp-admin/includes/continents-cities.php:10 +msgid "Addis Ababa" +msgstr "Addis-Abeba" + +#: wp-admin/includes/continents-cities.php:11 +msgid "Algiers" +msgstr "Alger" + +#: wp-admin/includes/continents-cities.php:12 +msgid "Asmara" +msgstr "" + +#: wp-admin/includes/continents-cities.php:13 +msgid "Asmera" +msgstr "Asmara" + +#: wp-admin/includes/continents-cities.php:14 +msgid "Bamako" +msgstr "" + +#: wp-admin/includes/continents-cities.php:15 +msgid "Bangui" +msgstr "" + +#: wp-admin/includes/continents-cities.php:16 +msgid "Banjul" +msgstr "" + +#: wp-admin/includes/continents-cities.php:17 +msgid "Bissau" +msgstr "" + +#: wp-admin/includes/continents-cities.php:18 +msgid "Blantyre" +msgstr "" + +#: wp-admin/includes/continents-cities.php:19 +msgid "Brazzaville" +msgstr "" + +#: wp-admin/includes/continents-cities.php:20 +msgid "Bujumbura" +msgstr "" + +#: wp-admin/includes/continents-cities.php:21 +msgid "Cairo" +msgstr "Le Caire" + +#: wp-admin/includes/continents-cities.php:22 +msgid "Casablanca" +msgstr "" + +#: wp-admin/includes/continents-cities.php:23 +msgid "Ceuta" +msgstr "" + +#: wp-admin/includes/continents-cities.php:24 +msgid "Conakry" +msgstr "" + +#: wp-admin/includes/continents-cities.php:25 +msgid "Dakar" +msgstr "" + +#: wp-admin/includes/continents-cities.php:26 +msgid "Dar es Salaam" +msgstr "" + +#: wp-admin/includes/continents-cities.php:27 +msgid "Djibouti" +msgstr "" + +#: wp-admin/includes/continents-cities.php:28 +msgid "Douala" +msgstr "" + +#: wp-admin/includes/continents-cities.php:29 +msgid "El Aaiun" +msgstr "Laâyoune" + +#: wp-admin/includes/continents-cities.php:30 +msgid "Freetown" +msgstr "" + +#: wp-admin/includes/continents-cities.php:31 +msgid "Gaborone" +msgstr "" + +#: wp-admin/includes/continents-cities.php:32 +msgid "Harare" +msgstr "" + +#: wp-admin/includes/continents-cities.php:33 +msgid "Johannesburg" +msgstr "" + +#: wp-admin/includes/continents-cities.php:34 +msgid "Kampala" +msgstr "" + +#: wp-admin/includes/continents-cities.php:35 +msgid "Khartoum" +msgstr "" + +#: wp-admin/includes/continents-cities.php:36 +msgid "Kigali" +msgstr "" + +#: wp-admin/includes/continents-cities.php:37 +msgid "Kinshasa" +msgstr "" + +#: wp-admin/includes/continents-cities.php:38 +msgid "Lagos" +msgstr "" + +#: wp-admin/includes/continents-cities.php:39 +msgid "Libreville" +msgstr "" + +#: wp-admin/includes/continents-cities.php:40 +msgid "Lome" +msgstr "Lomé" + +#: wp-admin/includes/continents-cities.php:41 +msgid "Luanda" +msgstr "" + +#: wp-admin/includes/continents-cities.php:42 +msgid "Lubumbashi" +msgstr "" + +#: wp-admin/includes/continents-cities.php:43 +msgid "Lusaka" +msgstr "" + +#: wp-admin/includes/continents-cities.php:44 +msgid "Malabo" +msgstr "" + +#: wp-admin/includes/continents-cities.php:45 +msgid "Maputo" +msgstr "" + +#: wp-admin/includes/continents-cities.php:46 +msgid "Maseru" +msgstr "" + +#: wp-admin/includes/continents-cities.php:47 +msgid "Mbabane" +msgstr "" + +#: wp-admin/includes/continents-cities.php:48 +msgid "Mogadishu" +msgstr "Mogadiscio" + +#: wp-admin/includes/continents-cities.php:49 +msgid "Monrovia" +msgstr "" + +#: wp-admin/includes/continents-cities.php:50 +msgid "Nairobi" +msgstr "" + +#: wp-admin/includes/continents-cities.php:51 +msgid "Ndjamena" +msgstr "N'Djamena" + +#: wp-admin/includes/continents-cities.php:52 +msgid "Niamey" +msgstr "" + +#: wp-admin/includes/continents-cities.php:53 +msgid "Nouakchott" +msgstr "" + +#: wp-admin/includes/continents-cities.php:54 +msgid "Ouagadougou" +msgstr "" + +#: wp-admin/includes/continents-cities.php:55 +msgid "Porto-Novo" +msgstr "" + +#: wp-admin/includes/continents-cities.php:56 +msgid "Sao Tome" +msgstr "São Tomé" + +#: wp-admin/includes/continents-cities.php:57 +msgid "Timbuktu" +msgstr "Tombouctou" + +#: wp-admin/includes/continents-cities.php:58 +msgid "Tripoli" +msgstr "" + +#: wp-admin/includes/continents-cities.php:59 +msgid "Tunis" +msgstr "" + +#: wp-admin/includes/continents-cities.php:60 +msgid "Windhoek" +msgstr "" + +#: wp-admin/includes/continents-cities.php:61 +msgid "America" +msgstr "Amériques" + +#: wp-admin/includes/continents-cities.php:62 +msgid "Adak" +msgstr "" + +#: wp-admin/includes/continents-cities.php:63 +msgid "Anchorage" +msgstr "" + +#: wp-admin/includes/continents-cities.php:64 +msgid "Anguilla" +msgstr "" + +#: wp-admin/includes/continents-cities.php:65 +msgid "Antigua" +msgstr "" + +#: wp-admin/includes/continents-cities.php:66 +msgid "Araguaina" +msgstr "Araguaína" + +#: wp-admin/includes/continents-cities.php:67 +msgid "Argentina" +msgstr "Argentine" + +#: wp-admin/includes/continents-cities.php:68 +msgid "Buenos Aires" +msgstr "" + +#: wp-admin/includes/continents-cities.php:69 +msgid "Catamarca" +msgstr "" + +#: wp-admin/includes/continents-cities.php:70 +msgid "ComodRivadavia" +msgstr "Comodoro Rivadavia" + +#: wp-admin/includes/continents-cities.php:71 +msgid "Cordoba" +msgstr "Córdoba" + +#: wp-admin/includes/continents-cities.php:72 +msgid "Jujuy" +msgstr "San Salvador de Jujuy" + +#: wp-admin/includes/continents-cities.php:73 +msgid "La Rioja" +msgstr "" + +#: wp-admin/includes/continents-cities.php:74 +msgid "Mendoza" +msgstr "" + +#: wp-admin/includes/continents-cities.php:75 +msgid "Rio Gallegos" +msgstr "Rio Gallegos" + +#: wp-admin/includes/continents-cities.php:76 +msgid "San Juan" +msgstr "" + +#: wp-admin/includes/continents-cities.php:77 +msgid "San Luis" +msgstr "" + +#: wp-admin/includes/continents-cities.php:78 +msgid "Tucuman" +msgstr "San Miguel de Tucumán" + +#: wp-admin/includes/continents-cities.php:79 +msgid "Ushuaia" +msgstr "Ushuaïa" + +#: wp-admin/includes/continents-cities.php:80 +msgid "Aruba" +msgstr "" + +#: wp-admin/includes/continents-cities.php:81 +msgid "Asuncion" +msgstr "Asunción" + +#: wp-admin/includes/continents-cities.php:82 +msgid "Atikokan" +msgstr "" + +#: wp-admin/includes/continents-cities.php:83 +msgid "Atka" +msgstr "" + +#: wp-admin/includes/continents-cities.php:84 +msgid "Bahia" +msgstr "" + +#: wp-admin/includes/continents-cities.php:85 +msgid "Barbados" +msgstr "Barbade" + +#: wp-admin/includes/continents-cities.php:86 +msgid "Belem" +msgstr "Belém" + +#: wp-admin/includes/continents-cities.php:87 +msgid "Belize" +msgstr "" + +#: wp-admin/includes/continents-cities.php:88 +msgid "Blanc-Sablon" +msgstr "" + +#: wp-admin/includes/continents-cities.php:89 +msgid "Boa Vista" +msgstr "" + +#: wp-admin/includes/continents-cities.php:90 +msgid "Bogota" +msgstr "Bogotá" + +#: wp-admin/includes/continents-cities.php:91 +msgid "Boise" +msgstr "" + +#: wp-admin/includes/continents-cities.php:92 +msgid "Cambridge Bay" +msgstr "Ikaluktutiak" + +#: wp-admin/includes/continents-cities.php:93 +msgid "Campo Grande" +msgstr "" + +#: wp-admin/includes/continents-cities.php:94 +msgid "Cancun" +msgstr "Cancún" + +#: wp-admin/includes/continents-cities.php:95 +msgid "Caracas" +msgstr "" + +#: wp-admin/includes/continents-cities.php:96 +msgid "Cayenne" +msgstr "" + +#: wp-admin/includes/continents-cities.php:97 +msgid "Cayman" +msgstr "Îles Caïmans" + +#: wp-admin/includes/continents-cities.php:98 +msgid "Chicago" +msgstr "" + +#: wp-admin/includes/continents-cities.php:99 +msgid "Chihuahua" +msgstr "Etat de Chihuahua" + +#: wp-admin/includes/continents-cities.php:100 +msgid "Coral Harbour" +msgstr "" + +#: wp-admin/includes/continents-cities.php:101 +msgid "Costa Rica" +msgstr "" + +#: wp-admin/includes/continents-cities.php:102 +msgid "Cuiaba" +msgstr "Cuiabá" + +#: wp-admin/includes/continents-cities.php:103 +msgid "Curacao" +msgstr "Curaçao" + +#: wp-admin/includes/continents-cities.php:104 +msgid "Danmarkshavn" +msgstr "" + +#: wp-admin/includes/continents-cities.php:105 +msgid "Dawson" +msgstr "" + +#: wp-admin/includes/continents-cities.php:106 +msgid "Dawson Creek" +msgstr "" + +#: wp-admin/includes/continents-cities.php:107 +msgid "Denver" +msgstr "" + +#: wp-admin/includes/continents-cities.php:108 +msgid "Detroit" +msgstr "" + +#: wp-admin/includes/continents-cities.php:109 +msgid "Dominica" +msgstr "Dominique" + +#: wp-admin/includes/continents-cities.php:110 +msgid "Edmonton" +msgstr "" + +#: wp-admin/includes/continents-cities.php:111 +msgid "Eirunepe" +msgstr "Eirunepé" + +#: wp-admin/includes/continents-cities.php:112 +msgid "El Salvador" +msgstr "Salvador" + +#: wp-admin/includes/continents-cities.php:113 +msgid "Ensenada" +msgstr "" + +#: wp-admin/includes/continents-cities.php:114 +msgid "Fort Wayne" +msgstr "" + +#: wp-admin/includes/continents-cities.php:115 +msgid "Fortaleza" +msgstr "" + +#: wp-admin/includes/continents-cities.php:116 +msgid "Glace Bay" +msgstr "" + +#: wp-admin/includes/continents-cities.php:117 +msgid "Godthab" +msgstr "Nuuk (Godthåb)" + +#: wp-admin/includes/continents-cities.php:118 +msgid "Goose Bay" +msgstr "" + +#: wp-admin/includes/continents-cities.php:119 +msgid "Grand Turk" +msgstr "" + +#: wp-admin/includes/continents-cities.php:120 +msgid "Grenada" +msgstr "Grenade" + +#: wp-admin/includes/continents-cities.php:121 +msgid "Guadeloupe" +msgstr "" + +#: wp-admin/includes/continents-cities.php:122 +msgid "Guatemala" +msgstr "" + +#: wp-admin/includes/continents-cities.php:123 +msgid "Guayaquil" +msgstr "" + +#: wp-admin/includes/continents-cities.php:124 +msgid "Guyana" +msgstr "Guyane" + +#: wp-admin/includes/continents-cities.php:125 +msgid "Halifax" +msgstr "" + +#: wp-admin/includes/continents-cities.php:126 +msgid "Havana" +msgstr "La Havane" + +#: wp-admin/includes/continents-cities.php:127 +msgid "Hermosillo" +msgstr "" + +#: wp-admin/includes/continents-cities.php:128 +msgid "Indiana" +msgstr "" + +#: wp-admin/includes/continents-cities.php:129 +msgid "Indianapolis" +msgstr "" + +#: wp-admin/includes/continents-cities.php:130 +msgid "Knox" +msgstr "" + +#: wp-admin/includes/continents-cities.php:131 +msgid "Marengo" +msgstr "" + +#: wp-admin/includes/continents-cities.php:132 +msgid "Petersburg" +msgstr "" + +#: wp-admin/includes/continents-cities.php:133 +msgid "Tell City" +msgstr "" + +#: wp-admin/includes/continents-cities.php:134 +msgid "Vevay" +msgstr "" + +#: wp-admin/includes/continents-cities.php:135 +msgid "Vincennes" +msgstr "" + +#: wp-admin/includes/continents-cities.php:136 +msgid "Winamac" +msgstr "" + +#: wp-admin/includes/continents-cities.php:137 +msgid "Inuvik" +msgstr "" + +#: wp-admin/includes/continents-cities.php:138 +msgid "Iqaluit" +msgstr "" + +#: wp-admin/includes/continents-cities.php:139 +msgid "Jamaica" +msgstr "Jamaïque" + +#: wp-admin/includes/continents-cities.php:140 +msgid "Juneau" +msgstr "" + +#: wp-admin/includes/continents-cities.php:141 +msgid "Kentucky" +msgstr "" + +#: wp-admin/includes/continents-cities.php:142 +msgid "Louisville" +msgstr "" + +#: wp-admin/includes/continents-cities.php:143 +msgid "Monticello" +msgstr "" + +#: wp-admin/includes/continents-cities.php:144 +msgid "Knox IN" +msgstr "Knox (Indiana)" + +#: wp-admin/includes/continents-cities.php:145 +msgid "La Paz" +msgstr "" + +#: wp-admin/includes/continents-cities.php:146 +msgid "Lima" +msgstr "" + +#: wp-admin/includes/continents-cities.php:147 +msgid "Los Angeles" +msgstr "" + +#: wp-admin/includes/continents-cities.php:148 +msgid "Maceio" +msgstr "Maceió" + +#: wp-admin/includes/continents-cities.php:149 +msgid "Managua" +msgstr "" + +#: wp-admin/includes/continents-cities.php:150 +msgid "Manaus" +msgstr "" + +#: wp-admin/includes/continents-cities.php:151 +msgid "Marigot" +msgstr "" + +#: wp-admin/includes/continents-cities.php:152 +msgid "Martinique" +msgstr "" + +#: wp-admin/includes/continents-cities.php:153 +msgid "Mazatlan" +msgstr "" + +#: wp-admin/includes/continents-cities.php:154 +msgid "Menominee" +msgstr "" + +#: wp-admin/includes/continents-cities.php:155 +msgid "Merida" +msgstr "" + +#: wp-admin/includes/continents-cities.php:156 +msgid "Mexico City" +msgstr "Mexico" + +#: wp-admin/includes/continents-cities.php:157 +msgid "Miquelon" +msgstr "" + +#: wp-admin/includes/continents-cities.php:158 +msgid "Moncton" +msgstr "" + +#: wp-admin/includes/continents-cities.php:159 +msgid "Monterrey" +msgstr "" + +#: wp-admin/includes/continents-cities.php:160 +msgid "Montevideo" +msgstr "" + +#: wp-admin/includes/continents-cities.php:161 +msgid "Montreal" +msgstr "Montréal" + +#: wp-admin/includes/continents-cities.php:162 +msgid "Montserrat" +msgstr "" + +#: wp-admin/includes/continents-cities.php:163 +msgid "Nassau" +msgstr "" + +#: wp-admin/includes/continents-cities.php:164 +msgid "New York" +msgstr "" + +#: wp-admin/includes/continents-cities.php:165 +msgid "Nipigon" +msgstr "" + +#: wp-admin/includes/continents-cities.php:166 +msgid "Nome" +msgstr "" + +#: wp-admin/includes/continents-cities.php:167 +msgid "Noronha" +msgstr "" + +#: wp-admin/includes/continents-cities.php:168 +msgid "North Dakota" +msgstr "Dakota du Nord" + +#: wp-admin/includes/continents-cities.php:169 +msgid "Center" +msgstr "" + +#: wp-admin/includes/continents-cities.php:170 +msgid "New Salem" +msgstr "" + +#: wp-admin/includes/continents-cities.php:171 +msgid "Panama" +msgstr "" + +#: wp-admin/includes/continents-cities.php:172 +msgid "Pangnirtung" +msgstr "" + +#: wp-admin/includes/continents-cities.php:173 +msgid "Paramaribo" +msgstr "" + +#: wp-admin/includes/continents-cities.php:174 +msgid "Phoenix" +msgstr "" + +#: wp-admin/includes/continents-cities.php:175 +msgid "Port-au-Prince" +msgstr "" + +#: wp-admin/includes/continents-cities.php:176 +msgid "Port of Spain" +msgstr "Port-d'Espagne" + +#: wp-admin/includes/continents-cities.php:177 +msgid "Porto Acre" +msgstr "" + +#: wp-admin/includes/continents-cities.php:178 +msgid "Porto Velho" +msgstr "" + +#: wp-admin/includes/continents-cities.php:179 +msgid "Puerto Rico" +msgstr "Porto Rico" + +#: wp-admin/includes/continents-cities.php:180 +msgid "Rainy River" +msgstr "" + +#: wp-admin/includes/continents-cities.php:181 +msgid "Rankin Inlet" +msgstr "Kangiqtiniq (Rankin Inlet)" + +#: wp-admin/includes/continents-cities.php:182 +msgid "Recife" +msgstr "" + +#: wp-admin/includes/continents-cities.php:183 +msgid "Regina" +msgstr "" + +#: wp-admin/includes/continents-cities.php:184 +msgid "Resolute" +msgstr "" + +#: wp-admin/includes/continents-cities.php:185 +msgid "Rio Branco" +msgstr "" + +#: wp-admin/includes/continents-cities.php:186 +msgid "Rosario" +msgstr "" + +#: wp-admin/includes/continents-cities.php:187 +msgid "Santiago" +msgstr "Santiago du Chili" + +#: wp-admin/includes/continents-cities.php:188 +msgid "Santo Domingo" +msgstr "Saint-Domingue" + +#: wp-admin/includes/continents-cities.php:189 +msgid "Sao Paulo" +msgstr "São Paulo" + +#: wp-admin/includes/continents-cities.php:190 +msgid "Scoresbysund" +msgstr "Ittoqqortoormiit (Scoresbysund)" + +#: wp-admin/includes/continents-cities.php:191 +msgid "Shiprock" +msgstr "" + +#: wp-admin/includes/continents-cities.php:192 +msgid "St Barthelemy" +msgstr "Saint-Barthélemy" + +#: wp-admin/includes/continents-cities.php:193 +msgid "St Johns" +msgstr "Saint John's" + +#: wp-admin/includes/continents-cities.php:194 +msgid "St Kitts" +msgstr "Île Saint-Christophe" + +#: wp-admin/includes/continents-cities.php:195 +msgid "St Lucia" +msgstr "Sainte-Lucie" + +#: wp-admin/includes/continents-cities.php:196 +msgid "St Thomas" +msgstr "Saint Thomas" + +#: wp-admin/includes/continents-cities.php:197 +msgid "St Vincent" +msgstr "Saint Vincent" + +#: wp-admin/includes/continents-cities.php:198 +msgid "Swift Current" +msgstr "" + +#: wp-admin/includes/continents-cities.php:199 +msgid "Tegucigalpa" +msgstr "" + +#: wp-admin/includes/continents-cities.php:200 +msgid "Thule" +msgstr "" + +#: wp-admin/includes/continents-cities.php:201 +msgid "Thunder Bay" +msgstr "" + +#: wp-admin/includes/continents-cities.php:202 +msgid "Tijuana" +msgstr "" + +#: wp-admin/includes/continents-cities.php:203 +msgid "Toronto" +msgstr "" + +#: wp-admin/includes/continents-cities.php:204 +msgid "Tortola" +msgstr "" + +#: wp-admin/includes/continents-cities.php:205 +msgid "Vancouver" +msgstr "" + +#: wp-admin/includes/continents-cities.php:206 +msgid "Virgin" +msgstr "" + +#: wp-admin/includes/continents-cities.php:207 +msgid "Whitehorse" +msgstr "" + +#: wp-admin/includes/continents-cities.php:208 +msgid "Winnipeg" +msgstr "" + +#: wp-admin/includes/continents-cities.php:209 +msgid "Yakutat" +msgstr "" + +#: wp-admin/includes/continents-cities.php:210 +msgid "Yellowknife" +msgstr "" + +#: wp-admin/includes/continents-cities.php:211 +msgid "Antarctica" +msgstr "Antartique" + +#: wp-admin/includes/continents-cities.php:212 +msgid "Casey" +msgstr "" + +#: wp-admin/includes/continents-cities.php:213 +msgid "Davis" +msgstr "" + +#: wp-admin/includes/continents-cities.php:214 +msgid "DumontDUrville" +msgstr "Dumont d'Urville" + +#: wp-admin/includes/continents-cities.php:215 +msgid "Mawson" +msgstr "" + +#: wp-admin/includes/continents-cities.php:216 +msgid "McMurdo" +msgstr "" + +#: wp-admin/includes/continents-cities.php:217 +msgid "Palmer" +msgstr "" + +#: wp-admin/includes/continents-cities.php:218 +msgid "Rothera" +msgstr "" + +#: wp-admin/includes/continents-cities.php:219 +msgid "South Pole" +msgstr "Pôle Sud" + +#: wp-admin/includes/continents-cities.php:220 +msgid "Syowa" +msgstr "" + +#: wp-admin/includes/continents-cities.php:221 +msgid "Vostok" +msgstr "" + +#: wp-admin/includes/continents-cities.php:222 +msgid "Arctic" +msgstr "Arctique" + +#: wp-admin/includes/continents-cities.php:223 +msgid "Longyearbyen" +msgstr "" + +#: wp-admin/includes/continents-cities.php:224 +msgid "Asia" +msgstr "Asie" + +#: wp-admin/includes/continents-cities.php:225 +msgid "Aden" +msgstr "" + +#: wp-admin/includes/continents-cities.php:226 +msgid "Almaty" +msgstr "" + +#: wp-admin/includes/continents-cities.php:227 +msgid "Amman" +msgstr "" + +#: wp-admin/includes/continents-cities.php:228 +msgid "Anadyr" +msgstr "" + +#: wp-admin/includes/continents-cities.php:229 +msgid "Aqtau" +msgstr "Aqtou" + +#: wp-admin/includes/continents-cities.php:230 +msgid "Aqtobe" +msgstr "Aktioubé" + +#: wp-admin/includes/continents-cities.php:231 +msgid "Ashgabat" +msgstr "Achgabat" + +#: wp-admin/includes/continents-cities.php:232 +msgid "Ashkhabad" +msgstr "Achgabat" + +#: wp-admin/includes/continents-cities.php:233 +msgid "Baghdad" +msgstr "Bagdad" + +#: wp-admin/includes/continents-cities.php:234 +msgid "Bahrain" +msgstr "Bahreïn" + +#: wp-admin/includes/continents-cities.php:235 +msgid "Baku" +msgstr "Bakou" + +#: wp-admin/includes/continents-cities.php:236 +msgid "Bangkok" +msgstr "" + +#: wp-admin/includes/continents-cities.php:237 +msgid "Beirut" +msgstr "Beyrouth" + +#: wp-admin/includes/continents-cities.php:238 +msgid "Bishkek" +msgstr "Bichkek" + +#: wp-admin/includes/continents-cities.php:239 +msgid "Brunei" +msgstr "" + +#: wp-admin/includes/continents-cities.php:240 +msgid "Calcutta" +msgstr "" + +#: wp-admin/includes/continents-cities.php:241 +msgid "Choibalsan" +msgstr "Choybalsan" + +#: wp-admin/includes/continents-cities.php:242 +msgid "Chongqing" +msgstr "" + +#: wp-admin/includes/continents-cities.php:243 +msgid "Chungking" +msgstr "" + +#: wp-admin/includes/continents-cities.php:244 +msgid "Colombo" +msgstr "" + +#: wp-admin/includes/continents-cities.php:245 +msgid "Dacca" +msgstr "Dhâkâ (Dacca)" + +#: wp-admin/includes/continents-cities.php:246 +msgid "Damascus" +msgstr "Damas" + +#: wp-admin/includes/continents-cities.php:247 +msgid "Dhaka" +msgstr "Dhâkâ (Dacca)" + +#: wp-admin/includes/continents-cities.php:248 +msgid "Dili" +msgstr "" + +#: wp-admin/includes/continents-cities.php:249 +msgid "Dubai" +msgstr "Dubaï" + +#: wp-admin/includes/continents-cities.php:250 +msgid "Dushanbe" +msgstr "Douchanbé" + +#: wp-admin/includes/continents-cities.php:251 +msgid "Gaza" +msgstr "" + +#: wp-admin/includes/continents-cities.php:252 +msgid "Harbin" +msgstr "" + +#: wp-admin/includes/continents-cities.php:253 +msgid "Ho Chi Minh" +msgstr "Hô-Chi-Minh-Ville" + +#: wp-admin/includes/continents-cities.php:254 +msgid "Hong Kong" +msgstr "" + +#: wp-admin/includes/continents-cities.php:255 +msgid "Hovd" +msgstr "" + +#: wp-admin/includes/continents-cities.php:256 +msgid "Irkutsk" +msgstr "Irkoutsk" + +#: wp-admin/includes/continents-cities.php:257 +msgid "Istanbul" +msgstr "" + +#: wp-admin/includes/continents-cities.php:258 +msgid "Jakarta" +msgstr "" + +#: wp-admin/includes/continents-cities.php:259 +msgid "Jayapura" +msgstr "" + +#: wp-admin/includes/continents-cities.php:260 +msgid "Jerusalem" +msgstr "Jérusalem" + +#: wp-admin/includes/continents-cities.php:261 +msgid "Kabul" +msgstr "Kaboul" + +#: wp-admin/includes/continents-cities.php:262 +msgid "Kamchatka" +msgstr "Kamtchatka" + +#: wp-admin/includes/continents-cities.php:263 +msgid "Karachi" +msgstr "" + +#: wp-admin/includes/continents-cities.php:264 +msgid "Kashgar" +msgstr "Kachgar" + +#: wp-admin/includes/continents-cities.php:265 +msgid "Katmandu" +msgstr "Katmandou" + +#: wp-admin/includes/continents-cities.php:266 +msgid "Kolkata" +msgstr "Calcutta" + +#: wp-admin/includes/continents-cities.php:267 +msgid "Krasnoyarsk" +msgstr "Krasnoïarsk" + +#: wp-admin/includes/continents-cities.php:268 +msgid "Kuala Lumpur" +msgstr "" + +#: wp-admin/includes/continents-cities.php:269 +msgid "Kuching" +msgstr "" + +#: wp-admin/includes/continents-cities.php:270 +msgid "Kuwait" +msgstr "Koweït" + +#: wp-admin/includes/continents-cities.php:271 +msgid "Macao" +msgstr "" + +#: wp-admin/includes/continents-cities.php:272 +msgid "Macau" +msgstr "Macao" + +#: wp-admin/includes/continents-cities.php:273 +msgid "Magadan" +msgstr "" + +#: wp-admin/includes/continents-cities.php:274 +msgid "Makassar" +msgstr "" + +#: wp-admin/includes/continents-cities.php:275 +msgid "Manila" +msgstr "Manille" + +#: wp-admin/includes/continents-cities.php:276 +msgid "Muscat" +msgstr "Mascate" + +#: wp-admin/includes/continents-cities.php:277 +msgid "Nicosia" +msgstr "Nicosie" + +#: wp-admin/includes/continents-cities.php:278 +msgid "Novosibirsk" +msgstr "Novossibirsk" + +#: wp-admin/includes/continents-cities.php:279 +msgid "Omsk" +msgstr "" + +#: wp-admin/includes/continents-cities.php:280 +msgid "Oral" +msgstr "Oural" + +#: wp-admin/includes/continents-cities.php:281 +msgid "Phnom Penh" +msgstr "" + +#: wp-admin/includes/continents-cities.php:282 +msgid "Pontianak" +msgstr "" + +#: wp-admin/includes/continents-cities.php:283 +msgid "Pyongyang" +msgstr "" + +#: wp-admin/includes/continents-cities.php:284 +msgid "Qatar" +msgstr "" + +#: wp-admin/includes/continents-cities.php:285 +msgid "Qyzylorda" +msgstr "Kyzylorda" + +#: wp-admin/includes/continents-cities.php:286 +msgid "Rangoon" +msgstr "" + +#: wp-admin/includes/continents-cities.php:287 +msgid "Riyadh" +msgstr "Riyad" + +#: wp-admin/includes/continents-cities.php:288 +msgid "Saigon" +msgstr "Hô-Chi-Minh-Ville (Saigon)" + +#: wp-admin/includes/continents-cities.php:289 +msgid "Sakhalin" +msgstr "Sakhaline" + +#: wp-admin/includes/continents-cities.php:290 +msgid "Samarkand" +msgstr "Samarcande" + +#: wp-admin/includes/continents-cities.php:291 +msgid "Seoul" +msgstr "Séoul" + +#: wp-admin/includes/continents-cities.php:292 +msgid "Shanghai" +msgstr "" + +#: wp-admin/includes/continents-cities.php:293 +msgid "Singapore" +msgstr "Singapour" + +#: wp-admin/includes/continents-cities.php:294 +msgid "Taipei" +msgstr "" + +#: wp-admin/includes/continents-cities.php:295 +msgid "Tashkent" +msgstr "Tachkent" + +#: wp-admin/includes/continents-cities.php:296 +msgid "Tbilisi" +msgstr "Tbilissi" + +#: wp-admin/includes/continents-cities.php:297 +msgid "Tehran" +msgstr "Téhéran" + +#: wp-admin/includes/continents-cities.php:298 +msgid "Tel Aviv" +msgstr "Tel Aviv-Jaffa" + +#: wp-admin/includes/continents-cities.php:299 +msgid "Thimbu" +msgstr "Thimphou" + +#: wp-admin/includes/continents-cities.php:300 +msgid "Thimphu" +msgstr "Thimphou" + +#: wp-admin/includes/continents-cities.php:301 +msgid "Tokyo" +msgstr "Tōkyō" + +#: wp-admin/includes/continents-cities.php:302 +msgid "Ujung Pandang" +msgstr "Makassar (Ujung Pandang)" + +#: wp-admin/includes/continents-cities.php:303 +msgid "Ulaanbaatar" +msgstr "Oulan-Bator (Ulaanbaatar)" + +#: wp-admin/includes/continents-cities.php:304 +msgid "Ulan Bator" +msgstr "Oulan-Bator (Ulaanbaatar)" + +#: wp-admin/includes/continents-cities.php:305 +msgid "Urumqi" +msgstr "Ürümqi" + +#: wp-admin/includes/continents-cities.php:306 +msgid "Vientiane" +msgstr "" + +#: wp-admin/includes/continents-cities.php:307 +msgid "Vladivostok" +msgstr "" + +#: wp-admin/includes/continents-cities.php:308 +msgid "Yakutsk" +msgstr "Iakoutsk" + +#: wp-admin/includes/continents-cities.php:309 +msgid "Yekaterinburg" +msgstr "Iekaterinbourg" + +#: wp-admin/includes/continents-cities.php:310 +msgid "Yerevan" +msgstr "Yerevan (Erevan)" + +#: wp-admin/includes/continents-cities.php:311 +msgid "Atlantic" +msgstr "Atlantique" + +#: wp-admin/includes/continents-cities.php:312 +msgid "Azores" +msgstr "Açores" + +#: wp-admin/includes/continents-cities.php:313 +msgid "Bermuda" +msgstr "Bermudes" + +#: wp-admin/includes/continents-cities.php:314 +msgid "Canary" +msgstr "Îles Canaries" + +#: wp-admin/includes/continents-cities.php:315 +msgid "Cape Verde" +msgstr "Cap-Vert" + +#: wp-admin/includes/continents-cities.php:316 +msgid "Faeroe" +msgstr "Îles Féroé" + +#: wp-admin/includes/continents-cities.php:317 +msgid "Faroe" +msgstr "Îles Féroé" + +#: wp-admin/includes/continents-cities.php:318 +msgid "Jan Mayen" +msgstr "Île Jan Mayen" + +#: wp-admin/includes/continents-cities.php:319 +msgid "Madeira" +msgstr "Madère" + +#: wp-admin/includes/continents-cities.php:320 +msgid "Reykjavik" +msgstr "Reykjavík" + +#: wp-admin/includes/continents-cities.php:321 +msgid "South Georgia" +msgstr "Île de Géorgie du Sud" + +#: wp-admin/includes/continents-cities.php:322 +msgid "St Helena" +msgstr "Sainte-Hélène" + +#: wp-admin/includes/continents-cities.php:323 +msgid "Stanley" +msgstr "" + +#: wp-admin/includes/continents-cities.php:324 +msgid "Australia" +msgstr "Australie" + +#: wp-admin/includes/continents-cities.php:325 +msgid "ACT" +msgstr "Territoire de la capitale australienne (ACT)" + +#: wp-admin/includes/continents-cities.php:326 +msgid "Adelaide" +msgstr "Adélaïde" + +#: wp-admin/includes/continents-cities.php:327 +msgid "Brisbane" +msgstr "" + +#: wp-admin/includes/continents-cities.php:328 +msgid "Broken Hill" +msgstr "" + +#: wp-admin/includes/continents-cities.php:329 +msgid "Canberra" +msgstr "" + +#: wp-admin/includes/continents-cities.php:330 +msgid "Currie" +msgstr "" + +#: wp-admin/includes/continents-cities.php:331 +msgid "Darwin" +msgstr "" + +#: wp-admin/includes/continents-cities.php:332 +msgid "Eucla" +msgstr "" + +#: wp-admin/includes/continents-cities.php:333 +msgid "Hobart" +msgstr "" + +#: wp-admin/includes/continents-cities.php:334 +msgid "LHI" +msgstr "Île Lord Howe (LHI)" + +#: wp-admin/includes/continents-cities.php:335 +msgid "Lindeman" +msgstr "" + +#: wp-admin/includes/continents-cities.php:336 +msgid "Lord Howe" +msgstr "Île Lord Howe (LHI)" + +#: wp-admin/includes/continents-cities.php:337 +msgid "Melbourne" +msgstr "" + +#: wp-admin/includes/continents-cities.php:338 +msgid "North" +msgstr "Nord" + +#: wp-admin/includes/continents-cities.php:339 +msgid "NSW" +msgstr "Nouvelle-Galles du Sud (NSW)" + +#: wp-admin/includes/continents-cities.php:340 +msgid "Perth" +msgstr "" + +#: wp-admin/includes/continents-cities.php:341 +msgid "Queensland" +msgstr "" + +#: wp-admin/includes/continents-cities.php:342 +msgid "South" +msgstr "Sud" + +#: wp-admin/includes/continents-cities.php:343 +msgid "Sydney" +msgstr "" + +#: wp-admin/includes/continents-cities.php:344 +msgid "Tasmania" +msgstr "Tasmanie" + +#: wp-admin/includes/continents-cities.php:345 +msgid "Victoria" +msgstr "" + +#: wp-admin/includes/continents-cities.php:346 +msgid "West" +msgstr "Ouest" + +#: wp-admin/includes/continents-cities.php:347 +msgid "Yancowinna" +msgstr "" + +#: wp-admin/includes/continents-cities.php:348 +msgid "Etc" +msgstr "Etc." + +#: wp-admin/includes/continents-cities.php:349 +msgid "GMT" +msgstr "UTC" + +#: wp-admin/includes/continents-cities.php:350 +msgid "GMT+0" +msgstr "UTC+0" + +#: wp-admin/includes/continents-cities.php:351 +msgid "GMT+1" +msgstr "UTC+1" + +#: wp-admin/includes/continents-cities.php:352 +msgid "GMT+10" +msgstr "UTC+10" + +#: wp-admin/includes/continents-cities.php:353 +msgid "GMT+11" +msgstr "UTC+11" + +#: wp-admin/includes/continents-cities.php:354 +msgid "GMT+12" +msgstr "UTC+12" + +#: wp-admin/includes/continents-cities.php:355 +msgid "GMT+2" +msgstr "UTC+2" + +#: wp-admin/includes/continents-cities.php:356 +msgid "GMT+3" +msgstr "UTC+3" + +#: wp-admin/includes/continents-cities.php:357 +msgid "GMT+4" +msgstr "UTC+4" + +#: wp-admin/includes/continents-cities.php:358 +msgid "GMT+5" +msgstr "UTC+5" + +#: wp-admin/includes/continents-cities.php:359 +msgid "GMT+6" +msgstr "UTC+6" + +#: wp-admin/includes/continents-cities.php:360 +msgid "GMT+7" +msgstr "UTC+7" + +#: wp-admin/includes/continents-cities.php:361 +msgid "GMT+8" +msgstr "UTC+8" + +#: wp-admin/includes/continents-cities.php:362 +msgid "GMT+9" +msgstr "UTC+9" + +#: wp-admin/includes/continents-cities.php:363 +msgid "GMT-0" +msgstr "UTC-0" + +#: wp-admin/includes/continents-cities.php:364 +msgid "GMT-1" +msgstr "UTC-1" + +#: wp-admin/includes/continents-cities.php:365 +msgid "GMT-10" +msgstr "UTC-10" + +#: wp-admin/includes/continents-cities.php:366 +msgid "GMT-11" +msgstr "UTC-11" + +#: wp-admin/includes/continents-cities.php:367 +msgid "GMT-12" +msgstr "UTC-12" + +#: wp-admin/includes/continents-cities.php:368 +msgid "GMT-13" +msgstr "UTC-13" + +#: wp-admin/includes/continents-cities.php:369 +msgid "GMT-14" +msgstr "UTC-14" + +#: wp-admin/includes/continents-cities.php:370 +msgid "GMT-2" +msgstr "UTC-2" + +#: wp-admin/includes/continents-cities.php:371 +msgid "GMT-3" +msgstr "UTC-3" + +#: wp-admin/includes/continents-cities.php:372 +msgid "GMT-4" +msgstr "UTC-4" + +#: wp-admin/includes/continents-cities.php:373 +msgid "GMT-5" +msgstr "UTC-5" + +#: wp-admin/includes/continents-cities.php:374 +msgid "GMT-6" +msgstr "UTC-6" + +#: wp-admin/includes/continents-cities.php:375 +msgid "GMT-7" +msgstr "UTC-7" + +#: wp-admin/includes/continents-cities.php:376 +msgid "GMT-8" +msgstr "UTC-8" + +#: wp-admin/includes/continents-cities.php:377 +msgid "GMT-9" +msgstr "UTC-9" + +#: wp-admin/includes/continents-cities.php:378 +msgid "GMT0" +msgstr "UTC0" + +#: wp-admin/includes/continents-cities.php:379 +msgid "Greenwich" +msgstr "" + +#: wp-admin/includes/continents-cities.php:380 +msgid "UCT" +msgstr "UTC" + +#: wp-admin/includes/continents-cities.php:381 +msgid "Universal" +msgstr "Universel" + +#: wp-admin/includes/continents-cities.php:382 +msgid "UTC" +msgstr "" + +#: wp-admin/includes/continents-cities.php:383 +msgid "Zulu" +msgstr "" + +#: wp-admin/includes/continents-cities.php:384 +msgid "Europe" +msgstr "" + +#: wp-admin/includes/continents-cities.php:385 +msgid "Amsterdam" +msgstr "" + +#: wp-admin/includes/continents-cities.php:386 +msgid "Andorra" +msgstr "Andorre" + +#: wp-admin/includes/continents-cities.php:387 +msgid "Athens" +msgstr "Athènes" + +#: wp-admin/includes/continents-cities.php:388 +msgid "Belfast" +msgstr "" + +#: wp-admin/includes/continents-cities.php:389 +msgid "Belgrade" +msgstr "" + +#: wp-admin/includes/continents-cities.php:390 +msgid "Berlin" +msgstr "" + +#: wp-admin/includes/continents-cities.php:391 +msgid "Bratislava" +msgstr "" + +#: wp-admin/includes/continents-cities.php:392 +msgid "Brussels" +msgstr "Bruxelles" + +#: wp-admin/includes/continents-cities.php:393 +msgid "Bucharest" +msgstr "Bucarest" + +#: wp-admin/includes/continents-cities.php:394 +msgid "Budapest" +msgstr "" + +#: wp-admin/includes/continents-cities.php:395 +msgid "Chisinau" +msgstr "Chişinău (Kichinev)" + +#: wp-admin/includes/continents-cities.php:396 +msgid "Copenhagen" +msgstr "Copenhague" + +#: wp-admin/includes/continents-cities.php:397 +msgid "Dublin" +msgstr "" + +#: wp-admin/includes/continents-cities.php:398 +msgid "Gibraltar" +msgstr "" + +#: wp-admin/includes/continents-cities.php:399 +msgid "Guernsey" +msgstr "" + +#: wp-admin/includes/continents-cities.php:400 +msgid "Helsinki" +msgstr "" + +#: wp-admin/includes/continents-cities.php:401 +msgid "Isle of Man" +msgstr "Île de Man" + +#: wp-admin/includes/continents-cities.php:402 +msgid "Jersey" +msgstr "" + +#: wp-admin/includes/continents-cities.php:403 +msgid "Kaliningrad" +msgstr "" + +#: wp-admin/includes/continents-cities.php:404 +msgid "Kiev" +msgstr "" + +#: wp-admin/includes/continents-cities.php:405 +msgid "Lisbon" +msgstr "Lisbonne" + +#: wp-admin/includes/continents-cities.php:406 +msgid "Ljubljana" +msgstr "" + +#: wp-admin/includes/continents-cities.php:407 +msgid "London" +msgstr "Londres" + +#: wp-admin/includes/continents-cities.php:408 +msgid "Luxembourg" +msgstr "" + +#: wp-admin/includes/continents-cities.php:409 +msgid "Madrid" +msgstr "" + +#: wp-admin/includes/continents-cities.php:410 +msgid "Malta" +msgstr "Malte" + +#: wp-admin/includes/continents-cities.php:411 +msgid "Mariehamn" +msgstr "" + +#: wp-admin/includes/continents-cities.php:412 +msgid "Minsk" +msgstr "" + +#: wp-admin/includes/continents-cities.php:413 +msgid "Monaco" +msgstr "" + +#: wp-admin/includes/continents-cities.php:414 +msgid "Moscow" +msgstr "Moscou" + +#: wp-admin/includes/continents-cities.php:415 +msgid "Oslo" +msgstr "" + +#: wp-admin/includes/continents-cities.php:416 +msgid "Paris" +msgstr "" + +#: wp-admin/includes/continents-cities.php:417 +msgid "Podgorica" +msgstr "" + +#: wp-admin/includes/continents-cities.php:418 +msgid "Prague" +msgstr "" + +#: wp-admin/includes/continents-cities.php:419 +msgid "Riga" +msgstr "" + +#: wp-admin/includes/continents-cities.php:420 +msgid "Rome" +msgstr "" + +#: wp-admin/includes/continents-cities.php:421 +msgid "Samara" +msgstr "" + +#: wp-admin/includes/continents-cities.php:422 +msgid "San Marino" +msgstr "Saint-Marin" + +#: wp-admin/includes/continents-cities.php:423 +msgid "Sarajevo" +msgstr "" + +#: wp-admin/includes/continents-cities.php:424 +msgid "Simferopol" +msgstr "" + +#: wp-admin/includes/continents-cities.php:425 +msgid "Skopje" +msgstr "" + +#: wp-admin/includes/continents-cities.php:426 +msgid "Sofia" +msgstr "" + +#: wp-admin/includes/continents-cities.php:427 +msgid "Stockholm" +msgstr "" + +#: wp-admin/includes/continents-cities.php:428 +msgid "Tallinn" +msgstr "" + +#: wp-admin/includes/continents-cities.php:429 +msgid "Tirane" +msgstr "Tirana" + +#: wp-admin/includes/continents-cities.php:430 +msgid "Tiraspol" +msgstr "" + +#: wp-admin/includes/continents-cities.php:431 +msgid "Uzhgorod" +msgstr "Oujhorod (Uzhgorod)" + +#: wp-admin/includes/continents-cities.php:432 +msgid "Vaduz" +msgstr "" + +#: wp-admin/includes/continents-cities.php:433 +msgid "Vatican" +msgstr "" + +#: wp-admin/includes/continents-cities.php:434 +msgid "Vienna" +msgstr "Vienne" + +#: wp-admin/includes/continents-cities.php:435 +msgid "Vilnius" +msgstr "" + +#: wp-admin/includes/continents-cities.php:436 +msgid "Volgograd" +msgstr "" + +#: wp-admin/includes/continents-cities.php:437 +msgid "Warsaw" +msgstr "Varsovie" + +#: wp-admin/includes/continents-cities.php:438 +msgid "Zagreb" +msgstr "" + +#: wp-admin/includes/continents-cities.php:439 +msgid "Zaporozhye" +msgstr "Zaporojie" + +#: wp-admin/includes/continents-cities.php:440 +msgid "Zurich" +msgstr "" + +#: wp-admin/includes/continents-cities.php:441 +msgid "Indian" +msgstr "Océan Indien" + +#: wp-admin/includes/continents-cities.php:442 +msgid "Antananarivo" +msgstr "" + +#: wp-admin/includes/continents-cities.php:443 +msgid "Chagos" +msgstr "Archipel des Chagos" + +#: wp-admin/includes/continents-cities.php:444 +msgid "Christmas" +msgstr "Île Christmas" + +#: wp-admin/includes/continents-cities.php:445 +msgid "Cocos" +msgstr "Îles Cocos" + +#: wp-admin/includes/continents-cities.php:446 +msgid "Comoro" +msgstr "Archipel des Comores" + +#: wp-admin/includes/continents-cities.php:447 +msgid "Kerguelen" +msgstr "Île Kerguelen" + +#: wp-admin/includes/continents-cities.php:448 +msgid "Mahe" +msgstr "Mahé" + +#: wp-admin/includes/continents-cities.php:449 +msgid "Maldives" +msgstr "" + +#: wp-admin/includes/continents-cities.php:450 +msgid "Mauritius" +msgstr "Île Maurice" + +#: wp-admin/includes/continents-cities.php:451 +msgid "Mayotte" +msgstr "Mayotte" + +#: wp-admin/includes/continents-cities.php:452 +msgid "Reunion" +msgstr "Île de la Réunion" + +#: wp-admin/includes/continents-cities.php:453 +msgid "Pacific" +msgstr "Océan Pacifique" + +#: wp-admin/includes/continents-cities.php:454 +msgid "Apia" +msgstr "" + +#: wp-admin/includes/continents-cities.php:455 +msgid "Auckland" +msgstr "" + +#: wp-admin/includes/continents-cities.php:456 +msgid "Chatham" +msgstr "Îles Chatham" + +#: wp-admin/includes/continents-cities.php:457 +msgid "Easter" +msgstr "Île de Pâques" + +#: wp-admin/includes/continents-cities.php:458 +msgid "Efate" +msgstr "Éfaté" + +#: wp-admin/includes/continents-cities.php:459 +msgid "Enderbury" +msgstr "" + +#: wp-admin/includes/continents-cities.php:460 +msgid "Fakaofo" +msgstr "" + +#: wp-admin/includes/continents-cities.php:461 +msgid "Fiji" +msgstr "Fidji" + +#: wp-admin/includes/continents-cities.php:462 +msgid "Funafuti" +msgstr "" + +#: wp-admin/includes/continents-cities.php:463 +msgid "Galapagos" +msgstr "Îles Galápagos" + +#: wp-admin/includes/continents-cities.php:464 +msgid "Gambier" +msgstr "Îles Gambier" + +#: wp-admin/includes/continents-cities.php:465 +msgid "Guadalcanal" +msgstr "" + +#: wp-admin/includes/continents-cities.php:466 +msgid "Guam" +msgstr "" + +#: wp-admin/includes/continents-cities.php:467 +msgid "Honolulu" +msgstr "" + +#: wp-admin/includes/continents-cities.php:468 +msgid "Johnston" +msgstr "Atoll de Johnston" + +#: wp-admin/includes/continents-cities.php:469 +msgid "Kiritimati" +msgstr "Île Christmas (Kiribati)" + +#: wp-admin/includes/continents-cities.php:470 +msgid "Kosrae" +msgstr "" + +#: wp-admin/includes/continents-cities.php:471 +msgid "Kwajalein" +msgstr "" + +#: wp-admin/includes/continents-cities.php:472 +msgid "Majuro" +msgstr "" + +#: wp-admin/includes/continents-cities.php:473 +msgid "Marquesas" +msgstr "Îles Marquises" + +#: wp-admin/includes/continents-cities.php:474 +msgid "Midway" +msgstr "Atoll de Midway" + +#: wp-admin/includes/continents-cities.php:475 +msgid "Nauru" +msgstr "" + +#: wp-admin/includes/continents-cities.php:476 +msgid "Niue" +msgstr "Niué" + +#: wp-admin/includes/continents-cities.php:477 +msgid "Norfolk" +msgstr "" + +#: wp-admin/includes/continents-cities.php:478 +msgid "Noumea" +msgstr "Nouméa" + +#: wp-admin/includes/continents-cities.php:479 +msgid "Pago Pago" +msgstr "" + +#: wp-admin/includes/continents-cities.php:480 +msgid "Palau" +msgstr "Palaos" + +#: wp-admin/includes/continents-cities.php:481 +msgid "Pitcairn" +msgstr "Îles Pitcairn" + +#: wp-admin/includes/continents-cities.php:482 +msgid "Ponape" +msgstr "Pohnpei (Ponape)" + +#: wp-admin/includes/continents-cities.php:483 +msgid "Port Moresby" +msgstr "" + +#: wp-admin/includes/continents-cities.php:484 +msgid "Rarotonga" +msgstr "" + +#: wp-admin/includes/continents-cities.php:485 +msgid "Saipan" +msgstr "" + +#: wp-admin/includes/continents-cities.php:486 +msgid "Samoa" +msgstr "" + +#: wp-admin/includes/continents-cities.php:487 +msgid "Tahiti" +msgstr "" + +#: wp-admin/includes/continents-cities.php:488 +msgid "Tarawa" +msgstr "" + +#: wp-admin/includes/continents-cities.php:489 +msgid "Tongatapu" +msgstr "" + +#: wp-admin/includes/continents-cities.php:490 +msgid "Truk" +msgstr "Chuuk (Truk)" + +#: wp-admin/includes/continents-cities.php:491 +msgid "Wake" +msgstr "Île Wake" + +#: wp-admin/includes/continents-cities.php:492 +msgid "Wallis" +msgstr "Île Wallis" + +#: wp-admin/includes/continents-cities.php:493 +msgid "Yap" +msgstr "" + diff -r 000000000000 -r 03b0d1493584 web/wp-content/languages/fr_FR.mo Binary file web/wp-content/languages/fr_FR.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/languages/fr_FR.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/languages/fr_FR.po Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,14005 @@ +msgid "" +msgstr "" +"Project-Id-Version: WordPress 2.8.5\n" +"Report-Msgid-Bugs-To: wp-polyglots@lists.automattic.com\n" +"POT-Creation-Date: 2009-10-21 00:56+0000\n" +"PO-Revision-Date: 2009-10-21 09:27+0100\n" +"Last-Translator: Amaury Balmer \n" +"Language-Team: WordPress-Francophone (www.http://wordpress-fr.net/) \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Rosetta-Version: 0.1\n" +"X-Poedit-Country: FRANCE\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-KeywordsList: _e;_c;__\n" +"X-Poedit-Basepath: .\n" +"Plural-Forms: nplurals=2; plural=n>1\n" +"X-Poedit-Language: French\n" + +#: wp-admin/admin-ajax.php:31 +#, php-format +msgid "ALERT: You are logged out! Could not save draft. Please log in again." +msgstr "ALERTE : vous êtes déconnecté ! Impossible d’enregistrer le brouillon. Veuillez vous reconnecter." + +#: wp-admin/admin-ajax.php:164 +#: wp-admin/categories.php:177 +#: wp-admin/edit-comments.php:217 +#: wp-admin/edit-link-categories.php:100 +#: wp-admin/edit-pages.php:202 +#: wp-admin/edit-tags.php:190 +#: wp-admin/edit.php:187 +#: wp-admin/includes/media.php:1777 +#: wp-admin/includes/plugin-install.php:287 +#: wp-admin/includes/theme-install.php:386 +#: wp-admin/plugins.php:362 +#: wp-admin/themes.php:80 +#: wp-admin/upload.php:227 +msgid "«" +msgstr "«" + +#: wp-admin/admin-ajax.php:165 +#: wp-admin/categories.php:178 +#: wp-admin/edit-comments.php:218 +#: wp-admin/edit-link-categories.php:101 +#: wp-admin/edit-pages.php:203 +#: wp-admin/edit-tags.php:191 +#: wp-admin/edit.php:188 +#: wp-admin/includes/media.php:1778 +#: wp-admin/includes/plugin-install.php:288 +#: wp-admin/includes/theme-install.php:387 +#: wp-admin/plugins.php:363 +#: wp-admin/themes.php:81 +#: wp-admin/upload.php:228 +msgid "»" +msgstr "»" + +#: wp-admin/admin-ajax.php:252 +#: wp-admin/categories.php:47 +#: wp-admin/categories.php:67 +#: wp-admin/edit-link-categories.php:27 +#: wp-admin/link-category.php:46 +#, php-format +msgid "Can’t delete the %s category: this is the default one" +msgstr "Impossible de supprimer la catégorie %s : c’est celle par défaut" + +#: wp-admin/admin-ajax.php:326 +#, php-format +msgid "Comment %d does not exist" +msgstr "Le commentaire %d n’existe pas." + +#: wp-admin/admin-ajax.php:445 +#: wp-admin/admin-ajax.php:498 +#: wp-admin/includes/taxonomy.php:119 +msgid "You did not enter a category name." +msgstr "Vous n’avez pas entré de nom de catégorie." + +#: wp-admin/admin-ajax.php:453 +msgid "The category you are trying to create already exists." +msgstr "La catégorie que vous essayez de créer existe déjà." + +#: wp-admin/admin-ajax.php:486 +#, php-format +msgid "Category %s added" +msgstr "Catégorie #%s ajoutée" + +#: wp-admin/admin-ajax.php:533 +msgid "You did not enter a tag name." +msgstr "Vous n’avez pas entré de nom de mot-clef." + +#: wp-admin/admin-ajax.php:564 +#, php-format +msgid "Tag %s added" +msgstr "Mot-clef %s ajouté" + +#: wp-admin/admin-ajax.php:580 +msgid "No tags found!" +msgstr "Aucun mot-clef trouvé !" + +#: wp-admin/admin-ajax.php:678 +msgid "Error: you are replying to a comment on a draft post." +msgstr "Erreur : vous être en train de laisser un commentaire sur un brouillon." + +#: wp-admin/admin-ajax.php:693 +msgid "Sorry, you must be logged in to reply to a comment." +msgstr "Désolé, vous devez être connecté(e) pour répondre un commentaire." + +#: wp-admin/admin-ajax.php:697 +#: wp-admin/admin-ajax.php:743 +#: wp-comments-post.php:71 +msgid "Error: please type a comment." +msgstr "Erreur : veuillez saisir un commentaire." + +#: wp-admin/admin-ajax.php:795 +#: wp-admin/admin-ajax.php:800 +msgid "Please provide a custom field value." +msgstr "Veuillez saisir une valeur pour le champ personnalisé." + +#: wp-admin/admin-ajax.php:863 +#, php-format +msgid "User %s added" +msgstr "Utilisateur %s ajouté" + +#. translators: draft saved date format, see http://php.net/date +#: wp-admin/admin-ajax.php:884 +msgid "g:i:s a" +msgstr "" +"G \\h i \\m\\i\\n" +" s \\s" + +#: wp-admin/admin-ajax.php:885 +#, php-format +msgid "Draft Saved at %s." +msgstr "Brouillon enregistré à %s." + +#: wp-admin/admin-ajax.php:906 +#: wp-admin/admin-ajax.php:1067 +msgid "Someone" +msgstr "Quelqu’un" + +#: wp-admin/admin-ajax.php:908 +#, php-format +msgid "Autosave disabled: %s is currently editing this page." +msgstr "Enregistrement automatique désactivé : %s modifie actuellement cette page." + +#: wp-admin/admin-ajax.php:908 +#, php-format +msgid "Autosave disabled: %s is currently editing this post." +msgstr "Enregistrement automatique désactivé : %s modifie actuellement cet article." + +#: wp-admin/admin-ajax.php:917 +#: wp-admin/admin-ajax.php:1059 +#: wp-admin/includes/post.php:143 +#: wp-admin/includes/post.php:1151 +#: wp-admin/page.php:109 +msgid "You are not allowed to edit this page." +msgstr "Vous n’avez pas l’autorisation de modifier cette page." + +#: wp-admin/admin-ajax.php:920 +#: wp-admin/admin-ajax.php:1062 +#: wp-admin/includes/post.php:146 +#: wp-admin/includes/post.php:1154 +#: wp-admin/post.php:146 +#: wp-admin/upload.php:41 +msgid "You are not allowed to edit this post." +msgstr "Vous n’avez pas l’autorisation de modifier cet article." + +#: wp-admin/admin-ajax.php:1068 +#, php-format +msgid "Saving is disabled: %s is currently editing this page." +msgstr "Enregistrement automatique désactivé : %s modifie actuellement cette page." + +#: wp-admin/admin-ajax.php:1068 +#, php-format +msgid "Saving is disabled: %s is currently editing this post." +msgstr "Enregistrement automatique désactivé : %s modifie actuellement cet article." + +#: wp-admin/admin-ajax.php:1116 +#: wp-admin/categories.php:26 +#: wp-admin/categories.php:41 +#: wp-admin/categories.php:92 +#: wp-admin/edit-comments.php:13 +#: wp-admin/edit-link-categories.php:18 +#: wp-admin/edit-pages.php:13 +#: wp-admin/edit-tags.php:35 +#: wp-admin/edit-tags.php:51 +#: wp-admin/edit-tags.php:71 +#: wp-admin/edit-tags.php:106 +#: wp-admin/edit.php:13 +#: wp-admin/import/opml.php:28 +#: wp-admin/import/opml.php:80 +#: wp-admin/import/wp-cat2tag.php:28 +#: wp-admin/includes/bookmark.php:30 +#: wp-admin/link-category.php:24 +#: wp-admin/link-category.php:39 +#: wp-admin/link-category.php:80 +#: wp-admin/options.php:39 +#: wp-admin/press-this.php:14 +#: wp-admin/sidebar.php:19 +#: wp-admin/themes.php:13 +#: wp-admin/themes.php:24 +#: wp-admin/user-new.php:13 +#: wp-admin/users.php:16 +#: wp-admin/widgets.php:16 +#: wp-content/plugins/akismet/akismet.php:66 +msgid "Cheatin’ uh?" +msgstr "Alors, on triche ?" + +#: wp-admin/admin-ajax.php:1138 +#: wp-admin/admin-ajax.php:1147 +#: wp-admin/categories.php:127 +#: wp-admin/edit-link-categories.php:59 +msgid "Category not updated." +msgstr "La catégorie n’a pas été mise à jour." + +#: wp-admin/admin-ajax.php:1163 +#: wp-admin/admin-ajax.php:1167 +#: wp-admin/edit-tags.php:144 +msgid "Tag not updated." +msgstr "Le mot-clef n’a pas été mis à jour." + +#: wp-admin/admin-ajax.php:1199 +msgid "No posts found." +msgstr "Aucun article trouvé." + +#: wp-admin/admin-ajax.php:1201 +#: wp-admin/edit-form-advanced.php:598 +#: wp-admin/edit-page-form.php:442 +#: wp-admin/includes/dashboard.php:388 +#: wp-admin/includes/media.php:978 +#: wp-admin/includes/media.php:1642 +#: wp-admin/includes/media.php:1957 +#: wp-admin/includes/media.php:1992 +#: wp-admin/includes/media.php:2027 +#: wp-admin/includes/template.php:801 +#: wp-admin/includes/template.php:1036 +#: wp-includes/js/tinymce/langs/wp-langs.php:295 +#: wp-includes/post.php:3422 +msgid "Title" +msgstr "Titre" + +#: wp-admin/admin-ajax.php:1201 +msgid "Time" +msgstr "Date" + +#: wp-admin/admin-ajax.php:1201 +#: wp-admin/edit-form-comment.php:35 +#: wp-admin/includes/template.php:1203 +msgid "Status" +msgstr "État" + +#: wp-admin/admin-ajax.php:1207 +#: wp-admin/edit-form-advanced.php:118 +#: wp-admin/edit-form-advanced.php:139 +#: wp-admin/edit-page-form.php:112 +#: wp-admin/edit-page-form.php:133 +#: wp-admin/includes/template.php:1209 +#: wp-admin/includes/template.php:1426 +#: wp-admin/includes/template.php:1644 +#: wp-includes/post.php:359 +#: wp-includes/post.php:379 +#: wp-includes/script-loader.php:291 +#: wp-includes/script-loader.php:314 +msgid "Published" +msgstr "Publié" + +#: wp-admin/admin-ajax.php:1210 +#: wp-admin/edit-form-advanced.php:121 +#: wp-admin/edit-form-advanced.php:143 +#: wp-admin/edit-page-form.php:115 +#: wp-admin/edit-page-form.php:137 +#: wp-admin/includes/template.php:1210 +#: wp-admin/includes/template.php:1431 +#: wp-admin/includes/template.php:1649 +msgid "Scheduled" +msgstr "Planifié" + +#: wp-admin/admin-ajax.php:1213 +#: wp-admin/edit-form-advanced.php:124 +#: wp-admin/edit-form-advanced.php:145 +#: wp-admin/edit-page-form.php:118 +#: wp-admin/edit-page-form.php:139 +#: wp-admin/includes/template.php:1215 +#: wp-includes/post.php:357 +msgid "Pending Review" +msgstr "En attente de relecture" + +#: wp-admin/admin-ajax.php:1216 +#: wp-admin/edit-attachment-rows.php:132 +#: wp-admin/includes/template.php:1404 +#: wp-admin/includes/template.php:1626 +#: wp-admin/upload.php:359 +msgid "Unpublished" +msgstr "Non publié" + +#. translators: date format in table columns, see http://php.net/date +#: wp-admin/admin-ajax.php:1224 +#: wp-admin/edit-attachment-rows.php:143 +#: wp-admin/edit-attachment-rows.php:157 +#: wp-admin/includes/template.php:1416 +#: wp-admin/includes/template.php:1638 +#: wp-admin/includes/template.php:2125 +#: wp-admin/upload.php:370 +msgid "Y/m/d" +msgstr "d/m/Y" + +#: wp-admin/admin-ajax.php:1300 +msgid "An error has occured. Please reload the page and try again." +msgstr "Une erreur est survenue. Veuillez recharger la page pour faire une nouvelle tentative." + +#: wp-admin/admin-footer.php:23 +msgid "Thank you for creating with WordPress." +msgstr "Merci de faire de WordPress votre outil de création." + +#: wp-admin/admin-footer.php:23 +msgid "Documentation" +msgstr "Documentation" + +#: wp-admin/admin-footer.php:23 +msgid "Feedback" +msgstr "Forums d’entraide" + +#: wp-admin/admin-header.php:104 +msgid "Visit Site" +msgstr "Aller sur le site" + +#: wp-admin/admin-header.php:108 +#, php-format +msgid "Howdy, %2$s" +msgstr "Salutations, %2$s !" + +#: wp-admin/admin-header.php:109 +msgid "Turbo" +msgstr "Turbo" + +#: wp-admin/admin-header.php:110 +msgid "Log Out" +msgstr "Se déconnecter" + +#: wp-admin/admin.php:53 +#: wp-admin/includes/theme-install.php:182 +msgid "Blue" +msgstr "Bleu" + +#: wp-admin/admin.php:54 +msgid "Gray" +msgstr "Gris" + +#: wp-admin/admin.php:94 +msgid "Invalid plugin page" +msgstr "Page d’extension non valide" + +#: wp-admin/admin.php:98 +#, php-format +msgid "Cannot load %s." +msgstr "Impossible de charger %s." + +#: wp-admin/admin.php:116 +msgid "You are not allowed to import." +msgstr "Vous n’avez pas l’autorisation d’importer." + +#: wp-admin/admin.php:119 +msgid "Invalid importer." +msgstr "Fichier d’importation non valide." + +#: wp-admin/admin.php:127 +msgid "Cannot load importer." +msgstr "Impossible de charger l’importateur." + +#: wp-admin/admin.php:134 +#: wp-admin/import.php:15 +#: wp-admin/import/blogger.php:193 +#: wp-admin/import/textpattern.php:73 +#: wp-admin/menu.php:103 +msgid "Import" +msgstr "Importer" + +#: wp-admin/async-upload.php:27 +#: wp-admin/media-upload.php:16 +#: wp-admin/upload.php:15 +#: wp-app.php:630 +#: wp-app.php:822 +msgid "You do not have permission to upload files." +msgstr "Vous n’avez pas l’autorisation d’envoyer des fichiers." + +#: wp-admin/categories.php:12 +#: wp-admin/edit-form-advanced.php:350 +#: wp-admin/edit-link-form.php:154 +#: wp-admin/includes/template.php:754 +#: wp-admin/includes/template.php:855 +#: wp-admin/includes/template.php:1102 +#: wp-admin/menu.php:46 +#: wp-admin/press-this.php:472 +#: wp-includes/category-template.php:432 +#: wp-includes/default-widgets.php:423 +#: wp-includes/default-widgets.php:429 +#: wp-includes/taxonomy.php:18 +#: wp-includes/taxonomy.php:20 +msgid "Categories" +msgstr "Catégories" + +#: wp-admin/categories.php:60 +msgid "You are not allowed to delete categories." +msgstr "Vous n’avez pas l’autorisation de supprimer des catégories." + +#: wp-admin/categories.php:78 +#: wp-admin/edit-category-form.php:50 +#: wp-admin/link-category.php:64 +msgid "Edit Category" +msgstr "Modifier la catégorie" + +#: wp-admin/categories.php:123 +#: wp-admin/edit-link-categories.php:55 +msgid "Category added." +msgstr "Catégorie ajoutée." + +#: wp-admin/categories.php:124 +#: wp-admin/edit-link-categories.php:56 +msgid "Category deleted." +msgstr "Catégorie supprimée." + +#: wp-admin/categories.php:125 +#: wp-admin/edit-link-categories.php:57 +msgid "Category updated." +msgstr "Catégorie mise à jour." + +#: wp-admin/categories.php:126 +#: wp-admin/edit-link-categories.php:58 +msgid "Category not added." +msgstr "La catégorie n’a pas été ajoutée." + +#: wp-admin/categories.php:134 +#: wp-admin/edit-comments.php:104 +#: wp-admin/edit-link-categories.php:66 +#: wp-admin/edit-pages.php:114 +#: wp-admin/edit-tags.php:151 +#: wp-admin/edit.php:104 +#: wp-admin/link-manager.php:76 +#: wp-admin/upload.php:169 +#: wp-admin/users.php:244 +#, php-format +msgid "Search results for “%s”" +msgstr "Résultats de recherche pour « %s »" + +#: wp-admin/categories.php:145 +#: wp-admin/categories.php:147 +#: wp-admin/edit-link-categories.php:76 +#: wp-admin/edit-link-categories.php:78 +msgid "Search Categories" +msgstr "Chercher dans les catégories" + +#: wp-admin/categories.php:189 +#: wp-admin/categories.php:229 +#: wp-admin/edit-comments.php:248 +#: wp-admin/edit-comments.php:335 +#: wp-admin/edit-link-categories.php:112 +#: wp-admin/edit-link-categories.php:166 +#: wp-admin/edit-pages.php:219 +#: wp-admin/edit-pages.php:258 +#: wp-admin/edit-tags.php:202 +#: wp-admin/edit-tags.php:245 +#: wp-admin/edit.php:197 +#: wp-admin/edit.php:277 +#: wp-admin/link-manager.php:103 +#: wp-admin/link-manager.php:261 +#: wp-admin/plugins.php:478 +#: wp-admin/upload.php:244 +#: wp-admin/upload.php:400 +#: wp-admin/users.php:308 +#: wp-admin/users.php:374 +msgid "Bulk Actions" +msgstr "Actions globales" + +#: wp-admin/categories.php:190 +#: wp-admin/categories.php:230 +#: wp-admin/edit-attachment-rows.php:87 +#: wp-admin/edit-comments.php:258 +#: wp-admin/edit-comments.php:345 +#: wp-admin/edit-form-advanced.php:236 +#: wp-admin/edit-form-comment.php:71 +#: wp-admin/edit-link-categories.php:113 +#: wp-admin/edit-link-categories.php:167 +#: wp-admin/edit-link-form.php:92 +#: wp-admin/edit-page-form.php:223 +#: wp-admin/edit-pages.php:221 +#: wp-admin/edit-pages.php:260 +#: wp-admin/edit-tags.php:203 +#: wp-admin/edit-tags.php:246 +#: wp-admin/edit.php:199 +#: wp-admin/edit.php:279 +#: wp-admin/includes/dashboard.php:545 +#: wp-admin/includes/media.php:1173 +#: wp-admin/includes/template.php:133 +#: wp-admin/includes/template.php:304 +#: wp-admin/includes/template.php:666 +#: wp-admin/includes/template.php:1452 +#: wp-admin/includes/template.php:1544 +#: wp-admin/includes/template.php:1667 +#: wp-admin/includes/template.php:1913 +#: wp-admin/includes/template.php:2152 +#: wp-admin/includes/template.php:2443 +#: wp-admin/link-manager.php:104 +#: wp-admin/link-manager.php:200 +#: wp-admin/link-manager.php:262 +#: wp-admin/plugins.php:421 +#: wp-admin/plugins.php:486 +#: wp-admin/themes.php:219 +#: wp-admin/upload.php:245 +#: wp-admin/upload.php:344 +#: wp-admin/upload.php:401 +#: wp-admin/users.php:309 +#: wp-admin/users.php:375 +msgid "Delete" +msgstr "Supprimer " + +#: wp-admin/categories.php:192 +#: wp-admin/categories.php:232 +#: wp-admin/edit-comments.php:260 +#: wp-admin/edit-comments.php:347 +#: wp-admin/edit-link-categories.php:115 +#: wp-admin/edit-link-categories.php:169 +#: wp-admin/edit-pages.php:223 +#: wp-admin/edit-pages.php:262 +#: wp-admin/edit-tags.php:205 +#: wp-admin/edit-tags.php:248 +#: wp-admin/edit.php:201 +#: wp-admin/edit.php:281 +#: wp-admin/includes/template.php:3666 +#: wp-admin/link-manager.php:106 +#: wp-admin/link-manager.php:264 +#: wp-admin/plugins.php:489 +#: wp-admin/upload.php:250 +#: wp-admin/upload.php:406 +#: wp-admin/users.php:311 +#: wp-admin/users.php:377 +#: wp-includes/js/tinymce/langs/wp-langs.php:27 +msgid "Apply" +msgstr "Appliquer" + +#: wp-admin/categories.php:242 +#, php-format +msgid "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." +msgstr "À savoir : supprimer une catégorie ne supprime pas les articles qu’elle contient. Les articles affectés uniquement à la catégorie supprimée seront affectés à celle par défaut  : %s." + +#: wp-admin/categories.php:243 +#, php-format +msgid "Categories can be selectively converted to tags using the category to tag converter." +msgstr "Les catégories peuvent être converties de manière sélective en mots-clefs via le convertisseur catégories vers mots-clefs." + +#: wp-admin/categories.php:256 +#: wp-admin/categories.php:286 +#: wp-admin/edit-link-categories.php:214 +#: wp-admin/edit-link-category-form.php:34 +msgid "Add Category" +msgstr "Ajouter une catégorie" + +#: wp-admin/categories.php:263 +#: wp-admin/edit-category-form.php:58 +msgid "Category Name" +msgstr "Nom de la catégorie" + +#: wp-admin/categories.php:265 +#: wp-admin/edit-category-form.php:60 +msgid "The name is used to identify the category almost everywhere, for example under the post or in the category widget." +msgstr "Ce nom est utilisé pour identifier la catégorie un peu partout, par exemple lors de l’affichage d’un article, ainsi que dans le widget de catégorie." + +#: wp-admin/categories.php:269 +#: wp-admin/edit-category-form.php:63 +msgid "Category Slug" +msgstr "Identifiant de la catégorie" + +#: wp-admin/categories.php:271 +#: wp-admin/edit-category-form.php:65 +#: wp-admin/edit-link-categories.php:206 +#: wp-admin/edit-link-category-form.php:78 +#: wp-admin/edit-tag-form.php:42 +#: wp-admin/edit-tags.php:292 +msgid "The “slug” is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens." +msgstr "L’identifiant est la version normalisée du nom. Il ne contient généralement que des lettres minuscules non accentuées, des chiffres et des traits d’unions." + +#: wp-admin/categories.php:275 +#: wp-admin/edit-category-form.php:68 +msgid "Category Parent" +msgstr "Catégorie mère" + +#: wp-admin/categories.php:276 +#: wp-admin/edit-category-form.php:70 +#: wp-admin/includes/media.php:760 +#: wp-admin/includes/media.php:841 +#: wp-admin/includes/media.php:1906 +#: wp-admin/includes/media.php:1922 +#: wp-admin/includes/template.php:245 +#: wp-admin/includes/template.php:1931 +#: wp-includes/deprecated.php:741 +#: wp-includes/js/tinymce/langs/wp-langs.php:424 +msgid "None" +msgstr "Aucun" + +#: wp-admin/categories.php:277 +#: wp-admin/edit-category-form.php:71 +msgid "Categories, unlike tags, can have a hierarchy. You might have a Jazz category, and under that have children categories for Bebop and Big Band. Totally optional." +msgstr "Les catégories, contrairement aux mots-clefs, peuvent avoir une hiérarchie. Vous pouvez avoir une catégorie nommée Jazz, et à l’intérieur, plusieurs catégories comme Bebop et Big Band. Ceci est totalement facultatif." + +#: wp-admin/categories.php:281 +#: wp-admin/edit-category-form.php:75 +#: wp-admin/edit-link-form.php:395 +#: wp-admin/edit-tag-form.php:45 +#: wp-admin/edit-tags.php:296 +#: wp-admin/includes/media.php:866 +#: wp-admin/includes/media.php:986 +#: wp-admin/includes/plugin-install.php:304 +#: wp-admin/includes/plugin-install.php:314 +#: wp-admin/includes/template.php:869 +#: wp-admin/includes/template.php:879 +#: wp-admin/includes/template.php:889 +#: wp-admin/plugins.php:388 +#: wp-admin/plugins.php:396 +#: wp-admin/press-this.php:135 +#: wp-admin/press-this.php:168 +#: wp-admin/themes.php:276 +msgid "Description" +msgstr "Description" + +#: wp-admin/categories.php:283 +#: wp-admin/edit-category-form.php:77 +#: wp-admin/edit-tag-form.php:47 +#: wp-admin/edit-tags.php:298 +msgid "The description is not prominent by default, however some themes may show it." +msgstr "La description n’est pas très utile par défaut, cependant de plus en plus de thèmes l’affichent." + +#: wp-admin/comment.php:34 +#: wp-admin/edit-form-comment.php:16 +#: wp-admin/edit-form-comment.php:27 +msgid "Edit Comment" +msgstr "Modifier le commentaire" + +#: wp-admin/comment.php:42 +#: wp-admin/comment.php:64 +#: wp-admin/comment.php:146 +#: wp-admin/comment.php:176 +#: wp-admin/comment.php:201 +msgid "Oops, no comment with this ID." +msgstr "Oups, aucun commentaire avec cet ID." + +#: wp-admin/comment.php:42 +#: wp-admin/comment.php:64 +#: wp-admin/comment.php:146 +#: wp-admin/comment.php:176 +#: wp-admin/comment.php:201 +msgid "Go back" +msgstr "Retour" + +#: wp-admin/comment.php:45 +#: wp-admin/comment.php:149 +msgid "You are not allowed to edit comments on this post." +msgstr "Vous n’avez pas l’autorisation de modifier les commentaires de cet article." + +#: wp-admin/comment.php:67 +msgid "You are not allowed to delete comments on this post." +msgstr "Vous n’avez pas l’autorisation de supprimer les commentaires de cet article." + +#: wp-admin/comment.php:67 +#: wp-admin/comment.php:204 +msgid "You are not allowed to edit comments on this post, so you cannot approve this comment." +msgstr "Vous n’avez pas l’autorisation de modifier les commentaires de cet article, donc vous ne pouvez pas approuver ce commentaire." + +#: wp-admin/comment.php:74 +msgid "You are about to mark the following comment as spam:" +msgstr "Vous êtes sur le point de marquer le commentaire suivant comme indésirable :" + +#: wp-admin/comment.php:75 +msgid "Spam Comment" +msgstr "Marquer comme indésirable" + +#: wp-admin/comment.php:77 +msgid "You are about to delete the following comment:" +msgstr "Vous êtes sur le point de supprimer le commentaire suivant :" + +#: wp-admin/comment.php:78 +msgid "Delete Comment" +msgstr "Supprimer le commentaire" + +#: wp-admin/comment.php:80 +msgid "You are about to approve the following comment:" +msgstr "Vous êtes sur le point d’approuver le commentaire suivant :" + +#: wp-admin/comment.php:81 +msgid "Approve Comment" +msgstr "Approuver le commentaire" + +#: wp-admin/comment.php:85 +msgid "Caution:" +msgstr "Attention :" + +#: wp-admin/comment.php:87 +msgid "Are you sure you want to do that?" +msgstr "Êtes-vous certain(e) de vouloir faire cela ?" + +#: wp-admin/comment.php:93 +#: wp-admin/link-manager.php:176 +msgid "No" +msgstr "Non" + +#: wp-admin/comment.php:110 +#: wp-admin/edit-form-advanced.php:473 +#: wp-admin/edit-form-comment.php:86 +#: wp-admin/edit-pages.php:302 +#: wp-admin/includes/plugin-install.php:164 +#: wp-admin/includes/template.php:753 +#: wp-admin/includes/template.php:778 +#: wp-admin/includes/template.php:802 +#: wp-admin/includes/template.php:842 +#: wp-admin/includes/template.php:1066 +#: wp-admin/includes/theme-install.php:158 +#: wp-includes/js/tinymce/langs/wp-langs.php:256 +#: wp-includes/post-template.php:1345 +msgid "Author" +msgstr "Auteur" + +#: wp-admin/comment.php:115 +#: wp-admin/includes/template.php:900 +#: wp-admin/includes/template.php:2281 +#: wp-admin/user-edit.php:261 +#: wp-admin/user-new.php:109 +#: wp-content/themes/classic/comments-popup.php:76 +#: wp-login.php:417 +msgid "E-mail" +msgstr "E-mail" + +#: wp-admin/comment.php:121 +#: wp-admin/includes/media.php:2020 +#: wp-admin/includes/template.php:854 +#: wp-admin/includes/template.php:2286 +#: wp-admin/includes/template.php:2677 +#: wp-admin/press-this.php:160 +msgid "URL" +msgstr "Adresse web" + +#. translators: field name in comment form +#: wp-admin/comment.php:126 +#: wp-admin/edit-form-advanced.php:475 +#: wp-content/themes/classic/comments-popup.php:52 +#: wp-content/themes/classic/comments.php:24 +#: wp-includes/comment-template.php:649 +msgctxt "noun" +msgid "Comment" +msgstr "Commentaire" + +#: wp-admin/comment.php:179 +msgid "You are not allowed to edit comments on this post, so you cannot disapprove this comment." +msgstr "Vous n’êtes pas autorisé(e) à modifier les commentaires de cet article, donc vous ne pouvez pas désapprouver ce commentaire." + +#: wp-admin/comment.php:233 +#: wp-admin/includes/media.php:1551 +msgid "Unknown action." +msgstr "Action inconnue." + +#: wp-admin/custom-header.php:44 +#: wp-admin/includes/theme-install.php:188 +#: wp-content/themes/default/functions.php:156 +msgid "Custom Header" +msgstr "Personnalisation de l’en-tête" + +#: wp-admin/custom-header.php:196 +#: wp-admin/custom-header.php:287 +msgid "Hide Text" +msgstr "Cacher le texte" + +#: wp-admin/custom-header.php:202 +msgid "Show Text" +msgstr "Afficher le texte" + +#: wp-admin/custom-header.php:272 +msgid "Header updated." +msgstr "En-tête mis à jour." + +#: wp-admin/custom-header.php:278 +msgid "Your Header Image" +msgstr "Votre image d’en-tête" + +#: wp-admin/custom-header.php:279 +msgid "This is your header image. You can change the text color or upload and crop a new image." +msgstr "Voici votre image d’en-tête. Vous pouvez modifier la couleur du texte, ou mettre en ligne une nouvelle image puis la recadrer." + +#: wp-admin/custom-header.php:288 +msgid "Select a Text Color" +msgstr "Sélectionnez une couleur de texte" + +#: wp-admin/custom-header.php:288 +msgid "Use Original Color" +msgstr "Utiliser la couleur originale" + +#: wp-admin/custom-header.php:290 +#: wp-admin/import/blogger.php:661 +#: wp-admin/options-discussion.php:226 +#: wp-admin/options-general.php:277 +#: wp-admin/options-media.php:71 +#: wp-admin/options-misc.php:73 +#: wp-admin/options-permalink.php:224 +#: wp-admin/options-privacy.php:45 +#: wp-admin/options-reading.php:86 +#: wp-admin/options-writing.php:133 +#: wp-admin/options.php:133 +msgid "Save Changes" +msgstr "Enregistrer les modifications" + +#: wp-admin/custom-header.php:296 +msgid "Upload New Header Image" +msgstr "Mettre en ligne une nouvelle image d’en-tête" + +#: wp-admin/custom-header.php:296 +msgid "Here you can upload a custom header image to be shown at the top of your blog instead of the default one. On the next screen you will be able to crop the image." +msgstr "Vous pouvez ici mettre en ligne une image d’en-tête personnalisée, qui sera affichée en haut de votre blog en lieu et place de celle par défaut. L’écran suivant vous permettra de recadrer l’image." + +#: wp-admin/custom-header.php:297 +#, php-format +msgid "Images of exactly %1$d x %2$d pixels will be used as-is." +msgstr "Les images ayant pour taille exacte %1$d pixels par %2$d seront utilisées telles quelles." + +#: wp-admin/custom-header.php:300 +msgid "Choose an image from your computer:" +msgstr "Choisissez une image sur votre ordinateur :" + +#: wp-admin/custom-header.php:304 +#: wp-admin/includes/media.php:1371 +#: wp-admin/includes/media.php:1372 +#: wp-admin/includes/template.php:3253 +#: wp-admin/plugin-install.php:27 +#: wp-admin/theme-install.php:32 +msgid "Upload" +msgstr "Envoyer" + +#: wp-admin/custom-header.php:312 +msgid "Reset Header Image and Color" +msgstr "Revenir à l’image d’en-tête et à la couleur initiales" + +#: wp-admin/custom-header.php:313 +msgid "This will restore the original header image and color. You will not be able to retrieve any customizations." +msgstr "Ceci remettra l’image d’en-tête et les couleurs initiales. Il ne vous sera pas possible de récuperer vos personnalisations." + +#: wp-admin/custom-header.php:316 +msgid "Restore Original Header" +msgstr "Remettre l’en-tête initial" + +#: wp-admin/custom-header.php:377 +msgid "Choose the part of the image you want to use as your header." +msgstr "Choisissez la partie de l’image que vous voulez utiliser comme en-tête." + +#: wp-admin/custom-header.php:392 +msgid "Crop Header" +msgstr "Recadrer l’en-tête" + +#: wp-admin/custom-header.php:454 +msgid "Header complete!" +msgstr "En-tête terminé !" + +#: wp-admin/custom-header.php:456 +msgid "Visit your site and you should see the new header now." +msgstr "Allez sur votre site et vous devriez y voir votre nouvel en-tête maintenant." + +#: wp-admin/edit-attachment-rows.php:67 +#: wp-admin/edit-attachment-rows.php:79 +#: wp-admin/edit-attachment-rows.php:187 +#: wp-admin/includes/dashboard.php:450 +#: wp-admin/includes/template.php:128 +#: wp-admin/includes/template.php:299 +#: wp-admin/includes/template.php:662 +#: wp-admin/includes/template.php:1441 +#: wp-admin/includes/template.php:1659 +#: wp-admin/link-manager.php:197 +#: wp-admin/upload.php:332 +#: wp-admin/upload.php:335 +#, php-format +msgid "Edit “%s”" +msgstr "Modifier avec “%s”" + +#: wp-admin/edit-attachment-rows.php:85 +#: wp-admin/edit-attachment-rows.php:187 +#: wp-admin/edit-form-advanced.php:133 +#: wp-admin/edit-form-advanced.php:173 +#: wp-admin/edit-form-advanced.php:222 +#: wp-admin/edit-form-comment.php:62 +#: wp-admin/edit-page-form.php:127 +#: wp-admin/edit-page-form.php:167 +#: wp-admin/edit-page-form.php:209 +#: wp-admin/edit-pages.php:220 +#: wp-admin/edit-pages.php:259 +#: wp-admin/edit.php:198 +#: wp-admin/edit.php:278 +#: wp-admin/includes/dashboard.php:541 +#: wp-admin/includes/post.php:1007 +#: wp-admin/includes/template.php:130 +#: wp-admin/includes/template.php:301 +#: wp-admin/includes/template.php:664 +#: wp-admin/includes/template.php:1448 +#: wp-admin/includes/template.php:1538 +#: wp-admin/includes/template.php:1663 +#: wp-admin/includes/template.php:1911 +#: wp-admin/includes/template.php:2153 +#: wp-admin/includes/widgets.php:167 +#: wp-admin/link-manager.php:199 +#: wp-admin/menu.php:33 +#: wp-admin/menu.php:54 +#: wp-admin/menu.php:60 +#: wp-admin/plugins.php:418 +#: wp-admin/upload.php:342 +#: wp-includes/script-loader.php:275 +#: wp-includes/script-loader.php:299 +#: wp-includes/script-loader.php:325 +msgid "Edit" +msgstr "Modifier" + +#: wp-admin/edit-attachment-rows.php:87 +#: wp-admin/upload.php:344 +#, php-format +msgid "" +"You are about to delete this attachment '%s'\n" +" 'Cancel' to stop, 'OK' to delete." +msgstr "" +"Vous êtes sur le point de supprimer le fichier joint « %s ».\n" +" « Annuler » pour abandonner, « OK » pour le supprimer." + +#: wp-admin/edit-attachment-rows.php:88 +#: wp-admin/includes/template.php:1458 +#: wp-admin/includes/template.php:1673 +#: wp-admin/upload.php:345 +#, php-format +msgid "View “%s”" +msgstr "Afficher “%s”" + +#: wp-admin/edit-attachment-rows.php:88 +#: wp-admin/includes/template.php:1458 +#: wp-admin/includes/template.php:1532 +#: wp-admin/includes/template.php:1673 +#: wp-admin/upload.php:345 +msgid "View" +msgstr "Afficher" + +#: wp-admin/edit-attachment-rows.php:118 +#: wp-admin/includes/template.php:1503 +msgid "No Tags" +msgstr "Aucun mot-clef" + +# Utilisé dans les listes d'articles, pages, fichiers, en rollover de la date. +#: wp-admin/edit-attachment-rows.php:134 +#: wp-admin/includes/dashboard.php:450 +#: wp-admin/includes/template.php:1407 +#: wp-admin/includes/template.php:1629 +#: wp-admin/upload.php:361 +msgid "Y/m/d g:i:s A" +msgstr "" +"d/m/Y \\à G \\h i \\m\\i\\n" +" s \\s" + +#: wp-admin/edit-attachment-rows.php:139 +#: wp-admin/upload.php:366 +#, php-format +msgid "%s from now" +msgstr "%s à partir de maintenant" + +#: wp-admin/edit-attachment-rows.php:141 +#: wp-admin/includes/plugin-install.php:507 +#: wp-admin/includes/template.php:1414 +#: wp-admin/includes/template.php:1636 +#: wp-admin/includes/template.php:2094 +#: wp-admin/includes/theme-install.php:325 +#: wp-admin/upload.php:368 +#, php-format +msgid "%s ago" +msgstr "il y a %s" + +#: wp-admin/edit-attachment-rows.php:173 +#: wp-admin/includes/template.php:1513 +#: wp-admin/includes/template.php:1696 +#: wp-admin/includes/template.php:2217 +#, php-format +msgid "%s pending" +msgstr "%s en attente" + +#. translators: comment count link +#: wp-admin/edit-attachment-rows.php:176 +#: wp-admin/includes/template.php:1516 +#: wp-admin/includes/template.php:1699 +#: wp-admin/includes/template.php:2220 +msgctxt "comment count" +msgid "0" +msgstr "0" + +#. translators: comment count link +#: wp-admin/edit-attachment-rows.php:176 +#: wp-admin/includes/template.php:1516 +#: wp-admin/includes/template.php:1699 +#: wp-admin/includes/template.php:2220 +msgctxt "comment count" +msgid "1" +msgstr "1" + +#. translators: comment count link: % will be substituted by comment count +#: wp-admin/edit-attachment-rows.php:176 +#: wp-admin/includes/template.php:1516 +#: wp-admin/includes/template.php:1699 +#: wp-admin/includes/template.php:2220 +msgctxt "comment count" +msgid "%" +msgstr "%" + +#: wp-admin/edit-attachment-rows.php:188 +msgid "Get permalink" +msgstr "Obtenir le permalien" + +#: wp-admin/edit-attachment-rows.php:207 +#: wp-admin/upload.php:378 +msgid "No media attachments found." +msgstr "Pas de fichier média attaché." + +#: wp-admin/edit-category-form.php:14 +msgid "You do not have sufficient permissions to edit categories for this blog." +msgstr "Vous n’avez pas les droits suffisants pour modifier les catégories de ce blog." + +#: wp-admin/edit-category-form.php:81 +#: wp-admin/edit-link-category-form.php:27 +#: wp-admin/includes/template.php:266 +msgid "Update Category" +msgstr "Mettre à jour la catégorie" + +#: wp-admin/edit-comments.php:83 +#, php-format +msgid "Edit Comments on “%s”" +msgstr "Modifier les commentaires sur « %s »" + +#: wp-admin/edit-comments.php:85 +msgid "Edit Comments" +msgstr "Modifier les commentaires" + +#: wp-admin/edit-comments.php:117 +#, php-format +msgid "%s comment approved" +msgid_plural "%s comments approved" +msgstr[0] "%s commentaire approuvé" +msgstr[1] "%s commentaires approuvés" + +#: wp-admin/edit-comments.php:122 +#, php-format +msgid "%s comment deleted" +msgid_plural "%s comments deleted" +msgstr[0] "%s commentaire supprimé" +msgstr[1] "%s commentaires supprimés" + +#: wp-admin/edit-comments.php:127 +#, php-format +msgid "%s comment marked as spam" +msgid_plural "%s comments marked as spam" +msgstr[0] "%s commentaire marqué comme indésirable" +msgstr[1] "%s commentaires marqués comme indésirables" + +#: wp-admin/edit-comments.php:144 +#: wp-content/plugins/akismet/akismet.php:747 +msgid "All" +msgid_plural "All" +msgstr[0] "Tout" +msgstr[1] "Tout" + +#: wp-admin/edit-comments.php:145 +#, php-format +msgid "Pending (%s)" +msgid_plural "Pending (%s)" +msgstr[0] "En attente de relecture (%s)" +msgstr[1] "En attente de relecture (%s)" + +#: wp-admin/edit-comments.php:146 +msgid "Approved" +msgid_plural "Approved" +msgstr[0] "Approuvé" +msgstr[1] "Approuvés" + +#: wp-admin/edit-comments.php:147 +#, php-format +msgid "Spam (%s)" +msgid_plural "Spam (%s)" +msgstr[0] "Indésirable (%s)" +msgstr[1] "Indésirables (%s)" + +#: wp-admin/edit-comments.php:181 +#: wp-admin/edit-comments.php:183 +msgid "Search Comments" +msgstr "Chercher dans les commentaires" + +#: wp-admin/edit-comments.php:235 +#: wp-admin/edit-pages.php:209 +#: wp-admin/edit.php:248 +#: wp-admin/includes/user.php:731 +#: wp-admin/plugins.php:367 +#: wp-admin/themes.php:161 +#: wp-admin/upload.php:234 +#, php-format +msgid "Displaying %s–%s of %s" +msgstr "Affichage de %s à %s sur %s" + +#: wp-admin/edit-comments.php:250 +#: wp-admin/edit-comments.php:337 +#: wp-admin/includes/dashboard.php:540 +#: wp-admin/includes/template.php:2140 +#: wp-admin/includes/template.php:2143 +msgid "Unapprove" +msgstr "Désapprouver" + +#: wp-admin/edit-comments.php:253 +#: wp-admin/edit-comments.php:340 +#: wp-admin/includes/dashboard.php:539 +#: wp-admin/includes/template.php:2139 +#: wp-admin/includes/template.php:2146 +msgid "Approve" +msgstr "Approuver" + +#: wp-admin/edit-comments.php:256 +#: wp-admin/edit-comments.php:343 +msgid "Mark as Spam" +msgstr "Marquer comme indésirable" + +#: wp-admin/edit-comments.php:264 +msgid "Show all comment types" +msgstr "Afficher tous les types de commentaire" + +#: wp-admin/edit-comments.php:267 +#: wp-admin/edit-form-advanced.php:488 +#: wp-admin/import/blogger.php:205 +#: wp-admin/includes/file.php:14 +#: wp-admin/includes/template.php:1166 +#: wp-admin/includes/template.php:3138 +#: wp-admin/includes/template.php:3254 +#: wp-content/plugins/akismet/akismet.php:752 +#: wp-content/themes/classic/comments-popup.php:29 +msgid "Comments" +msgstr "Commentaires" + +#: wp-admin/edit-comments.php:268 +#: wp-admin/includes/template.php:1175 +msgid "Pings" +msgstr "Pings" + +#: wp-admin/edit-comments.php:278 +#: wp-admin/edit.php:242 +#: wp-admin/link-manager.php:127 +#: wp-admin/upload.php:283 +msgid "Filter" +msgstr "Filtrer" + +#: wp-admin/edit-comments.php:287 +#: wp-admin/edit-comments.php:350 +msgid "Delete All Spam" +msgstr "Supprimer tous les indésirables" + +#: wp-admin/edit-comments.php:374 +msgid "No comments awaiting moderation… yet." +msgstr "Aucun commentaire en attente de modération." + +#: wp-admin/edit-comments.php:378 +#: wp-content/plugins/akismet/akismet.php:878 +msgid "No results found." +msgstr "Aucun résultat." + +#: wp-admin/edit-form-advanced.php:23 +#, php-format +msgid "Post updated. View post" +msgstr "Article mis à jour. Afficher l’article" + +#: wp-admin/edit-form-advanced.php:24 +#: wp-admin/edit-page-form.php:26 +msgid "Custom field updated." +msgstr "Champ personnalisé mis à jour." + +#: wp-admin/edit-form-advanced.php:25 +#: wp-admin/edit-page-form.php:27 +msgid "Custom field deleted." +msgstr "Champ personnalisé supprimé." + +#: wp-admin/edit-form-advanced.php:26 +msgid "Post updated." +msgstr "Article mis à jour." + +#: wp-admin/edit-form-advanced.php:27 +#, php-format +msgid "Post published. View post" +msgstr "Article publié. Afficher l’article" + +#: wp-admin/edit-form-advanced.php:28 +#: wp-admin/sidebar.php:100 +msgid "Post saved." +msgstr "Article enregistré." + +#: wp-admin/edit-form-advanced.php:29 +#, php-format +msgid "Post submitted. Preview post" +msgstr "Article publié. Afficher l’article" + +#: wp-admin/edit-form-advanced.php:32 +#, php-format +msgid "Post restored to revision from %s" +msgstr "Article récupéré depuis la révision du %s" + +#: wp-admin/edit-form-advanced.php:35 +#, php-format +msgid "There is an autosave of this post that is more recent than the version below. View the autosave." +msgstr "Une sauvegarde automatique existe pour cet article, qui est plus récente que la version affichée ci-dessous. Afficher cette sauvegarde." + +#: wp-admin/edit-form-advanced.php:79 +#: wp-admin/edit-link-form.php:67 +#: wp-admin/edit-link-form.php:110 +#: wp-admin/edit-page-form.php:73 +#: wp-admin/includes/widgets.php:196 +#: wp-content/themes/default/functions.php:383 +#: wp-content/themes/default/functions.php:390 +#: wp-includes/js/tinymce/langs/wp-langs.php:76 +#: wp-includes/script-loader.php:262 +msgid "Save" +msgstr "Enregistrer" + +#: wp-admin/edit-form-advanced.php:85 +#: wp-admin/edit-page-form.php:79 +#: wp-admin/includes/dashboard.php:415 +#: wp-admin/press-this.php:460 +#: wp-includes/script-loader.php:285 +#: wp-includes/script-loader.php:309 +msgid "Save Draft" +msgstr "Enregistrer brouillon" + +#: wp-admin/edit-form-advanced.php:87 +#: wp-admin/edit-page-form.php:81 +#: wp-includes/script-loader.php:284 +#: wp-includes/script-loader.php:308 +msgid "Save as Pending" +msgstr "Mettre à relire" + +#: wp-admin/edit-form-advanced.php:95 +#: wp-admin/edit-page-form.php:89 +msgid "Preview Changes" +msgstr "Prévisualiser les modifications" + +#: wp-admin/edit-form-advanced.php:98 +#: wp-admin/edit-page-form.php:92 +#: wp-admin/includes/class-wp-upgrader.php:947 +#: wp-admin/includes/class-wp-upgrader.php:1004 +#: wp-admin/includes/template.php:1456 +#: wp-admin/includes/template.php:1671 +#: wp-admin/includes/theme-install.php:305 +#: wp-admin/themes.php:217 +#: wp-includes/js/tinymce/langs/wp-langs.php:62 +#: wp-includes/js/tinymce/langs/wp-langs.php:308 +msgid "Preview" +msgstr "Aperçu" + +#: wp-admin/edit-form-advanced.php:110 +#: wp-admin/edit-page-form.php:104 +msgid "Status:" +msgstr "État :" + +#: wp-admin/edit-form-advanced.php:115 +#: wp-admin/edit-form-advanced.php:141 +#: wp-admin/edit-page-form.php:109 +#: wp-admin/edit-page-form.php:135 +#: wp-includes/script-loader.php:290 +#: wp-includes/script-loader.php:313 +msgid "Privately Published" +msgstr "Publié en privé" + +#: wp-admin/edit-form-advanced.php:127 +#: wp-admin/edit-form-advanced.php:146 +#: wp-admin/edit-page-form.php:121 +#: wp-admin/edit-page-form.php:140 +#: wp-admin/includes/template.php:1216 +#: wp-admin/includes/template.php:3388 +#: wp-includes/post.php:356 +#: wp-includes/post.php:377 +msgid "Draft" +msgstr "Brouillon" + +#: wp-admin/edit-form-advanced.php:148 +#: wp-admin/edit-form-advanced.php:188 +#: wp-admin/edit-page-form.php:143 +#: wp-admin/edit-page-form.php:178 +#: wp-admin/includes/template.php:2580 +msgid "OK" +msgstr "OK" + +#: wp-admin/edit-form-advanced.php:149 +#: wp-admin/edit-form-advanced.php:189 +#: wp-admin/edit-page-form.php:144 +#: wp-admin/edit-page-form.php:179 +#: wp-admin/includes/dashboard.php:118 +#: wp-admin/includes/media.php:1177 +#: wp-admin/includes/media.php:1372 +#: wp-admin/includes/template.php:265 +#: wp-admin/includes/template.php:1256 +#: wp-admin/includes/template.php:2295 +#: wp-admin/includes/template.php:2496 +#: wp-admin/includes/template.php:2581 +#: wp-admin/includes/theme-install.php:511 +#: wp-admin/press-this.php:121 +#: wp-admin/press-this.php:145 +#: wp-admin/press-this.php:175 +#: wp-admin/press-this.php:298 +#: wp-admin/widgets.php:284 +#: wp-includes/js/tinymce/langs/wp-langs.php:30 +#: wp-includes/script-loader.php:263 +#: wp-includes/script-loader.php:274 +#: wp-includes/script-loader.php:298 +#: wp-includes/script-loader.php:324 +msgid "Cancel" +msgstr "Annuler" + +#: wp-admin/edit-form-advanced.php:156 +#: wp-admin/edit-page-form.php:151 +msgid "Visibility:" +msgstr "Visibilité :" + +#: wp-admin/edit-form-advanced.php:161 +#: wp-admin/edit-form-advanced.php:185 +#: wp-admin/edit-page-form.php:156 +#: wp-admin/edit-page-form.php:176 +#: wp-admin/includes/template.php:1212 +#: wp-admin/includes/template.php:3386 +#: wp-includes/post.php:358 +#: wp-includes/post.php:378 +#: wp-includes/script-loader.php:286 +#: wp-includes/script-loader.php:310 +msgid "Private" +msgstr "Privé" + +#: wp-admin/edit-form-advanced.php:164 +#: wp-admin/edit-form-advanced.php:183 +#: wp-admin/edit-page-form.php:159 +#: wp-admin/edit-page-form.php:174 +#: wp-admin/includes/template.php:3384 +msgid "Password protected" +msgstr "Protégé par mot de passe" + +#: wp-admin/edit-form-advanced.php:167 +#: wp-includes/script-loader.php:288 +msgid "Public, Sticky" +msgstr "Public, mis en avant" + +#: wp-admin/edit-form-advanced.php:170 +#: wp-admin/edit-form-advanced.php:181 +#: wp-admin/edit-page-form.php:162 +#: wp-admin/edit-page-form.php:173 +#: wp-includes/script-loader.php:287 +#: wp-includes/script-loader.php:311 +msgid "Public" +msgstr "Publique" + +#: wp-admin/edit-form-advanced.php:182 +msgid "Stick this post to the front page" +msgstr "Placer cet article en tête de la page d’accueil" + +#: wp-admin/edit-form-advanced.php:184 +#: wp-admin/edit-page-form.php:175 +#: wp-includes/post-template.php:1147 +msgid "Password:" +msgstr "Mot de passe :" + +#. translators: Publish box date formt, see http://php.net/date +#: wp-admin/edit-form-advanced.php:199 +#: wp-admin/edit-form-comment.php:58 +#: wp-admin/edit-page-form.php:187 +msgid "M j, Y @ G:i" +msgstr "j F Y, G \\h i \\m\\i\\n" + +#: wp-admin/edit-form-advanced.php:202 +#: wp-admin/edit-page-form.php:190 +#, php-format +msgid "Scheduled for: %1$s" +msgstr "Planifié pour : %1$s" + +#: wp-admin/edit-form-advanced.php:204 +#: wp-admin/edit-page-form.php:192 +#, php-format +msgid "Published on: %1$s" +msgstr "Publié le : %1$s" + +#: wp-admin/edit-form-advanced.php:206 +#: wp-admin/edit-form-advanced.php:214 +#: wp-admin/edit-page-form.php:194 +#: wp-admin/edit-page-form.php:202 +msgid "Publish immediately" +msgstr "Publier tout de suite" + +#: wp-admin/edit-form-advanced.php:208 +#: wp-admin/edit-page-form.php:196 +#, php-format +msgid "Schedule for: %1$s" +msgstr "Planifier pour : %1$s" + +#: wp-admin/edit-form-advanced.php:210 +#: wp-admin/edit-page-form.php:198 +#, php-format +msgid "Publish on: %1$s" +msgstr "Publier le : %1$s" + +#: wp-admin/edit-form-advanced.php:236 +#: wp-admin/edit-page-form.php:223 +#, php-format +msgid "" +"You are about to delete this draft '%s'\n" +" 'Cancel' to stop, 'OK' to delete." +msgstr "" +"Vous êtes sur le point de supprimer le brouillon « %s ».\n" +" « Annuler » pour abandonner, « OK » pour le supprimer." + +#: wp-admin/edit-form-advanced.php:236 +#, php-format +msgid "" +"You are about to delete this post '%s'\n" +" 'Cancel' to stop, 'OK' to delete." +msgstr "" +"Vous êtes sur le point de supprimer l’article « %s ».\n" +" « Annuler » pour abandonner, « OK » pour le supprimer." + +#: wp-admin/edit-form-advanced.php:245 +#: wp-admin/edit-form-advanced.php:246 +#: wp-admin/edit-page-form.php:233 +#: wp-admin/edit-page-form.php:234 +#: wp-includes/script-loader.php:282 +#: wp-includes/script-loader.php:306 +msgid "Schedule" +msgstr "Planifier" + +#: wp-admin/edit-form-advanced.php:248 +#: wp-admin/edit-form-advanced.php:249 +#: wp-admin/edit-form-advanced.php:268 +#: wp-admin/edit-page-form.php:236 +#: wp-admin/edit-page-form.php:237 +#: wp-admin/edit-page-form.php:255 +#: wp-admin/includes/dashboard.php:418 +#: wp-admin/press-this.php:457 +#: wp-admin/press-this.php:462 +#: wp-admin/sidebar.php:121 +#: wp-includes/script-loader.php:281 +#: wp-includes/script-loader.php:305 +msgid "Publish" +msgstr "Publier" + +#: wp-admin/edit-form-advanced.php:252 +#: wp-admin/edit-form-advanced.php:253 +#: wp-admin/edit-page-form.php:240 +#: wp-admin/edit-page-form.php:241 +#: wp-admin/includes/dashboard.php:420 +#: wp-admin/press-this.php:464 +msgid "Submit for Review" +msgstr "Soumettre à relecture" + +#: wp-admin/edit-form-advanced.php:257 +#: wp-admin/edit-form-advanced.php:258 +#: wp-admin/includes/template.php:1259 +#: wp-includes/script-loader.php:283 +msgid "Update Post" +msgstr "Mettre à jour l’article" + +#: wp-admin/edit-form-advanced.php:280 +msgid "Separate tags with commas." +msgstr "Séparez les mots-clefs par des virgules." + +#: wp-admin/edit-form-advanced.php:285 +msgid "Add or remove tags" +msgstr "Ajouter ou retirer des mots-clefs" + +#: wp-admin/edit-form-advanced.php:290 +#: wp-admin/press-this.php:502 +#: wp-includes/script-loader.php:272 +msgid "Add new tag" +msgstr "Ajouter un mot-clef" + +#: wp-admin/edit-form-advanced.php:291 +#: wp-admin/edit-form-advanced.php:342 +#: wp-admin/edit-link-form.php:147 +#: wp-admin/includes/widgets.php:167 +#: wp-admin/press-this.php:486 +#: wp-admin/press-this.php:503 +#: wp-includes/script-loader.php:214 +#: wp-includes/script-loader.php:271 +msgid "Add" +msgstr "Ajouter" + +#: wp-admin/edit-form-advanced.php:296 +#, php-format +msgid "Choose from the most used tags in %s" +msgstr "Choisir parmi les mots-clefs les plus utilisés dans %s" + +#: wp-admin/edit-form-advanced.php:320 +#: wp-admin/edit-link-form.php:121 +msgid "All Categories" +msgstr "Toutes" + +#: wp-admin/edit-form-advanced.php:321 +#: wp-admin/edit-link-form.php:122 +msgid "Most Used" +msgstr "Les plus utilisées" + +#: wp-admin/edit-form-advanced.php:338 +#: wp-admin/edit-link-form.php:143 +#: wp-admin/edit-link-form.php:145 +#: wp-admin/press-this.php:482 +msgid "+ Add New Category" +msgstr "+ Ajouter une nouvelle catégorie" + +#: wp-admin/edit-form-advanced.php:340 +#: wp-admin/press-this.php:484 +msgid "Add New Category" +msgstr "Ajouter une nouvelle catégorie" + +#: wp-admin/edit-form-advanced.php:340 +#: wp-admin/edit-link-form.php:146 +#: wp-admin/press-this.php:484 +msgid "New category name" +msgstr "Nom de la nouvelle catégorie" + +#: wp-admin/edit-form-advanced.php:341 +#: wp-admin/press-this.php:485 +msgid "Parent category" +msgstr "Catégorie parente" + +#: wp-admin/edit-form-advanced.php:361 +msgid "Keep this post private" +msgstr "Cet article est privé" + +#: wp-admin/edit-form-advanced.php:362 +msgid "Post Password" +msgstr "Mot de passe de l’article" + +#: wp-admin/edit-form-advanced.php:363 +msgid "Password Protect This Post" +msgstr "Mot de passe protégeant cet article" + +#: wp-admin/edit-form-advanced.php:364 +msgid "Setting a password will require people who visit your blog to enter the above password to view this post and its comments." +msgstr "Mettre un mot de passe obligera les visiteurs qui parcourent votre blog à entrer un mot de passe pour lire cet article et ses commentaires." + +#: wp-admin/edit-form-advanced.php:378 +#: wp-admin/edit-form-advanced.php:382 +#: wp-includes/post.php:3424 +msgid "Excerpt" +msgstr "Extrait" + +#: wp-admin/edit-form-advanced.php:379 +msgid "Excerpts are optional hand-crafted summaries of your content that can be used in your theme. Learn more about manual excerpts." +msgstr "Les extraits sont des résumés facultatifs de vos articles, écrits à la main. Vous pouvez les utiliser dans votre thème. En savoir plus (en anglais)." + +#: wp-admin/edit-form-advanced.php:394 +msgid "Already pinged:" +msgstr "Déjà notifié(s) par ping :" + +#: wp-admin/edit-form-advanced.php:403 +msgid "Send trackbacks to:" +msgstr "Envoyer un rétrolien vers :" + +#: wp-admin/edit-form-advanced.php:403 +msgid "Separate multiple URLs with spaces" +msgstr "Séparez les adresses web par des espaces" + +#: wp-admin/edit-form-advanced.php:404 +msgid "Trackbacks are a way to notify legacy blog systems that you’ve linked to them. If you link other WordPress blogs they’ll be notified automatically using pingbacks, no other action necessary." +msgstr "Un rétrolien est une manière explicite de notifier les anciens systèmes de blog que vous avez fait un lien vers eux. Si vous faites un lien vers des blogs WordPress, ils seront notifiés automatiquement à l’aide des pings, sans que vous n’ayez rien à faire." + +#: wp-admin/edit-form-advanced.php:409 +msgid "Send Trackbacks" +msgstr "Envoyer des rétroliens" + +#: wp-admin/edit-form-advanced.php:427 +#: wp-admin/edit-page-form.php:320 +msgid "Custom fields can be used to add extra metadata to a post that you can use in your theme." +msgstr "Les champs personnalisés peuvent être utilisés afin d’ajouter des données supplémentaires à vos articles. Vous pouvez les utiliser dans votre thème." + +#: wp-admin/edit-form-advanced.php:430 +#: wp-admin/edit-page-form.php:323 +msgid "Custom Fields" +msgstr "Champs personnalisés" + +#: wp-admin/edit-form-advanced.php:445 +msgid "Allow comments on this post" +msgstr "Autoriser les visiteurs à publier des commentaires sur les articles" + +#: wp-admin/edit-form-advanced.php:446 +msgid "Allow trackbacks and pingbacks on this post" +msgstr "Autoriser les rétroliens et pings sur cet article" + +#: wp-admin/edit-form-advanced.php:449 +#: wp-admin/edit-page-form.php:342 +#: wp-admin/menu.php:111 +msgid "Discussion" +msgstr "Discussion" + +#: wp-admin/edit-form-advanced.php:464 +#: wp-admin/includes/dashboard.php:516 +#: wp-content/themes/classic/comments-popup.php:58 +#: wp-content/themes/classic/comments.php:32 +msgid "No comments yet." +msgstr "Pas encore de commentaire." + +#: wp-admin/edit-form-advanced.php:479 +msgid "Show comments" +msgstr "Afficher les commentaires" + +#: wp-admin/edit-form-advanced.php:499 +#: wp-admin/edit-form-advanced.php:503 +msgid "Post Slug" +msgstr "Identifiant de l’article" + +#: wp-admin/edit-form-advanced.php:522 +#: wp-admin/edit-form-advanced.php:525 +msgid "Post Author" +msgstr "Auteur de l’article" + +#: wp-admin/edit-form-advanced.php:539 +#: wp-admin/revision.php:141 +msgid "Post Revisions" +msgstr "Historique de l’article" + +#: wp-admin/edit-form-advanced.php:629 +#: wp-admin/edit-page-form.php:467 +#, php-format +msgid "Last edited by %1$s on %2$s at %3$s" +msgstr "Dernière modification par %1$s, le %2$s à %3$s" + +#: wp-admin/edit-form-advanced.php:631 +#: wp-admin/edit-page-form.php:469 +#, php-format +msgid "Last edited on %1$s at %2$s" +msgstr "Dernière modification le %1$s à %2$s" + +#: wp-admin/edit-form-comment.php:17 +#, php-format +msgid "Editing Comment # %s" +msgstr "Modifier le commentaire n°%s" + +#: wp-admin/edit-form-comment.php:42 +msgid "View Comment" +msgstr "Afficher le commentaire" + +#. translators: comment type radio button +#. translators: comment status +#: wp-admin/edit-form-comment.php:50 +#: wp-includes/comment.php:258 +msgctxt "adjective" +msgid "Approved" +msgstr "Approuvé" + +#. translators: comment type radio button +#: wp-admin/edit-form-comment.php:51 +msgctxt "adjective" +msgid "Pending" +msgstr "En attente" + +#. translators: comment type radio button +#. translators: comment status +#: wp-admin/edit-form-comment.php:52 +#: wp-includes/comment.php:260 +msgctxt "adjective" +msgid "Spam" +msgstr "Indésirable" + +#: wp-admin/edit-form-comment.php:59 +#, php-format +msgid "Submitted on: %1$s" +msgstr "Envoyé le : %1$s" + +#: wp-admin/edit-form-comment.php:71 +msgid "" +"You are about to delete this comment. \n" +" 'Cancel' to stop, 'OK' to delete." +msgstr "" +"Vous êtes sur le point de supprimer ce commentaire.\n" +" « Annuler » pour abandonner, « OK » pour le supprimer." + +#: wp-admin/edit-form-comment.php:74 +#: wp-admin/includes/template.php:2297 +msgid "Update Comment" +msgstr "Mettre à jour le commentaire" + +#: wp-admin/edit-form-comment.php:91 +#: wp-includes/js/tinymce/langs/wp-langs.php:271 +msgid "Name:" +msgstr "Nom :" + +#: wp-admin/edit-form-comment.php:98 +#, php-format +msgid "E-mail (%s):" +msgstr "E-mail (%s) : " + +#: wp-admin/edit-form-comment.php:98 +msgid "send e-mail" +msgstr "envoyer l’e-mail" + +#: wp-admin/edit-form-comment.php:100 +msgid "E-mail:" +msgstr "E-mail :" + +#: wp-admin/edit-form-comment.php:109 +msgid "visit site" +msgstr "aller sur le site" + +#: wp-admin/edit-form-comment.php:110 +#, php-format +msgid "URL (%s):" +msgstr "Adresse web (%s) :" + +#: wp-admin/edit-form-comment.php:112 +msgid "URL:" +msgstr "Adresse web :" + +#: wp-admin/edit-link-categories.php:47 +#: wp-admin/menu.php:57 +msgid "Link Categories" +msgstr "Catégories des liens" + +#: wp-admin/edit-link-categories.php:60 +msgid "Categories deleted." +msgstr "Catégories supprimées." + +#: wp-admin/edit-link-categories.php:178 +#, php-format +msgid "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." +msgstr "Note : supprimer une catégorie ne supprime pas les liens qu’elle contient. Au lieu de cela, les liens affectés uniquement à la catégorie supprimée seront réaffectés à celle par défaut: %s." + +#: wp-admin/edit-link-categories.php:192 +#: wp-admin/edit-link-category-form.php:33 +msgid "Add Link Category" +msgstr "Ajouter une catégorie de lien" + +#: wp-admin/edit-link-categories.php:199 +#: wp-admin/edit-link-category-form.php:72 +msgid "Link Category name" +msgstr "Nom de la catégorie de liens" + +#: wp-admin/edit-link-categories.php:204 +#: wp-admin/edit-link-category-form.php:76 +msgid "Link Category slug" +msgstr "Identifiant de catégorie de liens" + +#: wp-admin/edit-link-categories.php:210 +#: wp-admin/edit-link-category-form.php:81 +msgid "Description (optional)" +msgstr "Description (facultatif)" + +#: wp-admin/edit-link-category-form.php:14 +msgid "You do not have sufficient permissions to edit link categories for this blog." +msgstr "Vous n’avez pas les droits suffisants pour modifier les catégories de liens de ce blog." + +#: wp-admin/edit-link-category-form.php:26 +msgid "Edit Link Category" +msgstr "Modifier la catégorie de lien" + +#: wp-admin/edit-link-form.php:14 +#, php-format +msgid "Links / Edit Link" +msgstr "Liens / Modifier le lien" + +#: wp-admin/edit-link-form.php:15 +#: wp-admin/edit-link-form.php:98 +msgid "Update Link" +msgstr "Mettre à jour le lien" + +#: wp-admin/edit-link-form.php:19 +#, php-format +msgid "Links / Add New Link" +msgstr "Liens / Ajouter un nouveau lien" + +#: wp-admin/edit-link-form.php:20 +#: wp-admin/edit-link-form.php:100 +msgid "Add Link" +msgstr "Ajouter un lien" + +#: wp-admin/edit-link-form.php:73 +msgid "Visit Link" +msgstr "Visiter le lien" + +#: wp-admin/edit-link-form.php:81 +msgid "Keep this link private" +msgstr "Ce lien est privé" + +#: wp-admin/edit-link-form.php:92 +#: wp-admin/link-manager.php:200 +#, php-format +msgid "" +"You are about to delete this link '%s'\n" +" 'Cancel' to stop, 'OK' to delete." +msgstr "" +"Vous êtes sur le point de supprimer le lien « %s ».\n" +" « Annuler » pour abandonner, « OK » pour le supprimer." + +#: wp-admin/edit-link-form.php:164 +#: wp-admin/edit-link-form.php:178 +#: wp-includes/js/tinymce/langs/wp-langs.php:292 +#: wp-includes/js/tinymce/langs/wp-langs.php:341 +msgid "Target" +msgstr "Cible" + +#: wp-admin/edit-link-form.php:167 +msgid "_blank - new window or tab." +msgstr "_blank - nouvelle fenêtre ou onglet." + +#: wp-admin/edit-link-form.php:170 +msgid "_top - current window or tab, with no frames." +msgstr "_top - fenêtre ou onglet en cours, sans frame." + +#: wp-admin/edit-link-form.php:173 +msgid "_none - same window or tab." +msgstr "_none - même fenêtre ou onglet." + +#: wp-admin/edit-link-form.php:175 +msgid "Choose the target frame for your link." +msgstr "Choisir la frame que cible le lien." + +#. translators: xfn: http://gmpg.org/xfn/ +#: wp-admin/edit-link-form.php:191 +msgid "rel:" +msgstr "rel :" + +#. translators: xfn: http://gmpg.org/xfn/ +#: wp-admin/edit-link-form.php:198 +#: wp-admin/edit-link-form.php:199 +msgid "identity" +msgstr "identité" + +#: wp-admin/edit-link-form.php:202 +msgid "another web address of mine" +msgstr "Une autre de mes adresses Web" + +#. translators: xfn: http://gmpg.org/xfn/ +#: wp-admin/edit-link-form.php:206 +#: wp-admin/edit-link-form.php:207 +msgid "friendship" +msgstr "amitié" + +#. translators: xfn: http://gmpg.org/xfn/ +#: wp-admin/edit-link-form.php:209 +msgid "contact" +msgstr "contact" + +#. translators: xfn: http://gmpg.org/xfn/ +#: wp-admin/edit-link-form.php:211 +msgid "acquaintance" +msgstr "connaissance" + +#. translators: xfn: http://gmpg.org/xfn/ +#: wp-admin/edit-link-form.php:213 +msgid "friend" +msgstr "ami(e)" + +#. translators: xfn: http://gmpg.org/xfn/ +#: wp-admin/edit-link-form.php:215 +#: wp-admin/edit-link-form.php:248 +#: wp-admin/edit-link-form.php:271 +msgid "none" +msgstr "aucune" + +#. translators: xfn: http://gmpg.org/xfn/ +#: wp-admin/edit-link-form.php:219 +#: wp-admin/edit-link-form.php:220 +msgid "physical" +msgstr "physique" + +#. translators: xfn: http://gmpg.org/xfn/ +#: wp-admin/edit-link-form.php:223 +msgid "met" +msgstr "rencontré(e)" + +#. translators: xfn: http://gmpg.org/xfn/ +#: wp-admin/edit-link-form.php:227 +#: wp-admin/edit-link-form.php:228 +msgid "professional" +msgstr "professionnel" + +#. translators: xfn: http://gmpg.org/xfn/ +#: wp-admin/edit-link-form.php:231 +msgid "co-worker" +msgstr "collègue de travail" + +#. translators: xfn: http://gmpg.org/xfn/ +#: wp-admin/edit-link-form.php:234 +msgid "colleague" +msgstr "confrère" + +#. translators: xfn: http://gmpg.org/xfn/ +#: wp-admin/edit-link-form.php:238 +#: wp-admin/edit-link-form.php:239 +msgid "geographical" +msgstr "géographique" + +#. translators: xfn: http://gmpg.org/xfn/ +#: wp-admin/edit-link-form.php:242 +msgid "co-resident" +msgstr "colocataire" + +#. translators: xfn: http://gmpg.org/xfn/ +#: wp-admin/edit-link-form.php:245 +msgid "neighbor" +msgstr "voisin" + +#. translators: xfn: http://gmpg.org/xfn/ +#: wp-admin/edit-link-form.php:252 +#: wp-admin/edit-link-form.php:253 +msgid "family" +msgstr "famille" + +#. translators: xfn: http://gmpg.org/xfn/ +#: wp-admin/edit-link-form.php:256 +msgid "child" +msgstr "enfant" + +#. translators: xfn: http://gmpg.org/xfn/ +#: wp-admin/edit-link-form.php:259 +msgid "kin" +msgstr "apparenté" + +#. translators: xfn: http://gmpg.org/xfn/ +#: wp-admin/edit-link-form.php:262 +msgid "parent" +msgstr "parent" + +#. translators: xfn: http://gmpg.org/xfn/ +#: wp-admin/edit-link-form.php:265 +msgid "sibling" +msgstr "frère/sœur" + +#. translators: xfn: http://gmpg.org/xfn/ +#: wp-admin/edit-link-form.php:268 +msgid "spouse" +msgstr "conjoint" + +#. translators: xfn: http://gmpg.org/xfn/ +#: wp-admin/edit-link-form.php:275 +#: wp-admin/edit-link-form.php:276 +msgid "romantic" +msgstr "romantique" + +#. translators: xfn: http://gmpg.org/xfn/ +#: wp-admin/edit-link-form.php:279 +msgid "muse" +msgstr "muse" + +#. translators: xfn: http://gmpg.org/xfn/ +#: wp-admin/edit-link-form.php:282 +msgid "crush" +msgstr "coup de foudre" + +#. translators: xfn: http://gmpg.org/xfn/ +#: wp-admin/edit-link-form.php:285 +msgid "date" +msgstr "petit(e)-ami(e)" + +#. translators: xfn: http://gmpg.org/xfn/ +#: wp-admin/edit-link-form.php:288 +msgid "sweetheart" +msgstr "être aimé" + +#: wp-admin/edit-link-form.php:295 +msgid "If the link is to a person, you can specify your relationship with them using the above form. If you would like to learn more about the idea check out XFN." +msgstr "Si le lien pointe sur une personne, vous pouvez préciser la relation que vous entretenez avec elle via le formulaire ci-dessus. Si vous souhaitez en apprendre plus sur ce système, consultez le site de XFN." + +#: wp-admin/edit-link-form.php:298 +msgid "Link Relationship (XFN)" +msgstr "Relation avec le propriétaire du site lié (XFN)" + +#: wp-admin/edit-link-form.php:311 +msgid "Image Address" +msgstr "Adresse de l’image" + +#: wp-admin/edit-link-form.php:315 +msgid "RSS Address" +msgstr "Adresse du flux RSS" + +#: wp-admin/edit-link-form.php:319 +msgid "Notes" +msgstr "Commentaires" + +#: wp-admin/edit-link-form.php:323 +#: wp-admin/includes/plugin-install.php:303 +#: wp-admin/includes/plugin-install.php:313 +#: wp-admin/includes/template.php:858 +msgid "Rating" +msgstr "Note" + +#: wp-admin/edit-link-form.php:332 +msgid "(Leave at 0 for no rating.)" +msgstr "(laissez à 0 pour ne pas donner de note.)" + +#: wp-admin/edit-link-form.php:338 +#: wp-content/themes/default/functions.php:402 +#: wp-includes/js/tinymce/langs/wp-langs.php:304 +#: wp-includes/js/tinymce/wp-mce-help.php:175 +msgid "Advanced" +msgstr "Avancé" + +#: wp-admin/edit-link-form.php:352 +msgid "Link added." +msgstr "Lien ajouté." + +#: wp-admin/edit-link-form.php:379 +#: wp-admin/includes/plugin-install.php:301 +#: wp-admin/includes/plugin-install.php:311 +#: wp-admin/includes/template.php:232 +#: wp-admin/includes/template.php:853 +#: wp-admin/includes/template.php:868 +#: wp-admin/includes/template.php:878 +#: wp-admin/includes/template.php:888 +#: wp-admin/includes/template.php:899 +#: wp-admin/includes/template.php:2276 +#: wp-admin/includes/template.php:2370 +#: wp-admin/includes/template.php:2385 +#: wp-admin/includes/template.php:2474 +#: wp-admin/themes.php:275 +#: wp-admin/user-edit.php:183 +#: wp-content/themes/classic/comments-popup.php:71 +#: wp-content/themes/classic/comments.php:57 +#: wp-includes/js/tinymce/langs/wp-langs.php:312 +msgid "Name" +msgstr "Nom" + +#: wp-admin/edit-link-form.php:382 +msgid "Example: Nifty blogging software" +msgstr "Exemple : Logiciel de blog rapide, puissant et efficace" + +#: wp-admin/edit-link-form.php:387 +msgid "Web Address" +msgstr "Adresse internet" + +#: wp-admin/edit-link-form.php:390 +msgid "Example: http://wordpress.org/ — don’t forget the http://" +msgstr "Exemple : http://www.wordpress-fr.net/ — Et n’oubliez pas http://" + +#: wp-admin/edit-link-form.php:398 +msgid "This will be shown when someone hovers over the link in the blogroll, or optionally below the link." +msgstr "Cette description sera affichée lors du survol du lien dans la liste de liens ; elle pourra également apparaître sous le lien si votre thème le prévoit." + +#: wp-admin/edit-page-form.php:25 +#, php-format +msgid "Page updated. View page" +msgstr "Page mise à jour. Afficher la page" + +#: wp-admin/edit-page-form.php:28 +#, php-format +msgid "Page published. View page" +msgstr "Page publiée. Afficher la page" + +#: wp-admin/edit-page-form.php:29 +#, php-format +msgid "Page submitted. Preview page" +msgstr "Page publiée. Afficher la page" + +#: wp-admin/edit-page-form.php:32 +#, php-format +msgid "Page restored to revision from %s" +msgstr "Page récupérée depuis la révision du %s" + +#: wp-admin/edit-page-form.php:35 +#, php-format +msgid "There is an autosave of this page that is more recent than the version below. View the autosave." +msgstr "Une sauvegarde automatique existe pour cette page, qui est plus récente que la version affichée ci-dessous. Afficher cette sauvegarde." + +#: wp-admin/edit-page-form.php:223 +#, php-format +msgid "" +"You are about to delete this page '%s'\n" +" 'Cancel' to stop, 'OK' to delete." +msgstr "" +"Vous êtes sur le point de supprimer la page « %s ».\n" +" « Annuler » pour abandonner, « OK » pour la supprimer." + +#: wp-admin/edit-page-form.php:245 +#: wp-admin/edit-page-form.php:246 +#: wp-admin/includes/template.php:1259 +#: wp-includes/script-loader.php:307 +msgid "Update Page" +msgstr "Mettre à jour la page" + +#: wp-admin/edit-page-form.php:266 +msgid "Keep this page private" +msgstr "Cette page est privée" + +#: wp-admin/edit-page-form.php:267 +msgid "Page Password" +msgstr "Mot de passe de la page" + +#: wp-admin/edit-page-form.php:268 +msgid "Password Protect This Page" +msgstr "Mot de passe de protection de cette page" + +#: wp-admin/edit-page-form.php:269 +msgid "Setting a password will require people who visit your blog to enter the above password to view this page and its comments." +msgstr "Fixer un mot de passe obligera les visiteurs qui fréquentent votre blog à entrer un mot de passe pour lire la page et les commentaires associés." + +#: wp-admin/edit-page-form.php:283 +#: wp-admin/includes/template.php:244 +#: wp-admin/includes/template.php:1123 +msgid "Parent" +msgstr "Parent" + +#: wp-admin/edit-page-form.php:284 +msgid "Page Parent" +msgstr "Page mère" + +#: wp-admin/edit-page-form.php:285 +#: wp-admin/includes/template.php:1125 +msgid "Main Page (no parent)" +msgstr "Aucune (pas de page parente)" + +#: wp-admin/edit-page-form.php:286 +msgid "You can arrange your pages in hierarchies, for example you could have an “About” page that has “Life Story” and “My Dog” pages under it. There are no limits to how deeply nested you can make pages." +msgstr "Vous pouvez arranger vos pages en hiérarchies. Par exemple, vous pourriez avoir une page « À propos », avec comme sous-pages « Ma vie » et « Mes passions ». Il n’y a pas de limite à la profondeur des sous-pages." + +#: wp-admin/edit-page-form.php:289 +#: wp-admin/includes/template.php:1143 +msgid "Template" +msgstr "Modèle" + +#: wp-admin/edit-page-form.php:290 +#: wp-admin/includes/file.php:21 +msgid "Page Template" +msgstr "Modèle de page" + +#: wp-admin/edit-page-form.php:291 +#: wp-admin/includes/template.php:1148 +msgid "Default Template" +msgstr "Modèle par défaut" + +#: wp-admin/edit-page-form.php:294 +msgid "Some themes have custom templates you can use for certain pages that might have additional features or custom layouts. If so, you’ll see them above." +msgstr "Certains thèmes utilisent des modèles spéciaux que vous pouvez appliquer à certaines pages. Ces modèles peuvent avoir des fonctionnalités supplémentaires ou une mise en page différente. Si c’est le cas, vous les verrez ci-dessus." + +#: wp-admin/edit-page-form.php:297 +#: wp-admin/includes/media.php:997 +#: wp-admin/includes/media.php:1600 +#: wp-admin/includes/template.php:1136 +msgid "Order" +msgstr "Ordre" + +#: wp-admin/edit-page-form.php:298 +msgid "Page Order" +msgstr "Ordre de la page" + +#: wp-admin/edit-page-form.php:299 +msgid "Pages are usually ordered alphabetically, but you can put a number above to change the order pages appear in. (We know this is a little janky, it’ll be better in future releases.)" +msgstr "Les pages sont généralement classées par ordre alphabétique, mais vous pouvez fixer un nombre pour modifier l’ordre d’apparition. (Nous sommes conscients que c’est laborieux, nous ferons mieux pour les prochaines versions.)" + +#: wp-admin/edit-page-form.php:302 +msgid "Attributes" +msgstr "Attributs" + +#: wp-admin/edit-page-form.php:337 +#: wp-admin/includes/template.php:1189 +msgid "Allow Comments" +msgstr "Autoriser les commentaires" + +#: wp-admin/edit-page-form.php:338 +#: wp-admin/includes/template.php:1194 +msgid "Allow Pings" +msgstr "Autoriser les notifications par ping" + +#: wp-admin/edit-page-form.php:339 +msgid "These settings apply to this page only. “Pings” are trackbacks and pingbacks." +msgstr "Ces réglages seront appliqués uniquement à cette page. Les « pings ” sont des rétroliens ou des pings." + +#: wp-admin/edit-page-form.php:353 +#: wp-admin/edit-page-form.php:356 +msgid "Page Slug" +msgstr "Identifiant de la page" + +#: wp-admin/edit-page-form.php:375 +#: wp-admin/edit-page-form.php:378 +msgid "Page Author" +msgstr "Page de l’auteur" + +#: wp-admin/edit-page-form.php:392 +#: wp-admin/revision.php:138 +msgid "Page Revisions" +msgstr "Historique de la page" + +#: wp-admin/edit-pages.php:28 +#: wp-admin/page.php:146 +msgid "You are not allowed to delete this page." +msgstr "Vous n’avez pas l’autorisation de supprimer cette page." + +#: wp-admin/edit-pages.php:32 +#: wp-admin/edit-pages.php:35 +#: wp-admin/edit.php:40 +#: wp-admin/edit.php:43 +#: wp-admin/page.php:150 +#: wp-admin/page.php:153 +#: wp-admin/post.php:191 +#: wp-admin/post.php:194 +#: wp-admin/upload.php:83 +msgid "Error in deleting..." +msgstr "Erreur pendant la suppression…" + +#: wp-admin/edit-pages.php:76 +#: wp-admin/includes/template.php:3212 +msgid "Edit Pages" +msgstr "Modifier les pages" + +#: wp-admin/edit-pages.php:81 +msgctxt "page" +msgid "Published" +msgstr "Publié" + +#: wp-admin/edit-pages.php:81 +msgid "Published pages" +msgstr "Pages publiées" + +#: wp-admin/edit-pages.php:81 +#, php-format +msgctxt "page" +msgid "Published (%s)" +msgid_plural "Published (%s)" +msgstr[0] "Publié (%s)" +msgstr[1] "Publiés (%s)" + +#: wp-admin/edit-pages.php:82 +msgctxt "page" +msgid "Scheduled" +msgstr "Planifié" + +#: wp-admin/edit-pages.php:82 +msgid "Scheduled pages" +msgstr "Pages planifiées" + +#: wp-admin/edit-pages.php:82 +#, php-format +msgctxt "page" +msgid "Scheduled (%s)" +msgid_plural "Scheduled (%s)" +msgstr[0] "Planifié (%s)" +msgstr[1] "Planifiés (%s)" + +#: wp-admin/edit-pages.php:83 +msgctxt "page" +msgid "Pending Review" +msgstr "En attente de relecture" + +#: wp-admin/edit-pages.php:83 +msgid "Pending pages" +msgstr "Pages en attente" + +#: wp-admin/edit-pages.php:83 +#, php-format +msgctxt "page" +msgid "Pending Review (%s)" +msgid_plural "Pending Review (%s)" +msgstr[0] "En attente de relecture (%s)" +msgstr[1] "En attente de relecture (%s)" + +#: wp-admin/edit-pages.php:84 +msgctxt "page" +msgid "Draft" +msgstr "Brouillon" + +#: wp-admin/edit-pages.php:84 +#: wp-admin/includes/post.php:796 +msgctxt "manage posts header" +msgid "Drafts" +msgstr "Brouillons" + +#: wp-admin/edit-pages.php:84 +#, php-format +msgctxt "page" +msgid "Draft (%s)" +msgid_plural "Drafts (%s)" +msgstr[0] "Brouillon (%s)" +msgstr[1] "Brouillons (%s)" + +#: wp-admin/edit-pages.php:85 +msgctxt "page" +msgid "Private" +msgstr "Privé" + +#: wp-admin/edit-pages.php:85 +msgid "Private pages" +msgstr "Pages privées" + +#: wp-admin/edit-pages.php:85 +#, php-format +msgctxt "page" +msgid "Private (%s)" +msgid_plural "Private (%s)" +msgstr[0] "Privé (%s)" +msgstr[1] "Privés (%s)" + +#: wp-admin/edit-pages.php:93 +#: wp-admin/includes/template.php:3172 +#: wp-admin/menu.php:59 +#: wp-includes/default-widgets.php:19 +#: wp-includes/default-widgets.php:25 +#: wp-includes/post-template.php:746 +msgid "Pages" +msgstr "Pages" + +#: wp-admin/edit-pages.php:120 +#, php-format +msgid "%s page updated." +msgid_plural "%s pages updated." +msgstr[0] "%s page mise à jour." +msgstr[1] "%s pages mises à jour." + +#: wp-admin/edit-pages.php:125 +#, php-format +msgid "%s page not updated, invalid parent page specified." +msgid_plural "%s pages not updated, invalid parent page specified." +msgstr[0] "%s page n’a pas été mise à jour, car la page parente spécifiée n’est pas valide." +msgstr[1] "%s pages n’ont pas été mises à jour, car les pages parentes spécifiées ne sont pas valides." + +#: wp-admin/edit-pages.php:130 +#, php-format +msgid "%s page not updated, somebody is editing it." +msgid_plural "%s pages not updated, somebody is editing them." +msgstr[0] "%s page n’a pas été mise à jour : quelqu’un est déjà en train de la modifier." +msgstr[1] "%s pages n’ont pas été mises à jour : quelqu’un est déjà en train de les modifier." + +#: wp-admin/edit-pages.php:135 +#, php-format +msgid "Page deleted." +msgid_plural "%s pages deleted." +msgstr[0] "Page supprimée." +msgstr[1] "%s pages supprimées." + +#: wp-admin/edit-pages.php:144 +msgid "Your page has been saved." +msgstr "Votre page a été enregistrée." + +#: wp-admin/edit-pages.php:144 +msgid "View page" +msgstr "Voir la page" + +#: wp-admin/edit-pages.php:144 +msgid "Edit page" +msgstr "Modifier la page" + +#: wp-admin/edit-pages.php:158 +#, php-format +msgctxt "pages" +msgid "All (%s)" +msgid_plural "All (%s)" +msgstr[0] "Tous (%s)" +msgstr[1] "Tous (%s)" + +#: wp-admin/edit-pages.php:177 +#: wp-admin/edit-pages.php:179 +msgid "Search Pages" +msgstr "Chercher parmi les pages" + +#: wp-admin/edit-pages.php:270 +msgid "No pages found." +msgstr "Aucune page trouvée." + +#. translators: column name +#: wp-admin/edit-pages.php:300 +#: wp-admin/includes/template.php:844 +msgctxt "column name" +msgid "Comment" +msgstr "Commentaire" + +#: wp-admin/edit-pages.php:303 +msgid "Submitted" +msgstr "Envoyé" + +#: wp-admin/edit-tag-form.php:14 +msgid "You do not have sufficient permissions to edit tags for this blog." +msgstr "Vous n’avez pas les droits suffisants pour modifier les mots clefs de ce blog." + +#: wp-admin/edit-tag-form.php:17 +msgid "A tag was not selected for editing." +msgstr "Un mot-clef n’a pas été sélectionné pour l’édition" + +#: wp-admin/edit-tag-form.php:26 +#: wp-admin/edit-tags.php:91 +msgid "Edit Tag" +msgstr "Modifier le mot-clef" + +#: wp-admin/edit-tag-form.php:35 +#: wp-admin/edit-tags.php:284 +msgid "Tag name" +msgstr "Nom du mot-clef" + +#: wp-admin/edit-tag-form.php:37 +#: wp-admin/edit-tags.php:286 +msgid "The name is how the tag appears on your site." +msgstr "Ce nom est utilisé pour identifier le mot-clef sur le site." + +#: wp-admin/edit-tag-form.php:40 +#: wp-admin/edit-tags.php:290 +msgid "Tag slug" +msgstr "Identifiant du mot-clef" + +#: wp-admin/edit-tag-form.php:51 +#: wp-admin/includes/template.php:266 +msgid "Update Tag" +msgstr "Mettre à jour le mot-clef" + +#: wp-admin/edit-tags.php:12 +#: wp-admin/includes/dashboard.php:406 +#: wp-admin/includes/template.php:755 +#: wp-admin/includes/template.php:1156 +#: wp-includes/default-widgets.php:969 +msgid "Tags" +msgstr "Mots-clefs" + +#: wp-admin/edit-tags.php:20 +#: wp-includes/taxonomy.php:1349 +#: wp-includes/taxonomy.php:1607 +msgid "Invalid taxonomy" +msgstr "La taxinomie est invalide" + +#: wp-admin/edit-tags.php:140 +msgid "Tag added." +msgstr "Mot-clef ajouté." + +#: wp-admin/edit-tags.php:141 +msgid "Tag deleted." +msgstr "Mot-clef supprimé." + +#: wp-admin/edit-tags.php:142 +msgid "Tag updated." +msgstr "Mot-clef mis à jour." + +#: wp-admin/edit-tags.php:143 +msgid "Tag not added." +msgstr "Le mot-clef n’a pas été ajouté." + +#: wp-admin/edit-tags.php:145 +msgid "Tags deleted." +msgstr "Mots-clefs supprimés." + +#: wp-admin/edit-tags.php:162 +#: wp-admin/edit-tags.php:164 +msgid "Search Tags" +msgstr "Chercher dans les mots-clefs" + +#: wp-admin/edit-tags.php:263 +msgid "Popular Tags" +msgstr "Mots-clefs populaires" + +#: wp-admin/edit-tags.php:276 +msgid "Add a New Tag" +msgstr "Ajouter un nouveau mot-clef" + +#: wp-admin/edit-tags.php:301 +msgid "Add Tag" +msgstr "Ajouter un mot-clef" + +#: wp-admin/edit.php:36 +#: wp-admin/post.php:187 +#: wp-admin/upload.php:79 +msgid "You are not allowed to delete this post." +msgstr "Vous n’avez pas l’autorisation de supprimer cet article." + +#: wp-admin/edit.php:84 +#: wp-admin/includes/template.php:3206 +msgid "Edit Posts" +msgstr "Modifier les articles" + +#: wp-admin/edit.php:109 +#: wp-admin/press-this.php:516 +msgid "Your post has been saved." +msgstr "Votre article a été enregistré." + +#: wp-admin/edit.php:109 +#: wp-admin/press-this.php:516 +msgid "View post" +msgstr "Afficher l’article" + +#: wp-admin/edit.php:109 +#: wp-admin/press-this.php:516 +#: wp-includes/link-template.php:730 +msgid "Edit post" +msgstr "Modifier l’article" + +#: wp-admin/edit.php:116 +#, php-format +msgid "%s post updated." +msgid_plural "%s posts updated." +msgstr[0] "%s article mis à jour." +msgstr[1] "%s articles mis à jour." + +#: wp-admin/edit.php:124 +#, php-format +msgid "%s post not updated, somebody is editing it." +msgid_plural "%s posts not updated, somebody is editing them." +msgstr[0] "%s article n’a pas été mis à jour : quelqu’un est déjà en train de le modifier." +msgstr[1] "%s articles n’ont pas été mis à jour : quelqu’un est déjà en train de les modifier." + +#: wp-admin/edit.php:129 +#, php-format +msgid "Post deleted." +msgid_plural "%s posts deleted." +msgstr[0] "Article supprimé." +msgstr[1] "%s articles supprimés." + +#: wp-admin/edit.php:147 +#, php-format +msgctxt "posts" +msgid "All (%s)" +msgid_plural "All (%s)" +msgstr[0] "Tous (%s)" +msgstr[1] "Tous (%s)" + +#: wp-admin/edit.php:170 +#: wp-admin/edit.php:172 +msgid "Search Posts" +msgstr "Chercher dans les articles" + +#: wp-admin/edit.php:216 +#: wp-admin/includes/media.php:1798 +#: wp-admin/upload.php:263 +msgid "Show all dates" +msgstr "Afficher toutes les dates" + +#: wp-admin/edit.php:237 +msgid "View all categories" +msgstr "Voir toutes les catégories" + +#: wp-admin/edit.php:257 +msgid "List View" +msgstr "Liste simple" + +#: wp-admin/edit.php:258 +msgid "Excerpt View" +msgstr "Liste avec extraits" + +#: wp-admin/edit.php:289 +msgid "No posts found" +msgstr "Aucun article trouvé" + +#: wp-admin/export.php:13 +msgid "You do not have sufficient permissions to export the content of this blog." +msgstr "Vous n’avez pas les droits suffisants pour exporter le contenu de ce blog." + +#: wp-admin/export.php:17 +#: wp-admin/menu.php:104 +msgid "Export" +msgstr "Exporter" + +#: wp-admin/export.php:32 +msgid "When you click the button below WordPress will create an XML file for you to save to your computer." +msgstr "Cliquez sur ce bouton pour que WordPress crée un fichier XML que vous pourrez enregistrer sur votre ordinateur." + +#: wp-admin/export.php:33 +msgid "This format, which we call WordPress eXtended RSS or WXR, will contain your posts, pages, comments, custom fields, categories, and tags." +msgstr "Ce format, que nous appelons WordPress eXtended RSS (ou WXR), contient tous vos articles, pages, commentaires, champs personnalisés, catégories et mots-clefs." + +#: wp-admin/export.php:34 +msgid "Once you’ve saved the download file, you can use the Import function on another WordPress blog to import this blog." +msgstr "Une fois que le fichier téléchargé a été enregistré, vous pouvez utiliser la fonction Importer d’un autre blog WordPress pour importer ce fichier dans cet autre blog." + +#: wp-admin/export.php:36 +#: wp-admin/includes/template.php:3662 +msgid "Options" +msgstr "Options" + +#: wp-admin/export.php:40 +msgid "Restrict Author" +msgstr "Se limiter à l’auteur" + +#: wp-admin/export.php:43 +msgid "All Authors" +msgstr "Tous les auteurs" + +#: wp-admin/export.php:55 +msgid "Download Export File" +msgstr "Télécharger le fichier d’export" + +#: wp-admin/import.php:13 +msgid "You do not have sufficient permissions to import content in this blog." +msgstr "Vous n’avez pas les droits suffisants pour importer du contenu dans ce blog." + +#: wp-admin/import.php:23 +msgid "If you have posts or comments in another system, WordPress can import those into this blog. To get started, choose a system to import from below:" +msgstr "Si vous avez des articles ou des commentaires dans un autre système de blog, WordPress peut les importer dans votre blog actuel. Pour commencer, choisissez un système d’origine ci-dessous :" + +#: wp-admin/import.php:45 +msgid "No importers are available." +msgstr "Aucun outil d’importation n’est disponible." + +#: wp-admin/import/blogger.php:50 +msgid "Import Blogger" +msgstr "Importer depuis Blogger" + +#: wp-admin/import/blogger.php:51 +msgid "Howdy! This importer allows you to import posts and comments from your Blogger account into your WordPress blog." +msgstr "Salutations ! Cet outil d’import vous permet d’importer les articles et les commentaires depuis votre compte Blogger vers votre blog WordPress." + +#: wp-admin/import/blogger.php:52 +msgid "To use this importer, you must have a Google account and an upgraded (New, was Beta) blog hosted on blogspot.com or a custom domain (not FTP)." +msgstr "Pour utiliser cet importateur, vous devez disposer d’un compte Google, un blog mis à jour (New Blogger, auparavant nommé Beta), et ce dernier doit être sur blogspot.com ou sur un domaine personnalisé (pas de compte FTP)." + +#: wp-admin/import/blogger.php:53 +msgid "The first thing you need to do is tell Blogger to let WordPress access your account. You will be sent back here after providing authorization." +msgstr "La première chose à faire est de dire à Blogger de laisser WordPress accéder à votre compte. Vous serez renvoyé ici après avoir obtenu l’autorisation." + +#: wp-admin/import/blogger.php:54 +msgid "Authorize" +msgstr "Identification" + +#: wp-admin/import/blogger.php:93 +msgid "Authorization failed" +msgstr "Échec lors de l’identification" + +#: wp-admin/import/blogger.php:94 +msgid "Something went wrong. If the problem persists, send this info to support:" +msgstr "Une erreur est survenue. Si le problème persiste, envoyez ces informations au support :" + +#: wp-admin/import/blogger.php:151 +msgid "Trouble signing in" +msgstr "Problème de connexion" + +#: wp-admin/import/blogger.php:152 +msgid "We were not able to gain access to your account. Try starting over." +msgstr "Il n’est pas possible d’accéder à votre compte. Veuillez recommencer." + +#: wp-admin/import/blogger.php:185 +msgid "No blogs found" +msgstr "Aucun blog trouvé" + +#: wp-admin/import/blogger.php:186 +msgid "We were able to log in but there were no blogs. Try a different account next time." +msgstr "La connexion a réussie mais il n’y a pas de blog. Essayez un compte différent la prochaine fois." + +#: wp-admin/import/blogger.php:194 +#: wp-admin/includes/media.php:1176 +#: wp-admin/upgrade.php:54 +#: wp-admin/upgrade.php:79 +msgid "Continue" +msgstr "Continuer" + +#: wp-admin/import/blogger.php:195 +#: wp-admin/import/opml.php:84 +msgid "Importing..." +msgstr "Importation en cours…" + +#: wp-admin/import/blogger.php:196 +msgid "Set Authors" +msgstr "Définir les auteurs" + +#: wp-admin/import/blogger.php:197 +msgid "Preparing author mapping form..." +msgstr "Préparation du formulaire de correspondance d’auteurs…" + +#: wp-admin/import/blogger.php:198 +msgid "Final Step: Author Mapping" +msgstr "Étape finale : correspondance des auteurs" + +#: wp-admin/import/blogger.php:199 +msgid "Nothing was imported. Had you already imported this blog?" +msgstr "Rien n’a été importé. Avez-vous déjà importé ce blog ?" + +#: wp-admin/import/blogger.php:200 +msgid "Blogger Blogs" +msgstr "Blogs Blogger" + +#: wp-admin/import/blogger.php:201 +msgid "Blog Name" +msgstr "Nom du blog" + +#: wp-admin/import/blogger.php:202 +#: xmlrpc.php:392 +msgid "Blog URL" +msgstr "Adresse web du blog" + +#: wp-admin/import/blogger.php:203 +msgid "The Magic Button" +msgstr "Le Bouton Magique" + +#: wp-admin/import/blogger.php:204 +#: wp-admin/includes/template.php:871 +#: wp-admin/includes/template.php:891 +#: wp-admin/includes/template.php:902 +#: wp-admin/includes/template.php:3170 +#: wp-admin/menu.php:32 +msgid "Posts" +msgstr "Articles" + +#: wp-admin/import/blogger.php:206 +msgid "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." +msgstr "Cette fonctionnalité requiert JavaScript, mais il semble être désactivé. Veuillez l’activer dans votre navigateur, et recharger cette page. Ne vous inquiétez pas, vous pourrez le désactiver à nouveau une fois ceci terminé." + +#: wp-admin/import/blogger.php:656 +msgid "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." +msgstr "Tous les articles ont été importés avec l’utilisateur courant comme auteur. Utilisez ce formulaire pour assigner chaque article de l’utilisateur Blogger à un utilisateur WordPress différent. Vous pouvez ajouter des utilisateurs puis revenir à cette page afin de terminer la correspondance d’auteurs. Ce formulaire peut être utilisé autant de fois que nécessaire, jusqu’à ce que vous activiez la fonction « Relancer » ci-dessous." + +#: wp-admin/import/blogger.php:657 +msgid "Author mapping" +msgstr "Correspondance d’auteurs" + +#: wp-admin/import/blogger.php:659 +msgid "Blogger username" +msgstr "Identifiant du blogueur" + +#: wp-admin/import/blogger.php:660 +msgid "WordPress login" +msgstr "Connexion WordPress" + +#: wp-admin/import/blogger.php:718 +msgid "Could not connect to https://www.google.com" +msgstr "Impossible de se connecter à https://www.google.com" + +#: wp-admin/import/blogger.php:719 +msgid "There was a problem opening a secure connection to Google. This is what went wrong:" +msgstr "Un problème est survenu pendant l’ouverture d’une connexion sécurisée avec Google. Voici ce qui est arrivé :" + +#: wp-admin/import/blogger.php:730 +#, php-format +msgid "Could not connect to %s" +msgstr "Impossible de se connecter à %s" + +#: wp-admin/import/blogger.php:731 +msgid "There was a problem opening a connection to Blogger. This is what went wrong:" +msgstr "Un problème est survenu pendant l’ouverture d’une connexion vers Blogger. Voici ce qui est arrivé :" + +#: wp-admin/import/blogger.php:797 +msgid "Congratulations!" +msgstr "Bravo !" + +#: wp-admin/import/blogger.php:797 +msgid "Now that you have imported your Blogger blog into WordPress, what are you going to do? Here are some suggestions:" +msgstr "Maintenant que vous avez importé votre blog Blogger dans WordPress, qu’allez-vous faire ? Voici quelques suggestions :" + +#: wp-admin/import/blogger.php:797 +msgid "That was hard work! Take a break." +msgstr "C’était bien compliqué ! Faites une pause." + +#: wp-admin/import/blogger.php:799 +msgid "In case you haven’t done it already, you can import the posts from your other blogs:" +msgstr "Si vous ne l’avez pas encore fait, vous pouvez importer des articles depuis vos autres blogs :" + +#: wp-admin/import/blogger.php:801 +#, php-format +msgid "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." +msgstr "Allez à Auteurs & Utilisateurs, où vous pourrez modifier les nouveaux utilisateurs ou les supprimer. Si vous souhaitez que tous les articles importés vous soient affectés, il vous sera offert cette possibilité lorsque vous supprimerez les nouveaux utilisateurs." + +#: wp-admin/import/blogger.php:802 +msgid "For security, click the link below to reset this importer." +msgstr "Pour des raisons de sécurité, cliquez sur le lien ci-dessous pour ré-initialiser l’outil d’importation." + +#: wp-admin/import/blogger.php:833 +msgid "Restart" +msgstr "Relancer" + +#: wp-admin/import/blogger.php:834 +msgid "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." +msgstr "Nous avons enregistré quelques informations à propos de votre compte Blogger dans votre base de données WordPress. Pour recommencer depuis le début, effacez-les. Recommencer n’affectera pas les articles que vous avez déjà importés. Si vous tentez de réimporter un blog, les articles et commentaires en doublon ne seront pas pris en compte." + +#: wp-admin/import/blogger.php:835 +msgid "Clear account information" +msgstr "Effacer les informations du compte" + +#: wp-admin/import/blogger.php:885 +msgid "Blogger" +msgstr "Blogger" + +#: wp-admin/import/blogger.php:885 +msgid "Import posts, comments, and users from a Blogger blog." +msgstr "Importation d’articles, de commentaires et d’utilisateurs depuis un blog Blogger." + +#: wp-admin/import/blogware.php:25 +msgid "Import Blogware" +msgstr "Importer Blogware" + +#: wp-admin/import/blogware.php:40 +msgid "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." +msgstr "Salutations ! Cet outil d’importation vous permet d’extraire des articles depuis le fichier d’export XML de votre blog BlogWare. Choisissez le fichier à utiliser et cliquez sur Envoyer le fichier et l’importer." + +#: wp-admin/import/blogware.php:103 +#: wp-admin/import/mt.php:251 +#: wp-admin/import/wordpress.php:416 +#, php-format +msgid "Post %s already exists." +msgstr "L’article %s existe déjà." + +#: wp-admin/import/blogware.php:105 +#: wp-admin/import/mt.php:254 +#: wp-admin/import/wordpress.php:449 +#, php-format +msgid "Importing post %s..." +msgstr "Importation de l’article %s…" + +#: wp-admin/import/blogware.php:112 +#: wp-admin/import/rss.php:132 +msgid "Couldn’t get post ID" +msgstr "Impossible d’obtenir l’ID de l’article" + +#: wp-admin/import/blogware.php:158 +#, php-format +msgid "%s comment" +msgid_plural "%s comments" +msgstr[0] "(%s commentaire)" +msgstr[1] "(%s commentaires)" + +#: wp-admin/import/blogware.php:181 +#: wp-admin/import/livejournal.php:928 +#: wp-admin/import/mt.php:468 +#: wp-admin/import/rss.php:163 +#, php-format +msgid "All done. Have fun!" +msgstr "Terminé ! (Amusez-vous bien !)" + +#: wp-admin/import/blogware.php:214 +msgid "Blogware" +msgstr "Blogware" + +#: wp-admin/import/blogware.php:214 +msgid "Import posts from Blogware." +msgstr "Importation d’articles depuis Blogware." + +#: wp-admin/import/dotclear.php:96 +msgid "Import DotClear" +msgstr "Importation depuis DotClear" + +#: wp-admin/import/dotclear.php:97 +#: wp-admin/import/stp.php:21 +#: wp-admin/import/textpattern.php:57 +#: wp-admin/import/utw.php:22 +msgid "Steps may take a few minutes depending on the size of your database. Please be patient." +msgstr "Cette procédure peut prendre quelques minutes en fonction de la taille de votre base de données. Soyez patient." + +#: wp-admin/import/dotclear.php:107 +msgid "Howdy! This importer allows you to extract posts from a DotClear database into your blog. Mileage may vary." +msgstr "Salutations ! Cet outil d’importation vous permet d’extraire les articles d’un blog DotClear vers votre nouveau blog WordPress. Attention, la peinture est encore fraîche…" + +#: wp-admin/import/dotclear.php:108 +msgid "Your DotClear Configuration settings are as follows:" +msgstr "Vos options de configuration de DotClear sont les suivantes :" + +#: wp-admin/import/dotclear.php:112 +msgid "Import Categories" +msgstr "Importation des catégories" + +#: wp-admin/import/dotclear.php:185 +#: wp-admin/import/textpattern.php:180 +msgid "Importing Categories..." +msgstr "Importation des catégories en cours…" + +#: wp-admin/import/dotclear.php:209 +#: wp-admin/import/textpattern.php:204 +#, php-format +msgid "Done! %1$s category imported." +msgid_plural "Done! %1$s categories imported." +msgstr[0] "Terminé ! %1$s catégorie importée." +msgstr[1] "Terminé ! %1$s catégories importées." + +#: wp-admin/import/dotclear.php:212 +#: wp-admin/import/textpattern.php:207 +msgid "No Categories to Import!" +msgstr "Aucune catégorie à importer !" + +#: wp-admin/import/dotclear.php:226 +#: wp-admin/import/textpattern.php:221 +msgid "Importing Users..." +msgstr "Importation des utilisateurs en cours…" + +#: wp-admin/import/dotclear.php:283 +#: wp-admin/import/textpattern.php:276 +#, php-format +msgid "Done! %1$s users imported." +msgstr "Terminé ! « %1$s » utilisateur(s) importé(s)." + +#: wp-admin/import/dotclear.php:287 +#: wp-admin/import/textpattern.php:280 +msgid "No Users to Import!" +msgstr "Aucun utilisateur à importer !" + +#: wp-admin/import/dotclear.php:303 +#: wp-admin/import/textpattern.php:296 +msgid "Importing Posts..." +msgstr "Importation des articles en cours…" + +#: wp-admin/import/dotclear.php:386 +#: wp-admin/import/textpattern.php:370 +#, php-format +msgid "Done! %1$s posts imported." +msgstr "Terminé ! %1$s articles ont été importés." + +#: wp-admin/import/dotclear.php:401 +#: wp-admin/import/textpattern.php:385 +msgid "Importing Comments..." +msgstr "Importation des commentaires en cours…" + +#: wp-admin/import/dotclear.php:456 +#: wp-admin/import/textpattern.php:437 +#, php-format +msgid "Done! %1$s comments imported." +msgstr "Terminé ! %1$s commentaires ont été importés." + +#: wp-admin/import/dotclear.php:459 +#: wp-admin/import/textpattern.php:440 +msgid "No Comments to Import!" +msgstr "Pas de commentaire à importer !" + +#: wp-admin/import/dotclear.php:472 +#: wp-admin/import/textpattern.php:453 +msgid "Importing Links..." +msgstr "Importation des liens en cours…" + +#: wp-admin/import/dotclear.php:510 +#, php-format +msgid "Done! %s link or link category imported." +msgid_plural "Done! %s links or link categories imported." +msgstr[0] "Terminé ! %s lien et/ou catégorie de liens a été importé." +msgstr[1] "Terminé ! %s liens et/ou catégories de liens ont été importés." + +#: wp-admin/import/dotclear.php:514 +#: wp-admin/import/textpattern.php:493 +msgid "No Links to Import!" +msgstr "Aucun lien à importer !" + +#: wp-admin/import/dotclear.php:529 +#: wp-admin/import/textpattern.php:508 +msgid "Import Users" +msgstr "Importer des utilisateurs" + +#: wp-admin/import/dotclear.php:542 +#: wp-admin/import/textpattern.php:521 +msgid "Import Posts" +msgstr "Importer des articles" + +#: wp-admin/import/dotclear.php:556 +#: wp-admin/import/textpattern.php:535 +msgid "Import Comments" +msgstr "Importer des commentaires" + +#: wp-admin/import/dotclear.php:568 +#: wp-admin/import/textpattern.php:547 +msgid "Import Links" +msgstr "Importer des liens" + +#: wp-admin/import/dotclear.php:581 +#: wp-admin/import/textpattern.php:560 +msgid "Finish" +msgstr "Terminé" + +#: wp-admin/import/dotclear.php:605 +msgid "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." +msgstr "Bienvenue sur WordPress. Nous espérons que vous trouverez cette plateforme incroyablement intéressante (et nous en sommes sûrs) ! En tant que nouvel utilisateur de WordPress provenant de DotClear, il y a quelques points que nous voudrions vous préciser. Nous espérons que cela vous aidera dans votre transition." + +#: wp-admin/import/dotclear.php:606 +#: wp-admin/import/textpattern.php:584 +#: wp-admin/menu.php:87 +#: wp-admin/users.php:18 +msgid "Users" +msgstr "Utilisateurs" + +#: wp-admin/import/dotclear.php:607 +#, php-format +msgid "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 Login and change it." +msgstr "Vous avez déjà installé WordPress et il vous a été communiqué un identifiant d’administration et un mot de passe. Oubliez-les. Vous n’aviez pas cet identifiant dans DotClear donc pourquoi l’auriez-vous ici ? Nous avons donc pris soin d’importer tous vos utilisateurs dans votre système. Hélas, il y a un inconvénient. WordPress et DotClear utilisent tous deux des clefs fortes d’encryptage sur les mots de passe et il nous est impossible de les décrypter. Nous vous avons donc affecté un mot de passe temporaire. Tous les utilisateurs ont conservé leur identifiant, mais ils ont à présent un mot de passe commun qui est password123. Vous devez donc vous connecter et les changer." + +#: wp-admin/import/dotclear.php:608 +#: wp-admin/import/textpattern.php:586 +msgid "Preserving Authors" +msgstr "Conserver les auteurs" + +#: wp-admin/import/dotclear.php:609 +#: wp-admin/import/textpattern.php:587 +msgid "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." +msgstr "Deuxièmement, nous nous sommes efforcés de conserver vos auteurs. Si vous êtes le seul auteur ou contributeur de votre blog, vous êtes tranquille. Dans la plupart des cas, nous parvenons à les conserver. Cependant, si nous ne sommes pas certains du nom de l’auteur à cause des différence de gestion d’une base de données à l’autre, nous vous l’affectons à vous, l’administrateur." + +#: wp-admin/import/dotclear.php:610 +#: wp-admin/import/textpattern.php:588 +msgid "Textile" +msgstr "Textile" + +#: wp-admin/import/dotclear.php:611 +msgid "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." +msgstr "Également, comme vous venez de DotClear, vous avez probablement utilisé Textile pour formatter vos commentaires et vos articles. Si c’est le cas, nous vous recommandons de télécharger et installer Textile pour WordPress. Faites-moi confiance… Vous allez apprécier." + +#: wp-admin/import/dotclear.php:612 +#: wp-admin/import/textpattern.php:590 +msgid "WordPress Resources" +msgstr "Ressources WordPress" + +#: wp-admin/import/dotclear.php:613 +#: wp-admin/import/textpattern.php:591 +msgid "Finally, there are numerous WordPress resources around the internet. Some of them are:" +msgstr "Et enfin, il y a de nombreux sites dédiés à WordPress sur Internet. Parmi ceux-ci, nous vous indiquons :" + +#: wp-admin/import/dotclear.php:615 +#: wp-admin/import/textpattern.php:593 +msgid "The official WordPress site" +msgstr "Site officiel de WordPress" + +#: wp-admin/import/dotclear.php:616 +#: wp-admin/import/textpattern.php:594 +msgid "The WordPress support forums" +msgstr "Forum WordPress d’entraide en français" + +#: wp-admin/import/dotclear.php:617 +#: wp-admin/import/textpattern.php:595 +msgid "The Codex (In other words, the WordPress Bible)" +msgstr "Le Codex (en d’autres termes, la Bible de WordPress) (également disponible en français)" + +#: wp-admin/import/dotclear.php:619 +#: wp-admin/import/textpattern.php:597 +#, php-format +msgid "That’s it! What are you waiting for? Go login!" +msgstr "Et voilà ! Qu’attendez-vous ? Allez vous identifier !" + +#: wp-admin/import/dotclear.php:625 +msgid "DotClear Database User:" +msgstr "Utilisateur de la base de données de DotClear :" + +#: wp-admin/import/dotclear.php:626 +msgid "DotClear Database Password:" +msgstr "Mot de passe de la base de données de DotClear :" + +#: wp-admin/import/dotclear.php:627 +msgid "DotClear Database Name:" +msgstr "Nom de la base de données de DotClear :" + +#: wp-admin/import/dotclear.php:628 +msgid "DotClear Database Host:" +msgstr "Hôte de la base de données de DotClear :" + +#: wp-admin/import/dotclear.php:629 +msgid "DotClear Table prefix:" +msgstr "Préfixe des tables de la base de données de DotClear :" + +#: wp-admin/import/dotclear.php:630 +msgid "Originating character set:" +msgstr "Jeu de caractères d’origine :" + +#: wp-admin/import/dotclear.php:727 +msgid "DotClear" +msgstr "DotClear" + +#: wp-admin/import/dotclear.php:727 +msgid "Import categories, users, posts, comments, and links from a DotClear blog." +msgstr "Importation des catégories, utilisateurs, articles, commentaires et liens depuis un blog DotClear." + +#: wp-admin/import/greymatter.php:24 +msgid "Import GreyMatter" +msgstr "Importation depuis GreyMatter" + +#: wp-admin/import/greymatter.php:34 +msgid "This is a basic GreyMatter to WordPress import script." +msgstr "Ceci est un importateur simple de GreyMatter vers WordPress." + +#: wp-admin/import/greymatter.php:35 +msgid "What it does:" +msgstr "Ce qu’il fait :" + +#: wp-admin/import/greymatter.php:37 +msgid "Parses gm-authors.cgi to import (new) authors. Everyone is imported at level 1." +msgstr "Parcourir gm-authors.cgi pour importer les (nouveaux) auteurs. Ils seront tous placés au niveau 1." + +#: wp-admin/import/greymatter.php:38 +msgid "Parses the entries cgi files to import posts, comments, and karma on posts (although karma is not used on WordPress yet).
    If authors are found not to be in gm-authors.cgi, imports them at level 0." +msgstr "Parcourir les fichiers CGI « entries » pour importer les articles, les commentaires et les points de karma des articles (bien que le karma n’est pas utilisé sur WordPress pour le moment).
    Si des auteurs d’articles ne sont pas dans gm-authors.cgi, ils seront placés au niveau 0." + +#: wp-admin/import/greymatter.php:39 +msgid "Detects duplicate entries or comments. If you don't import everything the first time, or this import should fail in the middle, duplicate entries will not be made when you try again." +msgstr "Détecter les articles ou commentaires en double. Si tout n’est pas importé du premier coup, et si l’importation s’arrête au milieu, vous pouvez le relancer sans craindre de voir apparaître des doublons." + +#: wp-admin/import/greymatter.php:41 +msgid "What it does not:" +msgstr "Ce qu’il ne fait pas :" + +#: wp-admin/import/greymatter.php:43 +msgid "Parse gm-counter.cgi, gm-banlist.cgi, gm-cplog.cgi (you can make a CP log hack if you really feel like it, but I question the need of a CP log)." +msgstr "Parcourir gm-counter.cgi, gm-banlist.cgi, gm-cplog.cgi (vous pouvez écrire un hack pour créer un log CP si vous le voulez vraiment, mais je doute de l’intérêt du log CP)." + +#: wp-admin/import/greymatter.php:44 +msgid "Import gm-templates." +msgstr "Importation depuis gm-templates." + +#: wp-admin/import/greymatter.php:45 +msgid "Doesn't keep entries on top." +msgstr "Ne conserve pas les articles en première position." + +#: wp-admin/import/greymatter.php:53 +msgid "Second step: GreyMatter details:" +msgstr "Seconde étape : détails de GreyMatter :" + +#: wp-admin/import/greymatter.php:56 +msgid "Path to GM files:" +msgstr "Chemin des fichiers GM :" + +#: wp-admin/import/greymatter.php:60 +msgid "Path to GM entries:" +msgstr "Chemin des entrées GM :" + +#: wp-admin/import/greymatter.php:64 +msgid "Last entry’s number:" +msgstr "Numéro de la dernière entrée :" + +#: wp-admin/import/greymatter.php:66 +msgid "This importer will search for files 00000001.cgi to 000-whatever.cgi,
    so you need to enter the number of the last GM post here.
    (if you don’t know that number, just log into your FTP and look it out
    in the entries’ folder)" +msgstr "Cet importateur va chercher les fichiers 00000001.cgi jusqu’à 000-n’importe.cgi,
    donc vous devez saisir le numéro du dernier article GM ici.
    (si vous ne le connaissez pas, connectez-vous à votre serveur FTP et cherchez-le dans le dossier « entries »)" + +#: wp-admin/import/greymatter.php:69 +msgid "Start Importing" +msgstr "Import en cours" + +#: wp-admin/import/greymatter.php:102 +msgid "Wrong path, the path to the GM entries does not exist on the server" +msgstr "Mauvais chemin, ce chemin vers les entrées de GM n’existe pas sur le serveur" + +#: wp-admin/import/greymatter.php:105 +msgid "Wrong path, the path to the GM files does not exist on the server" +msgstr "Mauvais chemin, ce chemin vers les fichiers de GM n’existe pas sur le serveur" + +#: wp-admin/import/greymatter.php:111 +msgid "The importer is running..." +msgstr "L’importateur est en cours de route…" + +#: wp-admin/import/greymatter.php:113 +msgid "importing users..." +msgstr "importation des utilisateurs en cours…" + +#: wp-admin/import/greymatter.php:137 +#, php-format +msgid "user %s" +msgstr "utilisateur %s" + +#: wp-admin/import/greymatter.php:137 +msgid "Already exists" +msgstr "Existe déjà" + +#: wp-admin/import/greymatter.php:146 +#, php-format +msgid "user %s..." +msgstr "utilisateur %s…" + +#: wp-admin/import/greymatter.php:146 +#: wp-admin/import/greymatter.php:149 +#: wp-admin/import/greymatter.php:294 +#: wp-admin/import/greymatter.php:299 +msgid "Done" +msgstr "Terminé" + +#: wp-admin/import/greymatter.php:150 +msgid "importing posts, comments, and karma..." +msgstr "importation des articles, commentaires et karma en cours…" + +#: wp-admin/import/greymatter.php:186 +#, php-format +msgid "entry # %s : %s : by %s" +msgstr "entrée n°%s : %s : par %s" + +#: wp-admin/import/greymatter.php:214 +msgid "(already exists)" +msgstr "(existe déjà)" + +#: wp-admin/import/greymatter.php:236 +#, php-format +msgid "registered deleted user %s at level 0 " +msgstr "utilisateur supprimé %s enregistré au niveau 0" + +#: wp-admin/import/greymatter.php:286 +#, php-format +msgid "imported %s comment" +msgid_plural "imported %s comments" +msgstr[0] "importé %s commentaire" +msgstr[1] "importés %s commentaires" + +#: wp-admin/import/greymatter.php:291 +#, php-format +msgid "ignored %s pre-existing comment" +msgid_plural "ignored %s pre-existing comments" +msgstr[0] "ignoré %s commentaire pré-existant" +msgstr[1] "ignoré %s commentaires pré-existants" + +#: wp-admin/import/greymatter.php:301 +msgid "Completed GreyMatter import!" +msgstr "Importation GreyMatter terminée !" + +#: wp-admin/import/greymatter.php:333 +msgid "GreyMatter" +msgstr "GreyMatter" + +#: wp-admin/import/greymatter.php:333 +msgid "Import users, posts, and comments from a Greymatter blog." +msgstr "Importation d’utilisateurs, d’articles et de commentaires depuis un blog Greymatter." + +#: wp-admin/import/livejournal.php:171 +msgid "Import LiveJournal" +msgstr "Importation depuis LiveJournal" + +#: wp-admin/import/livejournal.php:185 +msgid "It looks like you attempted to import your LiveJournal posts previously and got interrupted." +msgstr "Apparemment vous avez essayé d’importer vos articles LiveJournal précédemment et vous avez été interrompu." + +#: wp-admin/import/livejournal.php:187 +msgid "Continue previous import" +msgstr "Continuer l’importation commencée précédemment" + +#: wp-admin/import/livejournal.php:189 +msgid "Cancel & start a new import" +msgstr "Annuler & Commencer une nouvelle importation" + +#: wp-admin/import/livejournal.php:194 +msgid "Howdy! This importer allows you to connect directly to LiveJournal and download all your entries and comments" +msgstr "Salutations, cet importateur vous permet de vous connecter directement à LiveJournal et télécharger tous vos articles et commentaires." + +#: wp-admin/import/livejournal.php:195 +msgid "Enter your LiveJournal username and password below so we can connect to your account:" +msgstr "Saisir votre identifiant LiveJournal et votre mot de passe ci-dessous afin de vous connecter à votre compte :" + +#: wp-admin/import/livejournal.php:200 +msgid "LiveJournal Username" +msgstr "Identifiant de LiveJournal" + +#: wp-admin/import/livejournal.php:205 +msgid "LiveJournal Password" +msgstr "Mot de passe de LiveJournal" + +#: wp-admin/import/livejournal.php:211 +msgid "If you have any entries on LiveJournal which are marked as private, they will be password-protected when they are imported so that only people who know the password can see them." +msgstr "Si vous avez des articles sur LiveJournal marqué comme privé, ils seront protégés par un mot de passe lors de l’importation si bien que seules les personnes connaissant les mots de passe pourront les voir." + +#: wp-admin/import/livejournal.php:212 +msgid "If you don’t enter a password, ALL ENTRIES from your LiveJournal will be imported as public posts in WordPress." +msgstr "Si vous ne saisissez pas de mot de passe, tous les articles de LiveJournal seront insérés comme des articles publics dans WordPress." + +#: wp-admin/import/livejournal.php:213 +msgid "Enter the password you would like to use for all protected entries here:" +msgstr "Saisir le mot de passe que vous voulez utiliser pour tous les articles protégés ici :" + +#: wp-admin/import/livejournal.php:217 +msgid "Protected Post Password" +msgstr "Article protégé par un mot de passe" + +#: wp-admin/import/livejournal.php:223 +msgid "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." +msgstr "Attention: cette étape peut prendre un certain temps si vous possédez beaucoup d’articles dans votre LiveJournal, ou beaucoup de commentaires. Idéalement, vous pouvez lancer ce processus d’importation et laissez votre ordinateur travailler jusqu’à la fin de l’importation." + +#: wp-admin/import/livejournal.php:226 +msgid "Connect to LiveJournal and Import" +msgstr "Se connecter à LiveJournal et importer le contenu" + +#: wp-admin/import/livejournal.php:229 +msgid "NOTE: If the import process is interrupted for any reason, come back to this page and it will continue from where it stopped automatically." +msgstr "Note : si le processus d’importation est interrompu pour n’importe quelle raison, revenez sur la page précédente et le script reprendra automatiquement là où il s’est arrêté." + +#: wp-admin/import/livejournal.php:232 +msgid "NOTE: You appear to have JavaScript disabled, so you will need to manually click through each step of this importer. If you enable JavaScript, it will step through automatically." +msgstr "NOTE : il semble que JavaScript est désactivé dans votre navigateur. Il vous faudra alors progresser manuellement entre les étapes de l’importateur. Si vous activez JavaScript, l’importateur progressera automatiquement." + +#: wp-admin/import/livejournal.php:277 +msgid "Post metadata has been downloaded, proceeding with posts..." +msgstr "Les métadonnées des articles ont été téléchargées, passons aux articles." + +#: wp-admin/import/livejournal.php:375 +#, php-format +msgid "Post %s already exists." +msgstr "L’article %s existe déjà." + +#: wp-admin/import/livejournal.php:377 +#, php-format +msgid "Imported post %s..." +msgstr "Article %s importé... " + +#: wp-admin/import/livejournal.php:386 +msgid "Couldn’t get post ID (creating post failed!)" +msgstr "Impossible d’obtenir l’ID de l’article (la création de l’article a échoué !)" + +#: wp-admin/import/livejournal.php:388 +msgid "Failed to create post." +msgstr "La création de l’article a échoué." + +#: wp-admin/import/livejournal.php:433 +msgid "Could not get a cookie from LiveJournal. Please try again soon." +msgstr "Échec lors de la récupération du cookie depuis LiveJournal. Merci de réessayer ultérieurement." + +#: wp-admin/import/livejournal.php:454 +msgid "Failed to retrieve comment meta information from LiveJournal. Please try again soon." +msgstr "Échec lors de la récupération des informations métas des commentaires depuis LiveJournal. Merci de réessayer ultérieurement." + +#: wp-admin/import/livejournal.php:462 +msgid "You have no comments to import!" +msgstr "Vous n’avez aucun commentaire à importer !" + +#: wp-admin/import/livejournal.php:489 +msgid " Comment metadata downloaded successfully, proceeding with comment bodies..." +msgstr "Les métadonnées des commentaires ont été correctement téléchargées, passons au contenu des commentaires..." + +#: wp-admin/import/livejournal.php:514 +msgid "Failed to retrieve comment bodies from LiveJournal. Please try again soon." +msgstr "Échec lors de la récupération du contenu des commentaires depuis LiveJournal. Merci de réessayer ultérieurement." + +#: wp-admin/import/livejournal.php:596 +#: wp-admin/import/livejournal.php:604 +#: wp-includes/comment-template.php:29 +#: wp-includes/theme.php:229 +msgid "Anonymous" +msgstr "Anonyme" + +#: wp-admin/import/livejournal.php:656 +msgid "LiveJournal is not responding to authentication requests. Please wait a while and then try again." +msgstr "LiveJournal ne répond actuellement pas aux demandes d’authentification. Veuillez patienter quelques temps, puis relancer l’importateur." + +#: wp-admin/import/livejournal.php:666 +msgid "XML-RPC Request Failed -- " +msgstr "La requête XML-RPC a échoué - " + +#: wp-admin/import/livejournal.php:726 +msgid "Please enter your LiveJournal username and password so we can download your posts and comments." +msgstr "Merci de saisir votre identifiant LiveJournal et votre mot de passe si vous souhaitez télécharger vos articles et vos commentaires." + +#: wp-admin/import/livejournal.php:727 +#: wp-admin/import/livejournal.php:739 +msgid "Start again" +msgstr "Recommencer" + +#: wp-admin/import/livejournal.php:738 +msgid "Logging in to LiveJournal failed. Check your username and password and try again." +msgstr "La connexion à LiveJournal a échoué. Merci de vérifier votre identifiant et votre mot de passe et réessayez." + +#: wp-admin/import/livejournal.php:780 +msgid "Importing Posts" +msgstr "Importation des articles" + +#: wp-admin/import/livejournal.php:781 +msgid "We’re downloading and importing your LiveJournal posts..." +msgstr "Nous sommes en train de télécharger et importer vos articles LiveJournal..." + +#: wp-admin/import/livejournal.php:785 +#, php-format +msgid "Imported post batch %d of approximately %d" +msgstr "Importé le lot d’articles %d sur approximativement %d" + +#: wp-admin/import/livejournal.php:803 +msgid "Uh oh – LiveJournal has disconnected us because we made too many requests to their servers too quickly." +msgstr "Hé ho – LiveJournal vous a déconnecté de leurs serveurs, car vous avez effectué trop de requêtes sur un court laps de temps." + +#: wp-admin/import/livejournal.php:804 +msgid "We’ve saved where you were up to though, so if you come back to this importer in about 30 minutes, you should be able to continue from where you were." +msgstr "Nous avons cependant enregistré où vous en étiez, donc si vous revenez à cet importateur dans environ 30 minutes, vous devriez être capables de continuer d’où vous étiez." + +#: wp-admin/import/livejournal.php:806 +#: wp-admin/import/livejournal.php:936 +msgid "Try Again" +msgstr "Recommencez" + +#: wp-admin/import/livejournal.php:819 +#: wp-admin/import/livejournal.php:869 +msgid "Import the next batch" +msgstr "Importer le lot suivant" + +#: wp-admin/import/livejournal.php:824 +msgid "Your posts have all been imported, but wait – there’s more! Now we need to download & import your comments." +msgstr "Tous vos articles ont été importés. Mais attendez, ce n’est pas terminé ! Maintenant nous allons procéder à l’importation de vos commentaires." + +#: wp-admin/import/livejournal.php:825 +msgid "Download my comments »" +msgstr "Télécharger mes commentaires »" + +#: wp-admin/import/livejournal.php:840 +msgid "Downloading Comments" +msgstr "Téléchargement des commentaires" + +#: wp-admin/import/livejournal.php:841 +msgid "Now we will download your comments so we can import them (this could take a long time if you have lots of comments)..." +msgstr "Maintenant, nous allons télécharger vos commentaires pour les importer (cela peut durer longtemps si vous avez beaucoup de commentaires)..." + +#: wp-admin/import/livejournal.php:866 +#, php-format +msgid "Imported comment batch %d of approximately %d" +msgstr "Importé le lot de commentaires %d sur approximativement %d" + +#: wp-admin/import/livejournal.php:874 +msgid "Your comments have all been imported now, but we still need to rebuild your conversation threads." +msgstr "Vos commentaires ont maintenant tous été importés, mais nous allons devons encore reconstruire le fil de vos conversations." + +#: wp-admin/import/livejournal.php:875 +msgid "Rebuild my comment threads »" +msgstr "Reconstruire le fil de mes commentaires »" + +#: wp-admin/import/livejournal.php:888 +msgid "Threading Comments" +msgstr "Imbrication des commentaires" + +#: wp-admin/import/livejournal.php:889 +msgid "We are now re-building the threading of your comments (this can also take a while if you have lots of comments)..." +msgstr "Nous sommes maintenant en train de reconstuire la hiérarchie de vos commentaires (cela prendre du temps si vous avez beaucoup de commentaires)..." + +#: wp-admin/import/livejournal.php:926 +#, php-format +msgid "Successfully re-threaded %s comments." +msgstr "%s commentaires hiérarchisés avec succès." + +#: wp-admin/import/livejournal.php:961 +#: wp-admin/import/livejournal.php:989 +#, php-format +msgid "Continuing in %d" +msgstr "Continuer dans %d" + +#: wp-admin/import/livejournal.php:966 +msgid "Continuing" +msgstr "Continuer" + +#: wp-admin/import/livejournal.php:995 +msgid "Processing next batch." +msgstr "Traiter le lot suivant." + +#: wp-admin/import/livejournal.php:1053 +msgid "LiveJournal" +msgstr "LiveJournal" + +#: wp-admin/import/livejournal.php:1053 +msgid "Import posts from LiveJournal using their API." +msgstr "Importation d’articles depuis LiveJournal en utilisant leur API." + +#: wp-admin/import/mt.php:28 +msgid "Import Movable Type or TypePad" +msgstr "Importation depuis Movable Type ou TypePad" + +#: wp-admin/import/mt.php:39 +msgid "Howdy! We’re about to begin importing all of your Movable Type or Typepad entries into WordPress. To begin, either choose a file to upload and click “Upload file and import”, or use FTP to upload your MT export file as mt-export.txt in your /wp-content/ directory and then click \"Import mt-export.txt\"" +msgstr "Salutations ! Nous sommes sur le point de procéder à l’importation de toutes vos entrées Movable Type ou TypePad vers WordPress. Pour commencer, sélectionnez un fichier à envoyer et cliquez sur Envoyer le fichier et l’importer. Autre possibilité : utilisez un logiciel FTP pour envoyer votre fichier d’exportation MT avec comme nom mt-export.txt dans le dossier /wp-content/ et cliquez sur « Importer mt-export.txt »." + +#: wp-admin/import/mt.php:47 +msgid "Or use mt-export.txt in your /wp-content/ directory" +msgstr "Ou placez mt-export.txt dans votre dossier /wp-content/ " + +#: wp-admin/import/mt.php:49 +msgid "Import mt-export.txt" +msgstr "Importer mt-export.txt" + +#: wp-admin/import/mt.php:52 +msgid "The importer is smart enough not to import duplicates, so you can run this multiple times without worry if—for whatever reason—it doesn’t finish. If you get an out of memory error try splitting up the import file into pieces." +msgstr "L’outil d’importation est suffisamment intelligent pour ne pas importer les doublons, donc vous pouvez le lancer plusieurs fois sans vous soucier s’il s’interrompait en cours de route, pour n’importe quelle raison. Si vous obtenez une erreur manque de mémoire, essayez de découper le fichier à importer en plusieurs morceaux." + +#: wp-admin/import/mt.php:62 +#: wp-admin/import/wordpress.php:256 +#: wp-admin/includes/template.php:2484 +#: wp-admin/options-reading.php:44 +#: wp-admin/options-reading.php:45 +msgid "- Select -" +msgstr "- Choisir -" + +#: wp-admin/import/mt.php:196 +#: wp-admin/import/wordpress.php:202 +msgid "Assign Authors" +msgstr "Assigner les auteurs" + +#: wp-admin/import/mt.php:197 +msgid "To make it easier for you to edit and save the imported posts and drafts, you may want to change the name of the author of the posts. For example, you may want to import all the entries as admin’s entries." +msgstr "De façon à vous faciliter la modification et validation des articles importés et des brouillons, il se peut que vous vouliez changer le nom des auteurs des articles. Par exemple, vous pourriez importer tous les articles comme articles de l’admin." + +#: wp-admin/import/mt.php:198 +msgid "Below, you can see the names of the authors of the MovableType posts in 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." +msgstr "Ci-dessous, vous pouvez apercevoir les noms des auteurs des articles Movable Type en italique. Pour chacun de ces noms, vous pouvez soit sélectionner un auteur de votre intallation WordPress dans le menu, soit saisir un nom d’auteur dans la zone de texte." + +#: wp-admin/import/mt.php:199 +#: wp-admin/import/wordpress.php:206 +msgid "If a new user is created by WordPress, a password will be randomly generated. Manually change the user’s details if necessary." +msgstr "Si un nouvel utilisateur est créé par WordPress, un mot de passe sera généré aléatoirement. Vous pouvez modifier manuellement les détails de l’utilisateur si besoin." + +#: wp-admin/import/mt.php:210 +msgid "Current author:" +msgstr "Auteur actuel :" + +#: wp-admin/import/mt.php:210 +#: wp-admin/import/wordpress.php:245 +#, php-format +msgid "Create user %1$s or map to existing" +msgstr "Création de l’utilisateur %1$s, ou mise en correspondance avec l’existant" + +#: wp-admin/import/mt.php:215 +#: wp-admin/import/wordpress.php:236 +#: wp-admin/includes/dashboard.php:135 +#: wp-includes/post-template.php:1147 +msgid "Submit" +msgstr "Envoyer" + +#: wp-admin/import/mt.php:225 +msgid "mt-export.txt does not exist" +msgstr "mt-export.txt n’existe pas" + +#: wp-admin/import/mt.php:231 +msgid "Sorry, there has been an error" +msgstr "Désolé, il y a eu une erreur" + +#: wp-admin/import/mt.php:272 +#, php-format +msgid "
    Adding tags %s..." +msgstr "
    Ajout des mots-clefs %s…" + +#: wp-admin/import/mt.php:291 +#: wp-admin/import/wordpress.php:532 +#, php-format +msgid "(%s comment)" +msgid_plural "(%s comments)" +msgstr[0] "(%s commentaire)" +msgstr[1] "(%s commentaires)" + +#: wp-admin/import/mt.php:308 +#, php-format +msgid "(%s ping)" +msgid_plural "(%s pings)" +msgstr[0] "(%s ping)" +msgstr[1] "(%s pings)" + +#: wp-admin/import/mt.php:513 +msgid "Movable Type and TypePad" +msgstr "Movable Type et TypePad" + +#: wp-admin/import/mt.php:513 +msgid "Import posts and comments from a Movable Type or Typepad blog." +msgstr "Importation d’articles et de commentaires depuis un blog Movable Type ou TypePad." + +#: wp-admin/import/opml.php:14 +msgid "Import Blogroll" +msgstr "Importer une liste de liens (blogroll)" + +#: wp-admin/import/opml.php:35 +msgid "Import your blogroll from another system" +msgstr "Importer une liste de liens (blogroll) depuis un autre système" + +#: wp-admin/import/opml.php:39 +msgid "If a program or website you use allows you to export your links or subscriptions as OPML you may import them here." +msgstr "Si un programme ou un site que vous utilisez vous autorise à exporter vos liens au format OPML, vous pouvez les importer ici." + +#: wp-admin/import/opml.php:44 +msgid "Specify an OPML URL:" +msgstr "Indiquez une adresse web d’OPML :" + +#: wp-admin/import/opml.php:49 +msgid "Or choose from your local disk:" +msgstr "…ou choisissez un fichier local sur votre disque dur :" + +#: wp-admin/import/opml.php:55 +msgid "Now select a category you want to put these links in." +msgstr "Sélectionnez maintenant la catégorie dans laquelle vous voulez mettre ces liens." + +#: wp-admin/import/opml.php:56 +msgid "Category:" +msgstr "Catégorie :" + +#: wp-admin/import/opml.php:67 +msgid "Import OPML File" +msgstr "Importer le fichier OPML" + +#: wp-admin/import/opml.php:125 +#, php-format +msgid "Inserted %s" +msgstr "%s inséré" + +#: wp-admin/import/opml.php:129 +#, php-format +msgid "Inserted %1$d links into category %2$s. All done! Go manage those links." +msgstr "Insertion de %1$d liens dans la catégorie %2$s. Terminé ! Allez gérer ces liens." + +#: wp-admin/import/opml.php:135 +msgid "You need to supply your OPML url. Press back on your browser and try again" +msgstr "Vous devez donner l’adresse web de votre fichier OPML. Cliquez sur le bouton de retour de votre navigateur et réessayez." + +#: wp-admin/import/opml.php:154 +#: wp-admin/includes/upgrade.php:107 +msgid "Blogroll" +msgstr "Liens" + +#: wp-admin/import/opml.php:154 +msgid "Import links in OPML format." +msgstr "Importation de liens au format OPML" + +#: wp-admin/import/rss.php:26 +msgid "Import RSS" +msgstr "Importer un flux RSS" + +#: wp-admin/import/rss.php:41 +msgid "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." +msgstr "Salutations ! Cet outil d’import vous permet d’extraire des articles depuis n’importe quel fichier RSS 2.0 vers votre blog. Ceci est utile si vous souhaitez importer vos articles depuis un système pour lequel il n’existe pas d’outil d’import. Choisissez un fichier RSS à utiliser et cliquez sur Importer." + +#: wp-admin/import/rss.php:121 +msgid "Importing post..." +msgstr "Importation de l’article en cours…" + +#: wp-admin/import/rss.php:126 +msgid "Post already imported" +msgstr "Cet article a déjà été importé" + +#: wp-admin/import/rss.php:138 +msgid "Done !" +msgstr "Terminé !" + +#: wp-admin/import/rss.php:197 +#: wp-includes/default-widgets.php:690 +msgid "RSS" +msgstr "Flux" + +#: wp-admin/import/rss.php:197 +msgid "Import posts from an RSS feed." +msgstr "Importation d’articles depuis un flux RSS." + +#: wp-admin/import/stp.php:20 +msgid "Import Simple Tagging" +msgstr "Importer depuis Simple Tagging" + +#: wp-admin/import/stp.php:30 +msgid "Howdy! This imports tags from Simple Tagging 1.6.2 into WordPress tags." +msgstr "Salutations ! Cet outil importe dans ce blog les mots-clefs en provenance d’une installation existante de Simple Tagging 1.6.2, dans les mots-clefs WordPress." + +#: wp-admin/import/stp.php:31 +msgid "This has not been tested on any other versions of Simple Tagging. Mileage may vary." +msgstr "Ceci n’a pas été testé avec les autres versions de Simple Tagging. La peinture est encore fraîche…" + +#: wp-admin/import/stp.php:32 +msgid "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!" +msgstr "Pour faciliter la prise en compte de grosses bases de données, typiques des blogueurs qui mettent des mots-clefs à tout va, nous avons conçu cet outil sous la forme d’une suite de 5 étapes, afin de vous débarrassez de cette mauvaise habitude qu’est Simple Tagging. Vous n’avez qu’à cliquer, et nous vous ferons savoir lorsque vous serez purifié !" + +#: wp-admin/import/stp.php:33 +#: wp-admin/import/utw.php:34 +msgid "Don’t be stupid - backup your database before proceeding!" +msgstr "Ne faites pas l’idiot, faites une sauvegarde de votre base de données avant de vous lancer !" + +#: wp-admin/import/stp.php:36 +#: wp-admin/import/utw.php:36 +msgid "Step 1" +msgstr "Étape 1" + +#: wp-admin/import/stp.php:73 +msgid "Reading STP Post Tags…" +msgstr "Lecture des mots-clefs STP d’article…" + +#: wp-admin/import/stp.php:80 +#: wp-admin/import/utw.php:138 +msgid "No posts were found to have tags!" +msgstr "Aucun article ne semble avoir de mot-clef !" + +#: wp-admin/import/stp.php:91 +#: wp-admin/import/utw.php:153 +#, php-format +msgid "Done! %s tag to post relationships were read." +msgid_plural "Done! %s tags to post relationships were read." +msgstr[0] "Terminé ! %s relation mot-clef/article a été établie." +msgstr[1] "Terminé ! %s relations mots-clefs/articles ont été établies." + +#: wp-admin/import/stp.php:96 +#: wp-admin/import/utw.php:123 +msgid "Step 2" +msgstr "Étape 2" + +#: wp-admin/import/stp.php:104 +#: wp-admin/import/utw.php:169 +msgid "Adding Tags to Posts…" +msgstr "Ajout des mots-clefs aux articles…" + +#: wp-admin/import/stp.php:109 +#, php-format +msgid "Done! %s tag was added!" +msgid_plural "Done! %s tags were added!" +msgstr[0] "Terminé ! %s mot-clef a été ajouté !" +msgstr[1] "Terminé ! %s mots-clefs ont été ajoutés !" + +#: wp-admin/import/stp.php:112 +#: wp-admin/import/utw.php:159 +msgid "Step 3" +msgstr "Étape 3" + +#: wp-admin/import/stp.php:154 +#: wp-admin/import/utw.php:264 +msgid "Import Complete!" +msgstr "Importation terminée !" + +#: wp-admin/import/stp.php:155 +msgid "OK, so we lied about this being a 4-step program! You’re done!" +msgstr "Bon, en fait on vous a menti à propos de ces 4 étapes ! C’est terminé !" + +#: wp-admin/import/stp.php:156 +#: wp-admin/import/utw.php:268 +msgid "Now wasn’t that easy?" +msgstr "Voilà, c’était plutôt facile, non ?" + +#: wp-admin/import/stp.php:169 +msgid "Import Simple Tagging tags into WordPress tags." +msgstr "Importation des mots-clefs de Simple Tagging dans les mots-clefs WordPress." + +#: wp-admin/import/textpattern.php:56 +msgid "Import Textpattern" +msgstr "Importation depuis Textpattern" + +#: wp-admin/import/textpattern.php:67 +msgid "Howdy! This imports categories, users, posts, comments, and links from any Textpattern 4.0.2+ into this blog." +msgstr "Salutations ! Cet outil importe les catégories, utilisateurs, commentaires et liens de n’importe quel blog Textpattern 4.0.2 et plus." + +#: wp-admin/import/textpattern.php:68 +msgid "This has not been tested on previous versions of Textpattern. Mileage may vary." +msgstr "Ceci n’a pas été testé avec les versions précédentes de Textpattern. La peinture est encore fraîche…" + +#: wp-admin/import/textpattern.php:69 +msgid "Your Textpattern Configuration settings are as follows:" +msgstr "Vos options de configuration de Textpattern sont les suivantes :" + +#: wp-admin/import/textpattern.php:489 +#, php-format +msgid "Done! %s link imported" +msgid_plural "Done! %s links imported" +msgstr[0] "Terminé ! %1$s lien a été importé." +msgstr[1] "Terminé ! %1$s liens ont été importés." + +#: wp-admin/import/textpattern.php:583 +msgid "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." +msgstr "Bienvenue sur WordPress. Nous espérons que vous trouverez cette plateforme incroyablement intéressante (et nous en sommes sûrs) ! En tant que nouvel utilisateur de WordPress provenant de Textpattern, il y a quelques points que nous voudrions vous préciser. Nous espérons que cela vous aidera dans votre transition." + +#: wp-admin/import/textpattern.php:585 +#, php-format +msgid "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 Login and change it." +msgstr "Vous avez déjà installé WordPress et il vous a été communiqué un identifiant d’administration et un mot de passe. Oubliez-les. Vous n’aviez pas cet identifiant dans Textpattern donc pourquoi l’auriez-vous ici ? Nous avons donc pris soin d’importer tous vos utilisateurs dans votre système. Hélas, il y a un inconvénient. WordPress et Textpattern utilisent tous deux de fortes clefs d’encryptage sur les mots de passe et il nous est impossible de les décrypter. Nous vous avons donc attribué un mot de passe temporaire. Tous les utilisateurs ont conservé leur identifiant mais ils ont à présent un mot de passe commun qui est password123. Vous devez donc vous connecter et changer cela." + +#: wp-admin/import/textpattern.php:589 +msgid "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." +msgstr "Également, comme vous venez de Textpattern, vous avez probablement utilisé Textile pour formatter vos commentaires et vos articles. Si c’est le cas, nous vous recommandons de télécharger et installer Textile pour WordPress. Faites-moi confiance… Vous allez apprécier." + +#: wp-admin/import/textpattern.php:603 +msgid "Textpattern Database User:" +msgstr "Utilisateur de la base de données de Textpattern :" + +#: wp-admin/import/textpattern.php:604 +msgid "Textpattern Database Password:" +msgstr "Mot de passe de la base de données de Textpattern :" + +#: wp-admin/import/textpattern.php:605 +msgid "Textpattern Database Name:" +msgstr "Nom de la base de données de Textpattern :" + +#: wp-admin/import/textpattern.php:606 +msgid "Textpattern Database Host:" +msgstr "Domaine de la base de données de Textpattern :" + +#: wp-admin/import/textpattern.php:607 +msgid "Textpattern Table prefix (if any):" +msgstr "Préfixe (s’il y a lieu) de la base de données de Textpattern :" + +#: wp-admin/import/textpattern.php:698 +msgid "Textpattern" +msgstr "Textpattern" + +#: wp-admin/import/textpattern.php:698 +msgid "Import categories, users, posts, comments, and links from a Textpattern blog." +msgstr "Importation de catégories, d’utilisateurs, d’articles, de commentaires et de liens depuis un blog Textpattern." + +#: wp-admin/import/utw.php:21 +msgid "Import Ultimate Tag Warrior" +msgstr "Importer depuis Ultimate Tag Warrior" + +#: wp-admin/import/utw.php:31 +msgid "Howdy! This imports tags from Ultimate Tag Warrior 3 into WordPress tags." +msgstr "Salutations ! Cet outil importe dans ce blog les mots-clefs en provenance d’une installation existante d’Ultimate Tag Warrior 3, dans les mots-clefs WordPress." + +#: wp-admin/import/utw.php:32 +msgid "This has not been tested on any other versions of Ultimate Tag Warrior. Mileage may vary." +msgstr "Ceci n’a pas été testé avec les autres versions de Ultimate Tag Warrior. La peinture est encore fraîche…" + +#: wp-admin/import/utw.php:33 +msgid "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!" +msgstr "Pour faciliter la prise en compte de grosses bases de données, typiques des blogueurs qui mettent des mots-clefs à tout va, nous avons conçu cet outil sous la forme d’une suite de 5 étapes, afin de vous débarrassez de cette mauvaise habitude qu’est UTW. Vous n’avez qu’à cliquez, et nous vous ferons savoir lorsque vous serez purifié !" + +#: wp-admin/import/utw.php:80 +msgid "Reading UTW Tags…" +msgstr "Lecture des mots-clefs de UTW …" + +#: wp-admin/import/utw.php:86 +msgid "No Tags Found!" +msgstr "Aucun mot-clef trouvé !" + +#: wp-admin/import/utw.php:101 +#, php-format +msgid "Done! %s tag were read." +msgid_plural "Done! %s tags were read." +msgstr[0] "Terminé ! %s mot-clef a été traité." +msgstr[1] "Terminé ! %s mots-clefs ont été traités." + +#: wp-admin/import/utw.php:102 +msgid "The following tags were found:" +msgstr "Les mots-clefs suivants ont été trouvés :" + +#: wp-admin/import/utw.php:116 +msgid "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." +msgstr "Si vous ne souhaitez importer certains de ces mots-clefs, vous devriez les supprimer à partir de la page de gestion des mots-clefs de UTW, puis relancer cet importateur." + +#: wp-admin/import/utw.php:131 +msgid "Reading UTW Post Tags…" +msgstr "Lecture des mots-clefs UTW…" + +#: wp-admin/import/utw.php:174 +#, php-format +msgid "Done! %s tag were added!" +msgid_plural "Done! %s tags were added!" +msgstr[0] "Terminé ! %s mot-clef a été ajouté !" +msgstr[1] "Terminé ! %s mots-clefs ont été ajoutés !" + +#: wp-admin/import/utw.php:178 +msgid "Step 4" +msgstr "Étape 4" + +#: wp-admin/import/utw.php:266 +msgid "OK, so we lied about this being a 5-step program! You’re done!" +msgstr "Bon, en fait on vous a menti à propos de ces 5 étapes ! C’est terminé !" + +#: wp-admin/import/utw.php:288 +msgid "Import Ultimate Tag Warrior tags into WordPress tags." +msgstr "Importation des mots-clefs d’Ultimate Tag Warrior dans les mots-clefs WordPress." + +#: wp-admin/import/wordpress.php:38 +msgid "Import WordPress" +msgstr "Importation depuis WordPress" + +#: wp-admin/import/wordpress.php:53 +msgid "Howdy! Upload your WordPress eXtended RSS (WXR) file and we’ll import the posts, pages, comments, custom fields, categories, and tags into this blog." +msgstr "Salutations ! Mettez en ligne votre fichier WordPress eXtended RSS (WXR), et nous importerons vos articles, pages, commentaires, champs personnalisés, catégories et mots-clefs dans ce blog." + +#: wp-admin/import/wordpress.php:54 +msgid "Choose a WordPress WXR file to upload, then click Upload file and import." +msgstr "Choisissez un fichier WordPress WXR à utiliser, puis cliquez sur Envoyer le fichier et l’importer." + +#: wp-admin/import/wordpress.php:203 +msgid "To make it easier for you to edit and save the imported posts and drafts, you may want to change the name of the author of the posts. For example, you may want to import all the entries as admins entries." +msgstr "De façon à vous faciliter la modification et validation des articles importés et des brouillons, il se peut que vous vouliez changer le nom des auteurs des articles. Par exemple, vous pourriez importer tous les articles comme articles de l’admin." + +#: wp-admin/import/wordpress.php:217 +msgid "Import author:" +msgstr "Importer l’auteur :" + +#: wp-admin/import/wordpress.php:226 +msgid "Import Attachments" +msgstr "Importer des fichiers joints" + +#: wp-admin/import/wordpress.php:229 +msgid "Download and import file attachments" +msgstr "Télécharger et importer les fichiers joints" + +#: wp-admin/import/wordpress.php:248 +msgid "Map to existing" +msgstr "Faire les correspondances avec l’existant" + +#: wp-admin/import/wordpress.php:272 +msgid "Invalid file" +msgstr "Fichier invalide" + +#: wp-admin/import/wordpress.php:273 +msgid "Please upload a valid WXR (WordPress eXtended RSS) export file." +msgstr "Veuillez envoyer un fichier d’export WXR (WordPress eXtended RSS) valide." + +#: wp-admin/import/wordpress.php:357 +msgid "All done." +msgstr "Terminé." + +#: wp-admin/import/wordpress.php:357 +msgid "Have fun!" +msgstr "Amusez-vous bien !" + +#: wp-admin/import/wordpress.php:561 +#, php-format +msgid "Importing attachment %s... " +msgstr "Importation du fichier joint %s…" + +#: wp-admin/import/wordpress.php:569 +#, php-format +msgid "Remote file error: %s" +msgstr "Erreur de fichier distant : %s" + +#: wp-admin/import/wordpress.php:580 +#: wp-includes/functions.php:2158 +msgid "Invalid file type" +msgstr "Type du fichier non valide" + +#: wp-admin/import/wordpress.php:601 +#, php-format +msgid "Skipping attachment %s" +msgstr "Évitement du fichier joint %s" + +#: wp-admin/import/wordpress.php:624 +msgid "Remote server did not respond" +msgstr "Le serveur distant n’a pas répondu" + +#: wp-admin/import/wordpress.php:630 +#, php-format +msgid "Remote file returned error response %1$d %2$s" +msgstr "Le fichier distant à renvoyé une erreur : %1$d %2$s" + +#: wp-admin/import/wordpress.php:634 +msgid "Remote file is incorrect size" +msgstr "Le fichier distant n’a pas une taille correcte" + +#: wp-admin/import/wordpress.php:640 +#, php-format +msgid "Remote file is too large, limit is %s" +msgstr "Le fichier distant est trop grand, la limite est de %s" + +#: wp-admin/import/wordpress.php:756 +msgid "Sorry, there has been an error." +msgstr "Désolé, il y a eu une erreur." + +#: wp-admin/import/wordpress.php:805 +msgid "Import posts, pages, comments, custom fields, categories, and tags from a WordPress export file." +msgstr "Importation d’articles, pages, commentaires, champs personnalisés, catégories et mots-clefs depuis un fichier d’export WordPress." + +#: wp-admin/import/wp-cat2tag.php:31 +msgid "Categories to Tags" +msgstr "Catégories en mots-clefs" + +#: wp-admin/import/wp-cat2tag.php:32 +msgid "Tags to Categories" +msgstr "Mots-clefs en catégories" + +#: wp-admin/import/wp-cat2tag.php:68 +#, php-format +msgid "Convert Category to Tag." +msgid_plural "Convert Categories (%d) to Tags." +msgstr[0] "Convertir la catégorie en mot-clef." +msgstr[1] "Convertir les catégories (%d) en mots-clefs." + +#: wp-admin/import/wp-cat2tag.php:70 +msgid "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." +msgstr "Salutations ! Ce convertisseur vous permet de sélectionner les catégories existantes à convertir en mots-clefs. Pour vous lancer, cochez les cases correspondant aux catégories que vous souhaitez convertir, puis cliquez sur le bouton Convertir." + +#: wp-admin/import/wp-cat2tag.php:71 +msgid "Keep in mind that if you convert a category with child categories, the children become top-level orphans." +msgstr "Gardez en mémoire que si vous convertissez une catégorie qui a des sous-catégories, celles-ci perdent leur catégorie parente, et se retrouvent donc à la racine des catégories." + +#: wp-admin/import/wp-cat2tag.php:75 +msgid "You have no categories to convert!" +msgstr "Vous n’avez aucune catégorie à convertir !" + +#: wp-admin/import/wp-cat2tag.php:92 +#: wp-admin/import/wp-cat2tag.php:168 +msgid "Uncheck All" +msgstr "Tout décocher" + +#: wp-admin/import/wp-cat2tag.php:99 +#: wp-admin/import/wp-cat2tag.php:106 +#: wp-admin/import/wp-cat2tag.php:175 +#: wp-admin/import/wp-cat2tag.php:182 +msgid "Check All" +msgstr "Tout cocher" + +#: wp-admin/import/wp-cat2tag.php:129 +msgid "* This category is also a tag. Converting it will add that tag to all posts that are currently in the category." +msgstr "* Cette catégorie est également un mot-clef. La convertir ajoutera ce mot-clef à tous les articles qui sont actuellement dans cette catégorie." + +#: wp-admin/import/wp-cat2tag.php:131 +msgid "Convert Categories to Tags" +msgstr "Convertir des catégories en mots-clefs" + +#: wp-admin/import/wp-cat2tag.php:144 +#, php-format +msgid "Convert Tag to Category." +msgid_plural "Convert Tags (%d) to Categories." +msgstr[0] "Convertir le mot-clef en catégorie." +msgstr[1] "Convertir les mots-clefs (%d) en catégories." + +#: wp-admin/import/wp-cat2tag.php:146 +msgid "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." +msgstr "Ce convertisseur vous permet de sélectionner les mots-clefs existants à convertir en catégories. Pour vous lancer, cochez les cases correspondant aux mots-clefs que vous souhaitez convertir, puis cliquez sur le bouton Convertir." + +#: wp-admin/import/wp-cat2tag.php:147 +msgid "The newly created categories will still be associated with the same posts." +msgstr "Les catégories nouvellement créées seront toujours associées aux mêmes articles." + +#: wp-admin/import/wp-cat2tag.php:151 +msgid "You have no tags to convert!" +msgstr "Vous n’avez aucun mot-clef à convertir !" + +#: wp-admin/import/wp-cat2tag.php:193 +msgid "* This tag is also a category. When converted, all posts associated with the tag will also be in the category." +msgstr "* Ce mot-clef est également une catégorie. Une fois converti, tous les articles associés à ce mot-clef seront également placés dans la catégorie." + +#: wp-admin/import/wp-cat2tag.php:195 +msgid "Convert Tags to Categories" +msgstr "Convertir des mots-clefs en catégories" + +#: wp-admin/import/wp-cat2tag.php:233 +#: wp-admin/import/wp-cat2tag.php:348 +#, php-format +msgid "Uh, oh. Something didn’t work. Please try again." +msgstr "Mince alors, quelque chose n’a pas marché. Veuillez recommencer." + +#: wp-admin/import/wp-cat2tag.php:252 +#, php-format +msgid "Category %s doesn’t exist!" +msgstr "La catégorie %s n’existe pas !" + +#: wp-admin/import/wp-cat2tag.php:255 +#, php-format +msgid "Converting category %s ... " +msgstr "Conversion de la catégorie %s... " + +#: wp-admin/import/wp-cat2tag.php:278 +#: wp-admin/import/wp-cat2tag.php:321 +#: wp-admin/import/wp-cat2tag.php:406 +msgid "Converted successfully." +msgstr "Convertie avec succès." + +#: wp-admin/import/wp-cat2tag.php:297 +msgid "Tag added to all posts in this category." +msgstr "Mot-clef ajouté à tous les articles de cette catégorie." + +#: wp-admin/import/wp-cat2tag.php:339 +#, php-format +msgid "* 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." +msgstr "* Cette catégorie est également un mot-clef. Le convertisseur a ajouté ce mot-clef à tous les articles actuellement dans la catégorie. Si vous souhaitez la supprimer, veuillez confirmer que les mots-clefs ont bien été ajoutés, puis supprimez-la depuis la page de gestion des catégories." + +#: wp-admin/import/wp-cat2tag.php:340 +#: wp-admin/import/wp-cat2tag.php:428 +#, php-format +msgid "We’re all done here, but you can always convert more." +msgstr "C’est tout pour le moment, mais vous pouvez toujours en convert plus." + +#: wp-admin/import/wp-cat2tag.php:365 +#, php-format +msgid "Converting tag %s ... " +msgstr "Conversion du mot-clef %s ... " + +#: wp-admin/import/wp-cat2tag.php:389 +msgid "All posts were added to the category with the same name." +msgstr "Tous les articles ont été ajoutés à la catégorie du même nom." + +#: wp-admin/import/wp-cat2tag.php:409 +#, php-format +msgid "Tag #%s doesn’t exist!" +msgstr "Le mot-clef n°%s n’existe pas !" + +#: wp-admin/import/wp-cat2tag.php:427 +#, php-format +msgid "* 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." +msgstr "* Ce mot-clef est également une catégorie. Le convertisseur a ajouté dans cette catégorie tous les articles utilisant ce mot-clef. Si vous souhaitez le supprimer, veuillez confirmer que les articles ont y bien tous été ajoutés, puis supprimez-le depuis la page de gestion des mots-clefs." + +#: wp-admin/import/wp-cat2tag.php:470 +msgid "Categories and Tags Converter" +msgstr "Convertisseur de catégories et mots-clefs" + +#: wp-admin/import/wp-cat2tag.php:470 +msgid "Convert existing categories to tags or tags to categories, selectively." +msgstr "Convertit les catégories existantes en mots-clefs, ou les mots-clefs existants en catégories, de manière sélective." + +#: wp-admin/includes/bookmark.php:195 +msgid "Could not update link in the database" +msgstr "Impossible de mettre à jour le lien dans la base de données" + +#: wp-admin/includes/bookmark.php:203 +msgid "Could not insert link into the database" +msgstr "Impossible d’insérer le lien dans la base de données" + +#: wp-admin/includes/class-wp-filesystem-base.php:200 +#, php-format +msgid "Changing to %s" +msgstr "Modifier à %s" + +#: wp-admin/includes/class-wp-filesystem-base.php:209 +#, php-format +msgid "Found %s" +msgstr "Trouvé %s" + +#: wp-admin/includes/class-wp-filesystem-ftpext.php:31 +msgid "The ftp PHP extension is not available" +msgstr "L’extension ftp de PHP n’est pas disponible" + +#: wp-admin/includes/class-wp-filesystem-ftpext.php:42 +#: wp-admin/includes/class-wp-filesystem-ftpsockets.php:41 +msgid "FTP hostname is required" +msgstr "L’hôte du FTP est obligatoire" + +#: wp-admin/includes/class-wp-filesystem-ftpext.php:51 +#: wp-admin/includes/class-wp-filesystem-ftpsockets.php:50 +msgid "FTP username is required" +msgstr "L’identifiant FTP est obligatoire" + +#: wp-admin/includes/class-wp-filesystem-ftpext.php:56 +#: wp-admin/includes/class-wp-filesystem-ftpsockets.php:55 +msgid "FTP password is required" +msgstr "Le mot de passe FTP est obligatoire" + +#: wp-admin/includes/class-wp-filesystem-ftpext.php:72 +#: wp-admin/includes/class-wp-filesystem-ftpsockets.php:67 +#: wp-admin/includes/class-wp-filesystem-ftpsockets.php:71 +#, php-format +msgid "Failed to connect to FTP Server %1$s:%2$s" +msgstr "Impossible de me connecter au serveur FTP %1$s : %2$s" + +#: wp-admin/includes/class-wp-filesystem-ftpext.php:77 +#: wp-admin/includes/class-wp-filesystem-ftpsockets.php:76 +#: wp-admin/includes/class-wp-filesystem-ssh2.php:127 +#, php-format +msgid "Username/Password incorrect for %s" +msgstr "Le couple identifiant / mot de passe est incorrect pour %s" + +#: wp-admin/includes/class-wp-filesystem-ssh2.php:67 +msgid "The ssh2 PHP extension is not available" +msgstr "L’extension ssh2 de PHP n’est pas disponible" + +#: wp-admin/includes/class-wp-filesystem-ssh2.php:71 +msgid "The ssh2 PHP extension is available, however, we require the PHP5 function stream_get_contents()" +msgstr "L’extension ssh2 de PHP est disponible, mais nécessite la fonction PHP5 stream_get_contents()" + +#: wp-admin/includes/class-wp-filesystem-ssh2.php:82 +msgid "SSH2 hostname is required" +msgstr "Le nom de l’hôte SSH2 est obligatoire" + +#: wp-admin/includes/class-wp-filesystem-ssh2.php:98 +msgid "SSH2 username is required" +msgstr "L’identifiant SSH2 est obligatoire" + +#: wp-admin/includes/class-wp-filesystem-ssh2.php:106 +msgid "SSH2 password is required" +msgstr "Le mot de passe SSH2 est obligatoire" + +#: wp-admin/includes/class-wp-filesystem-ssh2.php:121 +#, php-format +msgid "Failed to connect to SSH2 Server %1$s:%2$s" +msgstr "Impossible de me connecter au serveur SSH2 %1$s : %2$s" + +#: wp-admin/includes/class-wp-filesystem-ssh2.php:132 +#, php-format +msgid "Public and Private keys incorrect for %s" +msgstr "Les clefs publiques et privées de %s ne sont pas correctes" + +#: wp-admin/includes/class-wp-filesystem-ssh2.php:148 +#, php-format +msgid "Unable to perform command: %s" +msgstr "Impossible de lancer la commande : %s" + +#: wp-admin/includes/class-wp-upgrader.php:44 +msgid "Invalid Data provided." +msgstr "Les données fournies ne sont pas valides." + +#: wp-admin/includes/class-wp-upgrader.php:45 +#: wp-admin/includes/file.php:481 +#: wp-admin/includes/plugin.php:437 +#: wp-admin/includes/theme.php:77 +msgid "Could not access filesystem." +msgstr "Impossible d’accéder au système de fichier." + +#: wp-admin/includes/class-wp-upgrader.php:46 +#: wp-admin/includes/plugin.php:440 +#: wp-admin/includes/theme.php:80 +msgid "Filesystem error" +msgstr "Erreur du système de fichier" + +#: wp-admin/includes/class-wp-upgrader.php:47 +msgid "Unable to locate WordPress Root directory." +msgstr "Impossible de localiser le dossier racine de WordPress." + +#: wp-admin/includes/class-wp-upgrader.php:48 +msgid "Unable to locate WordPress Content directory (wp-content)." +msgstr "Impossible de localiser le dossier de contenu de WordPress (wp-content)." + +#: wp-admin/includes/class-wp-upgrader.php:49 +#: wp-admin/includes/plugin.php:445 +msgid "Unable to locate WordPress Plugin directory." +msgstr "Impossible de localiser le dossier d’extension de WordPress." + +#: wp-admin/includes/class-wp-upgrader.php:50 +msgid "Unable to locate WordPress Theme directory." +msgstr "Impossible de localiser le dossier des thèmes de WordPress." + +#: wp-admin/includes/class-wp-upgrader.php:51 +#, php-format +msgid "Unable to locate needed folder (%s)." +msgstr "Impossible de localiser le dossier nécessaire (%s)." + +#: wp-admin/includes/class-wp-upgrader.php:53 +msgid "Download failed." +msgstr "Le téléchargement a échoué." + +#: wp-admin/includes/class-wp-upgrader.php:54 +msgid "Installing the latest version." +msgstr "Installation de la dernière version." + +#: wp-admin/includes/class-wp-upgrader.php:55 +msgid "Destination folder already exists." +msgstr "Le dossier de destination existe déjà." + +#: wp-admin/includes/class-wp-upgrader.php:56 +msgid "Could not create directory." +msgstr "Impossible de créer le dossier." + +#: wp-admin/includes/class-wp-upgrader.php:57 +msgid "Incompatible Archive" +msgstr "Archive incompatible" + +#: wp-admin/includes/class-wp-upgrader.php:59 +msgid "Enabling Maintenance mode." +msgstr "Activation du mode Maintenance." + +#: wp-admin/includes/class-wp-upgrader.php:60 +msgid "Disabling Maintenance mode." +msgstr "Désactivation du mode Maintenance." + +#: wp-admin/includes/class-wp-upgrader.php:349 +msgid "The plugin is at the latest version." +msgstr "Vous avez la dernière version de cette extension." + +#: wp-admin/includes/class-wp-upgrader.php:350 +#: wp-admin/includes/class-wp-upgrader.php:506 +#: wp-admin/includes/class-wp-upgrader.php:663 +msgid "Upgrade package not available." +msgstr "Pas d’archive de mise à jour disponible." + +#: wp-admin/includes/class-wp-upgrader.php:351 +#: wp-admin/includes/class-wp-upgrader.php:507 +#: wp-admin/includes/class-wp-upgrader.php:664 +#, php-format +msgid "Downloading update from %s." +msgstr "Téléchargement de la mise à jour depuis %s." + +#: wp-admin/includes/class-wp-upgrader.php:352 +#: wp-admin/includes/class-wp-upgrader.php:508 +#: wp-admin/includes/class-wp-upgrader.php:665 +msgid "Unpacking the update." +msgstr "Décompression de la mise à jour." + +#: wp-admin/includes/class-wp-upgrader.php:353 +msgid "Deactivating the plugin." +msgstr "Désactivation de l’extension." + +#: wp-admin/includes/class-wp-upgrader.php:354 +msgid "Removing the old version of the plugin." +msgstr "Retrait de l’ancienne version de l’extension." + +#: wp-admin/includes/class-wp-upgrader.php:355 +msgid "Could not remove the old plugin." +msgstr "Impossible de supprimer l’anciennne extension." + +#: wp-admin/includes/class-wp-upgrader.php:356 +msgid "Plugin upgrade Failed." +msgstr "La mise à jour de l’extension a échouée." + +#: wp-admin/includes/class-wp-upgrader.php:357 +msgid "Plugin upgraded successfully." +msgstr "Extension mise à jour avec succès." + +#: wp-admin/includes/class-wp-upgrader.php:361 +#: wp-admin/includes/class-wp-upgrader.php:516 +msgid "Install package not available." +msgstr "L’archive d’installation n’est pas disponible." + +#: wp-admin/includes/class-wp-upgrader.php:362 +#: wp-admin/includes/class-wp-upgrader.php:517 +#, php-format +msgid "Downloading install package from %s." +msgstr "Téléchargement de l’archive d’instalation depuis %s." + +#: wp-admin/includes/class-wp-upgrader.php:363 +#: wp-admin/includes/class-wp-upgrader.php:518 +msgid "Unpacking the package." +msgstr "Décompression de l’archive du thème." + +#: wp-admin/includes/class-wp-upgrader.php:364 +msgid "Installing the plugin." +msgstr "Installation de l’extension." + +#: wp-admin/includes/class-wp-upgrader.php:365 +msgid "Plugin Install Failed." +msgstr "L’installation de l’extension a échouée." + +#: wp-admin/includes/class-wp-upgrader.php:366 +msgid "Plugin Installed successfully." +msgstr "Extension installée avec succès." + +#: wp-admin/includes/class-wp-upgrader.php:505 +msgid "The theme is at the latest version." +msgstr "Vous avez la dernière version de ce thème." + +#: wp-admin/includes/class-wp-upgrader.php:509 +msgid "Removing the old version of the theme." +msgstr "Retrait de l’ancienne version du thème." + +#: wp-admin/includes/class-wp-upgrader.php:510 +msgid "Could not remove the old theme." +msgstr "Impossible de supprimer l’ancien thème." + +#: wp-admin/includes/class-wp-upgrader.php:511 +msgid "Theme upgrade Failed." +msgstr "La mise à jour du thème a échouée." + +#: wp-admin/includes/class-wp-upgrader.php:512 +msgid "Theme upgraded successfully." +msgstr "Le thème a été mis à jour avec succès." + +#: wp-admin/includes/class-wp-upgrader.php:519 +msgid "Installing the theme." +msgstr "Installation du thème." + +#: wp-admin/includes/class-wp-upgrader.php:520 +msgid "Theme Install Failed." +msgstr "L’installation du thème a échouée." + +#: wp-admin/includes/class-wp-upgrader.php:521 +msgid "Theme Installed successfully." +msgstr "Thème mis à jour avec succès." + +#: wp-admin/includes/class-wp-upgrader.php:662 +msgid "WordPress is at the latest version." +msgstr "Vous avez la dernière version de WordPress." + +#: wp-admin/includes/class-wp-upgrader.php:666 +msgid "Could not copy files." +msgstr "Impossible de copier les fichiers." + +#: wp-admin/includes/class-wp-upgrader.php:812 +#: wp-admin/update.php:25 +msgid "Upgrade Plugin" +msgstr "Mettre à jour l’extension" + +#: wp-admin/includes/class-wp-upgrader.php:825 +msgid "Attempting reactivation of the plugin" +msgstr "Tentative de réactivation de l’extension" + +#: wp-admin/includes/class-wp-upgrader.php:829 +#: wp-admin/includes/class-wp-upgrader.php:880 +#: wp-admin/plugins.php:415 +msgid "Activate this plugin" +msgstr "Activer cette extension" + +#: wp-admin/includes/class-wp-upgrader.php:829 +#: wp-admin/includes/class-wp-upgrader.php:880 +msgid "Activate Plugin" +msgstr "Activer l’extension" + +#: wp-admin/includes/class-wp-upgrader.php:830 +msgid "Goto plugins page" +msgstr "Aller sur la page des extensions" + +#: wp-admin/includes/class-wp-upgrader.php:830 +#: wp-admin/includes/class-wp-upgrader.php:886 +msgid "Return to Plugins page" +msgstr "Retourner sur la page des extensions" + +#: wp-admin/includes/class-wp-upgrader.php:839 +#: wp-admin/includes/class-wp-upgrader.php:894 +#: wp-admin/includes/class-wp-upgrader.php:961 +#: wp-admin/includes/class-wp-upgrader.php:1015 +msgid "Actions:" +msgstr "Actions :" + +#: wp-admin/includes/class-wp-upgrader.php:872 +#, php-format +msgid "Successfully installed the plugin %s %s." +msgstr "L’extensions %s %s a bien été installée." + +#: wp-admin/includes/class-wp-upgrader.php:884 +msgid "Return to Plugin Installer" +msgstr "Retourner à l’installeur d’extensions" + +#. translators: 1: theme name, 2: version +#: wp-admin/includes/class-wp-upgrader.php:928 +#, php-format +msgid "Successfully installed the theme %1$s %2$s." +msgstr "Le thème %1$s %2$s a bien été installé." + +#: wp-admin/includes/class-wp-upgrader.php:947 +#: wp-admin/includes/class-wp-upgrader.php:1004 +#: wp-admin/includes/template.php:1456 +#: wp-admin/includes/template.php:1671 +#: wp-admin/includes/theme-install.php:305 +#: wp-admin/includes/theme-install.php:313 +#: wp-admin/themes.php:217 +#, php-format +msgid "Preview “%s”" +msgstr "Prévisualiser à “%s”" + +#: wp-admin/includes/class-wp-upgrader.php:948 +#: wp-admin/includes/class-wp-upgrader.php:1005 +#: wp-admin/themes.php:214 +#, php-format +msgid "Activate “%s”" +msgstr "Activer “%s”" + +#: wp-admin/includes/class-wp-upgrader.php:948 +#: wp-admin/includes/class-wp-upgrader.php:1005 +#: wp-admin/plugins.php:415 +#: wp-admin/plugins.php:480 +#: wp-admin/themes.php:216 +msgid "Activate" +msgstr "Activer" + +#: wp-admin/includes/class-wp-upgrader.php:952 +msgid "Return to Theme Installer" +msgstr "Retourner à l’installeur de thèmes" + +#: wp-admin/includes/class-wp-upgrader.php:954 +msgid "Themes page" +msgstr "Page des thèmes" + +#: wp-admin/includes/class-wp-upgrader.php:954 +#: wp-admin/includes/class-wp-upgrader.php:1011 +msgid "Return to Themes page" +msgstr "Retourner sur la page des thèmes" + +#: wp-admin/includes/class-wp-upgrader.php:982 +#: wp-admin/update.php:121 +msgid "Upgrade Theme" +msgstr "Mettre à jour le thème" + +#: wp-admin/includes/class-wp-upgrader.php:1040 +msgid "Please select a file" +msgstr "Veuillez choisir un fichier" + +#: wp-admin/includes/class-wp-upgrader.php:1054 +#: wp-admin/includes/file.php:300 +#: wp-admin/includes/file.php:410 +#, php-format +msgid "The uploaded file could not be moved to %s." +msgstr "Le fichier n’ a pas pu être déplacé vers %s." + +#: wp-admin/includes/comment.php:39 +msgid "You are not allowed to edit comments on this post, so you cannot edit this comment." +msgstr "Vous n’avez pas l’autorisation de modifier les commentaires de cet article, donc vous ne pouvez pas modifier ce commentaire." + +#: wp-admin/includes/dashboard.php:28 +msgid "Right Now" +msgstr "Aujourd’hui" + +#: wp-admin/includes/dashboard.php:31 +#: wp-includes/default-widgets.php:605 +#: wp-includes/default-widgets.php:628 +msgid "Recent Comments" +msgstr "Commentaires récents" + +#: wp-admin/includes/dashboard.php:45 +msgid "Incoming Links" +msgstr "Liens entrants" + +#: wp-admin/includes/dashboard.php:49 +#: wp-includes/js/tinymce/langs/wp-langs.php:254 +msgid "Plugins" +msgstr "Extensions" + +#: wp-admin/includes/dashboard.php:53 +msgid "QuickPress" +msgstr "Press-Minute" + +#: wp-admin/includes/dashboard.php:57 +msgid "Recent Drafts" +msgstr "Brouillons récents" + +#: wp-admin/includes/dashboard.php:63 +msgid "http://wordpress.org/development/" +msgstr "http://wordpress.org/development/" + +#: wp-admin/includes/dashboard.php:64 +msgid "http://wordpress.org/development/feed/" +msgstr "http://wordpress.org/development/feed/" + +#: wp-admin/includes/dashboard.php:65 +msgid "WordPress Development Blog" +msgstr "Blog de développement de WordPress (en anglais)" + +#: wp-admin/includes/dashboard.php:78 +msgid "http://planet.wordpress.org/" +msgstr "http://www.wordpress-fr.net/planet/" + +#: wp-admin/includes/dashboard.php:79 +msgid "http://planet.wordpress.org/feed/" +msgstr "http://feeds2.feedburner.com/WordpressFrancophonePlanet" + +#: wp-admin/includes/dashboard.php:80 +msgid "Other WordPress News" +msgstr "Autres actualités de WordPress (en français)" + +#: wp-admin/includes/dashboard.php:93 +#: wp-admin/includes/dashboard.php:459 +#: wp-admin/includes/dashboard.php:508 +msgid "View all" +msgstr "Afficher tout" + +#: wp-admin/includes/dashboard.php:123 +msgid "Configure" +msgstr "Configurer" + +#: wp-admin/includes/dashboard.php:208 +msgid "At a Glance" +msgstr "En un coup d’œil" + +#: wp-admin/includes/dashboard.php:214 +msgid "Post" +msgid_plural "Posts" +msgstr[0] "Article" +msgstr[1] "Articles" + +#: wp-admin/includes/dashboard.php:240 +msgid "Comment" +msgid_plural "Comments" +msgstr[0] "Commentaire" +msgstr[1] "Commentaires" + +#: wp-admin/includes/dashboard.php:252 +msgid "Page" +msgid_plural "Pages" +msgstr[0] "Page" +msgstr[1] "Pages" + +#: wp-admin/includes/dashboard.php:262 +msgid "Approved|Right Now" +msgid_plural "Approved" +msgstr[0] "Approuvé" +msgstr[1] "Approuvés" + +#: wp-admin/includes/dashboard.php:274 +msgid "Category" +msgid_plural "Categories" +msgstr[0] "Catégorie" +msgstr[1] "Catégories" + +#: wp-admin/includes/dashboard.php:284 +msgid "Pending" +msgid_plural "Pending" +msgstr[0] "En attente" +msgstr[1] "En attente" + +#: wp-admin/includes/dashboard.php:296 +msgid "Tag" +msgid_plural "Tags" +msgstr[0] "Mot-clef" +msgstr[1] "Mots-clefs" + +#: wp-admin/includes/dashboard.php:306 +#: wp-content/plugins/akismet/akismet.php:903 +msgid "Spam" +msgid_plural "Spam" +msgstr[0] "Indésirable" +msgstr[1] "Indésirables" + +#: wp-admin/includes/dashboard.php:334 +#: wp-admin/includes/dashboard.php:341 +msgid "Change Theme" +msgstr "Changer de thème" + +#: wp-admin/includes/dashboard.php:335 +#, php-format +msgid "Theme %1$s with %2$s Widget" +msgid_plural "Theme %1$s with %2$s Widgets" +msgstr[0] "Thème %1$s avec %2$s widget" +msgstr[1] "Thème %1$s avec %2$s widgets" + +#: wp-admin/includes/dashboard.php:337 +#, php-format +msgid "Theme %1$s with %2$s Widget" +msgid_plural "Theme %1$s with %2$s Widgets" +msgstr[0] "Thème %1$s avec %2$s widget" +msgstr[1] "Thème %1$s avec %2$s widgets" + +#: wp-admin/includes/dashboard.php:363 +#, php-format +msgid "Post Published. View post | Edit post" +msgstr "Article publié. Afficher l’article | Modifier l’article" + +#: wp-admin/includes/dashboard.php:365 +#, php-format +msgid "Post submitted. Preview post | Edit post" +msgstr "Article publié. Afficher l’article | Modifier l’article" + +#: wp-admin/includes/dashboard.php:367 +#, php-format +msgid "Draft Saved. Preview post | Edit post" +msgstr "Brouillon enregistré. Afficher l’article | Modifier l’article" + +#: wp-admin/includes/dashboard.php:380 +#, php-format +msgid "You can also try %s, easy blogging from anywhere on the Web." +msgstr "Vous pouvez aussi essayer %s, qui simplifie la création d’article depuis n’importe où sur le Web." + +#: wp-admin/includes/dashboard.php:380 +#: wp-admin/press-this.php:322 +#: wp-admin/press-this.php:445 +#: wp-admin/tools.php:82 +#: wp-admin/tools.php:87 +msgid "Press This" +msgstr "Publier un article" + +#: wp-admin/includes/dashboard.php:399 +#: wp-includes/post.php:3423 +msgid "Content" +msgstr "Contenu" + +#: wp-admin/includes/dashboard.php:416 +msgid "Reset" +msgstr "Réinitialiser" + +#: wp-admin/includes/dashboard.php:462 +msgid "There are no drafts at the moment" +msgstr "Il n’y a pas de brouillons actuellement" + +#: wp-admin/includes/dashboard.php:539 +#: wp-admin/includes/template.php:2139 +#: wp-admin/includes/template.php:2146 +msgid "Approve this comment" +msgstr "Approuver ce commentaire" + +#: wp-admin/includes/dashboard.php:540 +#: wp-admin/includes/template.php:2140 +#: wp-admin/includes/template.php:2143 +msgid "Unapprove this comment" +msgstr "Désapprouver ce commentaire" + +#: wp-admin/includes/dashboard.php:541 +#: wp-admin/includes/template.php:2153 +#: wp-includes/link-template.php:779 +msgid "Edit comment" +msgstr "Modifier le commentaire" + +#: wp-admin/includes/dashboard.php:543 +#: wp-admin/includes/template.php:2156 +msgid "Reply to this comment" +msgstr "Répondre à ce commentaire" + +#: wp-admin/includes/dashboard.php:543 +#: wp-admin/includes/template.php:2156 +#: wp-includes/comment-template.php:1002 +msgid "Reply" +msgstr "Répondre" + +#: wp-admin/includes/dashboard.php:544 +#: wp-admin/includes/template.php:2151 +msgid "Mark this comment as spam" +msgstr "Marquer ce commentaire comme indésirable" + +#. translators: mark as spam link +#: wp-admin/includes/dashboard.php:544 +#: wp-admin/includes/template.php:2151 +msgctxt "verb" +msgid "Spam" +msgstr "Indésirable" + +#: wp-admin/includes/dashboard.php:570 +#, php-format +msgid "From %1$s on %2$s%3$s" +msgstr "Par %1$s, sur %2$s%3$s" + +#: wp-admin/includes/dashboard.php:570 +msgid "[Pending]" +msgstr "[En attente]" + +#: wp-admin/includes/dashboard.php:576 +#: wp-content/themes/classic/comments-popup.php:52 +#: wp-content/themes/classic/comments.php:24 +#: wp-includes/comment-template.php:651 +msgid "Pingback" +msgstr "Ping" + +#: wp-admin/includes/dashboard.php:579 +#: wp-content/themes/classic/comments-popup.php:52 +#: wp-content/themes/classic/comments.php:24 +#: wp-includes/comment-template.php:650 +msgid "Trackback" +msgstr "Rétrolien" + +#. translators: %1$s is type of comment, %2$s is link to the post +#: wp-admin/includes/dashboard.php:588 +#, php-format +msgctxt "dashboard" +msgid "%1$s on %2$s" +msgstr "%1$s dans %2$s" + +#: wp-admin/includes/dashboard.php:608 +#: wp-admin/includes/dashboard.php:693 +#: wp-admin/includes/dashboard.php:715 +#: wp-admin/includes/dashboard.php:750 +#: wp-admin/includes/dashboard.php:847 +msgid "Loading…" +msgstr "Chargement…" + +#: wp-admin/includes/dashboard.php:608 +#: wp-admin/includes/dashboard.php:693 +#: wp-admin/includes/dashboard.php:715 +#: wp-admin/includes/dashboard.php:750 +msgid "This widget requires JavaScript." +msgstr "Ce widget requiert JavaScript." + +#: wp-admin/includes/dashboard.php:624 +#: wp-admin/includes/dashboard.php:737 +#: wp-includes/default-widgets.php:772 +#, php-format +msgid "RSS Error: %s" +msgstr "Erreur RSS : %s" + +#: wp-admin/includes/dashboard.php:631 +msgid "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." +msgstr "Ce widget envoie une requête vers le moteur de recherche des blogs de Google, de sorte que quand un autre blog fera un lien vers le vôtre, son nom s’affichera ici. Ce moteur n’a pas encore trouvé de lien entrant… Ce n’est pas grave, on n’est pas pressé." + +#: wp-admin/includes/dashboard.php:653 +#: wp-admin/includes/dashboard.php:655 +#: wp-admin/includes/post.php:1071 +msgid "Somebody" +msgstr "Quelqu’un" + +#. translators: incoming links feed, %1$s is other person, %3$s is content +#: wp-admin/includes/dashboard.php:667 +#, php-format +msgid "%1$s linked here saying, \"%3$s\"" +msgstr "%1$s a fait un lien vers ce blog en écrivant « %3$s »" + +#. translators: incoming links feed, %1$s is other person, %3$s is content +#: wp-admin/includes/dashboard.php:670 +#, php-format +msgid "%1$s linked here saying, \"%3$s\"" +msgstr "%1$s a fait un lien vers ce blog en écrivant « %3$s »" + +#. translators: incoming links feed, %4$s is the date +#: wp-admin/includes/dashboard.php:675 +#, php-format +msgid "on %4$s" +msgstr "le %4$s" + +#: wp-admin/includes/dashboard.php:768 +msgid "Most Popular" +msgstr "Plus populaire" + +#: wp-admin/includes/dashboard.php:768 +msgid "Newest Plugins" +msgstr "Nouvelles extensions" + +#: wp-admin/includes/dashboard.php:768 +#: wp-admin/plugin-install.php:31 +#: wp-admin/theme-install.php:36 +msgid "Recently Updated" +msgstr "Mises à jour récentes" + +#: wp-admin/includes/dashboard.php:826 +#: wp-admin/includes/plugin-install.php:356 +#: wp-admin/includes/theme-install.php:304 +msgid "Install" +msgstr "Installer" + +#: wp-admin/includes/dashboard.php:924 +#: wp-includes/default-widgets.php:722 +msgid "Unknown Feed" +msgstr "Flux inconnu" + +#: wp-admin/includes/file.php:11 +msgid "Main Index Template" +msgstr "Modèle pour la page d’accueil" + +#: wp-admin/includes/file.php:12 +#: wp-admin/includes/file.php:36 +msgid "Stylesheet" +msgstr "Feuille de style" + +#: wp-admin/includes/file.php:13 +msgid "RTL Stylesheet" +msgstr "Feuille de styleRTL" + +#: wp-admin/includes/file.php:15 +msgid "Popup Comments" +msgstr "Commentaires en popup" + +#: wp-admin/includes/file.php:16 +msgid "Footer" +msgstr "Pied de page" + +#: wp-admin/includes/file.php:17 +msgid "Header" +msgstr "En-tête" + +#: wp-admin/includes/file.php:18 +#: wp-admin/sidebar.php:27 +#: wp-admin/sidebar.php:87 +#: wp-admin/widgets.php:254 +#: wp-includes/widgets.php:485 +msgid "Sidebar" +msgstr "Colonne latérale" + +#: wp-admin/includes/file.php:19 +#: wp-includes/default-widgets.php:219 +#: wp-includes/default-widgets.php:226 +msgid "Archives" +msgstr "Archives" + +#: wp-admin/includes/file.php:20 +msgid "Category Template" +msgstr "Modèle pour les catégories" + +#: wp-admin/includes/file.php:22 +#: wp-admin/plugin-install.php:26 +#: wp-admin/theme-install.php:31 +msgid "Search Results" +msgstr "Résultats de recherche" + +#: wp-admin/includes/file.php:23 +msgid "Search Form" +msgstr "Formulaire de recherche" + +#: wp-admin/includes/file.php:24 +msgid "Single Post" +msgstr "Article seul" + +#: wp-admin/includes/file.php:25 +msgid "404 Template" +msgstr "Modèle pour l’erreur 404" + +#: wp-admin/includes/file.php:26 +msgid "Links Template" +msgstr "Modèle pour les liens" + +#: wp-admin/includes/file.php:27 +msgid "Theme Functions" +msgstr "Fonctions du thème" + +#: wp-admin/includes/file.php:28 +msgid "Attachment Template" +msgstr "Modèle pour les fichiers joints" + +#: wp-admin/includes/file.php:29 +msgid "Image Attachment Template" +msgstr "Modèle pour les images jointes" + +#: wp-admin/includes/file.php:30 +msgid "Video Attachment Template" +msgstr "Modèle pour les vidéos jointes" + +#: wp-admin/includes/file.php:31 +msgid "Audio Attachment Template" +msgstr "Modèle pour les fichiers audios joints" + +#: wp-admin/includes/file.php:32 +msgid "Application Attachment Template" +msgstr "Modèle pour les programmes joints" + +#: wp-admin/includes/file.php:33 +msgid "my-hacks.php (legacy hacks support)" +msgstr "my-hacks.php (reconnaissance des hacks existants)" + +#: wp-admin/includes/file.php:34 +msgid ".htaccess (for rewrite rules )" +msgstr ".htaccess (pour les règles de réécriture)" + +#: wp-admin/includes/file.php:36 +msgid "Comments Template" +msgstr "Modèle pour les commentaires" + +#: wp-admin/includes/file.php:36 +msgid "Popup Comments Template" +msgstr "Modèle pour la fenêtre de commentaires" + +#: wp-admin/includes/file.php:198 +msgid "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." +msgstr "Désolé, on ne peut pas modifier les fichiers avec « .. » dans le nom. Si vous tentez de modifier un fichier dans votre répertoire WordPress, vous pouvez simplement saisir le nom du fichier." + +#: wp-admin/includes/file.php:201 +msgid "Sorry, can’t call files with their real path." +msgstr "Désolé, vous ne pouvez pas accéder à un fichier avec son chemin complet." + +#: wp-admin/includes/file.php:204 +msgid "Sorry, that file cannot be edited." +msgstr "Désolé, ce fichier ne peut être modifié." + +#: wp-admin/includes/file.php:236 +#: wp-admin/includes/file.php:344 +msgid "The uploaded file exceeds the upload_max_filesize directive in php.ini." +msgstr "La taille du fichier envoyé excède celle indiquée dans la directive de taille maximale autorisée, upload_max_filesize, dans php.ini." + +#: wp-admin/includes/file.php:237 +#: wp-admin/includes/file.php:345 +msgid "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form." +msgstr "La taille du fichier envoyé excède celle indiquée dans la directive MAX_FILE_SIZE du formulaire HTML." + +#: wp-admin/includes/file.php:238 +#: wp-admin/includes/file.php:346 +msgid "The uploaded file was only partially uploaded." +msgstr "Le fichier n’a été que partiellement envoyé." + +#: wp-admin/includes/file.php:239 +#: wp-admin/includes/file.php:347 +msgid "No file was uploaded." +msgstr "Aucun fichier n’a été envoyé." + +#: wp-admin/includes/file.php:241 +#: wp-admin/includes/file.php:349 +msgid "Missing a temporary folder." +msgstr "Un dossier temporaire est manquant." + +#: wp-admin/includes/file.php:242 +#: wp-admin/includes/file.php:350 +msgid "Failed to write file to disk." +msgstr "Échec de l’écriture du fichier sur le disque." + +#: wp-admin/includes/file.php:243 +#: wp-admin/includes/file.php:351 +msgid "File upload stopped by extension." +msgstr "L’envoi de fichier est arrêté par l’extension." + +#: wp-admin/includes/file.php:259 +#: wp-admin/includes/file.php:367 +msgid "Invalid form submission." +msgstr "Envoi non valide du formulaire." + +#: wp-admin/includes/file.php:267 +#: wp-admin/includes/file.php:375 +msgid "File is empty. Please upload something more substantial. This error could also be caused by uploads being disabled in your php.ini." +msgstr "Ce fichier est vide. Veuillez envoyer quelque chose de plus substantiel. Cette erreur peut également être due à la désactivation de l’envoi de fichier dans le fichier php.ini de votre serveur." + +#: wp-admin/includes/file.php:271 +msgid "Specified file failed upload test." +msgstr "Le test d’envoi du fichier spécifié a échoué." + +#: wp-admin/includes/file.php:280 +#: wp-admin/includes/file.php:388 +msgid "File type does not meet security guidelines. Try another." +msgstr "Le type du fichier ne respecte pas les normes de sécurité. Essayez un autre fichier." + +#: wp-admin/includes/file.php:379 +msgid "Specified file does not exist." +msgstr "Le fichier spécifié n’existe pas." + +#: wp-admin/includes/file.php:438 +msgid "Invalid URL Provided" +msgstr "L’adresse web fournie est invalide" + +#: wp-admin/includes/file.php:442 +#: wp-admin/includes/file.php:446 +msgid "Could not create Temporary file" +msgstr "Impossible de créer le fichier temporaire" + +#: wp-admin/includes/file.php:494 +msgid "Incompatible archive" +msgstr "Archive incompatible" + +#: wp-admin/includes/file.php:497 +msgid "Empty archive" +msgstr "Archive vide" + +#: wp-admin/includes/file.php:506 +#: wp-admin/includes/file.php:524 +#: wp-admin/includes/file.php:569 +msgid "Could not create directory" +msgstr "Impossible de créer le dossier" + +#: wp-admin/includes/file.php:533 +#: wp-admin/includes/file.php:563 +msgid "Could not copy file" +msgstr "Impossible de copier le fichier" + +#: wp-admin/includes/file.php:723 +msgid "Error: There was an error connecting to the server, Please verify the settings are correct." +msgstr "Erreur : Une erreur s’est produite lors de la connexion au serveur, vérifiez que vos paramètres sont corrects." + +#: wp-admin/includes/file.php:745 +msgid "Connection Information" +msgstr "Informations sur connexion" + +#: wp-admin/includes/file.php:746 +msgid "To perform the requested action, connection information is required." +msgstr "Pour lancer la requête demandée, vous devez donner les informations requises." + +#: wp-admin/includes/file.php:750 +msgid "Hostname" +msgstr "Nom de l’Hôte :" + +#: wp-admin/includes/file.php:755 +#: wp-admin/includes/template.php:898 +#: wp-admin/install.php:135 +#: wp-admin/user-edit.php:187 +#: wp-admin/user-new.php:96 +#: wp-login.php:413 +#: wp-login.php:507 +msgid "Username" +msgstr "Identifiant" + +#: wp-admin/includes/file.php:760 +#: wp-admin/includes/template.php:1079 +#: wp-admin/install.php:139 +#: wp-admin/options-writing.php:100 +#: wp-admin/user-new.php:119 +#: wp-login.php:511 +msgid "Password" +msgstr "Mot de passe" + +#: wp-admin/includes/file.php:766 +msgid "Authentication Keys" +msgstr "Clefs d’authentification" + +#: wp-admin/includes/file.php:768 +msgid "Public Key:" +msgstr "Clef publique :" + +#: wp-admin/includes/file.php:769 +msgid "Private Key:" +msgstr "Clef privée :" + +#: wp-admin/includes/file.php:772 +msgid "Enter the location on the server where the keys are located. If a passphrase is needed, enter that in the password field above." +msgstr "Saisissez l’adresse du serveur où se trouvent les clefs. Si un mot de passe est nécessaire, saisissez-le dans le champ ci-dessus." + +#: wp-admin/includes/file.php:777 +#: wp-admin/includes/file.php:779 +msgid "Connection Type" +msgstr "Type de connexion" + +#: wp-admin/includes/file.php:780 +msgid "FTP" +msgstr "FTP" + +#: wp-admin/includes/file.php:782 +msgid "FTPS (SSL)" +msgstr "FTPS (SSL)" + +#: wp-admin/includes/file.php:785 +msgid "SSH" +msgstr "SSH" + +#: wp-admin/includes/file.php:799 +msgid "Proceed" +msgstr "Continuer" + +#: wp-admin/includes/image.php:140 +#, php-format +msgid "File “%s” doesn’t exist?" +msgstr "Le fichier « %s » n’existe pas ?" + +#: wp-admin/includes/image.php:143 +msgid "The GD image library is not installed." +msgstr "La bibliothèque d’imagerie GD n’est pas installée." + +#: wp-admin/includes/image.php:150 +#, php-format +msgid "File “%s” is not an image." +msgstr "Le fichier « %s » n’est pas une image." + +#: wp-admin/includes/media.php:18 +msgid "From Computer" +msgstr "Depuis votre ordinateur" + +#: wp-admin/includes/media.php:19 +msgid "From URL" +msgstr "Depuis le Web" + +#: wp-admin/includes/media.php:20 +msgid "Gallery" +msgstr "Galerie" + +#: wp-admin/includes/media.php:21 +#: wp-admin/upload.php:102 +msgid "Media Library" +msgstr "Bibliothèque" + +#: wp-admin/includes/media.php:51 +#, php-format +msgid "Gallery (%s)" +msgstr "Galerie (%s)" + +#: wp-admin/includes/media.php:307 +msgid "Uploads" +msgstr "Fichiers envoyés" + +#: wp-admin/includes/media.php:307 +#: wp-admin/includes/template.php:3334 +msgid "WordPress" +msgstr "WordPress" + +#: wp-admin/includes/media.php:352 +#, php-format +msgid "Upload/Insert %s" +msgstr "Envoyer/Insérer %s" + +#: wp-admin/includes/media.php:354 +#: wp-includes/js/tinymce/langs/wp-langs.php:412 +msgid "Add Media" +msgstr "Ajouter un média" + +#: wp-admin/includes/media.php:356 +#: wp-includes/js/tinymce/langs/wp-langs.php:413 +msgid "Add an Image" +msgstr "Ajouter une image" + +#: wp-admin/includes/media.php:358 +#: wp-includes/js/tinymce/langs/wp-langs.php:414 +msgid "Add Video" +msgstr "Ajouter une vidéo" + +#: wp-admin/includes/media.php:360 +#: wp-includes/js/tinymce/langs/wp-langs.php:415 +msgid "Add Audio" +msgstr "Ajouter un son" + +#: wp-admin/includes/media.php:495 +#: wp-admin/includes/media.php:587 +#: wp-admin/includes/media.php:641 +#: wp-admin/includes/media.php:695 +msgid "Saved." +msgstr "Enregistré." + +#: wp-admin/includes/media.php:760 +#: wp-admin/includes/media.php:1908 +#: wp-includes/js/tinymce/langs/wp-langs.php:43 +#: wp-includes/js/tinymce/langs/wp-langs.php:288 +#: wp-includes/js/tinymce/langs/wp-langs.php:385 +msgid "Left" +msgstr "Gauche" + +#: wp-admin/includes/media.php:760 +#: wp-admin/includes/media.php:1910 +#: wp-includes/js/tinymce/langs/wp-langs.php:44 +#: wp-includes/js/tinymce/langs/wp-langs.php:365 +#: wp-includes/js/tinymce/langs/wp-langs.php:386 +msgid "Center" +msgstr "Centre" + +#: wp-admin/includes/media.php:760 +#: wp-admin/includes/media.php:1912 +#: wp-includes/js/tinymce/langs/wp-langs.php:45 +#: wp-includes/js/tinymce/langs/wp-langs.php:289 +#: wp-includes/js/tinymce/langs/wp-langs.php:383 +msgid "Right" +msgstr "Droite" + +#: wp-admin/includes/media.php:786 +#: wp-includes/js/tinymce/langs/wp-langs.php:426 +msgid "Thumbnail" +msgstr "Miniature" + +#: wp-admin/includes/media.php:786 +#: wp-includes/js/tinymce/langs/wp-langs.php:427 +msgid "Medium" +msgstr "Moyenne" + +#: wp-admin/includes/media.php:786 +msgid "Large" +msgstr "Large" + +#: wp-admin/includes/media.php:786 +msgid "Full size" +msgstr "Taille originale" + +#: wp-admin/includes/media.php:806 +#, php-format +msgid "(%d × %d)" +msgstr "(%d × %d)" + +#: wp-admin/includes/media.php:814 +#: wp-includes/js/tinymce/langs/wp-langs.php:425 +msgid "Size" +msgstr "Taille" + +#: wp-admin/includes/media.php:842 +#: wp-admin/includes/media.php:1001 +msgid "File URL" +msgstr "Adresse web du fichier" + +#: wp-admin/includes/media.php:843 +msgid "Post URL" +msgstr "Adresse web de l’article" + +#: wp-admin/includes/media.php:863 +#: wp-admin/includes/media.php:982 +msgid "Caption" +msgstr "Légende" + +#: wp-admin/includes/media.php:864 +#: wp-admin/includes/media.php:1869 +msgid "Also used as alternate text for the image" +msgstr "Également utilisée comme alternative textuelle à l’image" + +#: wp-admin/includes/media.php:869 +#: wp-admin/includes/media.php:1903 +#: wp-includes/js/tinymce/langs/wp-langs.php:42 +#: wp-includes/js/tinymce/langs/wp-langs.php:281 +msgid "Alignment" +msgstr "Alignement" + +#: wp-admin/includes/media.php:913 +msgid "Empty Title filled from filename." +msgstr "Titre absent, il sera rempli à partir du nom du fichier." + +#: wp-admin/includes/media.php:991 +#: wp-includes/js/tinymce/langs/wp-langs.php:291 +msgid "Link URL" +msgstr "Cible du lien" + +#: wp-admin/includes/media.php:994 +#: wp-admin/includes/media.php:1924 +#: wp-includes/js/tinymce/langs/wp-langs.php:431 +msgid "Enter a link URL or click above for presets." +msgstr "Saisissez une adresse web ou cliquez sur l’un des préréglages ci-dessus" + +#: wp-admin/includes/media.php:1005 +msgid "Location of the uploaded file." +msgstr "Emplacement du fichier envoyé." + +#: wp-admin/includes/media.php:1094 +#: wp-admin/includes/media.php:1586 +msgid "Show" +msgstr "Afficher" + +#: wp-admin/includes/media.php:1095 +#: wp-admin/includes/media.php:1587 +msgid "Hide" +msgstr "Cacher" + +#: wp-admin/includes/media.php:1171 +#: wp-admin/includes/media.php:1930 +#: wp-admin/includes/media.php:1966 +#: wp-admin/includes/media.php:2001 +#: wp-admin/includes/media.php:2036 +msgid "Insert into Post" +msgstr "Insérer dans l’article" + +#: wp-admin/includes/media.php:1176 +#, php-format +msgid "You are about to delete %s." +msgstr "Vous êtes sur le point de supprimer %s." + +#: wp-admin/includes/media.php:1313 +msgid "Select Files" +msgstr "Parcourir..." + +#: wp-admin/includes/media.php:1359 +msgid "Choose files to upload" +msgstr "Choisissez les fichiers à envoyer" + +#: wp-admin/includes/media.php:1361 +msgid "Cancel Upload" +msgstr "Annuler l’envoi" + +#: wp-admin/includes/media.php:1364 +msgid "After a file has been uploaded, you can add titles and descriptions." +msgstr "Une fois le fichier envoyé, vous pourrez lui ajouter titre et descriptions." + +#: wp-admin/includes/media.php:1376 +msgid "If you want to use all capabilities of the uploader, like uploading multiple files at once, please upgrade to lighttpd 1.5." +msgstr "Si vous souhaitez utiliser les fonctionnalités de mise en ligne, comme d’envoyer plusieurs fichiers en une seule fois, veuillez passer votre serveur à lighttpd 1.5." + +#: wp-admin/includes/media.php:1406 +msgid "Add media files from your computer" +msgstr "Ajouter un fichier média depuis votre ordinateur" + +#: wp-admin/includes/media.php:1435 +#: wp-admin/includes/media.php:1609 +#: wp-admin/includes/media.php:1848 +#: wp-admin/media-upload.php:80 +msgid "Save all changes" +msgstr "Enregistrer toutes les modifications" + +#: wp-admin/includes/media.php:1466 +msgid "Add media file from URL" +msgstr "Ajouter un fichier média depuis une adresse web" + +#: wp-admin/includes/media.php:1585 +msgid "All Tabs:" +msgstr "Tous les onglets :" + +#: wp-admin/includes/media.php:1589 +msgid "Sort Order:" +msgstr "Ordre de tri :" + +#: wp-admin/includes/media.php:1590 +#: wp-admin/includes/media.php:1657 +msgid "Ascending" +msgstr "Croissant" + +#: wp-admin/includes/media.php:1591 +#: wp-admin/includes/media.php:1660 +msgid "Descending" +msgstr "Décroissant" + +#: wp-admin/includes/media.php:1592 +msgid "Clear" +msgstr "Effacer" + +#: wp-admin/includes/media.php:1599 +#: wp-admin/menu.php:48 +#: wp-admin/menu.php:112 +msgid "Media" +msgstr "Médias" + +#: wp-admin/includes/media.php:1616 +msgid "Gallery Settings" +msgstr "Réglages de galerie" + +#: wp-admin/includes/media.php:1621 +msgid "Link thumbnails to:" +msgstr "Lier les miniatures à :" + +#: wp-admin/includes/media.php:1626 +msgid "Image File" +msgstr "Fichier image" + +#: wp-admin/includes/media.php:1629 +msgid "Attachment Page" +msgstr "Page de fichier joint" + +#: wp-admin/includes/media.php:1636 +msgid "Order images by:" +msgstr "Ranger les images par :" + +#: wp-admin/includes/media.php:1641 +msgid "Menu order" +msgstr "Ordre du menu" + +#: wp-admin/includes/media.php:1643 +msgid "Date/Time" +msgstr "Horodatage" + +#: wp-admin/includes/media.php:1644 +msgid "Random" +msgstr "Au hasard" + +#: wp-admin/includes/media.php:1652 +msgid "Order:" +msgstr "Ordre :" + +#: wp-admin/includes/media.php:1667 +msgid "Gallery columns:" +msgstr "Colonnes de galerie :" + +#: wp-admin/includes/media.php:1672 +msgid "2" +msgstr "2" + +#: wp-admin/includes/media.php:1673 +msgid "3" +msgstr "3" + +#: wp-admin/includes/media.php:1674 +msgid "4" +msgstr "4" + +#: wp-admin/includes/media.php:1675 +msgid "5" +msgstr "5" + +#: wp-admin/includes/media.php:1676 +msgid "6" +msgstr "6" + +#: wp-admin/includes/media.php:1677 +msgid "7" +msgstr "7" + +#: wp-admin/includes/media.php:1678 +msgid "8" +msgstr "8" + +#: wp-admin/includes/media.php:1679 +msgid "9" +msgstr "9" + +#: wp-admin/includes/media.php:1686 +msgid "Insert gallery" +msgstr "Insérer une galerie" + +#: wp-admin/includes/media.php:1687 +msgid "Update gallery settings" +msgstr "Mettre à jour les réglages de galerie" + +#: wp-admin/includes/media.php:1729 +#: wp-admin/includes/media.php:1731 +#: wp-admin/upload.php:212 +#: wp-admin/upload.php:214 +msgid "Search Media" +msgstr "Chercher parmi les médias" + +#: wp-admin/includes/media.php:1754 +msgid "All Types" +msgstr "Tous les types" + +#: wp-admin/includes/media.php:1818 +msgid "Filter »" +msgstr "Filtrer »" + +#: wp-admin/includes/media.php:1865 +msgid "Alternate Text" +msgstr "Texte alternatif" + +#: wp-admin/includes/media.php:1866 +msgid "Alt text for the image, e.g. “The Mona Lisa”" +msgstr "Texte alternatif de l’image, exemple : « La Joconde »" + +#: wp-admin/includes/media.php:1868 +msgid "Image Caption" +msgstr "Légende de l’image" + +#: wp-admin/includes/media.php:1880 +#: wp-includes/js/tinymce/langs/wp-langs.php:274 +msgid "Image URL" +msgstr "Adresse web de l’image" + +#: wp-admin/includes/media.php:1888 +msgid "Image Title" +msgstr "Titre de l’image" + +#: wp-admin/includes/media.php:1918 +msgid "Link Image To:" +msgstr "Lier l’image à :" + +#: wp-admin/includes/media.php:1923 +msgid "Link to image" +msgstr "Lier à l’image" + +#: wp-admin/includes/media.php:1950 +msgid "Audio File URL" +msgstr "Adresse web du fichier audio" + +#: wp-admin/includes/media.php:1962 +msgid "Link text, e.g. “Still Alive by Jonathan Coulton”" +msgstr "Texte du lien, par exemple « L’Autre bout du Monde par Emily Loizeau »" + +#: wp-admin/includes/media.php:1985 +msgid "Video URL" +msgstr "Adresse web de la vidéo" + +#: wp-admin/includes/media.php:1997 +msgid "Link text, e.g. “Lucy on YouTube“" +msgstr "Texte du lien, par exemple « Mozinor sur DailyMotion »" + +#: wp-admin/includes/media.php:2032 +msgid "Link text, e.g. “Ransom Demands (PDF)”" +msgstr "Texte du lien, par exemple « Théorie sur le chaos (PDF) »" + +#: wp-admin/includes/media.php:2068 +#, php-format +msgid "You are using the Flash uploader. Problems? Try the Browser uploader instead." +msgstr "Vous utilisez l’outil de mise en ligne basé sur Flash. Si vous rencontrez des problèmes, essayez la méthode du navigateur à la place." + +#: wp-admin/includes/media.php:2079 +msgid "You are using the Browser uploader." +msgstr "Vous utilisez la méthode de mise en ligne du navigateur." + +#: wp-admin/includes/media.php:2083 +#, php-format +msgid "Try the Flash uploader instead." +msgstr "Essayez plutôt avec l’outil basé sur Flash." + +#: wp-admin/includes/plugin-install.php:43 +msgid "An Unexpected HTTP Error occurred during the API request.

    Try again" +msgstr "Une erreur HTTP inattendue est survenue pendant la requête auprès de l'API.

    Essayez de nouveau" + +#: wp-admin/includes/plugin-install.php:47 +msgid "An unknown error occurred" +msgstr "Une erreur inconnue est survenue" + +#: wp-admin/includes/plugin-install.php:127 +msgid "Plugins extend and expand the functionality of WordPress. You may automatically install plugins from the WordPress Plugin Directory or upload a plugin in .zip format via this page." +msgstr "Les extensions étendent les fonctionnalités de WordPress, et en ajoutent de nouvelles. Vous pouvez installer automatiquement des extensions en provenance du répertoire des extensions WordPress, ou mettre en ligne une extension au format .zip, via cette page." + +#: wp-admin/includes/plugin-install.php:129 +#: wp-admin/includes/template.php:3165 +#: wp-admin/includes/template.php:3167 +#: wp-admin/includes/theme-install.php:162 +#: wp-admin/plugin-install.php:24 +#: wp-admin/theme-install.php:29 +#: wp-content/plugins/akismet/akismet.php:714 +#: wp-content/themes/classic/sidebar.php:21 +#: wp-includes/default-widgets.php:176 +#: wp-includes/general-template.php:127 +msgid "Search" +msgstr "Recherche" + +#: wp-admin/includes/plugin-install.php:130 +msgid "Search for plugins by keyword, author, or tag." +msgstr "Chercher une extension par mot, auteur ou mot-clef." + +#: wp-admin/includes/plugin-install.php:133 +msgid "Popular tags" +msgstr "Mots-clefs populaires" + +#: wp-admin/includes/plugin-install.php:134 +msgid "You may also browse based on the most popular tags in the Plugin Directory:" +msgstr "Vous pouvez également naviguer en fonction des mots-clefs les plus populaires sur WordPress.org :" + +#: wp-admin/includes/plugin-install.php:148 +#, php-format +msgid "%d plugin" +msgstr "%d extension" + +#: wp-admin/includes/plugin-install.php:148 +#, php-format +msgid "%d plugins" +msgstr "%d extensions" + +#: wp-admin/includes/plugin-install.php:163 +#: wp-admin/includes/theme-install.php:157 +msgid "Term" +msgstr "Mot" + +#: wp-admin/includes/plugin-install.php:165 +msgctxt "Plugin Installer" +msgid "Tag" +msgstr "Mot-clef" + +#: wp-admin/includes/plugin-install.php:168 +#: wp-admin/includes/plugin-install.php:169 +#: wp-admin/plugins.php:500 +#: wp-admin/plugins.php:502 +msgid "Search Plugins" +msgstr "Chercher parmi les extensions" + +#: wp-admin/includes/plugin-install.php:212 +msgid "Install a plugin in .zip format" +msgstr "Installer une extension au format .zip" + +#: wp-admin/includes/plugin-install.php:213 +msgid "If you have a plugin in a .zip format, You may install it by uploading it here." +msgstr "Si vous avez une extension au format .zip, vous pouvez l’installer en la mettant en ligne ici." + +#: wp-admin/includes/plugin-install.php:216 +msgid "Plugin zip file" +msgstr "Archive Zip de l’extension" + +#: wp-admin/includes/plugin-install.php:218 +#: wp-admin/includes/plugin-install.php:478 +#: wp-admin/includes/theme-install.php:284 +#: wp-admin/includes/theme-install.php:517 +#: wp-admin/tools.php:32 +msgid "Install Now" +msgstr "Installer maintenant" + +#: wp-admin/includes/plugin-install.php:302 +#: wp-admin/includes/plugin-install.php:312 +#: wp-includes/js/tinymce/langs/wp-langs.php:257 +msgid "Version" +msgstr "Version" + +#: wp-admin/includes/plugin-install.php:305 +#: wp-admin/includes/plugin-install.php:315 +#: wp-includes/post-template.php:1346 +msgid "Actions" +msgstr "Actions" + +#: wp-admin/includes/plugin-install.php:322 +msgid "No plugins match your request." +msgstr "Aucune extension ne correspond à votre requête." + +#: wp-admin/includes/plugin-install.php:346 +#: wp-admin/includes/plugin.php:130 +#: wp-admin/plugins.php:450 +#, php-format +msgid "By %s" +msgstr "Par %s" + +#: wp-admin/includes/plugin-install.php:364 +#: wp-admin/includes/plugin-install.php:522 +#: wp-admin/includes/plugin-install.php:530 +#: wp-admin/includes/theme-install.php:333 +#, php-format +msgid "(based on %s rating)" +msgid_plural "(based on %s ratings)" +msgstr[0] "(basée sur %s votes)" +msgstr[1] "(basée sur %s vote)" + +#: wp-admin/includes/plugin-install.php:366 +#: wp-admin/includes/plugin-install.php:524 +#: wp-admin/includes/theme-install.php:335 +msgid "5 stars" +msgstr "5 étoiles" + +#: wp-admin/includes/plugin-install.php:367 +#: wp-admin/includes/plugin-install.php:525 +#: wp-admin/includes/theme-install.php:336 +msgid "4 stars" +msgstr "4 étoiles" + +#: wp-admin/includes/plugin-install.php:368 +#: wp-admin/includes/plugin-install.php:526 +#: wp-admin/includes/theme-install.php:337 +msgid "3 stars" +msgstr "3 étoiles" + +#: wp-admin/includes/plugin-install.php:369 +#: wp-admin/includes/plugin-install.php:527 +#: wp-admin/includes/theme-install.php:338 +msgid "2 stars" +msgstr "2 étoiles" + +#: wp-admin/includes/plugin-install.php:370 +#: wp-admin/includes/plugin-install.php:528 +#: wp-admin/includes/theme-install.php:339 +msgid "1 star" +msgstr "1 étoile" + +#: wp-admin/includes/plugin-install.php:422 +#: wp-admin/update.php:73 +msgid "Plugin Install" +msgstr "Installation d’extensions" + +#: wp-admin/includes/plugin-install.php:483 +#: wp-admin/includes/theme-install.php:522 +msgid "Install Update Now" +msgstr "Installer la mise à jour maintenant" + +#: wp-admin/includes/plugin-install.php:488 +#, php-format +msgid "Newer Version (%s) Installed" +msgstr "Une version plus récente (%s) est installée" + +#: wp-admin/includes/plugin-install.php:493 +msgid "Latest Version Installed" +msgstr "Dernière version installée" + +#: wp-admin/includes/plugin-install.php:499 +msgid "FYI" +msgstr "Pour information" + +#: wp-admin/includes/plugin-install.php:502 +#: wp-admin/includes/theme-install.php:322 +#: wp-includes/js/tinymce/wp-mce-help.php:242 +msgid "Version:" +msgstr "Version :" + +#: wp-admin/includes/plugin-install.php:504 +#: wp-admin/includes/theme-install.php:323 +msgid "Author:" +msgstr "Auteur :" + +#: wp-admin/includes/plugin-install.php:506 +#: wp-admin/includes/theme-install.php:325 +msgid "Last Updated:" +msgstr "Dernière mise à jour :" + +#: wp-admin/includes/plugin-install.php:509 +#: wp-admin/includes/theme-install.php:327 +msgid "Requires WordPress Version:" +msgstr "Nécessite WordPress en version :" + +#: wp-admin/includes/plugin-install.php:509 +#: wp-admin/includes/theme-install.php:327 +#, php-format +msgid "%s or higher" +msgstr "%s ou plus" + +#: wp-admin/includes/plugin-install.php:511 +#: wp-admin/includes/theme-install.php:329 +msgid "Compatible up to:" +msgstr "Compatible jusqu’à la version : " + +#: wp-admin/includes/plugin-install.php:513 +#: wp-admin/includes/theme-install.php:331 +msgid "Downloaded:" +msgstr "Téléchargé :" + +#: wp-admin/includes/plugin-install.php:513 +#: wp-admin/includes/theme-install.php:331 +#, php-format +msgid "%s time" +msgid_plural "%s times" +msgstr[0] "%s fois" +msgstr[1] "%s fois" + +#: wp-admin/includes/plugin-install.php:515 +msgid "WordPress.org Plugin Page »" +msgstr "Page WordPress.org de l’extension »" + +#: wp-admin/includes/plugin-install.php:517 +msgid "Plugin Homepage »" +msgstr "Site Web de l’extension »" + +#: wp-admin/includes/plugin-install.php:521 +msgid "Average Rating" +msgstr "Moyenne des notes" + +#: wp-admin/includes/plugin-install.php:536 +msgid "Warning: This plugin has not been tested with your current version of WordPress." +msgstr "Attention : cette extension n’a pas été testée avec votre version de WordPress." + +#: wp-admin/includes/plugin-install.php:539 +msgid "Warning: This plugin has not been marked as compatible with your version of WordPress." +msgstr "Attention : cette extension n’a pas été marquée comme étant compatible avec votre version de WordPress" + +#: wp-admin/includes/plugin.php:121 +msgid "Visit plugin homepage" +msgstr "Aller sur le site de l’extension" + +#: wp-admin/includes/plugin.php:126 +#: wp-admin/plugins.php:449 +#: wp-includes/theme.php:226 +msgid "Visit author homepage" +msgstr "Aller sur la page de l’auteur" + +#: wp-admin/includes/plugin.php:382 +msgid "One of the plugins is invalid." +msgstr "L’une des extensions n’est pas valide." + +#: wp-admin/includes/plugin.php:468 +#, php-format +msgid "Could not fully remove the plugin(s) %s" +msgstr "Impossible de supprimer complétement le ou les extensions %s" + +#: wp-admin/includes/plugin.php:516 +msgid "Invalid plugin path." +msgstr "Chemin d’extension non valide" + +#: wp-admin/includes/plugin.php:518 +msgid "Plugin file does not exist." +msgstr "Le fichier de l’extension n’existe pas." + +#: wp-admin/includes/plugin.php:522 +msgid "The plugin does not have a valid header." +msgstr "Cette extension ne dispose pas d’un en-tête valide." + +#: wp-admin/includes/post.php:48 +msgid "You are not allowed to edit pages as this user." +msgstr "Vous n’avez pas l’autorisation de modifier des pages sous cet identifiant." + +#: wp-admin/includes/post.php:49 +msgid "You are not allowed to create pages as this user." +msgstr "Vous n’avez pas l’autorisation de créer des pages sous cet identifiant." + +#: wp-admin/includes/post.php:55 +msgid "You are not allowed to edit posts as this user." +msgstr "Vous n’avez pas l’autorisation de modifier des articles sous cet identifiant." + +#: wp-admin/includes/post.php:56 +msgid "You are not allowed to post as this user." +msgstr "Vous n’avez pas l’autorisation de publier sous cet identifiant." + +#: wp-admin/includes/post.php:233 +msgid "You are not allowed to edit pages." +msgstr "Vous n’avez pas l’autorisation de modifier les pages." + +#: wp-admin/includes/post.php:236 +msgid "You are not allowed to edit posts." +msgstr "Vous n’avez pas l’autorisation de modifier les articles." + +#: wp-admin/includes/post.php:453 +msgid "You are not allowed to create pages on this blog." +msgstr "Vous n’avez pas l’autorisation de créer des pages sur ce blog." + +#: wp-admin/includes/post.php:456 +msgid "You are not allowed to create posts or drafts on this blog." +msgstr "Vous n’avez pas l’autorisation de créer des articles ou des brouillons sur ce blog." + +#: wp-admin/includes/post.php:793 +msgctxt "post" +msgid "Published" +msgstr "Publié" + +#: wp-admin/includes/post.php:793 +msgid "Published posts" +msgstr "Articles publiés" + +#: wp-admin/includes/post.php:793 +#, php-format +msgid "Published (%s)" +msgid_plural "Published (%s)" +msgstr[0] "Publié (%s)" +msgstr[1] "Publiés (%s)" + +#: wp-admin/includes/post.php:794 +msgctxt "post" +msgid "Scheduled" +msgstr "Planifié" + +#: wp-admin/includes/post.php:794 +msgid "Scheduled posts" +msgstr "Articles planifiés" + +#: wp-admin/includes/post.php:794 +#, php-format +msgid "Scheduled (%s)" +msgid_plural "Scheduled (%s)" +msgstr[0] "Planifié (%s)" +msgstr[1] "Planifiés (%s)" + +#: wp-admin/includes/post.php:795 +msgctxt "post" +msgid "Pending Review" +msgstr "En attente de relecture" + +#: wp-admin/includes/post.php:795 +msgid "Pending posts" +msgstr "Articles en attente" + +#: wp-admin/includes/post.php:795 +#, php-format +msgid "Pending Review (%s)" +msgid_plural "Pending Review (%s)" +msgstr[0] "En attente de relecture (%s)" +msgstr[1] "En attente de relecture (%s)" + +#: wp-admin/includes/post.php:796 +msgctxt "post" +msgid "Draft" +msgstr "Brouillon" + +#: wp-admin/includes/post.php:796 +#, php-format +msgid "Draft (%s)" +msgid_plural "Drafts (%s)" +msgstr[0] "Brouillon (%s)" +msgstr[1] "Brouillons (%s)" + +#: wp-admin/includes/post.php:797 +msgctxt "post" +msgid "Private" +msgstr "Privé" + +#: wp-admin/includes/post.php:797 +msgid "Private posts" +msgstr "Articles privés" + +#: wp-admin/includes/post.php:797 +#, php-format +msgid "Private (%s)" +msgid_plural "Private (%s)" +msgstr[0] "Privé (%s)" +msgstr[1] "Privés (%s)" + +#: wp-admin/includes/post.php:867 +#: wp-admin/upload.php:123 +msgid "Images" +msgstr "Images" + +#: wp-admin/includes/post.php:867 +#: wp-admin/upload.php:123 +msgid "Manage Images" +msgstr "Gérer les images" + +#: wp-admin/includes/post.php:867 +#, php-format +msgid "Image (%s)" +msgid_plural "Images (%s)" +msgstr[0] "Image (%s)" +msgstr[1] "Images (%s)" + +#: wp-admin/includes/post.php:868 +#: wp-admin/upload.php:124 +msgid "Audio" +msgstr "Son" + +#: wp-admin/includes/post.php:868 +#: wp-admin/upload.php:124 +msgid "Manage Audio" +msgstr "Gérer les sons" + +#: wp-admin/includes/post.php:868 +#, php-format +msgid "Audio (%s)" +msgid_plural "Audio (%s)" +msgstr[0] "Fichier audio (%s)" +msgstr[1] "Fichiers audio (%s)" + +#: wp-admin/includes/post.php:869 +#: wp-admin/upload.php:125 +msgid "Video" +msgstr "Vidéo" + +#: wp-admin/includes/post.php:869 +#: wp-admin/upload.php:125 +msgid "Manage Video" +msgstr "Gérer les vidéos" + +#: wp-admin/includes/post.php:869 +#, php-format +msgid "Video (%s)" +msgid_plural "Video (%s)" +msgstr[0] "Vidéos (%s)" +msgstr[1] "Vidéos (%s)" + +#: wp-admin/includes/post.php:976 +#: wp-content/plugins/akismet/akismet.php:832 +msgid "View Post" +msgstr "Afficher l’article" + +#: wp-admin/includes/post.php:976 +msgid "View Page" +msgstr "Voir la page" + +#: wp-admin/includes/post.php:979 +#: wp-admin/includes/post.php:1006 +msgid "Permalink:" +msgstr "Permalien :" + +#: wp-admin/includes/post.php:981 +msgid "Change Permalinks" +msgstr "Modifier les permaliens" + +#: wp-admin/includes/post.php:988 +msgid "Click to edit this part of the permalink" +msgstr "Cliquez pour modifier cette section du permalien" + +#: wp-admin/includes/post.php:1075 +#, php-format +msgid "Warning: %s is currently editing this post" +msgstr "Attention : %s modifie actuellement cet article" + +#: wp-admin/includes/post.php:1078 +#, php-format +msgid "Warning: %s is currently editing this page" +msgstr "Attention : %s modifie actuellement cette page" + +#: wp-admin/includes/post.php:1081 +#, php-format +msgid "Warning: %s is currently editing this." +msgstr "Attention : %s modifie actuellement ce contenu." + +#: wp-admin/includes/post.php:1135 +msgid "Preview not available. Please save as a draft first." +msgstr "Prévisualisation non disponible. Veuillez d’abord enregistrer le brouillon." + +#: wp-admin/includes/schema.php:193 +msgid "My Blog" +msgstr "Mon Blog" + +#: wp-admin/includes/schema.php:194 +msgid "Just another WordPress weblog" +msgstr "Un blog utilisant WordPress" + +#. translators: default date format, see http://php.net/date +#: wp-admin/includes/schema.php:216 +#: wp-admin/options-general.php:204 +msgid "F j, Y" +msgstr "j F Y" + +#. translators: default time format, see http://php.net/date +#: wp-admin/includes/schema.php:218 +#: wp-admin/options-general.php:237 +msgid "g:i a" +msgstr "G \\h i \\m\\i\\n" + +#. translators: links last updated date format, see http://php.net/date +#: wp-admin/includes/schema.php:220 +msgid "F j, Y g:i a" +msgstr "j F Y, G \\h i \\m\\i\\n" + +#. translators: user role +#: wp-admin/includes/schema.php:372 +msgctxt "User role" +msgid "Administrator" +msgstr "Administrateur" + +#. translators: user role +#: wp-admin/includes/schema.php:374 +msgctxt "User role" +msgid "Editor" +msgstr "Éditeur" + +#. translators: user role +#: wp-admin/includes/schema.php:376 +msgctxt "User role" +msgid "Author" +msgstr "Auteur" + +#. translators: user role +#: wp-admin/includes/schema.php:378 +msgctxt "User role" +msgid "Contributor" +msgstr "Contributeur" + +#. translators: user role +#: wp-admin/includes/schema.php:380 +msgctxt "User role" +msgid "Subscriber" +msgstr "Abonné" + +#: wp-admin/includes/template.php:131 +#: wp-admin/includes/template.php:302 +#: wp-admin/includes/template.php:665 +#: wp-admin/includes/template.php:1449 +#: wp-admin/includes/template.php:1664 +#: wp-admin/includes/template.php:2154 +msgid "Quick Edit" +msgstr "Modification rapide" + +#: wp-admin/includes/template.php:229 +#: wp-admin/includes/template.php:1025 +#: wp-admin/includes/template.php:2154 +msgid "Quick Edit" +msgstr "Modification rapide" + +#: wp-admin/includes/template.php:237 +#: wp-admin/includes/template.php:870 +#: wp-admin/includes/template.php:880 +#: wp-admin/includes/template.php:890 +#: wp-admin/includes/template.php:1046 +msgid "Slug" +msgstr "Identifiant" + +#. translators: manage posts column name +#: wp-admin/includes/template.php:752 +msgctxt "column name" +msgid "Post" +msgstr "Article" + +#: wp-admin/includes/template.php:758 +#: wp-admin/includes/template.php:808 +#: wp-admin/includes/template.php:1050 +msgid "Date" +msgstr "Date" + +#. translators: column name +#: wp-admin/includes/template.php:777 +msgctxt "column name" +msgid "File" +msgstr "Fichier" + +#. translators: column name +#: wp-admin/includes/template.php:781 +msgctxt "column name" +msgid "Attached to" +msgstr "Joint à" + +#. translators: column name +#: wp-admin/includes/template.php:785 +msgctxt "column name" +msgid "Date" +msgstr "Date" + +#: wp-admin/includes/template.php:846 +msgid "In Response To" +msgstr "En réponse à" + +#: wp-admin/includes/template.php:856 +msgid "Relationship" +msgstr "Relation" + +#: wp-admin/includes/template.php:857 +msgid "Visible" +msgstr "Visible" + +#: wp-admin/includes/template.php:881 +#: wp-admin/menu.php:53 +#: wp-includes/default-widgets.php:95 +msgid "Links" +msgstr "Liens" + +#: wp-admin/includes/template.php:901 +#: wp-admin/user-new.php:135 +msgid "Role" +msgstr "Rôle" + +#: wp-admin/includes/template.php:1025 +msgid "Bulk Edit Pages" +msgstr "Édition par lot des pages" + +#: wp-admin/includes/template.php:1025 +msgid "Bulk Edit Posts" +msgstr "Édition par lot des articles" + +#: wp-admin/includes/template.php:1063 +#: wp-admin/includes/template.php:1127 +#: wp-admin/includes/template.php:1146 +#: wp-admin/includes/template.php:1168 +#: wp-admin/includes/template.php:1177 +#: wp-admin/includes/template.php:1206 +#: wp-admin/includes/template.php:1227 +msgid "- No Change -" +msgstr "- Aucun changement -" + +#. translators: Between password field and private checkbox on post quick edit interface +#: wp-admin/includes/template.php:1086 +msgid "–OR–" +msgstr "— OU —" + +#: wp-admin/includes/template.php:1091 +msgid "Private page" +msgstr "Page privée" + +#: wp-admin/includes/template.php:1091 +msgid "Private post" +msgstr "Article privé" + +#: wp-admin/includes/template.php:1103 +msgid "[more]" +msgstr "[plus]" + +#: wp-admin/includes/template.php:1104 +msgid "[less]" +msgstr "[moins]" + +#: wp-admin/includes/template.php:1169 +#: wp-admin/includes/template.php:1178 +msgid "Allow" +msgstr "Autoriser" + +#: wp-admin/includes/template.php:1170 +#: wp-admin/includes/template.php:1179 +msgid "Do not allow" +msgstr "Refuser" + +# Y'a p'tet mieux comme trad, non ? "tête de blog" ? boaf... +#: wp-admin/includes/template.php:1225 +#: wp-admin/includes/template.php:1228 +#: wp-admin/includes/template.php:3393 +msgid "Sticky" +msgstr "Mettre en avant" + +# Y'a p'tet mieux comme trad, non ? "tête de blog" ? boaf... +#: wp-admin/includes/template.php:1229 +msgid "Not Sticky" +msgstr "Pas mis en avant" + +#: wp-admin/includes/template.php:1237 +msgid "Make this post sticky" +msgstr "Mettre cet article en avant" + +#: wp-admin/includes/template.php:1261 +#: wp-admin/includes/template.php:2444 +#: wp-includes/js/tinymce/langs/wp-langs.php:29 +msgid "Update" +msgstr "Mettre à jour" + +#: wp-admin/includes/template.php:1264 +msgid "Update Pages" +msgstr "Mettre à jour la page" + +#: wp-admin/includes/template.php:1264 +msgid "Update Posts" +msgstr "Mettre à jour l’article" + +#: wp-admin/includes/template.php:1429 +#: wp-admin/includes/template.php:1647 +msgid "Missed schedule" +msgstr "Planification manquée" + +#: wp-admin/includes/template.php:1433 +#: wp-admin/includes/template.php:1651 +msgid "Last Modified" +msgstr "Dernière modification" + +#: wp-admin/includes/template.php:1448 +msgid "Edit this post" +msgstr "Modifier cet article" + +#: wp-admin/includes/template.php:1449 +msgid "Edit this post inline" +msgstr "Modifier cet article sur place" + +#: wp-admin/includes/template.php:1452 +msgid "Delete this post" +msgstr "Supprimer cet article" + +#: wp-admin/includes/template.php:1452 +#: wp-admin/includes/template.php:1667 +#, php-format +msgid "" +"You are about to delete this draft '%s'\n" +" 'Cancel' to stop, 'OK' to delete." +msgstr "" +"Vous êtes sur le point de supprimer le brouillon « %s ».\n" +" « Annuler » pour abandonner, « OK » pour le supprimer." + +#: wp-admin/includes/template.php:1452 +#, php-format +msgid "" +"You are about to delete this post '%s'\n" +" 'Cancel' to stop, 'OK' to delete." +msgstr "" +"Vous êtes sur le point de supprimer l’article « %s ».\n" +" « Annuler » pour abandonner, « OK » pour le supprimer." + +#: wp-admin/includes/template.php:1487 +#: wp-admin/includes/upgrade.php:99 +#: wp-includes/category-template.php:180 +msgid "Uncategorized" +msgstr "Non classé" + +#: wp-admin/includes/template.php:1659 +msgid "Parent Page: " +msgstr "Page parents :" + +#: wp-admin/includes/template.php:1663 +msgid "Edit this page" +msgstr "Modifier cette page" + +#: wp-admin/includes/template.php:1667 +msgid "Delete this page" +msgstr "Supprimer cette page" + +#: wp-admin/includes/template.php:1667 +#, php-format +msgid "" +"You are about to delete this page '%s'\n" +" 'Cancel' to stop, 'OK' to delete." +msgstr "" +"Vous êtes sur le point de supprimer la page « %s ».\n" +" « Annuler » pour abandonner, « OK » pour supprimer." + +#: wp-admin/includes/template.php:1956 +#, php-format +msgid "e-mail: %s" +msgstr "e-mail : %s" + +#: wp-admin/includes/template.php:1965 +msgid "View posts by this author" +msgstr "Afficher les articles de cet auteur" + +#: wp-admin/includes/template.php:2096 +msgid "Y/m/d \\a\\t g:i A" +msgstr "d/m/Y \\à G \\h i \\m\\i\\n" + +#: wp-admin/includes/template.php:2125 +#, php-format +msgid "Submitted on %2$s at %3$s" +msgstr "Envoyé le %2$s à %3$s" + +#: wp-admin/includes/template.php:2125 +msgid "g:ia" +msgstr "G \\h i \\m\\i\\n" + +# Utilisé dans l'affichage des commentaire sous l'article +#: wp-admin/includes/template.php:2198 +msgid "Y/m/d \\a\\t g:ia" +msgstr "d/m/Y \\à\\ G \\h i \\m\\i\\n" + +#: wp-admin/includes/template.php:2272 +msgid "Reply to Comment" +msgstr "Répondre au commentaire" + +#: wp-admin/includes/template.php:2298 +msgid "Submit Reply" +msgstr "Envoyer la réponse" + +#: wp-admin/includes/template.php:2371 +#: wp-admin/includes/template.php:2386 +#: wp-admin/includes/template.php:2448 +#: wp-admin/includes/template.php:2475 +msgid "Value" +msgstr "Valeur" + +#: wp-admin/includes/template.php:2440 +msgid "Key" +msgstr "Clef" + +#: wp-admin/includes/template.php:2470 +msgid "Add new custom field:" +msgstr "Ajouter un nouveau champ personnalisé :" + +#: wp-admin/includes/template.php:2495 +msgid "Enter new" +msgstr "Saisissez-en un nouveau" + +#: wp-admin/includes/template.php:2505 +msgid "Add Custom Field" +msgstr "Ajouter un champ personnalisé" + +#. translators: 1: month input, 2: day input, 3: year input, 4: hour input, 5: minute input +#: wp-admin/includes/template.php:2565 +#, php-format +msgid "%1$s%2$s, %3$s @ %4$s : %5$s" +msgstr "%2$s %1$s %3$s à %4$s h %5$s min" + +#: wp-admin/includes/template.php:2647 +msgid "WordPress recommends a better browser" +msgstr "WordPress recommande un meilleur navigateur" + +#: wp-admin/includes/template.php:2682 +msgid "Thumbnail linked to file" +msgstr "Miniature liée au fichier" + +#: wp-admin/includes/template.php:2682 +msgid "Image linked to file" +msgstr "Image liée au fichier" + +#: wp-admin/includes/template.php:2686 +msgid "Thumbnail linked to page" +msgstr "Miniature liée à la page" + +#: wp-admin/includes/template.php:2686 +msgid "Image linked to page" +msgstr "Image liée à la page" + +#: wp-admin/includes/template.php:2691 +msgid "Link to file" +msgstr "Lier au fichier" + +#: wp-admin/includes/template.php:2695 +msgid "Link to page" +msgstr "Lier à la page" + +#: wp-admin/includes/template.php:2794 +msgid "Before you can upload your import file, you will need to fix the following error:" +msgstr "Avant de mettre en ligne votre fichier d’import, il vous faut corriger l’erreur suivante :" + +#: wp-admin/includes/template.php:2801 +msgid "Choose a file from your computer:" +msgstr "Choisissez un fichier sur votre ordinateur :" + +#: wp-admin/includes/template.php:2801 +#, php-format +msgid "Maximum size: %s" +msgstr "Taille maximale : %s" + +#: wp-admin/includes/template.php:2807 +msgid "Upload file and import" +msgstr "Envoyer le fichier et l’importer" + +#: wp-admin/includes/template.php:2933 +msgid "Click to toggle" +msgstr "Cliquer pour inverser." + +#: wp-admin/includes/template.php:3156 +msgid "Find Posts or Pages" +msgstr "Chercher parmi les articles et pages" + +#: wp-admin/includes/template.php:3177 +#: wp-admin/includes/widgets.php:192 +#: wp-includes/js/tinymce/langs/wp-langs.php:31 +#: wp-includes/js/tinymce/wp-mce-help.php:258 +msgid "Close" +msgstr "Fermer" + +#: wp-admin/includes/template.php:3178 +#: wp-admin/plugin-editor.php:172 +#: wp-admin/theme-editor.php:135 +msgid "Select" +msgstr "Sélectionner" + +#: wp-admin/includes/template.php:3209 +#: wp-admin/includes/template.php:3252 +msgid "New Page" +msgstr "Nouvelle page" + +#: wp-admin/includes/template.php:3215 +msgid "New Media" +msgstr "Nouveau fichier média" + +#: wp-admin/includes/template.php:3218 +#: wp-admin/media.php:45 +#: wp-admin/media.php:85 +msgid "Edit Media" +msgstr "Modifier un média" + +#: wp-admin/includes/template.php:3221 +msgid "New Link" +msgstr "Nouveau lien" + +#: wp-admin/includes/template.php:3224 +#: wp-admin/link-manager.php:43 +msgid "Edit Links" +msgstr "Modifier les liens" + +#: wp-admin/includes/template.php:3227 +msgid "New User" +msgstr "Nouvel utilisateur" + +#: wp-admin/includes/template.php:3230 +msgid "Edit Users" +msgstr "Modifier les utilisateurs" + +#: wp-admin/includes/template.php:3233 +#: wp-admin/plugin-install.php:17 +msgid "Install Plugins" +msgstr "Installer des extensions" + +#: wp-admin/includes/template.php:3236 +#: wp-admin/plugins.php:234 +msgid "Manage Plugins" +msgstr "Gérer les extensions" + +#: wp-admin/includes/template.php:3239 +#: wp-admin/theme-install.php:17 +#: wp-admin/update.php:149 +msgid "Install Themes" +msgstr "Installer des thèmes" + +#: wp-admin/includes/template.php:3242 +#: wp-admin/themes.php:31 +msgid "Manage Themes" +msgstr "Gérer les thèmes" + +#: wp-admin/includes/template.php:3245 +#: wp-admin/includes/template.php:3250 +msgid "New Post" +msgstr "Nouvel article" + +#: wp-admin/includes/template.php:3251 +msgid "Drafts" +msgstr "Brouillons" + +#: wp-admin/includes/template.php:3303 +#: wp-includes/script-loader.php:360 +msgid "(no title)" +msgstr "(pas de titre)" + +#. translators: post state +#: wp-admin/includes/template.php:3391 +msgctxt "post state" +msgid "Pending" +msgstr "En attente" + +#: wp-admin/includes/template.php:3442 +msgid "Writing Posts" +msgstr "Writing Posts" + +#: wp-admin/includes/template.php:3454 +msgid "The modules on this screen can be arranged in several columns. You can select the number of columns from the Screen Options tab." +msgstr "Les modules sur cet écrant peut être disposés dans plusieurs colonnes. Vous pouvez régler le nombre de colonnes depuis l’onglet Options de l’Écran." + +#: wp-admin/includes/template.php:3467 +msgid "General Settings" +msgstr "General Settings" + +#: wp-admin/includes/template.php:3481 +msgid "Enable accessibility mode" +msgstr "Activer le mode Accessibilité" + +#: wp-admin/includes/template.php:3481 +msgid "Disable accessibility mode" +msgstr "Désactiver le mode Accessibilité" + +#: wp-admin/includes/template.php:3493 +msgid "Show on screen" +msgstr "Afficher à l’écran" + +#: wp-admin/includes/template.php:3522 +#, php-format +msgid "Get help with “%s”" +msgstr "Obtenez de l’aide avec « %s »" + +#: wp-admin/includes/template.php:3524 +msgid "Get help with this page" +msgstr "Obtenir de l’aide sur cet écran" + +#: wp-admin/includes/template.php:3527 +msgid "Other Help" +msgstr "Autre aide" + +#: wp-admin/includes/template.php:3529 +#: wp-admin/includes/template.php:3544 +#: wp-includes/js/tinymce/langs/wp-langs.php:238 +#: wp-includes/js/tinymce/langs/wp-langs.php:252 +#: wp-includes/js/tinymce/langs/wp-langs.php:409 +#: wp-includes/js/tinymce/wp-mce-help.php:234 +msgid "Help" +msgstr "Aide" + +#: wp-admin/includes/template.php:3533 +msgid "Documentation" +msgstr "Documentation" + +#: wp-admin/includes/template.php:3535 +msgid "Support Forums" +msgstr "Forums d’entraide" + +#: wp-admin/includes/template.php:3548 +msgid "Screen Options" +msgstr "Options de l’écran" + +#: wp-admin/includes/template.php:3575 +msgid "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." +msgstr "La plupart des modules de cet écran peuvent être déplacés. Si vous passez la souris au-dessus de la barre de titre d’un module, vous remarquerez que le curseur se transforme en quatre flèches pour vous indiquer qu’il est possible de le déplacer. Cliquez dessus, maintenez la pression et déplacez le module vers une autre position. Tandis que vous faites glisser le module, vous remarquerez un rectangle en pointillés gris qui se déplace également : il indique où le module sera placé si vous relâchez le bouton de la souris à cet instant." + +#: wp-admin/includes/template.php:3576 +msgid "The same modules can be expanded and collapsed by clicking once on their title bar and also completely hidden from the Screen Options tab." +msgstr "Ces mêmes modules peuvent être étendus ou minimisés en cliquant une fois sur la barre de titre, et peuvent être également complètement cachés depuis l’onglet Options de l’Écran." + +#: wp-admin/includes/template.php:3582 +msgid "Search help" +msgstr "Aide sur la recherche" + +#: wp-admin/includes/template.php:3583 +msgid "You may search based on 3 criteria:" +msgstr "Vous pouvez cibler votre recherche selon trois critères :" + +#: wp-admin/includes/template.php:3584 +msgid "Term: Searches theme names and descriptions for the specified term." +msgstr "Mot : recherche un mot dans les noms et descriptions des thèmes." + +#: wp-admin/includes/template.php:3585 +msgid "Tag: Searches for themes tagged as such." +msgstr "Mot-clef : recherche les thèmes répondant à ce mot-clef." + +#: wp-admin/includes/template.php:3586 +msgid "Author: Searches for themes created by the Author, or which the Author contributed to." +msgstr "Auteur : recherche les thèmes d’un auteur, ou auxquels un auteur a participé." + +#: wp-admin/includes/template.php:3592 +msgid "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." +msgstr "Les widget peuvent être ajoutés et réarrangés en les déplacant. Si vous passez la souris au-dessus de la barre de titre d’un widget, vous remarquerez que le curseur se transforme en quatre flèches pour vous indiquer qu’il est possible de le déplacer. Cliquez dessus, maintenez la pression et déplacez le widget vers une autre position. Tandis que vous faites glisser le widget, vous remarquerez un rectangle en pointillés gris qui se déplace également : il indique où le widget sera placé si vous relâchez le bouton de la souris à cet instant." + +#: wp-admin/includes/template.php:3593 +msgid "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." +msgstr "Pour retirer un widget d’une colonne latérale, glissez-le dans la zone Widgets Disponibles ; vous pouvez également cliquer sur la flèche qui apparaît dans sa barre de titre pour révéler ses réglages, puis cliquer sur Supprimer." + +#: wp-admin/includes/template.php:3594 +msgid "To remove a widget from a sidebar and keep its configuration, drag it to Inactive Widgets." +msgstr "Pour retirer un widget d’une colonne latérale, et conserver ses réglages, glissez-le vers Widgets Désactivés." + +#: wp-admin/includes/template.php:3595 +msgid "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." +msgstr "La zone des widgets désactivés contient touts les widgets qui ont été configurés, mais qui ne sont pas actuellement utilisés sur le site. Après un changement de thème, si le nouveau thème a moins de colonnes latérales que le précédent, tous les widgets qui étaient dans ces colonnes supplémentaires sont déplacés dans Widgets Désactivés automatiquement." + +#: wp-admin/includes/template.php:3617 +msgid "Screen Layout" +msgstr "Présentation de l’écran" + +#: wp-admin/includes/template.php:3617 +msgid "Number of Columns:" +msgstr "Nombre de colonnes :" + +#: wp-admin/includes/template.php:3629 +msgid "Posts per page:" +msgstr "Articles par page :" + +#: wp-admin/includes/template.php:3632 +msgid "Pages per page:" +msgstr "Pages par page :" + +#: wp-admin/includes/template.php:3635 +msgid "Comments per page:" +msgstr "Commentaires par page :" + +#: wp-admin/includes/template.php:3638 +msgid "Media items per page:" +msgstr "Fichiers multimédia par page :" + +#: wp-admin/includes/template.php:3641 +msgid "Categories per page:" +msgstr "Catégories par page :" + +#: wp-admin/includes/template.php:3644 +msgid "Tags per page:" +msgstr "Mots-clefs par page :" + +#: wp-admin/includes/template.php:3647 +msgid "Plugins per page:" +msgstr "Extensions par page :" + +#: wp-admin/includes/theme-install.php:57 +msgid "An Unexpected HTTP Error occured during the API request.

    Try again" +msgstr "Une erreur HTTP inattendue est survenue pendant la requête auprès de l'API.

    Essayez à nouveau" + +#: wp-admin/includes/theme-install.php:61 +msgid "An unknown error occured" +msgstr "Une erreur inconnue est survenue" + +#: wp-admin/includes/theme-install.php:153 +msgid "Search for themes by keyword, author, or tag." +msgstr "Chercher un thème par mot, auteur ou mot-clef." + +#: wp-admin/includes/theme-install.php:159 +msgctxt "Theme Installer" +msgid "Tag" +msgstr "Mot-clef" + +#: wp-admin/includes/theme-install.php:176 +msgid "Feature Filter" +msgstr "Filtre de fonctionnalités" + +#: wp-admin/includes/theme-install.php:178 +msgid "Find a theme based on specific features" +msgstr "Trouver un thème selon des critères spécifiques" + +#: wp-admin/includes/theme-install.php:182 +msgid "Colors" +msgstr "Couleurs" + +#: wp-admin/includes/theme-install.php:182 +msgid "Black" +msgstr "Noir" + +#: wp-admin/includes/theme-install.php:182 +msgid "Brown" +msgstr "Marron" + +#: wp-admin/includes/theme-install.php:183 +msgid "Green" +msgstr "Vert" + +#: wp-admin/includes/theme-install.php:183 +msgid "Orange" +msgstr "Orange" + +#: wp-admin/includes/theme-install.php:183 +msgid "Pink" +msgstr "Rose" + +#: wp-admin/includes/theme-install.php:183 +msgid "Purple" +msgstr "Violet" + +#: wp-admin/includes/theme-install.php:183 +msgid "Red" +msgstr "Rouge" + +#: wp-admin/includes/theme-install.php:184 +msgid "Silver" +msgstr "Argent" + +#: wp-admin/includes/theme-install.php:184 +msgid "Tan" +msgstr "Ocre" + +#: wp-admin/includes/theme-install.php:184 +msgid "White" +msgstr "Blanc" + +#: wp-admin/includes/theme-install.php:184 +msgid "Yellow" +msgstr "Jaune" + +#: wp-admin/includes/theme-install.php:184 +msgid "Dark" +msgstr "Sombre" + +#: wp-admin/includes/theme-install.php:185 +msgid "Light" +msgstr "Léger" + +#: wp-admin/includes/theme-install.php:185 +msgid "Columns" +msgstr "Colonnes" + +#: wp-admin/includes/theme-install.php:185 +msgid "One Column" +msgstr "Une colonne" + +#: wp-admin/includes/theme-install.php:185 +msgid "Two Columns" +msgstr "Deux colonnes" + +#: wp-admin/includes/theme-install.php:186 +msgid "Three Columns" +msgstr "Trois colonnes" + +#: wp-admin/includes/theme-install.php:186 +msgid "Four Columns" +msgstr "Quatre colonnes" + +#: wp-admin/includes/theme-install.php:186 +msgid "Left Sidebar" +msgstr "Colonne latérale gauche" + +#: wp-admin/includes/theme-install.php:187 +msgid "Right Sidebar" +msgstr "Colonne latérale droite" + +#: wp-admin/includes/theme-install.php:187 +#: wp-admin/options-media.php:36 +#: wp-includes/js/tinymce/langs/wp-langs.php:434 +msgid "Width" +msgstr "Largeur" + +#: wp-admin/includes/theme-install.php:187 +msgid "Fixed Width" +msgstr "Largeur fixe" + +#: wp-admin/includes/theme-install.php:187 +msgid "Flexible Width" +msgstr "Largeur flexible" + +#: wp-admin/includes/theme-install.php:188 +msgid "Features" +msgstr "Fonctionnalités" + +#: wp-admin/includes/theme-install.php:188 +msgid "Custom Colors" +msgstr "Couleurs personnalisées" + +#: wp-admin/includes/theme-install.php:188 +msgid "Theme Options" +msgstr "Options du thème" + +#: wp-admin/includes/theme-install.php:189 +msgid "Threaded Comments" +msgstr "Commentaires imbriqués" + +# Y'a p'tet mieux comme trad, non ? "tête de blog" ? boaf... +#: wp-admin/includes/theme-install.php:189 +msgid "Sticky Post" +msgstr "Mise en avant" + +#: wp-admin/includes/theme-install.php:189 +msgid "Microformats" +msgstr "Microformats" + +#: wp-admin/includes/theme-install.php:190 +msgid "Subject" +msgstr "Thème" + +#: wp-admin/includes/theme-install.php:190 +msgid "Holiday" +msgstr "Vacances" + +#: wp-admin/includes/theme-install.php:190 +msgid "Photoblogging" +msgstr "Photoblogging" + +#: wp-admin/includes/theme-install.php:190 +msgid "Seasonal" +msgstr "Saisonnier" + +#: wp-admin/includes/theme-install.php:221 +msgid "Find Themes" +msgstr "Trouver des thèmes" + +#: wp-admin/includes/theme-install.php:278 +msgid "Install a theme in .zip format" +msgstr "Installer une thème au format .zip" + +#: wp-admin/includes/theme-install.php:279 +msgid "If you have a theme in a .zip format, you may install it by uploading it here." +msgstr "Si vous avez un thème au format .zip, vous pouvez l’installer en le mettant en ligne ici." + +#: wp-admin/includes/theme-install.php:304 +#, php-format +msgid "Install “%s”" +msgstr "Installer « %s »" + +#: wp-admin/includes/theme-install.php:320 +msgid "Details" +msgstr "Détails" + +#: wp-admin/includes/theme-install.php:399 +msgid "No themes found" +msgstr "Aucun thème trouvé" + +#: wp-admin/includes/theme-install.php:463 +msgid "Theme Install" +msgstr "Installation de thème" + +#: wp-admin/includes/theme-install.php:466 +msgid "Error: This theme is currently not available. Please try again later." +msgstr "ERREUR : ce thème n’est pas disponible pour le moment. Veuillez réessayer plus tard." + +#: wp-admin/includes/theme-install.php:472 +msgid "Warning: This theme has not been tested with your current version of WordPress." +msgstr "Attention : ce thème n’a pas été testé avec votre version de WordPress." + +#: wp-admin/includes/theme-install.php:474 +msgid "Warning: This theme has not been marked as compatible with your version of WordPress." +msgstr "Attention : ce thème n’a pas été marqué comme étant compatible avec votre version de WordPress" + +#: wp-admin/includes/theme-install.php:507 +#, php-format +msgid "by %s" +msgstr "par %s" + +#: wp-admin/includes/theme-install.php:508 +#, php-format +msgid "Version: %s" +msgstr "Version : %s" + +#: wp-admin/includes/theme-install.php:527 +#, php-format +msgid "Newer version (%s) is installed." +msgstr "Une version plus récente (%s) est installée." + +#: wp-admin/includes/theme-install.php:532 +msgid "This version is already installed." +msgstr "Cette version est déjà installée." + +#: wp-admin/includes/theme.php:85 +msgid "Unable to locate WordPress theme directory." +msgstr "Impossible de localiser le dossier des thèmes de WordPress." + +#: wp-admin/includes/theme.php:95 +#, php-format +msgid "Could not fully remove the theme %s" +msgstr "Impossible de supprimer complétement le thème %s" + +#: wp-admin/includes/update-core.php:215 +msgid "Verifying the unpacked files" +msgstr "Vérification des fichiers décompressés" + +#: wp-admin/includes/update-core.php:219 +msgid "The update could not be unpacked" +msgstr "La mise à jour ne peut pas être décompressée" + +#: wp-admin/includes/update-core.php:222 +msgid "Installing the latest version" +msgstr "Installation de la dernière version" + +#: wp-admin/includes/update-core.php:247 +msgid "Upgrading database" +msgstr "Mise à jour de la base de données" + +#: wp-admin/includes/update.php:86 +#: wp-admin/includes/update.php:111 +#: wp-admin/plugins.php:445 +#, php-format +msgid "Version %s" +msgstr "Version %s" + +#: wp-admin/includes/update.php:100 +#, php-format +msgid "You are using a development version (%1$s). Cool! Please stay updated." +msgstr "Vous utilisez une version de développement (%1$s). C’est super ! Veillez à rester à jour." + +#: wp-admin/includes/update.php:105 +#, php-format +msgid "Get Version %2$s" +msgstr "Téléchargez la version %2$s" + +#: wp-admin/includes/update.php:129 +#, php-format +msgid "WordPress %1$s is available! Please update now." +msgstr "WordPress %1$s est disponible ! Pensez à faire une mise à jour." + +#: wp-admin/includes/update.php:131 +#, php-format +msgid "WordPress %1$s is available! Please notify the site administrator." +msgstr "WordPress %1$s est disponible ! Merci de notifier l’administrateur du site." + +#: wp-admin/includes/update.php:141 +#, php-format +msgid "You are using WordPress %s." +msgstr "Vous utilisez WordPress %s." + +#: wp-admin/includes/update.php:143 +#, php-format +msgid "Update to %s" +msgstr "Mettre à jour vers la version %s" + +#: wp-admin/includes/update.php:143 +msgid "Latest" +msgstr "Dernière version" + +#: wp-admin/includes/update.php:162 +#, php-format +msgid "There is a new version of %1$s available. View version %4$s Details." +msgstr "Une nouvelle version de %1$s est disponible. Afficher les détails de la version %4$s." + +#: wp-admin/includes/update.php:164 +#, php-format +msgid "There is a new version of %1$s available. View version %4$s Details automatic upgrade unavailable for this plugin." +msgstr "Une nouvelle version de %1$s est disponible. Afficher les détails de la version %4$s la mise à jour automatique n’est pas possible pour cette extension." + +#: wp-admin/includes/update.php:166 +#, php-format +msgid "There is a new version of %1$s available. View version %4$s Details or upgrade automatically." +msgstr "Une nouvelle version de %1$s est disponible. Afficher les détails de la version %4$s ou lancer la mise à jour automatique." + +#: wp-admin/includes/update.php:212 +#, php-format +msgid "An automated WordPress update has failed to complete - please attempt the update again now." +msgstr "Une mise à jour automatique de WordPress a échoué en cours de route ; vous pouvez tenter de la relancer." + +#: wp-admin/includes/update.php:214 +msgid "An automated WordPress update has failed to complete! Please notify the site administrator." +msgstr "Une mise à jour automatique de WordPress a échoué en cours de route ! Merci de notifier l’administrateur du site." + +#: wp-admin/includes/upgrade.php:62 +msgid "Note that password carefully! It is a random password that was generated just for you." +msgstr "Notez bien ce mot de passe sans vous tromper ! Il a été créé au hasard et vous est unique." + +#: wp-admin/includes/upgrade.php:67 +msgid "User already exists. Password inherited." +msgstr "L’utilisateur existe déjà, et a hérité du mot de passe." + +#. translators: Default category slug +#: wp-admin/includes/upgrade.php:101 +msgctxt "Default category slug" +msgid "Uncategorized" +msgstr "non-classe" + +#. translators: Default link category slug +#: wp-admin/includes/upgrade.php:109 +msgctxt "Default link category slug" +msgid "Blogroll" +msgstr "Liens" + +#: wp-admin/includes/upgrade.php:165 +msgid "Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!" +msgstr "Bienvenue dans WordPress. Ceci est votre premier article. Modifiez-le ou supprimer-le, puis lancez-vous !" + +#: wp-admin/includes/upgrade.php:167 +msgid "Hello world!" +msgstr "Bonjour tout le monde !" + +#. translators: Default post slug +#: wp-admin/includes/upgrade.php:169 +msgctxt "Default post slug" +msgid "hello-world" +msgstr "bonjour-tout-le-monde" + +#: wp-admin/includes/upgrade.php:183 +msgid "Mr WordPress" +msgstr "Monsieur WordPress" + +#: wp-admin/includes/upgrade.php:188 +msgid "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." +msgstr "Bonjour, ceci est un commentaire.
    Pour supprimer un commentaire, connectez-vous, et affichez les commentaires de cet article. Vous pourrez alors les modifier ou les supprimer." + +#: wp-admin/includes/upgrade.php:196 +msgid "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." +msgstr "Ceci est un exemple de page WordPress. Vous pouvez la modifier pour mettre ici des informations vous concernant ou concernant votre site afin que vos lecteurs en sachent un peu plus sur vous. Vous pouvez créer autant de pages ou sous-pages que vous voulez, et gérer l’intégralité de votre contenu dans WordPress." + +#: wp-admin/includes/upgrade.php:198 +#: wp-includes/js/tinymce/langs/wp-langs.php:251 +#: wp-includes/js/tinymce/wp-mce-help.php:177 +msgid "About" +msgstr "À propos" + +#. translators: Default page slug +#: wp-admin/includes/upgrade.php:200 +msgctxt "Default page slug" +msgid "about" +msgstr "a-propos" + +# Ne pas mettre d'entité HTML ( ...) : chaîne envoyée par e-mail. +#: wp-admin/includes/upgrade.php:229 +#, php-format +msgid "" +"Your new WordPress blog has been successfully set up at:\n" +"\n" +"%1$s\n" +"\n" +"You can log in to the administrator account with the following information:\n" +"\n" +"Username: %2$s\n" +"Password: %3$s\n" +"\n" +"We hope you enjoy your new blog. Thanks!\n" +"\n" +"--The WordPress Team\n" +"http://wordpress.org/\n" +msgstr "" +"Votre nouveau blog WordPress a été créé avec succès à l'adresse suivante :\n" +"\n" +"%1$s\n" +"\n" +"Vous pouvez vous connecter au compte administrateur avec les informations suivantes :\n" +"\n" +"Identifiant : %2$s\n" +"Mot de passe : %3$s\n" +"\n" +"Nous espérons que vous apprécierez votre nouveau blog. Merci !\n" +"\n" +"--L'équipe WordPress\n" +"http://wordpress.org/\n" +"http://www.wordpress-fr.net/ (traduction française et assistance)\n" + +#: wp-admin/includes/upgrade.php:244 +msgid "New WordPress Blog" +msgstr "Nouveau blog WordPress" + +#: wp-admin/includes/user.php:33 +#: wp-admin/includes/user.php:85 +#: wp-admin/users.php:53 +msgid "You can’t give users that role." +msgstr "Vous ne pouvez pas donner ce rôle aux utilisateurs." + +#: wp-admin/includes/user.php:138 +#: wp-login.php:239 +msgid "ERROR: Please enter a username." +msgstr "ERREUR : merci de renseigner l’identifiant." + +#: wp-admin/includes/user.php:145 +#: wp-admin/includes/user.php:147 +msgid "ERROR: You entered your new password only once." +msgstr "ERREUR : vous n’avez tapé votre nouveau mot de passe qu’une seule fois." + +#: wp-admin/includes/user.php:150 +msgid "ERROR: Please enter your password." +msgstr "ERREUR : merci de renseigner votre mot de passe." + +#: wp-admin/includes/user.php:152 +msgid "ERROR: Please enter your password twice." +msgstr "ERREUR : merci de renseigner deux fois le mot de passe." + +#: wp-admin/includes/user.php:157 +msgid "ERROR: Passwords may not contain the character \"\\\"." +msgstr "ERREUR : le mot de passe ne doit pas contenir le caractère « \\ »." + +#: wp-admin/includes/user.php:161 +msgid "ERROR: Please enter the same password in the two password fields." +msgstr "ERREUR : les deux mots de passe ne sont pas identiques." + +#: wp-admin/includes/user.php:167 +msgid "ERROR: This username is invalid. Please enter a valid username." +msgstr "ERREUR : cet identifiant n’est pas valide. Merci d’utiliser un identifiant valide." + +#: wp-admin/includes/user.php:170 +msgid "ERROR: This username is already registered. Please choose another one." +msgstr "ERREUR : cet identifiant existe déjà. Merci d’en choisir un autre." + +#: wp-admin/includes/user.php:174 +msgid "ERROR: Please enter an e-mail address." +msgstr "ERREUR : veuillez saisir une adresse e-mail." + +#: wp-admin/includes/user.php:176 +msgid "ERROR: The e-mail address isn’t correct." +msgstr "ERREUR : adresse e-mail incorrecte." + +#: wp-admin/includes/user.php:178 +#: wp-login.php:253 +msgid "ERROR: This email is already registered, please choose another one." +msgstr "ERREUR : cette adresse e-mail est déjà utilisée. Merci d’en choisir une autre." + +#: wp-admin/includes/user.php:692 +msgid "No matching users were found!" +msgstr "Aucun utilisateur ne correspond !" + +#: wp-admin/includes/user.php:833 +#, php-format +msgid "" +"Notice: you're using the auto-generated password for your account. Would you like to change it to something you'll remember easier?
    \n" +"\t\t\t Yes, Take me to my profile page | No Thanks, Do not remind me again." +msgstr "" +"Nota Bene : votre compte utilise toujours le mot de passe généré automatiquement. Souhaitez-vous le changer pour un mot de passe plus facile à mémoriser ?
    \n" +"\t\t\t Oui, je veux aller sur mon profil maintenant | Non, ne pas me relancer à ce sujet." + +#: wp-admin/includes/widgets.php:179 +#: wp-admin/widgets.php:249 +#: wp-includes/widgets.php:67 +msgid "There are no options for this widget." +msgstr "Il n’y a pas d’options pour ce widget." + +#: wp-admin/includes/widgets.php:191 +#: wp-admin/widgets.php:286 +msgid "Remove" +msgstr "Supprimer" + +#: wp-admin/index.php:24 +#: wp-admin/menu.php:28 +msgid "Dashboard" +msgstr "Tableau de bord" + +#: wp-admin/install.php:42 +msgid "WordPress › Installation" +msgstr "WordPress » Installation" + +#: wp-admin/install.php:60 +#, php-format +msgid "ERROR: %s" +msgstr "Erreur : %s" + +#: wp-admin/install.php:65 +#: wp-admin/options-general.php:65 +#: xmlrpc.php:404 +msgid "Blog Title" +msgstr "Titre du blog" + +#: wp-admin/install.php:69 +msgid "Your E-mail" +msgstr "Votre e-mail" + +#: wp-admin/install.php:71 +msgid "Double-check your email address before continuing." +msgstr "Vérifiez bien cette adresse e-mail avant de continuer." + +#: wp-admin/install.php:74 +msgid "Allow my blog to appear in search engines like Google and Technorati." +msgstr "Autoriser mon blog à apparaitre dans les moteurs de recherche comme Google et Technorati." + +#: wp-admin/install.php:77 +msgid "Install WordPress" +msgstr "Installer WordPress" + +#: wp-admin/install.php:83 +msgid "Already Installed" +msgstr "Déjà installé" + +#: wp-admin/install.php:83 +msgid "You appear to have already installed WordPress. To reinstall please clear your old database tables first." +msgstr "Il semblerait que WordPress soit déjà installé. Pour le réinstaller, commencez par vider les tables de la base de données." + +#: wp-admin/install.php:90 +msgid "Welcome" +msgstr "Bienvenue" + +#: wp-admin/install.php:91 +#, php-format +msgid "Welcome to the famous five minute WordPress installation process! You may want to browse the 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." +msgstr "Bienvenue dans le célèbre processus d’installation en 5 minutes de WordPress ! Vous pouvez parcourir le fichier ReadMe à loisir. Autrement, remplissez simplement les champs ci-dessous, et vous serez prêt à installer la plate-forme de publication personnelle la plus puissante et la plus extensible au monde." + +#: wp-admin/install.php:92 +msgid "First Step" +msgstr "Première étape" + +#: wp-admin/install.php:94 +msgid "Information needed" +msgstr "Informations nécessaires" + +#: wp-admin/install.php:95 +msgid "Please provide the following information. Don’t worry, you can always change these settings later." +msgstr "Merci de fournir les informations suivantes. Ne vous inquiétez pas, vous pourrez les modifier plus tard." + +#: wp-admin/install.php:115 +msgid "you must provide an e-mail address." +msgstr "vous devez saisir une adresse e-mail." + +#: wp-admin/install.php:119 +msgid "that isn’t a valid e-mail address. E-mail addresses look like: username@example.com" +msgstr "ce n’est pas une adresse e-mail valide. Les adresses e-mail ressemblent à cela : utilisateur@exemple.com" + +#: wp-admin/install.php:129 +msgid "Success!" +msgstr "Quel succès !" + +#: wp-admin/install.php:131 +msgid "WordPress has been installed. Were you expecting more steps? Sorry to disappoint." +msgstr "WordPress est installé. Vous attendiez-vous à d’autres étapes ? Désolé de vous décevoir ;-)" + +#: wp-admin/install.php:147 +#: wp-login.php:498 +#: wp-login.php:517 +msgid "Log In" +msgstr "Se connecter" + +#: wp-admin/link-add.php:13 +msgid "You do not have sufficient permissions to add links to this blog." +msgstr "Vous n’avez pas les droits suffisants pour ajouter des liens dans ce blog." + +#: wp-admin/link-add.php:15 +msgid "Add New Link" +msgstr "Ajouter un lien" + +#: wp-admin/link-manager.php:18 +#: wp-admin/link-manager.php:48 +#: wp-admin/link.php:18 +msgid "You do not have sufficient permissions to edit the links for this blog." +msgstr "Vous n’avez pas les droits suffisants pour modifier les liens de ce blog." + +#: wp-admin/link-manager.php:83 +#, php-format +msgid "%s link deleted." +msgid_plural "%s links deleted" +msgstr[0] "%s lien supprimé" +msgstr[1] "%s liens supprimés" + +#: wp-admin/link-manager.php:91 +#: wp-admin/link-manager.php:93 +msgid "Search Links" +msgstr "Chercher dans les liens" + +#: wp-admin/link-manager.php:111 +msgid "View all Categories" +msgstr "Voir toutes les catégories" + +#: wp-admin/link-manager.php:117 +msgid "Order by Link ID" +msgstr "Trier par l’ID du lien" + +#: wp-admin/link-manager.php:118 +msgid "Order by Name" +msgstr "Trier par noms" + +#: wp-admin/link-manager.php:119 +msgid "Order by Address" +msgstr "Trier par l’adresse" + +#: wp-admin/link-manager.php:120 +msgid "Order by Rating" +msgstr "Trier par notes" + +#: wp-admin/link-manager.php:176 +msgid "Yes" +msgstr "Oui" + +#: wp-admin/link-manager.php:213 +#, php-format +msgid "Visit %s" +msgstr "Aller sur %s" + +#: wp-admin/link-manager.php:254 +msgid "No links found." +msgstr "Aucun lien trouvé." + +#: wp-admin/link-parse-opml.php:90 +#, php-format +msgid "XML error: %1$s at line %2$s" +msgstr "Erreur XML : %1$s à la ligne %2$s" + +#: wp-admin/link.php:102 +msgid "Edit Link" +msgstr "Modifier le lien" + +#: wp-admin/link.php:107 +msgid "Link not found." +msgstr "Lien non trouvé." + +#: wp-admin/media-upload.php:29 +msgid "You are not allowed to be here" +msgstr "Vous n’avez pas l’autorisation d’être ici." + +#: wp-admin/media-upload.php:54 +msgid "Upload New Media" +msgstr "Envoi d’un nouveau média" + +#: wp-admin/media.php:23 +#: wp-admin/media.php:57 +msgid "You are not allowed to edit this attachment." +msgstr "Vous n’avez pas l’autorisation de modifier cet fichier joint." + +#: wp-admin/media.php:73 +#: wp-admin/upload.php:153 +msgid "Media attachment updated." +msgstr "Fichier joint mis à jour." + +#: wp-admin/media.php:95 +msgid "Update Media" +msgstr "Mettre à jour le fichier" + +#. translators: add new post +#: wp-admin/menu.php:35 +msgctxt "post" +msgid "Add New" +msgstr "Ajouter" + +#: wp-admin/menu.php:49 +msgid "Library" +msgstr "Bibliothèque" + +#. translators: add new file +#: wp-admin/menu.php:51 +msgctxt "file" +msgid "Add New" +msgstr "Ajouter" + +#. translators: add new links +#: wp-admin/menu.php:56 +msgctxt "links" +msgid "Add New" +msgstr "Ajouter" + +#. translators: add new page +#: wp-admin/menu.php:62 +msgctxt "page" +msgid "Add New" +msgstr "Ajouter" + +#: wp-admin/menu.php:64 +#, php-format +msgid "Comments %s" +msgstr "Commentaires %s" + +#: wp-admin/menu.php:70 +msgid "Appearance" +msgstr "Apparence" + +#: wp-admin/menu.php:71 +msgid "Themes" +msgstr "Thèmes" + +#: wp-admin/menu.php:72 +#: wp-admin/menu.php:84 +msgid "Editor" +msgstr "Éditeur" + +#: wp-admin/menu.php:73 +msgid "Add New Themes" +msgstr "Ajouter de nouveaux thèmes" + +#: wp-admin/menu.php:80 +#, php-format +msgid "Plugins %s" +msgstr "Extensions %s" + +#: wp-admin/menu.php:81 +msgid "Installed" +msgstr "Installées" + +#. translators: add new plugin +#: wp-admin/menu.php:83 +msgctxt "plugin" +msgid "Add New" +msgstr "Ajouter" + +#: wp-admin/menu.php:89 +#: wp-admin/user-edit.php:18 +msgid "Profile" +msgstr "Profil" + +#: wp-admin/menu.php:93 +msgid "Authors & Users" +msgstr "Auteurs & Utilisateurs" + +# contexte +#: wp-admin/menu.php:94 +msgid "Add New" +msgstr "Ajouter" + +#: wp-admin/menu.php:95 +#: wp-admin/menu.php:98 +msgid "Your Profile" +msgstr "Votre profil" + +#: wp-admin/menu.php:101 +#: wp-admin/menu.php:102 +#: wp-admin/tools.php:12 +msgid "Tools" +msgstr "Outils" + +#: wp-admin/menu.php:105 +msgid "Upgrade" +msgstr "Mettre à jour" + +#: wp-admin/menu.php:107 +#: wp-admin/options.php:18 +msgid "Settings" +msgstr "Réglages" + +#: wp-admin/menu.php:108 +#: wp-includes/js/tinymce/langs/wp-langs.php:303 +msgid "General" +msgstr "Général" + +#: wp-admin/menu.php:109 +msgid "Writing" +msgstr "Écriture" + +#: wp-admin/menu.php:110 +msgid "Reading" +msgstr "Lecture" + +#: wp-admin/menu.php:113 +msgid "Privacy" +msgstr "Vie privée" + +#: wp-admin/menu.php:114 +msgid "Permalinks" +msgstr "Permaliens" + +#: wp-admin/menu.php:115 +msgid "Miscellaneous" +msgstr "Divers" + +#: wp-admin/menu.php:309 +msgid "You do not have sufficient permissions to access this page." +msgstr "Vous n’avez pas les droits suffisants pour accéder à cette page." + +#: wp-admin/options-discussion.php:13 +#: wp-admin/options-general.php:13 +#: wp-admin/options-media.php:13 +#: wp-admin/options-misc.php:13 +#: wp-admin/options-permalink.php:13 +#: wp-admin/options-privacy.php:13 +#: wp-admin/options-reading.php:13 +#: wp-admin/options-writing.php:13 +msgid "You do not have sufficient permissions to manage options for this blog." +msgstr "Vous n’avez pas les droits suffisants pour gérer les réglages de ce blog." + +#: wp-admin/options-discussion.php:15 +msgid "Discussion Settings" +msgstr "Options de discussion" + +#: wp-admin/options-discussion.php:30 +#: wp-admin/options-discussion.php:31 +msgid "Default article settings" +msgstr "Réglages par défaut des articles" + +#: wp-admin/options-discussion.php:34 +msgid "Attempt to notify any blogs linked to from the article (slows down posting.)" +msgstr "Tenter de notifier les blogs liés à cet article (ralentit la mise en ligne)" + +#: wp-admin/options-discussion.php:38 +msgid "Allow link notifications from other blogs (pingbacks and trackbacks.)" +msgstr "Autoriser les notifications depuis les autres blogs (notifications par pings et rétroliens)" + +#: wp-admin/options-discussion.php:42 +msgid "Allow people to post comments on new articles" +msgstr "Autoriser les visiteurs à publier des commentaires sur les articles" + +#: wp-admin/options-discussion.php:44 +msgid "These settings may be overridden for individual articles." +msgstr "Ces réglages peuvent être modifiés pour chaque article" + +#: wp-admin/options-discussion.php:48 +#: wp-admin/options-discussion.php:49 +msgid "Other comment settings" +msgstr "Autres réglages des commentaires" + +#: wp-admin/options-discussion.php:50 +msgid "Comment author must fill out name and e-mail" +msgstr "L’auteur d’un commentaire doit renseigner son nom et son e-mail" + +#: wp-admin/options-discussion.php:54 +msgid "Users must be registered and logged in to comment" +msgstr "Un utilisateur doit être enregistré et connecté pour publier des commentaires" + +#: wp-admin/options-discussion.php:60 +#, php-format +msgid "Automatically close comments on articles older than %s days" +msgstr "Fermer automatiquement les commentaires pour les articles vieux de plus de %s jours" + +#: wp-admin/options-discussion.php:76 +#, php-format +msgid "Enable threaded (nested) comments %s levels deep" +msgstr "Activer les commentaires imbriqués jusqu’à %s niveaux" + +# va avec "page" +#: wp-admin/options-discussion.php:85 +msgid "last" +msgstr "dernière" + +# va avec "page" +#: wp-admin/options-discussion.php:87 +msgid "first" +msgstr "première" + +#: wp-admin/options-discussion.php:89 +#, php-format +msgid "Break comments into pages with %1$s comments per page and the %2$s page displayed by default" +msgstr "Diviser les commentaires en pages, avec %1$s commentaires par page et la %2$s page affichée par défaut" + +# va avec "commentaire le plus ..." +#: wp-admin/options-discussion.php:97 +msgid "older" +msgstr "ancien" + +# va avec "commentaire le plus ..." +#: wp-admin/options-discussion.php:99 +msgid "newer" +msgstr "récent" + +#: wp-admin/options-discussion.php:101 +#, php-format +msgid "Comments should be displayed with the %s comments at the top of each page" +msgstr "Les commentaires doivent être affichés avec le plus %s en premier" + +#: wp-admin/options-discussion.php:107 +#: wp-admin/options-discussion.php:108 +msgid "E-mail me whenever" +msgstr "M’envoyer un e-mail lorsque" + +#: wp-admin/options-discussion.php:111 +msgid "Anyone posts a comment" +msgstr "Un nouveau commentaire est publié" + +#: wp-admin/options-discussion.php:115 +msgid "A comment is held for moderation" +msgstr "Un commentaire est en attente de modération" + +#: wp-admin/options-discussion.php:119 +#: wp-admin/options-discussion.php:120 +msgid "Before a comment appears" +msgstr "Avant la publication d’un commentaire" + +#: wp-admin/options-discussion.php:123 +msgid "An administrator must always approve the comment" +msgstr "Un administrateur doit toujours approuver le commentaire" + +#: wp-admin/options-discussion.php:125 +msgid "Comment author must have a previously approved comment" +msgstr "L’auteur d’un commentaire doit avoir déjà publié un commentaire approuvé" + +#: wp-admin/options-discussion.php:129 +#: wp-admin/options-discussion.php:130 +msgid "Comment Moderation" +msgstr "Modération de commentaires" + +#: wp-admin/options-discussion.php:131 +#, php-format +msgid "Hold a comment in the queue if it contains %s or more links. (A common characteristic of comment spam is a large number of hyperlinks.)" +msgstr "Garder un commentaire dans la file s’il contient plus de %s lien(s) (une des caractéristiques typiques d’un commentaire indésirable (spam) est son nombre important de liens)" + +#: wp-admin/options-discussion.php:133 +msgid "When a comment contains any of these words in its content, name, URL, e-mail, or IP, it will be held in the moderation queue. One word or IP per line. It will match inside words, so “press” will match “WordPress”." +msgstr "Lorsqu’un commentaire contient l’un de ces mots dans son contenu, son nom, son adresse web, son adresse e-mail, ou son IP, celui-ci est retenu dans la file de modération. Un seul mot ou une seule IP par ligne. Cette fonction reconnaît l’intérieur des mots, donc « press » suffira pour reconnaître « WordPress »." + +#: wp-admin/options-discussion.php:140 +#: wp-admin/options-discussion.php:141 +msgid "Comment Blacklist" +msgstr "Liste noire pour les commentaires" + +#: wp-admin/options-discussion.php:142 +msgid "When a comment contains any of these words in its content, name, URL, e-mail, or IP, it will be marked as spam. One word or IP per line. It will match inside words, so “press” will match “WordPress”." +msgstr "Lorsqu’un commentaire contient l’un de ces mots dans son contenu, nom, adresse web, e-mail, ou IP, le marquer comme indésirable. Un seul mot ou IP par ligne. Il reconnaît l’intérieur des mots, donc « press » suffira pour reconnaître « WordPress »." + +#: wp-admin/options-discussion.php:151 +msgid "Avatars" +msgstr "Avatars" + +#: wp-admin/options-discussion.php:153 +msgid "An avatar is an image that follows you from weblog to weblog appearing beside your name when you comment on avatar enabled sites. Here you can enable the display of avatars for people who comment on your blog." +msgstr "Un avatar est une image qui vous suit de blog en blog, apparaissant à côté de votre nom quand vous laissez un commentaire sur un site capable de le reconnaître. Vous pouvez ici activer l’affichage des avatars des gens qui laissent un commentaire sur votre blog." + +#: wp-admin/options-discussion.php:159 +msgid "Avatar Display" +msgstr "Affichage des avatars" + +#: wp-admin/options-discussion.php:160 +msgid "Avatar display" +msgstr "Affichage des avatars" + +#: wp-admin/options-discussion.php:162 +msgid "Don’t show Avatars" +msgstr "Ne pas afficher les avatars" + +#: wp-admin/options-discussion.php:162 +msgid "Show Avatars" +msgstr "Afficher les avatars" + +#: wp-admin/options-discussion.php:171 +#: wp-admin/options-discussion.php:172 +msgid "Maximum Rating" +msgstr "Classement maximal" + +#: wp-admin/options-discussion.php:175 +msgid "G — Suitable for all audiences" +msgstr "G — Visibles par tous" + +#: wp-admin/options-discussion.php:175 +msgid "PG — Possibly offensive, usually for audiences 13 and above" +msgstr "PG — Possiblement offensants, réservés normalement aux personnes de 13 ans et plus" + +#: wp-admin/options-discussion.php:175 +msgid "R — Intended for adult audiences above 17" +msgstr "R — Réservés aux personnes de plus de 17 ans" + +#: wp-admin/options-discussion.php:175 +msgid "X — Even more mature than above" +msgstr "X — Réservés aux adultes" + +#: wp-admin/options-discussion.php:185 +#: wp-admin/options-discussion.php:186 +msgid "Default Avatar" +msgstr "Avatar par défaut" + +#: wp-admin/options-discussion.php:188 +msgid "For users without a custom avatar of their own, you can either display a generic logo or a generated one based on their e-mail address." +msgstr "Les utilisateurs n’ayant pas d’avatar peuvent se voir attribuer un logo générique, ou un avatar généré à partir de leur adresse e-mail." + +#: wp-admin/options-discussion.php:192 +msgid "Mystery Man" +msgstr "Homme mystère" + +#: wp-admin/options-discussion.php:193 +msgid "Blank" +msgstr "Vide" + +#: wp-admin/options-discussion.php:194 +msgid "Gravatar Logo" +msgstr "Logo Gravatar" + +#: wp-admin/options-discussion.php:195 +msgid "Identicon (Generated)" +msgstr "Identicon (Généré)" + +#: wp-admin/options-discussion.php:196 +msgid "Wavatar (Generated)" +msgstr "Wavatar (Généré)" + +#: wp-admin/options-discussion.php:197 +msgid "MonsterID (Generated)" +msgstr "MonsterID (Généré)" + +#: wp-admin/options-general.php:15 +msgid "General Settings" +msgstr "Options générales" + +#. translators: date and time format for exact current time, mainly about timezones, see http://php.net/date +#: wp-admin/options-general.php:18 +msgctxt "timezone date format" +msgid "Y-m-d G:i:s" +msgstr "Y-m-d G:i:s" + +#: wp-admin/options-general.php:69 +msgid "Tagline" +msgstr "Slogan" + +#: wp-admin/options-general.php:71 +msgid "In a few words, explain what this blog is about." +msgstr "En quelques mots, décrivez la raison d’être de ce blog" + +#: wp-admin/options-general.php:74 +msgid "WordPress address (URL)" +msgstr "Adresse web de WordPress" + +#: wp-admin/options-general.php:78 +msgid "Blog address (URL)" +msgstr "Adresse web du blog" + +#: wp-admin/options-general.php:80 +msgid "Enter the address here if you want your blog homepage to be different from the directory you installed WordPress." +msgstr "Si vous souhaitez que l’adresse de la page d’accueil de votre blog soit différente du répertoire où vous avez installé WordPress, saisissez cette adresse ici." + +#: wp-admin/options-general.php:83 +msgid "E-mail address" +msgstr "Adresse e-mail" + +#: wp-admin/options-general.php:85 +msgid "This address is used for admin purposes, like new user notification." +msgstr "Cette adresse n’est utilisée que pour l’administration du blog ; par exemple, la notification de l’inscription d’un nouvel utilisateur." + +#: wp-admin/options-general.php:88 +#: wp-admin/options-general.php:89 +msgid "Membership" +msgstr "Inscription" + +#: wp-admin/options-general.php:91 +msgid "Anyone can register" +msgstr "Tout le monde peut s’enregistrer" + +#: wp-admin/options-general.php:95 +msgid "New User Default Role" +msgstr "Rôle par défaut de tout nouvel utilisateur" + +#: wp-admin/options-general.php:104 +#: wp-admin/options-general.php:148 +msgid "Timezone" +msgstr "Fuseau horaire" + +#: wp-admin/options-general.php:126 +#: wp-includes/functions.php:3303 +#, php-format +msgid "UTC %s" +msgstr "UTC %s" + +#: wp-admin/options-general.php:130 +msgid "hours" +msgstr "heures" + +#: wp-admin/options-general.php:131 +#: wp-admin/options-general.php:155 +#, php-format +msgid "UTC time is %s" +msgstr " L’heure UTC actuelle est %s" + +#: wp-admin/options-general.php:133 +#, php-format +msgid "UTC %1$s is %2$s" +msgstr "L’heure UTC %1$s actuelle est %2$s" + +#: wp-admin/options-general.php:136 +msgid "Unfortunately, you have to manually update this for Daylight Savings Time. Lame, we know, but will be fixed in the future." +msgstr "Malheureusement, vous devez faire ce réglage à la main pour le passage à l’heure d’été/d’hiver. Oui, c’est bancal, nous comptons améliorer cela pour une prochaine version." + +#: wp-admin/options-general.php:157 +#, php-format +msgid "Local time is %1$s" +msgstr "L’heure locale actuelle est %1$s" + +#: wp-admin/options-general.php:160 +msgid "Choose a city in the same timezone as you." +msgstr "Choisissez une ville dans le même fuseau horaire que le vôtre." + +#: wp-admin/options-general.php:166 +msgid "This timezone is currently in daylight savings time." +msgstr "Ce fuseau horaire est actuellement à l’heure d’été." + +#: wp-admin/options-general.php:167 +msgid "This timezone is currently in standard time." +msgstr "Ce fuseau horaire est actuellement à l’heure d’hiver." + +#: wp-admin/options-general.php:183 +#, php-format +msgid "Daylight savings time begins on: %s." +msgstr "Le passage à l’heure d’été se fait le %s." + +#: wp-admin/options-general.php:184 +#, php-format +msgid "Standard time begins on: %s." +msgstr "Le passage à l’heure d’hiver se fait le %s." + +#: wp-admin/options-general.php:187 +msgid "This timezone does not observe daylight savings time." +msgstr "Ce fuseau horaire n’a pas d’heure d’té" + +#: wp-admin/options-general.php:198 +#: wp-admin/options-general.php:200 +#: xmlrpc.php:414 +msgid "Date Format" +msgstr "Format de date" + +#: wp-admin/options-general.php:223 +#: wp-admin/options-general.php:255 +msgid "Custom:" +msgstr "Personnalisé :" + +#: wp-admin/options-general.php:225 +msgid "Documentation on date formatting. Click “Save Changes” to update sample output." +msgstr "Documentation sur le format des dates (en anglais). Cliquez sur « Enregistrez les modifications » pour mettre à jour l’exemple affiché." + +#: wp-admin/options-general.php:231 +#: wp-admin/options-general.php:233 +#: xmlrpc.php:419 +msgid "Time Format" +msgstr "Format d’heure" + +#: wp-admin/options-general.php:261 +msgid "Week Starts On" +msgstr "La semaine débute le" + +#: wp-admin/options-head.php:16 +msgid "Settings saved." +msgstr "Options enregistrées." + +#: wp-admin/options-media.php:15 +msgid "Media Settings" +msgstr "Réglages des médias" + +#: wp-admin/options-media.php:29 +msgid "Image sizes" +msgstr "Taille des images" + +#: wp-admin/options-media.php:30 +msgid "The sizes listed below determine the maximum dimensions in pixels to use when inserting an image into the body of a post." +msgstr "Les tailles précisées ci-dessous déterminent les dimensions maximales (en pixels) à utiliser lors de l’insertion d’une image dans le corps d’un article." + +#: wp-admin/options-media.php:34 +msgid "Thumbnail size" +msgstr "Taille des miniatures" + +#: wp-admin/options-media.php:38 +#: wp-includes/js/tinymce/langs/wp-langs.php:435 +#: wp-includes/js/tinymce/langs/wp-langs.php:440 +msgid "Height" +msgstr "Hauteur" + +#: wp-admin/options-media.php:41 +msgid "Crop thumbnail to exact dimensions (normally thumbnails are proportional)" +msgstr "Rogner les images pour parvenir aux dimensions exactes (normalement, les miniatures sont proportionnées)" + +#: wp-admin/options-media.php:46 +#: wp-admin/options-media.php:47 +msgid "Medium size" +msgstr "Taille moyenne" + +#: wp-admin/options-media.php:48 +#: wp-admin/options-media.php:58 +msgid "Max Width" +msgstr "Largeur maximale" + +#: wp-admin/options-media.php:50 +#: wp-admin/options-media.php:60 +msgid "Max Height" +msgstr "Hauteur maximale" + +#: wp-admin/options-media.php:56 +#: wp-admin/options-media.php:57 +msgid "Large size" +msgstr "Grande taille" + +#: wp-admin/options-misc.php:15 +msgid "Miscellaneous Settings" +msgstr "Options diverses" + +#: wp-admin/options-misc.php:29 +msgid "Uploading Files" +msgstr "Envoi de fichiers" + +#: wp-admin/options-misc.php:32 +msgid "Store uploads in this folder" +msgstr "Stocker les fichiers envoyés dans ce dossier" + +#: wp-admin/options-misc.php:34 +msgid "Default is wp-content/uploads" +msgstr "Par défaut, wp-content/uploads" + +#: wp-admin/options-misc.php:39 +msgid "Full URL path to files" +msgstr "Adresse web complète pour les fichiers" + +#: wp-admin/options-misc.php:41 +msgid "Configuring this is optional. By default, it should be blank." +msgstr "Ce réglage est facultatif. Par défaut, ce champ devrait être vide." + +#: wp-admin/options-misc.php:49 +msgid "Organize my uploads into month- and year-based folders" +msgstr "Organiser mes fichiers envoyés dans des dossiers mensuels et annuels" + +#: wp-admin/options-misc.php:62 +msgid "Track Links’ Update Times" +msgstr "Repérer les mises-à-jour des liens amis" + +#: wp-admin/options-permalink.php:15 +msgid "Permalink Settings" +msgstr "Options des permaliens" + +#: wp-admin/options-permalink.php:131 +msgid "You should update your web.config now" +msgstr "Vous devriez mettre à jour votre fichier web.config maintenant." + +#: wp-admin/options-permalink.php:133 +msgid "Permalink structure updated. Remove write access on web.config file now!" +msgstr "La structure des permaliens a été mise à jour. Pensez à retirer les droits d’accès au fichier web.config dès maintenant !" + +#: wp-admin/options-permalink.php:135 +msgid "Permalink structure updated" +msgstr "La structure des permaliens a été mise à jour." + +#: wp-admin/options-permalink.php:138 +msgid "You should update your .htaccess now." +msgstr "Vous devriez mettre à jour votre fichier .htaccess maintenant." + +#: wp-admin/options-permalink.php:140 +msgid "Permalink structure updated." +msgstr "Structure des permaliens enregistrée." + +#: wp-admin/options-permalink.php:153 +msgid "By default WordPress uses web 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." +msgstr "Par défaut, WordPress utilise des adresses web ayant un point d’interrogation et une suite de chiffres. Cependant, WordPress vous offre la possibilité de créer une structure d’adresses personnalisée pour vos permaliens et archives. Ceci peut améliorer l’esthétique, l’utilisation et la pérennité de vos liens. De nombreux marqueurs sont disponibles, et voici quelques exemples pour commencer." + +#: wp-admin/options-permalink.php:168 +msgid "Common settings" +msgstr "Options les plus courantes" + +#: wp-admin/options-permalink.php:171 +msgid "Default" +msgstr "Valeur par défaut" + +#: wp-admin/options-permalink.php:175 +msgid "Day and name" +msgstr "Date et titre" + +#: wp-admin/options-permalink.php:179 +msgid "Month and name" +msgstr "Mois et titre" + +#: wp-admin/options-permalink.php:183 +msgid "Numeric" +msgstr "Numérique" + +#: wp-admin/options-permalink.php:193 +msgid "Custom Structure" +msgstr "Structure personnalisée" + +#: wp-admin/options-permalink.php:202 +msgid "Optional" +msgstr "Facultatif" + +#: wp-admin/options-permalink.php:204 +msgid "If you like, you may enter custom structures for your category and tag 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." +msgstr "Si vous le souhaitez, vous pouvez spécifier une structure personnalisée pour vos mots-clefs et de vos catégories. Par exemple, en utilisant sujet comme préfixe pour vos catégories, vous obtiendrez des adresse web comme : http://exemple.fr/sujet/non-classe/. Si vous laissez ce champ vide, la valeur par défaut (category) sera appliquée." + +#: wp-admin/options-permalink.php:206 +msgid "If you like, you may enter custom structures for your category and tag 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." +msgstr "Si vous le souhaitez, vous pouvez spécifier une structure personnalisée pour les adresse web de mots-clefs et de vos catégories. Par exemple, sujet comme préfixe pour vos catégories, vous obtiendrez des adresse web comme : http://exemple.fr/index.php/sujet/non-classe/. Si vous laissez ce champ vide, la valeur par défaut (category) sera appliquée." + +#: wp-admin/options-permalink.php:211 +msgid "Category base" +msgstr "Préfixe des catégories" + +#: wp-admin/options-permalink.php:215 +msgid "Tag base" +msgstr "Préfixe des mots-clefs" + +#: wp-admin/options-permalink.php:229 +msgid "If your 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." +msgstr "Si vous aviez les droits en écriture sur le fichier web.config, nous pourrions faire cela automatiquement. Ce n’est pas le cas, donc voici les règles de ré-écriture que vous devrez mettre dans votre fichier web.config. Cliquez sur le champ et appuyez sur Ctrl-a pour tout sélectionner. Insérez ensuite cette règle dans l’élément /<configuration>/<system.webServer>/<rewrite>/<rules> du fichier web.config." + +#: wp-admin/options-permalink.php:234 +msgid "If you temporarily make your web.config file writable for us to generate rewrite rules automatically, do not forget to revert the permissions after rule has been saved." +msgstr "Si vous rendez le fichier web.config accessible en écriture afin de générez automatique les règles de réécriture, n’oubliez surtout pas de remettre les droits originaux en place une fois que les règles ont été enregistrées." + +#: wp-admin/options-permalink.php:238 +msgid "If your .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." +msgstr "Si vous aviez les droits en écriture sur le fichier .htaccess, nous pourrions faire cela automatiquement. Ce n’est pas le cas, donc voici les règles de ré-écriture que vous devrez mettre dans votre fichier .htaccess. Cliquez sur le champ et appuyez sur Ctrl-a pour tout sélectionner." + +#: wp-admin/options-privacy.php:15 +msgid "Privacy Settings" +msgstr "Options de vie privée" + +#: wp-admin/options-privacy.php:30 +#: wp-admin/options-privacy.php:31 +msgid "Blog Visibility" +msgstr "Visibilité du blog" + +#: wp-admin/options-privacy.php:33 +msgid "I would like my blog to be visible to everyone, including search engines (like Google, Sphere, Technorati) and archivers" +msgstr "Je souhaite que mon blog soit visible pour tous, y compris les moteurs de recherche (Google, Sphere, Technorati) et les archiveurs" + +#: wp-admin/options-privacy.php:35 +msgid "I would like to block search engines, but allow normal visitors" +msgstr "Je souhaite bloquer les moteurs de recherche, mais autoriser les visiteurs normaux" + +#: wp-admin/options-reading.php:15 +msgid "Reading Settings" +msgstr "Options de lecture" + +#: wp-admin/options-reading.php:31 +#: wp-admin/options-reading.php:32 +msgid "Front page displays" +msgstr "La page d’accueil affiche" + +#: wp-admin/options-reading.php:35 +msgid "Your latest posts" +msgstr "Les derniers articles" + +#: wp-admin/options-reading.php:40 +#, php-format +msgid "A static page (select below)" +msgstr "Une page statique (choisir ci-dessous)" + +#: wp-admin/options-reading.php:44 +#, php-format +msgid "Front page: %s" +msgstr "Page d’accueil : %s" + +#: wp-admin/options-reading.php:45 +#, php-format +msgid "Posts page: %s" +msgstr "Page des articles : %s" + +#: wp-admin/options-reading.php:50 +msgid "Warning: these pages should not be the same!" +msgstr "Attention : ces pages ne devraient pas être les mêmes !" + +#: wp-admin/options-reading.php:58 +msgid "Blog pages show at most" +msgstr "Les pages du blog doivent afficher au plus" + +#: wp-admin/options-reading.php:60 +#: wp-admin/options-reading.php:65 +msgid "posts" +msgstr "articles" + +#: wp-admin/options-reading.php:64 +msgid "Syndication feeds show the most recent" +msgstr "Les flux de syndication affichent les derniers" + +#: wp-admin/options-reading.php:68 +#: wp-admin/options-reading.php:69 +msgid "For each article in a feed, show" +msgstr "Pour chaque article, fournir" + +#: wp-admin/options-reading.php:70 +msgid "Full text" +msgstr "Le texte complet" + +#: wp-admin/options-reading.php:71 +msgid "Summary" +msgstr "L’extrait" + +#: wp-admin/options-reading.php:76 +msgid "Encoding for pages and feeds" +msgstr "Encodage pour les pages et les flux RSS" + +#: wp-admin/options-reading.php:78 +msgid "The character encoding you write your blog in (UTF-8 is recommended)" +msgstr "L’encodage des caractères dans lequel vous vos articles sont écrits (UTF-8 est recommandé)" + +#: wp-admin/options-writing.php:15 +msgid "Writing Settings" +msgstr "Options d’écriture" + +#: wp-admin/options-writing.php:30 +msgid "Size of the post box" +msgstr "Taille du champ de saisie" + +#: wp-admin/options-writing.php:32 +msgid "lines" +msgstr "lignes" + +#: wp-admin/options-writing.php:35 +#: wp-admin/options-writing.php:36 +msgid "Formatting" +msgstr "Mise en forme" + +#: wp-admin/options-writing.php:39 +msgid "Convert emoticons like :-) and :-P to graphics on display" +msgstr "Convertir les émoticônes, comme :-) et :-P, en images lors de l’affichage" + +#: wp-admin/options-writing.php:40 +msgid "WordPress should correct invalidly nested XHTML automatically" +msgstr "WordPress doit automatiquement corriger les balises XHTML non valides" + +#: wp-admin/options-writing.php:44 +msgid "Default Post Category" +msgstr "Catégorie par défaut des articles" + +#: wp-admin/options-writing.php:52 +msgid "Default Link Category" +msgstr "Catégorie par défaut des liens" + +#: wp-admin/options-writing.php:62 +msgid "Remote Publishing" +msgstr "Publication à distance" + +#: wp-admin/options-writing.php:63 +msgid "To post to WordPress from a desktop blogging client or remote website that uses the Atom Publishing Protocol or one of the XML-RPC publishing interfaces you must enable them below." +msgstr "Pour publier avec WordPress depuis un client de bureau ou un site distant, vous devez activer la méthode ci-dessous, que ce soit le protocole de publication Atom ou l’une des interfaces de publication XML-RPC." + +#: wp-admin/options-writing.php:66 +#: wp-admin/options-writing.php:67 +msgid "Atom Publishing Protocol" +msgstr "Protocole de publication Atom" + +#: wp-admin/options-writing.php:70 +msgid "Enable the Atom Publishing Protocol." +msgstr "Activer le protocole de publication Atom." + +#: wp-admin/options-writing.php:74 +#: wp-admin/options-writing.php:75 +msgid "XML-RPC" +msgstr "XML-RPC" + +#: wp-admin/options-writing.php:78 +msgid "Enable the WordPress, Movable Type, MetaWeblog and Blogger XML-RPC publishing protocols." +msgstr "Activer les protocoles XML-RPC (WordPress, Movable Type, MetaWeblog, Blogger XML-RPC)." + +#: wp-admin/options-writing.php:84 +msgid "Post via e-mail" +msgstr "Envoi d’article par e-mail" + +#: wp-admin/options-writing.php:85 +#, php-format +msgid "To post to WordPress by e-mail you must set up a secret e-mail account with POP3 access. Any mail received at this address will be posted, so it’s a good idea to keep this address very secret. Here are three random strings you could use: %s, %s, %s." +msgstr "Pour publier dans WordPress par e-mail, vous devez définir un compte e-mail secret avec une adresse POP3. Tout e-mail reçu à cette adresse sera publié. Il vaut donc mieux garder cette adresse à l’abri des regards. Voici trois chaînes aléatoires que vous pourriez utiliser : %s, %s, %s." + +#: wp-admin/options-writing.php:89 +msgid "Mail Server" +msgstr "Serveur e-mail" + +#: wp-admin/options-writing.php:91 +msgid "Port" +msgstr "Port" + +#: wp-admin/options-writing.php:96 +msgid "Login Name" +msgstr "Identifiant" + +#: wp-admin/options-writing.php:106 +msgid "Default Mail Category" +msgstr "Catégorie par défaut des articles envoyés par e-mail" + +#: wp-admin/options-writing.php:116 +msgid "Update Services" +msgstr "Services de mise à jour" + +#: wp-admin/options-writing.php:120 +msgid "When you publish a new post, WordPress automatically notifies the following site update services. For more about this, see Update Services on the Codex. Separate multiple service URLs with line breaks." +msgstr "Quand vous publiez un nouvel article, WordPress peut notifier un service de mise à jour. Une explication se trouve sur la page Update Services du Codex. Séparez les adresses web par des retours à la ligne." + +#: wp-admin/options-writing.php:126 +#, php-format +msgid "WordPress is not notifying any Update Services because of your blog’s privacy settings." +msgstr "WordPress ne notifie aucun des services de notification, du fait des réglages de vie privée de votre blog." + +#: wp-admin/options.php:54 +msgid "Error! Options page not found." +msgstr "Erreur ! La page d’options n’a pas été trouvée." + +#: wp-admin/options.php:91 +msgid "All Settings" +msgstr "Tous les options" + +#: wp-admin/page-new.php:11 +msgid "Add New Page" +msgstr "Ajouter une nouvelle page" + +#: wp-admin/page.php:80 +msgid "Edit Page" +msgstr "Modifier la page" + +#: wp-admin/page.php:85 +msgid "You attempted to edit a page that doesn’t exist. Perhaps it was deleted?" +msgstr "Vous tentez de modifier une page qui n’existe pas. Peut-être a-t-elle été supprimée ?" + +#: wp-admin/plugin-editor.php:12 +msgid "Edit Plugins" +msgstr "Modifier les extensions" + +#: wp-admin/plugin-editor.php:44 +#: wp-admin/theme-editor.php:48 +msgid "You do not have sufficient permissions to edit templates for this blog." +msgstr "Vous n’avez pas les droits suffisants pour modifier les modèles de ce blog." + +#: wp-admin/plugin-editor.php:70 +msgid "You do not have sufficient permissions to edit plugins for this blog." +msgstr "Vous n’avez pas les droits suffisants pour modifier les extensions de ce blog." + +#: wp-admin/plugin-editor.php:91 +msgid "No such file exists! Double check the name and try again." +msgstr "Ce fichier n’existe pas ! Veuillez vérifier son nom et réessayer." + +#: wp-admin/plugin-editor.php:98 +msgid "Files of this type are not editable." +msgstr "Les fichiers de ce type ne sont pas éditables." + +#: wp-admin/plugin-editor.php:113 +#: wp-admin/theme-editor.php:94 +msgid "Function Name..." +msgstr "Nom de fonction..." + +#: wp-admin/plugin-editor.php:126 +#: wp-admin/theme-editor.php:107 +msgid "File edited successfully." +msgstr "Modification du fichier réussie." + +#: wp-admin/plugin-editor.php:128 +msgid "This plugin has been deactivated because your changes resulted in a fatal error." +msgstr "Cette extension a été désactivée car vos modifications ont abouti à une erreur fatale" + +#: wp-admin/plugin-editor.php:144 +#, php-format +msgid "Editing %s (active)" +msgstr "Modification de %s (activé)" + +#: wp-admin/plugin-editor.php:146 +#, php-format +msgid "Browsing %s (active)" +msgstr "Contenu de %s (activé)" + +#: wp-admin/plugin-editor.php:149 +#, php-format +msgid "Editing %s (inactive)" +msgstr "Modification de %s (désactivé)" + +#: wp-admin/plugin-editor.php:151 +#, php-format +msgid "Browsing %s (inactive)" +msgstr "Contenu de %s (désactivé)" + +#: wp-admin/plugin-editor.php:157 +msgid "Select plugin to edit:" +msgstr "Sélectionnez l’extension à modifier :" + +#: wp-admin/plugin-editor.php:179 +msgid "Plugin Files" +msgstr "Fichiers des extensions" + +#: wp-admin/plugin-editor.php:207 +#: wp-admin/theme-editor.php:204 +msgid "Documentation:" +msgstr "Documentation :" + +#: wp-admin/plugin-editor.php:207 +#: wp-admin/theme-editor.php:206 +msgid "Lookup" +msgstr "Vérifier" + +#: wp-admin/plugin-editor.php:211 +msgid "Warning: Making changes to active plugins is not recommended. If your changes cause a fatal error, the plugin will be automatically deactivated." +msgstr "Attention : modifier des extensions activées n’est pas recommandé. Si vos modifications amènent une erreur fatale, l’extension sera automatiquement désactivée." + +#: wp-admin/plugin-editor.php:216 +msgid "Update File and Attempt to Reactivate" +msgstr "Mettre à jour le fichier et tenter de réactiver l’extension" + +#: wp-admin/plugin-editor.php:218 +#: wp-admin/theme-editor.php:214 +msgid "Update File" +msgstr "Mettre à jour le fichier" + +#: wp-admin/plugin-editor.php:222 +#: wp-admin/theme-editor.php:218 +msgid "You need to make this file writable before you can save your changes. See the Codex for more information." +msgstr "Vous devez rendre ce fichier accessible en écriture avant de pouvoir enregistrer vos modifications. Lire la documentation CHMOD [en] pour plus d’informations." + +#: wp-admin/plugin-install.php:13 +msgid "You do not have sufficient permissions to install plugins on this blog." +msgstr "Vous n’avez pas les droits suffisants pour installer des extensions sur ce blog." + +#: wp-admin/plugin-install.php:28 +#: wp-admin/theme-install.php:33 +msgid "Featured" +msgstr "En vedette" + +#: wp-admin/plugin-install.php:29 +msgid "Popular" +msgstr "Populaires" + +#: wp-admin/plugin-install.php:30 +#: wp-admin/theme-install.php:35 +msgid "Newest" +msgstr "Nouveautés" + +#: wp-admin/plugins.php:13 +msgid "You do not have sufficient permissions to manage plugins for this blog." +msgstr "Vous n’avez pas les droits suffisants pour gérer les extensions de ce blog." + +#: wp-admin/plugins.php:44 +#: wp-admin/plugins.php:63 +#: wp-admin/plugins.php:88 +msgid "You do not have sufficient permissions to activate plugins for this blog." +msgstr "Vous n’avez pas les droits suffisants pour activer les extensions de ce blog." + +#: wp-admin/plugins.php:104 +#: wp-admin/plugins.php:114 +msgid "You do not have sufficient permissions to deactivate plugins for this blog." +msgstr "Vous n’avez pas les droits suffisants pour désactiver les extensions de ce blog." + +#: wp-admin/plugins.php:137 +msgid "You do not have sufficient permissions to delete plugins for this blog." +msgstr "Vous n’avez pas les droits suffisants pour supprimer les extensions de ce blog." + +#: wp-admin/plugins.php:157 +msgid "Delete Plugin(s)" +msgstr "Suppression d’extension(s)" + +#: wp-admin/plugins.php:177 +msgid "Deleting the selected plugins will remove the following plugin(s) and their files:" +msgstr "Ci-dessous, la liste des extensions à supprimer ainsi que leurs fichiers :" + +#: wp-admin/plugins.php:181 +#, php-format +msgid "%s by %s" +msgstr "%s par %s" + +#: wp-admin/plugins.php:184 +msgid "Are you sure you wish to delete these files?" +msgstr "Êtes-vous certain(e) de vouloir supprimer ces fichiers ?" + +#: wp-admin/plugins.php:193 +msgid "Yes, Delete these files" +msgstr "Oui, supprimer ces fichiers" + +#: wp-admin/plugins.php:196 +msgid "No, Return me to the plugin list" +msgstr "Non, retourner à la liste des extensions." + +#: wp-admin/plugins.php:199 +msgid "Click to view entire list of files which will be deleted" +msgstr "Cliquer pour voir la liste des fichiers qui seront supprimés" + +#: wp-admin/plugins.php:228 +msgid "Plugins extend and expand the functionality of WordPress. Once a plugin is installed, you may activate it or deactivate it here." +msgstr "Les extensions étendent les fonctionnalités de WordPress. Une fois une extension installée, vous pouvez l’activer ou la désactiver ici." + +#: wp-admin/plugins.php:229 +#, php-format +msgid "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." +msgstr "Si une extension ne fonctionne pas correctement et que vous ne pouvez plus utiliser WordPress, supprimez ou renommez son fichier dans le répertoire %s et elle sera automatiquement désactivée." + +#: wp-admin/plugins.php:230 +#, php-format +msgid "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." +msgstr "Vous pouvez trouver d’autres extensions pour votre site au moyen de la fonctionnalité de découverte/installation d’extensions, ou en vous rendant sur le répertoire des extensions WordPress et en les installant manuellement.
    Pour installer une extension manuellement, il vous suffit généralement de mettre ses fichiers en ligne dans le dossier %2$s. Ceci fait, vous pourrez active cette extension depuis la présente pas." + +#: wp-admin/plugins.php:240 +#, php-format +msgid "The plugin %s has been deactivated due to an error: %s" +msgstr "L’extension %s a été désactivée suit à l’erreur : %s" + +#: wp-admin/plugins.php:244 +msgid "Plugin could not be activated because it triggered a fatal error." +msgstr "L’extension n’a pu être activée car elle a déclenché une erreur fatale." + +#: wp-admin/plugins.php:257 +#, php-format +msgid "Plugin could not be deleted due to an error: %s" +msgstr "L’extension n’a pu être supprimée suite à une erreur fatale : %s" + +#: wp-admin/plugins.php:259 +msgid "The selected plugins have been deleted." +msgstr "Les extensions sélectionnées ont été supprimées." + +#: wp-admin/plugins.php:262 +msgid "Plugin activated." +msgstr "Extension activée" + +#: wp-admin/plugins.php:264 +msgid "Selected plugins activated." +msgstr "Les extensions sélectionnées ont été activées." + +#: wp-admin/plugins.php:266 +msgid "Plugin deactivated." +msgstr "Extension désactivée" + +#: wp-admin/plugins.php:268 +msgid "Selected plugins deactivated." +msgstr "Les extensions sélectionnées ont été désactivées." + +#: wp-admin/plugins.php:387 +#: wp-admin/plugins.php:395 +#: wp-includes/js/tinymce/langs/wp-langs.php:255 +msgid "Plugin" +msgstr "Extension" + +#: wp-admin/plugins.php:405 +msgid "No plugins to show" +msgstr "Aucune extension à afficher" + +#: wp-admin/plugins.php:413 +msgid "Deactivate this plugin" +msgstr "Désactiver cette extension" + +#: wp-admin/plugins.php:413 +#: wp-admin/plugins.php:483 +#: wp-admin/widgets.php:339 +msgid "Deactivate" +msgstr "Désactiver" + +#: wp-admin/plugins.php:418 +msgid "Open this file in the Plugin Editor" +msgstr "Ouvrir ce fichier dans l’éditeur d’extension" + +#: wp-admin/plugins.php:421 +msgid "Delete this plugin" +msgstr "Supprimer cette extension" + +#: wp-admin/plugins.php:453 +msgid "Visit plugin site" +msgstr "Aller sur le site de l’extension" + +#: wp-admin/plugins.php:491 +msgid "Clear List" +msgstr "Vider la liste" + +#: wp-admin/plugins.php:515 +#, php-format +msgctxt "plugins" +msgid "All (%s)" +msgid_plural "All (%s)" +msgstr[0] "Tous (%s)" +msgstr[1] "Tous (%s)" + +#: wp-admin/plugins.php:518 +#, php-format +msgid "Active (%s)" +msgid_plural "Active (%s)" +msgstr[0] "Activé (%s)" +msgstr[1] "Activés (%s)" + +#: wp-admin/plugins.php:522 +#, php-format +msgid "Recently Active (%s)" +msgid_plural "Recently Active (%s)" +msgstr[0] "Récemment désactivé (%s)" +msgstr[1] "Récemment désactivés (%s)" + +#: wp-admin/plugins.php:526 +#, php-format +msgid "Inactive (%s)" +msgid_plural "Inactive (%s)" +msgstr[0] "Désactivé (%s)" +msgstr[1] "Désactivés (%s)" + +#: wp-admin/plugins.php:530 +#, php-format +msgid "Upgrade Available (%s)" +msgid_plural "Upgrade Available (%s)" +msgstr[0] "Prêt à mettre à jour (%s)" +msgstr[1] "Prêts à mettre à jour (%s)" + +#: wp-admin/plugins.php:535 +#, php-format +msgid "Search Results (%s)" +msgid_plural "Search Results (%s)" +msgstr[0] "Résultat de recherche (%s)" +msgstr[1] "Résultats de recherche (%s)" + +#: wp-admin/plugins.php:568 +msgid "You do not appear to have any plugins available at this time." +msgstr "Vous ne semblez pas avoir d’extensions disponibles en ce moment." + +#: wp-admin/post-new.php:11 +msgid "Add New Post" +msgstr "Ajouter un nouvel article" + +#: wp-admin/post-new.php:25 +#, php-format +msgid "" +"Since you’re a newcomer, you’ll have to wait for an admin to add the edit_posts capability to your user, in order to be authorized to post.
    \n" +"You can also e-mail the admin to ask for a promotion.
    \n" +"When you’re promoted, just reload this page and you’ll be able to blog. :)" +msgstr "" +"Comme vous êtes un nouvel inscrit, vous devez attendre qu’un administrateur ajoute la capacité edit_posts à votre compte utilisateur, pour avoir l’autorisation de publier.
    \n" +"Vous pouvez aussi envoyer un e-mail à l’administrateur pour lui demander de le faire.
    \n" +"Lorsque l’autorisation aura été accordée, rechargez cette page et vous pourrez utiliser le blog. :)" + +#: wp-admin/post.php:118 +msgid "You attempted to edit a post that doesn’t exist. Perhaps it was deleted?" +msgstr "Vous tentez de modifier un article qui n’existe pas. Peut-être a-t-il été supprimé ?" + +#: wp-admin/post.php:143 +msgid "Edit Post" +msgstr "Modifier l’article" + +#: wp-admin/press-this.php:118 +msgid "Embed Code" +msgstr "Code embarqué" + +#: wp-admin/press-this.php:121 +msgid "Insert Video" +msgstr "Insérer la vidéo" + +#: wp-admin/press-this.php:143 +msgid "Click to insert." +msgstr "Cliquer pour insérer." + +#: wp-admin/press-this.php:145 +#: wp-admin/press-this.php:175 +#: wp-includes/js/tinymce/wp-mce-help.php:232 +msgid "Insert Image" +msgstr "Insérer une image" + +#: wp-admin/press-this.php:244 +msgid "Unable to retrieve images or no images on page." +msgstr "Impossible de récupérer d’image, ou il n’y a pas d’image dans cette page." + +#: wp-admin/press-this.php:298 +msgid "click images to select" +msgstr "cliquez les images pour les sélectionner" + +#: wp-admin/press-this.php:298 +msgid "Add from URL" +msgstr "Ajouter depuis une adresse web" + +#: wp-admin/press-this.php:298 +msgid "Refresh" +msgstr "Rafraîchir" + +#: wp-admin/press-this.php:405 +msgid "Loading..." +msgstr "Chargement..." + +#: wp-admin/press-this.php:495 +#: wp-admin/press-this.php:499 +#: wp-includes/taxonomy.php:19 +msgid "Post Tags" +msgstr "Mots clefs d’article" + +#: wp-admin/press-this.php:508 +msgid "Choose from the most used tags in Post Tags" +msgstr "Choisir parmi les mots-clefs les plus populaires dans les mots clefs d’article" + +#: wp-admin/press-this.php:516 +msgid "Close Window" +msgstr "Fermer la fenêtre" + +#: wp-admin/press-this.php:531 +#: wp-admin/press-this.php:532 +msgid "Insert an Image" +msgstr "Insérer une image" + +#: wp-admin/press-this.php:536 +msgid "Embed a Video" +msgstr "Ajouter un vidéo" + +#: wp-admin/press-this.php:542 +#: wp-includes/general-template.php:1662 +#: wp-includes/general-template.php:1667 +msgid "HTML" +msgstr "HTML" + +#: wp-admin/press-this.php:543 +#: wp-includes/general-template.php:1663 +#: wp-includes/general-template.php:1668 +msgid "Visual" +msgstr "Visuel" + +#: wp-admin/press-this.php:552 +msgid "via " +msgstr "via" + +#: wp-admin/revision.php:96 +#, php-format +msgid "Compare Revisions of “%1$s”" +msgstr "Comparer les versions de « %1$s »" + +#: wp-admin/revision.php:118 +#, php-format +msgid "Post Revision for “%1$s” created on %2$s" +msgstr "Version de l’article « %1$s » créée le %2$s" + +#: wp-admin/revision.php:158 +#, php-format +msgid "Older: %s" +msgstr "Différence précédente : %s" + +#: wp-admin/revision.php:159 +#, php-format +msgid "Newer: %s" +msgstr "Différence suivante : %s" + +#: wp-admin/revision.php:192 +msgid "These revisions are identical." +msgstr "Ces 2 versions sont identiques." + +#: wp-admin/sidebar.php:98 +msgid "Post published." +msgstr "Article publié." + +#: wp-admin/sidebar.php:103 +#: wp-content/plugins/akismet/akismet.php:1084 +#: wp-includes/default-widgets.php:67 +#: wp-includes/default-widgets.php:197 +#: wp-includes/default-widgets.php:263 +#: wp-includes/default-widgets.php:318 +#: wp-includes/default-widgets.php:358 +#: wp-includes/default-widgets.php:404 +#: wp-includes/default-widgets.php:490 +#: wp-includes/default-widgets.php:586 +#: wp-includes/default-widgets.php:670 +#: wp-includes/default-widgets.php:987 +msgid "Title:" +msgstr "Titre :" + +#: wp-admin/sidebar.php:108 +msgid "Post:" +msgstr "Article :" + +#: wp-admin/sidebar.php:113 +#: wp-admin/themes.php:147 +#: wp-admin/themes.php:241 +msgid "Tags:" +msgstr "Mots-clefs :" + +#: wp-admin/sidebar.php:115 +#: wp-includes/script-loader.php:273 +msgid "Separate tags with commas" +msgstr "Séparez les mots-clefs par des virgules" + +#: wp-admin/sidebar.php:119 +msgid "Save as Draft" +msgstr "Enregistrer comme brouillon" + +#: wp-admin/theme-editor.php:12 +msgid "Edit Themes" +msgstr "Modifier les thèmes" + +#: wp-admin/theme-editor.php:28 +msgid "The requested theme does not exist." +msgstr "Le thème demandé n’existe pas." + +#: wp-admin/theme-editor.php:77 +msgid "You do not have sufficient permissions to edit themes for this blog." +msgstr "Vous n’avez pas les droits suffisants pour modifier les thèmes de ce blog." + +#: wp-admin/theme-editor.php:123 +msgid "Select theme to edit:" +msgstr "Sélectionnez le thème à modifier :" + +#: wp-admin/theme-editor.php:142 +msgid "Theme Files" +msgstr "Fichiers du thème" + +#: wp-admin/theme-editor.php:147 +msgid "Templates" +msgstr "Modèles" + +#. translators: Theme stylesheets in theme editor +#: wp-admin/theme-editor.php:174 +msgctxt "Theme stylesheets in theme editor" +msgid "Styles" +msgstr "Styles" + +#: wp-admin/theme-editor.php:224 +msgid "Oops, no such file exists! Double check the name and try again, merci." +msgstr "Oops, ce fichier n’existe pas ! Vérifiez son nom et réessayez, thank you." + +#: wp-admin/theme-install.php:13 +msgid "You do not have sufficient permissions to install themes on this blog." +msgstr "Vous n’avez pas les droits suffisants pour installer des thèmes sur ce blog." + +#: wp-admin/themes.php:34 +msgid "Themes give your WordPress style. Once a theme is installed, you may preview it, activate it or deactivate it here." +msgstr "Les thèmes forment la partie visible de votre site WordPress. Une fois un thème installé, vous pouvez le prévisualiser, l’activer ou le désactiver ici." + +#: wp-admin/themes.php:36 +#, php-format +msgid "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." +msgstr "Vous pouvez trouver d’autres thèmes pour votre site au moyen de la fonctionnalité de découverte/installation de thèmes, ou en vous rendant sur le répertoire des thèmes WordPress et en les installant manuellement.
    Pour installer un thème manuellement, envoyez son archive ZIP via l’outil de mise en ligne, ou placez son dossier dans le répertoire wp-content/themes à l’aide d’un client FTP." + +#: wp-admin/themes.php:37 +msgid "Once a theme is uploaded, you should see it on this page." +msgstr "Une fois que le thème est en ligne, vous devriez le voir sur cette page." + +#: wp-admin/themes.php:49 +msgid "The active theme is broken. Reverting to the default theme." +msgstr "Le thème courant est endommagé. Retour au thème par défaut." + +#: wp-admin/themes.php:52 +#, php-format +msgid "New theme activated. This theme supports widgets, please visit the widgets settings page to configure them." +msgstr "Le nouveau thème a été activé. Ce thème est compatible avec les widgets ; veuillez vous rendre sur la page des widgets pour les configurer." + +#: wp-admin/themes.php:54 +#, php-format +msgid "New theme activated. Visit site" +msgstr "Nouveau thème activé. Voir le site" + +#: wp-admin/themes.php:57 +msgid "Theme deleted." +msgstr "Thème supprimé." + +#: wp-admin/themes.php:115 +msgid "Upgrading this theme will lose any customizations you have made. 'Cancel' to stop, 'OK' to upgrade." +msgstr "Mettre à jour ce thème vous fera perdre toutes les modifications personnelles que vous y avez apporté. 'Annuler' pour arrêter, 'OK' pour mettre à jour." + +#: wp-admin/themes.php:118 +#, php-format +msgid "There is a new version of %1$s available. View version %3$s Details." +msgstr "Une nouvelle version de %1$s est disponible. Afficher les détails de la version %3$s." + +#: wp-admin/themes.php:120 +#, php-format +msgid "There is a new version of %1$s available. View version %3$s Details automatic upgrade unavailable for this theme." +msgstr "Une nouvelle version de %1$s est disponible. Afficher les détails de la version %3$s pas de possibilité de mise à jour automatique pour ce thème." + +#: wp-admin/themes.php:122 +#, php-format +msgid "There is a new version of %1$s available. View version %3$s Details or upgrade automatically." +msgstr "Une nouvelle version de %1$s est disponible. Afficher les détails de la version %3$s ou mettez à jour automatiquement." + +#: wp-admin/themes.php:132 +msgid "Current Theme" +msgstr "Thème actuel" + +#: wp-admin/themes.php:135 +msgid "Current theme preview" +msgstr "Aperçu du thème actuel" + +#. translators: 1: theme title, 2: theme version, 3: theme author +#: wp-admin/themes.php:139 +#: wp-admin/themes.php:231 +#, php-format +msgid "%1$s %2$s by %3$s" +msgstr "%1$s %2$s par %3$s" + +#. translators: 1: theme title, 2: template dir, 3: stylesheet_dir, 4: theme title, 5: parent_theme +#: wp-admin/themes.php:142 +#: wp-admin/themes.php:236 +#, php-format +msgid "The template files are located in %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." +msgstr "Les fichiers du thème se trouvent dans %2$s. Les feuilles de style sont dans %3$s. %4$s utilise les modèles de %5$s. Tout changement dans les modèles affectera les deux thèmes." + +#: wp-admin/themes.php:144 +#: wp-admin/themes.php:238 +#, php-format +msgid "All of this theme’s files are located in %2$s." +msgstr "Tous les fichiers de ce thème se trouvent dans %2$s." + +#: wp-admin/themes.php:154 +msgid "Available Themes" +msgstr "Thèmes disponibles" + +#: wp-admin/themes.php:210 +#, php-format +msgid "Preview of “%s”" +msgstr "Prévisualisation de « %s »" + +#: wp-admin/themes.php:219 +#, php-format +msgid "" +"You are about to delete this theme '%s'\n" +" 'Cancel' to stop, 'OK' to delete." +msgstr "" +"Vous êtes sur le point de supprimer le thème « %s ».\n" +" « Annuler » pour abandonner, « OK » pour le supprimer." + +#: wp-admin/themes.php:251 +msgid "You only have one theme installed at the moment so there is nothing to show you here. Maybe you should download some more to try out." +msgstr "Vous n’avez qu’un thème d’installé pour le moment. Nous n’avons donc rien à afficher ici. Vous devriez peut-être en télécharger quelques-uns pour faire des essais." + +#: wp-admin/themes.php:270 +msgid "Broken Themes" +msgstr "Thèmes endommagés" + +#: wp-admin/themes.php:271 +msgid "The following themes are installed but incomplete. Themes must have a stylesheet and a template." +msgstr "Les thèmes suivants sont installés mais incomplets. Les thèmes doivent avoir au moins une feuille de style et un modèle." + +#: wp-admin/tools.php:27 +#: wp-admin/tools.php:36 +#: wp-admin/tools.php:44 +#: wp-admin/tools.php:60 +msgid "Turbo:" +msgstr "Turbo :" + +#: wp-admin/tools.php:27 +msgid "Speed up WordPress" +msgstr "Accélerer WordPress" + +#: wp-admin/tools.php:28 +msgid "WordPress now has support for Gears, which adds new features to your web browser." +msgstr "WordPress peut maintenant utiliser Gears, un outil qui ajoute des fonctionnalités à votre navigateur." + +#: wp-admin/tools.php:29 +msgid "More information..." +msgstr "Plus d’informations..." + +#: wp-admin/tools.php:30 +msgid "After you install and enable Gears, most of WordPress’ images, scripts, and CSS files will be stored locally on your computer. This speeds up page load time." +msgstr "Après avoir installé et activé Gears, la plupart des fichiers liés à l’administration de WordPress (images, scripts, CSS) seront stockés localement, sur votre ordinateur. Cela améliorera sensiblement le temps de chargement." + +#: wp-admin/tools.php:31 +msgid "Don’t install on a public or shared computer." +msgstr "Ne pas installer sur un ordinateur public ou partagé." + +#: wp-admin/tools.php:36 +#: wp-admin/tools.php:44 +#: wp-admin/tools.php:60 +msgid "Gears Status" +msgstr "État de Gears" + +#: wp-admin/tools.php:37 +msgid "Gears is installed on this computer, but is not enabled for use with WordPress." +msgstr "Gears est installé sur cet ordinateur, mais n’est pas activé pour WordPress." + +#: wp-admin/tools.php:38 +msgid "To enable it click the button below." +msgstr "Pour l’activer, cliquez sur le bouton ce-dessous." + +#: wp-admin/tools.php:39 +#: wp-admin/tools.php:72 +msgid "Note: Do not enable Gears if this is a public or shared computer!" +msgstr "Note : évitez d’activer Gears si vous êtes sur un ordinateur public ou partagé." + +#: wp-admin/tools.php:40 +msgid "Enable Gears" +msgstr "Activer Gears" + +#: wp-admin/tools.php:48 +msgid "Gears is installed and enabled on this computer. You can disable it from the Under the Hood tab in Chrome’s Options menu." +msgstr "Gears est installé et activé sur cet ordinateur. Vous pouvez le désactiver en passant par l’onglet \"Under the Hood\" du menu Options de Chrome." + +#: wp-admin/tools.php:50 +msgid "Gears is installed and enabled on this computer. You can disable it from the Safari menu." +msgstr "Gears est installé et activé sur cet ordinateur. Vous pouvez le désactiver depuis le menu Safari." + +#: wp-admin/tools.php:52 +msgid "Gears is installed and enabled on this computer. You can disable it from your browser’s Tools menu." +msgstr "Gears est installé et activé sur cet ordinateur. Vous pouvez le désactiver en passant par le menu Outils de votre navigateur." + +#: wp-admin/tools.php:55 +msgid "If there are any errors try disabling Gears, reloading the page, and re-enabling Gears." +msgstr "Si vous rencontrez des erreurs, essayez de désactiver Gears, puis de recharger la page et de ré-activer Gears." + +#: wp-admin/tools.php:56 +msgid "Local storage status:" +msgstr "État de la copie locale : " + +#: wp-admin/tools.php:56 +msgid "Updating files:" +msgstr "Fichiers en cours de mise à jour :" + +#: wp-admin/tools.php:61 +msgid "Your browser’s settings do not permit this website to use Google Gears." +msgstr "Vous pouvez aussi essayer %s, qui simplifie la création d’article depuis n’importe où sur le Web." + +#: wp-admin/tools.php:65 +msgid "To allow it, change the Gears settings in your browser’s Options, Under the Hood menu and reload this page." +msgstr "Pour l’y autoriser, modifiez les réglages de Gears dans les options de votre navigateur, dans le menu Options avancées, et rechargez cette page." + +#: wp-admin/tools.php:67 +msgid "To allow it, change the Gears settings in the Safari menu and reload this page." +msgstr "Pour l’y autoriser, modifiez les réglages de Gears dans le menu de Safari, et rechargez cette page." + +#: wp-admin/tools.php:69 +msgid "To allow it, change the Gears settings in your browser’s Tools menu and reload this page." +msgstr "Pour l’y autoriser, modifiez les réglages de Gears dans le menu Outils de votre navigateur, et rechargez cette page." + +#: wp-admin/tools.php:76 +msgid "Turbo is not available for your browser." +msgstr "Turbo n’est pas disponible pour votre navigateur." + +#: wp-admin/tools.php:83 +msgid "Press This is a bookmarklet: a little app that runs in your browser and lets you grab bits of the web." +msgstr "Ceci est un bookmarklet : une petit application qui se lance dans votre navigateur, et vous permet de récupérer des portions du Web pour les bloguer." + +#: wp-admin/tools.php:85 +msgid "Use Press This to clip text, images and videos from any web page. Then edit and add more straight from Press This before you save or publish it in a post on your blog." +msgstr "Utilisez-le pour récupérer du texte, des images et des vidéos depuis n’importe quelle page Web. Puis modifiez l’article et ajoutez vos propres texte directement dans le bookmarklet, avant d’enregistrer le tout ou de le publier dans un article sur votre blog." + +#: wp-admin/tools.php:86 +msgid "Drag-and-drop the following link to your bookmarks bar or right click it and add it to your favorites for a posting shortcut." +msgstr "Glissez le lien suivant dans votre barre de favoris, ou faites un clic-droit et ajoutez-le à vos favoris pour obtenir un raccourci de publication.
    " + +#: wp-admin/update-core.php:13 +#: wp-admin/update.php:21 +#: wp-admin/update.php:40 +msgid "You do not have sufficient permissions to update plugins for this blog." +msgstr "Vous n’avez pas les droits suffisants pour modifier les extensions de ce blog." + +#: wp-admin/update-core.php:22 +msgid "Upgrade Automatically" +msgstr "Mettre à jour automatiquement" + +#: wp-admin/update-core.php:25 +msgid "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:" +msgstr "Vous utilisez une version de développement de WordPress. Vous pouvez faire une mise à jour automatique vers la toute dernière version quotidienne, ou télécharger cette version et l’installer vous-même :" + +#: wp-admin/update-core.php:26 +msgid "Download nightly build" +msgstr "Télécharger la dernière version de développement" + +#: wp-admin/update-core.php:29 +#, php-format +msgid "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:" +msgstr "Vous utilisez la dernière version de WordPress. Vous n’avez pas besoin de faire de mise à jour. Cependant, si vous souhaitez réinstaller la version %s, vous pouvez le faire automatiquement, ou télécharger l’archive pour l’installer vous-même :" + +#: wp-admin/update-core.php:30 +msgid "Re-install Automatically" +msgstr "Réinstaller automatiquement" + +#: wp-admin/update-core.php:33 +#, php-format +msgid "You can upgrade to version %s automatically or download the package and install it manually:" +msgstr "Vous pouvez faire une mise à jour vers la version %s automatiquement, ou télécharger l’archive complète et l’installer vous-même :" + +#: wp-admin/update-core.php:35 +#, php-format +msgid "Download %s" +msgstr "Télécharger la version %s" + +#: wp-admin/update-core.php:50 +msgid "Hide this update" +msgstr "Masquer cette mise à jour" + +#: wp-admin/update-core.php:52 +msgid "Bring back this update" +msgstr "Ré-afficher cette mise-à-jour" + +#: wp-admin/update-core.php:55 +msgid "This localized version contains both the translation and various other localization fixes. You can skip upgrading if you want to keep your current translation." +msgstr "Cette version localisée contient à la fois la traduction et divers correctifs liés à la localisation. Si vous souhaitez conserver votre traduction actuelle, vous pouvez ne pas utiliser cette version." + +#: wp-admin/update-core.php:57 +#, php-format +msgid "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." +msgstr "Vous êtes sur le point d'installer WordPress %s en anglais. Il se peut que cette mise à jour ne fonctionne pas avec la traduction de WordPress dont vous disposez. Vous devriez sans doute patienter, le temps que la mise à jour soit officiellement traduite en français." + +#: wp-admin/update-core.php:67 +#: wp-admin/update-core.php:79 +msgid "Show hidden updates" +msgstr "Afficher les mises-à-jour cachées" + +#: wp-admin/update-core.php:68 +msgid "Hide hidden updates" +msgstr "Masquer les mises-à-jour cachées" + +#: wp-admin/update-core.php:102 +#: wp-admin/update-core.php:165 +#: wp-admin/update-core.php:213 +#: wp-admin/update-core.php:220 +msgid "Upgrade WordPress" +msgstr "Mettre à jour WordPress" + +#: wp-admin/update-core.php:106 +msgid "You have the latest version of WordPress. You do not need to upgrade" +msgstr "Vous avez la dernière version de WordPress. Il n’est pas nécessaire de faire une mise à jour." + +#: wp-admin/update-core.php:110 +msgid "Important: before upgrading, please backup your database and files." +msgstr "Important : avant de faire une mise à jour, veillez à faire une sauvegarde de votre base de données et de vos fichiers." + +#: wp-admin/update-core.php:114 +msgid "There is a new version of WordPress available for upgrade" +msgstr "Une nouvelle version de WordPress est disponible pour la mise à jour" + +#: wp-admin/update-core.php:182 +msgid "Installation Failed" +msgstr "Échec de l’installation" + +#: wp-admin/update-core.php:184 +msgid "WordPress upgraded successfully" +msgstr "WordPress a été mis à jour avec succès" + +#: wp-admin/update-links.php:19 +msgid "Feature disabled." +msgstr "Fonctionnalité désactivée." + +#: wp-admin/update-links.php:24 +msgid "No links" +msgstr "Aucun lien" + +#: wp-admin/update-links.php:42 +#: wp-admin/update-links.php:45 +msgid "Request Failed." +msgstr "La requête a échoué." + +#: wp-admin/update.php:49 +msgid "Plugin Reactivation" +msgstr "Réactivation d’extension" + +#: wp-admin/update.php:51 +msgid "Plugin reactivated successfully." +msgstr "Extension réactivée avec succès." + +#: wp-admin/update.php:54 +msgid "Plugin failed to reactivate due to a fatal error." +msgstr "L’extension n’a pu être réactivée suite à une erreur fatale." + +#: wp-admin/update.php:63 +#: wp-admin/update.php:91 +msgid "You do not have sufficient permissions to install plugins for this blog." +msgstr "Vous n’avez pas les droits suffisants pour installer des extensions sur ce blog." + +#: wp-admin/update.php:78 +#, php-format +msgid "Installing Plugin: %s" +msgstr "Extension en cours d’installation : %s" + +# contexte? +#: wp-admin/update.php:97 +msgid "Upload Plugin" +msgstr "Mettre une extension en ligne" + +#: wp-admin/update.php:102 +#, php-format +msgid "Installing Plugin from uploaded file: %s" +msgstr "Installation de l’extension à partir du fichier : %s" + +#: wp-admin/update.php:115 +msgid "You do not have sufficient permissions to update themes for this blog." +msgstr "Vous n’avez pas les droits suffisants pour mettre à jour les thèmes de ce blog." + +#: wp-admin/update.php:137 +#: wp-admin/update.php:167 +msgid "You do not have sufficient permissions to install themes for this blog." +msgstr "Vous n’avez pas les droits suffisants pour installer des thèmes sur ce blog." + +#: wp-admin/update.php:154 +#, php-format +msgid "Installing theme: %s" +msgstr "Thème en cours d’installation : %s" + +#: wp-admin/update.php:173 +msgid "Upload Theme" +msgstr "Mettre un thème en ligne" + +#: wp-admin/update.php:180 +#, php-format +msgid "Installing Theme from uploaded file: %s" +msgstr "Installation du thème à partir du fichier : %s" + +#: wp-admin/upgrade.php:44 +msgid "WordPress › Upgrade" +msgstr "WordPress › Mise à jour" + +#: wp-admin/upgrade.php:52 +msgid "No Upgrade Required" +msgstr "Pas de mise à jour requise" + +#: wp-admin/upgrade.php:53 +msgid "Your WordPress database is already up-to-date!" +msgstr "Votre base de données WordPress est déjà à jour !" + +#: wp-admin/upgrade.php:63 +msgid "Database Upgrade Required" +msgstr "Mise à jour de la base de données requise." + +#: wp-admin/upgrade.php:64 +msgid "WordPress has been updated! Before we send you on your way, we have to upgrade your database to the newest version." +msgstr "WordPress a été mis à jour ! Avant de vous laisser continuer, nous devons mettre à jour la base de données." + +#: wp-admin/upgrade.php:65 +msgid "The upgrade process may take a little while, so please be patient." +msgstr "Le processus de mise à jour peut prendre un certain temps, merci donc pour votre patience." + +#: wp-admin/upgrade.php:66 +msgid "Upgrade WordPress Database" +msgstr "Mettre à jour la base de données de WordPress" + +#: wp-admin/upgrade.php:77 +msgid "Upgrade Complete" +msgstr "Mise à jour terminée" + +#: wp-admin/upgrade.php:78 +msgid "Your WordPress database has been successfully upgraded!" +msgstr "La base de données WordPress a été mise à jour avec succès !" + +#: wp-admin/upgrade.php:83 +#, php-format +msgid "%s queries" +msgstr "%s requêtes" + +#: wp-admin/upgrade.php:85 +#, php-format +msgid "%s seconds" +msgstr "%s secondes" + +#: wp-admin/upload.php:21 +msgid "You are not allowed to scan for lost attachments." +msgstr "Vous n’avez pas l’autorisation de chercher les fichier joint perdus." + +#: wp-admin/upload.php:123 +#, php-format +msgid "Image (%s)" +msgid_plural "Images (%s)" +msgstr[0] "Image (%s)" +msgstr[1] "Images (%s)" + +#: wp-admin/upload.php:124 +#, php-format +msgid "Audio (%s)" +msgid_plural "Audio (%s)" +msgstr[0] "Son (%s)" +msgstr[1] "Sons (%s)" + +#: wp-admin/upload.php:125 +#, php-format +msgid "Video (%s)" +msgid_plural "Video (%s)" +msgstr[0] "Vidéo (%s)" +msgstr[1] "Vidéos (%s)" + +#: wp-admin/upload.php:149 +#, php-format +msgid "Reattached %d attachment" +msgid_plural "Reattached %d attachments" +msgstr[0] "%d fichier joint récupéré" +msgstr[1] "%d fichiers joints récupérés" + +#: wp-admin/upload.php:154 +msgid "Media deleted." +msgstr "Média supprimé." + +#: wp-admin/upload.php:155 +msgid "Error saving media attachment." +msgstr "Erreur lors de la sauvegarde du fichier joint." + +#: wp-admin/upload.php:190 +#, php-format +msgctxt "uploaded files" +msgid "All (%s)" +msgid_plural "All (%s)" +msgstr[0] "Tous (%s)" +msgstr[1] "Tous (%s)" + +#: wp-admin/upload.php:203 +msgid "Unattached" +msgstr "Non-joint" + +#: wp-admin/upload.php:247 +#: wp-admin/upload.php:403 +msgid "Attach to a post" +msgstr "Joindre à un article" + +#: wp-admin/upload.php:288 +msgid "Scan for lost attachments" +msgstr "Rechercher les fichiers joints perdus" + +#. translators: column name in media +#: wp-admin/upload.php:304 +#: wp-admin/upload.php:314 +msgctxt "media column name" +msgid "Media" +msgstr "Médias" + +#. translators: column name in media +#: wp-admin/upload.php:305 +#: wp-admin/upload.php:315 +msgctxt "media column name" +msgid "Author" +msgstr "Auteur" + +#. translators: column name in media +#: wp-admin/upload.php:306 +#: wp-admin/upload.php:316 +msgctxt "media column name" +msgid "Date Added" +msgstr "Date ajoutée" + +#: wp-admin/upload.php:347 +msgid "Attach" +msgstr "Joindre" + +#: wp-admin/user-edit.php:18 +msgid "Edit User" +msgstr "Modifier l’utilisateur" + +#: wp-admin/user-edit.php:36 +#: wp-admin/user-edit.php:39 +msgid "Invalid user ID." +msgstr "Identifiant utilisateur invalide." + +#: wp-admin/user-edit.php:57 +msgid "Use https" +msgstr "Utiliser https" + +#: wp-admin/user-edit.php:58 +msgid "Always use https when visiting the admin" +msgstr "Toujours utiliser https lors de l’utilisation de l’administration" + +#: wp-admin/user-edit.php:77 +#: wp-admin/user-edit.php:97 +msgid "You do not have permission to edit this user." +msgstr "Vous n’avez pas l’autorisation de modifier cet utilisateur." + +#: wp-admin/user-edit.php:104 +msgid "User updated." +msgstr "Utilisateur mis à jour." + +#: wp-admin/user-edit.php:106 +msgid "← Back to Authors and Users" +msgstr "← Retour aux auteurs et utilisateurs" + +#: wp-admin/user-edit.php:135 +msgid "Personal Options" +msgstr "Options personnelles" + +#: wp-admin/user-edit.php:140 +msgid "Visual Editor" +msgstr "Éditeur Visuel" + +#: wp-admin/user-edit.php:141 +msgid "Disable the visual editor when writing" +msgstr "Désactiver l’éditeur visuel pour écrire" + +#: wp-admin/user-edit.php:146 +#: wp-admin/user-edit.php:147 +msgid "Admin Color Scheme" +msgstr "Couleurs de l’interface d’administration" + +#: wp-admin/user-edit.php:169 +msgid "Keyboard Shortcuts" +msgstr "Raccourcis clavier" + +#: wp-admin/user-edit.php:170 +msgid "Enable keyboard shortcuts for comment moderation." +msgstr "Activer les raccourcis clavier pour la modération de commentaires." + +#: wp-admin/user-edit.php:170 +msgid "More information" +msgstr "Plus d’information (en)" + +#: wp-admin/user-edit.php:188 +msgid "Your username cannot be changed." +msgstr "Votre identifiant ne peut pas être modifié." + +#: wp-admin/user-edit.php:192 +msgid "Role:" +msgstr "Rôle :" + +#: wp-admin/user-edit.php:205 +#: wp-admin/user-edit.php:207 +msgid "— No role for this blog —" +msgstr "— Pas de rôle sur ce blog —" + +#: wp-admin/user-edit.php:213 +msgid "First name" +msgstr "Prénom" + +#: wp-admin/user-edit.php:218 +msgid "Last name" +msgstr "Nom" + +#: wp-admin/user-edit.php:223 +msgid "Nickname" +msgstr "Pseudonyme" + +#: wp-admin/user-edit.php:223 +#: wp-admin/user-edit.php:261 +#: wp-admin/user-new.php:96 +#: wp-admin/user-new.php:109 +#: wp-content/themes/classic/comments.php:57 +#: wp-content/themes/classic/comments.php:60 +msgid "(required)" +msgstr "(obligatoire)" + +#: wp-admin/user-edit.php:228 +msgid "Display name publicly as" +msgstr "Nom à afficher publiquement" + +#: wp-admin/user-edit.php:257 +msgid "Contact Info" +msgstr "Informations de contact" + +#: wp-admin/user-edit.php:266 +#: wp-admin/user-new.php:113 +#: wp-content/themes/classic/comments.php:63 +msgid "Website" +msgstr "Site web" + +#: wp-admin/user-edit.php:271 +msgid "AIM" +msgstr "AIM" + +#: wp-admin/user-edit.php:276 +msgid "Yahoo IM" +msgstr "Yahoo Messenger" + +#: wp-admin/user-edit.php:281 +msgid "Jabber / Google Talk" +msgstr "Jabber / Google Talk" + +#: wp-admin/user-edit.php:286 +msgid "About Yourself" +msgstr "À propos de vous" + +#: wp-admin/user-edit.php:286 +msgid "About the user" +msgstr "À propos de l’utilisateur" + +#: wp-admin/user-edit.php:290 +msgid "Biographical Info" +msgstr "Renseignements biographiques" + +#: wp-admin/user-edit.php:292 +msgid "Share a little biographical information to fill out your profile. This may be shown publicly." +msgstr "Donnez quelques informations biographiques pour remplir votre profil. Ceci peut être affiché publiquement." + +#: wp-admin/user-edit.php:300 +msgid "New Password" +msgstr "Nouveau mot de passe" + +#: wp-admin/user-edit.php:301 +msgid "If you would like to change the password type a new one. Otherwise leave this blank." +msgstr "Si vous souhaitez changer le mot de passe de l’utilisateur, tapez-en un nouveau deux fois de suite ci-dessous. Sinon, laissez les champs vides." + +#: wp-admin/user-edit.php:302 +msgid "Type your new password again." +msgstr "Veuillez saisir une deuxième fois votre mot de passe." + +#: wp-admin/user-edit.php:303 +#: wp-admin/user-new.php:124 +#: wp-includes/script-loader.php:231 +msgid "Strength indicator" +msgstr "Indicateur de sûreté" + +#: wp-admin/user-edit.php:304 +#: wp-admin/user-new.php:125 +msgid "Hint: The password should be at least seven characters long. To make it stronger, use upper and lower case letters, numbers and symbols like ! \" ? $ % ^ & )." +msgstr "Conseil : votre mot de passe devrait faire au moins 7 caractères de long. Pour le rendre plus sûr, utilisez un mélange de majuscule, de minuscules, de chiffres et de symboles comme ! \" ? $ % ^ & )." + +#: wp-admin/user-edit.php:322 +msgid "Additional Capabilities" +msgstr "Fonctionnalités complémentaires" + +#: wp-admin/user-edit.php:340 +msgid "Update Profile" +msgstr "Mettre à jour le profil" + +#: wp-admin/user-edit.php:340 +msgid "Update User" +msgstr "Mettre à jour l’utilisateur" + +#: wp-admin/user-new.php:22 +msgid "You can’t create users." +msgstr "Vous ne pouvez pas créer d’utilisateurs." + +#: wp-admin/user-new.php:36 +#: wp-admin/user-new.php:48 +msgid "Add New User" +msgstr "Ajouter un utilisateur" + +#: wp-admin/user-new.php:78 +#, php-format +msgid "Users can register themselves or you can manually create users here." +msgstr "Les utilisateurs peuvent s’enregistrer, ou vous pouvez créer des utilisateurs manuellement ici." + +#: wp-admin/user-new.php:80 +#, php-format +msgid "Users cannot currently register themselves, but you can manually create users here." +msgstr "Les utilisateurs ne peuvent pas s’enregistrer eux-mêmes, mais vous pouvez créer manuellement des utilisateurs ici." + +#: wp-admin/user-new.php:101 +msgid "First Name" +msgstr "Prénom" + +#: wp-admin/user-new.php:105 +msgid "Last Name" +msgstr "Nom" + +#: wp-admin/user-new.php:119 +msgid "(twice, required)" +msgstr "(deux fois, obligatoire)" + +#: wp-admin/user-new.php:129 +msgid "Send Password?" +msgstr "Envoyer le mot de passe ?" + +#: wp-admin/user-new.php:130 +msgid "Send this password to the new user by email." +msgstr "Envoi ce mot de passe au nouvel utilisateur par e-mail." + +#: wp-admin/user-new.php:147 +msgid "Add User" +msgstr "Ajouter un utilisateur" + +#: wp-admin/users.php:59 +msgid "You can’t edit that user." +msgstr "Vous ne pouvez pas modifier cet utilisateur." + +#: wp-admin/users.php:85 +#: wp-admin/users.php:126 +msgid "You can’t delete users." +msgstr "Vous ne pouvez pas supprimer d’utilisateurs." + +#: wp-admin/users.php:93 +msgid "You can’t delete that user." +msgstr "Vous ne pouvez pas supprimer cet utilisateur." + +#: wp-admin/users.php:141 +msgid "Delete Users" +msgstr "Supprimer des utilisateurs" + +#: wp-admin/users.php:142 +msgid "You have specified these users for deletion:" +msgstr "Vous avez choisi de supprimer ces utilisateurs :" + +#: wp-admin/users.php:150 +#, php-format +msgid "ID #%1s: %2s The current user will not be deleted." +msgstr "ID n°%1s : %2s L’utilisateur actuel ne sera pas supprimé." + +#: wp-admin/users.php:152 +#, php-format +msgid "ID #%1s: %2s" +msgstr "ID n°%1s : %2s" + +#: wp-admin/users.php:165 +msgid "What should be done with posts and links owned by this user?" +msgstr "Que voulez-vous faire des articles et liens de cet utilisateur ?" + +#: wp-admin/users.php:168 +msgid "Delete all posts and links." +msgstr "Supprimer tous les articles et les liens." + +#: wp-admin/users.php:170 +msgid "Attribute all posts and links to:" +msgstr "Attribuer tous les articles et les liens à :" + +#: wp-admin/users.php:173 +msgid "Confirm Deletion" +msgstr "Confirmer la suppression" + +#: wp-admin/users.php:175 +msgid "There are no valid users selected for deletion." +msgstr "Aucun utilisateur valide n’est sélectionné pour la suppression." + +#: wp-admin/users.php:205 +#, php-format +msgid "%s user deleted" +msgid_plural "%s users deleted" +msgstr[0] "%s utilisateur supprimé" +msgstr[1] "%s utilisateurs supprimés" + +#: wp-admin/users.php:208 +msgid "New user created." +msgstr "Le nouvel utilisateur a été créé." + +#: wp-admin/users.php:211 +msgid "Changed roles." +msgstr "Rôles modifiés." + +#: wp-admin/users.php:214 +msgid "The current user’s role must have user editing capabilities." +msgstr "L’utilisateur courant doit avoir un niveau lui permettant de modifier les utilisateurs." + +#: wp-admin/users.php:215 +msgid "Other user roles have been changed." +msgstr "Les rôles des autres utilisateurs ont été modifiés." + +#: wp-admin/users.php:218 +msgid "You can’t delete the current user." +msgstr "Vous ne pouvez pas supprimer l’utilisateur courant." + +#: wp-admin/users.php:219 +msgid "Other users have been deleted." +msgstr "Les autres utilisateurs ont été supprimés." + +#: wp-admin/users.php:267 +#, php-format +msgctxt "users" +msgid "All (%s)" +msgid_plural "All (%s)" +msgstr[0] "Tous (%s)" +msgstr[1] "Tous (%s)" + +#. translators: User role name with count +#: wp-admin/users.php:281 +#, php-format +msgid "%1$s (%2$s)" +msgstr "%1$s (%2$s)" + +#: wp-admin/users.php:293 +#: wp-admin/users.php:295 +msgid "Search Users" +msgstr "Chercher dans les utilisateurs" + +#: wp-admin/users.php:312 +msgid "Change role to…" +msgstr "Changer de rôle pour…" + +#: wp-admin/users.php:313 +msgid "Change" +msgstr "Changer" + +#: wp-admin/users.php:335 +msgid "← Back to All Users" +msgstr "← Retour aux utilisateurs" + +#: wp-admin/widgets.php:23 +#: wp-includes/functions.php:2740 +msgid "Widgets" +msgstr "Widgets" + +#: wp-admin/widgets.php:28 +#: wp-admin/widgets.php:353 +msgid "Inactive Widgets" +msgstr "Widgets désactivés" + +#: wp-admin/widgets.php:119 +msgid "No Sidebars Defined" +msgstr "Aucune colonne latérale définie" + +#: wp-admin/widgets.php:121 +msgid "The theme you are currently using isn’t widget-aware, meaning that it has no sidebars that you are able to change. For information on making your theme widget-aware, please follow these instructions." +msgstr "Le thème que vous utilisez n’est pas conçu pour les widgets, ce qui signifie qu’il ne dispose pas d’une colonne latérale que vous pouvez modifier. Pour obtenir des informations sur la manière de rendre votre thème compatible avec les widgets, lisez ces instructions (en anglais)." + +#: wp-admin/widgets.php:241 +#, php-format +msgid "Widget %s" +msgstr "Widget %s" + +#: wp-admin/widgets.php:252 +msgid "Select both the sidebar for this widget and the position of the widget in that sidebar." +msgstr "Sélectionnez à la fois la colonne latérale pour ce widget, et la position du widget dans cette colonne latérale." + +#: wp-admin/widgets.php:254 +msgid "Position" +msgstr "Position" + +#: wp-admin/widgets.php:269 +msgid "-- select --" +msgstr "-- Choisir --" + +#: wp-admin/widgets.php:288 +msgid "Save Widget" +msgstr "Enregistrer le widget" + +#: wp-admin/widgets.php:313 +msgid "Changes saved." +msgstr "Modifications enregistrées." + +#: wp-admin/widgets.php:317 +msgid "Error while saving." +msgstr "Erreur lors de la sauvegarde." + +#: wp-admin/widgets.php:318 +msgid "Error in displaying the widget settings form." +msgstr "Une erreur est survenue durant l’affichage du formulaire de paramétrage du widget." + +#: wp-admin/widgets.php:339 +msgid "Available Widgets" +msgstr "Widgets disponibles" + +#: wp-admin/widgets.php:341 +msgid "Drag widgets from here to a sidebar on the right to activate them. Drag widgets back here to deactivate them and delete their settings." +msgstr "Glissez les widgets d’ici vers une colonne latérale à droite pour les activer. Remettez-les ici pour les désactiver et supprimer leurs réglages." + +#: wp-admin/widgets.php:356 +msgid "Drag widgets here to remove them from the sidebar but keep their settings." +msgstr "Glissez ici les widgets que vous voulez retirer de la colonne latérale, tout en conservant leurs réglages actuels." + +#: wp-app.php:315 +#, php-format +msgid "AtomPub services are disabled on this blog. An admin user can enable them at %s" +msgstr "Les services AtomPub sont désactivés sur ce blog. Un administrateur peut les activer à %s" + +#: wp-app.php:353 +#: wp-app.php:393 +msgid "Sorry, you do not have the right to access this blog." +msgstr "Désolé, vous n’avez pas l’autorisation d’accéder à ce blog." + +#: wp-app.php:448 +msgid "Sorry, you do not have the right to edit/publish new posts." +msgstr "Désolé, vous n’avez pas l’autorisation de modifier/publier de nouveaux articles." + +#: wp-app.php:473 +#: wp-app.php:671 +#: wp-app.php:862 +#: xmlrpc.php:1890 +#: xmlrpc.php:2228 +msgid "Sorry, your entry could not be posted. Something wrong happened." +msgstr "Désolé, votre entrée n’a pas pu être publiée. Une erreur est survenue." + +#: wp-app.php:500 +msgid "Sorry, you do not have the right to access this post." +msgstr "Désolé, vous n’avez pas l’autorisation d’accéder à cet article." + +#: wp-app.php:535 +#: wp-app.php:703 +#: wp-app.php:779 +#: wp-app.php:830 +#: xmlrpc.php:1932 +msgid "Sorry, you do not have the right to edit this post." +msgstr "Désolé, vous n’avez pas l’autorisation de modifier cet article." + +#: wp-app.php:558 +#: wp-app.php:719 +#: xmlrpc.php:1948 +msgid "For some strange yet very annoying reason, this post could not be edited." +msgstr "Pour une bien étrange raison, cet article n’a pu être modifié." + +#: wp-app.php:581 +#: wp-app.php:741 +#: xmlrpc.php:1984 +msgid "Sorry, you do not have the right to delete this post." +msgstr "Désolé, vous n’avez pas l’autorisation de supprimer cet article." + +#: wp-app.php:590 +#: wp-app.php:757 +#: xmlrpc.php:1989 +msgid "For some strange yet very annoying reason, this post could not be deleted." +msgstr "Pour une bien étrange raison, cet article n’a pu être supprimé." + +#: wp-app.php:608 +msgid "Sorry, you do not have permission to upload files." +msgstr "Vous n’avez pas l’autorisation d’envoyer des fichiers." + +#: wp-app.php:748 +#: wp-app.php:787 +#: wp-app.php:840 +msgid "Error ocurred while accessing post metadata for file location." +msgstr "Une erreur est survenue pendant l’accès aux métadonnées de l’article concernant la localisation du fichier." + +#: wp-comments-post.php:29 +msgid "Sorry, comments are closed for this item." +msgstr "Désolé, les commentaires sont fermés pour cet article." + +#: wp-comments-post.php:58 +msgid "Sorry, you must be logged in to post a comment." +msgstr "Désolé, vous devez être connecté(e) pour rédiger un commentaire." + +#: wp-comments-post.php:65 +msgid "Error: please fill the required fields (name, email)." +msgstr "Erreur : veuillez renseigner les champs obligatoires vides (nom, e-mail)." + +#: wp-comments-post.php:67 +msgid "Error: please enter a valid email address." +msgstr "Erreur : veuillez saisir une adresse e-mail valide" + +#: wp-content/plugins/akismet/akismet.php:57 +#: wp-content/plugins/akismet/akismet.php:133 +msgid "Akismet Configuration" +msgstr "Configuration Akismet" + +#: wp-content/plugins/akismet/akismet.php:120 +msgid "Your key has been cleared." +msgstr "Votre clef a été vidée." + +#: wp-content/plugins/akismet/akismet.php:121 +msgid "Your key has been verified. Happy blogging!" +msgstr "Votre clef a été vérifiée. Écrivez sans limite !" + +#: wp-content/plugins/akismet/akismet.php:122 +msgid "The key you entered is invalid. Please double-check it." +msgstr "Votre clef ne semble pas être valide. Veuillez la vérifier." + +#: wp-content/plugins/akismet/akismet.php:123 +msgid "The key you entered could not be verified because a connection to akismet.com could not be established. Please check your server configuration." +msgstr "La clef que vous avez entrée n’a pas pu être vérifiée car la connexion à akismet.com n’a pas pu être établie. Veuillez vérifier la configuration de votre serveur." + +#: wp-content/plugins/akismet/akismet.php:124 +msgid "There was a problem connecting to the Akismet server. Please check your server configuration." +msgstr "Il y a eu un problème lors de la connexion au serveur Akismet. Veuillez vérifier la configuration de votre serveur." + +#: wp-content/plugins/akismet/akismet.php:125 +#, php-format +msgid "Please enter an API key. (Get your key.)" +msgstr "Veuillez donner une clef d’API. (Obtenir votre clef)" + +#: wp-content/plugins/akismet/akismet.php:126 +msgid "This key is valid." +msgstr "Cette clef est valide." + +#: wp-content/plugins/akismet/akismet.php:127 +msgid "The key below was previously validated but a connection to akismet.com can not be established at this time. Please check your server configuration." +msgstr "La clef ci-dessous a déjà été validée, mais la connexion à akismet.com ne peut être établie pour le moment. Veuillez vérifier la configuration de votre serveur." + +#: wp-content/plugins/akismet/akismet.php:130 +#: wp-content/themes/default/functions.php:366 +msgid "Options saved." +msgstr "Options enregistrées." + +#: wp-content/plugins/akismet/akismet.php:137 +#, php-format +msgid "For many people, 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 WordPress.com." +msgstr "Déjà utilisé par de nombreux blogs, Akismet va vous permettre de réduire ou même d’éliminer complètement les commentaires indésirables (spams) et de faux rétroliens qui affectent votre site. Si l’un d’eux passait au travers, vous n’avez qu’à simplement le marquer comme « indésirable » sur l’écran de modération, et Akismet apprendra de ses erreurs. Si vous n’avez pas encore de compte sur WordPress.com, vous pouvez en obtenir un en allant sur WordPress.com." + +#: wp-content/plugins/akismet/akismet.php:140 +msgid "WordPress.com API Key" +msgstr "Clef d’API WordPress.com" + +#: wp-content/plugins/akismet/akismet.php:144 +msgid "What is this?" +msgstr "Qu’est-ce que c’est ? (en anglais)" + +#: wp-content/plugins/akismet/akismet.php:146 +msgid "Why might my key be invalid?" +msgstr "Pourquoi ma clef ne serait-elle pas valide ?" + +#: wp-content/plugins/akismet/akismet.php:147 +msgid "This can mean one of two things, either you copied the key wrong or that the plugin is unable to reach the Akismet servers, which is most often caused by an issue with your web host around firewalls or similar." +msgstr "Cela peut avoir deux causes : soit vous avez mal recopié la clef, soit l’extension n’a pas été capable de contacter les serveurs d’Akismet. Cette dernière erreur est souvent causée par un problème du côté du pare-feu (firewall) de l’hébergeur." + +#: wp-content/plugins/akismet/akismet.php:150 +msgid "Automatically discard spam comments on posts older than a month." +msgstr "Effacer automatiquement les commentaires indésirables des articles datant de plus d’un mois." + +#: wp-content/plugins/akismet/akismet.php:151 +msgid "Update options »" +msgstr "Mettre à jour les options »" + +#: wp-content/plugins/akismet/akismet.php:156 +msgid "Server Connectivity" +msgstr "Connectivité serveur" + +#: wp-content/plugins/akismet/akismet.php:163 +msgid "Unable to reach some Akismet servers." +msgstr "Impossible d’atteindre certains serveurs d’Akismet." + +#: wp-content/plugins/akismet/akismet.php:164 +#, php-format +msgid "A network problem or firewall is blocking some connections from your web server to Akismet.com. Akismet is working but this may cause problems during times of network congestion. Please contact your web host or firewall administrator and give them this information about Akismet and firewalls." +msgstr "Un problème réseau ou un pare-feu bloque une partie des connexions vers le serveur d’Akismet.com. Akismet fonctionne, mais des problèmes peuvent survenir en cas de congestion réseau. Veuillez contacter votre hébergeur ou votre administrateur réseau avec ces informations (en anglais)." + +#: wp-content/plugins/akismet/akismet.php:168 +msgid "Unable to reach any Akismet servers." +msgstr "Impossible d’atteindre les serveurs d’Akismet." + +#: wp-content/plugins/akismet/akismet.php:169 +#, php-format +msgid "A network problem or firewall is blocking all connections from your web server to Akismet.com. 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." +msgstr "Un problème réseau ou un pare-feu bloque toutes les connexions vers le serveur d'Akismet.com. Akismet ne pourra pas fonctionner correctement tant que ce problème ne sera pas résolu. Veuillez contacter votre hébergeur ou votre administrateur réseau avec ces informations (en anglais)." + +#: wp-content/plugins/akismet/akismet.php:173 +msgid "All Akismet servers are available." +msgstr "Tous les serveurs Akismet sont disponibles." + +#: wp-content/plugins/akismet/akismet.php:174 +msgid "Akismet is working correctly. All servers are accessible." +msgstr "Akismet fonctionne correctement. Tous les serveurs sont accessibles." + +#: wp-content/plugins/akismet/akismet.php:179 +msgid "Network functions are disabled." +msgstr "Les fonctionnalités réseau sont désactivées." + +#: wp-content/plugins/akismet/akismet.php:180 +#, php-format +msgid "Your web host or server administrator has disabled PHP's 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." +msgstr "Votre hébergeur web ou votre administrateur système a désactivé la fonction fsockopen de PHP. Akismet ne pourra pas fonctionner correctement tant que ce problème ne sera pas résolu. Veuillez contacter votre hébergeur ou votre administrateur réseau avec ces informations (en anglais)." + +#: wp-content/plugins/akismet/akismet.php:184 +msgid "Unable to find Akismet servers." +msgstr "Impossible de trouver les serveurs d’Akismet." + +#: wp-content/plugins/akismet/akismet.php:185 +#, php-format +msgid "A DNS problem or firewall is preventing all access from your web server to Akismet.com. 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." +msgstr "Un problème de DNS ou de pare-feu empêche tout accès au serveur d’Akismet.com. Akismet ne pourra pas fonctionner correctement tant que ce problème ne sera pas résolu. Veuillez contacter votre hébergeur ou votre administrateur réseau avec ces informations (en anglais)." + +#: wp-content/plugins/akismet/akismet.php:192 +msgid "Akismet server" +msgstr "Serveur Akismet" + +#: wp-content/plugins/akismet/akismet.php:192 +msgid "Network Status" +msgstr "État du réseau" + +#: wp-content/plugins/akismet/akismet.php:201 +msgid "No problems" +msgstr "Aucun problème" + +#: wp-content/plugins/akismet/akismet.php:201 +msgid "Obstructed" +msgstr "Bloqué" + +#: wp-content/plugins/akismet/akismet.php:209 +#, php-format +msgid "Last checked %s ago." +msgstr "Vérifié pour la dernière fois il y a %s." + +#: wp-content/plugins/akismet/akismet.php:210 +msgid "Check network status »" +msgstr "Vérifier l’état du réseau »" + +#: wp-content/plugins/akismet/akismet.php:220 +msgid "Akismet Stats" +msgstr "Statistiques Akismet" + +#: wp-content/plugins/akismet/akismet.php:327 +msgid "Akismet is almost ready." +msgstr "Akismet est presque prêt." + +#: wp-content/plugins/akismet/akismet.php:327 +#, php-format +msgid "You must enter your WordPress.com API key for it to work." +msgstr "Vous devez donner votre clef d’API WordPress.com pour qu’il fonctionne." + +#: wp-content/plugins/akismet/akismet.php:335 +msgid "Akismet has detected a problem." +msgstr "Akismet a détecté un problème." + +#: wp-content/plugins/akismet/akismet.php:335 +#, php-format +msgid "A server or network problem is preventing Akismet from working correctly. Click here for more information about how to fix the problem." +msgstr "Un problème au niveau du réseau ou du serveur empêche Akismet de fonctionner correctement. Comment résoudre ce problème (en anglais)." + +#: wp-content/plugins/akismet/akismet.php:589 +#, php-format +msgid "Akismet Spam (%s)" +msgstr "Commentaires indésirables Akismet (%s)" + +#: wp-content/plugins/akismet/akismet.php:591 +#: wp-content/plugins/akismet/akismet.php:593 +msgid "Akismet Spam" +msgstr "Commentaire indésirable Akismet" + +#: wp-content/plugins/akismet/akismet.php:603 +#: wp-content/plugins/akismet/akismet.php:622 +msgid "You do not have sufficient permission to moderate comments." +msgstr "Vous n’avez pas les droits suffisants pour modérer les commentaires." + +#: wp-content/plugins/akismet/akismet.php:634 +#, php-format +msgid "%1$s comments recovered." +msgstr "%s commentaires récupérés." + +#: wp-content/plugins/akismet/akismet.php:638 +msgid "All spam deleted." +msgstr "Tous les commentaires indésirables ont été supprimés." + +#: wp-content/plugins/akismet/akismet.php:686 +msgid "Caught Spam" +msgstr "Commentaires indésirables bloqués" + +#: wp-content/plugins/akismet/akismet.php:691 +#, php-format +msgid "Akismet has caught %1$s spam for you since you first installed it." +msgstr "Akismet a bloqué %1$s commentaires indésirables pour vous depuis que vous l’avez installé." + +#: wp-content/plugins/akismet/akismet.php:698 +msgid "You have no spam currently in the queue. Must be your lucky day. :)" +msgstr "Aucun commentaire indésirable dans la file d’attente actuellement. Ce doit être votre jour de chance :)" + +#: wp-content/plugins/akismet/akismet.php:701 +msgid "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." +msgstr "Vous pouvez supprimer tous les commentaires indésirables de votre base de données en un seul clic. Cette opération est irréversible, donc vous devez vérifier qu’aucun commentaire légitime n’y a été placé par mégarde. Dans tous les cas, ces commentaires indésirables sont automatiquement supprimés après 15 jours." + +#: wp-content/plugins/akismet/akismet.php:707 +#: wp-content/plugins/akismet/akismet.php:885 +#, php-format +msgid "There are currently %1$s comments identified as spam." +msgstr "Il y a actuellement %1$s commentaire(s) identifié(s) comme indésirable(s)." + +#: wp-content/plugins/akismet/akismet.php:707 +#: wp-content/plugins/akismet/akismet.php:885 +msgid "Delete all" +msgstr "Tout supprimer " + +#: wp-content/plugins/akismet/akismet.php:716 +msgid "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." +msgstr "Voici les derniers commentaires identifiés comme indésirables par Akismet. Si vous voyez une erreur, changez le marquage du commentaire en cliquant sur « N’est pas indésirable » et Askimet s’en souviendra. Si vous souhaitez récupérer un commentaire marqué comme indésirable, sélectionnez-le et cliquez sur le bouton « Marquer les commentaires cochés comme légitimes ». Au bout de 15 jours, nous supprimons de toute façons tous les indésirables." + +#: wp-content/plugins/akismet/akismet.php:770 +msgid "Search Spam »" +msgstr "Chercher dans les commentaires indésirables »" + +#: wp-content/plugins/akismet/akismet.php:777 +#: wp-content/plugins/akismet/akismet.php:844 +#: wp-includes/link-template.php:1445 +msgid "« Previous Page" +msgstr "« Page précédente" + +#: wp-content/plugins/akismet/akismet.php:798 +#: wp-content/plugins/akismet/akismet.php:865 +#: wp-includes/link-template.php:1446 +msgid "Next Page »" +msgstr "Page suivante »" + +#: wp-content/plugins/akismet/akismet.php:820 +msgid "IP:" +msgstr "IP :" + +#: wp-content/plugins/akismet/akismet.php:826 +msgid "Not Spam" +msgstr "N’est pas un commentaire indésirable" + +#: wp-content/plugins/akismet/akismet.php:871 +msgid "De-spam marked comments »" +msgstr "Marquer les commentaires cochés comme légitimes »" + +#: wp-content/plugins/akismet/akismet.php:873 +msgid "Comments you de-spam will be submitted to Akismet as mistakes so it can learn and get better." +msgstr "Les commentaires que vous marquez comme légitimes seront envoyés à Akismet pour qu’il puisse apprendre de ses erreurs." + +#: wp-content/plugins/akismet/akismet.php:909 +#, php-format +msgid "Akismet has protected your site from %3$s spam comments." +msgstr "Akismet a protégé votre site de %3$s commentaires indésirables." + +#: wp-content/plugins/akismet/akismet.php:927 +#, php-format +msgid "Akismet has protected your site from %2$s spam comment already," +msgid_plural "Akismet has protected your site from %2$s spam comments already," +msgstr[0] "Akismet a déjà protégé votre site de %2$s commentaire indésirable," +msgstr[1] "Akismet a déjà protégé votre site de %2$s commentaires indésirables," + +#: wp-content/plugins/akismet/akismet.php:932 +#, php-format +msgid "Akismet blocks spam from getting to your blog," +msgstr "Akismet empêche les commentaires indésirables d’arriver sur votre blog," + +#: wp-content/plugins/akismet/akismet.php:937 +#, php-format +msgid "and there's %1$s comment in your spam queue right now." +msgid_plural "and there are %1$s comments in your spam queue right now." +msgstr[0] "et il y a %1$s commentaire dans votre file de commentaires indésirables actuellement." +msgstr[1] "et il y a %1$s commentaires dans votre file de commentaires indésirables actuellement." + +#: wp-content/plugins/akismet/akismet.php:942 +#, php-format +msgid "but there's nothing in your spam queue at the moment." +msgstr "mais il n’y a rien dans votre file d’indésirables actuellement." + +#: wp-content/plugins/akismet/akismet.php:945 +#, php-format +msgid "%1$s %2$s|akismet_rightnow" +msgstr "%1$s %2$s" + +#: wp-content/plugins/akismet/akismet.php:960 +msgid "Recheck Queue for Spam" +msgstr "Revérifier la file de commentaires indésirables" + +#: wp-content/plugins/akismet/akismet.php:977 +msgid "Check for Spam" +msgstr "Vérifier les commentaires indésirables" + +#: wp-content/plugins/akismet/akismet.php:1052 +#, php-format +msgid "%1$s %2$sspam comments%3$s %4$sblocked by%5$s
    %6$sAkismet%7$s" +msgstr "%1$s %2$scommentaires indésirables%3$s %4$sbloqués par%5$s
    %6$sAkismet%7$s" + +#: wp-content/plugins/akismet/akismet.php:1114 +msgid "spam comments" +msgstr "commentaires indésirables" + +#: wp-content/plugins/akismet/akismet.php:1114 +msgid "blocked by" +msgstr "bloqué par" + +#: wp-content/themes/classic/comments-popup.php:9 +#, php-format +msgid "Comments on %s" +msgstr "Commentaires sur %s" + +#: wp-content/themes/classic/comments-popup.php:31 +#: wp-content/themes/classic/comments.php:35 +msgid "RSS feed for comments on this post." +msgstr "Flux RSS des commentaires de cet article." + +#: wp-content/themes/classic/comments-popup.php:34 +msgid "The URL to TrackBack this entry is:" +msgstr "L’adresse web pour rétrolien sur cet article est :" + +#: wp-content/themes/classic/comments-popup.php:52 +#: wp-content/themes/classic/comments.php:24 +msgid "by" +msgstr "par" + +#: wp-content/themes/classic/comments-popup.php:62 +#: wp-content/themes/classic/comments.php:13 +#: wp-content/themes/classic/comments.php:42 +msgid "Leave a comment" +msgstr "Laisser un commentaire" + +#: wp-content/themes/classic/comments-popup.php:63 +msgid "Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed:" +msgstr "Les paragraphes et retours à la ligne sont automatiques. Les e-mails sont masqués. HTML autorisé :" + +#: wp-content/themes/classic/comments-popup.php:67 +#: wp-content/themes/classic/comments.php:52 +#, php-format +msgid "Logged in as %s." +msgstr "Connecté(e) en tant que %s." + +#: wp-content/themes/classic/comments-popup.php:67 +#: wp-content/themes/classic/comments.php:52 +msgid "Log out of this account" +msgstr "Se déconnecter" + +#: wp-content/themes/classic/comments-popup.php:67 +#: wp-content/themes/classic/comments.php:52 +msgid "Log out »" +msgstr "Déconnexion »" + +#: wp-content/themes/classic/comments-popup.php:81 +msgid "URL" +msgstr "Adresse web" + +#: wp-content/themes/classic/comments-popup.php:86 +msgid "Your Comment" +msgstr "Votre commentaire" + +#: wp-content/themes/classic/comments-popup.php:94 +msgid "Say It!" +msgstr "Dites-le !" + +#: wp-content/themes/classic/comments-popup.php:99 +#: wp-content/themes/classic/comments.php:81 +msgid "Sorry, the comment form is closed at this time." +msgstr "Désolé, les commentaires sont fermés pour le moment." + +#: wp-content/themes/classic/comments-popup.php:104 +msgid "Close this window." +msgstr "Fermer cette fenêtre." + +#: wp-content/themes/classic/comments-popup.php:115 +#, php-format +msgid "Powered by WordPress" +msgstr "Propulsé par WordPress" + +#: wp-content/themes/classic/comments-popup.php:115 +#: wp-content/themes/classic/footer.php:12 +#: wp-content/themes/classic/sidebar.php:38 +#: wp-includes/default-widgets.php:300 +msgid "Powered by WordPress, state-of-the-art semantic personal publishing platform." +msgstr "Propulsé par WordPress, plate-forme de publication personnelle sémantique de pointe." + +#: wp-content/themes/classic/comments.php:8 +msgid "Enter your password to view comments." +msgstr "Saisissez votre mot de passe pour accéder aux commentaires." + +#: wp-content/themes/classic/comments.php:11 +#: wp-includes/comment-template.php:557 +#: wp-includes/comment-template.php:937 +msgid "No Comments" +msgstr "Pas de commentaire" + +#: wp-content/themes/classic/comments.php:11 +#: wp-includes/comment-template.php:559 +#: wp-includes/comment-template.php:938 +msgid "1 Comment" +msgstr "Un commentaire" + +#: wp-content/themes/classic/comments.php:11 +#: wp-includes/comment-template.php:555 +#: wp-includes/comment-template.php:939 +msgid "% Comments" +msgstr "% commentaires" + +#: wp-content/themes/classic/comments.php:24 +#: wp-content/themes/classic/index.php:15 +#: wp-includes/link-template.php:605 +#: wp-includes/link-template.php:818 +msgid "Edit This" +msgstr "Modifier" + +#: wp-content/themes/classic/comments.php:37 +msgid "TrackBack URL" +msgstr "Adresse web de rétrolien" + +#: wp-content/themes/classic/comments.php:45 +#, php-format +msgid "You must be logged in to post a comment." +msgstr "Vous devez être connecté pour rédiger un commentaire." + +#: wp-content/themes/classic/comments.php:60 +msgid "Mail (will not be published)" +msgstr "Adresse e-mail (ne sera pas publiée)" + +#: wp-content/themes/classic/comments.php:67 +#, php-format +msgid "You can use these tags: %s" +msgstr "Vous pouvez utilisez ces balises : %s" + +#: wp-content/themes/classic/comments.php:71 +msgid "Submit Comment" +msgstr "Soumettre le commentaire" + +#: wp-content/themes/classic/footer.php:12 +#, php-format +msgid "Powered by WordPress" +msgstr "Propulsé par WordPress" + +#: wp-content/themes/classic/index.php:15 +msgid "Filed under:" +msgstr "Classé dans :" + +#: wp-content/themes/classic/index.php:15 +#: wp-includes/category-template.php:804 +msgid "Tags: " +msgstr "Mots-clefs :" + +#: wp-content/themes/classic/index.php:18 +#: wp-includes/post-template.php:186 +msgid "(more...)" +msgstr "(Lire la suite…)" + +#: wp-content/themes/classic/index.php:23 +msgid "Comments (0)" +msgstr "Commentaires (0)" + +#: wp-content/themes/classic/index.php:23 +msgid "Comments (1)" +msgstr "Commentaires (1)" + +#: wp-content/themes/classic/index.php:23 +msgid "Comments (%)" +msgstr "Commentaires (%)" + +#: wp-content/themes/classic/index.php:31 +msgid "Sorry, no posts matched your criteria." +msgstr "Désolé, aucun article ne correspond à vos critères." + +#: wp-content/themes/classic/index.php:34 +msgid "« Newer Posts" +msgstr "« Articles plus récents" + +#: wp-content/themes/classic/index.php:34 +msgid "Older Posts »" +msgstr "Articles plus anciens »" + +#: wp-content/themes/classic/sidebar.php:13 +#: wp-includes/post-template.php:567 +msgid "Pages:" +msgstr "Pages :" + +#: wp-content/themes/classic/sidebar.php:15 +msgid "Categories:" +msgstr "Catégories :" + +#: wp-content/themes/classic/sidebar.php:17 +msgid "Search:" +msgstr "Recherche :" + +#: wp-content/themes/classic/sidebar.php:25 +msgid "Archives:" +msgstr "Archives :" + +#: wp-content/themes/classic/sidebar.php:30 +msgid "Meta:" +msgstr "Méta :" + +#: wp-content/themes/classic/sidebar.php:34 +msgid "Syndicate this site using RSS" +msgstr "Suivez ce site par syndication RSS" + +#: wp-content/themes/classic/sidebar.php:34 +msgid "RSS" +msgstr "RSS" + +#: wp-content/themes/classic/sidebar.php:35 +#: wp-includes/default-widgets.php:299 +msgid "The latest comments to all posts in RSS" +msgstr "Les derniers commentaires pour tous les articles, au format RSS" + +#: wp-content/themes/classic/sidebar.php:35 +#: wp-includes/default-widgets.php:299 +msgid "Comments RSS" +msgstr "RSS des commentaires" + +#: wp-content/themes/classic/sidebar.php:36 +msgid "This page validates as XHTML 1.0 Transitional" +msgstr "Cette page est en XHTML 1.0 Transitional valide" + +#: wp-content/themes/classic/sidebar.php:36 +msgid "Valid XHTML" +msgstr "XHTML valide" + +#: wp-content/themes/default/functions.php:169 +msgid "Close Color Picker" +msgstr "Fermer le sélecteur de couleur." + +#: wp-content/themes/default/functions.php:369 +msgid "Customize Header" +msgstr "Personnalisation de l’en-tête" + +#: wp-content/themes/default/functions.php:384 +msgid "Font Color:" +msgstr "Couleur du texte :" + +#: wp-content/themes/default/functions.php:384 +#, php-format +msgid "Any CSS color (%s or %s or %s)" +msgstr "Une couleur CSS (%s ou %s ou %s)" + +#: wp-content/themes/default/functions.php:385 +msgid "Upper Color:" +msgstr "Couleur du haut :" + +#: wp-content/themes/default/functions.php:385 +#: wp-content/themes/default/functions.php:386 +#, php-format +msgid "HEX only (%s or %s)" +msgstr "HEX seulement (%s ou %s)" + +#: wp-content/themes/default/functions.php:386 +msgid "Lower Color:" +msgstr "Couleur du bas :" + +#: wp-content/themes/default/functions.php:388 +msgid "Toggle Text" +msgstr "Afficher/masquer le texte" + +#: wp-content/themes/default/functions.php:389 +msgid "Use Defaults" +msgstr "Utiliser les valeurs par défaut" + +#: wp-content/themes/default/functions.php:398 +msgid "Font Color" +msgstr "Couleur du texte" + +#: wp-content/themes/default/functions.php:399 +msgid "Upper Color" +msgstr "Couleur de départ" + +#: wp-content/themes/default/functions.php:400 +msgid "Lower Color" +msgstr "Couleur de fin" + +#: wp-content/themes/default/functions.php:401 +msgid "Revert" +msgstr "Annuler" + +#: wp-content/themes/default/functions.php:409 +msgid "Update Header" +msgstr "Mettre à jour l’en-tête" + +#: wp-content/themes/default/functions.php:415 +msgid "Font Color (CSS):" +msgstr "Couleur du texte (CSS) :" + +#: wp-content/themes/default/functions.php:416 +msgid "Upper Color (HEX):" +msgstr "Couleur du haut (HEX) :" + +#: wp-content/themes/default/functions.php:417 +msgid "Lower Color (HEX):" +msgstr "Couleur du bas (HEX) :" + +#: wp-content/themes/default/functions.php:418 +msgid "Select Default Colors" +msgstr "Sélectionner les couleurs par défaut" + +#: wp-content/themes/default/functions.php:419 +msgid "Toggle Text Display" +msgstr "Afficher/masquer le texte" + +#: wp-includes/atomlib.php:133 +#, php-format +msgid "XML error: %s at line %d" +msgstr "Erreur XML : %s à la ligne %d" + +#: wp-includes/author-template.php:135 +#, php-format +msgid "Visit %s’s website" +msgstr "Aller sur le site de %s" + +#: wp-includes/author-template.php:184 +#: wp-includes/author-template.php:295 +#, php-format +msgid "Posts by %s" +msgstr "Articles par %s" + +#: wp-includes/bookmark-template.php:82 +#, php-format +msgid "Last updated: %s" +msgstr "Dernière mise à jour : %s" + +#: wp-includes/bookmark-template.php:204 +msgid "Bookmarks" +msgstr "Favoris" + +#: wp-includes/category-template.php:71 +#: wp-includes/category-template.php:193 +#: wp-includes/category-template.php:196 +#: wp-includes/category-template.php:203 +#: wp-includes/category-template.php:216 +#: wp-includes/category-template.php:219 +#: wp-includes/category-template.php:226 +#, php-format +msgid "View all posts in %s" +msgstr "Voir tous les articles dans %s" + +#: wp-includes/category-template.php:461 +#: wp-includes/category-template.php:463 +msgid "No categories" +msgstr "Pas de catégorie" + +#: wp-includes/category-template.php:565 +#, php-format +msgid "%s topic" +msgid_plural "%s topics" +msgstr[0] "%s sujet" +msgstr[1] "%s sujets" + +#: wp-includes/class-pop3.php:83 +msgid "No server specified" +msgstr "Aucune serveur spécifié" + +#: wp-includes/class-pop3.php:91 +#: wp-includes/class-pop3.php:103 +#: wp-includes/class-pop3.php:124 +#: wp-includes/class-pop3.php:247 +#: wp-includes/class-pop3.php:301 +#: wp-includes/class-pop3.php:312 +#: wp-includes/class-pop3.php:360 +#: wp-includes/class-pop3.php:394 +#: wp-includes/class-pop3.php:427 +#: wp-includes/class-pop3.php:526 +#: wp-includes/class-pop3.php:549 +msgid "Error " +msgstr "Erreur " + +#: wp-includes/class-pop3.php:116 +msgid "no login ID submitted" +msgstr "pas d’identifiant de connexion envoyé" + +#: wp-includes/class-pop3.php:119 +#: wp-includes/class-pop3.php:139 +msgid "connection not established" +msgstr "la connexion n’est pas établie" + +#: wp-includes/class-pop3.php:136 +#: wp-includes/class-pop3.php:172 +msgid "No password submitted" +msgstr "Pas de mot de passe envoyé" + +#: wp-includes/class-pop3.php:144 +msgid "Authentication failed" +msgstr "L’authentification a échouée" + +#: wp-includes/class-pop3.php:163 +#: wp-includes/class-pop3.php:206 +#: wp-includes/class-pop3.php:231 +#: wp-includes/class-pop3.php:273 +#: wp-includes/class-pop3.php:347 +#: wp-includes/class-pop3.php:387 +#: wp-includes/class-pop3.php:417 +#: wp-includes/class-pop3.php:451 +#: wp-includes/class-pop3.php:514 +#: wp-includes/class-pop3.php:582 +msgid "No connection to server" +msgstr "Pas de connexion au serveur" + +#: wp-includes/class-pop3.php:169 +msgid "No login ID submitted" +msgstr "Pas d’identifiant de connexion envoyé" + +#: wp-includes/class-pop3.php:177 +msgid "No server banner" +msgstr "Pas de blocage serveur" + +#: wp-includes/class-pop3.php:177 +#: wp-includes/class-pop3.php:187 +msgid "abort" +msgstr "abandonner" + +#: wp-includes/class-pop3.php:187 +msgid "apop authentication failed" +msgstr "l’identification apop a échouée" + +#: wp-includes/class-pop3.php:324 +msgid "Premature end of list" +msgstr "Fin de liste inattendue" + +#: wp-includes/class-pop3.php:457 +msgid "Empty command string" +msgstr "Chaîne de commande vide" + +#: wp-includes/class-pop3.php:477 +msgid "connection does not exist" +msgstr "la connexion n’existe pas" + +#: wp-includes/class-pop3.php:587 +msgid "No msg number submitted" +msgstr "Pas de numéro de message envoyé" + +#: wp-includes/class-pop3.php:593 +msgid "Command failed " +msgstr "Échec de la commande " + +#: wp-includes/classes.php:1332 +#, php-format +msgid "View all posts filed under %s" +msgstr "Voir tous les articles classés dans %s" + +#: wp-includes/classes.php:1347 +#, php-format +msgid "Feed for all posts filed under %s" +msgstr "Flux pour tous les articles classés dans %s" + +#: wp-includes/comment-template.php:940 +msgid "Comments Off" +msgstr "Commentaires fermés" + +#: wp-includes/comment-template.php:950 +msgid "Enter your password to view comments" +msgstr "Saisissez votre mot de passe pour accéder aux commentaires" + +#: wp-includes/comment-template.php:977 +#, php-format +msgid "Comment on %s" +msgstr "Commentaire sur %s" + +#: wp-includes/comment-template.php:1003 +msgid "Log in to Reply" +msgstr "Connectez-vous pour répondre" + +#: wp-includes/comment-template.php:1061 +msgid "Leave a Comment" +msgstr "Laisser un commentaire" + +#: wp-includes/comment-template.php:1062 +msgid "Log in to leave a Comment" +msgstr "Connectez-vous pour laisser un commentaire" + +#: wp-includes/comment-template.php:1101 +msgid "Click here to cancel reply." +msgstr "Cliquer ici pour annuler la réponse." + +#: wp-includes/comment-template.php:1144 +msgid "Leave a Reply" +msgstr "Laisser un commentaire" + +#: wp-includes/comment-template.php:1145 +#, php-format +msgid "Leave a Reply to %s" +msgstr "Répondre à %s" + +#: wp-includes/comment-template.php:1263 +#, php-format +msgid "%s says:" +msgstr "%s dit :" + +#: wp-includes/comment-template.php:1266 +msgid "Your comment is awaiting moderation." +msgstr "Votre commentaire est en attente de modération" + +#: wp-includes/comment-template.php:1270 +#, php-format +msgid "%1$s at %2$s" +msgstr "%1$s à %2$s" + +#: wp-includes/comment-template.php:1270 +msgid "(Edit)" +msgstr "(Modifier)" + +#: wp-includes/comment.php:256 +msgid "Unapproved" +msgstr "Désapprouvé" + +#: wp-includes/comment.php:415 +#: wp-includes/comment.php:417 +msgid "Duplicate comment detected; it looks as though you’ve already said that!" +msgstr "Détection d’un doublon : il semble que vous avez déjà envoyé ce commentaire !" + +#: wp-includes/comment.php:474 +#: wp-includes/comment.php:476 +msgid "You are posting comments too quickly. Slow down." +msgstr "Vous envoyez vos commentaires trop rapidement. Calmez-vous." + +#: wp-includes/comment.php:1056 +msgid "Could not update comment status" +msgstr "Impossible de mettre à jour le statut du commentaire" + +#: wp-includes/cron.php:297 +msgid "Once Hourly" +msgstr "Une fois par heure" + +#: wp-includes/cron.php:298 +msgid "Twice Daily" +msgstr "Deux fois par jour" + +#: wp-includes/cron.php:299 +msgid "Once Daily" +msgstr "Une fois par jour" + +#: wp-includes/default-widgets.php:18 +msgid "Your blog’s WordPress Pages" +msgstr "Les pages statiques de votre blog WordPress" + +#: wp-includes/default-widgets.php:69 +msgid "Sort by:" +msgstr "Trier par :" + +#: wp-includes/default-widgets.php:71 +msgid "Page title" +msgstr "Titre de la page" + +#: wp-includes/default-widgets.php:72 +msgid "Page order" +msgstr "Ordre de la page" + +#: wp-includes/default-widgets.php:73 +msgid "Page ID" +msgstr "ID de la page" + +#: wp-includes/default-widgets.php:77 +msgid "Exclude:" +msgstr "Exclure :" + +#: wp-includes/default-widgets.php:79 +msgid "Page IDs, separated by commas." +msgstr "IDs de page, séparés par une virgule." + +#: wp-includes/default-widgets.php:94 +msgid "Your blogroll" +msgstr "Vos liens préférés" + +#: wp-includes/default-widgets.php:109 +#: wp-includes/default-widgets.php:144 +msgid "All Links" +msgstr "Tous les liens" + +#: wp-includes/default-widgets.php:142 +msgid "Select Link Category" +msgstr "Sélectionner la catégorie de liens" + +#: wp-includes/default-widgets.php:155 +msgid "Show Link Image" +msgstr "Afficher l’image du lien" + +#: wp-includes/default-widgets.php:157 +msgid "Show Link Name" +msgstr "Afficher le nom du lien" + +#: wp-includes/default-widgets.php:159 +msgid "Show Link Description" +msgstr "Afficher la description du lien" + +#: wp-includes/default-widgets.php:161 +msgid "Show Link Rating" +msgstr "Afficher la note du lien" + +#: wp-includes/default-widgets.php:175 +msgid "A search form for your blog" +msgstr "Un formulaire de recherche pour votre blog" + +#: wp-includes/default-widgets.php:218 +msgid "A monthly archive of your blog’s posts" +msgstr "Une archive mensuelle des articles de votre blog" + +#: wp-includes/default-widgets.php:234 +msgid "Select Month" +msgstr "Choisir un mois" + +#: wp-includes/default-widgets.php:265 +#: wp-includes/default-widgets.php:497 +msgid "Show post counts" +msgstr "Afficher le nombre d’articles" + +#: wp-includes/default-widgets.php:267 +msgid "Display as a drop down" +msgstr "Afficher en tant que menu descendant" + +#: wp-includes/default-widgets.php:283 +msgid "Log in/out, admin, feed and WordPress links" +msgstr "(Dé)connexion, administration, flux et autres liens internes à WordPress" + +#: wp-includes/default-widgets.php:284 +#: wp-includes/default-widgets.php:289 +msgid "Meta" +msgstr "Méta" + +#: wp-includes/default-widgets.php:298 +msgid "Syndicate this site using RSS 2.0" +msgstr "Suivez ce site par syndication RSS 2.0" + +#: wp-includes/default-widgets.php:298 +msgid "Entries RSS" +msgstr "Articles RSS" + +#: wp-includes/default-widgets.php:331 +msgid "A calendar of your blog’s posts" +msgstr "Un calendrier des articles de votre blog" + +#: wp-includes/default-widgets.php:332 +#: wp-includes/general-template.php:1026 +msgid "Calendar" +msgstr "Calendrier" + +#: wp-includes/default-widgets.php:372 +msgid "Arbitrary text or HTML" +msgstr "Texte ou code HTML arbitraire" + +#: wp-includes/default-widgets.php:374 +msgid "Text" +msgstr "Texte" + +#: wp-includes/default-widgets.php:409 +msgid "Automatically add paragraphs." +msgstr "Créer automatiquement les paragraphes." + +#: wp-includes/default-widgets.php:422 +msgid "A list or dropdown of categories" +msgstr "Une liste ou un menu déroulant des catégories" + +#: wp-includes/default-widgets.php:441 +msgid "Select Category" +msgstr "Choisir une catégorie" + +#: wp-includes/default-widgets.php:494 +msgid "Show as dropdown" +msgstr "Afficher en tant que liste déroulante" + +#: wp-includes/default-widgets.php:500 +msgid "Show hierarchy" +msgstr "Afficher la hiérarchie" + +#: wp-includes/default-widgets.php:514 +msgid "The most recent posts on your blog" +msgstr "Les articles les plus récents de votre blog" + +#: wp-includes/default-widgets.php:515 +#: wp-includes/default-widgets.php:537 +msgid "Recent Posts" +msgstr "Articles récents" + +#: wp-includes/default-widgets.php:589 +msgid "Number of posts to show:" +msgstr "Nombre d’articles à afficher :" + +#: wp-includes/default-widgets.php:591 +#: wp-includes/default-widgets.php:675 +msgid "(at most 15)" +msgstr "(15 au plus)" + +#: wp-includes/default-widgets.php:604 +msgid "The most recent comments" +msgstr "Les commentaires les plus récents" + +#. translators: comments widget: 1: comment author, 2: post link +#: wp-includes/default-widgets.php:647 +#, php-format +msgctxt "widgets" +msgid "%1$s on %2$s" +msgstr "%1$s dans %2$s" + +#: wp-includes/default-widgets.php:673 +msgid "Number of comments to show:" +msgstr "Nombre de commentaires à afficher :" + +#: wp-includes/default-widgets.php:688 +msgid "Entries from any RSS or Atom feed" +msgstr "Articles en provenance de n’importe quel flux RSS ou ATOM" + +#: wp-includes/default-widgets.php:728 +msgid "Syndicate this content" +msgstr "Suivez ce contenu par syndication RSS" + +#: wp-includes/default-widgets.php:789 +msgid "An error has occurred; the feed is probably down. Try again later." +msgstr "Une erreur est survenue ; le flux est probablement indisponible. Veuillez réessayer plus tard." + +#: wp-includes/default-widgets.php:801 +msgid "Untitled" +msgstr "Sans titre" + +#: wp-includes/default-widgets.php:875 +#, php-format +msgid "RSS Error: %s" +msgstr "Erreur RSS : %s" + +#: wp-includes/default-widgets.php:879 +msgid "Enter the RSS feed URL here:" +msgstr "Saisissez l’adresse web du flux RSS ici :" + +#: wp-includes/default-widgets.php:882 +msgid "Give the feed a title (optional):" +msgstr "Donnez un titre au flux (facultatif) :" + +#: wp-includes/default-widgets.php:885 +msgid "How many items would you like to display?" +msgstr "Combien d’entrées souhaitez-vous afficher ?" + +#: wp-includes/default-widgets.php:894 +msgid "Display item content?" +msgstr "Afficher le contenu de l’élément ?" + +#: wp-includes/default-widgets.php:897 +msgid "Display item author if available?" +msgstr "Afficher l’auteur de l’élément si disponible ?" + +#: wp-includes/default-widgets.php:900 +msgid "Display item date?" +msgstr "Afficher la date de l’élément ?" + +#: wp-includes/default-widgets.php:963 +msgid "Your most used tags in cloud format" +msgstr "Vos mots-clefs les plus utilisés, au format « nuage »" + +#: wp-includes/default-widgets.php:964 +msgid "Tag Cloud" +msgstr "Nuage de mots-clefs" + +#: wp-includes/deprecated.php:126 +msgid "new WordPress Loop" +msgstr "Nouvelle boucle WordPress" + +#: wp-includes/deprecated.php:1015 +msgid "Last updated" +msgstr "Mis à jour récemment" + +# Ne pas ajouter d'entités : utilisé par le flux RSS +#: wp-includes/feed-atom-comments.php:19 +#: wp-includes/feed-rss2-comments.php:22 +#, php-format +msgid "Comments on: %s" +msgstr "Commentaires sur : %s" + +#: wp-includes/feed-atom-comments.php:21 +#, php-format +msgid "Comments for %1$s searching on %2$s" +msgstr "Commentaires pour %1$s, recherche de %2$s" + +#: wp-includes/feed-atom-comments.php:23 +#: wp-includes/feed-rss2-comments.php:26 +#, php-format +msgid "Comments for %s" +msgstr "Commentaires pour %s" + +#: wp-includes/feed-atom-comments.php:54 +#: wp-includes/feed-rss2-comments.php:46 +#, php-format +msgid "Comment on %1$s by %2$s" +msgstr "Commentaires sur %1$s par %2$s" + +# Ne pas ajouter d'entités : utilisé par le flux RSS +#: wp-includes/feed-atom-comments.php:56 +#: wp-includes/feed-rss2-comments.php:48 +#, php-format +msgid "By: %s" +msgstr "Par : %s" + +#: wp-includes/feed-rss2-comments.php:24 +#, php-format +msgid "Comments for %s searching on %s" +msgstr "Commentaires pour %s, recherche de %s" + +# Ne pas ajouter d'entités : utilisé par le flux RSS +#: wp-includes/feed-rss2-comments.php:56 +msgid "Protected Comments: Please enter your password to view comments." +msgstr "Commentaires protégés : saisissez votre mot de passe pour accéder aux commentaires." + +#. translators: opening curly quote +#: wp-includes/formatting.php:37 +msgctxt "opening curly quote" +msgid "“" +msgstr "« " + +#. translators: closing curly quote +#: wp-includes/formatting.php:39 +msgctxt "closing curly quote" +msgid "”" +msgstr " »" + +#: wp-includes/formatting.php:1664 +#, php-format +msgid "%s min" +msgid_plural "%s mins" +msgstr[0] "%s minute" +msgstr[1] "%s minutes" + +#: wp-includes/formatting.php:1670 +#, php-format +msgid "%s hour" +msgid_plural "%s hours" +msgstr[0] "%s heure" +msgstr[1] "%s heures" + +#: wp-includes/formatting.php:1676 +#, php-format +msgid "%s day" +msgid_plural "%s days" +msgstr[0] "%s jour" +msgstr[1] "%s jours" + +#. translators: used between list items, there is a space after the coma +#: wp-includes/formatting.php:2550 +msgid ", " +msgstr ", " + +#. translators: used between list items, there is a space after the and +#: wp-includes/formatting.php:2552 +msgid ", and " +msgstr ", et " + +#. translators: used between only two list items, there is a space after the and +#: wp-includes/formatting.php:2554 +msgid " and " +msgstr " et " + +#: wp-includes/functions.php:385 +#, php-format +msgid "%s is a protected WP option and may not be modified" +msgstr "%s est une option protégée de WordPress, et ne peut être modifiée" + +#: wp-includes/functions.php:1665 +#, php-format +msgid "ERROR: %s is not a valid feed template" +msgstr "ERREUR : %s n’est pas un modèle pour flux valide" + +#: wp-includes/functions.php:2072 +#: wp-includes/functions.php:2169 +#, php-format +msgid "Unable to create directory %s. Is its parent directory writable by the server?" +msgstr "Impossible de créer le dossier %s. Son dossier parent est-il accessible en écriture par le serveur ?" + +#: wp-includes/functions.php:2154 +msgid "Empty filename" +msgstr "Pas de nom de fichier" + +#: wp-includes/functions.php:2175 +#, php-format +msgid "Could not write file %s" +msgstr "Impossible d’écrire le fichier %s" + +#: wp-includes/functions.php:2323 +#, php-format +msgid "Your attempt to edit this attachment: “%s” has failed." +msgstr "Votre tentative de modification le fichier joint « %s » a échoué." + +#: wp-includes/functions.php:2325 +msgid "Your attempt to add this category has failed." +msgstr "Votre tentative d’ajout de la catégorie a échoué." + +#: wp-includes/functions.php:2326 +#, php-format +msgid "Your attempt to delete this category: “%s” has failed." +msgstr "Votre tentative de suppression de la catégorie « %s » a échoué." + +#: wp-includes/functions.php:2327 +#, php-format +msgid "Your attempt to edit this category: “%s” has failed." +msgstr "Votre tentative de modification de la catégorie « %s » a échoué." + +#: wp-includes/functions.php:2329 +#, php-format +msgid "Your attempt to delete this comment: “%s” has failed." +msgstr "Votre tentative de suppression du commentaire « %s » a échoué." + +#: wp-includes/functions.php:2330 +#, php-format +msgid "Your attempt to unapprove this comment: “%s” has failed." +msgstr "Votre tentative de désapprouvation du commentaire « %s » a échoué." + +#: wp-includes/functions.php:2331 +#, php-format +msgid "Your attempt to approve this comment: “%s” has failed." +msgstr "Votre tentative d’approbation du commentaire « %s » a échoué." + +#: wp-includes/functions.php:2332 +#, php-format +msgid "Your attempt to edit this comment: “%s” has failed." +msgstr "Votre tentative de modification du commentaire « %s » a échoué." + +#: wp-includes/functions.php:2333 +msgid "Your attempt to bulk modify comments has failed." +msgstr "Votre tentative de modification des commentaires a échoué." + +#: wp-includes/functions.php:2334 +msgid "Your attempt to moderate comments has failed." +msgstr "Votre tentative de modération des commentaires a échoué." + +#: wp-includes/functions.php:2336 +msgid "Your attempt to add this link has failed." +msgstr "Votre tentative pour ajouter ce lien a échoué." + +#: wp-includes/functions.php:2337 +#, php-format +msgid "Your attempt to delete this link: “%s” has failed." +msgstr "Votre tentative de suppression du lien « %s » a échoué." + +#: wp-includes/functions.php:2338 +#, php-format +msgid "Your attempt to edit this link: “%s” has failed." +msgstr "Votre tentative de modification du lien « %s » a échoué." + +#: wp-includes/functions.php:2339 +msgid "Your attempt to bulk modify links has failed." +msgstr "Votre tentative de modification des liens a échoué." + +#: wp-includes/functions.php:2341 +msgid "Your attempt to add this page has failed." +msgstr "Votre tentative pour ajouter cette page a échoué." + +#: wp-includes/functions.php:2342 +#, php-format +msgid "Your attempt to delete this page: “%s” has failed." +msgstr "Votre tentative de suppression de la page « %s » a échoué." + +#: wp-includes/functions.php:2343 +#, php-format +msgid "Your attempt to edit this page: “%s” has failed." +msgstr "Votre tentative de modification de la page « %s » a échoué." + +#: wp-includes/functions.php:2345 +#, php-format +msgid "Your attempt to edit this plugin file: “%s” has failed." +msgstr "Votre tentative de modification du fichier de l’extension « %s » a échoué." + +#: wp-includes/functions.php:2346 +#, php-format +msgid "Your attempt to activate this plugin: “%s” has failed." +msgstr "Votre tentative de modification d’activation de l’extension « %s » a échoué." + +#: wp-includes/functions.php:2347 +#, php-format +msgid "Your attempt to deactivate this plugin: “%s” has failed." +msgstr "Votre tentative de modification de désactivation de l’extension « %s » a échoué." + +#: wp-includes/functions.php:2348 +#, php-format +msgid "Your attempt to upgrade this plugin: “%s” has failed." +msgstr "Votre tentative de mise à jour de l’extension « %s » a échoué." + +#: wp-includes/functions.php:2350 +msgid "Your attempt to add this post has failed." +msgstr "Votre tentative d’ajout d’un article a échoué." + +#: wp-includes/functions.php:2351 +#, php-format +msgid "Your attempt to delete this post: “%s” has failed." +msgstr "Votre tentative de suppression de l’article « %s » a échoué." + +#: wp-includes/functions.php:2352 +#, php-format +msgid "Your attempt to edit this post: “%s” has failed." +msgstr "Votre tentative de modification de l’article « %s » a échoué." + +#: wp-includes/functions.php:2354 +msgid "Your attempt to add this user has failed." +msgstr "Votre tentative pour ajouter cet utilisateur a échoué." + +#: wp-includes/functions.php:2355 +msgid "Your attempt to delete users has failed." +msgstr "Votre tentative de suppression des utilisateurs a échoué." + +#: wp-includes/functions.php:2356 +msgid "Your attempt to bulk modify users has failed." +msgstr "Votre tentative de modifications des utilisateurs a échoué." + +#: wp-includes/functions.php:2357 +#, php-format +msgid "Your attempt to edit this user: “%s” has failed." +msgstr "Votre tentative de modification de l’utilisateur « %s » a échoué." + +#: wp-includes/functions.php:2358 +#, php-format +msgid "Your attempt to modify the profile for: “%s” has failed." +msgstr "Votre tentative de modification du profile de « %s » a échoué." + +#: wp-includes/functions.php:2360 +msgid "Your attempt to edit your settings has failed." +msgstr "Votre tentative de modification de vos réglages a échoué." + +#: wp-includes/functions.php:2361 +#, php-format +msgid "Your attempt to change your permalink structure to: %s has failed." +msgstr "Votre tentative de modification de la structure des permaliens en %s a échoué." + +#: wp-includes/functions.php:2362 +#, php-format +msgid "Your attempt to edit this file: “%s” has failed." +msgstr "Votre tentative d’édition du fichier « %s » a échoué." + +#: wp-includes/functions.php:2363 +#, php-format +msgid "Your attempt to edit this theme file: “%s” has failed." +msgstr "Votre tentative de modification du fichier du thème « %s » a échoué." + +#: wp-includes/functions.php:2364 +#, php-format +msgid "Your attempt to switch to this theme: “%s” has failed." +msgstr "Votre tentative de modification du thème « %s » a échoué." + +#: wp-includes/functions.php:2366 +#, php-format +msgid "You are attempting to log out of %s" +msgstr "Vous êtes en train de vous déconnecter de %s." + +#: wp-includes/functions.php:2386 +#: wp-includes/functions.php:2388 +msgid "Are you sure you want to do this?" +msgstr "Êtes-vous certain(e) de vouloir faire cela ?" + +#: wp-includes/functions.php:2405 +msgid "WordPress Failure Notice" +msgstr "Avertissement d’échec de WordPress" + +#: wp-includes/functions.php:2408 +msgid "Please try again." +msgstr "Merci de réessayer." + +#: wp-includes/functions.php:2410 +#, php-format +msgid "Do you really want to log out?" +msgstr "Voulez-vous réellement vous déconnecter ?" + +#: wp-includes/functions.php:2461 +msgid "« Back" +msgstr "« Retour" + +#. #-#-#-#-# wordpress.pot (PACKAGE VERSION) #-#-#-#-# +#. Not gettexted string WP_I18N_ERROR_TITLE +#: wp-includes/functions.php:2482 +#: wp-load.php:50 +msgid "WordPress › Error" +msgstr "WordPress » Erreur" + +#: wp-includes/functions.php:2918 +#: wp-includes/functions.php:2955 +#, php-format +msgid "%1$s is deprecated since version %2$s! Use %3$s instead." +msgstr "%1$s est déprécié depuis la version %2$s! Utilisez %3$s à la place." + +#: wp-includes/functions.php:2920 +#: wp-includes/functions.php:2957 +#, php-format +msgid "%1$s is deprecated since version %2$s with no alternative available." +msgstr "%1$s est déprécié depuis la version %2$s, aucune alternative n’est disponible." + +#: wp-includes/functions.php:3275 +msgid "Select a city" +msgstr "Sélectionnez une ville" + +#: wp-includes/functions.php:3290 +msgid "Manual offsets" +msgstr "Décallages manuels" + +#: wp-includes/general-template.php:125 +msgid "Search for:" +msgstr "Recherche pour:" + +#: wp-includes/general-template.php:147 +#: wp-login.php:355 +#: wp-login.php:358 +#: wp-login.php:427 +msgid "Log in" +msgstr "Connexion" + +#: wp-includes/general-template.php:149 +msgid "Log out" +msgstr "Déconnexion" + +#: wp-includes/general-template.php:236 +#: wp-login.php:356 +#: wp-login.php:423 +#: wp-login.php:527 +msgid "Register" +msgstr "Inscription" + +#: wp-includes/general-template.php:240 +msgid "Site Admin" +msgstr "Admin. du Site" + +#. translators: 1: separator, 2: search phrase +#: wp-includes/general-template.php:500 +#, php-format +msgid "Search Results %1$s %2$s" +msgstr "Résultats de recherche %1$s %2$s" + +#: wp-includes/general-template.php:504 +msgid "Page not found" +msgstr "Page non trouvée" + +# %1$s : le mois +# %2$d : l'année +#: wp-includes/general-template.php:820 +#, php-format +msgid "%1$s %2$d" +msgstr "%1$s %2$d" + +#. translators: Calendar caption: 1: month name, 2: 4-digit year +#: wp-includes/general-template.php:1025 +#, php-format +msgctxt "calendar caption" +msgid "%1$s %2$s" +msgstr "%1$s %2$s" + +#: wp-includes/general-template.php:1052 +#: wp-includes/general-template.php:1062 +#, php-format +msgid "View posts for %1$s %2$s" +msgstr "Voir les articles pour %1$s %2$s" + +#. translators: Separator between blog name and feed type in feed links +#: wp-includes/general-template.php:1458 +#: wp-includes/general-template.php:1481 +msgctxt "feed link" +msgid "»" +msgstr "»" + +#. translators: 1: blog title, 2: separator (raquo) +#: wp-includes/general-template.php:1460 +#, php-format +msgid "%1$s %2$s Feed" +msgstr "%1$s %2$s Flux" + +#. translators: %s: blog title, 2: separator (raquo) +#: wp-includes/general-template.php:1462 +#, php-format +msgid "%1$s %2$s Comments Feed" +msgstr "%1$s %2$s Flux des commentaires" + +#. translators: 1: blog name, 2: separator(raquo), 3: post title +#: wp-includes/general-template.php:1483 +#, php-format +msgid "%1$s %2$s %3$s Comments Feed" +msgstr "%1$s %2$s %3$s Flux des commentaires" + +#. translators: 1: blog name, 2: separator(raquo), 3: category name +#: wp-includes/general-template.php:1485 +#, php-format +msgid "%1$s %2$s %3$s Category Feed" +msgstr "%1$s %2$s Flux de la catégorie %3$s" + +#. translators: 1: blog name, 2: separator(raquo), 3: tag name +#: wp-includes/general-template.php:1487 +#, php-format +msgid "%1$s %2$s %3$s Tag Feed" +msgstr "%1$s %2$s Flux du mot clef %3$s" + +#. translators: 1: blog name, 2: separator(raquo), 3: author name +#: wp-includes/general-template.php:1489 +#, php-format +msgid "%1$s %2$s Posts by %3$s Feed" +msgstr "%1$s %2$s Flux des articles écrits par %3$s" + +#. translators: 1: blog name, 2: separator(raquo), 3: search phrase +#: wp-includes/general-template.php:1491 +#, php-format +msgid "%1$s %2$s Search Results for “%3$s” Feed" +msgstr "%1$s %2$s Flux de résultats de la recherche pour "%3$s"" + +#: wp-includes/general-template.php:1807 +msgid "« Previous" +msgstr "« Précédent" + +#: wp-includes/general-template.php:1808 +msgid "Next »" +msgstr "Suivant »" + +#: wp-includes/http.php:242 +msgid "User has blocked requests through HTTP." +msgstr "L'utilisateur a bloqué les requêtes HTTP." + +#: wp-includes/http.php:723 +#: wp-includes/http.php:1341 +msgid "Too many redirects." +msgstr "Trop de redirections." + +#: wp-includes/http.php:803 +#: wp-includes/http.php:930 +#, php-format +msgid "Malformed URL: %s" +msgstr "Adresse web malformée : %s" + +#: wp-includes/http.php:814 +#: wp-includes/http.php:987 +#, php-format +msgid "Could not open handle for fopen() to %s" +msgstr "Impossible d’ouvrir le gestionniaire de fopen() pour %s" + +#: wp-includes/js/tinymce/langs/wp-langs.php:26 +msgid "Do you want to use the WYSIWYG mode for this textarea?" +msgstr "Voulez-vous utiliser le mode WYSIWYG pour ce champ textuel ?" + +#: wp-includes/js/tinymce/langs/wp-langs.php:28 +msgid "Insert" +msgstr "Insérer" + +#: wp-includes/js/tinymce/langs/wp-langs.php:32 +msgid "Browse" +msgstr "Parcourir" + +#: wp-includes/js/tinymce/langs/wp-langs.php:33 +#: wp-includes/js/tinymce/langs/wp-langs.php:313 +msgid "Class" +msgstr "Classe" + +#: wp-includes/js/tinymce/langs/wp-langs.php:34 +msgid "-- Not set --" +msgstr "-- Pas réglé --" + +#: wp-includes/js/tinymce/langs/wp-langs.php:35 +#: wp-includes/js/tinymce/langs/wp-langs.php:240 +msgid "Copy/Cut/Paste is not available in Mozilla and Firefox." +msgstr "Le Copier/Couper/Coller n’est pas disponible dans Mozilla ni Firefox." + +#: wp-includes/js/tinymce/langs/wp-langs.php:36 +msgid "Currently not supported by your browser, use keyboard shortcuts instead." +msgstr "Actuellement pas reconnu par votre navigateur ; utiliser les raccourcis-clavier à la place." + +#: wp-includes/js/tinymce/langs/wp-langs.php:37 +msgid "Sorry, but we have noticed that your popup-blocker has disabled a window that provides application functionality. You will need to disable popup blocking on this site in order to fully utilize this tool." +msgstr "Désolé, mais nous avons remarqué que votre bloqueur de fenêtres pop-up a annulé la fenêtre qui apporte certaines fonctionnalités. Vous devrez annuler le blocage de popup pour ce site si vous souhaitez utiliser toutes les fonctions de cet outil." + +#: wp-includes/js/tinymce/langs/wp-langs.php:38 +msgid "Error: Invalid values entered, these are marked in red." +msgstr "Erreur : certaines valeurs entrées ne sont pas valides. Elles sont indiquées en rouge." + +#: wp-includes/js/tinymce/langs/wp-langs.php:39 +#: wp-includes/js/tinymce/langs/wp-langs.php:244 +msgid "More colors" +msgstr "Plus de couleurs" + +#: wp-includes/js/tinymce/langs/wp-langs.php:46 +msgid "Full" +msgstr "Complet" + +#: wp-includes/js/tinymce/langs/wp-langs.php:49 +msgid "%Y-%m-%d" +msgstr "%Y-%m-%d" + +#: wp-includes/js/tinymce/langs/wp-langs.php:50 +msgid "%H:%M:%S" +msgstr "%H h %M min %S s" + +#: wp-includes/js/tinymce/langs/wp-langs.php:51 +msgid "Insert date" +msgstr "Insérer la date" + +#: wp-includes/js/tinymce/langs/wp-langs.php:52 +msgid "Insert time" +msgstr "Insérer l’heure" + +#: wp-includes/js/tinymce/langs/wp-langs.php:53 +#: wp-includes/locale.php:140 +#: wp-includes/locale.php:155 +msgid "January" +msgstr "janvier" + +#: wp-includes/js/tinymce/langs/wp-langs.php:53 +#: wp-includes/locale.php:141 +#: wp-includes/locale.php:156 +msgid "February" +msgstr "février" + +#: wp-includes/js/tinymce/langs/wp-langs.php:53 +#: wp-includes/locale.php:142 +#: wp-includes/locale.php:157 +msgid "March" +msgstr "mars" + +#: wp-includes/js/tinymce/langs/wp-langs.php:53 +#: wp-includes/locale.php:143 +#: wp-includes/locale.php:158 +msgid "April" +msgstr "avril" + +#: wp-includes/js/tinymce/langs/wp-langs.php:53 +#: wp-includes/locale.php:144 +#: wp-includes/locale.php:159 +msgid "May" +msgstr "mai" + +#: wp-includes/js/tinymce/langs/wp-langs.php:53 +#: wp-includes/locale.php:145 +#: wp-includes/locale.php:160 +msgid "June" +msgstr "juin" + +#: wp-includes/js/tinymce/langs/wp-langs.php:53 +#: wp-includes/locale.php:146 +#: wp-includes/locale.php:161 +msgid "July" +msgstr "juillet" + +#: wp-includes/js/tinymce/langs/wp-langs.php:53 +#: wp-includes/locale.php:147 +#: wp-includes/locale.php:162 +msgid "August" +msgstr "août" + +#: wp-includes/js/tinymce/langs/wp-langs.php:53 +#: wp-includes/locale.php:148 +#: wp-includes/locale.php:163 +msgid "September" +msgstr "septembre" + +#: wp-includes/js/tinymce/langs/wp-langs.php:53 +#: wp-includes/locale.php:149 +#: wp-includes/locale.php:164 +msgid "October" +msgstr "octobre" + +#: wp-includes/js/tinymce/langs/wp-langs.php:53 +#: wp-includes/locale.php:150 +#: wp-includes/locale.php:165 +msgid "November" +msgstr "novembre" + +#: wp-includes/js/tinymce/langs/wp-langs.php:53 +#: wp-includes/locale.php:151 +#: wp-includes/locale.php:166 +msgid "December" +msgstr "décembre" + +#: wp-includes/js/tinymce/langs/wp-langs.php:54 +#: wp-includes/locale.php:155 +msgid "Jan_January_abbreviation" +msgstr "jan" + +#: wp-includes/js/tinymce/langs/wp-langs.php:54 +#: wp-includes/locale.php:156 +msgid "Feb_February_abbreviation" +msgstr "fév" + +#: wp-includes/js/tinymce/langs/wp-langs.php:54 +#: wp-includes/locale.php:157 +msgid "Mar_March_abbreviation" +msgstr "mar" + +#: wp-includes/js/tinymce/langs/wp-langs.php:54 +#: wp-includes/locale.php:158 +msgid "Apr_April_abbreviation" +msgstr "avr" + +#: wp-includes/js/tinymce/langs/wp-langs.php:54 +#: wp-includes/locale.php:159 +msgid "May_May_abbreviation" +msgstr "mai" + +#: wp-includes/js/tinymce/langs/wp-langs.php:54 +#: wp-includes/locale.php:160 +msgid "Jun_June_abbreviation" +msgstr "juin" + +#: wp-includes/js/tinymce/langs/wp-langs.php:54 +#: wp-includes/locale.php:161 +msgid "Jul_July_abbreviation" +msgstr "juil" + +#: wp-includes/js/tinymce/langs/wp-langs.php:54 +#: wp-includes/locale.php:162 +msgid "Aug_August_abbreviation" +msgstr "août" + +#: wp-includes/js/tinymce/langs/wp-langs.php:54 +#: wp-includes/locale.php:163 +msgid "Sep_September_abbreviation" +msgstr "sept" + +#: wp-includes/js/tinymce/langs/wp-langs.php:54 +#: wp-includes/locale.php:164 +msgid "Oct_October_abbreviation" +msgstr "oct" + +#: wp-includes/js/tinymce/langs/wp-langs.php:54 +#: wp-includes/locale.php:165 +msgid "Nov_November_abbreviation" +msgstr "nov" + +#: wp-includes/js/tinymce/langs/wp-langs.php:54 +#: wp-includes/locale.php:166 +msgid "Dec_December_abbreviation" +msgstr "déc" + +#: wp-includes/js/tinymce/langs/wp-langs.php:55 +#: wp-includes/locale.php:108 +#: wp-includes/locale.php:118 +#: wp-includes/locale.php:131 +msgid "Sunday" +msgstr "Dimanche" + +#: wp-includes/js/tinymce/langs/wp-langs.php:55 +#: wp-includes/locale.php:109 +#: wp-includes/locale.php:119 +#: wp-includes/locale.php:132 +msgid "Monday" +msgstr "Lundi" + +#: wp-includes/js/tinymce/langs/wp-langs.php:55 +#: wp-includes/locale.php:110 +#: wp-includes/locale.php:120 +#: wp-includes/locale.php:133 +msgid "Tuesday" +msgstr "Mardi" + +#: wp-includes/js/tinymce/langs/wp-langs.php:55 +#: wp-includes/locale.php:111 +#: wp-includes/locale.php:121 +#: wp-includes/locale.php:134 +msgid "Wednesday" +msgstr "Mercredi" + +#: wp-includes/js/tinymce/langs/wp-langs.php:55 +#: wp-includes/locale.php:112 +#: wp-includes/locale.php:122 +#: wp-includes/locale.php:135 +msgid "Thursday" +msgstr "Jeudi" + +#: wp-includes/js/tinymce/langs/wp-langs.php:55 +#: wp-includes/locale.php:113 +#: wp-includes/locale.php:123 +#: wp-includes/locale.php:136 +msgid "Friday" +msgstr "Vendredi" + +#: wp-includes/js/tinymce/langs/wp-langs.php:55 +#: wp-includes/locale.php:114 +#: wp-includes/locale.php:124 +#: wp-includes/locale.php:137 +msgid "Saturday" +msgstr "Samedi" + +#: wp-includes/js/tinymce/langs/wp-langs.php:56 +#: wp-includes/locale.php:131 +msgid "Sun" +msgstr "dim" + +#: wp-includes/js/tinymce/langs/wp-langs.php:56 +#: wp-includes/locale.php:132 +msgid "Mon" +msgstr "lun" + +#: wp-includes/js/tinymce/langs/wp-langs.php:56 +#: wp-includes/locale.php:133 +msgid "Tue" +msgstr "mar" + +#: wp-includes/js/tinymce/langs/wp-langs.php:56 +#: wp-includes/locale.php:134 +msgid "Wed" +msgstr "mer" + +#: wp-includes/js/tinymce/langs/wp-langs.php:56 +#: wp-includes/locale.php:135 +msgid "Thu" +msgstr "jeu" + +#: wp-includes/js/tinymce/langs/wp-langs.php:56 +#: wp-includes/locale.php:136 +msgid "Fri" +msgstr "ven" + +#: wp-includes/js/tinymce/langs/wp-langs.php:56 +#: wp-includes/locale.php:137 +msgid "Sat" +msgstr "sam" + +#: wp-includes/js/tinymce/langs/wp-langs.php:59 +msgid "Print" +msgstr "Imprimer" + +#: wp-includes/js/tinymce/langs/wp-langs.php:65 +msgid "Direction left to right" +msgstr "Direction de gauche à droite" + +#: wp-includes/js/tinymce/langs/wp-langs.php:66 +msgid "Direction right to left" +msgstr "Direction de droite à gauche" + +#: wp-includes/js/tinymce/langs/wp-langs.php:69 +msgid "Insert new layer" +msgstr "Insérer un nouveau calque" + +#: wp-includes/js/tinymce/langs/wp-langs.php:70 +msgid "Move forward" +msgstr "Avancer" + +#: wp-includes/js/tinymce/langs/wp-langs.php:71 +msgid "Move backward" +msgstr "Reculer" + +#: wp-includes/js/tinymce/langs/wp-langs.php:72 +msgid "Toggle absolute positioning" +msgstr "Modifier le positionnement absolu" + +#: wp-includes/js/tinymce/langs/wp-langs.php:73 +msgid "New layer..." +msgstr "Nouvelle couche…" + +#: wp-includes/js/tinymce/langs/wp-langs.php:77 +msgid "Cancel all changes" +msgstr "Annuler toutes les modifications" + +#: wp-includes/js/tinymce/langs/wp-langs.php:80 +msgid "Insert non-breaking space character" +msgstr "Insérer un espace insécable" + +#: wp-includes/js/tinymce/langs/wp-langs.php:83 +msgid "Run spell checking" +msgstr "Lancer le correcteur d’orthographe" + +#: wp-includes/js/tinymce/langs/wp-langs.php:84 +msgid "ieSpell not detected. Do you want to install it now?" +msgstr "ieSpell n’a pas été détecté. Voulez-vous l’installer maintenant ?" + +#: wp-includes/js/tinymce/langs/wp-langs.php:87 +msgid "Horizontale rule" +msgstr "Règle horizontale" + +#: wp-includes/js/tinymce/langs/wp-langs.php:90 +msgid "Emotions" +msgstr "Émotions" + +#: wp-includes/js/tinymce/langs/wp-langs.php:93 +msgid "Find" +msgstr "Chercher" + +#: wp-includes/js/tinymce/langs/wp-langs.php:94 +msgid "Find/Replace" +msgstr "Chercher/Remplacer" + +#: wp-includes/js/tinymce/langs/wp-langs.php:97 +#: wp-includes/js/tinymce/langs/wp-langs.php:219 +#: wp-includes/js/tinymce/langs/wp-langs.php:273 +msgid "Insert/edit image" +msgstr "Insérer/modifier une image" + +#: wp-includes/js/tinymce/langs/wp-langs.php:100 +#: wp-includes/js/tinymce/langs/wp-langs.php:215 +#: wp-includes/js/tinymce/langs/wp-langs.php:290 +msgid "Insert/edit link" +msgstr "Insérer/modifier un lien" + +#: wp-includes/js/tinymce/langs/wp-langs.php:103 +msgid "Citation" +msgstr "Citation" + +#: wp-includes/js/tinymce/langs/wp-langs.php:104 +msgid "Abbreviation" +msgstr "Abréviation" + +#: wp-includes/js/tinymce/langs/wp-langs.php:105 +msgid "Acronym" +msgstr "Acronyme" + +#: wp-includes/js/tinymce/langs/wp-langs.php:106 +msgid "Deletion" +msgstr "Coupure" + +#: wp-includes/js/tinymce/langs/wp-langs.php:107 +msgid "Insertion" +msgstr "Insertion" + +#: wp-includes/js/tinymce/langs/wp-langs.php:108 +msgid "Insert/Edit Attributes" +msgstr "Insérer/modider des attributs" + +#: wp-includes/js/tinymce/langs/wp-langs.php:111 +msgid "Edit CSS Style" +msgstr "Modifier le style CSS" + +#: wp-includes/js/tinymce/langs/wp-langs.php:114 +msgid "Paste as Plain Text" +msgstr "Coller du texte simple" + +#: wp-includes/js/tinymce/langs/wp-langs.php:115 +msgid "Paste from Word" +msgstr "Coller du texte Word" + +#: wp-includes/js/tinymce/langs/wp-langs.php:116 +msgid "Select All" +msgstr "Sélectionner tout" + +#: wp-includes/js/tinymce/langs/wp-langs.php:119 +#: wp-includes/js/tinymce/langs/wp-langs.php:121 +msgid "Use CTRL+V on your keyboard to paste the text into the window." +msgstr "Utilisez Ctrl-V sur votre clavier pour coller le texte dans la fenêtre." + +#: wp-includes/js/tinymce/langs/wp-langs.php:120 +msgid "Keep linebreaks" +msgstr "Conserver les sauts de ligne" + +#: wp-includes/js/tinymce/langs/wp-langs.php:124 +msgid "Inserts a new table" +msgstr "Insérer une nouvelle table" + +#: wp-includes/js/tinymce/langs/wp-langs.php:125 +msgid "Insert row before" +msgstr "Insérer une ligne avant" + +#: wp-includes/js/tinymce/langs/wp-langs.php:126 +msgid "Insert row after" +msgstr "Insérer une ligne après" + +#: wp-includes/js/tinymce/langs/wp-langs.php:127 +msgid "Delete row" +msgstr "Supprimer la ligne" + +#: wp-includes/js/tinymce/langs/wp-langs.php:128 +msgid "Insert column before" +msgstr "Insérer une colonne avant" + +#: wp-includes/js/tinymce/langs/wp-langs.php:129 +msgid "Insert column after" +msgstr "Insérer une colonne après" + +#: wp-includes/js/tinymce/langs/wp-langs.php:130 +msgid "Remove column" +msgstr "Enlever la colonne" + +#: wp-includes/js/tinymce/langs/wp-langs.php:131 +msgid "Split merged table cells" +msgstr "Scinder les cellules fusionnées du tableau" + +#: wp-includes/js/tinymce/langs/wp-langs.php:132 +msgid "Merge table cells" +msgstr "Fusionner les cellules du tableau" + +#: wp-includes/js/tinymce/langs/wp-langs.php:133 +msgid "Table row properties" +msgstr "Propriétés de la ligne du tableau" + +#: wp-includes/js/tinymce/langs/wp-langs.php:134 +msgid "Table cell properties" +msgstr "Propriétés de la cellule du tableau" + +#: wp-includes/js/tinymce/langs/wp-langs.php:135 +msgid "Table properties" +msgstr "Propriétés du tableau" + +#: wp-includes/js/tinymce/langs/wp-langs.php:136 +msgid "Paste table row before" +msgstr "Coller la ligne du tableau avant" + +#: wp-includes/js/tinymce/langs/wp-langs.php:137 +msgid "Paste table row after" +msgstr "Coller la ligne du tableau après" + +#: wp-includes/js/tinymce/langs/wp-langs.php:138 +msgid "Cut table row" +msgstr "Couper la ligne du tableau" + +#: wp-includes/js/tinymce/langs/wp-langs.php:139 +msgid "Copy table row" +msgstr "Copier la ligne du tableau" + +#: wp-includes/js/tinymce/langs/wp-langs.php:140 +msgid "Delete table" +msgstr "Supprimer le tableau" + +#: wp-includes/js/tinymce/langs/wp-langs.php:141 +msgid "Row" +msgstr "Ligne" + +#: wp-includes/js/tinymce/langs/wp-langs.php:142 +msgid "Column" +msgstr "Colonne" + +#: wp-includes/js/tinymce/langs/wp-langs.php:143 +msgid "Cell" +msgstr "Cellule" + +#: wp-includes/js/tinymce/langs/wp-langs.php:146 +#: wp-includes/script-loader.php:499 +msgid "The changes you made will be lost if you navigate away from this page." +msgstr "Les modifications que vous avez faites seront perdues si vous changez de page." + +#: wp-includes/js/tinymce/langs/wp-langs.php:149 +msgid "Toggle fullscreen mode" +msgstr "Mode plein écran" + +#: wp-includes/js/tinymce/langs/wp-langs.php:152 +#: wp-includes/js/tinymce/langs/wp-langs.php:302 +msgid "Insert / edit embedded media" +msgstr "Insérer / modifier un élément multimédia intégré" + +#. translators: Extra width for the media popup in pixels +#: wp-includes/js/tinymce/langs/wp-langs.php:153 +msgctxt "media popup width" +msgid "0" +msgstr "0" + +#. translators: Extra height for the media popup in pixels +#: wp-includes/js/tinymce/langs/wp-langs.php:154 +msgctxt "media popup height" +msgid "0" +msgstr "0" + +#: wp-includes/js/tinymce/langs/wp-langs.php:155 +msgid "Edit embedded media" +msgstr "Modifier un élément multimédia intégré" + +#: wp-includes/js/tinymce/langs/wp-langs.php:158 +msgid "Document properties" +msgstr "Propriétés du document" + +#: wp-includes/js/tinymce/langs/wp-langs.php:161 +msgid "Insert predefined template content" +msgstr "Insérer le contenu d’un modèle prédéfini" + +#: wp-includes/js/tinymce/langs/wp-langs.php:164 +msgid "Visual control characters on/off." +msgstr "Activer les caractères de mise en page." + +#: wp-includes/js/tinymce/langs/wp-langs.php:167 +msgid "Toggle spellchecker" +msgstr "Correcteur d’orthographe" + +#: wp-includes/js/tinymce/langs/wp-langs.php:168 +msgid "Spellchecker settings" +msgstr "Réglages du correcteur d’orthographe" + +#: wp-includes/js/tinymce/langs/wp-langs.php:169 +msgid "Ignore word" +msgstr "Ignorer le mot" + +#: wp-includes/js/tinymce/langs/wp-langs.php:170 +msgid "Ignore all" +msgstr "Ignorer tout" + +#: wp-includes/js/tinymce/langs/wp-langs.php:171 +msgid "Languages" +msgstr "Langues" + +#: wp-includes/js/tinymce/langs/wp-langs.php:172 +msgid "Please wait..." +msgstr "Veuillez patienter…" + +#: wp-includes/js/tinymce/langs/wp-langs.php:173 +msgid "Suggestions" +msgstr "Suggestions" + +#: wp-includes/js/tinymce/langs/wp-langs.php:174 +msgid "No suggestions" +msgstr "Aucune suggestion" + +#: wp-includes/js/tinymce/langs/wp-langs.php:175 +msgid "No misspellings found." +msgstr "Aucune erreur trouvée." + +#: wp-includes/js/tinymce/langs/wp-langs.php:178 +msgid "Insert page break." +msgstr "Insérer un saut de page." + +#. translators: TinyMCE font styles +#: wp-includes/js/tinymce/langs/wp-langs.php:182 +msgctxt "TinyMCE font styles" +msgid "Styles" +msgstr "Styles" + +#: wp-includes/js/tinymce/langs/wp-langs.php:183 +msgid "Font size" +msgstr "Taille de police" + +#: wp-includes/js/tinymce/langs/wp-langs.php:184 +msgid "Font family" +msgstr "Famille des police" + +#: wp-includes/js/tinymce/langs/wp-langs.php:185 +msgid "Format" +msgstr "Format" + +#: wp-includes/js/tinymce/langs/wp-langs.php:186 +msgid "Paragraph" +msgstr "Paragraphe" + +#: wp-includes/js/tinymce/langs/wp-langs.php:187 +msgid "Div" +msgstr "Div" + +#: wp-includes/js/tinymce/langs/wp-langs.php:188 +#: wp-includes/js/tinymce/wp-mce-help.php:216 +msgid "Address" +msgstr "Adresse" + +#: wp-includes/js/tinymce/langs/wp-langs.php:189 +msgid "Preformatted" +msgstr "Préformatté" + +#: wp-includes/js/tinymce/langs/wp-langs.php:190 +msgid "Heading 1" +msgstr "Titre 1" + +#: wp-includes/js/tinymce/langs/wp-langs.php:191 +msgid "Heading 2" +msgstr "Titre 2" + +#: wp-includes/js/tinymce/langs/wp-langs.php:192 +msgid "Heading 3" +msgstr "Titre 3" + +#: wp-includes/js/tinymce/langs/wp-langs.php:193 +msgid "Heading 4" +msgstr "Titre 4" + +#: wp-includes/js/tinymce/langs/wp-langs.php:194 +msgid "Heading 5" +msgstr "Titre 5" + +#: wp-includes/js/tinymce/langs/wp-langs.php:195 +msgid "Heading 6" +msgstr "Titre 6" + +#: wp-includes/js/tinymce/langs/wp-langs.php:196 +#: wp-includes/js/tinymce/langs/wp-langs.php:239 +msgid "Blockquote" +msgstr "Bloc de citation" + +#: wp-includes/js/tinymce/langs/wp-langs.php:197 +msgid "Code" +msgstr "Code" + +#: wp-includes/js/tinymce/langs/wp-langs.php:198 +msgid "Code sample" +msgstr "Exemple de code" + +#: wp-includes/js/tinymce/langs/wp-langs.php:199 +msgid "Definition term " +msgstr "Terme de définition" + +#: wp-includes/js/tinymce/langs/wp-langs.php:200 +msgid "Definition description" +msgstr "Description de la définition" + +#: wp-includes/js/tinymce/langs/wp-langs.php:201 +#: wp-includes/js/tinymce/wp-mce-help.php:212 +#: wp-includes/js/tinymce/wp-mce-help.php:225 +msgid "Bold" +msgstr "Gras" + +#: wp-includes/js/tinymce/langs/wp-langs.php:202 +#: wp-includes/js/tinymce/wp-mce-help.php:212 +#: wp-includes/js/tinymce/wp-mce-help.php:225 +msgid "Italic" +msgstr "Italique" + +#: wp-includes/js/tinymce/langs/wp-langs.php:203 +#: wp-includes/js/tinymce/wp-mce-help.php:213 +msgid "Underline" +msgstr "Souligné" + +#: wp-includes/js/tinymce/langs/wp-langs.php:204 +#: wp-includes/js/tinymce/wp-mce-help.php:229 +msgid "Strikethrough" +msgstr "Barré" + +#: wp-includes/js/tinymce/langs/wp-langs.php:205 +msgid "Align left" +msgstr "Aligner à gauche" + +#: wp-includes/js/tinymce/langs/wp-langs.php:206 +msgid "Align center" +msgstr "Centrer" + +#: wp-includes/js/tinymce/langs/wp-langs.php:207 +msgid "Align right" +msgstr "Aligner à droite" + +#: wp-includes/js/tinymce/langs/wp-langs.php:208 +msgid "Align full" +msgstr "Justifier" + +#: wp-includes/js/tinymce/langs/wp-langs.php:209 +msgid "Unordered list" +msgstr "Liste non ordonnée" + +#: wp-includes/js/tinymce/langs/wp-langs.php:210 +msgid "Ordered list" +msgstr "Liste ordonnée" + +#: wp-includes/js/tinymce/langs/wp-langs.php:211 +msgid "Outdent" +msgstr "Désindenter" + +#: wp-includes/js/tinymce/langs/wp-langs.php:212 +msgid "Indent" +msgstr "Indenter" + +#: wp-includes/js/tinymce/langs/wp-langs.php:213 +#: wp-includes/js/tinymce/wp-mce-help.php:209 +msgid "Undo" +msgstr "Annuler" + +#: wp-includes/js/tinymce/langs/wp-langs.php:214 +#: wp-includes/js/tinymce/wp-mce-help.php:209 +msgid "Redo" +msgstr "Rétablir" + +#. translators: Extra width for the link popup in pixels +#: wp-includes/js/tinymce/langs/wp-langs.php:216 +msgctxt "link popup width" +msgid "0" +msgstr "0" + +#. translators: Extra height for the link popup in pixels +#: wp-includes/js/tinymce/langs/wp-langs.php:217 +msgctxt "link popup height" +msgid "0" +msgstr "0" + +#: wp-includes/js/tinymce/langs/wp-langs.php:218 +msgid "Unlink" +msgstr "Supprimer le lien" + +#. translators: Extra width for the image popup in pixels +#: wp-includes/js/tinymce/langs/wp-langs.php:220 +msgctxt "image popup width" +msgid "0" +msgstr "0" + +#. translators: Extra height for the image popup in pixels +#: wp-includes/js/tinymce/langs/wp-langs.php:221 +msgctxt "image popup height" +msgid "0" +msgstr "0" + +#: wp-includes/js/tinymce/langs/wp-langs.php:222 +msgid "Cleanup messy code" +msgstr "Nettoyer le mauvais code" + +#: wp-includes/js/tinymce/langs/wp-langs.php:223 +msgid "Edit HTML Source" +msgstr "Modifier le code source HTML" + +#: wp-includes/js/tinymce/langs/wp-langs.php:224 +msgid "Subscript" +msgstr "Indice" + +#: wp-includes/js/tinymce/langs/wp-langs.php:225 +msgid "Superscript" +msgstr "Exposant" + +#: wp-includes/js/tinymce/langs/wp-langs.php:226 +msgid "Insert horizontal ruler" +msgstr "Insérer une règle horizontal" + +#: wp-includes/js/tinymce/langs/wp-langs.php:227 +msgid "Remove formatting" +msgstr "Effacer la mise en forme" + +#: wp-includes/js/tinymce/langs/wp-langs.php:228 +msgid "Select text color" +msgstr "Sélectionnez la couleur de texte" + +#: wp-includes/js/tinymce/langs/wp-langs.php:229 +msgid "Select background color" +msgstr "Sélectionner la couleur du fond" + +#: wp-includes/js/tinymce/langs/wp-langs.php:230 +msgid "Insert custom character" +msgstr "Insérer un caractère particulier" + +#: wp-includes/js/tinymce/langs/wp-langs.php:231 +msgid "Toggle guidelines/invisible elements" +msgstr "Afficher les lignes lignes/éléments invisibles" + +#: wp-includes/js/tinymce/langs/wp-langs.php:232 +#: wp-includes/js/tinymce/langs/wp-langs.php:259 +msgid "Insert/edit anchor" +msgstr "Insérer/modifier un lien interne" + +#: wp-includes/js/tinymce/langs/wp-langs.php:233 +#: wp-includes/js/tinymce/wp-mce-help.php:208 +msgid "Cut" +msgstr "Couper" + +#: wp-includes/js/tinymce/langs/wp-langs.php:234 +#: wp-includes/js/tinymce/wp-mce-help.php:207 +msgid "Copy" +msgstr "Copier" + +#: wp-includes/js/tinymce/langs/wp-langs.php:235 +#: wp-includes/js/tinymce/wp-mce-help.php:207 +msgid "Paste" +msgstr "Coller" + +#: wp-includes/js/tinymce/langs/wp-langs.php:236 +msgid "Image properties" +msgstr "Propriétés de l’image" + +#: wp-includes/js/tinymce/langs/wp-langs.php:237 +msgid "New document" +msgstr "Nouveau document" + +#: wp-includes/js/tinymce/langs/wp-langs.php:241 +msgid "Path" +msgstr "Chemin" + +#: wp-includes/js/tinymce/langs/wp-langs.php:242 +msgid "Are you sure you want to clear all contents?" +msgstr "Êtes-vous certain(e) de vouloir effacer tout le contenu ?" + +#: wp-includes/js/tinymce/langs/wp-langs.php:243 +msgid "Jump to tool buttons - Alt+Q, Jump to editor - Alt-Z, Jump to element path - Alt-X" +msgstr "Aller aux boutons d’outils - Alt+Q ; Aller à l’éditeur - Alt-Z ; Aller au chemin de l’élément - Alt-X" + +#. translators: Extra width for the colorpicker popup in pixels +#: wp-includes/js/tinymce/langs/wp-langs.php:245 +msgctxt "colorpicker popup width" +msgid "0" +msgstr "0" + +#. translators: Extra height for the colorpicker popup in pixels +#: wp-includes/js/tinymce/langs/wp-langs.php:246 +msgctxt "colorpicker popup height" +msgid "0" +msgstr "0" + +#: wp-includes/js/tinymce/langs/wp-langs.php:250 +#: wp-includes/js/tinymce/wp-mce-help.php:240 +msgid "About TinyMCE" +msgstr "À propos de TinyMCE" + +#: wp-includes/js/tinymce/langs/wp-langs.php:253 +msgid "License" +msgstr "Licence" + +#: wp-includes/js/tinymce/langs/wp-langs.php:258 +msgid "Loaded plugins" +msgstr "Extensions chargées" + +#: wp-includes/js/tinymce/langs/wp-langs.php:260 +msgid "Anchor name" +msgstr "Nom du lien interne" + +#: wp-includes/js/tinymce/langs/wp-langs.php:261 +msgid "HTML Source Editor" +msgstr "Éditeur de source HTML" + +#: wp-includes/js/tinymce/langs/wp-langs.php:262 +msgid "Word wrap" +msgstr "Retour à la ligne" + +#: wp-includes/js/tinymce/langs/wp-langs.php:263 +msgid "Select a color" +msgstr "Sélectionnez une couleur" + +#: wp-includes/js/tinymce/langs/wp-langs.php:264 +msgid "Picker" +msgstr "Sélecteur" + +#: wp-includes/js/tinymce/langs/wp-langs.php:265 +msgid "Color picker" +msgstr "Sélecteur de couleur" + +#: wp-includes/js/tinymce/langs/wp-langs.php:266 +msgid "Palette" +msgstr "Palette" + +#: wp-includes/js/tinymce/langs/wp-langs.php:267 +msgid "Palette colors" +msgstr "Couleurs de la palette" + +#: wp-includes/js/tinymce/langs/wp-langs.php:268 +msgid "Named" +msgstr "Par nom" + +#: wp-includes/js/tinymce/langs/wp-langs.php:269 +msgid "Named colors" +msgstr "Couleurs nommées" + +#: wp-includes/js/tinymce/langs/wp-langs.php:270 +msgid "Color:" +msgstr "Couleur :" + +#: wp-includes/js/tinymce/langs/wp-langs.php:272 +msgid "Select custom character" +msgstr "Sélectionnez un caractère" + +#: wp-includes/js/tinymce/langs/wp-langs.php:275 +msgid "Image description" +msgstr "Description de l’image" + +#: wp-includes/js/tinymce/langs/wp-langs.php:276 +msgid "Image list" +msgstr "Liste d’image" + +#: wp-includes/js/tinymce/langs/wp-langs.php:277 +msgid "Border" +msgstr "Bordure" + +#: wp-includes/js/tinymce/langs/wp-langs.php:278 +#: wp-includes/js/tinymce/langs/wp-langs.php:307 +msgid "Dimensions" +msgstr "Dimensions" + +#: wp-includes/js/tinymce/langs/wp-langs.php:279 +msgid "Vertical space" +msgstr "Espace vertical" + +#: wp-includes/js/tinymce/langs/wp-langs.php:280 +msgid "Horizontal space" +msgstr "Espace horizontal" + +#: wp-includes/js/tinymce/langs/wp-langs.php:282 +msgid "Baseline" +msgstr "Slogan" + +#: wp-includes/js/tinymce/langs/wp-langs.php:283 +#: wp-includes/js/tinymce/langs/wp-langs.php:382 +msgid "Top" +msgstr "Haut" + +#: wp-includes/js/tinymce/langs/wp-langs.php:284 +msgid "Middle" +msgstr "Milieu" + +#: wp-includes/js/tinymce/langs/wp-langs.php:285 +#: wp-includes/js/tinymce/langs/wp-langs.php:384 +msgid "Bottom" +msgstr "Bas" + +#: wp-includes/js/tinymce/langs/wp-langs.php:286 +msgid "Text top" +msgstr "Haut du texte" + +#: wp-includes/js/tinymce/langs/wp-langs.php:287 +msgid "Text bottom" +msgstr "Bas du texte" + +#: wp-includes/js/tinymce/langs/wp-langs.php:293 +msgid "Open link in the same window" +msgstr "Fenêtre courante" + +#: wp-includes/js/tinymce/langs/wp-langs.php:294 +msgid "Open link in a new window" +msgstr "Nouvelle fenêtre" + +#: wp-includes/js/tinymce/langs/wp-langs.php:296 +msgid "The URL you entered seems to be an email address, do you want to add the required mailto: prefix?" +msgstr "L’adresse web que vous avez entrée semble être une adresse e-mail  ; voulez-vous ajouter le préfixe « mailto: » requis ?" + +#: wp-includes/js/tinymce/langs/wp-langs.php:297 +msgid "The URL you entered seems to external link, do you want to add the required http:// prefix?" +msgstr "L’adresse web que vous avez entrée semble être un lien externe ; voulez-vous ajouter le préfixe « http:// » requis ?" + +#: wp-includes/js/tinymce/langs/wp-langs.php:298 +msgid "Link list" +msgstr "Liste de liens" + +#: wp-includes/js/tinymce/langs/wp-langs.php:305 +msgid "File/URL" +msgstr "Fichier/Adresse web" + +#: wp-includes/js/tinymce/langs/wp-langs.php:306 +#: wp-includes/js/tinymce/wp-mce-help.php:230 +#: wp-includes/js/tinymce/wp-mce-help.php:231 +msgid "List" +msgstr "Liste" + +#: wp-includes/js/tinymce/langs/wp-langs.php:309 +msgid "Constrain proportions" +msgstr "Respecter les proportions" + +#: wp-includes/js/tinymce/langs/wp-langs.php:310 +msgid "Type" +msgstr "Type" + +#: wp-includes/js/tinymce/langs/wp-langs.php:311 +msgid "Id" +msgstr "Id" + +#: wp-includes/js/tinymce/langs/wp-langs.php:314 +msgid "V-Space" +msgstr "V-Space" + +#: wp-includes/js/tinymce/langs/wp-langs.php:315 +msgid "H-Space" +msgstr "H-Space" + +#: wp-includes/js/tinymce/langs/wp-langs.php:316 +msgid "Auto play" +msgstr "Lecture automatique" + +#: wp-includes/js/tinymce/langs/wp-langs.php:317 +#: wp-includes/js/tinymce/langs/wp-langs.php:399 +msgid "Loop" +msgstr "Répéter" + +#: wp-includes/js/tinymce/langs/wp-langs.php:318 +msgid "Show menu" +msgstr "Afficher le menu" + +#: wp-includes/js/tinymce/langs/wp-langs.php:319 +msgid "Quality" +msgstr "Qualité" + +#: wp-includes/js/tinymce/langs/wp-langs.php:320 +msgid "Scale" +msgstr "Échelle" + +#: wp-includes/js/tinymce/langs/wp-langs.php:321 +msgid "Align" +msgstr "Alignement" + +#: wp-includes/js/tinymce/langs/wp-langs.php:322 +msgid "SAlign" +msgstr "SAlignement" + +#: wp-includes/js/tinymce/langs/wp-langs.php:323 +msgid "WMode" +msgstr "WMode" + +#: wp-includes/js/tinymce/langs/wp-langs.php:324 +msgid "Background" +msgstr "Arrière plan" + +#: wp-includes/js/tinymce/langs/wp-langs.php:325 +msgid "Base" +msgstr "Base" + +#: wp-includes/js/tinymce/langs/wp-langs.php:326 +msgid "Flashvars" +msgstr "Variables Flash" + +#: wp-includes/js/tinymce/langs/wp-langs.php:327 +msgid "SWLiveConnect" +msgstr "SWLiveConnect" + +#: wp-includes/js/tinymce/langs/wp-langs.php:328 +msgid "AutoHREF" +msgstr "AutoHREF" + +#: wp-includes/js/tinymce/langs/wp-langs.php:329 +msgid "Cache" +msgstr "Mémoire cache" + +#: wp-includes/js/tinymce/langs/wp-langs.php:330 +msgid "Hidden" +msgstr "Caché" + +#: wp-includes/js/tinymce/langs/wp-langs.php:331 +msgid "Controller" +msgstr "Contrôleur" + +#: wp-includes/js/tinymce/langs/wp-langs.php:332 +msgid "Kiosk mode" +msgstr "Mode kiosque" + +#: wp-includes/js/tinymce/langs/wp-langs.php:333 +msgid "Play every frame" +msgstr "Jouer toutes les images" + +# traduction reprise de la trad tinymce... +# http://trac.midgard-project.org/browser/trunk/midcom/midcom.helper.datamanager2/static/tinymce/plugins/media/langs/fr_dlg.js +#: wp-includes/js/tinymce/langs/wp-langs.php:334 +msgid "Target cache" +msgstr "Cache cible" + +#: wp-includes/js/tinymce/langs/wp-langs.php:335 +msgid "No correction" +msgstr "Pas de correction" + +#: wp-includes/js/tinymce/langs/wp-langs.php:336 +msgid "Enable JavaScript" +msgstr "Activer JavaScript" + +#: wp-includes/js/tinymce/langs/wp-langs.php:337 +#: wp-includes/js/tinymce/langs/wp-langs.php:395 +msgid "Start time" +msgstr "Temps de début" + +#: wp-includes/js/tinymce/langs/wp-langs.php:338 +msgid "End time" +msgstr "Temps de fin" + +#: wp-includes/js/tinymce/langs/wp-langs.php:339 +msgid "Href" +msgstr "Href" + +#: wp-includes/js/tinymce/langs/wp-langs.php:340 +msgid "Choke speed" +msgstr "Vitesse de déroulement" + +#: wp-includes/js/tinymce/langs/wp-langs.php:342 +msgid "Volume" +msgstr "Volume" + +#: wp-includes/js/tinymce/langs/wp-langs.php:343 +#: wp-includes/js/tinymce/langs/wp-langs.php:398 +msgid "Auto start" +msgstr "Démarrage automatique" + +#: wp-includes/js/tinymce/langs/wp-langs.php:344 +msgid "Enabled" +msgstr "Activé" + +#: wp-includes/js/tinymce/langs/wp-langs.php:345 +msgid "Fullscreen" +msgstr "Plein écran" + +# à vérifier +#: wp-includes/js/tinymce/langs/wp-langs.php:346 +msgid "Invoke URLs" +msgstr "Lancer les adresse web" + +#: wp-includes/js/tinymce/langs/wp-langs.php:347 +msgid "Mute" +msgstr "Muet" + +#: wp-includes/js/tinymce/langs/wp-langs.php:348 +msgid "Stretch to fit" +msgstr "Redimensionner" + +#: wp-includes/js/tinymce/langs/wp-langs.php:349 +msgid "Windowless video" +msgstr "Vidéo sans fenêtre" + +#: wp-includes/js/tinymce/langs/wp-langs.php:350 +msgid "Balance" +msgstr "Balance" + +#: wp-includes/js/tinymce/langs/wp-langs.php:351 +msgid "Base URL" +msgstr "Adresse web de base" + +#: wp-includes/js/tinymce/langs/wp-langs.php:352 +msgid "Captioning id" +msgstr "Id du sous-titre" + +#: wp-includes/js/tinymce/langs/wp-langs.php:353 +msgid "Current marker" +msgstr "Marqueur actuel" + +#: wp-includes/js/tinymce/langs/wp-langs.php:354 +msgid "Current position" +msgstr "Position actuelle" + +#: wp-includes/js/tinymce/langs/wp-langs.php:355 +msgid "Default frame" +msgstr "Frame par défaut" + +#: wp-includes/js/tinymce/langs/wp-langs.php:356 +msgid "Play count" +msgstr "Nombre de lectures" + +#: wp-includes/js/tinymce/langs/wp-langs.php:357 +msgid "Rate" +msgstr "Notation" + +# ??? +#: wp-includes/js/tinymce/langs/wp-langs.php:358 +msgid "UI Mode" +msgstr "Mode UI" + +#: wp-includes/js/tinymce/langs/wp-langs.php:359 +msgid "Flash options" +msgstr "Options Flash" + +#: wp-includes/js/tinymce/langs/wp-langs.php:360 +msgid "Quicktime options" +msgstr "Options de Quicktime" + +#: wp-includes/js/tinymce/langs/wp-langs.php:361 +msgid "Windows media player options" +msgstr "Options Windows Media Player" + +#: wp-includes/js/tinymce/langs/wp-langs.php:362 +msgid "Real media player options" +msgstr "Option Real Media Player" + +#: wp-includes/js/tinymce/langs/wp-langs.php:363 +msgid "Shockwave options" +msgstr "Options de Shockwave" + +#: wp-includes/js/tinymce/langs/wp-langs.php:364 +msgid "Auto goto URL" +msgstr "Lancer automatiquement les adresses web" + +#: wp-includes/js/tinymce/langs/wp-langs.php:366 +msgid "Image status" +msgstr "Status de l’image" + +#: wp-includes/js/tinymce/langs/wp-langs.php:367 +msgid "Maintain aspect" +msgstr "Maintenir l’aspect" + +#: wp-includes/js/tinymce/langs/wp-langs.php:368 +msgid "No java" +msgstr "Pas de Java" + +#: wp-includes/js/tinymce/langs/wp-langs.php:369 +msgid "Prefetch" +msgstr "Pré-chargement" + +#: wp-includes/js/tinymce/langs/wp-langs.php:370 +msgid "Shuffle" +msgstr "Aléatoire" + +#: wp-includes/js/tinymce/langs/wp-langs.php:371 +msgid "Console" +msgstr "Console" + +#: wp-includes/js/tinymce/langs/wp-langs.php:372 +msgid "Num loops" +msgstr "Nombre de boucles" + +#: wp-includes/js/tinymce/langs/wp-langs.php:373 +msgid "Controls" +msgstr "Contrôles" + +# à vérifier +#: wp-includes/js/tinymce/langs/wp-langs.php:374 +msgid "Script callbacks" +msgstr "Rappels de script" + +#: wp-includes/js/tinymce/langs/wp-langs.php:375 +msgid "Stretch style" +msgstr "Style d’étirement" + +#: wp-includes/js/tinymce/langs/wp-langs.php:376 +msgid "Stretch H-Align" +msgstr "Étirement horizontal" + +#: wp-includes/js/tinymce/langs/wp-langs.php:377 +msgid "Stretch V-Align" +msgstr "Étirement vertical" + +#: wp-includes/js/tinymce/langs/wp-langs.php:378 +msgid "Sound" +msgstr "Son" + +#: wp-includes/js/tinymce/langs/wp-langs.php:379 +msgid "Progress" +msgstr "Progression" + +#: wp-includes/js/tinymce/langs/wp-langs.php:380 +msgid "QT Src" +msgstr "Source du QuickTime" + +#: wp-includes/js/tinymce/langs/wp-langs.php:381 +msgid "Streamed rtsp resources should be added to the QT Src field under the advanced tab." +msgstr "Les flux RTSP (streaming) devraient être ajoutées au champ « Source du QuickTime » dans l’onglet Avancé." + +#: wp-includes/js/tinymce/langs/wp-langs.php:387 +msgid "Top left" +msgstr "Haut gauche" + +#: wp-includes/js/tinymce/langs/wp-langs.php:388 +msgid "Top right" +msgstr "En haut à droite" + +#: wp-includes/js/tinymce/langs/wp-langs.php:389 +msgid "Bottom left" +msgstr "Bas gauche" + +#: wp-includes/js/tinymce/langs/wp-langs.php:390 +msgid "Bottom right" +msgstr "Bas droite" + +#: wp-includes/js/tinymce/langs/wp-langs.php:391 +msgid "Flash video options" +msgstr "Options de vidéo de Flash" + +#: wp-includes/js/tinymce/langs/wp-langs.php:392 +msgid "Scale mode" +msgstr "Mode d’étirement" + +#: wp-includes/js/tinymce/langs/wp-langs.php:393 +msgid "Buffer" +msgstr "Tampon" + +#: wp-includes/js/tinymce/langs/wp-langs.php:394 +msgid "Start image" +msgstr "Image de départ" + +#: wp-includes/js/tinymce/langs/wp-langs.php:396 +msgid "Default volume" +msgstr "Volume par défaut" + +#: wp-includes/js/tinymce/langs/wp-langs.php:397 +msgid "Hidden GUI" +msgstr "Interface cachée" + +# Basé sur la trad officielle TinyMCE +# http://trac.midgard-project.org/browser/trunk/midcom/midcom.helper.datamanager2/static/tinymce/plugins/media/langs/fr_dlg.js +#: wp-includes/js/tinymce/langs/wp-langs.php:400 +msgid "Show scale modes" +msgstr "Montrer les différentes échelles" + +#: wp-includes/js/tinymce/langs/wp-langs.php:401 +msgid "Smooth video" +msgstr "Vidéo continue" + +#: wp-includes/js/tinymce/langs/wp-langs.php:402 +msgid "JS Callback" +msgstr "Callback JavaScript" + +#: wp-includes/js/tinymce/langs/wp-langs.php:406 +msgid "Show/Hide Kitchen Sink" +msgstr "Afficher/cacher les options avancées" + +#: wp-includes/js/tinymce/langs/wp-langs.php:407 +msgid "Insert More tag" +msgstr "Insérer la balise More" + +#: wp-includes/js/tinymce/langs/wp-langs.php:408 +msgid "Insert Page break" +msgstr "Insérer la balise « Page break »" + +#: wp-includes/js/tinymce/langs/wp-langs.php:410 +msgid "More..." +msgstr "Lire la suite…" + +#: wp-includes/js/tinymce/langs/wp-langs.php:411 +msgid "Next page..." +msgstr "Page suivante…" + +#: wp-includes/js/tinymce/langs/wp-langs.php:416 +msgid "Edit Gallery" +msgstr "Modifier la galerie" + +#: wp-includes/js/tinymce/langs/wp-langs.php:417 +msgid "Delete Gallery" +msgstr "Supprimer la galerie" + +# Ne pas mettre d'entité HTML ( ...) : chaîne affichée dans l'éditeur visuel. +#: wp-includes/js/tinymce/langs/wp-langs.php:421 +msgid "Edit Image" +msgstr "Modifier l’image" + +# Ne pas mettre d'entité HTML ( ...) : chaîne affichée dans l'éditeur visuel. +#: wp-includes/js/tinymce/langs/wp-langs.php:422 +msgid "Delete Image" +msgstr "Supprimer l’image" + +#: wp-includes/js/tinymce/langs/wp-langs.php:423 +msgid "Advanced Settings" +msgstr "Options avancées" + +#: wp-includes/js/tinymce/langs/wp-langs.php:428 +msgid "Full Size" +msgstr "Taille originale" + +#: wp-includes/js/tinymce/langs/wp-langs.php:429 +msgid "Current Link" +msgstr "Lien actuel" + +#: wp-includes/js/tinymce/langs/wp-langs.php:430 +msgid "Link to Image" +msgstr "Lier à l’image" + +#: wp-includes/js/tinymce/langs/wp-langs.php:432 +msgid "Advanced Image Settings" +msgstr "Options avancées de l’image" + +#: wp-includes/js/tinymce/langs/wp-langs.php:433 +msgid "Source" +msgstr "Adresse web source" + +#: wp-includes/js/tinymce/langs/wp-langs.php:436 +#: wp-includes/js/tinymce/langs/wp-langs.php:441 +msgid "Original Size" +msgstr "Taille originale" + +#: wp-includes/js/tinymce/langs/wp-langs.php:437 +#: wp-includes/js/tinymce/langs/wp-langs.php:442 +msgid "CSS Class" +msgstr "Classe CSS" + +#: wp-includes/js/tinymce/langs/wp-langs.php:438 +msgid "Advanced Link Settings" +msgstr "Options avancées du lien" + +#: wp-includes/js/tinymce/langs/wp-langs.php:439 +msgid "Link Rel" +msgstr "Attribut « Rel » du lien" + +#: wp-includes/js/tinymce/langs/wp-langs.php:443 +msgid "60%" +msgstr "60%" + +#: wp-includes/js/tinymce/langs/wp-langs.php:444 +msgid "70%" +msgstr "70%" + +#: wp-includes/js/tinymce/langs/wp-langs.php:445 +msgid "80%" +msgstr "80%" + +#: wp-includes/js/tinymce/langs/wp-langs.php:446 +msgid "90%" +msgstr "90%" + +#: wp-includes/js/tinymce/langs/wp-langs.php:447 +msgid "100%" +msgstr "100%" + +#: wp-includes/js/tinymce/langs/wp-langs.php:448 +msgid "110%" +msgstr "120%" + +#: wp-includes/js/tinymce/langs/wp-langs.php:449 +msgid "120%" +msgstr "120%" + +#: wp-includes/js/tinymce/langs/wp-langs.php:450 +msgid "130%" +msgstr "130%" + +#: wp-includes/js/tinymce/langs/wp-langs.php:451 +msgid "Edit Image Title" +msgstr "Modifier le titre de l’image" + +#: wp-includes/js/tinymce/langs/wp-langs.php:452 +msgid "Edit Image Caption" +msgstr "Modifier la légende de l’image" + +#: wp-includes/js/tinymce/langs/wp-langs.php:453 +msgid "Edit Alternate Text" +msgstr "Modifier le texte alternatif" + +#: wp-includes/js/tinymce/wp-mce-help.php:16 +msgid "Rich Editor Help" +msgstr "Aide de l’éditeur visuel" + +#: wp-includes/js/tinymce/wp-mce-help.php:174 +msgid "Basics of Rich Editing" +msgstr "Bases de l’édition visuelle" + +#: wp-includes/js/tinymce/wp-mce-help.php:174 +msgid "Basics" +msgstr "Informations de base" + +#: wp-includes/js/tinymce/wp-mce-help.php:175 +msgid "Advanced use of the Rich Editor" +msgstr "Utilisation avancée de l’éditeur visuel" + +#: wp-includes/js/tinymce/wp-mce-help.php:176 +msgid "Hotkeys" +msgstr "Raccourcis clavier" + +#: wp-includes/js/tinymce/wp-mce-help.php:177 +msgid "About the software" +msgstr "À propos de ce logiciel" + +#: wp-includes/js/tinymce/wp-mce-help.php:183 +msgid "Rich Editing Basics" +msgstr "Base de l’édition visuelle" + +#: wp-includes/js/tinymce/wp-mce-help.php:184 +msgid "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." +msgstr "L’édition visuelle, aussi appelée WYSIWYG pour What You See Is What You Get (signifiant « ce que vous voyez correspond à ce que vous obtiendrez »), vous permet de mettre en forme votre texte tandis que vous le saisissez. L’éditeur visuel crée le code HTML en coulisse, tandis que vous vous concentrez sur l’écriture. Styles de la police, liens et images apparaissent de la même manière que lors de leur publication sur Internet." + +#: wp-includes/js/tinymce/wp-mce-help.php:185 +msgid "WordPress includes a rich HTML editor that works well in all major web browsers used today. However editing HTML is not the same as typing text. Each web page has two major components: the structure, which is the actual HTML code and is produced by the editor as you type, and the display, that is applied to it by the currently selected WordPress theme and is defined in style.css. WordPress is producing valid XHTML 1.0 which means that inserting multiple line breaks (BR tags) after a paragraph would not produce white space on the web page. The BR tags will be removed as invalid by the internal HTML correcting functions." +msgstr "Impossible de supprimer la catégorie %s : c’est celle par défaut" + +#: wp-includes/js/tinymce/wp-mce-help.php:186 +msgid "While using the editor, most basic keyboard shortcuts work like in any other text editor. For example: Shift+Enter inserts line break, Ctrl+C = copy, Ctrl+X = cut, Ctrl+Z = undo, Ctrl+Y = redo, Ctrl+A = select all, etc. (on Mac use the Command key instead of Ctrl). See the Hotkeys tab for all available keyboard shortcuts." +msgstr "Lorsque vous utilisez l’éditeur, les raccourcis clavier les plus basiques fonctionnent comme dans n’importe quel autre éditeur. Par exemple : Shift+Retour insère un retour à la ligne, Ctrl+C = copier, Ctrl+X = couper, Ctrl+Z = annuler, Ctrl+Y = rétablir, Ctrl+A = tout sélectionner, etc. (sur Mac, utilisez la touche Apple au lieu de Ctrl). Voir l’onglet Raccourcis Clavier pour connaître tous les raccourcis disponibles." + +#: wp-includes/js/tinymce/wp-mce-help.php:187 +msgid "If you do not like the way the rich editor works, you may turn it off from Your Profile submenu, under Users in the admin menu." +msgstr "Si vous n\"aimez pas la manière de fonctionner de l’éditeur, vous pouvez le désactiver depuis la page Votre Profil, dans le menu d’administration Utilisateurs." + +#: wp-includes/js/tinymce/wp-mce-help.php:191 +msgid "Advanced Rich Editing" +msgstr "Édition visuelle avancée" + +#: wp-includes/js/tinymce/wp-mce-help.php:192 +msgid "Images and Attachments" +msgstr "Images et fichiers joints" + +#: wp-includes/js/tinymce/wp-mce-help.php:193 +msgid "There is a button in the editor toolbar for inserting images that are already hosted somewhere on the internet. If you have a URL for an image, click this button and enter the URL in the box which appears." +msgstr "Un des boutons de la barre d’outils de l’éditeur sert à insérer une image qui est déjà hébergée quelque-part sur Internet. Si vous avez l’adresse web de cette image, cliquez sur ce bouton et saisissez l’adresse web dans la boîte qui apparaît." + +#: wp-includes/js/tinymce/wp-mce-help.php:194 +msgid "If you need to upload an image or another media file from your computer, you can use the Media Library buttons above the editor. The media library will attempt to create a thumbnail-sized copy from each uploaded image. To insert your image into the post, first click on the thumbnail to reveal a menu of options. When you have selected the options you like, click \"Send to Editor\" and your image or file will appear in the post you are editing. If you are inserting a movie, there are additional options in the \"Media\" dialog that can be opened from the second toolbar row." +msgstr "Si vous devez envoyer une image ou un autre média depuis votre ordinateur, vous pouvez utiliser les boutons de la bibliothèqe de médas, situés au-dessus de l’éditeur. La bibliothèque de médias tentera de créer une image miniature lorsque vous enverrez une image. Pour insérer l’image envoyée dans l’article, cliquez tout d’abord sur la miniature pour faire apparaître un menu d’options. Une fois que vous avez sélectionné les options qui vous conviennent, cliquez sur« Envoyer dans l’éditeur », et votre image ou fichier apparaîtra dans l’article que vous êtes en train de modifier. Si vous insérez une vidéo, il y a des options supplémentaires dans la fenêtre « Média » que vous pouvez ouvrir depuis la seconde barre d’outils." + +#: wp-includes/js/tinymce/wp-mce-help.php:195 +msgid "HTML in the Rich Editor" +msgstr "HTML dans l’éditeur visuel" + +#: wp-includes/js/tinymce/wp-mce-help.php:196 +msgid "Any HTML entered directly into the rich editor will show up as text when the post is viewed. What you see is what you get. When you want to include HTML elements that cannot be generated with the toolbar buttons, you must enter it by hand in the HTML editor. Examples are tables and <code>. To do this, click the HTML tab and edit the code, then switch back to Visual mode. If the code is valid and understood by the editor, you should see it rendered immediately." +msgstr "Tout code HTML inséré via l’éditeur visuel apparaîtra comme du texte quand l’article sera affiché. Si vous souhaitez inclure du code HTML qui ne peut être généré avec les boutons de la barre d’outils, vous devez l’entrer à la main à l’aide de l’éditeur HTML. Par exemple, c’est la seule façon de faire des tableaux ou d’utiliser la balise <code>. Pour accéder à cet éditeur, cliquez sur le bouton HTML et saisissez votre code, puis retournez dans l’éditeur visuel. Si le code HTML est valide et compris par l’éditeur, le résultat devrait être immédiatement visible." + +#: wp-includes/js/tinymce/wp-mce-help.php:197 +msgid "Pasting in the Rich Editor" +msgstr "Collage dans l’éditeur visuel" + +#: wp-includes/js/tinymce/wp-mce-help.php:198 +msgid "When pasting content from another web page the results can be inconsistent and depend on your browser and on the web page you are pasting from. The editor tries to correct any invalid HTML code that was pasted, but for best results try using the HTML tab or one of the paste buttons that are on the second row. Alternatively try pasting paragraph by paragraph. In most browsers to select one paragraph at a time, triple-click on it." +msgstr "Coller du contenu en provenance d’une autre page Web peut amener à des résultats inattendus voire incohérents, en fonction du navigateur que vous utilisez et de la page d’origine du contenu copié/collé. L’éditeur tentera de corriger le code HTML invalide qui a été collé, mais vous obtiendrez de meilleurs résultats en passant par le mode HTML, ou par l’un des boutons de collage situés dans la seconde rangée de boutons. Vous pouvez également essayer de coller le contenu paragraphe par paragraph - dans la plupart des navigateurs, vous pouvez sélectionner un paragraphe seul en triple-cliquant sur celui-ci." + +#: wp-includes/js/tinymce/wp-mce-help.php:199 +msgid "Pasting content from another application, like Word or Excel, is best done with the Paste from Word button on the second row, or in HTML mode." +msgstr "Si vous souhaiter copier du contenu en provenance d’un autre programme, comme Word ou Excel, il sera préférable d’utiliser le bouton « Coller du texte Word », situé dans la seconde rangée de boutons, ou de passer par le mode HTML." + +#: wp-includes/js/tinymce/wp-mce-help.php:203 +msgid "Writing at Full Speed" +msgstr "Écriture à pleine vitesse" + +#: wp-includes/js/tinymce/wp-mce-help.php:204 +msgid "Rather than reaching for your mouse to click on the toolbar, use these access keys. Windows and Linux use Ctrl + letter. Macintosh uses Command + letter." +msgstr "Plutôt que d’attraper votre souris pour cliquer sur la barre d’outils, utilisez les raccourcis clavier. Windows et Linux utilisent Ctrl+<lettre>. Macintosh utilise la touche Apple+<lettre>." + +#: wp-includes/js/tinymce/wp-mce-help.php:206 +#: wp-includes/js/tinymce/wp-mce-help.php:222 +msgid "Letter" +msgstr "Lettre" + +#: wp-includes/js/tinymce/wp-mce-help.php:206 +#: wp-includes/js/tinymce/wp-mce-help.php:222 +msgid "Action" +msgstr "Action" + +#: wp-includes/js/tinymce/wp-mce-help.php:208 +msgid "Select all" +msgstr "Selectionner tout" + +#: wp-includes/js/tinymce/wp-mce-help.php:213 +msgid "Header 1" +msgstr "Titre de niveau 1" + +#: wp-includes/js/tinymce/wp-mce-help.php:214 +msgid "Header 2" +msgstr "Titre de niveau 2" + +#: wp-includes/js/tinymce/wp-mce-help.php:214 +msgid "Header 3" +msgstr "Titre de niveau 3" + +#: wp-includes/js/tinymce/wp-mce-help.php:215 +msgid "Header 4" +msgstr "Titre de niveau 4" + +#: wp-includes/js/tinymce/wp-mce-help.php:215 +msgid "Header 5" +msgstr "Titre de niveau 5" + +#: wp-includes/js/tinymce/wp-mce-help.php:216 +msgid "Header 6" +msgstr "Titre de niveau 6" + +#: wp-includes/js/tinymce/wp-mce-help.php:220 +msgid "The following shortcuts use different access keys: Alt + Shift + letter." +msgstr "Vous pouvez accéder aux raccourcis suivants via les touches : Alt + Shift + lettre." + +#: wp-includes/js/tinymce/wp-mce-help.php:227 +msgid "Check Spelling" +msgstr "Vérifier l’orthographe" + +#: wp-includes/js/tinymce/wp-mce-help.php:227 +msgid "Align Left" +msgstr "Aligner à gauche" + +#: wp-includes/js/tinymce/wp-mce-help.php:228 +msgid "Justify Text" +msgstr "Justifier le texte" + +#: wp-includes/js/tinymce/wp-mce-help.php:228 +msgid "Align Center" +msgstr "Centrer" + +#: wp-includes/js/tinymce/wp-mce-help.php:229 +msgid "Align Right" +msgstr "Aligner à droite" + +#: wp-includes/js/tinymce/wp-mce-help.php:230 +msgid "Insert link" +msgstr "Insérer un lien" + +#: wp-includes/js/tinymce/wp-mce-help.php:231 +msgid "Remove link" +msgstr "Supprimer le lien" + +#: wp-includes/js/tinymce/wp-mce-help.php:232 +msgid "Quote" +msgstr "Citation" + +#: wp-includes/js/tinymce/wp-mce-help.php:233 +msgid "Full Screen" +msgstr "Plein écran" + +#: wp-includes/js/tinymce/wp-mce-help.php:233 +msgid "Insert More Tag" +msgstr "Insérer la balise « More »" + +#: wp-includes/js/tinymce/wp-mce-help.php:234 +msgid "Insert Page Break tag" +msgstr "Insérer la balise « Page break »" + +#: wp-includes/js/tinymce/wp-mce-help.php:235 +msgid "Switch to HTML mode" +msgstr "Passer au mode HTML" + +#: wp-includes/js/tinymce/wp-mce-help.php:243 +#, php-format +msgid "TinyMCE is a platform independent web based Javascript HTML WYSIWYG editor control released as Open Source under %sLGPL\tby Moxiecode Systems AB. It has the ability to convert HTML TEXTAREA fields or other HTML elements to editor instances." +msgstr "TinyMCE est un éditeur WYSIWYG compatible avec toutes les plateformes, basé sur Javascript, délivré comme Open Source sous %sLGPL\tpar Moxiecode Systems AB. Il peut convertir les champs HTML TEXTAREA ou autres éléments HTML en instances d’éditeur." + +#: wp-includes/js/tinymce/wp-mce-help.php:243 +msgid "GNU Library General Public Licence" +msgstr "GNU Library General Public Licence" + +#: wp-includes/js/tinymce/wp-mce-help.php:244 +msgid "Copyright © 2003-2007, Moxiecode Systems AB, All rights reserved." +msgstr "Copyright © 2003-2008, Moxiecode Systems AB, Tous droits réservés. Traduction par l’équipe de WordPress Francophone." + +#: wp-includes/js/tinymce/wp-mce-help.php:245 +msgid "For more information about this software visit the TinyMCE website." +msgstr "Pour plus d’information sur ce logiciel, visitez le site de TinyMCE ." + +#: wp-includes/js/tinymce/wp-mce-help.php:248 +msgid "Got Moxie?" +msgstr "Êtes-vous Moxie ?" + +#: wp-includes/js/tinymce/wp-mce-help.php:249 +msgid "Hosted By Sourceforge" +msgstr "Hébergé par Sourceforge" + +#: wp-includes/js/tinymce/wp-mce-help.php:250 +msgid "Also on freshmeat" +msgstr "Également sur Freshmeat" + +#: wp-includes/link-template.php:444 +msgid "Comments Feed" +msgstr "Flux du commentaires" + +#: wp-includes/link-template.php:607 +msgid "Edit tag" +msgstr "Modifier le mot-clef" + +#: wp-includes/link-template.php:820 +msgid "Edit link" +msgstr "Modifier le lien" + +#: wp-includes/link-template.php:941 +#: wp-includes/link-template.php:1205 +msgid "Previous Post" +msgstr "Article précèdent" + +#: wp-includes/link-template.php:941 +#: wp-includes/link-template.php:1205 +msgid "Next Post" +msgstr "Article suivant" + +#: wp-includes/link-template.php:1065 +msgid "First Post" +msgstr "Premier article" + +#: wp-includes/link-template.php:1065 +msgid "Last Post" +msgstr "Dernier article" + +#: wp-includes/link-template.php:1547 +msgid "Newer Comments »" +msgstr "Commentaires plus récents »" + +#: wp-includes/link-template.php:1584 +msgid "« Older Comments" +msgstr "« Commentaires plus anciens" + +#: wp-includes/locale.php:118 +msgid "S_Sunday_initial" +msgstr "D" + +#: wp-includes/locale.php:119 +msgid "M_Monday_initial" +msgstr "L" + +#: wp-includes/locale.php:120 +msgid "T_Tuesday_initial" +msgstr "Ma" + +#: wp-includes/locale.php:121 +msgid "W_Wednesday_initial" +msgstr "Me" + +#: wp-includes/locale.php:122 +msgid "T_Thursday_initial" +msgstr "J" + +#: wp-includes/locale.php:123 +msgid "F_Friday_initial" +msgstr "V" + +#: wp-includes/locale.php:124 +msgid "S_Saturday_initial" +msgstr "S" + +#: wp-includes/locale.php:173 +msgid "am" +msgstr " " + +#: wp-includes/locale.php:174 +msgid "pm" +msgstr " " + +#: wp-includes/locale.php:175 +msgid "AM" +msgstr " " + +#: wp-includes/locale.php:176 +msgid "PM" +msgstr " " + +#. translators: $decimals argument for http://php.net/number_format, default is 0 +#: wp-includes/locale.php:182 +msgid "number_format_decimals" +msgstr "0" + +# virgule et espace +#. translators: $dec_point argument for http://php.net/number_format, default is . +#: wp-includes/locale.php:186 +msgid "number_format_decimal_point" +msgstr ", " + +# juste un espace +#. translators: $thousands_sep argument for http://php.net/number_format, default is , +#: wp-includes/locale.php:190 +msgid "number_format_thousands_sep" +msgstr " " + +#: wp-includes/media.php:372 +#: wp-includes/media.php:376 +#: wp-includes/media.php:382 +msgid "Resize path invalid" +msgstr "Le chemin de recadrage est invalide" + +#: wp-includes/pluggable.php:465 +msgid "ERROR: Invalid username or incorrect password." +msgstr "ERREUR : l’identifiant ou le mot de passe n’est pas valide." + +# Ne pas mettre d'entité HTML ( ...) : chaîne envoyée par e-mail. +#. translators: 1: post id, 2: post title +#: wp-includes/pluggable.php:983 +#, php-format +msgid "New comment on your post #%1$s \"%2$s\"" +msgstr "Nouveau commentaire sur votre article n°%1$s \"%2$s\"" + +# Ne pas mettre d'entité HTML ( ...) : chaîne envoyée par e-mail. +#. translators: 1: comment author, 2: author IP, 3: author domain +#: wp-includes/pluggable.php:985 +#: wp-includes/pluggable.php:1087 +#, php-format +msgid "Author : %1$s (IP: %2$s , %3$s)" +msgstr "Auteur : %1$s (IP : %2$s , %3$s)" + +# Ne pas mettre d'entité HTML ( ...) : chaîne envoyée par e-mail. +#: wp-includes/pluggable.php:986 +#: wp-includes/pluggable.php:1088 +#, php-format +msgid "E-mail : %s" +msgstr "E-mail : %s" + +# Ne pas mettre d'entité HTML ( ...) : chaîne envoyée par e-mail. +#: wp-includes/pluggable.php:987 +#: wp-includes/pluggable.php:998 +#: wp-includes/pluggable.php:1008 +#: wp-includes/pluggable.php:1074 +#: wp-includes/pluggable.php:1081 +#: wp-includes/pluggable.php:1089 +#, php-format +msgid "URL : %s" +msgstr "Adresse : %s" + +# Ne pas mettre d'entité HTML ( ...) : chaîne envoyée par e-mail. +#: wp-includes/pluggable.php:988 +#: wp-includes/pluggable.php:1090 +#, php-format +msgid "Whois : http://ws.arin.net/cgi-bin/whois.pl?queryinput=%s" +msgstr "Whois : http://ws.arin.net/cgi-bin/whois.pl?queryinput=%s" + +# Ne pas mettre d'entité HTML ( ...) : chaîne envoyée par e-mail. +#: wp-includes/pluggable.php:989 +#: wp-includes/pluggable.php:1091 +msgid "Comment: " +msgstr "Commentaire :" + +# Ne pas mettre d'entité HTML ( ...) : chaîne envoyée par e-mail. +#: wp-includes/pluggable.php:990 +msgid "You can see all comments on this post here: " +msgstr "Vous pouvez lire tous les commentaires de cet article ici :" + +# Ne pas mettre d'entité HTML ( ...) : chaîne envoyée par e-mail. +#. translators: 1: blog name, 2: post title +#: wp-includes/pluggable.php:992 +#, php-format +msgid "[%1$s] Comment: \"%2$s\"" +msgstr "[%1$s] Commentaire : \"%2$s\"" + +# Ne pas mettre d'entité HTML ( ...) : chaîne envoyée par e-mail. +#. translators: 1: post id, 2: post title +#: wp-includes/pluggable.php:995 +#, php-format +msgid "New trackback on your post #%1$s \"%2$s\"" +msgstr "Nouveau rétrolien sur votre article n°%1$s \"%2$s\"" + +# Ne pas mettre d'entité HTML ( ...) : chaîne envoyée par e-mail. +#. translators: 1: website name, 2: author IP, 3: author domain +#. translators: 1: comment author, 2: author IP, 3: author domain +#: wp-includes/pluggable.php:997 +#: wp-includes/pluggable.php:1007 +#, php-format +msgid "Website: %1$s (IP: %2$s , %3$s)" +msgstr "Site Web : %1$s (IP : %2$s , %3$s)" + +# Ne pas mettre d'entité HTML ( ...) : chaîne envoyée par e-mail. +#: wp-includes/pluggable.php:999 +#: wp-includes/pluggable.php:1009 +msgid "Excerpt: " +msgstr "Extrait :" + +# Ne pas mettre d'entité HTML ( ...) : chaîne envoyée par e-mail. +#: wp-includes/pluggable.php:1000 +msgid "You can see all trackbacks on this post here: " +msgstr "Vous pouvez lire tous les rétroliens de cet article ici :" + +# Ne pas mettre d'entité HTML ( ...) : chaîne envoyée par e-mail. +#. translators: 1: blog name, 2: post title +#: wp-includes/pluggable.php:1002 +#, php-format +msgid "[%1$s] Trackback: \"%2$s\"" +msgstr "[%1$s] Rétrolien : \"%2$s\"" + +# Ne pas mettre d'entité HTML ( ...) : chaîne envoyée par e-mail. +#. translators: 1: post id, 2: post title +#: wp-includes/pluggable.php:1005 +#, php-format +msgid "New pingback on your post #%1$s \"%2$s\"" +msgstr "Nouveau ping sur votre article n°%1$s \"%2$s\"" + +# Ne pas mettre d'entité HTML ( ...) : chaîne envoyée par e-mail. +#: wp-includes/pluggable.php:1010 +msgid "You can see all pingbacks on this post here: " +msgstr "Vous pouvez lire tous les pings de cet article ici :" + +# Ne pas mettre d'entité HTML ( ...) : chaîne envoyée par e-mail. +#. translators: 1: blog name, 2: post title +#: wp-includes/pluggable.php:1012 +#, php-format +msgid "[%1$s] Pingback: \"%2$s\"" +msgstr "[%1$s] Ping : \"%2$s\"" + +# Ne pas mettre d'entité HTML ( ...) : chaîne envoyée par e-mail. +#: wp-includes/pluggable.php:1015 +#: wp-includes/pluggable.php:1096 +#, php-format +msgid "Delete it: %s" +msgstr "Le supprimer : %s" + +# Ne pas mettre d'entité HTML ( ...) : chaîne envoyée par e-mail. +#: wp-includes/pluggable.php:1016 +#: wp-includes/pluggable.php:1097 +#, php-format +msgid "Spam it: %s" +msgstr "Le marquer comme indésirable : %s" + +# Ne pas mettre d'entité HTML ( ...) : chaîne envoyée par e-mail. +#: wp-includes/pluggable.php:1071 +#, php-format +msgid "A new trackback on the post #%1$s \"%2$s\" is waiting for your approval" +msgstr "Un nouveau rétrolien sur l’article n°%1$s \"%2$s\" attend votre approbation" + +# Ne pas mettre d'entité HTML ( ...) : chaîne envoyée par e-mail. +#: wp-includes/pluggable.php:1073 +#: wp-includes/pluggable.php:1080 +#, php-format +msgid "Website : %1$s (IP: %2$s , %3$s)" +msgstr "Site Web : %1$s (IP: %2$s , %3$s)" + +# Ne pas mettre d'entité HTML ( ...) : chaîne envoyée par e-mail. +#: wp-includes/pluggable.php:1075 +msgid "Trackback excerpt: " +msgstr "Extrait du rétrolien :" + +# Ne pas mettre d'entité HTML ( ...) : chaîne envoyée par e-mail. +#: wp-includes/pluggable.php:1078 +#, php-format +msgid "A new pingback on the post #%1$s \"%2$s\" is waiting for your approval" +msgstr "Un nouveau ping sur l’article n°%1$s \"%2$s\" attend votre approbation" + +# Ne pas mettre d'entité HTML ( ...) : chaîne envoyée par e-mail. +#: wp-includes/pluggable.php:1082 +msgid "Pingback excerpt: " +msgstr "Extrait du ping :" + +# Ne pas mettre d'entité HTML ( ...) : chaîne envoyée par e-mail. +#: wp-includes/pluggable.php:1085 +#, php-format +msgid "A new comment on the post #%1$s \"%2$s\" is waiting for your approval" +msgstr "Un nouveau commentaire sur l’article n°%1$s \"%2$s\" attend votre approbation" + +# Ne pas mettre d'entité HTML ( ...) : chaîne envoyée par e-mail. +#: wp-includes/pluggable.php:1095 +#, php-format +msgid "Approve it: %s" +msgstr "L'approuver : %s" + +# Ne pas mettre d'entité HTML ( ...) : chaîne envoyée par e-mail. +#: wp-includes/pluggable.php:1099 +#, php-format +msgid "Currently %s comment is waiting for approval. Please visit the moderation panel:" +msgid_plural "Currently %s comments are waiting for approval. Please visit the moderation panel:" +msgstr[0] "En ce moment, %s commentaire attend votre approbation. Veuillez vous rendre sur le panneau de modération :" +msgstr[1] "En ce moment, %s commentaires attendent vos approbations. Veuillez vous rendre sur le panneau de modération :" + +# Ne pas mettre d'entité HTML ( ...) : chaîne envoyée par e-mail. +#: wp-includes/pluggable.php:1103 +#, php-format +msgid "[%1$s] Please moderate: \"%2$s\"" +msgstr "[%1$s] Demande de modération pour \"%2$s\"" + +# Ne pas mettre d'entité HTML ( ...) : chaîne envoyée par e-mail. +#: wp-includes/pluggable.php:1129 +#, php-format +msgid "Password Lost and Changed for user: %s" +msgstr "Mot de passe oublié et changé pour l'utilisateur : %s" + +# Ne pas mettre d'entité HTML ( ...) : chaîne envoyée par e-mail. +#: wp-includes/pluggable.php:1130 +#, php-format +msgid "[%s] Password Lost/Changed" +msgstr "[%s] Mot de passe oublié et changé" + +# Ne pas mettre d'entité HTML ( ...) : chaîne envoyée par e-mail. +#: wp-includes/pluggable.php:1150 +#, php-format +msgid "New user registration on your blog %s:" +msgstr "Inscription d'un nouvel utilisateur sur votre blog %s :" + +# Ne pas mettre d'entité HTML ( ...) : chaîne envoyée par e-mail. +#: wp-includes/pluggable.php:1151 +#: wp-includes/pluggable.php:1159 +#: wp-login.php:162 +#: wp-login.php:207 +#, php-format +msgid "Username: %s" +msgstr "Identifiant : %s" + +# Ne pas mettre d'entité HTML ( ...) : chaîne envoyée par e-mail. +#: wp-includes/pluggable.php:1152 +#, php-format +msgid "E-mail: %s" +msgstr "E-mail : %s" + +# Ne pas mettre d'entité HTML ( ...) : chaîne envoyée par e-mail. +#: wp-includes/pluggable.php:1154 +#, php-format +msgid "[%s] New User Registration" +msgstr "[%s] Inscription d'un nouvel utilisateur" + +# Ne pas mettre d'entité HTML ( ...) : chaîne envoyée par e-mail. +#: wp-includes/pluggable.php:1160 +#: wp-login.php:208 +#, php-format +msgid "Password: %s" +msgstr "Mot de passe : %s" + +# Ne pas mettre d'entité HTML ( ...) : chaîne envoyée par e-mail. +#: wp-includes/pluggable.php:1163 +#, php-format +msgid "[%s] Your username and password" +msgstr "[%s] Votre identifiant et mot de passe" + +#: wp-includes/post-template.php:113 +#, php-format +msgid "Protected: %s" +msgstr "Protégé : %s" + +#: wp-includes/post-template.php:116 +#, php-format +msgid "Private: %s" +msgstr "Privé : %s" + +#: wp-includes/post-template.php:260 +msgid "There is no excerpt because this is a protected post." +msgstr "Il n’y pas d’extrait, car cet article est protégé." + +#: wp-includes/post-template.php:569 +msgid "Next page" +msgstr "Page suivante" + +#: wp-includes/post-template.php:570 +msgid "Previous page" +msgstr "Page précédente" + +#: wp-includes/post-template.php:825 +msgid "Home" +msgstr "Accueil" + +#: wp-includes/post-template.php:935 +#: wp-includes/post-template.php:972 +msgid "Missing Attachment" +msgstr "Fichier joint manquant" + +#: wp-includes/post-template.php:1146 +msgid "This post is password protected. To view it please enter your password below:" +msgstr "Cet article est protégé par mot de passe. Pour le lire, veuillez saisir votre mot de passe ci-dessous :" + +#. translators: revision date format, see http://php.net/date +#: wp-includes/post-template.php:1210 +msgctxt "revision date format" +msgid "j F, Y @ G:i" +msgstr "j F Y, G \\h i \\m" + +#. translators: 1: date +#: wp-includes/post-template.php:1212 +#, php-format +msgid "%1$s [Autosave]" +msgstr "%1$s [Sauvegarde automatique]" + +#. translators: 1: date +#: wp-includes/post-template.php:1214 +#, php-format +msgid "%1$s [Current Revision]" +msgstr "%1$s [Version actuelle]" + +#. translators: post revision: 1: when, 2: author name +#: wp-includes/post-template.php:1280 +#, php-format +msgctxt "post revision" +msgid "%1$s by %2$s" +msgstr "%1$s par %2$s" + +#: wp-includes/post-template.php:1307 +msgid "Restore" +msgstr "Restaurer" + +#: wp-includes/post-template.php:1329 +msgid "Compare Revisions" +msgstr "Comparer les versions" + +#: wp-includes/post-template.php:1344 +msgid "Date Created" +msgstr "Date de création" + +#: wp-includes/post.php:1403 +msgid "Content, title, and excerpt are empty." +msgstr "Le contenu de l’article, le titre et l’extrait sont vides." + +#: wp-includes/post.php:1528 +msgid "Could not update post in the database" +msgstr "Impossible de mettre à jour l’article dans la base de données" + +#: wp-includes/post.php:1544 +msgid "Could not insert post into the database" +msgstr "Impossible d’insérer l’article dans la base de données" + +#: wp-includes/post.php:1588 +msgid "The page template is invalid." +msgstr "Le modèle de page est invalide." + +#: wp-includes/post.php:3614 +msgid "Cannot create a revision of a revision" +msgstr "Impossible de créer une version d’une version." + +#: wp-includes/post.php:3790 +msgid "You do not have permission to preview drafts." +msgstr "Vous n’avez pas l’autorisation de prévisualiser les brouillons" + +#: wp-includes/rss.php:883 +msgid "An error has occurred, which probably means the feed is down. Try again later." +msgstr "Une erreur est survenue, le flux est probablement indisponible. Veuillez réessayer plus tard." + +#: wp-includes/script-loader.php:66 +msgid "" +"You are about to delete the selected items.\n" +" 'Cancel' to stop, 'OK' to delete." +msgstr "" +"Vous êtes sur le point de supprimer les éléments sélectionnés.\n" +" « Annuler » pour abandonner, « OK » pour les supprimer." + +#: wp-includes/script-loader.php:75 +msgid "(Quick Links)" +msgstr "(Liens rapides)" + +# Ne pas mettre d'entité HTML ( ...) : affiché dans une fenêtre alert(). +#: wp-includes/script-loader.php:76 +msgid "Enter a word to look up:" +msgstr "Saisissez un mot à chercher :" + +#: wp-includes/script-loader.php:77 +msgid "Dictionary lookup" +msgstr "Recherche dans le dictionnaire" + +#: wp-includes/script-loader.php:78 +msgid "lookup" +msgstr "dictionnaire" + +#: wp-includes/script-loader.php:79 +msgid "Close all open tags" +msgstr "Fermer toutes les balises ouvertes" + +#: wp-includes/script-loader.php:80 +msgid "close tags" +msgstr "fermer les balises" + +#: wp-includes/script-loader.php:81 +msgid "Enter the URL" +msgstr "Saisissez l'adresse" + +#: wp-includes/script-loader.php:82 +msgid "Enter the URL of the image" +msgstr "Saisissez l'adresse de l'image" + +#: wp-includes/script-loader.php:83 +msgid "Enter a description of the image" +msgstr "Saisissez une description pour l'image" + +#: wp-includes/script-loader.php:96 +msgid "You do not have permission to do that." +msgstr "Vous n'avez pas l'utorisation d'effectuer cela." + +#: wp-includes/script-loader.php:97 +msgid "An unidentified error has occurred." +msgstr "Une erreur non identifiée est survenue." + +#: wp-includes/script-loader.php:189 +msgid "You have attempted to queue too many files." +msgstr "Vous essayer d'envoyer trop de fichiers à la fois." + +#: wp-includes/script-loader.php:190 +#, php-format +msgid "This file is too big. Your php.ini upload_max_filesize is %s." +msgstr "Le fichier est trop gros. La limite PHP ( php.ini / upload_max_filesize) est fixée à %s." + +#: wp-includes/script-loader.php:191 +msgid "This file is empty. Please try another." +msgstr "Le fichier est vide. Merci d'en essayer un autre." + +#: wp-includes/script-loader.php:192 +msgid "This file type is not allowed. Please try another." +msgstr "Ce type de fichier n'est pas autorisé. Merci d'en essayer un autre." + +#: wp-includes/script-loader.php:193 +msgid "An error occurred in the upload. Please try again later." +msgstr "Une erreur est survenue lors de l'envoi. Veuillez réessayer plus tard." + +#: wp-includes/script-loader.php:194 +msgid "There was a configuration error. Please contact the server administrator." +msgstr "Il y a une erreur de configuration. Merci de contacter l'administrateur de votre serveur." + +#: wp-includes/script-loader.php:195 +msgid "You may only upload 1 file." +msgstr "Vous pouvez seulement envoyer 1 fichier." + +#: wp-includes/script-loader.php:196 +msgid "HTTP error." +msgstr "Erreur HTTP." + +#: wp-includes/script-loader.php:197 +msgid "Upload failed." +msgstr "L'envoi a échoué." + +#: wp-includes/script-loader.php:198 +msgid "IO error." +msgstr "Erreur I/O (Entrées-Sorties)." + +#: wp-includes/script-loader.php:199 +msgid "Security error." +msgstr "Erreur de sécurité." + +#: wp-includes/script-loader.php:200 +msgid "File cancelled." +msgstr "Fichier annulé." + +#: wp-includes/script-loader.php:201 +msgid "Upload stopped." +msgstr "L'envoi est stoppé." + +#: wp-includes/script-loader.php:202 +msgid "Dismiss" +msgstr "Rejeter" + +#: wp-includes/script-loader.php:203 +msgid "Crunching…" +msgstr "En cours de traitement…" + +#: wp-includes/script-loader.php:204 +msgid "Deleted" +msgstr "Supprimé" + +#: wp-includes/script-loader.php:215 +msgid "Separate multiple categories with commas." +msgstr "Séparez les catégories multiples par des virgules." + +#: wp-includes/script-loader.php:232 +msgid "Very weak" +msgstr "Très faible" + +#: wp-includes/script-loader.php:233 +msgid "Weak" +msgstr "Faible" + +#. translators: password strength +#: wp-includes/script-loader.php:235 +msgctxt "password strength" +msgid "Medium" +msgstr "Moyenne" + +#: wp-includes/script-loader.php:236 +msgid "Strong" +msgstr "Forte" + +#: wp-includes/script-loader.php:270 +msgid "Tags used on this post:" +msgstr "Mots-clefs utilisés dans cet article :" + +#: wp-includes/script-loader.php:276 +#: wp-includes/script-loader.php:300 +msgid "Publish on:" +msgstr "Publier le :" + +#: wp-includes/script-loader.php:277 +#: wp-includes/script-loader.php:301 +msgid "Schedule for:" +msgstr "Planifier pour :" + +#: wp-includes/script-loader.php:278 +#: wp-includes/script-loader.php:302 +msgid "Published on:" +msgstr "Publié le :" + +#: wp-includes/script-loader.php:279 +#: wp-includes/script-loader.php:303 +msgid "Show more comments" +msgstr "Afficher plus de commentaires" + +#: wp-includes/script-loader.php:280 +#: wp-includes/script-loader.php:304 +msgid "No more comments found." +msgstr "Il n’y a pas d’autres commentaires." + +#: wp-includes/script-loader.php:289 +#: wp-includes/script-loader.php:312 +msgid "Password Protected" +msgstr "Protégé par mot de passe" + +#: wp-includes/script-loader.php:326 +msgid "Submitted on:" +msgstr "Envoyé le :" + +#: wp-includes/script-loader.php:341 +#, php-format +msgid "Word count: %d" +msgstr "Compteur de mots : %d" + +#: wp-includes/script-loader.php:347 +msgid "Update completed." +msgstr "Mise à jour complète." + +#: wp-includes/script-loader.php:348 +msgid "Error:" +msgstr "Erreur :" + +#: wp-includes/script-loader.php:358 +#: wp-includes/script-loader.php:367 +msgid "Error while saving the changes." +msgstr "Erreur lors de la sauvegarde des modifications." + +#: wp-includes/script-loader.php:359 +msgid "Remove From Bulk Edit" +msgstr "Enlever de l’édition par lot" + +#: wp-includes/script-loader.php:374 +msgid "Plugin Information:" +msgstr "Informations sur l’extension :" + +#: wp-includes/script-loader.php:495 +msgid "Preview this Page" +msgstr "Prévisualiser cette page" + +#: wp-includes/script-loader.php:496 +msgid "Preview this Post" +msgstr "Prévisualiser cet article" + +#: wp-includes/script-loader.php:498 +msgid "Saving Draft…" +msgstr "Enregistrement du brouillon…" + +#: wp-includes/taxonomy.php:240 +#: wp-includes/taxonomy.php:311 +#: wp-includes/taxonomy.php:433 +#: wp-includes/taxonomy.php:617 +#: wp-includes/taxonomy.php:1212 +#: wp-includes/taxonomy.php:1452 +msgid "Invalid Taxonomy" +msgstr "Taxinomie non-valide" + +# contexte +#: wp-includes/taxonomy.php:306 +msgid "Empty Term" +msgstr "Pas de terme" + +#: wp-includes/taxonomy.php:1352 +msgid "Invalid term ID" +msgstr "l’ID du terme est invalide" + +#: wp-includes/taxonomy.php:1355 +#: wp-includes/taxonomy.php:1633 +msgid "A name is required for this term" +msgstr "Un nom est requis pour ce terme" + +#: wp-includes/taxonomy.php:1386 +#: wp-includes/taxonomy.php:1393 +msgid "Could not insert term into the database" +msgstr "Impossible d’insérer le terme dans la base de données" + +#: wp-includes/taxonomy.php:1661 +#, php-format +msgid "The slug “%s” is already in use by another term" +msgstr "L’identifiant « %s » est déjà utilisé par un autre terme" + +#: wp-includes/taxonomy.php:2320 +msgid "Invalid object ID" +msgstr "Identifiant d’objet non valide." + +#: wp-includes/theme.php:302 +msgid "Stylesheet is missing." +msgstr "La feuille de style manque." + +#: wp-includes/theme.php:316 +msgid "File not readable." +msgstr "Le fichier n’est pas accessible en lecture." + +#: wp-includes/theme.php:357 +msgid "Template is missing." +msgstr "Le modèle est manquant." + +#: wp-includes/user.php:78 +msgid "ERROR: The username field is empty." +msgstr "ERREUR : le champ de l’identifiant est vide." + +#: wp-includes/user.php:81 +msgid "ERROR: The password field is empty." +msgstr "ERREUR : le champ du mot de passe est vide." + +#: wp-includes/user.php:89 +#, php-format +msgid "ERROR: Invalid username. Lost your password?" +msgstr "ERREUR : l’identifiant n’est pas valide. Avez-vous perdu votre mot de passe ?" + +#: wp-includes/user.php:98 +#, php-format +msgid "ERROR: Incorrect password. Lost your password?" +msgstr "ERREUR : mot de passe incorrect. L’auriez-vous oublié ?" + +#: wp-includes/user.php:124 +msgid "Please log in again." +msgstr "Merci de vous reconnecter." + +#: wp-includes/widgets.php:483 +#: wp-includes/widgets.php:545 +#, php-format +msgid "Sidebar %d" +msgstr "Colonne latérale %d" + +#: wp-includes/wp-db.php:1026 +#, php-format +msgid "ERROR: WordPress %s requires MySQL 4.0.0 or higher" +msgstr "ERREUR : WordPress %s requiert MySQL 4.0.0 ou une version supérieure." + +#: wp-login.php:74 +msgid "Powered by WordPress" +msgstr "Propulsé par WordPress" + +#: wp-login.php:117 +msgid "ERROR: Enter a username or e-mail address." +msgstr "ERREUR : veuillez saisir une adresse e-mail ou un identifiant." + +#: wp-login.php:122 +msgid "ERROR: There is no user registered with that email address." +msgstr "ERREUR : il n’y aucun utilisateur enregistré avec cette adresse e-mail." + +#: wp-login.php:134 +msgid "ERROR: Invalid username or e-mail." +msgstr "ERREUR : l’identifiant ou l’adresse e-mail n’est pas valide." + +#: wp-login.php:148 +msgid "Password reset is not allowed for this user" +msgstr "La réinitialisation du mot de passe n’est pas autorisé pour cet utilisateur" + +#: wp-login.php:160 +msgid "Someone has asked to reset the password for the following site and username." +msgstr "Quelqu’un a demandé le renouvellement de son mot de passe pour l’adresse web et l’identifiant ci-dessous." + +#: wp-login.php:163 +msgid "To reset your password visit the following address, otherwise just ignore this email and nothing will happen." +msgstr "Pour renouveler votre mot de passe, cliquez sur le lien suivant. Autrement, ignorez cet e-mail et la demande ne sera pas prise en compte." + +#: wp-login.php:166 +#, php-format +msgid "[%s] Password Reset" +msgstr "[%s] Renouvellement du mot de passe" + +#: wp-login.php:172 +#: wp-login.php:217 +msgid "The e-mail could not be sent." +msgstr "L’e-mail ne peut être envoyé." + +#: wp-login.php:172 +#: wp-login.php:217 +msgid "Possible reason: your host may have disabled the mail() function..." +msgstr "Raison possible : votre hébergeur peut avoir désactivé la fonction mail()…" + +#: wp-login.php:191 +#: wp-login.php:194 +#: wp-login.php:198 +msgid "Invalid key" +msgstr "Clef invalide" + +#: wp-login.php:211 +#, php-format +msgid "[%s] Your new password" +msgstr "[%s] Votre nouveau mot de passe" + +#: wp-login.php:241 +msgid "ERROR: This username is invalid. Please enter a valid username." +msgstr "ERREUR : cet identifiant n’est pas valide. Merci d’utiliser un identifiant valide." + +#: wp-login.php:244 +msgid "ERROR: This username is already registered, please choose another one." +msgstr "ERREUR : cet identifiant existe déjà. Merci d’en choisir un autre." + +#: wp-login.php:248 +msgid "ERROR: Please type your e-mail address." +msgstr "ERREUR : l’adresse e-mail est obligatoire." + +#: wp-login.php:250 +msgid "ERROR: The email address isn’t correct." +msgstr "ERREUR : adresse e-mail incorrecte." + +#: wp-login.php:265 +#, php-format +msgid "ERROR: Couldn’t register you... please contact the webmaster !" +msgstr "ERREUR : inscription impossible… Merci de prendre contact avec le webmaster !" + +#: wp-login.php:335 +msgid "Sorry, that key does not appear to be valid." +msgstr "Désolé, cette clef ne semble pas être valide." + +#: wp-login.php:338 +msgid "Lost Password" +msgstr "Mot de passe oublié" + +#: wp-login.php:338 +msgid "Please enter your username or e-mail address. You will receive a new password via e-mail." +msgstr "Merci de saisir votre identifiant ou votre adresse e-mail. Un nouveau mot de passe vous sera envoyé par e-mail." + +#: wp-login.php:346 +msgid "Username or E-mail:" +msgstr "Identifiant ou adresse e-mail :" + +#: wp-login.php:350 +msgid "Get New Password" +msgstr "Générer un mot de passe" + +#: wp-login.php:364 +#: wp-login.php:433 +#: wp-login.php:536 +msgid "Are you lost?" +msgstr "Êtes-vous perdu(e) ?" + +#: wp-login.php:364 +#: wp-login.php:433 +#: wp-login.php:536 +#, php-format +msgid "← Back to %s" +msgstr "← Retour sur %s" + +#: wp-login.php:408 +msgid "Registration Form" +msgstr "Formulaire d’inscription" + +#: wp-login.php:408 +msgid "Register For This Site" +msgstr "S’inscrire sur ce site" + +#: wp-login.php:421 +msgid "A password will be e-mailed to you." +msgstr "Un mot de passe vous sera envoyé par e-mail." + +#: wp-login.php:428 +#: wp-login.php:528 +#: wp-login.php:530 +msgid "Password Lost and Found" +msgstr "Récupération de mot de passe" + +#: wp-login.php:428 +#: wp-login.php:528 +#: wp-login.php:530 +msgid "Lost your password?" +msgstr "Mot de passe oublié ?" + +#: wp-login.php:489 +msgid "ERROR: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress." +msgstr "ERREUR : les cookies sont bloqués ou ne sont pas reconnus pas votre navigateur. Vous devez activer les cookies pour utiliser WordPress." + +#: wp-login.php:492 +msgid "You are now logged out." +msgstr "Vous êtes désormais déconnecté(e)." + +#: wp-login.php:493 +msgid "User registration is currently not allowed." +msgstr "Les nouvelles inscriptions ne sont pas autorisées pour l’instant." + +#: wp-login.php:494 +msgid "Check your e-mail for the confirmation link." +msgstr "Vérifiez votre compte e-mail pour y trouver le lien de confirmation." + +#: wp-login.php:495 +msgid "Check your e-mail for your new password." +msgstr "Vérifiez votre compte e-mail pour y trouver votre nouveau mot de passe." + +#: wp-login.php:496 +msgid "Registration complete. Please check your e-mail." +msgstr "Enregistrement terminé. Veuillez vérifier vos nouveaux e-mails." + +#: wp-login.php:515 +msgid "Remember Me" +msgstr "Se souvenir de moi" + +#: wp-mail.php:26 +msgid "There doesn’t seem to be any new mail." +msgstr "Il ne semble pas y avoir de nouvel e-mail." + +#: wp-mail.php:92 +#, php-format +msgid "Author is %s" +msgstr "L’auteur est %s" + +#: wp-mail.php:198 +#, php-format +msgid "Author: %s" +msgstr "Auteur : %s" + +#: wp-mail.php:199 +#, php-format +msgid "Posted title: %s" +msgstr "Titre publié : %s" + +#: wp-mail.php:202 +#, php-format +msgid "Oops: %s" +msgstr "Oups : %s" + +#: wp-mail.php:206 +#, php-format +msgid "Mission complete. Message %s deleted." +msgstr "Mission terminée. Message %s supprimé. " + +#: xmlrpc.php:246 +#: xmlrpc.php:268 +#, php-format +msgid "XML-RPC services are disabled on this blog. An admin user can enable them at %s" +msgstr "Les services XML-RPC sont désactivés sur ce blog. Un administrateur peut les activer à %s" + +#: xmlrpc.php:251 +#: xmlrpc.php:275 +msgid "Bad login/pass combination." +msgstr "Mauvaise combinaison identifiant/mot de passe." + +#: xmlrpc.php:382 +msgid "Software Name" +msgstr "Nom du logiciel" + +#: xmlrpc.php:387 +msgid "Software Version" +msgstr "Version du logiciel" + +#: xmlrpc.php:399 +msgid "Time Zone" +msgstr "Fuseau horaire" + +#: xmlrpc.php:409 +msgid "Blog Tagline" +msgstr "Slogan du blog" + +#: xmlrpc.php:501 +msgid "Sorry, you cannot edit this page." +msgstr "Désolé, vous ne pouvez pas modifier cette page." + +#: xmlrpc.php:578 +#: xmlrpc.php:696 +#: xmlrpc.php:742 +msgid "Sorry, no such page." +msgstr "Désolé, aucune page ne correspond." + +#: xmlrpc.php:603 +#: xmlrpc.php:788 +msgid "Sorry, you cannot edit pages." +msgstr "Désolé, vous ne pouvez pas modifier les pages." + +#: xmlrpc.php:657 +msgid "Sorry, you cannot add new pages." +msgstr "Désolé, vous ne pouvez pas ajouter de nouvelles pages." + +#: xmlrpc.php:701 +msgid "Sorry, you do not have the right to delete this page." +msgstr "Désolé, vous n’avez pas l’autorisation de supprimer cette page." + +#: xmlrpc.php:707 +msgid "Failed to delete the page." +msgstr "Échec lors de la suppression de la page." + +#: xmlrpc.php:747 +msgid "Sorry, you do not have the right to edit this page." +msgstr "Désolé, vous n’avez pas l’autorisation de modifier cette page." + +#: xmlrpc.php:849 +msgid "Sorry, you cannot edit posts on this blog." +msgstr "Désolé, vous ne pouvez pas modifier les articles de ce blog." + +#: xmlrpc.php:886 +msgid "Sorry, you must be able to edit posts on this blog in order to view tags." +msgstr "Désolé, vous devez avoir le droit de modifier des articles sur ce blog si vous vous visualisez les mots-clefs." + +#: xmlrpc.php:933 +msgid "Sorry, you do not have the right to add a category." +msgstr "Désolé, vous n’avez pas les droits pour ajouter une catégorie." + +#: xmlrpc.php:961 +msgid "Sorry, the new category failed." +msgstr "Désolé, la création de la catégorie a échoué." + +#: xmlrpc.php:990 +msgid "Sorry, you do not have the right to delete a category." +msgstr "Désolé, vous n’avez pas les droits pour supprimer une catégorie." + +#: xmlrpc.php:1018 +msgid "Sorry, you must be able to edit posts to this blog in order to view categories." +msgstr "Désolé, vous devez avoir le droit d’écrire des articles pour ce blog si vous vous visualisez les catégories." + +#: xmlrpc.php:1055 +#: xmlrpc.php:1178 +#: xmlrpc.php:1210 +msgid "You are not allowed to moderate comments on this blog." +msgstr "Vous n’avez pas l’autorisation de modérer les commentaires de ce blog." + +#: xmlrpc.php:1060 +#: xmlrpc.php:1183 +#: xmlrpc.php:1215 +msgid "Invalid comment ID." +msgstr "Identifiant commentaire invalide." + +#: xmlrpc.php:1118 +msgid "Sorry, you cannot edit comments." +msgstr "Désolé, vous ne pouvez pas modifier les commentaires." + +#: xmlrpc.php:1222 +msgid "Invalid comment status." +msgstr "Statut du commentaire non valide." + +#: xmlrpc.php:1253 +msgid "Sorry, the comment could not be edited. Something wrong happened." +msgstr "Désolé, votre commentaire n’a pu être modifié. Une erreur est survenue." + +#: xmlrpc.php:1284 +msgid "You must be registered to comment" +msgstr "Vous devez être enregistré pour laisser un commentaire" + +#: xmlrpc.php:1297 +#: xmlrpc.php:1300 +#: xmlrpc.php:2350 +msgid "Invalid post ID." +msgstr "Identifiant de l’article non valide." + +#: xmlrpc.php:1326 +msgid "Comment author name and email are required" +msgstr "L’auteur d’un commentaire doit renseigner son nom et son e-mail" + +#: xmlrpc.php:1328 +msgid "A valid email address is required" +msgstr "Une adresse e-mail valide est requise" + +#: xmlrpc.php:1361 +#: xmlrpc.php:1423 +#: xmlrpc.php:1451 +#: xmlrpc.php:1479 +msgid "You are not allowed access to details about this blog." +msgstr "Vous n’avez pas l’autorisation d’accéder aux détails de ce blog." + +#: xmlrpc.php:1389 +msgid "You are not allowed access to details about comments." +msgstr "Vous n’avez pas l’autorisation d’accéder aux détails des commentaires." + +#: xmlrpc.php:1563 +msgid "You are not allowed to update options." +msgstr "Vous n’avez pas l’autorisation de mettre à jour les options." + +#: xmlrpc.php:1645 +msgid "Sorry, you do not have access to user data on this blog." +msgstr "Vous n’avez pas l’autorisation d’accéder aux données utilisateurs de ce blog." + +#: xmlrpc.php:1681 +#: xmlrpc.php:2580 +#: xmlrpc.php:3078 +#: xmlrpc.php:3188 +msgid "Sorry, you cannot edit this post." +msgstr "Désolé, vous ne pouvez pas modifier cet article." + +#: xmlrpc.php:1729 +#: xmlrpc.php:2940 +msgid "Either there are no posts, or something went wrong." +msgstr "Soit il n’y a pas d’articles, soit une erreur s’est produite." + +#: xmlrpc.php:1785 +msgid "Sorry, this user can not edit the template." +msgstr "Désolé, cet utilisateur ne peut pas modifier le modèle." + +#: xmlrpc.php:1827 +msgid "Sorry, this user cannot edit the template." +msgstr "Désolé, cet utilisateur ne peut pas modifier le modèle." + +#: xmlrpc.php:1838 +msgid "Either the file is not writable, or something wrong happened. The file has not been updated." +msgstr "Soit le fichier n’est pas accessible en écriture, soit une erreur est survenue. Le fichier n’a pas été mis à jour." + +#: xmlrpc.php:1870 +msgid "Sorry, you are not allowed to post on this blog." +msgstr "Désolé, vous n’avez pas l’autorisation de publier sur ce blog." + +#: xmlrpc.php:1926 +#: xmlrpc.php:1980 +#: xmlrpc.php:2671 +#: xmlrpc.php:3140 +msgid "Sorry, no such post." +msgstr "Désolé, aucun article ne correspond." + +#: xmlrpc.php:1937 +#: xmlrpc.php:2502 +msgid "Sorry, you do not have the right to publish this post." +msgstr "Désolé, vous n’avez pas l’autorisation de publier cet article." + +#: xmlrpc.php:2023 +#: xmlrpc.php:2320 +msgid "Sorry, you are not allowed to publish posts on this blog." +msgstr "Désolé, vous n’avez pas l’autorisation de publier des articles sur ce blog." + +#: xmlrpc.php:2029 +#: xmlrpc.php:2326 +msgid "Sorry, you are not allowed to publish pages on this blog." +msgstr "Désolé, vous n’avez pas l’autorisation de publier des pages sur ce blog." + +#: xmlrpc.php:2039 +#: xmlrpc.php:2088 +#: xmlrpc.php:2336 +#: xmlrpc.php:2396 +msgid "Invalid post type." +msgstr "Type d’article invalide." + +#: xmlrpc.php:2079 +msgid "You are not allowed to post as this user" +msgstr "Vous n’avez pas l’autorisation de publier sous cet identifiant." + +#: xmlrpc.php:2084 +msgid "You are not allowed to create pages as this user" +msgstr "Vous n’avez pas l’autorisation de créer des pages sous cet identifiant." + +#: xmlrpc.php:2387 +msgid "You are not allowed to change the post author as this user." +msgstr "Vous n’avez pas l’autorisation de modifier des articles sous cet identifiant." + +#: xmlrpc.php:2392 +msgid "You are not allowed to change the page author as this user." +msgstr "Vous n’avez pas l’autorisation de modifier des pages sous cet identifiant." + +#: xmlrpc.php:2500 +msgid "Sorry, you do not have the right to publish this page." +msgstr "Désolé, vous n’avez pas le droit de publier cette page." + +#: xmlrpc.php:2535 +msgid "Sorry, your entry could not be edited. Something wrong happened." +msgstr "Désolé, votre entrée n’a pu être modifiée. Une erreur est survenue." + +#: xmlrpc.php:2803 +#: xmlrpc.php:2995 +msgid "Sorry, you must be able to edit posts on this blog in order to view categories." +msgstr "Désolé, vous devez avoir le droit d’écrire des articles sur ce blog si vous vous visualisez les catégories." + +#: xmlrpc.php:2860 +msgid "You are not allowed to upload files to this site." +msgstr "Vous n’êtes pas autorisé à envoyer des fichiers sur ce site." + +#: xmlrpc.php:2887 +#, php-format +msgid "Could not write file %1$s (%2$s)" +msgstr "Impossible d’écrire le fichier %1$s (%2$s)" + +#: xmlrpc.php:3034 +msgid "Sorry, you can not edit this post." +msgstr "Désolé, vous ne pouvez pas modifier cet article." + +#: xmlrpc.php:3235 +msgid "Is there no link to us?" +msgstr "N’y a-t-il aucun lien vers nous ?" + +#: xmlrpc.php:3275 +#: xmlrpc.php:3285 +#: xmlrpc.php:3292 +#: xmlrpc.php:3400 +msgid "The specified target URL cannot be used as a target. It either doesn’t exist, or it is not a pingback-enabled resource." +msgstr "L’adresse web spécifiée ne peut être utilisée comme cible. Soit elle n’existe pas, ou il ne s’agit pas d’une ressource reconnaissant les pings." + +#: xmlrpc.php:3288 +msgid "The source URL and the target URL cannot both point to the same resource." +msgstr "L’adresse source et l’adresse cible ne peuvent pointer vers la même ressource." + +#: xmlrpc.php:3298 +msgid "The pingback has already been registered." +msgstr "Le ping a déjà été enregistré." + +#: xmlrpc.php:3306 +msgid "The source URL does not exist." +msgstr "L’adresse d’origine n’existe pas." + +#: xmlrpc.php:3318 +msgid "We cannot find a title on that page." +msgstr "Nous ne trouvons pas du titre pour cette page." + +#: xmlrpc.php:3354 +msgid "The source URL does not contain a link to the target URL, and so cannot be used as a source." +msgstr "L’adresse source ne contient pas de lien vers l’adresse cible, et ne peut donc pas être utilisée comme source." + +#: xmlrpc.php:3374 +#, php-format +msgid "Pingback from %1$s to %2$s registered. Keep the web talking! :-)" +msgstr "Réception d’un ping de %1$s pour %2$s. Continuons la conversation ! :-)" + +#: xmlrpc.php:3407 +msgid "The specified target URL does not exist." +msgstr "L’adresse adresse cible spécifiée n’existe pas." + +#. Not gettexted string WP_I18N_DB_CONN_ERROR +#: wp-includes/wp-db.php:352 +msgid "" +"\n" +"

    Error establishing a database connection

    \n" +"

    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.

    \n" +"
      \n" +"\t
    • Are you sure you have the correct username and password?
    • \n" +"\t
    • Are you sure that you have typed the correct hostname?
    • \n" +"\t
    • Are you sure that the database server is running?
    • \n" +"
    \n" +"

    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.

    \n" +msgstr "" +"\n" +"

    Erreur lors de l’établissement de la connexion à la base de données

    \n" +"

    Cela signifie soit que l’identifiant et/ou le mot de passe indiqués dans votre fichier wp-config.php sont incorrects, ou que le serveur de base de données à l’adresse %s est inaccessible - ce qui implique que le serveur de base de données de votre hébergeur est sans doute défaillant.

    \n" +"
      \n" +"\t
    • Êtes-vous certain(e) d’avoir correctement indiqué votre identifiant et votre mot de passe ?
    • \n" +"\t
    • Êtes-vous certain(e) d’avoir entré le bon serveur de base de données ?
    • \n" +"\t
    • Êtes-vous certain(e) que le serveur de base de données fonctionne correctement ?
    • \n" +"
    \n" +"

    Si vous n’êtes pas sûr(e) de bien comprendre les mots de cette liste, vous devriez sans doute prendre contact avec votre hébergeur. Si malgré cela cette erreur s’affiche toujours, indiquez votre problème au forum d’entraide en français.

    \n" + +#. Not gettexted string WP_I18N_DB_BAD_PREFIX +#: wp-includes/wp-db.php:400 +msgid "Invalid database prefix" +msgstr "Préfixe de la base de données invalide" + +#. Not gettexted string WP_I18N_DB_SELECT_DB +#: wp-includes/wp-db.php:439 +msgid "" +"\n" +"

    Can’t select database

    \n" +"

    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.

    \n" +"
      \n" +"
    • Are you sure it exists?
    • \n" +"
    • Does the user %2$s have permission to use the %1$s database?
    • \n" +"
    • 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?
    • \n" +"
    \n" +"

    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.

    " +msgstr "" +"\n" +"

    Impossible de sélectionner la base de données

    \n" +"

    La connexion au serveur de base de données s’est bien faite (donc votre identifiant et votre mot de passe sont les bons), mais la base de données %1$s n’a pas pu être sélectionnée.

    \n" +"
      \n" +"
    • Êtes-vous certain(e) qu’elle existe ?
    • \n" +"
    • L’utilisateur %2$s a-t-il les droits pour utiliser la base de donné %1$s ?
    • \n" +"
    • Sur certains systèmes, le nom de votre base de données est préfixée de votre identifiant, donc son nom complet peut être identifiant_nomdelabase. Cela peut-il être la cause du problème&nbps;?
    • \n" +"
    \n" +"

    Si vous ne savez pas comment régler votre base de données, vous devriez prendre contact avec votre hébergeur. Si toutes vos tentatives échouent, peut-être trouverez-vous une réponse sur le forum d’entraide en français.

    " + +#. Not gettexted string WP_I18N_DB_QUERY_ERROR_FULL +#: wp-includes/wp-db.php:561 +msgid "WordPress database error %1$s for query %2$s made by %3$s" +msgstr "Erreur de la base de données WordPress %1$s pour la requête %2$s faite par %3$s" + +#. Not gettexted string WP_I18N_DB_QUERY_ERROR +#: wp-includes/wp-db.php:563 +msgid "WordPress database error %1$s for query %2$s" +msgstr "Erreur de la base de données WordPress %1$s pour la requête %2$s" + +#. Not gettexted string WP_I18N_DB_GETROW_ERROR +#: wp-includes/wp-db.php:860 +msgid " $db->get_row(string query, output type, int offset) -- Output type must be one of: OBJECT, ARRAY_A, ARRAY_N" +msgstr " $db->get_row(string query, output type, int offset) -- Le type de sortie doit être: OBJECT, ARRAY_A, ARRAY_N" + +#. Not gettexted string WP_I18N_OLD_PHP +#: wp-settings.php:109 +msgid "Your server is running PHP version %s but WordPress requires at least 4.3." +msgstr "Votre serveur utilise la version %s de PHP mais WordPress nécéssite au moins la version 4.3." + +#. Not gettexted string WP_I18N_OLD_MYSQL +#: wp-settings.php:147 +msgid "Your PHP installation appears to be missing the MySQL extension which is required by WordPress." +msgstr "Votre installation PHP ne dispose pas de MySQL. Extension requise pour WordPress." + +#. Not gettexted string WP_I18N_BAD_PREFIX +#: wp-settings.php:271 +msgid "ERROR: $table_prefix in wp-config.php can only contain numbers, letters, and underscores." +msgstr "ERREUR: la ligne $table_prefix du fichier wp-config.php ne doit contenir que des chiffres, lettres ou le caractère souligné." + +#. Not gettexted string WP_I18N_TEXT_DIRECTION +#: wp-load.php:49 +msgid "ltr" +msgstr "ltr" + +#. Not gettexted string WP_I18N_NO_CONFIG +#: wp-load.php:50 +msgid "There doesn't seem to be a 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" +msgstr "Je ne trouve pas votre fichier wp-config.php. J’en ai besoin avant de lancer l’installation.
    Besoin d’aide ? En voici.

    Vous pouvez créer un fichier wp-config.php à l’aide de notre interface Web, mais ça ne marche pas pour toutes les configurations de serveur. La méthode la plus sûre reste de créer le fichier à la main.

    Créer le fichier de configuration" + +#~ msgid "Import Bunny’s Technorati Tags" +#~ msgstr "Importer depuis Bunny’s Technorati Tags" +#~ msgid "" +#~ "Howdy! This imports tags from Bunny’s Technorati Tags into " +#~ "WordPress tags." +#~ msgstr "" +#~ "Salutations ! Cet outil importe dans ce blog les mots-clefs en " +#~ "provenance d’une installation existante de Bunny’s " +#~ "Technorati, dans les mots-clefs WordPress." +#~ msgid "This is suitable for Bunny’s Technorati Tags version 0.6." +#~ msgstr "" +#~ "Cette importateur fonctionne pour la version 0.6 de Bunny’s " +#~ "Technorati Tags." +#~ msgid "" +#~ "All existing Bunny’s Technorati Tags will be removed after import." +#~ msgstr "" +#~ "Tous les mots-clefs existant de Bunny’s Technorati Tags seront " +#~ "supprimés après l’exportation." +#~ msgid "Import Tags" +#~ msgstr "Importation des mots-clefs" +#~ msgid "Reading Bunny’s Technorati Tags…" +#~ msgstr "Lecture des mots-clefs Bunny’s Technorati Tags…" +#~ msgid "Done! %s post with tags were read." +#~ msgid_plural "Done! %s posts with tags were read." +#~ msgstr[0] "" +#~ "Terminé ! %s article avec mots-clefs a été traité." +#~ msgstr[1] "" +#~ "Terminé ! %s articles avec mots-clefs ont été " +#~ "traités." +#~ msgid "Next" +#~ msgstr "Suivant" +#~ msgid "Import Bunny’s Technorati Tags into WordPress tags." +#~ msgstr "" +#~ "Importation des mots-clefs Bunny’s Technorati dans les mots-clefs " +#~ "WordPress." +#~ msgid "Import Jerome’s Keywords" +#~ msgstr "Importer depuis Jerome’s Keywords" +#~ msgid "" +#~ "Howdy! This imports tags from Jerome’s Keywords into WordPress tags." +#~ msgstr "" +#~ "Salutations ! Cet outil importe dans ce blog les mots-clefs en " +#~ "provenance d’une installation existante de Jerome’s Keywords, " +#~ "dans les tags WordPress." +#~ msgid "This is suitable for Jerome’s Keywords version 1.x and 2.0a." +#~ msgstr "" +#~ "Cette importateur fonctionne pour les versions 1.x et 2.0a de " +#~ "Jerome’s Keywords." +#~ msgid "All existing Jerome’s Keywords will be removed after import." +#~ msgstr "" +#~ "Tous les mots-clefs existant de Jerome’s Keywords seront supprimés " +#~ "après l’exportation." +#~ msgid "Import Version 1.x" +#~ msgstr "Importer depuis la version 1.x" +#~ msgid "Import Version 2.0a" +#~ msgstr "Importer depuis la version 2.0a" +#~ msgid "Reading Jerome’s Keywords Tags…" +#~ msgstr "" +#~ "Lecture des mots-clefs Jerome’s Keywords d’article…" +#~ msgid "Import Jerome’s Keywords into WordPress tags." +#~ msgstr "" +#~ "Importation des mots-clefs Jerome’s Keywords dans les mots-clefs " +#~ "WordPress." + diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/README.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/add-to-any/README.txt Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,381 @@ +=== Add to Any: Share/Bookmark/Email Button === +Contributors: micropat +Donate link: http://www.addtoany.com/contact/ +Tags: bookmarking, social, social bookmarking, social bookmarks, bookmark, bookmarks, sharing, share, sharethis, saving, save, Post, posts, page, pages, images, image, admin, statistics, stats, links, plugin, widget, e-mail, email, seo, button, delicious, google, digg, reddit, facebook, myspace, twitter, stumbleupon, technorati, wpmu, addtoany, add, any +Requires at least: 2.0 +Tested up to: 2.9 +Stable tag: 0.9.9.4.2 + +Help readers share, bookmark, and email your posts and pages using any service, such as Facebook, Twitter, Digg, Delicious and over 100 more. + +== Description == + +Help readers **share**, **save**, **bookmark**, and **email** your posts and pages using **any service**, such as Facebook, Twitter, Digg, Delicious, and over 100 more social bookmarking and sharing sites. The button comes with AddToAny's customizable **Smart Menu**, which **places the services visitors use at the top of the menu**, based on each visitor's browsing history. + +Share Button (demo) + +The E-mail tab makes it easy to share via Google Mail, Yahoo! Mail, Hotmail, AOL, and any other web-based e-mailer or desktop program. The **Add to Favorites** button (or Bookmark tab) helps users bookmark using any browser (Internet Explorer, Firefox, Chrome, Safari, Opera, etc.). + +Individual **service icons** let you optimize your blog posts for specific social sites. Choose from over 100 individual services. + +* AddToAny Smart Menu +* Individual service links (like Sociable) +* Includes all services +* Menu updated automatically +* WordPress optimized, localized (English, Chinese, Spanish, Portuguese, Italian, Danish, Catalan, Russian, Albanian, Romanian, Belarusian) +* Google Analytics integration +* Many more publisher and user features! + +See also: + +* The Subscribe button plugin +* The Share button for WordPress.com blogs +* The standard Share button widget + +Share this plugin + +== Installation == + +1. Upload the `add-to-any` directory (including all files within) to the `/wp-content/plugins/` directory +1. Activate the plugin through the `Plugins` menu in WordPress + +== Frequently Asked Questions == + += How often is the list of services within the menu updated? = + +Constantly... and it's done automatically without having to upgrade. + += Where can I choose which button and individual icons to display and other options? = + +Go to `Settings` > `Share/Save Buttons`. + += Why isn't the drop-down menu appearing? = + +It's likely because your theme wasn't coded properly. Using the Theme Editor, make sure that the following piece of code is included in your theme's `footer.php` file just before the `` line: + +`` + += How can I move both the button and the individual icons to another area of my theme? = + +In the Theme Editor, place this code block where you want the button and individual icons to appear in your theme: + +`'; +if( function_exists('ADDTOANY_SHARE_SAVE_ICONS') ) + ADDTOANY_SHARE_SAVE_ICONS( array("html_wrap_open" => "

  • ", "html_wrap_close" => "
  • ") ); +if( function_exists('ADDTOANY_SHARE_SAVE_BUTTON') ) + ADDTOANY_SHARE_SAVE_BUTTON( array("html_wrap_open" => "
  • ", "html_wrap_close" => "
  • ") ); +echo ''; ?>` + += How can I move just the button to another area of my theme? = + +Directions are located within the plugin's settings panel located in `Settings` > `Share/Save Buttons` under `Button Placement`. In the Theme Editor, you will place this line of code where you want the button to appear in your theme: + +`` + += How can I move just the individual icons to another area of my theme? = + +In the Theme Editor, place this line of code where you want the individual icons to appear in your theme (within an HTML list): + +`'; +if( function_exists('ADDTOANY_SHARE_SAVE_ICONS') ) + ADDTOANY_SHARE_SAVE_ICONS( array("html_wrap_open" => "
  • ", "html_wrap_close" => "
  • ") ); +echo ''; ?>` + +Or you can place the icons as individual links (without being wrapped in an HTML list): + +`` + += How can I add a new custom standalone service? = +You can create a plugin or customize the following PHP sample code to add to your theme's function.php file: + +`function addtoany_add_services( $services ) { + $services['google_example'] = array( + 'name' => 'Google Example', + 'icon_url' => 'http://www.google.com/favicon.ico', + 'icon_width' => 16, + 'icon_height' => 16, + 'href' => 'http://www.example.com/add?linkurl=A2A_LINKURL&linkname=A2A_LINKNAME' + ); + return $services; +} +add_filter('A2A_SHARE_SAVE_services', 'addtoany_add_services', 10, 1);` + += How can I force the button to appear in individual posts and pages? = + +If your button isn't already set up to appear (it is by default), type the following tag into the page or post that you want the button to appear in: `` + += How can I remove a button from individual posts and pages? = + +Type the following tag into the page or post that you do not want the button to appear in: `` + += Why do embedded objects (like Flash) disappear when the menu is displayed? = + +This is done to overcome browser limitations that prevent the drop-down menu from displaying on top of intersecting embedded objects. If you would like to disable this, uncheck the `Hide embedded objects (Flash, video, etc.) that intersect with the menu when displayed` option on the plugin's settings page. + +== Screenshots == + +1. Add to Any Share/Save button, featuring the Open Share Icon +2. Drop-down menu that appears instantly when visitors use the share button +3. E-mail tab, with direct links to the most popular web-based e-mailers' auto-filled Compose page, a web-based sender for use with any e-mail address, and a link for desktop email clients +4. Settings panel +5. Color chooser for your Add to Any menus + +== Changelog == + += .9.9.4.3 = +* Automatic support for over 50 languages + * The drop-down menu automatically detects the visitor's set language and localizes accordingly +* Less JavaScript output; removed redundant code + * No longer outputs language strings if WordPress locale is set to the default "en_US" +* Forward support for WordPress 2.9 + += .9.9.4.2 = +* Updated button text +* Further localized strings + += .9.9.4.1 = +* Twitter icon included in standard sharing button +* Albanian translation (by Romeo Shuka) +* Romanian translation (by Stefan) + += .9.9.4 = +* Custom standalone service support +* Custom icon support +* Updated Twitter icon + += .9.9.3.5 = +* New standalone services + * DailyMe + * Google Reader + * Mozilla.ca + * NewsTrust + * Plurk + * PrintFriendly + * WordPress +* Fixed bug affecting certain standalone services + * Identi.ca + * Bookmarks.fr + * Ask.com MyStuff +* Catalan translation update (Robert Buj) +* Clarified when template code is appropriate + += .9.9.3.4 = +* Use button IMG instead of background-image for button without text +* Defaults to 171 x 16px button + += .9.9.3.3 = +* Left-padding for icon+text link changed from 39px to 30px +* Text-index for parent UL reset +* Output buffering replaced +* Fixed admin action link +* Russian translation (by Elvis) + += .9.9.3.2 = +* Clarified button placement and theme editing +* Arabic translation + += .9.9.3.1 = +* Fix for possible global/object variable confusion with themes + += .9.9.3 = +* Add service icons +* Changelog markup update + += .9.9.2.9 = +* Removed extra character from button querystring +* New standalone services + * Amazon Wish List + * Blogger + * Evernote + * Folkd + * Identi.ca + * Instapaper + * Meneame + * Netvouz + * TypePad + += .9.9.2.8 = +* Translations + += .9.9.2.7 = +* Updated standalone services and icons + += .9.9.2.6 = +* CSS changed to support more themes +* Admin UI updated for 2.8 + * Slightly cleaner UI + * Includes template code for both button and standalone links (previously only found in FAQ) + += .9.9.2.5 = +* Removed dragability of dummy image in standalone services list + += .9.9.2.4 = +* Alt attribute added to standalone service image +* Title attribute added to standalone service link +* Selected standalone services in admin are more distinguishable +* Italian translation (by Gianni) +* i18n folder renamed to languages due to a problem with the CodeStyling Localization plugin +* Contrast improvements to Open Share Icon + += .9.9.2.3 = +* Support for themes that do not support modern Loop methods + * Permalinks now targeted for these older themes +* AddToAny URI scheme gives precedence to link URL parameter, then Title +* Sitename & Siteurl parameters depreciated for WP (they are usually redundant) + += .9.9.2.2 = +* Fixed display when all standalone services are removed in admin +* Services label renamed Standalone Services for clarity +* Updates to Danish translation +* Added Belarusian translation + += .9.9.2.1 = +* Feed icons shown inline, no longer displayed in unordered list + += .9.9.2 = +* Services array output fixes + += .9.9.1 = +* Add services.php (critical fix) + += .9.9 = +* NEW: Individual service links! + * Drag & Drop interface with preview +* .addtoany_share_save_container is now `
    `, not `

    ` +* Add to Any button now contained within `

    • ` + += .9.8.9.2 = +* Buttons include Facebook icon +* Catalan i18n + += .9.8.9.1 = +* Automatic localization/i18n +* Rename Spanish POT to proper +* Fixed "Display Share/Save button at the bottom of pages" option when "Display Share/Save button at the bottom of posts is disabled" + += .9.8.9 = +* wp_footer() detection +* Replaced short form of PHP's open tags with long form to work around configurations with shortopentag disabled +* Spanish translation (by Pablo) + += .9.8.8.4 = +* Settings panel submits to current page instead of unreliable REQUEST_URI which can omit querystring on IIS + * See http://www.microsoft.com/downloads/results.aspx?freetext=954946 + += .9.8.8.3 = +* Option "Display Share/Save button at the bottom of posts on the front page" applies to all pages that can contain multiple posts + += .9.8.8.2 = +* Fix button appearing in category list view despite setting + += .9.8.8.1 = +* Refine conditionals +* Highlight admin notices +* Danish translation (by Georg) + += .9.8.8 = +* Now customize the optional text next to the 16 x 16px icons + += .9.8.7.3 = +* Important syntax fix + += .9.8.7.2 = +* Additional options / JavaScript API clarification +* i18n update + += .9.8.7.1 = +* Text-only button stripslashes + += .9.8.7 = +* Removes unnecessary inline styling in feeds per W3C recommendation + += .9.8.6.9 = +* Compressed Open Share Icon + += .9.8.6.8 = +* Chinese translation updated + += .9.8.6.7 = +* i18n +* Chinese translation +* Installation clarified + += .9.8.6.6 = +* Open Share Icon +* WordPress 2.7 admin styling +* Settings link on Plugins page +* Basename var + += .9.8.6.5 = +* Less JavaScript redundancy from Additional Options (saves bandwidth) +* Compressed PNGs added, select a button from settings to begin using PNG (saves bandwidth) + += .9.8.6.4 = +* Additional Options in Admin panel provides link to JavaScript API +* Option to have full addtoany.com legacy page open in a new window + += .9.8.6.3 = +* Replaced short form of PHP's open tags with long form to work around configurations with short_open_tag disabled + += .9.8.6.2 = +* Current page title + blog title are used if called outside The Loop + += .9.8.6.1 = +* Fixed buttons if WordPress files are in a subdirectory while the blog appears in the site root + * For example: http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory + += .9.8.6 = +* Fixed output buffering - button should appear below posts again if option is set + += .9.8.5 = +* Button targets the current page if called outside The Loop +* Accomodates renamed plugin directory + += .9.8.4 = +* Fixed a small syntax error (critcal if you're on .9.8.3) + += .9.8.3 = +* Language & localization update + * "After clicking OK," removed from the Bookmark tab + += .9.8.2 = +* Event attributes removed (JS now takes care of button events) + * This eliminates the chance of errors prior to JS fully loading + += .9.8.1 = +* Fixed repo problem + += .9.8 = +* JavaScript removed from blog feed +* Option to display button (without menu) or to not display it at all below posts in blog feed +* Replaced some UTF-8 encoding functions with core WordPress functions +* For XHTML validation, special characters are converted to HTML entities within JavaScript variables +* Reprioritized plugin to load later +* Text-only button option + += .9.7 = +* Internationalization +* Buttons updated + += .9.6 = +* Moved external JavaScript to bottom so that content is prioritized over HTTP requests to static.addtoany.com + * Please note that some improperly-coded themes may prevent this from working. See the FAQ entry for "Why isn't the drop-down menu appearing?" if this is the case. + += .9.5.2 = +* Fixed bug in Internet Explorer 6 that caused custom buttons to have a height and width of 0 +* Removed the XHTML depreciated `name` attribute from the button's anchor + += .9.5.1 = +* Fixed 1 line to support those without short_open_tag + += .9.5 = +* New: Custom buttons (specify a URL) +* Fix to permit XHTML Strict validation + += .9.4 = +* New Menu Styler lets you customize the color of the menus +* New Menu Option: "Only show the menu when the user clicks the Share/Save button" +* New: Set custom JavaScript variables for further customization +* Better support for CSS styling: .addtoany_share_save +* PHP support for short_open_tag +* PHP4 legacy and compatibility fixes \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/add-to-any.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/add-to-any/add-to-any.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,805 @@ +Settings] +Version: .9.9.4.3 +Author: Add to Any +Author URI: http://www.addtoany.com/contact/ +*/ + +if( !isset($A2A_javascript) ) + $A2A_javascript = ''; +if( !isset($A2A_locale) ) + $A2A_locale = ''; + +// Pre-2.6 compatibility +if ( !defined('WP_CONTENT_URL') ) + define( 'WP_CONTENT_URL', get_option('siteurl') . '/wp-content'); +if ( ! defined( 'WP_PLUGIN_URL' ) ) + define( 'WP_PLUGIN_URL', WP_CONTENT_URL. '/plugins' ); + +$A2A_SHARE_SAVE_plugin_basename = plugin_basename(dirname(__FILE__)); +$A2A_SHARE_SAVE_plugin_url_path = WP_PLUGIN_URL.'/'.$A2A_SHARE_SAVE_plugin_basename; // /wp-content/plugins/add-to-any + +function A2A_SHARE_SAVE_textdomain() { + global $A2A_SHARE_SAVE_plugin_url_path, $A2A_SHARE_SAVE_plugin_basename; + + load_plugin_textdomain('add-to-any', + $A2A_SHARE_SAVE_plugin_url_path.'/languages', + $A2A_SHARE_SAVE_plugin_basename.'/languages'); +} +add_action('init', 'A2A_SHARE_SAVE_textdomain'); + +function A2A_SHARE_SAVE_link_vars() { + global $post; + + $linkname = get_the_title($post->ID); + $linkname_enc = rawurlencode( $linkname ); + $linkurl = get_permalink($post->ID); + $linkurl_enc = rawurlencode( $linkurl ); + + return compact( 'linkname', 'linkname_enc', 'linkurl', 'linkurl_enc' ); +} + +include_once('services.php'); + +function ADDTOANY_SHARE_SAVE_ICONS( $args = false ) { + if( $args ) + extract( $args ); // output_later, html_wrap_open, html_wrap_close + extract(A2A_SHARE_SAVE_link_vars()); // linkname_enc, etc. + + global $A2A_SHARE_SAVE_plugin_url_path, $A2A_SHARE_SAVE_services; + + // Make available services extensible via plugins, themes (functions.php), etc. + $A2A_SHARE_SAVE_services = apply_filters('A2A_SHARE_SAVE_services', $A2A_SHARE_SAVE_services); + + $active_services = get_option('A2A_SHARE_SAVE_active_services'); + + $ind_html = ""; + + if( !$active_services ) + $active_services = Array(); + + foreach($active_services as $active_service) { + + // Skip unknown + if( !in_array($active_service, array_keys($A2A_SHARE_SAVE_services)) ) + continue; + + $service = $A2A_SHARE_SAVE_services[$active_service]; + $safe_name = $active_service; + $name = $service['name']; + + if (isset($service['href'])) { + $custom_service = TRUE; + $href = $service['href']; + $href = str_replace('A2A_LINKURL', $linkurl_enc, $href); + $href = str_replace('A2A_LINKNAME', $linkname_enc, $href); + } else { + $custom_service = FALSE; + } + + if ( $custom_service && isset($service['icon_url']) ) + $icon = $service['icon_url']; + elseif ( ! isset($service['icon'])) + $icon = 'default'; + else + $icon = $service['icon']; + $width = (isset($service['icon_width'])) ? $service['icon_width'] : '16'; + $height = (isset($service['icon_height'])) ? $service['icon_height'] : '16'; + + $url = ($custom_service) ? $href : "http://www.addtoany.com/add_to/" . $safe_name . "?linkurl=" . $linkurl_enc . "&linkname=" . $linkname_enc; + $src = ($custom_service) ? $icon : $A2A_SHARE_SAVE_plugin_url_path."/icons/".$icon.".png"; + + $link = $html_wrap_open.""; + $link .= "\"$name\"/"; + $link .= "".$html_wrap_close; + + $ind_html .= apply_filters('addtoany_link', $link); + } + + if($output_later) + return $ind_html; + else + echo $ind_html; +} + +function ADDTOANY_SHARE_SAVE_BUTTON( $args = false ) { + + global $A2A_SHARE_SAVE_plugin_url_path, $A2A_SHARE_SAVE_services; + + // Make available services extensible via plugins, themes (functions.php), etc. + $A2A_SHARE_SAVE_services = apply_filters('A2A_SHARE_SAVE_services', $A2A_SHARE_SAVE_services); + + if( $args ) + extract( $args ); // output_later, html_wrap_open, html_wrap_close + + extract(A2A_SHARE_SAVE_link_vars()); // linkname_enc, etc. + + /* Add to Any button */ + + $button_target = (get_option('A2A_SHARE_SAVE_button_opens_new_window')=='1' && (get_option('A2A_SHARE_SAVE_onclick')!='1')) ? ' target="_blank"' : ''; + + if( !get_option('A2A_SHARE_SAVE_button') ) { + $button_fname = 'share_save_171_16.png'; + $button_width = ' width="171"'; + $button_height = ' height="16"'; + $button_src = $A2A_SHARE_SAVE_plugin_url_path.'/'.$button_fname; + } else if( get_option('A2A_SHARE_SAVE_button') == 'CUSTOM' ) { + $button_src = get_option('A2A_SHARE_SAVE_button_custom'); + $button_width = ''; + $button_height = ''; + } else if( get_option('A2A_SHARE_SAVE_button') == 'TEXT' ) { + $button_text = stripslashes(get_option('A2A_SHARE_SAVE_button_text')); + } else { + $button_attrs = explode( '|', get_option('A2A_SHARE_SAVE_button') ); + $button_fname = $button_attrs[0]; + $button_width = ' width="'.$button_attrs[1].'"'; + $button_height = ' height="'.$button_attrs[2].'"'; + $button_src = $A2A_SHARE_SAVE_plugin_url_path.'/'.$button_fname; + $button_text = stripslashes(get_option('A2A_SHARE_SAVE_button_text')); + } + + if( $button_fname == 'favicon.png' || $button_fname == 'share_16_16.png' ) { + if( !is_feed() ) { + $style_bg = 'background:url('.$A2A_SHARE_SAVE_plugin_url_path.'/'.$button_fname.') no-repeat scroll 9px 0px'; // padding-left:9 (9=other icons padding) + $style_bg = ';' . $style_bg . ' !important;'; + $style = ' style="'.$style_bg.'padding:0 0 0 30px;display:inline-block;height:16px;line-height:16px;vertical-align:middle;"'; // padding-left:30+9 (9=other icons padding) + } + } + + if( $button_text && (!$button_fname || $button_fname == 'favicon.png' || $button_fname == 'share_16_16.png') ) { + $button = $button_text; + } else { + $style = ''; + $button = 'Share/Bookmark'; + } + + $button_html = $html_wrap_open.''.$button.''.$html_wrap_close; + + // If not a feed + if( !is_feed() ) { + + global $A2A_javascript, $A2A_SHARE_SAVE_external_script_called; + if( $A2A_javascript == '' || !$A2A_SHARE_SAVE_external_script_called ) { + $external_script_call = ''; + $A2A_SHARE_SAVE_external_script_called = true; + } + else + $external_script_call = 'a2a_init("page");'; + $A2A_javascript .= ' + + +' . __('Settings') . ''; + array_unshift( $links, $settings_link ); // before other links + } + return $links; +} + +add_filter("plugin_action_links", 'A2A_SHARE_SAVE_actlinks', 10, 2); + + +?> \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/favicon.png Binary file web/wp-content/plugins/add-to-any/favicon.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/aim.png Binary file web/wp-content/plugins/add-to-any/icons/aim.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/allvoices.png Binary file web/wp-content/plugins/add-to-any/icons/allvoices.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/amazon.png Binary file web/wp-content/plugins/add-to-any/icons/amazon.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/aol.png Binary file web/wp-content/plugins/add-to-any/icons/aol.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/apple_mail.png Binary file web/wp-content/plugins/add-to-any/icons/apple_mail.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/arto.png Binary file web/wp-content/plugins/add-to-any/icons/arto.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/ask.png Binary file web/wp-content/plugins/add-to-any/icons/ask.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/avantgo.png Binary file web/wp-content/plugins/add-to-any/icons/avantgo.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/backflip.png Binary file web/wp-content/plugins/add-to-any/icons/backflip.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/bebo.png Binary file web/wp-content/plugins/add-to-any/icons/bebo.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/bibsonomy.png Binary file web/wp-content/plugins/add-to-any/icons/bibsonomy.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/bitty.png Binary file web/wp-content/plugins/add-to-any/icons/bitty.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/blinklist.png Binary file web/wp-content/plugins/add-to-any/icons/blinklist.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/blogger.png Binary file web/wp-content/plugins/add-to-any/icons/blogger.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/blogmarks.png Binary file web/wp-content/plugins/add-to-any/icons/blogmarks.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/blogrovr.png Binary file web/wp-content/plugins/add-to-any/icons/blogrovr.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/bookmark.png Binary file web/wp-content/plugins/add-to-any/icons/bookmark.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/bookmarks_fr.png Binary file web/wp-content/plugins/add-to-any/icons/bookmarks_fr.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/buddymarks.png Binary file web/wp-content/plugins/add-to-any/icons/buddymarks.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/buzz.png Binary file web/wp-content/plugins/add-to-any/icons/buzz.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/bzzster.png Binary file web/wp-content/plugins/add-to-any/icons/bzzster.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/care2.png Binary file web/wp-content/plugins/add-to-any/icons/care2.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/citeulike.png Binary file web/wp-content/plugins/add-to-any/icons/citeulike.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/clear.png Binary file web/wp-content/plugins/add-to-any/icons/clear.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/connotea.png Binary file web/wp-content/plugins/add-to-any/icons/connotea.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/current.png Binary file web/wp-content/plugins/add-to-any/icons/current.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/dailyme.png Binary file web/wp-content/plugins/add-to-any/icons/dailyme.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/dailyrotation.png Binary file web/wp-content/plugins/add-to-any/icons/dailyrotation.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/darr.png Binary file web/wp-content/plugins/add-to-any/icons/darr.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/darr_wt.png Binary file web/wp-content/plugins/add-to-any/icons/darr_wt.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/default.png Binary file web/wp-content/plugins/add-to-any/icons/default.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/delicious.png Binary file web/wp-content/plugins/add-to-any/icons/delicious.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/designfloat.png Binary file web/wp-content/plugins/add-to-any/icons/designfloat.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/digg.png Binary file web/wp-content/plugins/add-to-any/icons/digg.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/diglog.png Binary file web/wp-content/plugins/add-to-any/icons/diglog.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/diigo.png Binary file web/wp-content/plugins/add-to-any/icons/diigo.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/dzone.png Binary file web/wp-content/plugins/add-to-any/icons/dzone.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/email.png Binary file web/wp-content/plugins/add-to-any/icons/email.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/eskobo.png Binary file web/wp-content/plugins/add-to-any/icons/eskobo.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/evernote.png Binary file web/wp-content/plugins/add-to-any/icons/evernote.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/expression.png Binary file web/wp-content/plugins/add-to-any/icons/expression.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/facebook.png Binary file web/wp-content/plugins/add-to-any/icons/facebook.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/fark.png Binary file web/wp-content/plugins/add-to-any/icons/fark.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/faves.png Binary file web/wp-content/plugins/add-to-any/icons/faves.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/flurry.png Binary file web/wp-content/plugins/add-to-any/icons/flurry.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/folkd.png Binary file web/wp-content/plugins/add-to-any/icons/folkd.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/foxiewire.png Binary file web/wp-content/plugins/add-to-any/icons/foxiewire.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/friendfeed.png Binary file web/wp-content/plugins/add-to-any/icons/friendfeed.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/friendster.png Binary file web/wp-content/plugins/add-to-any/icons/friendster.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/funp.png Binary file web/wp-content/plugins/add-to-any/icons/funp.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/furl.png Binary file web/wp-content/plugins/add-to-any/icons/furl.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/fwicki.png Binary file web/wp-content/plugins/add-to-any/icons/fwicki.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/gabbr.png Binary file web/wp-content/plugins/add-to-any/icons/gabbr.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/global_grind.png Binary file web/wp-content/plugins/add-to-any/icons/global_grind.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/gmail.png Binary file web/wp-content/plugins/add-to-any/icons/gmail.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/google.png Binary file web/wp-content/plugins/add-to-any/icons/google.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/healthranker.png Binary file web/wp-content/plugins/add-to-any/icons/healthranker.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/hellotxt.png Binary file web/wp-content/plugins/add-to-any/icons/hellotxt.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/hemidemi.png Binary file web/wp-content/plugins/add-to-any/icons/hemidemi.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/hi5.png Binary file web/wp-content/plugins/add-to-any/icons/hi5.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/hubdog.png Binary file web/wp-content/plugins/add-to-any/icons/hubdog.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/hugg.png Binary file web/wp-content/plugins/add-to-any/icons/hugg.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/hyves.png Binary file web/wp-content/plugins/add-to-any/icons/hyves.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/identica.png Binary file web/wp-content/plugins/add-to-any/icons/identica.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/im.png Binary file web/wp-content/plugins/add-to-any/icons/im.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/imera.png Binary file web/wp-content/plugins/add-to-any/icons/imera.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/instapaper.png Binary file web/wp-content/plugins/add-to-any/icons/instapaper.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/iterasi.png Binary file web/wp-content/plugins/add-to-any/icons/iterasi.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/jamespot.png Binary file web/wp-content/plugins/add-to-any/icons/jamespot.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/jots.png Binary file web/wp-content/plugins/add-to-any/icons/jots.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/jumptags.png Binary file web/wp-content/plugins/add-to-any/icons/jumptags.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/khabbr.png Binary file web/wp-content/plugins/add-to-any/icons/khabbr.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/kledy.png Binary file web/wp-content/plugins/add-to-any/icons/kledy.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/klipfolio.png Binary file web/wp-content/plugins/add-to-any/icons/klipfolio.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/linkagogo.png Binary file web/wp-content/plugins/add-to-any/icons/linkagogo.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/linkatopia.png Binary file web/wp-content/plugins/add-to-any/icons/linkatopia.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/linkedin.png Binary file web/wp-content/plugins/add-to-any/icons/linkedin.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/live.png Binary file web/wp-content/plugins/add-to-any/icons/live.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/livejournal.png Binary file web/wp-content/plugins/add-to-any/icons/livejournal.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/ma_gnolia.png Binary file web/wp-content/plugins/add-to-any/icons/ma_gnolia.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/maple.png Binary file web/wp-content/plugins/add-to-any/icons/maple.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/meneame.png Binary file web/wp-content/plugins/add-to-any/icons/meneame.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/mindbodygreen.png Binary file web/wp-content/plugins/add-to-any/icons/mindbodygreen.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/miro.png Binary file web/wp-content/plugins/add-to-any/icons/miro.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/mister-wong.png Binary file web/wp-content/plugins/add-to-any/icons/mister-wong.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/mixx.png Binary file web/wp-content/plugins/add-to-any/icons/mixx.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/mobile.png Binary file web/wp-content/plugins/add-to-any/icons/mobile.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/mozillaca.png Binary file web/wp-content/plugins/add-to-any/icons/mozillaca.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/msdn.png Binary file web/wp-content/plugins/add-to-any/icons/msdn.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/multiply.png Binary file web/wp-content/plugins/add-to-any/icons/multiply.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/my_msn.png Binary file web/wp-content/plugins/add-to-any/icons/my_msn.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/mylinkvault.png Binary file web/wp-content/plugins/add-to-any/icons/mylinkvault.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/myspace.png Binary file web/wp-content/plugins/add-to-any/icons/myspace.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/netimechannel.png Binary file web/wp-content/plugins/add-to-any/icons/netimechannel.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/netlog.png Binary file web/wp-content/plugins/add-to-any/icons/netlog.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/netomat.png Binary file web/wp-content/plugins/add-to-any/icons/netomat.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/netvibes.png Binary file web/wp-content/plugins/add-to-any/icons/netvibes.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/netvouz.png Binary file web/wp-content/plugins/add-to-any/icons/netvouz.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/newgie.png Binary file web/wp-content/plugins/add-to-any/icons/newgie.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/newsalloy.png Binary file web/wp-content/plugins/add-to-any/icons/newsalloy.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/newscabby.png Binary file web/wp-content/plugins/add-to-any/icons/newscabby.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/newsgator.png Binary file web/wp-content/plugins/add-to-any/icons/newsgator.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/newshutch.png Binary file web/wp-content/plugins/add-to-any/icons/newshutch.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/newsisfree.png Binary file web/wp-content/plugins/add-to-any/icons/newsisfree.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/newstrust.png Binary file web/wp-content/plugins/add-to-any/icons/newstrust.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/newsvine.png Binary file web/wp-content/plugins/add-to-any/icons/newsvine.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/nowpublic.png Binary file web/wp-content/plugins/add-to-any/icons/nowpublic.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/odeo.png Binary file web/wp-content/plugins/add-to-any/icons/odeo.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/oneview.png Binary file web/wp-content/plugins/add-to-any/icons/oneview.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/openbm.png Binary file web/wp-content/plugins/add-to-any/icons/openbm.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/outlook.png Binary file web/wp-content/plugins/add-to-any/icons/outlook.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/pageflakes.png Binary file web/wp-content/plugins/add-to-any/icons/pageflakes.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/pdf.png Binary file web/wp-content/plugins/add-to-any/icons/pdf.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/phonefavs.png Binary file web/wp-content/plugins/add-to-any/icons/phonefavs.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/ping.png Binary file web/wp-content/plugins/add-to-any/icons/ping.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/plaxo.png Binary file web/wp-content/plugins/add-to-any/icons/plaxo.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/plurk.png Binary file web/wp-content/plugins/add-to-any/icons/plurk.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/plusmo.png Binary file web/wp-content/plugins/add-to-any/icons/plusmo.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/podnova.png Binary file web/wp-content/plugins/add-to-any/icons/podnova.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/printfriendly.png Binary file web/wp-content/plugins/add-to-any/icons/printfriendly.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/propeller.png Binary file web/wp-content/plugins/add-to-any/icons/propeller.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/protopage.png Binary file web/wp-content/plugins/add-to-any/icons/protopage.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/pusha.png Binary file web/wp-content/plugins/add-to-any/icons/pusha.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/rapidfeeds.png Binary file web/wp-content/plugins/add-to-any/icons/rapidfeeds.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/rasasa.png Binary file web/wp-content/plugins/add-to-any/icons/rasasa.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/reader.png Binary file web/wp-content/plugins/add-to-any/icons/reader.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/reddit.png Binary file web/wp-content/plugins/add-to-any/icons/reddit.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/segnalo.png Binary file web/wp-content/plugins/add-to-any/icons/segnalo.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/share.png Binary file web/wp-content/plugins/add-to-any/icons/share.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/shoutwire.png Binary file web/wp-content/plugins/add-to-any/icons/shoutwire.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/shyftr.png Binary file web/wp-content/plugins/add-to-any/icons/shyftr.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/simpy.png Binary file web/wp-content/plugins/add-to-any/icons/simpy.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/sitejot.png Binary file web/wp-content/plugins/add-to-any/icons/sitejot.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/skimbit.png Binary file web/wp-content/plugins/add-to-any/icons/skimbit.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/slashdot.png Binary file web/wp-content/plugins/add-to-any/icons/slashdot.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/smaknews.png Binary file web/wp-content/plugins/add-to-any/icons/smaknews.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/sodahead.png Binary file web/wp-content/plugins/add-to-any/icons/sodahead.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/sofomo.png Binary file web/wp-content/plugins/add-to-any/icons/sofomo.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/spaces.png Binary file web/wp-content/plugins/add-to-any/icons/spaces.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/sphere.png Binary file web/wp-content/plugins/add-to-any/icons/sphere.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/sphinn.png Binary file web/wp-content/plugins/add-to-any/icons/sphinn.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/spurl.png Binary file web/wp-content/plugins/add-to-any/icons/spurl.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/squidoo.png Binary file web/wp-content/plugins/add-to-any/icons/squidoo.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/startaid.png Binary file web/wp-content/plugins/add-to-any/icons/startaid.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/strands.png Binary file web/wp-content/plugins/add-to-any/icons/strands.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/stumbleupon.png Binary file web/wp-content/plugins/add-to-any/icons/stumbleupon.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/stumpedia.png Binary file web/wp-content/plugins/add-to-any/icons/stumpedia.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/symbaloo.png Binary file web/wp-content/plugins/add-to-any/icons/symbaloo.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/taggly.png Binary file web/wp-content/plugins/add-to-any/icons/taggly.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/tagza.png Binary file web/wp-content/plugins/add-to-any/icons/tagza.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/tailrank.png Binary file web/wp-content/plugins/add-to-any/icons/tailrank.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/technet.png Binary file web/wp-content/plugins/add-to-any/icons/technet.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/technorati.png Binary file web/wp-content/plugins/add-to-any/icons/technorati.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/technotizie.png Binary file web/wp-content/plugins/add-to-any/icons/technotizie.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/thefreedictionary.png Binary file web/wp-content/plugins/add-to-any/icons/thefreedictionary.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/thefreelibrary.png Binary file web/wp-content/plugins/add-to-any/icons/thefreelibrary.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/thunderbird.png Binary file web/wp-content/plugins/add-to-any/icons/thunderbird.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/tipd.png Binary file web/wp-content/plugins/add-to-any/icons/tipd.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/toolbar_google.png Binary file web/wp-content/plugins/add-to-any/icons/toolbar_google.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/transparent.gif Binary file web/wp-content/plugins/add-to-any/icons/transparent.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/tumblr.png Binary file web/wp-content/plugins/add-to-any/icons/tumblr.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/twiddla.png Binary file web/wp-content/plugins/add-to-any/icons/twiddla.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/twine.png Binary file web/wp-content/plugins/add-to-any/icons/twine.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/twitter.png Binary file web/wp-content/plugins/add-to-any/icons/twitter.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/txtvox.png Binary file web/wp-content/plugins/add-to-any/icons/txtvox.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/typepad.png Binary file web/wp-content/plugins/add-to-any/icons/typepad.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/uarr.png Binary file web/wp-content/plugins/add-to-any/icons/uarr.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/uarr_wt.png Binary file web/wp-content/plugins/add-to-any/icons/uarr_wt.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/unalog.png Binary file web/wp-content/plugins/add-to-any/icons/unalog.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/viadeo.png Binary file web/wp-content/plugins/add-to-any/icons/viadeo.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/webnews.png Binary file web/wp-content/plugins/add-to-any/icons/webnews.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/webwag.png Binary file web/wp-content/plugins/add-to-any/icons/webwag.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/wikio.png Binary file web/wp-content/plugins/add-to-any/icons/wikio.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/windows_mail.png Binary file web/wp-content/plugins/add-to-any/icons/windows_mail.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/wink.png Binary file web/wp-content/plugins/add-to-any/icons/wink.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/winksite.png Binary file web/wp-content/plugins/add-to-any/icons/winksite.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/wists.png Binary file web/wp-content/plugins/add-to-any/icons/wists.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/wordpress.png Binary file web/wp-content/plugins/add-to-any/icons/wordpress.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/xanga.png Binary file web/wp-content/plugins/add-to-any/icons/xanga.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/xerpi.png Binary file web/wp-content/plugins/add-to-any/icons/xerpi.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/xianguo.png Binary file web/wp-content/plugins/add-to-any/icons/xianguo.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/yahoo.png Binary file web/wp-content/plugins/add-to-any/icons/yahoo.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/yahoomyweb.png Binary file web/wp-content/plugins/add-to-any/icons/yahoomyweb.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/yample.png Binary file web/wp-content/plugins/add-to-any/icons/yample.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/yigg.png Binary file web/wp-content/plugins/add-to-any/icons/yigg.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/yim.png Binary file web/wp-content/plugins/add-to-any/icons/yim.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/yoolink.png Binary file web/wp-content/plugins/add-to-any/icons/yoolink.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/youmob.png Binary file web/wp-content/plugins/add-to-any/icons/youmob.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/yourminis.png Binary file web/wp-content/plugins/add-to-any/icons/yourminis.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/zaptxt.png Binary file web/wp-content/plugins/add-to-any/icons/zaptxt.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/icons/zhuaxia.png Binary file web/wp-content/plugins/add-to-any/icons/zhuaxia.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/languages/add-to-any-ar.mo Binary file web/wp-content/plugins/add-to-any/languages/add-to-any-ar.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/languages/add-to-any-ar.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/add-to-any/languages/add-to-any-ar.po Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,252 @@ +msgid "" +msgstr "" +"Project-Id-Version: add-to-any\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-12-18 00:13-0800\n" +"PO-Revision-Date: \n" +"Last-Translator: Hazem Khaled \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-KeywordsList: __;_e\n" +"X-Poedit-Basepath: ../\n" +"X-Poedit-SearchPath-0: .\n" + +#: add-to-any.php:211 +msgid "Share" +msgstr "نشر" + +#: add-to-any.php:212 +msgid "Save" +msgstr "حفظ" + +#: add-to-any.php:213 +msgid "Subscribe" +msgstr "تابع" + +#: add-to-any.php:214 +msgid "E-mail" +msgstr "رسالة بريدية" + +#: add-to-any.php:215 +msgid "Bookmark" +msgstr "مفضلة" + +#: add-to-any.php:216 +msgid "Show all" +msgstr "عرض الكل" + +#: add-to-any.php:217 +msgid "Show less" +msgstr "عرض أقل" + +#: add-to-any.php:218 +msgid "Find service(s)" +msgstr "أبحث عن خدمة" + +#: add-to-any.php:219 +msgid "Instantly find any service to add to" +msgstr "" + +#: add-to-any.php:220 +msgid "Powered by" +msgstr "بواسطة" + +#: add-to-any.php:221 +msgid "Share via e-mail" +msgstr "أرسال على البريد" + +#: add-to-any.php:222 +msgid "Subscribe via e-mail" +msgstr "تابع عبر البريد" + +#: add-to-any.php:223 +msgid "Bookmark in your browser" +msgstr "أضف للمفضلة بالمتصفح" + +#: add-to-any.php:224 +msgid "Press Ctrl+D or ⌘+D to bookmark this page" +msgstr "أضغط Ctrl+D أو ⌘+D لحفظ هذه الصفحة بالمفضلة" + +#: add-to-any.php:225 +msgid "Add to your favorites" +msgstr "أضف لمفضلتك" + +#: add-to-any.php:226 +msgid "Send from any e-mail address or e-mail program" +msgstr "أرسال من اي برنامج بريد أو أي عنوان بريدي" + +#: add-to-any.php:227 +msgid "E-mail program" +msgstr "برنامج بريدي" + +#: add-to-any.php:252 +msgid "Your theme needs to be fixed. To fix your theme, use the Theme Editor to insert <?php wp_footer(); ?> just before the </body> line of your theme's footer.php file." +msgstr "تصميمك يحتاج لتعديلز لتعديل تصميمك, أستخدم محرر التصميم لإضافة <?php wp_footer(); ?> just before the </body> في ملف footer.php." + +#: add-to-any.php:390 +#: add-to-any.php:461 +#: add-to-any.php:465 +#: add-to-any.php:469 +#: add-to-any.php:473 +#: add-to-any.php:505 +#, fuzzy +msgid "Share/Bookmark" +msgstr "مفضلة" + +#: add-to-any.php:404 +msgid "Settings saved." +msgstr "تم حفظ الأعدادات" + +#: add-to-any.php:415 +msgid "Add to Any: Share/Save " +msgstr "أضف إلى: نشر/حفظ" + +#: add-to-any.php:415 +#: add-to-any.php:775 +#: add-to-any.php:796 +msgid "Settings" +msgstr "الأعدادات" + +#: add-to-any.php:425 +msgid "Standalone Services" +msgstr "خدمات قائمة بذاتها" + +#: add-to-any.php:430 +msgid "Choose the services you want below.  Click a chosen service again to remove.  Reorder services by dragging and dropping as they appear above." +msgstr "أختر الخدمات من الأسفل.   أضغط لتختار الخدمة وأضغط مرة اخرى لألغائها.   رتب الخدمات بأستخدام الفائرة." + +#: add-to-any.php:456 +msgid "Button" +msgstr "زر" + +#: add-to-any.php:495 +msgid "Image URL" +msgstr "رابط صورة" + +#: add-to-any.php:502 +msgid "Text only" +msgstr "نص فقط" + +#: add-to-any.php:510 +msgid "Placement" +msgstr "مكان العرض" + +#: add-to-any.php:519 +msgid "Display Share/Save button at the bottom of posts" +msgstr "عرض زر نشر/حفظ في اخر تدويناتك" + +#: add-to-any.php:526 +msgid "Display Share/Save button at the bottom of posts on the front page" +msgstr "عرض زر نشر/حفظ في اخر تدويناتك بالرئيسية" + +#: add-to-any.php:533 +msgid "Display Share/Save button at the bottom of posts in the feed" +msgstr "عرض زر نشر/حفظ في اخر تدويناتك بالخلاصات" + +#: add-to-any.php:537 +msgid "Display Share/Save button at the bottom of pages" +msgstr "عرض زر نشر/حفظ في أخر الصفحات" + +#: add-to-any.php:541 +#, fuzzy +msgid "If unchecked, be sure to place the following code in your template pages (within index.php, single.php, and/or page.php)" +msgstr "إن لم تختار احد هذه الخيارات فتأكد ان تضع الكود بواسطة محرر التصميم (في index.php, single.php, و/أو page.php)" + +#: add-to-any.php:550 +msgid "Menu Style" +msgstr "تصميم القائمة" + +#: add-to-any.php:552 +msgid "Using Add to Any's Menu Styler, you can customize the colors of your Share/Save menu! When you're done, be sure to paste the generated code in the Additional Options box below." +msgstr "أستخدم محرر تصميم أضف إلى, يمكنك تخصيص الألوان لقائمة نشر/حفظ! عند إنتهائك, تأكد من لصق الكود في مربع الخيارات الخاصة" + +#: add-to-any.php:554 +msgid "Open the Add to Any Menu Styler in a new window" +msgstr "فتح قائمة تصميم أضف إلى في نافذة جديدة" + +#: add-to-any.php:556 +msgid "Open Menu Styler" +msgstr "فتح قائمة التصميم" + +#: add-to-any.php:561 +msgid "Menu Options" +msgstr "خيارات القائمة" + +#: add-to-any.php:566 +msgid "Hide embedded objects (Flash, video, etc.) that intersect with the menu when displayed" +msgstr "أخفاء (الفلاشات والفيديو و ... الخ) التي تتقاطع مع القائمة" + +#: add-to-any.php:571 +msgid "Show the title of the post (or page) within the menu" +msgstr "عرض عنوان التدوينة او الصفحة في القائمة" + +#: add-to-any.php:578 +msgid "Only show the menu when the user clicks the Share/Save button" +msgstr "عرض القائمة عن الضغط عليها فقط" + +#: add-to-any.php:584 +msgid "Open the addtoany.com menu page in a new tab or window if the user clicks the Share/Save button" +msgstr "فتح موقع addtoany.com عند ضغط الزائر على زر نشر/حفظ" + +#: add-to-any.php:589 +msgid "Additional Options" +msgstr "خيارات خاصة" + +#: add-to-any.php:593 +msgid "Paste the code from Add to Any's Menu Styler in the box below!" +msgstr "ألصق الكود من قائمة تصميم أضف إلى في هذا المربع" + +#: add-to-any.php:597 +msgid "Below you can set special JavaScript variables to apply to each Share/Save menu." +msgstr "يمكنك ضبط متغيرات جافا سكريبت خاصة لتنفيزها على قائمة نشر/حفظ" + +#: add-to-any.php:598 +msgid "Advanced users might want to explore Add to Any's JavaScript API." +msgstr "المستخدمين المتقدمين قد يحتاجون إلى تصفح أضف إلى جافا سكريبت API." + +#: add-to-any.php:604 +msgid "Note: If you're adding new code, be careful not to accidentally overwrite any previous code." +msgstr "ملحوظة: إذا أضفت اكواد جديدة, كن حزر حتى لا تمسح اكواد قديمة." + +#: add-to-any.php:611 +msgid "Save Changes" +msgstr "حفظ التغيرات" + +#: add-to-any.php:616 +msgid "Like this plugin?" +msgstr "هل تحب هذه الأضافة؟" + +#: add-to-any.php:617 +msgid "Give it a good rating on WordPress.org." +msgstr "قيمها في موقع WordPress.org." + +#: add-to-any.php:618 +msgid "Share it with your friends." +msgstr "أنشرها مع أصدقائك." + +#: add-to-any.php:620 +msgid "Need support?" +msgstr "بحاجة إلى الدعم؟" + +#: add-to-any.php:621 +msgid "See the FAQs." +msgstr "راجع الأسئلة الشائعة." + +#: add-to-any.php:622 +msgid "Search the support forums." +msgstr "أبحث في منتديات الدعم." + +#: add-to-any.php:729 +msgid "Add/Remove Services" +msgstr "إضافة/ألغاء خدمات" + +#: add-to-any.php:775 +msgid "Share/Save" +msgstr "نشر/حفظ" + +#: add-to-any.php:776 +msgid "Share/Save Buttons" +msgstr "أزرار نشر/حفظ" + diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/languages/add-to-any-be.mo Binary file web/wp-content/plugins/add-to-any/languages/add-to-any-be.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/languages/add-to-any-be.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/add-to-any/languages/add-to-any-be.po Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,259 @@ +msgid "" +msgstr "" +"Project-Id-Version: add-to-any\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-12-18 00:13-0800\n" +"PO-Revision-Date: \n" +"Last-Translator: MicroPat\n" +"Language-Team: Marcis Gasuns \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-KeywordsList: __;_e\n" +"X-Poedit-Basepath: ../\n" +"X-Poedit-Language: Belarusian\n" +"X-Poedit-Country: BELARUS\n" +"X-Poedit-SearchPath-0: .\n" + +#: add-to-any.php:211 +msgid "Share" +msgstr "Падзяліць" + +#: add-to-any.php:212 +msgid "Save" +msgstr "Захаваць" + +#: add-to-any.php:213 +msgid "Subscribe" +msgstr "Падпісацца" + +#: add-to-any.php:214 +msgid "E-mail" +msgstr "Электоронная пошта" + +#: add-to-any.php:215 +msgid "Bookmark" +msgstr "Закладка" + +#: add-to-any.php:216 +msgid "Show all" +msgstr "Паказаць усё" + +#: add-to-any.php:217 +msgid "Show less" +msgstr "Паказаць менш" + +#: add-to-any.php:218 +msgid "Find service(s)" +msgstr "Знайсці паслугу(і)" + +#: add-to-any.php:219 +msgid "Instantly find any service to add to" +msgstr "Імгненна знайсці яку-небудзь паслугу, каб дадаць да" + +#: add-to-any.php:220 +msgid "Powered by" +msgstr "Кіруецца" + +#: add-to-any.php:221 +msgid "Share via e-mail" +msgstr "Адправіць па электроннай пошце" + +#: add-to-any.php:222 +msgid "Subscribe via e-mail" +msgstr "Падпісацца па электроннай пошце" + +#: add-to-any.php:223 +msgid "Bookmark in your browser" +msgstr "Закладка ў вашым браузеры" + +#: add-to-any.php:224 +#, fuzzy +msgid "Press Ctrl+D or ⌘+D to bookmark this page" +msgstr "Націсніце Ctrl+D ці Cmd+D, каб стварыць закладку гэтай старонкі" + +#: add-to-any.php:225 +msgid "Add to your favorites" +msgstr "Дадаць у выбранае" + +#: add-to-any.php:226 +msgid "Send from any e-mail address or e-mail program" +msgstr "Адправіць з любога пошатовага адрасу ці з паштовай праграмы" + +#: add-to-any.php:227 +msgid "E-mail program" +msgstr "Паштовая праграма" + +#: add-to-any.php:252 +msgid "Your theme needs to be fixed. To fix your theme, use the Theme Editor to insert <?php wp_footer(); ?> just before the </body> line of your theme's footer.php file." +msgstr "Ваша тэма павінна быць выпраўленая. Каб выправіць вашу тэму, выкарыстайце Тэма рэдактар , каб уставіць незадоўга да лінію вашай тэмы footer.php файл." + +#: add-to-any.php:390 +#: add-to-any.php:461 +#: add-to-any.php:465 +#: add-to-any.php:469 +#: add-to-any.php:473 +#: add-to-any.php:505 +#, fuzzy +msgid "Share/Bookmark" +msgstr "Закладка" + +#: add-to-any.php:404 +msgid "Settings saved." +msgstr "Наладкі захаваны" + +#: add-to-any.php:415 +msgid "Add to Any: Share/Save " +msgstr "Дадаць у любое: падзяліць/захаваць" + +#: add-to-any.php:415 +#: add-to-any.php:775 +#: add-to-any.php:796 +msgid "Settings" +msgstr "Наладкі" + +#: add-to-any.php:425 +#, fuzzy +msgid "Standalone Services" +msgstr "Дадаць/Выдаліць паслугі" + +#: add-to-any.php:430 +msgid "Choose the services you want below.  Click a chosen service again to remove.  Reorder services by dragging and dropping as they appear above." +msgstr "" + +#: add-to-any.php:456 +msgid "Button" +msgstr "Клавіша" + +#: add-to-any.php:495 +msgid "Image URL" +msgstr "URL de l'imatge" + +#: add-to-any.php:502 +msgid "Text only" +msgstr "Толькт тэкст" + +#: add-to-any.php:510 +msgid "Placement" +msgstr "Размяшчэнне" + +#: add-to-any.php:519 +msgid "Display Share/Save button at the bottom of posts" +msgstr "Паказаць клавішу Адкрыць / Захаваць унізе запісаў" + +#: add-to-any.php:526 +msgid "Display Share/Save button at the bottom of posts on the front page" +msgstr "Паказаць клавішу Адкрыць/Захаваць унізе запісаў на тытульнай старонцы" + +#: add-to-any.php:533 +msgid "Display Share/Save button at the bottom of posts in the feed" +msgstr "" + +#: add-to-any.php:537 +msgid "Display Share/Save button at the bottom of pages" +msgstr "Паказаць клавішу Адкрыць/Захаваць унізе старонак" + +#: add-to-any.php:541 +#, fuzzy +msgid "If unchecked, be sure to place the following code in your template pages (within index.php, single.php, and/or page.php)" +msgstr "Калі яе не спыніць, то не забудзьцеся змясціць наступны код у шаблон старонкі index.php , сінгл. PHP і / або page.php ) \t\t \t" + +#: add-to-any.php:550 +msgid "Menu Style" +msgstr "Стыль меню" + +#: add-to-any.php:552 +msgid "Using Add to Any's Menu Styler, you can customize the colors of your Share/Save menu! When you're done, be sure to paste the generated code in the Additional Options box below." +msgstr "Выкарыстанне Дадаць у любое меню Styler, вы можаце наладзіць колеры вашага Адкрыць / Захаваць мяню! Калі вы скончыце, не забудзьцеся ўставіць генераваны код у Дадатковыя параметры ніжэй." + +#: add-to-any.php:554 +msgid "Open the Add to Any Menu Styler in a new window" +msgstr "Адкрыць Дадаць у меню Styler у новым акне" + +#: add-to-any.php:556 +msgid "Open Menu Styler" +msgstr "Адкрыць меню Styler" + +#: add-to-any.php:561 +msgid "Menu Options" +msgstr "Меню опцый" + +#: add-to-any.php:566 +msgid "Hide embedded objects (Flash, video, etc.) that intersect with the menu when displayed" +msgstr "Схаваць убудаваыях аб'екты (Flash, відэа і г.д.), якія перасякаюцца з меню пры адлюстраванні" + +#: add-to-any.php:571 +msgid "Show the title of the post (or page) within the menu" +msgstr "Паказаць назву запісу(альбо старонкі) без меню" + +#: add-to-any.php:578 +msgid "Only show the menu when the user clicks the Share/Save button" +msgstr " Паказваць толькі меню, калі карыстальнік клікае клавішу Адкрыць/Захаваць" + +#: add-to-any.php:584 +msgid "Open the addtoany.com menu page in a new tab or window if the user clicks the Share/Save button" +msgstr "Адкрыць меню addtoany.com старонкі ў новую ўкладку або акно, калі карыстальнік націскае кнопку Адкрыць/ Захаваць \t\t \t" + +#: add-to-any.php:589 +msgid "Additional Options" +msgstr "Дадатковыя Опцыі" + +#: add-to-any.php:593 +msgid "Paste the code from Add to Any's Menu Styler in the box below!" +msgstr "Уставіць код з Дадаць у любое меню Styler у поле ніжэй!" + +#: add-to-any.php:597 +msgid "Below you can set special JavaScript variables to apply to each Share/Save menu." +msgstr "Ніжэй вы можаце ўсталяваць адмысловы JavaScript, які будзе ўжывацца да кожнага Адкрыць / Захаваць меню." + +#: add-to-any.php:598 +msgid "Advanced users might want to explore Add to Any's JavaScript API." +msgstr "Дасведчаныя карыстальнікі, магчыма, пажадаюць вывучыць Дадаць у JavaScript API ." + +#: add-to-any.php:604 +msgid "Note: If you're adding new code, be careful not to accidentally overwrite any previous code." +msgstr "Note: If you're adding new code, be careful not to accidentally overwrite any previous code.Заўвага : Калі Вы дадаеце новы код, будзьце ўважлівыя і не перапішыце выпадкова любы папярэдні код." + +#: add-to-any.php:611 +msgid "Save Changes" +msgstr "Захаваць змены" + +#: add-to-any.php:616 +msgid "Like this plugin?" +msgstr "Як і гэты плагін?" + +#: add-to-any.php:617 +msgid "Give it a good rating on WordPress.org." +msgstr "" + +#: add-to-any.php:618 +msgid "Share it with your friends." +msgstr "" + +#: add-to-any.php:620 +msgid "Need support?" +msgstr "Патрэбна падтрымка?" + +#: add-to-any.php:621 +msgid "See the FAQs." +msgstr "Паглядзіце FAQs." + +#: add-to-any.php:622 +msgid "Search the support forums." +msgstr "Пошук support forums." + +#: add-to-any.php:729 +msgid "Add/Remove Services" +msgstr "Дадаць/Выдаліць паслугі" + +#: add-to-any.php:775 +msgid "Share/Save" +msgstr "Адкрыць/Захаваць" + +#: add-to-any.php:776 +msgid "Share/Save Buttons" +msgstr "Кнопка Адкрыць/Захаваць" + +#~ msgid "Services" +#~ msgstr "Паслугі" + diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/languages/add-to-any-ca.mo Binary file web/wp-content/plugins/add-to-any/languages/add-to-any-ca.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/languages/add-to-any-ca.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/add-to-any/languages/add-to-any-ca.po Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,256 @@ +msgid "" +msgstr "" +"Project-Id-Version: add-to-any\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-12-18 00:13-0800\n" +"PO-Revision-Date: \n" +"Last-Translator: Robert Buj Gelonch \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-KeywordsList: __;_e\n" +"X-Poedit-Basepath: ../\n" +"X-Poedit-Language: Catalan\n" +"X-Poedit-Country: SPAIN\n" +"X-Poedit-SearchPath-0: .\n" + +#: add-to-any.php:211 +msgid "Share" +msgstr "Compartir" + +#: add-to-any.php:212 +msgid "Save" +msgstr "Desar" + +#: add-to-any.php:213 +msgid "Subscribe" +msgstr "Subscriure's" + +#: add-to-any.php:214 +msgid "E-mail" +msgstr "Correu electrònic" + +#: add-to-any.php:215 +msgid "Bookmark" +msgstr "Preferit" + +#: add-to-any.php:216 +msgid "Show all" +msgstr "Mostrar tots" + +#: add-to-any.php:217 +msgid "Show less" +msgstr "Mostrar menys" + +#: add-to-any.php:218 +msgid "Find service(s)" +msgstr "Buscar servei(s)" + +#: add-to-any.php:219 +msgid "Instantly find any service to add to" +msgstr "Trobar instantàniament qualsevol servei per a afegir a" + +#: add-to-any.php:220 +msgid "Powered by" +msgstr "Potenciat per" + +#: add-to-any.php:221 +msgid "Share via e-mail" +msgstr "Compartir per correu electrònic" + +#: add-to-any.php:222 +msgid "Subscribe via e-mail" +msgstr "Subscriure per correu electrònic" + +#: add-to-any.php:223 +msgid "Bookmark in your browser" +msgstr "Afegir l'adreça d'interès al vostre navegador" + +#: add-to-any.php:224 +msgid "Press Ctrl+D or ⌘+D to bookmark this page" +msgstr "Pressioneu Ctrl+D o ⌘+D per afegir a preferits aquesta pàgina" + +#: add-to-any.php:225 +msgid "Add to your favorites" +msgstr "Afegir als vostres favorits" + +#: add-to-any.php:226 +msgid "Send from any e-mail address or e-mail program" +msgstr "Enviar des de qualsevol adreça de correu electrònic o programa de correu electrònic" + +#: add-to-any.php:227 +msgid "E-mail program" +msgstr "Programa de correu electrònic" + +#: add-to-any.php:252 +msgid "Your theme needs to be fixed. To fix your theme, use the Theme Editor to insert <?php wp_footer(); ?> just before the </body> line of your theme's footer.php file." +msgstr "El vostre tema ha de ser corregit. per corregir-lo, utilitzeu l'Editor de tema per afegir <?php wp_footer(); ?> justament abans de la línia </body> del vostre tema al fitxer footer.php." + +#: add-to-any.php:390 +#: add-to-any.php:461 +#: add-to-any.php:465 +#: add-to-any.php:469 +#: add-to-any.php:473 +#: add-to-any.php:505 +#, fuzzy +msgid "Share/Bookmark" +msgstr "Preferit" + +#: add-to-any.php:404 +msgid "Settings saved." +msgstr "Preferències desades." + +#: add-to-any.php:415 +msgid "Add to Any: Share/Save " +msgstr "Add to Any: Compartir/Desar " + +#: add-to-any.php:415 +#: add-to-any.php:775 +#: add-to-any.php:796 +msgid "Settings" +msgstr "Preferències" + +#: add-to-any.php:425 +msgid "Standalone Services" +msgstr "Serveis integrats" + +#: add-to-any.php:430 +msgid "Choose the services you want below.  Click a chosen service again to remove.  Reorder services by dragging and dropping as they appear above." +msgstr "Seleccioneu els serveis que voleu a continuació.  Cliqueu a un servei de nou per eliminar-lo.  Reordeneu els serveis arrossegant-los i deixant-los en l'ordre que desitgeu." + +#: add-to-any.php:456 +msgid "Button" +msgstr "Botó" + +#: add-to-any.php:495 +msgid "Image URL" +msgstr "URL de la imatge" + +#: add-to-any.php:502 +msgid "Text only" +msgstr "Només text" + +#: add-to-any.php:510 +msgid "Placement" +msgstr "Emplaçament" + +#: add-to-any.php:519 +msgid "Display Share/Save button at the bottom of posts" +msgstr "Mostrar el botó de Compartir/Desar sota tots els escrits" + +#: add-to-any.php:526 +msgid "Display Share/Save button at the bottom of posts on the front page" +msgstr "Mostrar el botó de Compartir/Desar a la pàgina principal" + +#: add-to-any.php:533 +msgid "Display Share/Save button at the bottom of posts in the feed" +msgstr "Mostrar el botó de Compartir/Desar sota tots els escrits al feed" + +#: add-to-any.php:537 +msgid "Display Share/Save button at the bottom of pages" +msgstr "Mostrar el botó de Compartir/Desar sota les pàgines" + +#: add-to-any.php:541 +msgid "If unchecked, be sure to place the following code in your template pages (within index.php, single.php, and/or page.php)" +msgstr "Si no està habilitat s'ha d'afegir el següent codi a les vostres pàgines de plantilla (dins de index.php, single.php, i/o page.php)" + +#: add-to-any.php:550 +msgid "Menu Style" +msgstr "Estil del menú" + +#: add-to-any.php:552 +msgid "Using Add to Any's Menu Styler, you can customize the colors of your Share/Save menu! When you're done, be sure to paste the generated code in the Additional Options box below." +msgstr "Utilitzant el personalitzador d'estil de Add to Any, vostè pot personalitzar els colors del vostre menú Compartir/Desar! Quan hageu acabat, heu de copiar el codi generat al recuadre d'opcions adicionals de sota." + +#: add-to-any.php:554 +msgid "Open the Add to Any Menu Styler in a new window" +msgstr "Obrir el personalitzador d'estil de Add to Any a una nova finestra" + +#: add-to-any.php:556 +msgid "Open Menu Styler" +msgstr "Obrir el personalitzador d'estils" + +#: add-to-any.php:561 +msgid "Menu Options" +msgstr "Opcions del menú" + +#: add-to-any.php:566 +msgid "Hide embedded objects (Flash, video, etc.) that intersect with the menu when displayed" +msgstr "Amagar objectes incrustats (Flash, vídeo, etc) que interseccionin amb el menú quan aquest aparegui" + +#: add-to-any.php:571 +msgid "Show the title of the post (or page) within the menu" +msgstr "Mostrar el títol de l'entrada (o de la pàgina) dins del menú" + +#: add-to-any.php:578 +msgid "Only show the menu when the user clicks the Share/Save button" +msgstr "Mostrar el menú solament quan un usuari cliqui sobre el botó Compartir/Desar" + +#: add-to-any.php:584 +msgid "Open the addtoany.com menu page in a new tab or window if the user clicks the Share/Save button" +msgstr "Obrir el menú de addtoany.com en una nova pestanya o finestra si l'usuari clica al botó Compartir/Desar" + +#: add-to-any.php:589 +msgid "Additional Options" +msgstr "Opcions addicionals" + +#: add-to-any.php:593 +msgid "Paste the code from Add to Any's Menu Styler in the box below!" +msgstr "Enganxeu el codi del personalitzador d'estil al següent requadre!" + +#: add-to-any.php:597 +msgid "Below you can set special JavaScript variables to apply to each Share/Save menu." +msgstr "A continuació, podeu establir variables especials de JavaScript per aplicar a cada menú Compartir/Desar." + +#: add-to-any.php:598 +msgid "Advanced users might want to explore Add to Any's JavaScript API." +msgstr "Els usuaris avançats poden preferir explorar l'API JavaScript de Add to Any." + +#: add-to-any.php:604 +msgid "Note: If you're adding new code, be careful not to accidentally overwrite any previous code." +msgstr "Nota: Si heu d'afegir un nou codi, tingueu cura de no sobreescriure accidentalment qualsevol codi anterior." + +#: add-to-any.php:611 +msgid "Save Changes" +msgstr "Desar els canvis" + +#: add-to-any.php:616 +msgid "Like this plugin?" +msgstr "Com aquesta extensió?" + +#: add-to-any.php:617 +msgid "Give it a good rating on WordPress.org." +msgstr "Doneu-li una bona qualificació a WordPress.org." + +#: add-to-any.php:618 +msgid "Share it with your friends." +msgstr "Compartiu-lo amb els vostres amics." + +#: add-to-any.php:620 +msgid "Need support?" +msgstr "Necessiteu suport?" + +#: add-to-any.php:621 +msgid "See the FAQs." +msgstr "Vegeu les Preguntes més freqüents." + +#: add-to-any.php:622 +msgid "Search the support forums." +msgstr "Cercar als fòrums de suport." + +#: add-to-any.php:729 +msgid "Add/Remove Services" +msgstr "Serveis Compartir/Desar" + +#: add-to-any.php:775 +msgid "Share/Save" +msgstr "Compartir/Desar" + +#: add-to-any.php:776 +msgid "Share/Save Buttons" +msgstr "Botons de Compartir/Desar" + +#~ msgid "Services" +#~ msgstr "Serveis" + diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/languages/add-to-any-da_DK.mo Binary file web/wp-content/plugins/add-to-any/languages/add-to-any-da_DK.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/languages/add-to-any-da_DK.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/add-to-any/languages/add-to-any-da_DK.po Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,261 @@ +msgid "" +msgstr "" +"Project-Id-Version: Add to Any Share/Save/Bookmark .9.8.9.2\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-12-18 00:13-0800\n" +"PO-Revision-Date: \n" +"Last-Translator: MicroPat\n" +"Language-Team: Team Blogos \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: Danish\n" +"X-Poedit-Country: DENMARK\n" +"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_c;__ngettext_noop:1,2\n" +"X-Poedit-Basepath: ../\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-SearchPath-0: .\n" + +#: add-to-any.php:211 +msgid "Share" +msgstr "Del" + +#: add-to-any.php:212 +msgid "Save" +msgstr "Gem" + +#: add-to-any.php:213 +msgid "Subscribe" +msgstr "Subskribér" + +#: add-to-any.php:214 +msgid "E-mail" +msgstr "E-mail" + +#: add-to-any.php:215 +msgid "Bookmark" +msgstr "Bogmærk" + +#: add-to-any.php:216 +msgid "Show all" +msgstr "Vis alle" + +#: add-to-any.php:217 +msgid "Show less" +msgstr "Vis mindre" + +#: add-to-any.php:218 +msgid "Find service(s)" +msgstr "Find service(s)" + +#: add-to-any.php:219 +msgid "Instantly find any service to add to" +msgstr "Find øjeblikkelig alle services at tilføje til" + +#: add-to-any.php:220 +msgid "Powered by" +msgstr "Kører på" + +#: add-to-any.php:221 +msgid "Share via e-mail" +msgstr "Del via e-mail" + +#: add-to-any.php:222 +msgid "Subscribe via e-mail" +msgstr "Subskribér via e-mail" + +#: add-to-any.php:223 +msgid "Bookmark in your browser" +msgstr "Bogmærk i din browswer" + +#: add-to-any.php:224 +#, fuzzy +msgid "Press Ctrl+D or ⌘+D to bookmark this page" +msgstr "Press Ctrl-D eller Cmd-D for at bogmærke denne side" + +#: add-to-any.php:225 +msgid "Add to your favorites" +msgstr "Tilføj til dine favoritter" + +#: add-to-any.php:226 +msgid "Send from any e-mail address or e-mail program" +msgstr "Send fra enhver e-mail-adreses eller e-mail-program" + +#: add-to-any.php:227 +msgid "E-mail program" +msgstr "E-mail-program" + +#: add-to-any.php:252 +msgid "Your theme needs to be fixed. To fix your theme, use the Theme Editor to insert <?php wp_footer(); ?> just before the </body> line of your theme's footer.php file." +msgstr "Dit tema skal repareres. For at gøre det skal du bruge temaeditoren til at indsætte koden <?php wp_footer(); ?> lige før </body>-linjen i dit temas footer.php-fil." + +#: add-to-any.php:390 +#: add-to-any.php:461 +#: add-to-any.php:465 +#: add-to-any.php:469 +#: add-to-any.php:473 +#: add-to-any.php:505 +#, fuzzy +msgid "Share/Bookmark" +msgstr "Bogmærk" + +#: add-to-any.php:404 +msgid "Settings saved." +msgstr "Indstillinger gemt" + +#: add-to-any.php:415 +msgid "Add to Any: Share/Save " +msgstr "Tilføj til enhver: Del/gem" + +#: add-to-any.php:415 +#: add-to-any.php:775 +#: add-to-any.php:796 +msgid "Settings" +msgstr "Indstillinger" + +#: add-to-any.php:425 +#, fuzzy +msgid "Standalone Services" +msgstr "Tilføj/fjern tjenesteudbydere" + +#: add-to-any.php:430 +msgid "Choose the services you want below.  Click a chosen service again to remove.  Reorder services by dragging and dropping as they appear above." +msgstr "Vælg de tjenesteudbydere, du ønsker. Klik på en tjenesteudbyder, du har valgt, for at fjerne den igen. Du kan ændre rækkefølgen ved at trække og slippe, sådan som du ser dem ovenfor (når de er valgt)." + +#: add-to-any.php:456 +msgid "Button" +msgstr "Knap" + +#: add-to-any.php:495 +msgid "Image URL" +msgstr "Billed-URL" + +#: add-to-any.php:502 +msgid "Text only" +msgstr "Kun tekst" + +#: add-to-any.php:510 +msgid "Placement" +msgstr "Placering" + +#: add-to-any.php:519 +msgid "Display Share/Save button at the bottom of posts" +msgstr "Vis Del-/Gem-knap i bunden af indlæg" + +#: add-to-any.php:526 +msgid "Display Share/Save button at the bottom of posts on the front page" +msgstr "Vis Del-/Gem-knap i bunden af indlæg på forsiden" + +#: add-to-any.php:533 +msgid "Display Share/Save button at the bottom of posts in the feed" +msgstr "Vis Del-/Gem-knap i bunden af indlæg i feeds" + +#: add-to-any.php:537 +msgid "Display Share/Save button at the bottom of pages" +msgstr "Vis Del-/Gem-knap i bunden af sider" + +#: add-to-any.php:541 +#, fuzzy +msgid "If unchecked, be sure to place the following code in your template pages (within index.php, single.php, and/or page.php)" +msgstr "Hvis du ikke vælger dette, skal du sørge for at placere den følgende kode i dine skabelonsider (i index.php, single.php, og/eller page.php)" + +#: add-to-any.php:550 +msgid "Menu Style" +msgstr "Menutypografi" + +#: add-to-any.php:552 +msgid "Using Add to Any's Menu Styler, you can customize the colors of your Share/Save menu! When you're done, be sure to paste the generated code in the Additional Options box below." +msgstr "Ved at bruge Add to Any's menutypograf, kan du tilpasse farverne på din Del-/Gem-menu! Når du er færdig, skal du sørge for at indsætte den genererede kode i Yderligere indstillinger-boksen nedenfor." + +#: add-to-any.php:554 +msgid "Open the Add to Any Menu Styler in a new window" +msgstr "Åben Add to Any's menutypograf i et nyt vindue" + +#: add-to-any.php:556 +msgid "Open Menu Styler" +msgstr "Åben menutypografen" + +#: add-to-any.php:561 +msgid "Menu Options" +msgstr "Menuvalgmuligheder" + +#: add-to-any.php:566 +msgid "Hide embedded objects (Flash, video, etc.) that intersect with the menu when displayed" +msgstr "Skjul indlejrede objekter (flash, video, osv.) som kan påvirke menuen, når den vises" + +#: add-to-any.php:571 +msgid "Show the title of the post (or page) within the menu" +msgstr "Vis titlen på indlægget (eller siden) i menuen" + +#: add-to-any.php:578 +msgid "Only show the menu when the user clicks the Share/Save button" +msgstr "Vis kun menuen når bruger klikker på Del-/Gem-knappen" + +#: add-to-any.php:584 +msgid "Open the addtoany.com menu page in a new tab or window if the user clicks the Share/Save button" +msgstr "Åben menusiden på addtoany.com i en ny fane eller vindue hvis brugeren klikker på Del-/Gem-knappen" + +#: add-to-any.php:589 +msgid "Additional Options" +msgstr "Yderligere indstillinger" + +#: add-to-any.php:593 +msgid "Paste the code from Add to Any's Menu Styler in the box below!" +msgstr "Indsæt koden fra Add to Any's menutypograf i boksen nedenfor!" + +#: add-to-any.php:597 +msgid "Below you can set special JavaScript variables to apply to each Share/Save menu." +msgstr "Nedenfor kan du angive specielle JavaScript-variabler, som skal bruges på din Del-/Gem-menu." + +#: add-to-any.php:598 +msgid "Advanced users might want to explore Add to Any's JavaScript API." +msgstr "Avancerede brugere kan se nærmere på Add to Any's JavaScript API." + +#: add-to-any.php:604 +msgid "Note: If you're adding new code, be careful not to accidentally overwrite any previous code." +msgstr "Bemærk: Hvis du tilføjer ny kode, så vær forsigtig, så du ikke ved et uheld overskriver eksisterende kode." + +#: add-to-any.php:611 +msgid "Save Changes" +msgstr "Gem ændringer" + +#: add-to-any.php:616 +msgid "Like this plugin?" +msgstr "Kan du lide dette plugin?" + +#: add-to-any.php:617 +msgid "Give it a good rating on WordPress.org." +msgstr "Giv det en god bedømmelse på WordPress.org." + +#: add-to-any.php:618 +msgid "Share it with your friends." +msgstr "Del det med dine venner." + +#: add-to-any.php:620 +msgid "Need support?" +msgstr "Har du brug for support?" + +#: add-to-any.php:621 +msgid "See the FAQs." +msgstr "Se vores FAQ (Ofte Stillede Spørgsmål)." + +#: add-to-any.php:622 +msgid "Search the support forums." +msgstr "Søg på supportforummerne." + +#: add-to-any.php:729 +msgid "Add/Remove Services" +msgstr "Tilføj/fjern tjenesteudbydere" + +#: add-to-any.php:775 +msgid "Share/Save" +msgstr "Del/Gem" + +#: add-to-any.php:776 +msgid "Share/Save Buttons" +msgstr "Del-/Gem-knapper" + +#~ msgid "Services" +#~ msgstr "Tjenesteudbydere" + diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/languages/add-to-any-de.mo Binary file web/wp-content/plugins/add-to-any/languages/add-to-any-de.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/languages/add-to-any-de.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/add-to-any/languages/add-to-any-de.po Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,255 @@ +msgid "" +msgstr "" +"Project-Id-Version: add-to-any\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-12-18 00:13-0800\n" +"PO-Revision-Date: \n" +"Last-Translator: MicroPat\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-KeywordsList: __;_e\n" +"X-Poedit-Basepath: ../\n" +"X-Poedit-SearchPath-0: .\n" + +#: add-to-any.php:211 +msgid "Share" +msgstr "" + +#: add-to-any.php:212 +msgid "Save" +msgstr "" + +#: add-to-any.php:213 +msgid "Subscribe" +msgstr "" + +#: add-to-any.php:214 +msgid "E-mail" +msgstr "" + +#: add-to-any.php:215 +msgid "Bookmark" +msgstr "" + +#: add-to-any.php:216 +msgid "Show all" +msgstr "Alle anzeigen" + +#: add-to-any.php:217 +msgid "Show less" +msgstr "" + +#: add-to-any.php:218 +msgid "Find service(s)" +msgstr "Dienst(e) suchen" + +#: add-to-any.php:219 +msgid "Instantly find any service to add to" +msgstr "" + +#: add-to-any.php:220 +msgid "Powered by" +msgstr "" + +#: add-to-any.php:221 +msgid "Share via e-mail" +msgstr "" + +#: add-to-any.php:222 +msgid "Subscribe via e-mail" +msgstr "" + +#: add-to-any.php:223 +msgid "Bookmark in your browser" +msgstr "" + +#: add-to-any.php:224 +#, fuzzy +msgid "Press Ctrl+D or ⌘+D to bookmark this page" +msgstr "Seite mit Ctrl+D oder Cmd+D zu Lesezeichen hinzufügen" + +#: add-to-any.php:225 +msgid "Add to your favorites" +msgstr "" + +#: add-to-any.php:226 +msgid "Send from any e-mail address or e-mail program" +msgstr "" + +#: add-to-any.php:227 +msgid "E-mail program" +msgstr "" + +#: add-to-any.php:252 +msgid "Your theme needs to be fixed. To fix your theme, use the Theme Editor to insert <?php wp_footer(); ?> just before the </body> line of your theme's footer.php file." +msgstr "" + +#: add-to-any.php:390 +#: add-to-any.php:461 +#: add-to-any.php:465 +#: add-to-any.php:469 +#: add-to-any.php:473 +#: add-to-any.php:505 +msgid "Share/Bookmark" +msgstr "" + +#: add-to-any.php:404 +msgid "Settings saved." +msgstr "" + +#: add-to-any.php:415 +msgid "Add to Any: Share/Save " +msgstr "" + +#: add-to-any.php:415 +#: add-to-any.php:775 +#: add-to-any.php:796 +msgid "Settings" +msgstr "" + +#: add-to-any.php:425 +msgid "Standalone Services" +msgstr "" + +#: add-to-any.php:430 +msgid "Choose the services you want below.  Click a chosen service again to remove.  Reorder services by dragging and dropping as they appear above." +msgstr "" + +#: add-to-any.php:456 +msgid "Button" +msgstr "" + +#: add-to-any.php:495 +msgid "Image URL" +msgstr "" + +#: add-to-any.php:502 +msgid "Text only" +msgstr "" + +#: add-to-any.php:510 +msgid "Placement" +msgstr "" + +#: add-to-any.php:519 +msgid "Display Share/Save button at the bottom of posts" +msgstr "" + +#: add-to-any.php:526 +msgid "Display Share/Save button at the bottom of posts on the front page" +msgstr "" + +#: add-to-any.php:533 +msgid "Display Share/Save button at the bottom of posts in the feed" +msgstr "" + +#: add-to-any.php:537 +msgid "Display Share/Save button at the bottom of pages" +msgstr "" + +#: add-to-any.php:541 +msgid "If unchecked, be sure to place the following code in your template pages (within index.php, single.php, and/or page.php)" +msgstr "" + +#: add-to-any.php:550 +msgid "Menu Style" +msgstr "" + +#: add-to-any.php:552 +msgid "Using Add to Any's Menu Styler, you can customize the colors of your Share/Save menu! When you're done, be sure to paste the generated code in the Additional Options box below." +msgstr "" + +#: add-to-any.php:554 +msgid "Open the Add to Any Menu Styler in a new window" +msgstr "" + +#: add-to-any.php:556 +msgid "Open Menu Styler" +msgstr "" + +#: add-to-any.php:561 +msgid "Menu Options" +msgstr "" + +#: add-to-any.php:566 +msgid "Hide embedded objects (Flash, video, etc.) that intersect with the menu when displayed" +msgstr "" + +#: add-to-any.php:571 +msgid "Show the title of the post (or page) within the menu" +msgstr "" + +#: add-to-any.php:578 +msgid "Only show the menu when the user clicks the Share/Save button" +msgstr "" + +#: add-to-any.php:584 +msgid "Open the addtoany.com menu page in a new tab or window if the user clicks the Share/Save button" +msgstr "" + +#: add-to-any.php:589 +msgid "Additional Options" +msgstr "" + +#: add-to-any.php:593 +msgid "Paste the code from Add to Any's Menu Styler in the box below!" +msgstr "" + +#: add-to-any.php:597 +msgid "Below you can set special JavaScript variables to apply to each Share/Save menu." +msgstr "" + +#: add-to-any.php:598 +msgid "Advanced users might want to explore Add to Any's JavaScript API." +msgstr "" + +#: add-to-any.php:604 +msgid "Note: If you're adding new code, be careful not to accidentally overwrite any previous code." +msgstr "" + +#: add-to-any.php:611 +msgid "Save Changes" +msgstr "" + +#: add-to-any.php:616 +msgid "Like this plugin?" +msgstr "" + +#: add-to-any.php:617 +msgid "Give it a good rating on WordPress.org." +msgstr "" + +#: add-to-any.php:618 +msgid "Share it with your friends." +msgstr "" + +#: add-to-any.php:620 +msgid "Need support?" +msgstr "" + +#: add-to-any.php:621 +msgid "See the FAQs." +msgstr "" + +#: add-to-any.php:622 +msgid "Search the support forums." +msgstr "" + +#: add-to-any.php:729 +msgid "Add/Remove Services" +msgstr "" + +#: add-to-any.php:775 +msgid "Share/Save" +msgstr "" + +#: add-to-any.php:776 +msgid "Share/Save Buttons" +msgstr "" + +#, fuzzy +#~ msgid "Services" +#~ msgstr "Dienst(e) suchen" + diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/languages/add-to-any-es_ES.mo Binary file web/wp-content/plugins/add-to-any/languages/add-to-any-es_ES.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/languages/add-to-any-es_ES.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/add-to-any/languages/add-to-any-es_ES.po Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,258 @@ +msgid "" +msgstr "" +"Project-Id-Version: add-to-any\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-12-18 00:13-0800\n" +"PO-Revision-Date: \n" +"Last-Translator: Pablo Poo \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-KeywordsList: __;_e\n" +"X-Poedit-Basepath: ../\n" +"X-Poedit-SearchPath-0: .\n" + +#: add-to-any.php:211 +msgid "Share" +msgstr "Compartir" + +#: add-to-any.php:212 +msgid "Save" +msgstr "Guardar" + +#: add-to-any.php:213 +msgid "Subscribe" +msgstr "Suscribirse" + +#: add-to-any.php:214 +msgid "E-mail" +msgstr "E-mail" + +#: add-to-any.php:215 +msgid "Bookmark" +msgstr "Marcador" + +#: add-to-any.php:216 +msgid "Show all" +msgstr "Mostrar todo" + +#: add-to-any.php:217 +msgid "Show less" +msgstr "Mostrar menos" + +#: add-to-any.php:218 +msgid "Find service(s)" +msgstr "Buscar servicios(s)" + +#: add-to-any.php:219 +msgid "Instantly find any service to add to" +msgstr "Buscar servicio" + +#: add-to-any.php:220 +msgid "Powered by" +msgstr "Servicio ofrecido por" + +#: add-to-any.php:221 +msgid "Share via e-mail" +msgstr "Compartir por e-mail" + +#: add-to-any.php:222 +msgid "Subscribe via e-mail" +msgstr "Suscribirse por e-mail" + +#: add-to-any.php:223 +msgid "Bookmark in your browser" +msgstr "Agregar a marcadores de tu navegador" + +#: add-to-any.php:224 +#, fuzzy +msgid "Press Ctrl+D or ⌘+D to bookmark this page" +msgstr "Presione Ctrl+D o Cmd+D para marcar esta pagina" + +#: add-to-any.php:225 +msgid "Add to your favorites" +msgstr "Agregar a favoritos" + +#: add-to-any.php:226 +msgid "Send from any e-mail address or e-mail program" +msgstr "Enviar de cualquier dirección de e-mail o programa de e-mail" + +#: add-to-any.php:227 +msgid "E-mail program" +msgstr "Programa de e-mail" + +#: add-to-any.php:252 +msgid "Your theme needs to be fixed. To fix your theme, use the Theme Editor to insert <?php wp_footer(); ?> just before the </body> line of your theme's footer.php file." +msgstr "" + +#: add-to-any.php:390 +#: add-to-any.php:461 +#: add-to-any.php:465 +#: add-to-any.php:469 +#: add-to-any.php:473 +#: add-to-any.php:505 +#, fuzzy +msgid "Share/Bookmark" +msgstr "Marcador" + +#: add-to-any.php:404 +msgid "Settings saved." +msgstr "Configuración guardada." + +#: add-to-any.php:415 +msgid "Add to Any: Share/Save " +msgstr "Add to Any: Compartir/Guardar " + +#: add-to-any.php:415 +#: add-to-any.php:775 +#: add-to-any.php:796 +msgid "Settings" +msgstr "Configuración" + +#: add-to-any.php:425 +msgid "Standalone Services" +msgstr "" + +#: add-to-any.php:430 +msgid "Choose the services you want below.  Click a chosen service again to remove.  Reorder services by dragging and dropping as they appear above." +msgstr "" + +#: add-to-any.php:456 +msgid "Button" +msgstr "Botón" + +#: add-to-any.php:495 +msgid "Image URL" +msgstr "URL de la imagen" + +#: add-to-any.php:502 +msgid "Text only" +msgstr "Solo texto" + +#: add-to-any.php:510 +#, fuzzy +msgid "Placement" +msgstr "Ubicación del botón" + +#: add-to-any.php:519 +msgid "Display Share/Save button at the bottom of posts" +msgstr "Mostrar el botón Compartir/Guardar al final de cada entrada" + +#: add-to-any.php:526 +msgid "Display Share/Save button at the bottom of posts on the front page" +msgstr "Mostrar el botón Compartir/Guardar al final de las entradas en la pagina principal" + +#: add-to-any.php:533 +msgid "Display Share/Save button at the bottom of posts in the feed" +msgstr "Mostrar el botón Compartir/Guardar al final de las entradas en el feed" + +#: add-to-any.php:537 +msgid "Display Share/Save button at the bottom of pages" +msgstr "Mostrar el botón Compartir/Guardar al final de las paginas" + +#: add-to-any.php:541 +#, fuzzy +msgid "If unchecked, be sure to place the following code in your template pages (within index.php, single.php, and/or page.php)" +msgstr "Si no está habilitado se debe agregar el siguiente código en la plantilla de su tema(dentro de index.php, single.php, y/o page.php)" + +#: add-to-any.php:550 +msgid "Menu Style" +msgstr "Estilo del menú" + +#: add-to-any.php:552 +msgid "Using Add to Any's Menu Styler, you can customize the colors of your Share/Save menu! When you're done, be sure to paste the generated code in the Additional Options box below." +msgstr "Usar el personalizador de estilo de Add to Any, usted puede personalizar los colores de su menú Compartir/Guardar! Cuando finalice, debe copiar el código generado en el recuadro de opciones adicionales más abajo." + +#: add-to-any.php:554 +msgid "Open the Add to Any Menu Styler in a new window" +msgstr "Abrir el personalizador de estilo de Add to Any en una nueva ventana" + +#: add-to-any.php:556 +msgid "Open Menu Styler" +msgstr "Abrir el personalizador de estilos" + +#: add-to-any.php:561 +msgid "Menu Options" +msgstr "Menú de opciones" + +#: add-to-any.php:566 +msgid "Hide embedded objects (Flash, video, etc.) that intersect with the menu when displayed" +msgstr "Ocultar los objetos embebidos (Flash, video, etc) que intersectan con el manú cuando se muestra." + +#: add-to-any.php:571 +msgid "Show the title of the post (or page) within the menu" +msgstr "Mostrar el título de la entrada (o de la pagina) dentro del menú" + +#: add-to-any.php:578 +msgid "Only show the menu when the user clicks the Share/Save button" +msgstr "Mostrar el menú solo cuando un usuario haga click sobre el botón Compartir/Guardar" + +#: add-to-any.php:584 +msgid "Open the addtoany.com menu page in a new tab or window if the user clicks the Share/Save button" +msgstr "Abrir el menu de addtoany.com en una nueva pestaña o ventana si el usuario hace click en el botón Compartir/Guardar" + +#: add-to-any.php:589 +msgid "Additional Options" +msgstr "Opciones adicionales" + +#: add-to-any.php:593 +msgid "Paste the code from Add to Any's Menu Styler in the box below!" +msgstr "Pegue el código del personalizador de estilo en el siguiente recuadro" + +#: add-to-any.php:597 +msgid "Below you can set special JavaScript variables to apply to each Share/Save menu." +msgstr "Abajo puede inicializar las variables JavaScript especiales para aplicar a cada menú Compartir/Guardar" + +#: add-to-any.php:598 +msgid "Advanced users might want to explore Add to Any's JavaScript API." +msgstr "Los usuarios avanzados podrían preferir explorar la API JavaScript de Add to Any." + +#: add-to-any.php:604 +msgid "Note: If you're adding new code, be careful not to accidentally overwrite any previous code." +msgstr "Nota: Si usted agrega código nuevo, sea cuidadoso de no sobreescribir accidentalmente cualquier código ingresado anteriormente." + +#: add-to-any.php:611 +msgid "Save Changes" +msgstr "Guardar cambios" + +#: add-to-any.php:616 +msgid "Like this plugin?" +msgstr "" + +#: add-to-any.php:617 +msgid "Give it a good rating on WordPress.org." +msgstr "" + +#: add-to-any.php:618 +msgid "Share it with your friends." +msgstr "" + +#: add-to-any.php:620 +msgid "Need support?" +msgstr "" + +#: add-to-any.php:621 +msgid "See the FAQs." +msgstr "" + +#: add-to-any.php:622 +msgid "Search the support forums." +msgstr "" + +#: add-to-any.php:729 +msgid "Add/Remove Services" +msgstr "" + +#: add-to-any.php:775 +msgid "Share/Save" +msgstr "Compartir/Guardar" + +#: add-to-any.php:776 +msgid "Share/Save Buttons" +msgstr "Botones Compartir/Guardar" + +#, fuzzy +#~ msgid "Services" +#~ msgstr "Buscar servicios(s)" + diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/languages/add-to-any-it_IT.mo Binary file web/wp-content/plugins/add-to-any/languages/add-to-any-it_IT.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/languages/add-to-any-it_IT.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/add-to-any/languages/add-to-any-it_IT.po Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,255 @@ +msgid "" +msgstr "" +"Project-Id-Version: add-to-any in italiano\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-12-18 00:13-0800\n" +"PO-Revision-Date: \n" +"Last-Translator: MicroPat\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-KeywordsList: __;_e\n" +"X-Poedit-Basepath: ../\n" +"X-Poedit-Language: Italian\n" +"X-Poedit-Country: ITALY\n" +"X-Poedit-SearchPath-0: .\n" + +#: add-to-any.php:211 +msgid "Share" +msgstr "Condividi" + +#: add-to-any.php:212 +msgid "Save" +msgstr "Salva" + +#: add-to-any.php:213 +msgid "Subscribe" +msgstr "Abbonati" + +#: add-to-any.php:214 +msgid "E-mail" +msgstr "E-mail" + +#: add-to-any.php:215 +msgid "Bookmark" +msgstr "Segnalibro" + +#: add-to-any.php:216 +msgid "Show all" +msgstr "espandi" + +#: add-to-any.php:217 +msgid "Show less" +msgstr "comprimi" + +#: add-to-any.php:218 +msgid "Find service(s)" +msgstr "Trova servizi" + +#: add-to-any.php:219 +msgid "Instantly find any service to add to" +msgstr "Trova subito un servizio da aggiungere" + +#: add-to-any.php:220 +msgid "Powered by" +msgstr "Fornito da" + +#: add-to-any.php:221 +msgid "Share via e-mail" +msgstr "Condividi via email" + +#: add-to-any.php:222 +msgid "Subscribe via e-mail" +msgstr "Abbonati via email" + +#: add-to-any.php:223 +msgid "Bookmark in your browser" +msgstr "Aggiungi ai segnalibri" + +#: add-to-any.php:224 +#, fuzzy +msgid "Press Ctrl+D or ⌘+D to bookmark this page" +msgstr "Premi Ctrl+D o Cmd+D per aggiungere questa pagina alla lista dei segnalibri" + +#: add-to-any.php:225 +msgid "Add to your favorites" +msgstr "Aggiungi ai favoriti" + +#: add-to-any.php:226 +msgid "Send from any e-mail address or e-mail program" +msgstr "Invia da un indirizzo email o client di posta elettronica" + +#: add-to-any.php:227 +msgid "E-mail program" +msgstr "Client di posta elettronica" + +#: add-to-any.php:252 +msgid "Your theme needs to be fixed. To fix your theme, use the Theme Editor to insert <?php wp_footer(); ?> just before the </body> line of your theme's footer.php file." +msgstr "Il tuo tema deve essere aggiornato. Per apportare le modifiche necessarie, utilizza l'editor dei temi per inserire <?php wp_footer(); ?> subito prima del tag di chiusura </body> presente nel file footer.php." + +#: add-to-any.php:390 +#: add-to-any.php:461 +#: add-to-any.php:465 +#: add-to-any.php:469 +#: add-to-any.php:473 +#: add-to-any.php:505 +#, fuzzy +msgid "Share/Bookmark" +msgstr "Segnalibro" + +#: add-to-any.php:404 +msgid "Settings saved." +msgstr "Le impostazioni sono state salvate" + +#: add-to-any.php:415 +msgid "Add to Any: Share/Save " +msgstr "Add to Any: Condividi/Salva " + +#: add-to-any.php:415 +#: add-to-any.php:775 +#: add-to-any.php:796 +msgid "Settings" +msgstr "Impostazioni" + +#: add-to-any.php:425 +msgid "Standalone Services" +msgstr "Servizi indipendenti" + +#: add-to-any.php:430 +msgid "Choose the services you want below.  Click a chosen service again to remove.  Reorder services by dragging and dropping as they appear above." +msgstr "Scegli qui sotto i servizi di tuo gradimento.  Clicca su di un servizio attivo per rimuoverlo.  Riordina i servizi via drag and drop." + +#: add-to-any.php:456 +msgid "Button" +msgstr "Pulsante" + +#: add-to-any.php:495 +msgid "Image URL" +msgstr "URL immagine" + +#: add-to-any.php:502 +msgid "Text only" +msgstr "Solo testo" + +#: add-to-any.php:510 +msgid "Placement" +msgstr "Posizione" + +#: add-to-any.php:519 +msgid "Display Share/Save button at the bottom of posts" +msgstr "Mostra il pulsante Share/Save in coda agli articoli" + +#: add-to-any.php:526 +msgid "Display Share/Save button at the bottom of posts on the front page" +msgstr "Mostra il pulsante Share/Save in coda agli articoli nella pagina principale" + +#: add-to-any.php:533 +msgid "Display Share/Save button at the bottom of posts in the feed" +msgstr "Mostra il pulsante Share/Save in coda agli articoli del feed" + +#: add-to-any.php:537 +msgid "Display Share/Save button at the bottom of pages" +msgstr "Mostra il pulsante Share/Save in coda alle pagine" + +#: add-to-any.php:541 +#, fuzzy +msgid "If unchecked, be sure to place the following code in your template pages (within index.php, single.php, and/or page.php)" +msgstr "Se disattivata, dovrai inserire il codice qui sotto nelle pagine del tuo tema (in index.php, single.php, e/o page.php)" + +#: add-to-any.php:550 +msgid "Menu Style" +msgstr "Stile menu" + +#: add-to-any.php:552 +msgid "Using Add to Any's Menu Styler, you can customize the colors of your Share/Save menu! When you're done, be sure to paste the generated code in the Additional Options box below." +msgstr "Utilizzando il Menu Styler di Add to Any potrai personalizzare i colori del menu Share/Save! Una volta apportata la modifica, incolla il codice così ottenuto nel riquadro delle Opzioni agggiuntive qui sotto." + +#: add-to-any.php:554 +msgid "Open the Add to Any Menu Styler in a new window" +msgstr "Apri in una nuova pagina per personalizzare il menu di Add to Any" + +#: add-to-any.php:556 +msgid "Open Menu Styler" +msgstr "Stile menu" + +#: add-to-any.php:561 +msgid "Menu Options" +msgstr "Opzioni menu" + +#: add-to-any.php:566 +msgid "Hide embedded objects (Flash, video, etc.) that intersect with the menu when displayed" +msgstr "Nascondi gli oggetti incorporati (Flash, video, etc.) che possono interferire con la visualizzazione corretta del menu" + +#: add-to-any.php:571 +msgid "Show the title of the post (or page) within the menu" +msgstr "Mostra nel menu il titolo dell'articolo (o pagina)" + +#: add-to-any.php:578 +msgid "Only show the menu when the user clicks the Share/Save button" +msgstr "Mostra solamente il menu quando un utente clicca sul pulsante Share/Save" + +#: add-to-any.php:584 +msgid "Open the addtoany.com menu page in a new tab or window if the user clicks the Share/Save button" +msgstr "Apri in una nuova scheda o finestra la pagina menu di addtoany.com quando un utente clicca il pulsante Share/Save" + +#: add-to-any.php:589 +msgid "Additional Options" +msgstr "Opzioni aggiuntive" + +#: add-to-any.php:593 +msgid "Paste the code from Add to Any's Menu Styler in the box below!" +msgstr "Incolla nel riquadro qui sotto il nuovo codice personalizzato per il menu! " + +#: add-to-any.php:597 +msgid "Below you can set special JavaScript variables to apply to each Share/Save menu." +msgstr "Qui sotto é possibile impostare delle variabili JavaScript particolari applicabili ad ogni menu Share/Save." + +#: add-to-any.php:598 +msgid "Advanced users might want to explore Add to Any's JavaScript API." +msgstr "Gli utenti più esperti possono prendere visione della JavaScript API di Add to Any." + +#: add-to-any.php:604 +msgid "Note: If you're adding new code, be careful not to accidentally overwrite any previous code." +msgstr "Nota: qualora stessi aggiungendo un nnuovo codice, fai attenzione a non sovrascrivere accidentalmente ogni codice precedente." + +#: add-to-any.php:611 +msgid "Save Changes" +msgstr "Salva le modifiche" + +#: add-to-any.php:616 +msgid "Like this plugin?" +msgstr "Ti é piaciuto questo plugin?" + +#: add-to-any.php:617 +msgid "Give it a good rating on WordPress.org." +msgstr "Votalo su WordPress.org." + +#: add-to-any.php:618 +msgid "Share it with your friends." +msgstr "Condividi con i tuoi amici." + +#: add-to-any.php:620 +msgid "Need support?" +msgstr "Serve aiuto?" + +#: add-to-any.php:621 +msgid "See the FAQs." +msgstr "Vedi la pagina dedicata alle FAQ." + +#: add-to-any.php:622 +msgid "Search the support forums." +msgstr "Effettua una ricerca nel forum di supporto." + +#: add-to-any.php:729 +msgid "Add/Remove Services" +msgstr "Aggiungi/Rimuovi i sevizi" + +#: add-to-any.php:775 +msgid "Share/Save" +msgstr "Condividi/Salva" + +#: add-to-any.php:776 +msgid "Share/Save Buttons" +msgstr "Pulsanti Condividi/Salva" + diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/languages/add-to-any-pt_PT.mo Binary file web/wp-content/plugins/add-to-any/languages/add-to-any-pt_PT.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/languages/add-to-any-pt_PT.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/add-to-any/languages/add-to-any-pt_PT.po Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,256 @@ +msgid "" +msgstr "" +"Project-Id-Version: add-to-any\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-12-18 00:13-0800\n" +"PO-Revision-Date: \n" +"Last-Translator: Jorge Silva \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-KeywordsList: __;_e\n" +"X-Poedit-Basepath: ../\n" +"X-Poedit-SearchPath-0: .\n" + +#: add-to-any.php:211 +msgid "Share" +msgstr "Partilhar" + +#: add-to-any.php:212 +msgid "Save" +msgstr "Guardar" + +#: add-to-any.php:213 +msgid "Subscribe" +msgstr "Subscrever" + +#: add-to-any.php:214 +msgid "E-mail" +msgstr "E-mail" + +#: add-to-any.php:215 +msgid "Bookmark" +msgstr "Marcador" + +#: add-to-any.php:216 +msgid "Show all" +msgstr "Mostrar tudo" + +#: add-to-any.php:217 +msgid "Show less" +msgstr "Mostrar menos" + +#: add-to-any.php:218 +msgid "Find service(s)" +msgstr "Procurar serviço(s)" + +#: add-to-any.php:219 +msgid "Instantly find any service to add to" +msgstr "Encontrar rapidamente qualquer serviço para" + +#: add-to-any.php:220 +msgid "Powered by" +msgstr "Serviço fornecido por" + +#: add-to-any.php:221 +msgid "Share via e-mail" +msgstr "Partilhar por e-mail" + +#: add-to-any.php:222 +msgid "Subscribe via e-mail" +msgstr "Subscrever por e-mail" + +#: add-to-any.php:223 +msgid "Bookmark in your browser" +msgstr "Adicionar marcador" + +#: add-to-any.php:224 +msgid "Press Ctrl+D or ⌘+D to bookmark this page" +msgstr "Pressione Ctrl+D ou ⌘+D para adicionar esta página aos marcadores" + +#: add-to-any.php:225 +msgid "Add to your favorites" +msgstr "Adicionar a favoritos" + +#: add-to-any.php:226 +msgid "Send from any e-mail address or e-mail program" +msgstr "Enviar de qualquer e-mail ou programa de e-mail" + +#: add-to-any.php:227 +msgid "E-mail program" +msgstr "Programa de e-mail" + +#: add-to-any.php:252 +msgid "Your theme needs to be fixed. To fix your theme, use the Theme Editor to insert <?php wp_footer(); ?> just before the </body> line of your theme's footer.php file." +msgstr "O seu tema precisa de ser corrigido. Para coriigir o seu tema, utilize Theme Editor para inserir <?php wp_footer(); ?> mesmo antes da linha </body> do ficheiro footer.php do tema." + +#: add-to-any.php:390 +#: add-to-any.php:461 +#: add-to-any.php:465 +#: add-to-any.php:469 +#: add-to-any.php:473 +#: add-to-any.php:505 +#, fuzzy +msgid "Share/Bookmark" +msgstr "Marcador" + +#: add-to-any.php:404 +msgid "Settings saved." +msgstr "Configuração guardada." + +#: add-to-any.php:415 +msgid "Add to Any: Share/Save " +msgstr "Add to Any: Partilhar/Guardar " + +#: add-to-any.php:415 +#: add-to-any.php:775 +#: add-to-any.php:796 +msgid "Settings" +msgstr "Configurações" + +#: add-to-any.php:425 +msgid "Standalone Services" +msgstr "Serviços Isolados" + +#: add-to-any.php:430 +msgid "Choose the services you want below.  Click a chosen service again to remove.  Reorder services by dragging and dropping as they appear above." +msgstr "Escolha os serviços que deseja.  Clique novamente num serviço já escolhido para o remover.  Reordene os serviços fazendo drag'n'drop conforme aparecem por cima." + +#: add-to-any.php:456 +msgid "Button" +msgstr "Botão" + +#: add-to-any.php:495 +msgid "Image URL" +msgstr "URL da imagem" + +#: add-to-any.php:502 +msgid "Text only" +msgstr "Apenas texto" + +#: add-to-any.php:510 +msgid "Placement" +msgstr "Posicionamento" + +#: add-to-any.php:519 +msgid "Display Share/Save button at the bottom of posts" +msgstr "Mostrar o botão Partilhar/Guardar no fim de cada post" + +#: add-to-any.php:526 +msgid "Display Share/Save button at the bottom of posts on the front page" +msgstr "Mostrar o botão Partilhar/Guardar no fim dos posts na página principal" + +#: add-to-any.php:533 +msgid "Display Share/Save button at the bottom of posts in the feed" +msgstr "Mostrar o botão Partilhar/Guardar no fim dos posts do feed RSS" + +#: add-to-any.php:537 +msgid "Display Share/Save button at the bottom of pages" +msgstr "Mostrar o botão Partilhar/Guardar no fim das páginas" + +#: add-to-any.php:541 +#, fuzzy +msgid "If unchecked, be sure to place the following code in your template pages (within index.php, single.php, and/or page.php)" +msgstr "Se estiver desactivado, assegure-se que coloca o código seguinte em Modelos das suas páginas (dentro de index.php, single.php, e/ou page.php)" + +#: add-to-any.php:550 +msgid "Menu Style" +msgstr "Estilo de Menu" + +#: add-to-any.php:552 +msgid "Using Add to Any's Menu Styler, you can customize the colors of your Share/Save menu! When you're done, be sure to paste the generated code in the Additional Options box below." +msgstr "Usar o Personalizador de Estilo do Add to Any. Pode personalizar as cores do seu menu Partilhar/Guardar! Quando finalizar, assegure-se que cola o código gerado na caixa Opções Adicionais em baixo." + +#: add-to-any.php:554 +msgid "Open the Add to Any Menu Styler in a new window" +msgstr "Abrir o Menu de Personalização de Estilos Add to Any numa nova janela" + +#: add-to-any.php:556 +msgid "Open Menu Styler" +msgstr "Abrir o Menu de Personalização de Estilos" + +#: add-to-any.php:561 +msgid "Menu Options" +msgstr "Opções de Menu" + +#: add-to-any.php:566 +msgid "Hide embedded objects (Flash, video, etc.) that intersect with the menu when displayed" +msgstr "Ocultar objetos embebidos (Flash, video, etc) que interajam com o menu quando visualizado" + +#: add-to-any.php:571 +msgid "Show the title of the post (or page) within the menu" +msgstr "Mostrar o título do post (ou da página) dentro do menu" + +#: add-to-any.php:578 +msgid "Only show the menu when the user clicks the Share/Save button" +msgstr "Mostrar apenas o menu quando o utilizador fizer um clique no botão Partilhar/Guardar" + +#: add-to-any.php:584 +msgid "Open the addtoany.com menu page in a new tab or window if the user clicks the Share/Save button" +msgstr "Abrir o menu de addtoany.com num novo separador ou janela se o utilizador fizer um clique no botão Partilhar/Guardar" + +#: add-to-any.php:589 +msgid "Additional Options" +msgstr "Opções Adicionais" + +#: add-to-any.php:593 +msgid "Paste the code from Add to Any's Menu Styler in the box below!" +msgstr "Cole o código do Menu de Personalização de Estilos do Add to Any na caixa a seguir!" + +#: add-to-any.php:597 +msgid "Below you can set special JavaScript variables to apply to each Share/Save menu." +msgstr "Em baixo pode inserir varáveis especiais de JavaScript para aplicar a cada menu Partilhar/Guardar." + +#: add-to-any.php:598 +msgid "Advanced users might want to explore Add to Any's JavaScript API." +msgstr "Utilizadores avançados podem querer explorar o API do JavaScript do Add to Any." + +#: add-to-any.php:604 +msgid "Note: If you're adding new code, be careful not to accidentally overwrite any previous code." +msgstr "Nota: Se está a adicionar novo código, tenha cuidado para não sobrescrever (apagar) acidentalmente qualquer código existente." + +#: add-to-any.php:611 +msgid "Save Changes" +msgstr "Guardar alterações" + +#: add-to-any.php:616 +msgid "Like this plugin?" +msgstr "Gosta deste plugin?" + +#: add-to-any.php:617 +msgid "Give it a good rating on WordPress.org." +msgstr "Atribua-lhe uma boa pontuação no WordPress.org." + +#: add-to-any.php:618 +msgid "Share it with your friends." +msgstr "Partilhar com os amigos." + +#: add-to-any.php:620 +msgid "Need support?" +msgstr "Precisa de ajuda?" + +#: add-to-any.php:621 +msgid "See the FAQs." +msgstr "Consulte a página de FAQ's." + +#: add-to-any.php:622 +msgid "Search the support forums." +msgstr "Procurar nos fóruns de ajuda." + +#: add-to-any.php:729 +msgid "Add/Remove Services" +msgstr "Adicionar/Remover Serviços" + +#: add-to-any.php:775 +msgid "Share/Save" +msgstr "Partilhar/Guardar" + +#: add-to-any.php:776 +msgid "Share/Save Buttons" +msgstr "Botões Partilhar/Guardar" + +#, fuzzy +#~ msgid "Services" +#~ msgstr "Procurar serviço(s)" + diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/languages/add-to-any-ro_RO.mo Binary file web/wp-content/plugins/add-to-any/languages/add-to-any-ro_RO.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/languages/add-to-any-ro_RO.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/add-to-any/languages/add-to-any-ro_RO.po Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,251 @@ +msgid "" +msgstr "" +"Project-Id-Version: add-to-any\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-12-18 00:13-0800\n" +"PO-Revision-Date: \n" +"Last-Translator: Pat \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-KeywordsList: __;_e\n" +"X-Poedit-Basepath: ../\n" +"X-Poedit-SearchPath-0: .\n" + +#: add-to-any.php:211 +msgid "Share" +msgstr "Amparte" + +#: add-to-any.php:212 +msgid "Save" +msgstr "Salveaza" + +#: add-to-any.php:213 +msgid "Subscribe" +msgstr "Inscriete" + +#: add-to-any.php:214 +msgid "E-mail" +msgstr "E-mail" + +#: add-to-any.php:215 +msgid "Bookmark" +msgstr "Semneaza" + +#: add-to-any.php:216 +msgid "Show all" +msgstr "Vezi Totul" + +#: add-to-any.php:217 +msgid "Show less" +msgstr "Strange" + +#: add-to-any.php:218 +msgid "Find service(s)" +msgstr "Cauta servici" + +#: add-to-any.php:219 +msgid "Instantly find any service to add to" +msgstr "Cauta instantaneu tuoate servicile sa le pui a" + +#: add-to-any.php:220 +msgid "Powered by" +msgstr "Powered by" + +#: add-to-any.php:221 +msgid "Share via e-mail" +msgstr "Amparte via e-mail" + +#: add-to-any.php:222 +msgid "Subscribe via e-mail" +msgstr "Inscriete la via e-mail" + +#: add-to-any.php:223 +msgid "Bookmark in your browser" +msgstr "Semneaza in al tau browser" + +#: add-to-any.php:224 +msgid "Press Ctrl+D or ⌘+D to bookmark this page" +msgstr "Digiteaza Ctrl+D sau ⌘+D pentru semnare pagina asta" + +#: add-to-any.php:225 +msgid "Add to your favorites" +msgstr "Ajunge la ai tai favoriti" + +#: add-to-any.php:226 +msgid "Send from any e-mail address or e-mail program" +msgstr "Trimite de la fiecare email sau email client" + +#: add-to-any.php:227 +msgid "E-mail program" +msgstr "Email Client" + +#: add-to-any.php:252 +msgid "Your theme needs to be fixed. To fix your theme, use the Theme Editor to insert <?php wp_footer(); ?> just before the </body> line of your theme's footer.php file." +msgstr "Tema ta trebuie sa fie la zi. Pentru purtare modifca necesara,foloseste editorul de tema pentru a intra <?php wp_footer(); ?> imediat dupa tag de anchidere </body> present an footer.php la tema ta." + +#: add-to-any.php:390 +#: add-to-any.php:461 +#: add-to-any.php:465 +#: add-to-any.php:469 +#: add-to-any.php:473 +#: add-to-any.php:505 +#, fuzzy +msgid "Share/Bookmark" +msgstr "Semneaza" + +#: add-to-any.php:404 +msgid "Settings saved." +msgstr "Impostationi salvate" + +#: add-to-any.php:415 +msgid "Add to Any: Share/Save " +msgstr "Add to Any: Amparte /Salveaza" + +#: add-to-any.php:415 +#: add-to-any.php:775 +#: add-to-any.php:796 +msgid "Settings" +msgstr "Impostationi" + +#: add-to-any.php:425 +msgid "Standalone Services" +msgstr "Servitii independente" + +#: add-to-any.php:430 +msgid "Choose the services you want below.  Click a chosen service again to remove.  Reorder services by dragging and dropping as they appear above." +msgstr "Alege aici dedesupt servitile care ati plac.  Clicca la un servici active pentru a elimina. Ordineaza servicii prin drag and drop." + +#: add-to-any.php:456 +msgid "Button" +msgstr "Buton" + +#: add-to-any.php:495 +msgid "Image URL" +msgstr "Imagine URL" + +#: add-to-any.php:502 +msgid "Text only" +msgstr "Duar text" + +#: add-to-any.php:510 +msgid "Placement" +msgstr "Pozitia" + +#: add-to-any.php:519 +msgid "Display Share/Save button at the bottom of posts" +msgstr "Priveste Amparte/Salveaza buton la sfarsitul articolului" + +#: add-to-any.php:526 +msgid "Display Share/Save button at the bottom of posts on the front page" +msgstr "Priveste Amparte/Salveaza buton la sfarsitul articolului de la pagina principala" + +#: add-to-any.php:533 +msgid "Display Share/Save button at the bottom of posts in the feed" +msgstr "Priveste Amparte/Salveaza buton la sfarsitul de la feed" + +#: add-to-any.php:537 +msgid "Display Share/Save button at the bottom of pages" +msgstr "Priveste Amparte/Salveaza buton la sfarsitul de la pagina" + +#: add-to-any.php:541 +msgid "If unchecked, be sure to place the following code in your template pages (within index.php, single.php, and/or page.php)" +msgstr "Daca e dezactivat, trebuie sa fim siguri sa punem codul seguit tema de la pagina ( cu index.php, single.php, si/sau page.php)" + +#: add-to-any.php:550 +msgid "Menu Style" +msgstr "Stil menu" + +#: add-to-any.php:552 +msgid "Using Add to Any's Menu Styler, you can customize the colors of your Share/Save menu! When you're done, be sure to paste the generated code in the Additional Options box below." +msgstr "Folosind stilul de la menu de la Add to Any,poti sa configurezi culorile de al tau Amparte/Salveaza ! Daca ai modificat, pune codul asa obtinut an cuadru de la option ajunse aici jos." + +#: add-to-any.php:554 +msgid "Open the Add to Any Menu Styler in a new window" +msgstr "Deschide an o noue fineastra pentru a personaliza il menu de la Add to Any" + +#: add-to-any.php:556 +msgid "Open Menu Styler" +msgstr "Stil menu" + +#: add-to-any.php:561 +msgid "Menu Options" +msgstr "Optioni menu" + +#: add-to-any.php:566 +msgid "Hide embedded objects (Flash, video, etc.) that intersect with the menu when displayed" +msgstr "Ascondi obiecte incorporate (Flash, video, etc.) care poti interferi cu menu vazut" + +#: add-to-any.php:571 +msgid "Show the title of the post (or page) within the menu" +msgstr "Priveste titlul de la articolul (sau pagina) an menu" + +#: add-to-any.php:578 +msgid "Only show the menu when the user clicks the Share/Save button" +msgstr "Arata menu duar cand autorul clicca pe butonul Amparte/Salveaza" + +#: add-to-any.php:584 +msgid "Open the addtoany.com menu page in a new tab or window if the user clicks the Share/Save button" +msgstr "Deschide meniul addtoany.com antro noua feneastra sau scheda daca autorul clicca pe butonul Amparte/Salveava" + +#: add-to-any.php:589 +msgid "Additional Options" +msgstr "Optioni adiţionale" + +#: add-to-any.php:593 +msgid "Paste the code from Add to Any's Menu Styler in the box below!" +msgstr "Introduce aici jos codul personalizat pentru menu!" + +#: add-to-any.php:597 +msgid "Below you can set special JavaScript variables to apply to each Share/Save menu." +msgstr "Aici jos e posibil impostare variabilele JavaScript applicate a fiecare menu Amparte/Salveaza" + +#: add-to-any.php:598 +msgid "Advanced users might want to explore Add to Any's JavaScript API." +msgstr "Autorul poate sa vada de la JavaScript API." + +#: add-to-any.php:604 +msgid "Note: If you're adding new code, be careful not to accidentally overwrite any previous code." +msgstr "Nota: Daca ajungi un nou cod, atentione se nu soprascrieti din gresiala fiecare cod de prima." + +#: add-to-any.php:611 +msgid "Save Changes" +msgstr "Salveaza schimbarile" + +#: add-to-any.php:616 +msgid "Like this plugin?" +msgstr "Ati place acest plugin?" + +#: add-to-any.php:617 +msgid "Give it a good rating on WordPress.org." +msgstr "Voteazama sus WordPress.org." + +#: add-to-any.php:618 +msgid "Share it with your friends." +msgstr "Amparte cu prieteni tai." + +#: add-to-any.php:620 +msgid "Need support?" +msgstr "Ai nevoie de ajutor?" + +#: add-to-any.php:621 +msgid "See the FAQs." +msgstr "Priveste FAQ." + +#: add-to-any.php:622 +msgid "Search the support forums." +msgstr "Cauta pe forum." + +#: add-to-any.php:729 +msgid "Add/Remove Services" +msgstr "Ajunge/Elimina servitii" + +#: add-to-any.php:775 +msgid "Share/Save" +msgstr "Amparte/Salveaza" + +#: add-to-any.php:776 +msgid "Share/Save Buttons" +msgstr "Amparte/Salveaza buton" + diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/languages/add-to-any-ru_RU.mo Binary file web/wp-content/plugins/add-to-any/languages/add-to-any-ru_RU.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/languages/add-to-any-ru_RU.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/add-to-any/languages/add-to-any-ru_RU.po Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,252 @@ +msgid "" +msgstr "" +"Project-Id-Version: add-to-any\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-12-18 00:13-0800\n" +"PO-Revision-Date: \n" +"Last-Translator: Elvis \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-KeywordsList: __;_e\n" +"X-Poedit-Basepath: ../\n" +"X-Poedit-SearchPath-0: .\n" + +#: add-to-any.php:211 +msgid "Share" +msgstr "Отправить другу" + +#: add-to-any.php:212 +msgid "Save" +msgstr "Сохранить" + +#: add-to-any.php:213 +msgid "Subscribe" +msgstr "Подписаться" + +#: add-to-any.php:214 +msgid "E-mail" +msgstr "E-mail" + +#: add-to-any.php:215 +msgid "Bookmark" +msgstr "В закладки!" + +#: add-to-any.php:216 +msgid "Show all" +msgstr "Показать все" + +#: add-to-any.php:217 +msgid "Show less" +msgstr "Показать остальное" + +#: add-to-any.php:218 +msgid "Find service(s)" +msgstr "Найти сервис(ы)" + +#: add-to-any.php:219 +msgid "Instantly find any service to add to" +msgstr "Найти сервис и добавить" + +#: add-to-any.php:220 +msgid "Powered by" +msgstr "Работает на " + +#: add-to-any.php:221 +msgid "Share via e-mail" +msgstr "Подписаться по e-mail" + +#: add-to-any.php:222 +msgid "Subscribe via e-mail" +msgstr "Подписаться по e-mail" + +#: add-to-any.php:223 +msgid "Bookmark in your browser" +msgstr "Добавить в закладки" + +#: add-to-any.php:224 +msgid "Press Ctrl+D or ⌘+D to bookmark this page" +msgstr "Нажмите Ctrl+В или ⌘+D чтобы добавить страницу в закладки" + +#: add-to-any.php:225 +msgid "Add to your favorites" +msgstr "Добавить в Избранное" + +#: add-to-any.php:226 +msgid "Send from any e-mail address or e-mail program" +msgstr "Отправить через e-mail сервис" + +#: add-to-any.php:227 +msgid "E-mail program" +msgstr "E-mail сервисы" + +#: add-to-any.php:252 +msgid "Your theme needs to be fixed. To fix your theme, use the Theme Editor to insert <?php wp_footer(); ?> just before the </body> line of your theme's footer.php file." +msgstr "Внимание! Плагин не работает с выбранной вами темой. Чтобы исправить это воспользуйтесь редактором тем и введите следующий код <?php wp_footer(); ?> сразу после строки </body>. Изменения нужно сделать в файле footer.php." + +#: add-to-any.php:390 +#: add-to-any.php:461 +#: add-to-any.php:465 +#: add-to-any.php:469 +#: add-to-any.php:473 +#: add-to-any.php:505 +#, fuzzy +msgid "Share/Bookmark" +msgstr "В закладки!" + +#: add-to-any.php:404 +msgid "Settings saved." +msgstr "Найстройки сохранены." + +#: add-to-any.php:415 +msgid "Add to Any: Share/Save " +msgstr "Сохранить/Отправить другу " + +#: add-to-any.php:415 +#: add-to-any.php:775 +#: add-to-any.php:796 +msgid "Settings" +msgstr "Настройки модуля" + +#: add-to-any.php:425 +msgid "Standalone Services" +msgstr "Используемые сервисы" + +#: add-to-any.php:430 +msgid "Choose the services you want below.  Click a chosen service again to remove.  Reorder services by dragging and dropping as they appear above." +msgstr "Выберите из списка ниже нужные вам сервисы. Чтобы удалить сервис из вашего списка - нажмите на его иконку еще раз. Для того чтобы поменять сервисы местами в вашем списке, просто нажмите на иконку и перетащите на нужное." + +#: add-to-any.php:456 +msgid "Button" +msgstr "Внешний вид кнопки" + +#: add-to-any.php:495 +msgid "Image URL" +msgstr "Адрес изображения" + +#: add-to-any.php:502 +msgid "Text only" +msgstr "Только текст" + +#: add-to-any.php:510 +msgid "Placement" +msgstr "Расположение" + +#: add-to-any.php:519 +msgid "Display Share/Save button at the bottom of posts" +msgstr "Отображать кнопку Сохранить/Отправить другу в нижней части всех постов" + +#: add-to-any.php:526 +msgid "Display Share/Save button at the bottom of posts on the front page" +msgstr "Отображать кнопку Сохранить/Отправить другу в нижней части постов на главной странице" + +#: add-to-any.php:533 +msgid "Display Share/Save button at the bottom of posts in the feed" +msgstr "Отображать кнопку Сохранить/Отправить другу в нижней части постов в фидах" + +#: add-to-any.php:537 +msgid "Display Share/Save button at the bottom of pages" +msgstr "Отображать кнопку Сохранить/Отправить другу в нижней части страниц" + +#: add-to-any.php:541 +#, fuzzy +msgid "If unchecked, be sure to place the following code in your template pages (within index.php, single.php, and/or page.php)" +msgstr "Если данные опции не работают, проверьте, вставлен ли необходимый для работы плагина код в вашей теме оформления (код должен быть вставлен на следующих страницах: index.php, single.php, и/или page.php)" + +#: add-to-any.php:550 +msgid "Menu Style" +msgstr "Внешний вид меню" + +#: add-to-any.php:552 +msgid "Using Add to Any's Menu Styler, you can customize the colors of your Share/Save menu! When you're done, be sure to paste the generated code in the Additional Options box below." +msgstr "Используйте этот инструмент для того, чтобы сделать ваше меню плагина Сохранить/Отправить другу уникальным в плане внешнего вида! Закончив настройки цветовой схемы, вставте полученный код в поле Дополнительные настройки." + +#: add-to-any.php:554 +msgid "Open the Add to Any Menu Styler in a new window" +msgstr "Открыть меню стилей для плагина Сохранить/Отправить другу в новом окне" + +#: add-to-any.php:556 +msgid "Open Menu Styler" +msgstr "Открыть меню внешнего вида" + +#: add-to-any.php:561 +msgid "Menu Options" +msgstr "Настройки меню" + +#: add-to-any.php:566 +msgid "Hide embedded objects (Flash, video, etc.) that intersect with the menu when displayed" +msgstr "Отключать различные эффекты (Flash, видео и другие), работающие параллельно с меню плагина" + +#: add-to-any.php:571 +msgid "Show the title of the post (or page) within the menu" +msgstr "Показывать название заметки или страницы в меню плагина" + +#: add-to-any.php:578 +msgid "Only show the menu when the user clicks the Share/Save button" +msgstr "Показывать меню плагина только если пользователь нажмет на кнопку Сохранить/Отправить другу" + +#: add-to-any.php:584 +msgid "Open the addtoany.com menu page in a new tab or window if the user clicks the Share/Save button" +msgstr "Открывать меню addtoany.com в новом окне браузера, если пользователь нажал на кнопку плагина Сохранить/Отправить другу" + +#: add-to-any.php:589 +msgid "Additional Options" +msgstr "Дополнительные настройки" + +#: add-to-any.php:593 +msgid "Paste the code from Add to Any's Menu Styler in the box below!" +msgstr "Вставте в поле ниже полученный код для изменения внешнего вида меню плагина!" + +#: add-to-any.php:597 +msgid "Below you can set special JavaScript variables to apply to each Share/Save menu." +msgstr "В поле ниже вы можете вставить полученный код, который изменит внешний вид меню плагина. " + +#: add-to-any.php:598 +msgid "Advanced users might want to explore Add to Any's JavaScript API." +msgstr "Если вы хотите узнать больше про технологии, используемые в плагине, читайте заметку о JavaScript API." + +#: add-to-any.php:604 +msgid "Note: If you're adding new code, be careful not to accidentally overwrite any previous code." +msgstr "Обратите внимание! Вы добавили новый код, будте осторожны, новый код будет записан поверх старого." + +#: add-to-any.php:611 +msgid "Save Changes" +msgstr "Сохранить все изменения" + +#: add-to-any.php:616 +msgid "Like this plugin?" +msgstr "Понравился плагин?" + +#: add-to-any.php:617 +msgid "Give it a good rating on WordPress.org." +msgstr "Оцените этот плагин на сайте WordPress.org." + +#: add-to-any.php:618 +msgid "Share it with your friends." +msgstr "Расскажите о плагине своим друзьям." + +#: add-to-any.php:620 +msgid "Need support?" +msgstr "Нужна помощь?" + +#: add-to-any.php:621 +msgid "See the FAQs." +msgstr "Смотрите ЧАВО." + +#: add-to-any.php:622 +msgid "Search the support forums." +msgstr "Ответы на свои вопросы также ищите на форумах поддержки." + +#: add-to-any.php:729 +msgid "Add/Remove Services" +msgstr "Добавить/Удалить сервисы" + +#: add-to-any.php:775 +msgid "Share/Save" +msgstr "Сохранить/Отправить другу" + +#: add-to-any.php:776 +msgid "Share/Save Buttons" +msgstr "Сохранить/Отправить другу" + diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/languages/add-to-any-sq_AL.mo Binary file web/wp-content/plugins/add-to-any/languages/add-to-any-sq_AL.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/languages/add-to-any-sq_AL.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/add-to-any/languages/add-to-any-sq_AL.po Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,253 @@ +msgid "" +msgstr "" +"Project-Id-Version: add-to-any ne shqip\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-12-18 00:13-0800\n" +"PO-Revision-Date: \n" +"Last-Translator: \n" +"Language-Team: Romeo Shuka | http://www.romeolab.com/ \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-KeywordsList: __;_e\n" +"X-Poedit-Basepath: ../\n" +"X-Poedit-Language: Shqip\n" +"X-Poedit-Country: ALBANIA\n" +"X-Poedit-SearchPath-0: .\n" + +#: add-to-any.php:211 +msgid "Share" +msgstr "Shpërndaj" + +#: add-to-any.php:212 +msgid "Save" +msgstr "Ruaj" + +#: add-to-any.php:213 +msgid "Subscribe" +msgstr "Abonohu" + +#: add-to-any.php:214 +msgid "E-mail" +msgstr "E-mail" + +#: add-to-any.php:215 +msgid "Bookmark" +msgstr "Bookmark" + +#: add-to-any.php:216 +msgid "Show all" +msgstr "Trego të gjitha" + +#: add-to-any.php:217 +msgid "Show less" +msgstr "Trego më pak" + +#: add-to-any.php:218 +msgid "Find service(s)" +msgstr "Gjej shërbimin" + +#: add-to-any.php:219 +msgid "Instantly find any service to add to" +msgstr "Gjej menjëherë një shërbim për të shtuar" + +#: add-to-any.php:220 +msgid "Powered by" +msgstr "Fuqizuar nga" + +#: add-to-any.php:221 +msgid "Share via e-mail" +msgstr "Përhap me e-mail" + +#: add-to-any.php:222 +msgid "Subscribe via e-mail" +msgstr "Abonohu me email" + +#: add-to-any.php:223 +msgid "Bookmark in your browser" +msgstr "Shtoje në bookmark të shfletuesit tuaj" + +#: add-to-any.php:224 +msgid "Press Ctrl+D or ⌘+D to bookmark this page" +msgstr "Shtyp Ctrl+D ose Cmd+D për të shktuar këtë faqe në bookmarket tuaja" + +#: add-to-any.php:225 +msgid "Add to your favorites" +msgstr "Shtoje tek të preferuarat" + +#: add-to-any.php:226 +msgid "Send from any e-mail address or e-mail program" +msgstr "Dërgoja një ardrese emaili ose klienti të postës elektronike" + +#: add-to-any.php:227 +msgid "E-mail program" +msgstr "Klienti i postës elektronike" + +#: add-to-any.php:252 +msgid "Your theme needs to be fixed. To fix your theme, use the Theme Editor to insert <?php wp_footer(); ?> just before the </body> line of your theme's footer.php file." +msgstr "Template juaj duhet azhornuar. Për të bërë ndryshimet e nevojshme, përdor editorini e template për të shtuar <?php wp_footer(); ?> menjëherë mbas mbylljes së tagut </body> që ndodhet në dokumentin footer.php." + +#: add-to-any.php:390 +#: add-to-any.php:461 +#: add-to-any.php:465 +#: add-to-any.php:469 +#: add-to-any.php:473 +#: add-to-any.php:505 +#, fuzzy +msgid "Share/Bookmark" +msgstr "Bookmark" + +#: add-to-any.php:404 +msgid "Settings saved." +msgstr "Opsionet u ruajtën." + +#: add-to-any.php:415 +msgid "Add to Any: Share/Save " +msgstr "Add to Any: Shpërnda/Ruaj" + +#: add-to-any.php:415 +#: add-to-any.php:775 +#: add-to-any.php:796 +msgid "Settings" +msgstr "Opsionet" + +#: add-to-any.php:425 +msgid "Standalone Services" +msgstr "Shërbime të pavarur" + +#: add-to-any.php:430 +msgid "Choose the services you want below.  Click a chosen service again to remove.  Reorder services by dragging and dropping as they appear above." +msgstr "Zgjidh këtu poshtë shërbimet që të pëlqejnë.  Kliko tek një nga shërbimet aktive për ta hequr.  Rëndit shërbimet me drag and drop." + +#: add-to-any.php:456 +msgid "Button" +msgstr "Buton" + +#: add-to-any.php:495 +msgid "Image URL" +msgstr "URL e imazhit" + +#: add-to-any.php:502 +msgid "Text only" +msgstr "Vetëm tekst" + +#: add-to-any.php:510 +msgid "Placement" +msgstr "Vendndodhja" + +#: add-to-any.php:519 +msgid "Display Share/Save button at the bottom of posts" +msgstr "Trego butonin Share/Save në fund të artikujve" + +#: add-to-any.php:526 +msgid "Display Share/Save button at the bottom of posts on the front page" +msgstr "Trego butonin Share/Save në fund të artikujve në faqen kryesore" + +#: add-to-any.php:533 +msgid "Display Share/Save button at the bottom of posts in the feed" +msgstr "Trego butonin Share/Save në fund të artikujve feed" + +#: add-to-any.php:537 +msgid "Display Share/Save button at the bottom of pages" +msgstr "Trego butonin Share/Save në fund të faqeve" + +#: add-to-any.php:541 +msgid "If unchecked, be sure to place the following code in your template pages (within index.php, single.php, and/or page.php)" +msgstr "Nëse nuk është e selektuar, sigurohu që të vendosësh kodin në faqen e templates tënde (në index.php, single.php, edhe/ose page.php)" + +#: add-to-any.php:550 +msgid "Menu Style" +msgstr "Stili i menusë" + +#: add-to-any.php:552 +msgid "Using Add to Any's Menu Styler, you can customize the colors of your Share/Save menu! When you're done, be sure to paste the generated code in the Additional Options box below." +msgstr "Duke përdorur Menunë Styler të Add to Any mund të personalizosh ngjyrat e menusë Share/Save! Mbasi të keni bër ndryshimet e duhura, ngjit kodin që gjëndet në Opsionet shtesë këtu poshtë." + +#: add-to-any.php:554 +msgid "Open the Add to Any Menu Styler in a new window" +msgstr "Hape në një faqe të re për të personalizuar menunë e Add to Any" + +#: add-to-any.php:556 +msgid "Open Menu Styler" +msgstr "Stili menu" + +#: add-to-any.php:561 +msgid "Menu Options" +msgstr "Opsionet e menusë" + +#: add-to-any.php:566 +msgid "Hide embedded objects (Flash, video, etc.) that intersect with the menu when displayed" +msgstr "Fshih objektet e inkorporuar (Flash, video, etj.) të cilët mund të ndikojnë në shikimin e rregullt të menusë" + +#: add-to-any.php:571 +msgid "Show the title of the post (or page) within the menu" +msgstr "Trego në menu titullin e artikullit (ose të faqes)" + +#: add-to-any.php:578 +msgid "Only show the menu when the user clicks the Share/Save button" +msgstr "Trego menunë vetëm kur një anëtar klikon mbi butonin Share/Save" + +#: add-to-any.php:584 +msgid "Open the addtoany.com menu page in a new tab or window if the user clicks the Share/Save button" +msgstr "Hap në një skedë apo dritare të re faqen menu të addtoany.com kur një vizitor klikon mbi butonin Share/Save" + +#: add-to-any.php:589 +msgid "Additional Options" +msgstr "Opsione shtesë" + +#: add-to-any.php:593 +msgid "Paste the code from Add to Any's Menu Styler in the box below!" +msgstr "Ngjit në kutinë poshtë kodin tuaj të personalizuar të menusë! " + +#: add-to-any.php:597 +msgid "Below you can set special JavaScript variables to apply to each Share/Save menu." +msgstr "Këtu poshtë është e mundur ndryshimi i variableve të JavaScript që përdor menuja Share/Save." + +#: add-to-any.php:598 +msgid "Advanced users might want to explore Add to Any's JavaScript API." +msgstr "Përdoruesit me njohuri më të thella mund të eksplorojnë JavaScript API të Add to Any." + +#: add-to-any.php:604 +msgid "Note: If you're adding new code, be careful not to accidentally overwrite any previous code." +msgstr "Shënim: nëse ti vendos kod të ri, ki kujdes mos të rishkruash ndonjë kod të vjetër." + +#: add-to-any.php:611 +msgid "Save Changes" +msgstr "Ruaj ndryshimet" + +#: add-to-any.php:616 +msgid "Like this plugin?" +msgstr "Të pëlqeu ky plugin?" + +#: add-to-any.php:617 +msgid "Give it a good rating on WordPress.org." +msgstr "Votoje në WordPress.org." + +#: add-to-any.php:618 +msgid "Share it with your friends." +msgstr "Shpërndaja miqve të tu.." + +#: add-to-any.php:620 +msgid "Need support?" +msgstr "Të duhet ndihmë??" + +#: add-to-any.php:621 +msgid "See the FAQs." +msgstr "Shiko faqen dedikuar FAQ." + +#: add-to-any.php:622 +msgid "Search the support forums." +msgstr "Bëj një kërkim në forum." + +#: add-to-any.php:729 +msgid "Add/Remove Services" +msgstr "Shtoi/Hiq shërbimet" + +#: add-to-any.php:775 +msgid "Share/Save" +msgstr "Shpërnda/Ruaj" + +#: add-to-any.php:776 +msgid "Share/Save Buttons" +msgstr "Butoni Shpërnda/Ruaj" + diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/languages/add-to-any-zh_CN.mo Binary file web/wp-content/plugins/add-to-any/languages/add-to-any-zh_CN.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/languages/add-to-any-zh_CN.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/add-to-any/languages/add-to-any-zh_CN.po Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,262 @@ +msgid "" +msgstr "" +"Project-Id-Version: add-to-any\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-12-18 00:13-0800\n" +"PO-Revision-Date: \n" +"Last-Translator: MicroPat\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-KeywordsList: __;_e\n" +"X-Poedit-Basepath: ../\n" +"X-Poedit-Language: Chinese\n" +"X-Poedit-Country: CHINA\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-SearchPath-0: .\n" + +#: add-to-any.php:211 +msgid "Share" +msgstr "分享" + +#: add-to-any.php:212 +msgid "Save" +msgstr "收藏" + +#: add-to-any.php:213 +msgid "Subscribe" +msgstr "订阅" + +#: add-to-any.php:214 +msgid "E-mail" +msgstr "电子邮件" + +#: add-to-any.php:215 +msgid "Bookmark" +msgstr "书签" + +#: add-to-any.php:216 +msgid "Show all" +msgstr "显示全部服务" + +#: add-to-any.php:217 +msgid "Show less" +msgstr "显示部分服务" + +#: add-to-any.php:218 +msgid "Find service(s)" +msgstr "查找服务" + +#: add-to-any.php:219 +msgid "Instantly find any service to add to" +msgstr "动态查找任何用以添加的服务" + +#: add-to-any.php:220 +msgid "Powered by" +msgstr "Powered by" + +#: add-to-any.php:221 +msgid "Share via e-mail" +msgstr "通过电子邮件分享" + +#: add-to-any.php:222 +msgid "Subscribe via e-mail" +msgstr "通过电子邮件订阅" + +#: add-to-any.php:223 +msgid "Bookmark in your browser" +msgstr "添加为浏览器书签" + +#: add-to-any.php:224 +#, fuzzy +msgid "Press Ctrl+D or ⌘+D to bookmark this page" +msgstr "按下 [Ctrl+D] 或 [Cmd+D] 将本页加为书签" + +#: add-to-any.php:225 +msgid "Add to your favorites" +msgstr "添加至收藏夹" + +#: add-to-any.php:226 +msgid "Send from any e-mail address or e-mail program" +msgstr "从任何电子邮件地址或电子邮件程序发送" + +#: add-to-any.php:227 +msgid "E-mail program" +msgstr "电子邮件程序" + +#: add-to-any.php:252 +msgid "Your theme needs to be fixed. To fix your theme, use the Theme Editor to insert <?php wp_footer(); ?> just before the </body> line of your theme's footer.php file." +msgstr "" + +#: add-to-any.php:390 +#: add-to-any.php:461 +#: add-to-any.php:465 +#: add-to-any.php:469 +#: add-to-any.php:473 +#: add-to-any.php:505 +#, fuzzy +msgid "Share/Bookmark" +msgstr "书签" + +#: add-to-any.php:404 +msgid "Settings saved." +msgstr "设置已保存" + +#: add-to-any.php:415 +msgid "Add to Any: Share/Save " +msgstr "Add to Any: 分享/收藏" + +#: add-to-any.php:415 +#: add-to-any.php:775 +#: add-to-any.php:796 +msgid "Settings" +msgstr "设置" + +#: add-to-any.php:425 +msgid "Standalone Services" +msgstr "" + +#: add-to-any.php:430 +msgid "Choose the services you want below.  Click a chosen service again to remove.  Reorder services by dragging and dropping as they appear above." +msgstr "" + +#: add-to-any.php:456 +msgid "Button" +msgstr "按钮" + +#: add-to-any.php:495 +msgid "Image URL" +msgstr "图片 URL" + +#: add-to-any.php:502 +msgid "Text only" +msgstr "仅用文字" + +#: add-to-any.php:510 +#, fuzzy +msgid "Placement" +msgstr "按钮位置" + +#: add-to-any.php:519 +msgid "Display Share/Save button at the bottom of posts" +msgstr "在文章底部显示 分享/收藏 按钮" + +#: add-to-any.php:526 +msgid "Display Share/Save button at the bottom of posts on the front page" +msgstr "在首页的文章底部显示 分享/收藏 按钮" + +#: add-to-any.php:533 +msgid "Display Share/Save button at the bottom of posts in the feed" +msgstr "在 Feed 的文章底部显示 分享/收藏 按钮" + +#: add-to-any.php:537 +msgid "Display Share/Save button at the bottom of pages" +msgstr "在页面底部显示 分享/收藏 按钮" + +#: add-to-any.php:541 +#, fuzzy +msgid "If unchecked, be sure to place the following code in your template pages (within index.php, single.php, and/or page.php)" +msgstr "如果不选,请确定将以下代码置入于 您的模板页面 中 (包括 index.phpsingle.php,与/或 page.php)" + +#: add-to-any.php:550 +msgid "Menu Style" +msgstr "菜单风格" + +#: add-to-any.php:552 +msgid "Using Add to Any's Menu Styler, you can customize the colors of your Share/Save menu! When you're done, be sure to paste the generated code in the Additional Options box below." +msgstr "使用 Add to Any 的菜单风格设置器,您可以自定义您的 分享/收藏 菜单的颜色!完成后,请将生成的代码粘贴于下方 附加选项 框内。" + +#: add-to-any.php:554 +msgid "Open the Add to Any Menu Styler in a new window" +msgstr "在新窗口中打开 Add to Any 菜单风格设置器" + +#: add-to-any.php:556 +msgid "Open Menu Styler" +msgstr "打开菜单风格设置器" + +#: add-to-any.php:561 +msgid "Menu Options" +msgstr "菜单选项" + +#: add-to-any.php:566 +msgid "Hide embedded objects (Flash, video, etc.) that intersect with the menu when displayed" +msgstr "菜单显示时隐藏与菜单相交的嵌入式对象(Flash,视频,等) " + +#: add-to-any.php:571 +msgid "Show the title of the post (or page) within the menu" +msgstr "菜单中显示文章(或页面)的标题" + +#: add-to-any.php:578 +msgid "Only show the menu when the user clicks the Share/Save button" +msgstr "仅当用户点击 分享/收藏 按钮时显示菜单" + +#: add-to-any.php:584 +msgid "Open the addtoany.com menu page in a new tab or window if the user clicks the Share/Save button" +msgstr "如用户点击 分享/收藏 按钮,在新标签页或新窗口中打开 addtoany.com 菜单页面" + +#: add-to-any.php:589 +msgid "Additional Options" +msgstr "附加选项" + +#: add-to-any.php:593 +msgid "Paste the code from Add to Any's Menu Styler in the box below!" +msgstr "粘贴 Add to Any 菜单风格设置器生成的代码于下方框内!" + +#: add-to-any.php:597 +msgid "Below you can set special JavaScript variables to apply to each Share/Save menu." +msgstr "您可以设置特殊 JavaScript 变量以应用于全部 分享/收藏 菜单。" + +#: add-to-any.php:598 +#, fuzzy +msgid "Advanced users might want to explore Add to Any's JavaScript API." +msgstr "高级用户可能希望尝试 Add to Any 的 JavaScript API 所生成的代码。" + +#: add-to-any.php:604 +msgid "Note: If you're adding new code, be careful not to accidentally overwrite any previous code." +msgstr "注意: 如果您打算添加新代码,请小心不要意外覆盖任何先前代码。" + +#: add-to-any.php:611 +msgid "Save Changes" +msgstr "保存更改" + +#: add-to-any.php:616 +msgid "Like this plugin?" +msgstr "" + +#: add-to-any.php:617 +msgid "Give it a good rating on WordPress.org." +msgstr "" + +#: add-to-any.php:618 +msgid "Share it with your friends." +msgstr "" + +#: add-to-any.php:620 +msgid "Need support?" +msgstr "" + +#: add-to-any.php:621 +msgid "See the FAQs." +msgstr "" + +#: add-to-any.php:622 +msgid "Search the support forums." +msgstr "" + +#: add-to-any.php:729 +msgid "Add/Remove Services" +msgstr "" + +#: add-to-any.php:775 +msgid "Share/Save" +msgstr "分享/收藏" + +#: add-to-any.php:776 +msgid "Share/Save Buttons" +msgstr "分享/收藏 按钮" + +#, fuzzy +#~ msgid "Services" +#~ msgstr "查找服务" + diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/languages/add-to-any.mo Binary file web/wp-content/plugins/add-to-any/languages/add-to-any.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/languages/add-to-any.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/add-to-any/languages/add-to-any.po Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,250 @@ +msgid "" +msgstr "" +"Project-Id-Version: add-to-any\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-12-18 00:13-0800\n" +"PO-Revision-Date: \n" +"Last-Translator: MicroPat\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-KeywordsList: __;_e\n" +"X-Poedit-Basepath: ../\n" +"X-Poedit-SearchPath-0: .\n" + +#: add-to-any.php:211 +msgid "Share" +msgstr "" + +#: add-to-any.php:212 +msgid "Save" +msgstr "" + +#: add-to-any.php:213 +msgid "Subscribe" +msgstr "" + +#: add-to-any.php:214 +msgid "E-mail" +msgstr "" + +#: add-to-any.php:215 +msgid "Bookmark" +msgstr "" + +#: add-to-any.php:216 +msgid "Show all" +msgstr "" + +#: add-to-any.php:217 +msgid "Show less" +msgstr "" + +#: add-to-any.php:218 +msgid "Find service(s)" +msgstr "" + +#: add-to-any.php:219 +msgid "Instantly find any service to add to" +msgstr "" + +#: add-to-any.php:220 +msgid "Powered by" +msgstr "" + +#: add-to-any.php:221 +msgid "Share via e-mail" +msgstr "" + +#: add-to-any.php:222 +msgid "Subscribe via e-mail" +msgstr "" + +#: add-to-any.php:223 +msgid "Bookmark in your browser" +msgstr "" + +#: add-to-any.php:224 +msgid "Press Ctrl+D or ⌘+D to bookmark this page" +msgstr "" + +#: add-to-any.php:225 +msgid "Add to your favorites" +msgstr "" + +#: add-to-any.php:226 +msgid "Send from any e-mail address or e-mail program" +msgstr "" + +#: add-to-any.php:227 +msgid "E-mail program" +msgstr "" + +#: add-to-any.php:252 +msgid "Your theme needs to be fixed. To fix your theme, use the Theme Editor to insert <?php wp_footer(); ?> just before the </body> line of your theme's footer.php file." +msgstr "" + +#: add-to-any.php:390 +#: add-to-any.php:461 +#: add-to-any.php:465 +#: add-to-any.php:469 +#: add-to-any.php:473 +#: add-to-any.php:505 +msgid "Share/Bookmark" +msgstr "" + +#: add-to-any.php:404 +msgid "Settings saved." +msgstr "" + +#: add-to-any.php:415 +msgid "Add to Any: Share/Save " +msgstr "" + +#: add-to-any.php:415 +#: add-to-any.php:775 +#: add-to-any.php:796 +msgid "Settings" +msgstr "" + +#: add-to-any.php:425 +msgid "Standalone Services" +msgstr "" + +#: add-to-any.php:430 +msgid "Choose the services you want below.  Click a chosen service again to remove.  Reorder services by dragging and dropping as they appear above." +msgstr "" + +#: add-to-any.php:456 +msgid "Button" +msgstr "" + +#: add-to-any.php:495 +msgid "Image URL" +msgstr "" + +#: add-to-any.php:502 +msgid "Text only" +msgstr "" + +#: add-to-any.php:510 +msgid "Placement" +msgstr "" + +#: add-to-any.php:519 +msgid "Display Share/Save button at the bottom of posts" +msgstr "" + +#: add-to-any.php:526 +msgid "Display Share/Save button at the bottom of posts on the front page" +msgstr "" + +#: add-to-any.php:533 +msgid "Display Share/Save button at the bottom of posts in the feed" +msgstr "" + +#: add-to-any.php:537 +msgid "Display Share/Save button at the bottom of pages" +msgstr "" + +#: add-to-any.php:541 +msgid "If unchecked, be sure to place the following code in your template pages (within index.php, single.php, and/or page.php)" +msgstr "" + +#: add-to-any.php:550 +msgid "Menu Style" +msgstr "" + +#: add-to-any.php:552 +msgid "Using Add to Any's Menu Styler, you can customize the colors of your Share/Save menu! When you're done, be sure to paste the generated code in the Additional Options box below." +msgstr "" + +#: add-to-any.php:554 +msgid "Open the Add to Any Menu Styler in a new window" +msgstr "" + +#: add-to-any.php:556 +msgid "Open Menu Styler" +msgstr "" + +#: add-to-any.php:561 +msgid "Menu Options" +msgstr "" + +#: add-to-any.php:566 +msgid "Hide embedded objects (Flash, video, etc.) that intersect with the menu when displayed" +msgstr "" + +#: add-to-any.php:571 +msgid "Show the title of the post (or page) within the menu" +msgstr "" + +#: add-to-any.php:578 +msgid "Only show the menu when the user clicks the Share/Save button" +msgstr "" + +#: add-to-any.php:584 +msgid "Open the addtoany.com menu page in a new tab or window if the user clicks the Share/Save button" +msgstr "" + +#: add-to-any.php:589 +msgid "Additional Options" +msgstr "" + +#: add-to-any.php:593 +msgid "Paste the code from Add to Any's Menu Styler in the box below!" +msgstr "" + +#: add-to-any.php:597 +msgid "Below you can set special JavaScript variables to apply to each Share/Save menu." +msgstr "" + +#: add-to-any.php:598 +msgid "Advanced users might want to explore Add to Any's JavaScript API." +msgstr "" + +#: add-to-any.php:604 +msgid "Note: If you're adding new code, be careful not to accidentally overwrite any previous code." +msgstr "" + +#: add-to-any.php:611 +msgid "Save Changes" +msgstr "" + +#: add-to-any.php:616 +msgid "Like this plugin?" +msgstr "" + +#: add-to-any.php:617 +msgid "Give it a good rating on WordPress.org." +msgstr "" + +#: add-to-any.php:618 +msgid "Share it with your friends." +msgstr "" + +#: add-to-any.php:620 +msgid "Need support?" +msgstr "" + +#: add-to-any.php:621 +msgid "See the FAQs." +msgstr "" + +#: add-to-any.php:622 +msgid "Search the support forums." +msgstr "" + +#: add-to-any.php:729 +msgid "Add/Remove Services" +msgstr "" + +#: add-to-any.php:775 +msgid "Share/Save" +msgstr "" + +#: add-to-any.php:776 +msgid "Share/Save Buttons" +msgstr "" + diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/screenshot-1.png Binary file web/wp-content/plugins/add-to-any/screenshot-1.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/screenshot-2.png Binary file web/wp-content/plugins/add-to-any/screenshot-2.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/screenshot-3.png Binary file web/wp-content/plugins/add-to-any/screenshot-3.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/screenshot-4.png Binary file web/wp-content/plugins/add-to-any/screenshot-4.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/screenshot-5.png Binary file web/wp-content/plugins/add-to-any/screenshot-5.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/services.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/add-to-any/services.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,518 @@ + Array( + "name" => "AIM", + "icon" => "aim", + ), + "aol_mail" => Array( + "name" => "AOL Mail", + "icon" => "aol", + ), + "allvoices" => Array( + "name" => "Allvoices", + "icon" => "allvoices", + ), + "amazon_wish_list" => Array( + "name" => "Amazon Wish List", + "icon" => "amazon", + ), + "arto" => Array( + "name" => "Arto", + "icon" => "arto", + ), + "ask_com_mystuff" => Array( + "name" => "Ask.com MyStuff", + "icon" => "ask", + ), + "backflip" => Array( + "name" => "Backflip", + "icon" => "backflip", + ), + "bebo" => Array( + "name" => "Bebo", + "icon" => "bebo", + ), + "bibsonomy" => Array( + "name" => "BibSonomy", + "icon" => "bibsonomy", + ), + "bitty_browser" => Array( + "name" => "Bitty Browser", + "icon" => "bitty", + ), + "blinklist" => Array( + "name" => "Blinklist", + "icon" => "blinklist", + ), + "blogmarks" => Array( + "name" => "BlogMarks", + "icon" => "blogmarks", + ), + "blogger_post" => Array( + "name" => "Blogger Post", + "icon" => "blogger", + ), + "bookmarks_fr" => Array( + "name" => "Bookmarks.fr", + "icon" => "bookmarks_fr", + ), + "buddymarks" => Array( + "name" => "BuddyMarks", + "icon" => "buddymarks", + ), + "buzzster" => Array( + "name" => "Buzzster", + "icon" => "bzzster", + ), + "care2_news" => Array( + "name" => "Care2 News", + "icon" => "care2", + ), + "citeulike" => Array( + "name" => "CiteULike", + "icon" => "citeulike", + ), + "connotea" => Array( + "name" => "Connotea", + "icon" => "connotea", + ), + "current" => Array( + "name" => "Current", + "icon" => "current", + ), + "dzone" => Array( + "name" => "DZone", + "icon" => "dzone", + ), + "dailyme" => Array( + "name" => "DailyMe", + "icon" => "dailyme", + ), + "delicious" => Array( + "name" => "Delicious", + "icon" => "delicious", + ), + "design_float" => Array( + "name" => "Design Float", + "icon" => "designfloat", + ), + "digg" => Array( + "name" => "Digg", + "icon" => "digg", + ), + "diglog" => Array( + "name" => "Diglog", + "icon" => "diglog", + ), + "diigo" => Array( + "name" => "Diigo", + "icon" => "diigo", + ), + "evernote" => Array( + "name" => "Evernote", + "icon" => "evernote", + ), + "expression" => Array( + "name" => "Expression", + "icon" => "expression", + ), + "facebook" => Array( + "name" => "Facebook", + "icon" => "facebook", + ), + "fark" => Array( + "name" => "Fark", + "icon" => "fark", + ), + "faves" => Array( + "name" => "Faves", + "icon" => "faves", + ), + "folkd" => Array( + "name" => "Folkd", + "icon" => "folkd", + ), + "foxiewire" => Array( + "name" => "Foxiewire", + "icon" => "foxiewire", + ), + "friendfeed" => Array( + "name" => "FriendFeed", + "icon" => "friendfeed", + ), + "funp" => Array( + "name" => "FunP", + "icon" => "funp", + ), + "furl" => Array( + "name" => "Furl", + "icon" => "furl", + ), + "gabbr" => Array( + "name" => "Gabbr", + "icon" => "gabbr", + ), + "global_grind" => Array( + "name" => "Global Grind", + "icon" => "global_grind", + ), + "gmail" => Array( + "name" => "Gmail", + "icon" => "gmail", + ), + "google_bookmarks" => Array( + "name" => "Google Bookmarks", + "icon" => "google", + ), + "google_reader" => Array( + "name" => "Google Reader", + "icon" => "reader", + ), + "health_ranker" => Array( + "name" => "Health Ranker", + "icon" => "healthranker", + ), + "hellotxt" => Array( + "name" => "HelloTxt", + "icon" => "hellotxt", + ), + "hemidemi" => Array( + "name" => "Hemidemi", + "icon" => "hemidemi", + ), + "hotmail" => Array( + "name" => "Hotmail", + "icon" => "live", + ), + "hugg" => Array( + "name" => "Hugg", + "icon" => "hugg", + ), + "hyves" => Array( + "name" => "Hyves", + "icon" => "hyves", + ), + "identi_ca" => Array( + "name" => "Identi.ca", + "icon" => "identica", + ), + "imera_brazil" => Array( + "name" => "Imera Brazil", + "icon" => "imera", + ), + "instapaper" => Array( + "name" => "Instapaper", + "icon" => "instapaper", + ), + "jamespot" => Array( + "name" => "Jamespot", + "icon" => "jamespot", + ), + "jumptags" => Array( + "name" => "Jumptags", + "icon" => "jumptags", + ), + "khabbr" => Array( + "name" => "Khabbr", + "icon" => "khabbr", + ), + "kledy" => Array( + "name" => "Kledy", + "icon" => "kledy", + ), + "linkagogo" => Array( + "name" => "LinkaGoGo", + "icon" => "linkagogo", + ), + "linkatopia" => Array( + "name" => "Linkatopia", + "icon" => "linkatopia", + ), + "linkedin" => Array( + "name" => "LinkedIn", + "icon" => "linkedin", + ), + "livejournal" => Array( + "name" => "LiveJournal", + "icon" => "livejournal", + ), + "msdn" => Array( + "name" => "MSDN", + "icon" => "msdn", + ), + "maple" => Array( + "name" => "Maple", + "icon" => "maple", + ), + "meneame" => Array( + "name" => "Meneame", + "icon" => "meneame", + ), + "mindbodygreen" => Array( + "name" => "MindBodyGreen", + "icon" => "mindbodygreen", + ), + "mister-wong" => Array( + "name" => "Mister-Wong", + "icon" => "mister-wong", + ), + "mixx" => Array( + "name" => "Mixx", + "icon" => "mixx", + ), + "mozillaca" => Array( + "name" => "Mozillaca", + "icon" => "mozillaca", + ), + "multiply" => Array( + "name" => "Multiply", + "icon" => "multiply", + ), + "mylinkvault" => Array( + "name" => "MyLinkVault", + "icon" => "mylinkvault", + ), + "myspace" => Array( + "name" => "MySpace", + "icon" => "myspace", + ), + "netlog" => Array( + "name" => "Netlog", + "icon" => "netlog", + ), + "netvibes_share" => Array( + "name" => "Netvibes Share", + "icon" => "netvibes", + ), + "netvouz" => Array( + "name" => "Netvouz", + "icon" => "netvouz", + ), + "newstrust" => Array( + "name" => "NewsTrust", + "icon" => "newstrust", + ), + "newsvine" => Array( + "name" => "NewsVine", + "icon" => "newsvine", + ), + "nowpublic" => Array( + "name" => "NowPublic", + "icon" => "nowpublic", + ), + "oneview" => Array( + "name" => "Oneview", + "icon" => "oneview", + ), + "phonefavs" => Array( + "name" => "PhoneFavs", + "icon" => "phonefavs", + ), + "ping" => Array( + "name" => "Ping", + "icon" => "ping", + ), + "plaxo_pulse" => Array( + "name" => "Plaxo Pulse", + "icon" => "plaxo", + ), + "plurk" => Array( + "name" => "Plurk", + "icon" => "plurk", + ), + "printfriendly" => Array( + "name" => "PrintFriendly", + "icon" => "printfriendly", + ), + "propeller" => Array( + "name" => "Propeller", + "icon" => "propeller", + ), + "protopage_bookmarks" => Array( + "name" => "Protopage Bookmarks", + "icon" => "protopage", + ), + "pusha" => Array( + "name" => "Pusha", + "icon" => "pusha", + ), + "reddit" => Array( + "name" => "Reddit", + "icon" => "reddit", + ), + "segnalo" => Array( + "name" => "Segnalo", + "icon" => "segnalo", + ), + "shoutwire" => Array( + "name" => "Shoutwire", + "icon" => "shoutwire", + ), + "simpy" => Array( + "name" => "Simpy", + "icon" => "simpy", + ), + "sitejot" => Array( + "name" => "SiteJot", + "icon" => "sitejot", + ), + "slashdot" => Array( + "name" => "Slashdot", + "icon" => "slashdot", + ), + "smaknews" => Array( + "name" => "SmakNews", + "icon" => "smaknews", + ), + "sphere" => Array( + "name" => "Sphere", + "icon" => "sphere", + ), + "sphinn" => Array( + "name" => "Sphinn", + "icon" => "sphinn", + ), + "spurl" => Array( + "name" => "Spurl", + "icon" => "spurl", + ), + "squidoo" => Array( + "name" => "Squidoo", + "icon" => "squidoo", + ), + "startaid" => Array( + "name" => "StartAid", + "icon" => "startaid", + ), + "strands" => Array( + "name" => "Strands", + "icon" => "strands", + ), + "stumbleupon" => Array( + "name" => "StumbleUpon", + "icon" => "stumbleupon", + ), + "stumpedia" => Array( + "name" => "Stumpedia", + "icon" => "stumpedia", + ), + "symbaloo_feeds" => Array( + "name" => "Symbaloo Feeds", + "icon" => "symbaloo", + ), + "taggly" => Array( + "name" => "Taggly", + "icon" => "taggly", + ), + "tagza" => Array( + "name" => "Tagza", + "icon" => "tagza", + ), + "tailrank" => Array( + "name" => "Tailrank", + "icon" => "tailrank", + ), + "technet" => Array( + "name" => "TechNet", + "icon" => "technet", + ), + "technorati_favorites" => Array( + "name" => "Technorati Favorites", + "icon" => "technorati", + ), + "technotizie" => Array( + "name" => "Technotizie", + "icon" => "technotizie", + ), + "tipd" => Array( + "name" => "Tipd", + "icon" => "tipd", + ), + "tumblr" => Array( + "name" => "Tumblr", + "icon" => "tumblr", + ), + "twiddla" => Array( + "name" => "Twiddla", + "icon" => "twiddla", + ), + "twitter" => Array( + "name" => "Twitter", + "icon" => "twitter", + ), + "typepad_post" => Array( + "name" => "TypePad Post", + "icon" => "typepad", + ), + "viadeo" => Array( + "name" => "Viadeo", + "icon" => "viadeo", + ), + "webnews" => Array( + "name" => "Webnews", + "icon" => "webnews", + ), + "windows_live_favorites" => Array( + "name" => "Windows Live Favorites", + "icon" => "live", + ), + "windows_live_spaces" => Array( + "name" => "Windows Live Spaces", + "icon" => "spaces", + ), + "wink" => Array( + "name" => "Wink", + "icon" => "wink", + ), + "wists" => Array( + "name" => "Wists", + "icon" => "wists", + ), + "wordpress" => Array( + "name" => "WordPress", + "icon" => "wordpress", + ), + "xerpi" => Array( + "name" => "Xerpi", + "icon" => "xerpi", + ), + "yahoo_bookmarks" => Array( + "name" => "Yahoo Bookmarks", + "icon" => "yahoo", + ), + "yahoo_buzz" => Array( + "name" => "Yahoo Buzz", + "icon" => "buzz", + ), + "yahoo_mail" => Array( + "name" => "Yahoo Mail", + "icon" => "yahoo", + ), + "yahoo_messenger" => Array( + "name" => "Yahoo Messenger", + "icon" => "yim", + ), + "yample" => Array( + "name" => "Yample", + "icon" => "yample", + ), + "yigg" => Array( + "name" => "YiGG", + "icon" => "yigg", + ), + "yoolink" => Array( + "name" => "Yoolink", + "icon" => "yoolink", + ), + "youmob" => Array( + "name" => "YouMob", + "icon" => "youmob", + ), + "unalog" => Array( + "name" => "unalog", + "icon" => "unalog", + ), + +); \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/share_16_16.png Binary file web/wp-content/plugins/add-to-any/share_16_16.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/share_save_120_16.gif Binary file web/wp-content/plugins/add-to-any/share_save_120_16.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/share_save_120_16.png Binary file web/wp-content/plugins/add-to-any/share_save_120_16.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/share_save_171_16.gif Binary file web/wp-content/plugins/add-to-any/share_save_171_16.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/share_save_171_16.png Binary file web/wp-content/plugins/add-to-any/share_save_171_16.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/share_save_256_24.gif Binary file web/wp-content/plugins/add-to-any/share_save_256_24.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-any/share_save_256_24.png Binary file web/wp-content/plugins/add-to-any/share_save_256_24.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-facebook-plugin/addtofacebook.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/add-to-facebook-plugin/addtofacebook.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,167 @@ +ID)."\" target=\"_blank\" title=\"Share on Facebook\">Share on Facebook

      "; + break; + case "image": + $data=$data."

      ID)."\" target=\"_blank\">\"Share

      "; + break; + case "both": + $data=$data."

      ID)."\" target=\"_blank\">\"ShareID)."\" target=\"_blank\" title=\"Share on Facebook\">Share on Facebook

      "; + break; + } + return $data; +} + +function activate_add_to_facebook(){ + global $post; + $current_options = get_option('add_to_facebook_options'); + $insertiontype = $current_options['insertion_type']; + if ($insertiontype != 'template'){ + add_filter('the_content', 'add_to_facebook', 10); + add_filter('the_excerpt', 'add_to_facebook', 10); + } +} + +activate_add_to_facebook(); + +function addtofacebook(){ + global $post; + $current_options = get_option('add_to_facebook_options'); + $insertiontype = $current_options['insertion_type']; + if ($insertiontype != 'auto'){ + $linktype = $current_options['link_type']; + switch ($linktype) { + case "text": + echo "

      ID)."\" target=\"_blank\" title=\"Share on Facebook\">Share on Facebook

      "; + break; + case "image": + echo "

      ID)."\" target=\"_blank\">\"Share

      "; + break; + case "both": + echo "

      ID)."\" target=\"_blank\">\"ShareID)."\" target=\"_blank\" title=\"Share on Facebook\">Share on Facebook

      "; + break; + } + } +} + +// Create the options page +function add_to_facebook_options_page() { + $current_options = get_option('add_to_facebook_options'); + $link = $current_options["link_type"]; + $insert = $current_options["insertion_type"]; + if ($_POST['action']){ ?> +

      Options saved.

      + +
      +

      Add to Facebook Options

      + +
      "> +
      + Options: + + + + + + + + + + +
      +
      +

      + +

      +
      +
      + + + \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-facebook-plugin/facebook.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/add-to-facebook-plugin/facebook.css Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,15 @@ +p.facebook a { + text-decoration: none; + font-style: italic; + color: #666; + font-size:12px; +} + +p.facebook a:hover { + text-decoration: underline; +} + + +p.facebook img { + margin: 1px 5px 0 0; +} \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-facebook-plugin/facebook_share_icon.gif Binary file web/wp-content/plugins/add-to-facebook-plugin/facebook_share_icon.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/add-to-facebook-plugin/readme.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/add-to-facebook-plugin/readme.txt Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,36 @@ +=== Plugin Name === +Contributors: David Goldstein +Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=3396118 +Tags: facebook +Requires at least: 2.0 +Tested up to: 2.7 +Stable tag: trunk + +This plugin adds a footer link to add the current post or page to a Facebook Mini-Feed. + +== Description == +This plugin adds a footer link to add the current post or page to a Facebook Mini-Feed. While the plugin is activated a link will appear after the content of the post with the text "Share on Facebook" or the Facebook icon or both. Clicking this link will bring the user to the Facebook site. If the user isn't logged in they will be prompted to do so. Once logged into Facebook the post will be added to the Mini-Feed of the account. + +== Installation == +1. Add a directory called 'add-to-facebook-plugin' (without the quotes) to your '/wp-content/plugins/' directory. +1. Upload addtofacebook.php and facebook_share_icon.gif to the '/wp-content/plugins/add-to-facebook-plugin/' directory. +1. Activate the plugin through the 'Plugins' menu in WordPress. +1. Go to 'Options->Add to Facebook' in your admin interface to select you options. + +== CSS == +The CSS for this plugin is found in the included facebook.css file. This file may be edited to change the style of the link. + +== Options == +There are two options on the options page: Link Type and Insertion Type. + +Link Type - This option sets if you want your Facebook link to be text, image or both. + +Insertion Type - This option sets how you want to insert the link into your posts/pages. There are two choices: auto or template. + +* Auto - When insertion type is set to auto the Facebook link will automatically be inserted right after the post. +* Template - When insertion type is set to template the Facebook link will appear wherever the template tag for the plugin is added to your theme. This option requires a template tag to be added to your theme. + +== Template Tag == +The following template tag must be added to your theme in the location you want the link to appear when insertion type is set to template: + +`` \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/ajax-calendar/ajax-calendar.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/ajax-calendar/ajax-calendar.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,88 @@ +register_plugin ('ajax-calendar', __FILE__); + + if (is_admin ()) + { + $this->add_action ('publish_post', 'cache_remove'); + $this->add_action ('save_post', 'cache_remove'); + $this->add_action ('delete_post', 'cache_remove'); + } + else + $this->add_action ('wp_head'); + + $this->widget = new AJAX_Calendar_Widget ('AJAX Calendar'); + } + + function show ($categories = '') + { + include_once (dirname (__FILE__).'/models/calendar.php'); + + $this->render ('calendar', array ('calendar' => new Calendar ($this->url (), $categories))); + } + + function wp_head () + { + $this->render ('head'); + } + + function cache_remove ($id) + { + $post = wp_get_single_post ($id); + + $postmonth = substr ($post->post_date, 5, 2); + $postyear = substr ($post->post_date, 0, 4); + $modmonth = substr ($post->post_modified, 5, 2); + $modyear = substr ($post->post_modified, 0, 4); + + // Delete the cache files for the two dates, just in case something has changed + for ($x = 0; $x < 2; $x++) + { + wp_cache_delete ($postyear."_".$postmonth."_".$x); + wp_cache_delete ($modyear."_".$modmonth."_".$x); + } + } + + function &get () + { + static $instance; + + if (!isset ($instance)) + { + $c = __CLASS__; + $instance = new $c; + } + + return $instance; + } +} + + +function ajax_calendar ($categories = '') +{ + $calendar = AJAX_Calendar::get (); + $calendar->show ($categories); +} +} + + +$ajax_calendar_plugin = AJAX_Calendar::get (); + +?> \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/ajax-calendar/ajax.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/ajax-calendar/ajax.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,15 @@ +url ()); +echo $calendar->show (intval ($_GET['month']), intval ($_GET['year']), intval ($_GET['full'])); + +?> \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/ajax-calendar/calendar.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/ajax-calendar/calendar.css Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,47 @@ +#wp-calendar +{ +text-align: center; +width: 100%; +border-collapse: collapse; +padding: 0; +margin: 0; +font-size: 1em; +} + +#wp-calendar caption a, #wp-calendar caption a:hover +{ +background: transparent; +} + +#wp-calendar th +{ +font-weight: bold; +} + +#wp-calendar a +{ +text-decoration: none; +display: block; +color: black; +} + +#wp-calendar td, #wp-calendar th +{ +text-align: center; +} + +#wp-calendar tbody td a +{ +text-decoration: underline; +background-color: #ccc; +} + +#wp-calendar caption +{ +letter-spacing: 0.1em; +padding: 0.2em 1em 0.2em 0em; +font-weight: normal; +text-align: left; +font-size: 1.2em; +} + diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/ajax-calendar/js/microajax.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/ajax-calendar/js/microajax.js Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,34 @@ +// MicroAJAX: http://www.blackmac.de/index.php?/archives/31-Smallest-JavaScript-AJAX-library-ever!.html +function microAjax(url,cF){ +this.bF=function(caller,object){ +return function(){ +return caller.apply(object,new Array(object)); +}} +this.sC=function(object) { +if (this.r.readyState==4) { +this.cF(this.r.responseText); +}} +this.gR=function(){ +if (window.ActiveXObject) +return new ActiveXObject('Microsoft.XMLHTTP'); +else if (window.XMLHttpRequest) +return new XMLHttpRequest(); +else +return false; +} +if (arguments[2]) this.pb=arguments[2]; +else this.pb=""; +this.cF=cF; +this.url=url; +this.r=this.gR(); +if(this.r){ +this.r.onreadystatechange=this.bF(this.sC,this); +if(this.pb!=""){ +this.r.open("POST",url,true); +this.r.setRequestHeader('Content-type','application/x-www-form-urlencoded'); +this.r.setRequestHeader('Connection','close'); +}else{ +this.r.open("GET",url,true); +} +this.r.send(this.pb); +}} diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/ajax-calendar/license.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/ajax-calendar/license.txt Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey 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; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If 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 convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU 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 that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + 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. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +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. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + 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 +state 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 3 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, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program 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, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU 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. But first, please read +. diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/ajax-calendar/models/calendar.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/ajax-calendar/models/calendar.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,269 @@ +url = $url; + + if ($categories) + $this->categories = explode (',', $categories); + } + + function show ($month_num = '', $year_num = '', $full = '0', $categories = '') + { + global $wpdb, $m, $monthnum, $year, $timedifference, $month, $month_abbrev, $weekday, $weekday_initial, $weekday_abbrev, $posts, $wp_rewrite; + + $month_num = intval ($month_num); + $year_num = intval ($year_num); + + if ($year_num <= 2003) + $year_num = date ('Y'); + + if ($month_num <= 0 || $month_num > 12) + $month_num = date ('n'); + + $monthnum = $month_num; + $year = $year_num; + + // Is this cached? + $cache = wp_cache_get ($year."_".$monthnum."_".$full, 'calendar'); + if ($cache) + $text = $cache; + else + { + $next_month = $monthnum + 1; + $next_year = $year; + $prev_month = $monthnum - 1; + $prev_year = $year; + $notfull = $full == 0 ? 1 : 0; + + if ($next_month == 13) + { + $next_month = 1; + $next_year++; + } + + if ($prev_month == 0) + { + $prev_month = 12; + $prev_year--; + } + + ob_start (); + $this->wp_calendar ($month_num, $year_num, $full); + $text = ob_get_contents (); + ob_end_clean (); + + // Cache this + wp_cache_add ($year."_".$monthnum."_".$full, $text, 'calendar'); + } + + return $text; + } + + + // This is a duplicate of the WP function, but modified slightly to provide the enhanced functionality + function wp_calendar ($thismonth, $thisyear, $full) + { + global $wpdb, $m, $monthnum, $year, $timedifference, $month, $month_abbrev, $weekday, $weekday_initial, $weekday_abbrev, $posts; + global $giraffe_ajax_always; + + if ($giraffe_ajax_always && $_SERVER['HTTP_X_REQUESTED_WITH'] != 'XMLHttpRequest') + $full = 1; + + // week_begins = 0 stands for Sunday + $week_begins = intval(get_settings('start_of_week')); + $add_hours = intval(get_settings('gmt_offset')); + $add_minutes = intval(60 * (get_settings('gmt_offset') - $add_hours)); + + // Let's figure out when we are + $unixmonth = mktime(0, 0 , 0, $thismonth, 1, $thisyear); + + // Get the current post + $current = $wpdb->get_row ("SELECT count(post_date) as count FROM $wpdb->posts WHERE post_date='".date('Y')."-".date ('n')."-01' AND post_status='publish' AND post_type='post'"); + + // 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_status = 'publish' AND post_type='post' + 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_status = 'publish' AND post_type='post' + ORDER BY post_date ASC + LIMIT 1"); + + if ($current->count == 0) + $initiallink = $month[zeroise($thismonth, 2)].' '.$thisyear; + else + $initiallink = '' . $month[zeroise($thismonth, 2)] . ' ' . date('Y', $unixmonth) . ''; + + echo ' + + + '; + + $day_abbrev = $weekday_initial; + if ( $daylength > 1 ) + $day_abbrev = $weekday_abbrev; + + $myweek = array(); + + for ( $wdcount=0; $wdcount<=6; $wdcount++ ) { + $myweek[]=$weekday[($wdcount+$week_begins)%7]; + } + + foreach ( $myweek as $wd ) { + echo "\n\t\t'; + } + + echo ''; + + if ($previous) + { + $link = get_month_link($previous->year, $previous->month); + $linktext = sprintf(__('View posts for %1$s %2$s'), $month[zeroise($previous->month, 2)], date('Y', mktime(0, 0 , 0, $previous->month, 1, $previous->year))); + ?> + +  '; + + if ($this->showit) + { + echo ''; + + if ( $next ) { + echo "\n\t\t".''; + } else { + echo "\n\t\t".''; + } + } + + echo ' + + + + + '; + + // Get days with posts + $sql = "SELECT DISTINCT DAYOFMONTH(post_date) + FROM $wpdb->posts + LEFT JOIN {$wpdb->prefix}term_relationships ON ({$wpdb->prefix}posts.ID = {$wpdb->prefix}term_relationships.object_id) + LEFT JOIN {$wpdb->prefix}term_taxonomy ON ({$wpdb->prefix}term_relationships.term_taxonomy_id = {$wpdb->prefix}term_taxonomy.term_taxonomy_id) + WHERE MONTH(post_date) = $thismonth + AND YEAR(post_date) = $thisyear + AND post_status = 'publish' AND post_type='post'"; + + if (count ($this->categories) > 0) + $sql .= " AND {$wpdb->prefix}term_taxonomy.term_id IN (".implode (',', $this->categories).')'; + + $dayswithposts = $wpdb->get_results($sql, ARRAY_N); + + if ( $dayswithposts ) { + foreach ( $dayswithposts as $daywith ) { + $daywithpost[] = $daywith[0]; + } + } else { + $daywithpost = array(); + } + + + + if ( strstr($_SERVER['HTTP_USER_AGENT'], 'MSIE') || strstr(strtolower($_SERVER['HTTP_USER_AGENT']), 'camino') || strstr(strtolower($_SERVER['HTTP_USER_AGENT']), 'safari') ) + $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_status = 'publish' AND post_type='post'" + ); + if ( $ak_post_titles ) { + foreach ( $ak_post_titles as $ak_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"] = str_replace('"', '"', wptexturize($ak_post_title->post_title)); + else + $ak_titles_for_day["$ak_post_title->dom"] .= $ak_title_separator . str_replace('"', '"', wptexturize($ak_post_title->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_settings('gmt_offset') * 3600))) && $thismonth == gmdate('m', time()+(get_settings('gmt_offset') * 3600)) && $thisyear == gmdate('Y', time()+(get_settings('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"; + echo "\n\t\n\t
      '.$initiallink.'
      " . $day_abbrev[$wd] . '
      + + « month, 2)]] ?> + '.$this->split_open.'' . $month_abbrev[$month[zeroise($next->month, 2)]] . ' » 
       
      '; + else + echo ''; + + if ( in_array($day, $daywithpost) ) // any posts today? + echo '$day"; + else + echo $day; + echo ' 
      "; + + if ($full == 1) + { + global $wpdb; + + $res = $wpdb->get_results ("SELECT ID,post_title FROM $wpdb->posts WHERE month(post_date) = '$monthnum' AND year(post_date) = '$year' AND post_status = 'publish' AND post_type='post' ORDER BY post_date"); + if ($res) + { + $text .= "
      "; + } + + echo $text; + } + } +} +?> \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/ajax-calendar/models/widget.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/ajax-calendar/models/widget.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,59 @@ +title = $config['title']; + if (isset ($config['category_id'])) + $this->category_ids = $config['category_id']; + } + + function display ($args) + { + extract ($args); + + echo $before_widget; + + if ($this->title) + echo $before_title.$this->title.$after_title; + + ajax_calendar ($this->category_ids); + + echo $after_widget; + } + + function description () + { + return 'AJAX-powered calendar'; + } + + function config ($config, $pos) + { + ?> + + + + + + + + + +
      Title:
      Category ID:
      + $data['title'], 'category_id' => $data['category_id']); + } +} + +?> \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/ajax-calendar/plugin.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/ajax-calendar/plugin.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,650 @@ +Display Rendering + * The class uses a similar technique to Ruby On Rails views, whereby the display HTML is kept + * in a separate directory and file from the main code. A display is 'rendered' (sent to the browser) + * or 'captured' (returned to the calling function). + * + * Template files are separated into two areas: admin and user. Admin templates are only for display in + * the WordPress admin interface, while user templates are typically for display on the site (although neither + * of these are enforced). All templates are PHP code, but are referred to without .php extension. + * + * The reason for this separation is that one golden rule of plugin creation is that someone will always want to change + * the formatting and style of your output. Rather than forcing them to modify the plugin (bad), or modify files within + * the plugin (equally bad), the class allows user templates to be overridden with files contained within the theme. + * + * An additional benefit is that it leads to code re-use, especially with regards to Ajax (i.e. your display code can be called from + * many locations) + * + * Template files are located within the 'view' subdirectory of the plugins base (specified when registering the plugin): + * + *
      myplugin/view/admin
      + * myplugin/view/myplugin
      + * + * Admin templates are contained within 'admin', and user templates are contained within a directory of the same name as the plugin. + * + * User files can be overridden within the theme by creating a similar directory structure: + * + *
      /themes/mytheme/view/myplugin
      + * + * The class will first look in the theme and then defaults to the plugin. A plugin should always provide default templates. + * + *

      Display Parameters

      + * Also similar to Ruby On Rails, when you display a template you must supply the parameters that the template has access to. This tries + * to ensure a very clean separation between code and display. Parameters are supplied as an associative array mapping variable name to variable value. + * + * For example, + * + * array ('message' => 'Your data was processed', 'items' => 103); + * + *

      How it works in practice

      + * You create a template file to display how many items have been processed. You store this in 'view/admin/processed.php': + * + *
      <p>You processed <?php echo $items ?> items</p>
      + * + * When you want to display this in your plugin you use: + * + *
       $this->render_admin ('processed', array ('items' => 100));
      + *
      + * @package WordPress base library
      + * @author John Godley
      + * @copyright Copyright (C) John Godley
      + **/
      +
      +class AJAX_Calendar_Plugin
      +{
      +	/**
      +	 * Plugin name
      +	 * @var string
      +	 **/
      +	var $plugin_name;
      +
      +	/**
      +	 * Plugin 'view' directory
      +	 * @var string Directory
      +	 **/
      +	var $plugin_base;
      +
      +
      +	/**
      +	 * Register your plugin with a name and base directory.  This must be called once.
      +	 *
      +	 * @param string $name Name of your plugin.  Is used to determine the plugin locale domain
      +	 * @param string $base Directory containing the plugin's 'view' files.
      +	 * @return void
      +	 **/
      +
      +	function register_plugin ($name, $base)
      +	{
      +		$this->plugin_base = rtrim (dirname ($base), '/');
      +		$this->plugin_name = $name;
      +
      +		$this->add_action ('init', 'load_locale');
      +	}
      +
      +	function load_locale ()
      +	{
      +		// Here we manually fudge the plugin locale as WP doesnt allow many options
      +		$locale = get_locale ();
      +		if ( empty($locale) )
      +			$locale = 'en_US';
      +
      +		$mofile = dirname (__FILE__)."/locale/$locale.mo";
      +		load_textdomain ($this->plugin_name, $mofile);
      +	}
      +
      +
      +	/**
      +	 * Register a WordPress action and map it back to the calling object
      +	 *
      +	 * @param string $action Name of the action
      +	 * @param string $function Function name (optional)
      +	 * @param int $priority WordPress priority (optional)
      +	 * @param int $accepted_args Number of arguments the function accepts (optional)
      +	 * @return void
      +	 **/
      +
      +	function add_action ($action, $function = '', $priority = 10, $accepted_args = 1)
      +	{
      +		add_action ($action, array (&$this, $function == '' ? $action : $function), $priority, $accepted_args);
      +	}
      +
      +
      +	/**
      +	 * Register a WordPress filter and map it back to the calling object
      +	 *
      +	 * @param string $action Name of the action
      +	 * @param string $function Function name (optional)
      +	 * @param int $priority WordPress priority (optional)
      +	 * @param int $accepted_args Number of arguments the function accepts (optional)
      +	 * @return void
      +	 **/
      +
      +	function add_filter ($filter, $function = '', $priority = 10, $accepted_args = 1)
      +	{
      +		add_filter ($filter, array (&$this, $function == '' ? $filter : $function), $priority, $accepted_args);
      +	}
      +
      +
      +	/**
      +	 * Special activation function that takes into account the plugin directory
      +	 *
      +	 * @param string $pluginfile The plugin file location (i.e. __FILE__)
      +	 * @param string $function Optional function name, or default to 'activate'
      +	 * @return void
      +	 **/
      +
      +	function register_activation ($pluginfile, $function = '')
      +	{
      +		add_action ('activate_'.basename (dirname ($pluginfile)).'/'.basename ($pluginfile), array (&$this, $function == '' ? 'activate' : $function));
      +	}
      +
      +
      +	/**
      +	 * Special deactivation function that takes into account the plugin directory
      +	 *
      +	 * @param string $pluginfile The plugin file location (i.e. __FILE__)
      +	 * @param string $function Optional function name, or default to 'deactivate'
      +	 * @return void
      +	 **/
      +
      +	function register_deactivation ($pluginfile, $function = '')
      +	{
      +		add_action ('deactivate_'.basename (dirname ($pluginfile)).'/'.basename ($pluginfile), array (&$this, $function == '' ? 'deactivate' : $function));
      +	}
      +
      +
      +	/**
      +	 * Renders an admin section of display code
      +	 *
      +	 * @param string $ug_name Name of the admin file (without extension)
      +	 * @param string $array Array of variable name=>value that is available to the display code (optional)
      +	 * @return void
      +	 **/
      +
      +	function render_admin ($ug_name, $ug_vars = array ())
      +	{
      +		global $plugin_base;
      +		foreach ($ug_vars AS $key => $val)
      +			$$key = $val;
      +
      +		if (file_exists ("{$this->plugin_base}/view/admin/$ug_name.php"))
      +			include ("{$this->plugin_base}/view/admin/$ug_name.php");
      +		else
      +			echo "

      Rendering of admin template {$this->plugin_base}/view/admin/$ug_name.php failed

      "; + } + + + /** + * Renders a section of user display code. The code is first checked for in the current theme display directory + * before defaulting to the plugin + * + * @param string $ug_name Name of the admin file (without extension) + * @param string $array Array of variable name=>value that is available to the display code (optional) + * @return void + **/ + + function render ($ug_name, $ug_vars = array ()) + { + foreach ($ug_vars AS $key => $val) + $$key = $val; + + if (file_exists (TEMPLATEPATH."/view/{$this->plugin_name}/$ug_name.php")) + include (TEMPLATEPATH."/view/{$this->plugin_name}/$ug_name.php"); + else if (file_exists ("{$this->plugin_base}/view/{$this->plugin_name}/$ug_name.php")) + include ("{$this->plugin_base}/view/{$this->plugin_name}/$ug_name.php"); + else + echo "

      Rendering of template $ug_name.php failed

      "; + } + + + /** + * Renders a section of user display code. The code is first checked for in the current theme display directory + * before defaulting to the plugin + * + * @param string $ug_name Name of the admin file (without extension) + * @param string $array Array of variable name=>value that is available to the display code (optional) + * @return void + **/ + + function capture ($ug_name, $ug_vars = array ()) + { + ob_start (); + $this->render ($ug_name, $ug_vars); + $output = ob_get_contents (); + ob_end_clean (); + return $output; + } + + + /** + * Captures an admin section of display code + * + * @param string $ug_name Name of the admin file (without extension) + * @param string $array Array of variable name=>value that is available to the display code (optional) + * @return string Captured code + **/ + + function capture_admin ($ug_name, $ug_vars = array ()) + { + ob_start (); + $this->render_admin ($ug_name, $ug_vars); + $output = ob_get_contents (); + ob_end_clean (); + return $output; + } + + + /** + * Display a standard error message (using CSS ID 'message' and classes 'fade' and 'error) + * + * @param string $message Message to display + * @return void + **/ + + function render_error ($message) + { + ?> +
      +

      +
      + +
      +

      +
      + plugin_base; + } + + + /** + * Get a URL to the plugin. Useful for specifying JS and CSS files + * + * For example, + * + * @return string URL + **/ + + function url ($url = '') + { + if ($url) + return str_replace ('\\', urlencode ('\\'), str_replace ('&amp', '&', str_replace ('&', '&', $url))); + else + { + $url = substr ($this->plugin_base, strlen ($this->realpath (ABSPATH))); + if (DIRECTORY_SEPARATOR != '/') + $url = str_replace (DIRECTORY_SEPARATOR, '/', $url); + + $url = get_bloginfo ('wpurl').'/'.ltrim ($url, '/'); + + // Do an SSL check - only works on Apache + global $is_IIS; + if (isset ($_SERVER['HTTPS']) && !$is_IIS) + $url = str_replace ('http://', 'https://', $url); + } + return $url; + } + + + + /** + * Performs a version update check using an RSS feed. The function ensures that the feed is only + * hit once every given number of days, and the data is cached using the WordPress Magpie library + * + * @param string $url URL of the RSS feed + * @param int $days Number of days before next check + * @return string Text to display + **/ + + function version_update ($url, $days = 7) + { + if (!function_exists ('fetch_rss')) + { + if (!file_exists (ABSPATH.'wp-includes/rss.php')) + return ''; + include (ABSPATH.'wp-includes/rss.php'); + } + + $now = time (); + + $checked = get_option ('plugin_urbangiraffe_rss'); + + // Use built-in Magpie caching + if (function_exists ('fetch_rss') && (!isset ($checked[$this->plugin_name]) || $now > $checked[$this->plugin_name] + ($days * 24 * 60 * 60))) + { + $rss = fetch_rss ($url); + if (count ($rss->items) > 0) + { + foreach ($rss->items AS $pos => $item) + { + if (isset ($checked[$this->plugin_name]) && strtotime ($item['pubdate']) < $checked[$this->plugin_name]) + unset ($rss->items[$pos]); + } + } + + $checked[$this->plugin_name] = $now; + update_option ('plugin_urbangiraffe_rss', $checked); + return $rss; + } + } + + + /** + * Version of realpath that will work on systems without realpath + * + * @param string $path The path to canonicalize + * @return string Canonicalized path + **/ + + function realpath ($path) + { + if (function_exists ('realpath')) + return realpath ($path); + else if (DIRECTORY_SEPARATOR == '/') + { + $path = preg_replace ('/^~/', $_SERVER['DOCUMENT_ROOT'], $path); + + // canonicalize + $path = explode (DIRECTORY_SEPARATOR, $path); + $newpath = array (); + for ($i = 0; $i < sizeof ($path); $i++) + { + if ($path[$i] === '' || $path[$i] === '.') + continue; + + if ($path[$i] === '..') + { + array_pop ($newpath); + continue; + } + + array_push ($newpath, $path[$i]); + } + + $finalpath = DIRECTORY_SEPARATOR.implode (DIRECTORY_SEPARATOR, $newpath); + return $finalpath; + } + + return $path; + } + + + function checked ($item, $field = '') + { + if ($field && is_array ($item)) + { + if (isset ($item[$field]) && $item[$field]) + echo ' checked="checked"'; + } + else if (!empty ($item)) + echo ' checked="checked"'; + } + + function select ($items, $default = '') + { + if (count ($items) > 0) + { + foreach ($items AS $key => $value) + { + if (is_array ($value)) + { + echo ''; + foreach ($value AS $sub => $subvalue) + echo ''; + echo ''; + } + else + echo ''; + } + } + } +} + +if (!class_exists ('Widget_AJAX_Calendar')) +{ + class Widget_AJAX_Calendar + { + function Widget_AJAX_Calendar ($name, $max = 1, $id = '', $args = '') + { + $this->name = $name; + $this->id = $id; + $this->widget_max = $max; + $this->args = $args; + + if ($this->id == '') + $this->id = strtolower (preg_replace ('/[^A-Za-z]/', '-', $this->name)); + + $this->widget_available = 1; + if ($this->widget_max > 1) + { + $this->widget_available = get_option ('widget_available_'.$this->id ()); + if ($this->widget_available === false) + $this->widget_available = 1; + } + + add_action ('init', array (&$this, 'initialize')); + } + + function initialize () + { + // Compatability functions for WP 2.1 + if (!function_exists ('wp_register_sidebar_widget')) + { + function wp_register_sidebar_widget ($id, $name, $output_callback, $classname = '') + { + register_sidebar_widget($name, $output_callback, $classname); + } + } + + if (!function_exists ('wp_register_widget_control')) + { + function wp_register_widget_control($name, $control_callback, $width = 300, $height = 200) + { + register_widget_control($name, $control_callback, $width, $height); + } + } + + if (function_exists ('wp_register_sidebar_widget')) + { + if ($this->widget_max > 1) + { + add_action ('sidebar_admin_setup', array (&$this, 'setup_save')); + add_action ('sidebar_admin_page', array (&$this, 'setup_display')); + } + + $this->load_widgets (); + } + } + + function load_widgets () + { + for ($pos = 1; $pos <= $this->widget_max; $pos++) + { + wp_register_sidebar_widget ($this->id ($pos), $this->name ($pos), $pos <= $this->widget_available ? array (&$this, 'show_display') : '', $this->args (), $pos); + + if ($this->has_config ()) + wp_register_widget_control ($this->id ($pos), $this->name ($pos), $pos <= $this->widget_available ? array (&$this, 'show_config') : '', $this->args (), $pos); + } + } + + function args () + { + if ($this->args) + $args = $this->args; + else + $args = array ('classname' => ''); + + if ($this->description ()) + $args['description'] = $this->description (); + return $args; + } + + function description () { return ''; } + + function name ($pos) + { + if ($this->widget_available > 1) + return $this->name.' ('.$pos.')'; + return $this->name; + } + + function id ($pos = 0) + { + if ($pos == 0) + return $this->id; + return $this->id.'-'.$pos; + } + + function show_display ($args, $number = 1) + { + $config = get_option ('widget_config_'.$this->id ($number)); + if ($config === false) + $config = array (); + + $this->load ($config); + $this->display ($args); + } + + function show_config ($position) + { + if (isset ($_POST['widget_config_save_'.$this->id ($position)])) + { + $data = $_POST[$this->id ()]; + if (count ($data) > 0) + { + $newdata = array (); + foreach ($data AS $item => $values) + $newdata[$item] = $values[$position]; + $data = $newdata; + } + + update_option ('widget_config_'.$this->id ($position), $this->save ($data)); + } + + $options = get_option ('widget_config_'.$this->id ($position)); + if ($options === false) + $options = array (); + + $this->config ($options, $position); + echo ''; + } + + function has_config () { return false; } + function save ($data) + { + return array (); + } + + function setup_save () + { + if (isset ($_POST['widget_setup_save_'.$this->id ()])) + { + $this->widget_available = intval ($_POST['widget_setup_count_'.$this->id ()]); + if ($this->widget_available < 1) + $this->widget_available = 1; + else if ($this->widget_available > $this->widget_max) + $this->widget_available = $this->widget_max; + + update_option ('widget_available_'.$this->id (), $this->widget_available); + + $this->load_widgets (); + } + } + + function config_name ($field, $pos) + { + return $this->id ().'['.$field.']['.$pos.']'; + } + + function setup_display () + { + ?> +
      +
      +

      name ?>

      +

      id); ?> + + + + +

      +
      +
      + \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/ajax-calendar/readme.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/ajax-calendar/readme.txt Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,92 @@ +=== Plugin Name === +Contributors: johnny5 +Donate link: http://urbangiraffe.com/about/support/ +Tags: ajax, calendar, widget +Requires at least: 2.0 +Tested up to: 2.8.6 +Stable tag: trunk + +AJAX Calendar is a plugin that will display an AJAXified WordPress calendar. + +== Description == + +AJAX Calendar is a plugin that will display an AJAXified WordPress calendar. This enhances the functionality of the standard calendar by: + +* Allowing the asynchronous navigation of months, without updating the page +* Adding a drop-down list of post titles in each month (through the «-» button) +* Adding full caching support to reduce server load + +== Installation == + +The plugin is simple to install: + +1. Download the zip file +1. Unpack the zip. You should have a directory called `ajax_calendar`, containing several PHP files +1. Upload the `ajax_calendar` directory to the `wp-content/plugins` directory on your WordPress installation. It is important you retain the `ajax_calendar` directory structure +1. Make any modifications to your theme, as required +1. Activate plugin + +You can find full details of installing a plugin on the [plugin installation page](http://urbangiraffe.com/articles/how-to-install-a-wordpress-plugin/). + +== Frequently Asked Questions == + += Does this plugin provide any scheduling functionality? = + +No, the calendar just shows your posting history. + +== Screenshots == + +1. Example screenshot + +== Documentation == + +Full documentation can be found on the [AJAX Calendar](http://urbangiraffe.com/plugins/ajax-calendar/) page. + +== Changelog == + += 2.1 = +* Swap from xajax to prototype. +* Fix cache deletion problems. + += 2.2 = +* Use wpurl instead of home + += 2.3 = +* Require WordPress 2.1+. +* Fix some problems. +* Use prototype lite + += 2.3.1 = +* Add option for always showing full details + += 2.4.0 = +* Use moo.tools for size +* use WP Object cache + += 2.4.1 = +* Added base CSS class +* Improved widget + += 2.4.2 = +* Use microajax for even better size and no clashes with prototype + += 2.4.3 = +* Fix validation errors + += 2.4.4 = +* Apply filters to titles + += 2.4.5 = +* Update widget class for 2.1 support + += 2.4.6 = +* WP 2.5 support + += 2.4.7 = +* WP 2.6 + += 2.4.8 = +* Add support for category selection + += 2.4.9 = +* Fix DB prefix bug diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/ajax-calendar/screenshot-1.png Binary file web/wp-content/plugins/ajax-calendar/screenshot-1.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/ajax-calendar/view/ajax-calendar/calendar.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/ajax-calendar/view/ajax-calendar/calendar.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,3 @@ +
      + show ('', '', 0, $categories) ?> +
      \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/ajax-calendar/view/ajax-calendar/head.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/ajax-calendar/view/ajax-calendar/head.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,11 @@ + + + diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/akismet/akismet.gif Binary file web/wp-content/plugins/akismet/akismet.gif has changed diff -r 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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.6 +Author: Matt Mullenweg +Author URI: http://ma.tt/ +*/ + +define('AKISMET_VERSION', '2.2.6'); + +// 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://wordpress.com/profile/')), + '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 WordPress.com.'), 'http://akismet.com/', 'http://wordpress.com/api-keys/'); ?>

      + + +

      + +

      + +

      (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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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.8.5 + +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 000000000000 -r 03b0d1493584 web/wp-content/plugins/all-in-one-seo-pack/aioseop.class.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/all-in-one-seo-pack/aioseop.class.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,2272 @@ +wp_version = $wp_version; + + $this->log_file = dirname(__FILE__) . '/all_in_one_seo_pack.log'; + if ($aioseop_options['aiosp_do_log']) { + $this->do_log = true; + } else { + $this->do_log = false; + } + +// $this->upgrade_filename = dirname(__FILE__) . '/' . $this->upgrade_filename; +// $this->upgrade_folder = dirname(__FILE__); + } + + /** + * Convert a string to lower case + * Compatible with mb_strtolower(), an UTF-8 friendly replacement for strtolower() + */ + function strtolower($str) { + global $UTF8_TABLES; + return strtr($str, $UTF8_TABLES['strtolower']); + } + + /** + * Convert a string to upper case + * Compatible with mb_strtoupper(), an UTF-8 friendly replacement for strtoupper() + */ + function strtoupper($str) { + global $UTF8_TABLES; + return strtr($str, $UTF8_TABLES['strtoupper']); + } + + + function template_redirect() { + global $wp_query; + global $aioseop_options; + + $post = $wp_query->get_queried_object(); + + if( $this->aioseop_mrt_exclude_this_page()){ + return; + } + + if (is_feed()) { + return; + } + + if (is_single() || is_page()) { + $aiosp_disable = htmlspecialchars(stripcslashes(get_post_meta($post->ID, '_aioseop_disable', true))); + if ($aiosp_disable) { + return; + } + } + + + + if ($aioseop_options['aiosp_rewrite_titles']) { + ob_start(array($this, 'output_callback_for_title')); + } + } + + function aioseop_mrt_exclude_this_page(){ + global $aioseop_options; + $currenturl = trim($_SERVER['REQUEST_URI'],'/'); + /* echo "

    "; + echo $aioseop_options['aiosp_ex_pages']; + echo "

    "; +*/ + + $excludedstuff = explode(',',$aioseop_options['aiosp_ex_pages']); + foreach($excludedstuff as $exedd){ + //echo $exedd; + $exedd = trim($exedd); + if($exedd){ + if(stristr($currenturl, $exedd)){ + return true; + } + } + } + return false; + } + + function output_callback_for_title($content) { + return $this->rewrite_title($content); + } + + + + + + +// +//CHECK IF ARRAY EXISTS IN DB, IF SO, GET ARRAY, ADD EVERYTHING, CHECK FOR ISSET? +// + function init() { +if (function_exists('load_plugin_textdomain')) { + if ( !defined('WP_PLUGIN_DIR') ) { + load_plugin_textdomain('all_in_one_seo_pack', str_replace( ABSPATH, '', dirname(__FILE__))); + } else { + load_plugin_textdomain('all_in_one_seo_pack', false, dirname(plugin_basename(__FILE__))); + } +} + + +/* + if (function_exists('load_plugin_textdomain')) { + load_plugin_textdomain('all_in_one_seo_pack', WP_PLUGIN_DIR . '/all-in-one-seo-pack'); + } +*/ + + } + + function is_static_front_page() { + global $wp_query; + global $aioseop_options; + $post = $wp_query->get_queried_object(); + return get_option('show_on_front') == 'page' && is_page() && $post->ID == get_option('page_on_front'); + } + + function is_static_posts_page() { + global $wp_query; + $post = $wp_query->get_queried_object(); + return get_option('show_on_front') == 'page' && is_home() && $post->ID == get_option('page_for_posts'); + } + + function get_base() { + return '/'.end(explode('/', str_replace(array('\\','/all_in_one_seo_pack.php'),array('/',''),__FILE__))); + } + + function seo_mrt_admin_head() { + $home = get_settings('siteurl'); + $stylesheet = WP_PLUGIN_URL . '/all-in-one-seo-pack/style.css'; + echo ''; + } + + + function wp_head() { + if (is_feed()) { + return; + } + + global $wp_query; + global $aioseop_options; + $post = $wp_query->get_queried_object(); + $meta_string = null; + if($this->is_static_posts_page()){ + $title = strip_tags( apply_filters( 'single_post_title', $post->post_title ) ); + + } + //echo("wp_head() " . wp_title('', false) . " is_home() => " . is_home() . ", is_page() => " . is_page() . ", is_single() => " . is_single() . ", is_static_front_page() => " . $this->is_static_front_page() . ", is_static_posts_page() => " . $this->is_static_posts_page()); + + if (is_single() || is_page()) { + $aiosp_disable = htmlspecialchars(stripcslashes(get_post_meta($post->ID, '_aioseop_disable', true))); + if ($aiosp_disable) { + return; + } + } + + if( $this->aioseop_mrt_exclude_this_page()==TRUE ){ + return; + } + + if ($aioseop_options['aiosp_rewrite_titles']) { + // make the title rewrite as short as possible + if (function_exists('ob_list_handlers')) { + $active_handlers = ob_list_handlers(); + } else { + $active_handlers = array(); + } + if (sizeof($active_handlers) > 0 && + strtolower($active_handlers[sizeof($active_handlers) - 1]) == + strtolower('All_in_One_SEO_Pack::output_callback_for_title')) { + ob_end_flush(); + } else { + $this->log("another plugin interfering?"); + // if we get here there *could* be trouble with another plugin :( + $this->ob_start_detected = true; + if (function_exists('ob_list_handlers')) { + foreach (ob_list_handlers() as $handler) { + $this->log("detected output handler $handler"); + } + } + } + } + + /* + + echo trim($_SERVER['REQUEST_URI'],'/'); + $currenturl = trim($_SERVER['REQUEST_URI'],'/'); + echo "

    "; + + echo $aioseop_options['aiosp_ex_pages']; + + echo "

    "; + + $excludedstuff = explode(',',$aioseop_options['aiosp_ex_pages']); + foreach($excludedstuff as $exedd){ + echo $exedd; + //echo "

    substring: ". stristr($currenturl,trim($exedd)) . "
    "; + if(stristr($currenturl, trim($exedd))){ + echo "
    match, should not display

    "; + }else{ + echo "
    ( " . $exedd . " was not found in " . $currenturl . " ) - no match

    "; + } + } + //print_r($excludedstuff); + */ + echo "\n\n"; + if ((is_home() && $aioseop_options['aiosp_home_keywords'] && !$this->is_static_posts_page()) || $this->is_static_front_page()) { + $keywords = trim($this->internationalize($aioseop_options['aiosp_home_keywords'])); + } elseif($this->is_static_posts_page() && !$aioseop_options['aiosp_dynamic_postspage_keywords']){ // and if option = use page set keywords instead of keywords from recent posts + //$keywords = "posts keyyysss" . stripcslashes(get_post_meta($post->ID,'keywords',true)); + $keywords = stripcslashes($this->internationalize(get_post_meta($post->ID, "_aioseop_keywords", true))); + +// $keywords = $this->get_unique_keywords($keywords); + + }else { + $keywords = $this->get_all_keywords(); + } + if (is_single() || is_page() || $this->is_static_posts_page()) { + if ($this->is_static_front_page()) { + $description = trim(stripcslashes($this->internationalize($aioseop_options['aiosp_home_description']))); + } else { + $description = $this->get_post_description($post); + $description = apply_filters('aioseop_description',$description); + } + } else if (is_home()) { + $description = trim(stripcslashes($this->internationalize($aioseop_options['aiosp_home_description']))); + } else if (is_category()) { + $description = $this->internationalize(category_description()); + } + + if (isset($description) && (strlen($description) > $this->minimum_description_length) && !(is_home() && is_paged())) { + $description = trim(strip_tags($description)); + $description = str_replace('"', '', $description); + + // replace newlines on mac / windows? + $description = str_replace("\r\n", ' ', $description); + + // maybe linux uses this alone + $description = str_replace("\n", ' ', $description); + + if (isset($meta_string)) { + //$meta_string .= "\n"; + } else { + $meta_string = ''; + } + + // description format + $description_format = $aioseop_options['aiosp_description_format']; + if (!isset($description_format) || empty($description_format)) { + $description_format = "%description%"; + } + $description = str_replace('%description%', $description, $description_format); + $description = str_replace('%blog_title%', get_bloginfo('name'), $description); + $description = str_replace('%blog_description%', get_bloginfo('description'), $description); + $description = str_replace('%wp_title%', $this->get_original_title(), $description); + //$description = html_entity_decode($description, ENT_COMPAT, get_bloginfo('charset')); + if($aioseop_options['aiosp_can'] && is_attachment()){ + $url = $this->aiosp_mrt_get_url($wp_query); + if ($url) { + preg_match_all('/(\d+)/', $url, $matches); + if (is_array($matches)){ + $uniqueDesc = join('',$matches[0]); + } + } + $description .= ' ' . $uniqueDesc; + } + $meta_string .= sprintf("", $description); + } + $keywords = apply_filters('aioseop_keywords',$keywords); + if (isset ($keywords) && !empty($keywords) && !(is_home() && is_paged())) { + if (isset($meta_string)) { + $meta_string .= "\n"; + } + $meta_string .= sprintf("", $keywords); + } + + if (function_exists('is_tag')) { + $is_tag = is_tag(); + } + + if ((is_category() && $aioseop_options['aiosp_category_noindex']) || + (!is_category() && is_archive() &&!$is_tag && $aioseop_options['aiosp_archive_noindex']) || + ($aioseop_options['aiosp_tags_noindex'] && $is_tag)) { + if (isset($meta_string)) { + $meta_string .= "\n"; + } + $meta_string .= ''; + } + + $page_meta = stripcslashes($aioseop_options['aiosp_page_meta_tags']); + $post_meta = stripcslashes($aioseop_options['aiosp_post_meta_tags']); + $home_meta = stripcslashes($aioseop_options['aiosp_home_meta_tags']); + if (is_page() && isset($page_meta) && !empty($page_meta) || $this->is_static_posts_page()) { + if (isset($meta_string)) { + $meta_string .= "\n"; + } + echo "\n$page_meta"; + } + + if (is_single() && isset($post_meta) && !empty($post_meta)) { + if (isset($meta_string)) { + $meta_string .= "\n"; + } + $meta_string .= "$post_meta"; + } + + if (is_home() && !empty($home_meta)) { + if (isset($meta_string)) { + $meta_string .= "\n"; + } + $meta_string .= "$home_meta"; + } + + if ($meta_string != null) { + echo "$meta_string\n"; + } + + if($aioseop_options['aiosp_can']){ + $url = $this->aiosp_mrt_get_url($wp_query); + if ($url) { + $url = apply_filters('aioseop_canonical_url',$url); + + echo "".''."\n"; + } + } + + echo "\n"; + } + +// Thank you, Yoast de Valk, for much of this code. + + function aiosp_mrt_get_url($query) { + global $aioseop_options; + if ($query->is_404 || $query->is_search) { + return false; + } + $haspost = count($query->posts) > 0; + $has_ut = function_exists('user_trailingslashit'); + + if (get_query_var('m')) { + $m = preg_replace('/[^0-9]/', '', get_query_var('m')); + switch (strlen($m)) { + case 4: + $link = get_year_link($m); + break; + case 6: + $link = get_month_link(substr($m, 0, 4), substr($m, 4, 2)); + break; + case 8: + $link = get_day_link(substr($m, 0, 4), substr($m, 4, 2), + substr($m, 6, 2)); + break; + default: + return false; + } + } elseif (($query->is_single || $query->is_page) && $haspost) { + $post = $query->posts[0]; + $link = get_permalink($post->ID); + $link = $this->yoast_get_paged($link); +/* if ($page && $page > 1) { + $link = trailingslashit($link) . "page/". "$page"; + if ($has_ut) { + $link = user_trailingslashit($link, 'paged'); + } else { + $link .= '/'; + } + } + if ($query->is_page && ('page' == get_option('show_on_front')) && + $post->ID == get_option('page_on_front')) + { + $link = trailingslashit($link); + }*/ + } elseif ($query->is_author && $haspost) { + global $wp_version; + if ($wp_version >= '2') { + $author = get_userdata(get_query_var('author')); + if ($author === false) + return false; + $link = get_author_link(false, $author->ID, + $author->user_nicename); + } else { + global $cache_userdata; + $userid = get_query_var('author'); + $link = get_author_link(false, $userid, + $cache_userdata[$userid]->user_nicename); + } + } elseif ($query->is_category && $haspost) { + $link = get_category_link(get_query_var('cat')); + $link = $this->yoast_get_paged($link); + } else if ($query->is_tag && $haspost) { + $tag = get_term_by('slug',get_query_var('tag'),'post_tag'); + if (!empty($tag->term_id)) { + $link = get_tag_link($tag->term_id); + } + $link = $this->yoast_get_paged($link); + } elseif ($query->is_day && $haspost) { + $link = get_day_link(get_query_var('year'), + get_query_var('monthnum'), + get_query_var('day')); + } elseif ($query->is_month && $haspost) { + $link = get_month_link(get_query_var('year'), + get_query_var('monthnum')); + } elseif ($query->is_year && $haspost) { + $link = get_year_link(get_query_var('year')); + } elseif ($query->is_home) { + if ((get_option('show_on_front') == 'page') && + ($pageid = get_option('page_for_posts'))) + { + $link = get_permalink($pageid); + $link = $this->yoast_get_paged($link); + $link = trailingslashit($link); + } else { + $link = get_option('home'); + $link = $this->yoast_get_paged($link); + $link = trailingslashit($link); } + } else { + return false; + } + + return $link; + + } + + + function yoast_get_paged($link) { + $page = get_query_var('paged'); + if ($page && $page > 1) { + $link = trailingslashit($link) ."page/". "$page"; + if ($has_ut) { + $link = user_trailingslashit($link, 'paged'); + } else { + $link .= '/'; + } + } + return $link; + } + + + function get_post_description($post) { + global $aioseop_options; + $description = trim(stripcslashes($this->internationalize(get_post_meta($post->ID, "_aioseop_description", true)))); + if (!$description) { + $description = $this->trim_excerpt_without_filters_full_length($this->internationalize($post->post_excerpt)); + if (!$description && $aioseop_options["aiosp_generate_descriptions"]) { + $description = $this->trim_excerpt_without_filters($this->internationalize($post->post_content)); + } + } + + // "internal whitespace trim" + $description = preg_replace("/\s\s+/", " ", $description); + + return $description; + } + + function replace_title($content, $title) { + $title = trim(strip_tags($title)); + + $title_tag_start = ""; + $title_tag_end = ""; + $len_start = strlen($title_tag_start); + $len_end = strlen($title_tag_end); + $title = stripcslashes(trim($title)); + $start = strpos($content, $title_tag_start); + $end = strpos($content, $title_tag_end); + + $this->title_start = $start; + $this->title_end = $end; + $this->orig_title = $title; + + if ($start && $end) { + $header = substr($content, 0, $start + $len_start) . $title . substr($content, $end); + } else { + // this breaks some sitemap plugins (like wpg2) + //$header = $content . "$title"; + + $header = $content; + } + + return $header; + } + + function internationalize($in) { + if (function_exists('langswitch_filter_langs_with_message')) { + $in = langswitch_filter_langs_with_message($in); + } + if (function_exists('polyglot_filter')) { + $in = polyglot_filter($in); + } + if (function_exists('qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage')) { + $in = qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage($in); + } + $in = apply_filters('localization', $in); + return $in; + } + + /** @return The original title as delivered by WP (well, in most cases) */ + function get_original_title() { + global $wp_query; + global $aioseop_options; + if (!$wp_query) { + return null; + } + + $post = $wp_query->get_queried_object(); + + // the_search_query() is not suitable, it cannot just return + global $s; + + $title = null; + + if (is_home()) { + $title = get_option('blogname'); + } else if (is_single()) { + $title = $this->internationalize(wp_title('', false)); + } else if (is_search() && isset($s) && !empty($s)) { + if (function_exists('attribute_escape')) { + $search = attribute_escape(stripcslashes($s)); + } else { + $search = wp_specialchars(stripcslashes($s), true); + } + $search = $this->capitalize($search); + $title = $search; + } else if (is_category() && !is_feed()) { + $category_description = $this->internationalize(category_description()); + $category_name = ucwords($this->internationalize(single_cat_title('', false))); + $title = $category_name; + } else if (is_page()) { + $title = $this->internationalize(wp_title('', false)); + } else if (function_exists('is_tag') && is_tag()) { + global $utw; + if ($utw) { + $tags = $utw->GetCurrentTagSet(); + $tag = $tags[0]->tag; + $tag = str_replace('-', ' ', $tag); + } else { + // wordpress > 2.3 + $tag = $this->internationalize(wp_title('', false)); + } + if ($tag) { + $title = $tag; + } + } else if (is_archive()) { + $title = $this->internationalize(wp_title('', false)); + } else if (is_404()) { + $title_format = $aioseop_options['aiosp_404_title_format']; + $new_title = str_replace('%blog_title%', $this->internationalize(get_bloginfo('name')), $title_format); + $new_title = str_replace('%blog_description%', $this->internationalize(get_bloginfo('description')), $new_title); + $new_title = str_replace('%request_url%', $_SERVER['REQUEST_URI'], $new_title); + $new_title = str_replace('%request_words%', $this->request_as_words($_SERVER['REQUEST_URI']), $new_title); + $title = $new_title; + } + + return trim($title); + } + + function paged_title($title) { + // the page number if paged + global $paged; + global $aioseop_options; + // simple tagging support + global $STagging; + + if (is_paged() || (isset($STagging) && $STagging->is_tag_view() && $paged)) { + $part = $this->internationalize($aioseop_options['aiosp_paged_format']); + if (isset($part) || !empty($part)) { + $part = " " . trim($part); + $part = str_replace('%page%', $paged, $part); + $this->log("paged_title() [$title] [$part]"); + $title .= $part; + } + } + return $title; + } + + function rewrite_title($header) { + global $aioseop_options; + global $wp_query; + if (!$wp_query) { + $header .= "\n"; + return $header; + } + + $post = $wp_query->get_queried_object(); + + // the_search_query() is not suitable, it cannot just return + global $s; + + global $STagging; + + if (is_home() && !$this->is_static_posts_page()) { + $title = $this->internationalize($aioseop_options['aiosp_home_title']); + if (empty($title)) { + $title = $this->internationalize(get_option('blogname')); + } + $title = $this->paged_title($title); + $header = $this->replace_title($header, $title); + } else if (is_attachment()) { + $title = get_the_title($post->post_parent).' '.$post->post_title.' – '.get_option('blogname'); + $header = $this->replace_title($header,$title); + } else if (is_single()) { + // we're not in the loop :( + $authordata = get_userdata($post->post_author); + $categories = get_the_category(); + $category = ''; + if (count($categories) > 0) { + $category = $categories[0]->cat_name; + } + $title = $this->internationalize(get_post_meta($post->ID, "_aioseop_title", true)); + if (!$title) { + $title = $this->internationalize(get_post_meta($post->ID, "title_tag", true)); + if (!$title) { + $title = $this->internationalize(wp_title('', false)); + } + } + $title_format = $aioseop_options['aiosp_post_title_format']; + $new_title = str_replace('%blog_title%', $this->internationalize(get_bloginfo('name')), $title_format); + $new_title = str_replace('%blog_description%', $this->internationalize(get_bloginfo('description')), $new_title); + $new_title = str_replace('%post_title%', $title, $new_title); + $new_title = str_replace('%category%', $category, $new_title); + $new_title = str_replace('%category_title%', $category, $new_title); + $new_title = str_replace('%post_author_login%', $authordata->user_login, $new_title); + $new_title = str_replace('%post_author_nicename%', $authordata->user_nicename, $new_title); + $new_title = str_replace('%post_author_firstname%', ucwords($authordata->first_name), $new_title); + $new_title = str_replace('%post_author_lastname%', ucwords($authordata->last_name), $new_title); + $title = $new_title; + $title = trim($title); + $title = apply_filters('aioseop_title_single',$title); + $header = $this->replace_title($header, $title); + } else if (is_search() && isset($s) && !empty($s)) { + if (function_exists('attribute_escape')) { + $search = attribute_escape(stripcslashes($s)); + } else { + $search = wp_specialchars(stripcslashes($s), true); + } + $search = $this->capitalize($search); + $title_format = $aioseop_options['aiosp_search_title_format']; + $title = str_replace('%blog_title%', $this->internationalize(get_bloginfo('name')), $title_format); + $title = str_replace('%blog_description%', $this->internationalize(get_bloginfo('description')), $title); + $title = str_replace('%search%', $search, $title); + $header = $this->replace_title($header, $title); + } else if (is_category() && !is_feed()) { + $category_description = $this->internationalize(category_description()); + if($aioseop_options['aiosp_cap_cats']){ + $category_name = ucwords($this->internationalize(single_cat_title('', false))); + }else{ + $category_name = $this->internationalize(single_cat_title('', false)); + } + //$category_name = ucwords($this->internationalize(single_cat_title('', false))); + $title_format = $aioseop_options['aiosp_category_title_format']; + $title = str_replace('%category_title%', $category_name, $title_format); + $title = str_replace('%category_description%', $category_description, $title); + $title = str_replace('%blog_title%', $this->internationalize(get_bloginfo('name')), $title); + $title = str_replace('%blog_description%', $this->internationalize(get_bloginfo('description')), $title); + $title = $this->paged_title($title); + $header = $this->replace_title($header, $title); + } else if (is_page() || $this->is_static_posts_page()) { + // we're not in the loop :( + $authordata = get_userdata($post->post_author); + if ($this->is_static_front_page()) { + if ($this->internationalize($aioseop_options['aiosp_home_title'])) { + + //home title filter + $home_title = $this->internationalize($aioseop_options['aiosp_home_title']); + $home_title = apply_filters('aioseop_home_page_title',$home_title); + $header = $this->replace_title($header, $home_title); + + } + } else { + $title = $this->internationalize(get_post_meta($post->ID, "_aioseop_title", true)); + if (!$title) { + $title = $this->internationalize(wp_title('', false)); + } + $title_format = $aioseop_options['aiosp_page_title_format']; + $new_title = str_replace('%blog_title%', $this->internationalize(get_bloginfo('name')), $title_format); + $new_title = str_replace('%blog_description%', $this->internationalize(get_bloginfo('description')), $new_title); + $new_title = str_replace('%page_title%', $title, $new_title); + $new_title = str_replace('%page_author_login%', $authordata->user_login, $new_title); + $new_title = str_replace('%page_author_nicename%', $authordata->user_nicename, $new_title); + $new_title = str_replace('%page_author_firstname%', ucwords($authordata->first_name), $new_title); + $new_title = str_replace('%page_author_lastname%', ucwords($authordata->last_name), $new_title); + $title = trim($new_title); + $title = apply_filters('aioseop_title_page',$title); + $header = $this->replace_title($header, $title); + } + } else if (function_exists('is_tag') && is_tag()) { + global $utw; + if ($utw) { + $tags = $utw->GetCurrentTagSet(); + $tag = $tags[0]->tag; + $tag = str_replace('-', ' ', $tag); + } else { + // wordpress > 2.3 + $tag = $this->internationalize(wp_title('', false)); + } + if ($tag) { + $tag = $this->capitalize($tag); + $title_format = $aioseop_options['aiosp_tag_title_format']; + $title = str_replace('%blog_title%', $this->internationalize(get_bloginfo('name')), $title_format); + $title = str_replace('%blog_description%', $this->internationalize(get_bloginfo('description')), $title); + $title = str_replace('%tag%', $tag, $title); + $title = $this->paged_title($title); + $header = $this->replace_title($header, $title); + } + } else if (isset($STagging) && $STagging->is_tag_view()) { // simple tagging support + $tag = $STagging->search_tag; + if ($tag) { + $tag = $this->capitalize($tag); + $title_format = $aioseop_options['aiosp_tag_title_format']; + $title = str_replace('%blog_title%', $this->internationalize(get_bloginfo('name')), $title_format); + $title = str_replace('%blog_description%', $this->internationalize(get_bloginfo('description')), $title); + $title = str_replace('%tag%', $tag, $title); + $title = $this->paged_title($title); + $header = $this->replace_title($header, $title); + } + } else if (is_archive()) { + $date = $this->internationalize(wp_title('', false)); + $title_format = $aioseop_options['aiosp_archive_title_format']; + $new_title = str_replace('%blog_title%', $this->internationalize(get_bloginfo('name')), $title_format); + $new_title = str_replace('%blog_description%', $this->internationalize(get_bloginfo('description')), $new_title); + $new_title = str_replace('%date%', $date, $new_title); + $title = trim($new_title); + $title = $this->paged_title($title); + $header = $this->replace_title($header, $title); + } else if (is_404()) { + $title_format = $aioseop_options['aiosp_404_title_format']; + $new_title = str_replace('%blog_title%', $this->internationalize(get_bloginfo('name')), $title_format); + $new_title = str_replace('%blog_description%', $this->internationalize(get_bloginfo('description')), $new_title); + $new_title = str_replace('%request_url%', $_SERVER['REQUEST_URI'], $new_title); + $new_title = str_replace('%request_words%', $this->request_as_words($_SERVER['REQUEST_URI']), $new_title); + $new_title = str_replace('%404_title%', $this->internationalize(wp_title('', false)), $new_title); + $header = $this->replace_title($header, $new_title); + } + + return $header; + + } + + /** + * @return User-readable nice words for a given request. + */ + function request_as_words($request) { + $request = htmlspecialchars($request); + $request = str_replace('.html', ' ', $request); + $request = str_replace('.htm', ' ', $request); + $request = str_replace('.', ' ', $request); + $request = str_replace('/', ' ', $request); + $request_a = explode(' ', $request); + $request_new = array(); + foreach ($request_a as $token) { + $request_new[] = ucwords(trim($token)); + } + $request = implode(' ', $request_new); + return $request; + } + + function capitalize($s) { + $s = trim($s); + $tokens = explode(' ', $s); + while (list($key, $val) = each($tokens)) { + $tokens[$key] = trim($tokens[$key]); + $tokens[$key] = strtoupper(substr($tokens[$key], 0, 1)) . substr($tokens[$key], 1); + } + $s = implode(' ', $tokens); + return $s; + } + + function trim_excerpt_without_filters($text) { + $text = str_replace(']]>', ']]>', $text); + $text = preg_replace( '|\[(.+?)\](.+?\[/\\1\])?|s', '', $text ); + $text = strip_tags($text); + $max = $this->maximum_description_length; + + if ($max < strlen($text)) { + while($text[$max] != ' ' && $max > $this->minimum_description_length) { + $max--; + } + } + $text = substr($text, 0, $max); + return trim(stripcslashes($text)); + } + + function trim_excerpt_without_filters_full_length($text) { + $text = str_replace(']]>', ']]>', $text); + $text = preg_replace( '|\[(.+?)\](.+?\[/\\1\])?|s', '', $text ); + $text = strip_tags($text); + return trim(stripcslashes($text)); + } + + /** + * @return comma-separated list of unique keywords + */ + function get_all_keywords() { + global $posts; + global $aioseop_options; + + if (is_404()) { + return null; + } + + // if we are on synthetic pages + if (!is_home() && !is_page() && !is_single() &&!$this->is_static_front_page() && !$this->is_static_posts_page()) { + return null; + } + + $keywords = array(); + if (is_array($posts)) { + foreach ($posts as $post) { + if ($post) { + + // custom field keywords + $keywords_a = $keywords_i = null; + $description_a = $description_i = null; + + $id = (is_attachment())?($post->post_parent):($post->ID); // if attachment then use parent post id + $keywords_i = stripcslashes($this->internationalize(get_post_meta($id, "_aioseop_keywords", true))); + //$id = $post->ID; + //$keywords_i = stripcslashes($this->internationalize(get_post_meta($post->ID, "_aioseop_keywords", true))); + $keywords_i = str_replace('"', '', $keywords_i); + if (isset($keywords_i) && !empty($keywords_i)) { + $traverse = explode(',', $keywords_i); + foreach ($traverse as $keyword) { + $keywords[] = $keyword; + } + } + + // WP 2.3 tags + if ($aioseop_options['aiosp_use_tags_as_keywords']){ + if (function_exists('get_the_tags')) { + //$tags = get_the_tags($post->ID); + $tags = get_the_tags($id); + if ($tags && is_array($tags)) { + foreach ($tags as $tag) { + $keywords[] = $this->internationalize($tag->name); + } + } + } + } + // Ultimate Tag Warrior integration + global $utw; + if ($utw) { + $tags = $utw->GetTagsForPost($post); + if (is_array($tags)) { + foreach ($tags as $tag) { + $tag = $tag->tag; + $tag = str_replace('_',' ', $tag); + $tag = str_replace('-',' ',$tag); + $tag = stripcslashes($tag); + $keywords[] = $tag; + } + } + } + + // autometa + $autometa = stripcslashes(get_post_meta($id, 'autometa', true)); + //$autometa = stripcslashes(get_post_meta($post->ID, "autometa", true)); + if (isset($autometa) && !empty($autometa)) { + $autometa_array = explode(' ', $autometa); + foreach ($autometa_array as $e) { + $keywords[] = $e; + } + } + + if ($aioseop_options['aiosp_use_categories'] && !is_page()) { + $categories = get_the_category($id); + //$categories = get_the_category($post->ID); + foreach ($categories as $category) { + $keywords[] = $this->internationalize($category->cat_name); + } + } + + } + } + } + + return $this->get_unique_keywords($keywords); + } + + function get_meta_keywords() { + global $posts; + + $keywords = array(); + if (is_array($posts)) { + foreach ($posts as $post) { + if ($post) { + // custom field keywords + $keywords_a = $keywords_i = null; + $description_a = $description_i = null; + $id = $post->ID; + $keywords_i = stripcslashes(get_post_meta($post->ID, "_aioseop_keywords", true)); + $keywords_i = str_replace('"', '', $keywords_i); + if (isset($keywords_i) && !empty($keywords_i)) { + $keywords[] = $keywords_i; + } + } + } + } + + return $this->get_unique_keywords($keywords); + } + + function get_unique_keywords($keywords) { + $small_keywords = array(); + foreach ($keywords as $word) { + if (function_exists('mb_strtolower')) + $small_keywords[] = mb_strtolower($word, get_bloginfo('charset')); + else + $small_keywords[] = $this->strtolower($word); + } + $keywords_ar = array_unique($small_keywords); + return implode(',', $keywords_ar); + } + + function get_url($url) { + if (function_exists('file_get_contents')) { + $file = file_get_contents($url); + } else { + $curl = curl_init($url); + curl_setopt($curl, CURLOPT_HEADER, 0); + curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); + $file = curl_exec($curl); + curl_close($curl); + } + return $file; + } + + function log($message) { + if ($this->do_log) { + error_log(date('Y-m-d H:i:s') . " " . $message . "\n", 3, $this->log_file); + } + } + + function download_newest_version() { + $success = true; + $file_content = $this->get_url($this->upgrade_url); + if ($file_content === false) { + $this->upgrade_error = sprintf(__("Could not download distribution (%s)"), $this->upgrade_url); + $success = false; + } else if (strlen($file_content) < 100) { + $this->upgrade_error = sprintf(__("Could not download distribution (%s): %s"), $this->upgrade_url, $file_content); + $success = false; + } else { + $this->log(sprintf("filesize of download ZIP: %d", strlen($file_content))); + $fh = @fopen($this->upgrade_filename, 'w'); + $this->log("fh is $fh"); + if (!$fh) { + $this->upgrade_error = sprintf(__("Could not open %s for writing"), $this->upgrade_filename); + $this->upgrade_error .= "
    "; + $this->upgrade_error .= sprintf(__("Please make sure %s is writable"), $this->upgrade_folder); + $success = false; + } else { + $bytes_written = @fwrite($fh, $file_content); + $this->log("wrote $bytes_written bytes"); + if (!$bytes_written) { + $this->upgrade_error = sprintf(__("Could not write to %s"), $this->upgrade_filename); + $success = false; + } + } + if ($success) { + fclose($fh); + } + } + return $success; + } + + function install_newest_version() { + $success = $this->download_newest_version(); + if ($success) { + $success = $this->extract_plugin(); + unlink($this->upgrade_filename); + } + return $success; + } + + function extract_plugin() { + if (!class_exists('PclZip')) { + require_once ('pclzip.lib.php'); + } + $archive = new PclZip($this->upgrade_filename); + $files = $archive->extract(PCLZIP_OPT_STOP_ON_ERROR, PCLZIP_OPT_REPLACE_NEWER, PCLZIP_OPT_REMOVE_ALL_PATH, PCLZIP_OPT_PATH, $this->upgrade_folder); + $this->log("files is $files"); + if (is_array($files)) { + $num_extracted = sizeof($files); + $this->log("extracted $num_extracted files to $this->upgrade_folder"); + $this->log(print_r($files, true)); + return true; + } else { + $this->upgrade_error = $archive->errorInfo(); + return false; + } + } + + /** crude approximization of whether current user is an admin */ + function is_admin() { + return current_user_can('level_8'); + } + + + function is_directory_writable($directory) { + $filename = $directory . '/' . 'tmp_file_' . time(); + $fh = @fopen($filename, 'w'); + if (!$fh) { + return false; + } + + $written = fwrite($fh, "test"); + fclose($fh); + unlink($filename); + if ($written) { + return true; + } else { + return false; + } + } + + + function is_upgrade_directory_writable() { + //return $this->is_directory_writable($this->upgrade_folder); + // let's assume it is + return true; + } + + + function post_meta_tags($id) { + $awmp_edit = $_POST["aiosp_edit"]; + $nonce = $_POST['nonce-aioseop-edit']; +// if (!wp_verify_nonce($nonce, 'edit-aioseop-nonce')) die ( 'Security Check - If you receive this in error, log out and back in to WordPress'); + if (isset($awmp_edit) && !empty($awmp_edit) && wp_verify_nonce($nonce, 'edit-aioseop-nonce')) { + $keywords = $_POST["aiosp_keywords"]; + $description = $_POST["aiosp_description"]; + $title = $_POST["aiosp_title"]; + $aiosp_meta = $_POST["aiosp_meta"]; + $aiosp_disable = $_POST["aiosp_disable"]; + $aiosp_titleatr = $_POST["aiosp_titleatr"]; + $aiosp_menulabel = $_POST["aiosp_menulabel"]; + + delete_post_meta($id, '_aioseop_keywords'); + delete_post_meta($id, '_aioseop_description'); + delete_post_meta($id, '_aioseop_title'); + delete_post_meta($id, '_aioseop_titleatr'); + delete_post_meta($id, '_aioseop_menulabel'); + + + if ($this->is_admin()) { + delete_post_meta($id, '_aioseop_disable'); + } + //delete_post_meta($id, 'aiosp_meta'); + + if (isset($keywords) && !empty($keywords)) { + add_post_meta($id, '_aioseop_keywords', $keywords); + } + if (isset($description) && !empty($description)) { + add_post_meta($id, '_aioseop_description', $description); + } + if (isset($title) && !empty($title)) { + add_post_meta($id, '_aioseop_title', $title); + } + if (isset($aiosp_titleatr) && !empty($aiosp_titleatr)) { + add_post_meta($id, '_aioseop_titleatr', $aiosp_titleatr); + } + if (isset($aiosp_menulabel) && !empty($aiosp_menulabel)) { + add_post_meta($id, '_aioseop_menulabel', $aiosp_menulabel); + } + if (isset($aiosp_disable) && !empty($aiosp_disable) && $this->is_admin()) { + add_post_meta($id, '_aioseop_disable', $aiosp_disable); + } + /* + if (isset($aiosp_meta) && !empty($aiosp_meta)) { + add_post_meta($id, 'aiosp_meta', $aiosp_meta); + } + */ + } + } + + function edit_category($id) { + global $wpdb; + $id = $wpdb->escape($id); + $awmp_edit = $_POST["aiosp_edit"]; + if (isset($awmp_edit) && !empty($awmp_edit)) { + $keywords = $wpdb->escape($_POST["aiosp_keywords"]); + $title = $wpdb->escape($_POST["aiosp_title"]); + $old_category = $wpdb->get_row("select * from $this->table_categories where category_id=$id", OBJECT); + if ($old_category) { + $wpdb->query($wpdb->prepare("update $this->table_categories + set meta_title='$title', meta_keywords='$keywords' + where category_id=$id")); + } else { + $wpdb->query($wpdb->prepare("insert into $this->table_categories(meta_title, meta_keywords, category_id) + values ('$title', '$keywords', $id")); + } + //$wpdb->query($wpdb->prepare("insert into $this->table_categories")) + /* + delete_post_meta($id, 'keywords'); + delete_post_meta($id, 'description'); + delete_post_meta($id, 'title'); + + if (isset($keywords) && !empty($keywords)) { + add_post_meta($id, 'keywords', $keywords); + } + if (isset($description) && !empty($description)) { + add_post_meta($id, 'description', $description); + } + if (isset($title) && !empty($title)) { + add_post_meta($id, 'title', $title); + } + */ + } + } + + /** + * @deprecated This was for the feature of dedicated meta tags for categories which never went mainstream. + */ + function edit_category_form() { + global $post; + $keywords = stripcslashes(get_post_meta($post->ID, '_aioseop_keywords', true)); + $title = stripcslashes(get_post_meta($post->ID, '_aioseop_title', true)); + $description = stripcslashes(get_post_meta($post->ID, '_aioseop_description', true)); + ?> + + + + + + + + + + + + + +
    + +
    + ID; + } + $keywords = htmlspecialchars(stripcslashes(get_post_meta($post_id, '_aioseop_keywords', true))); + $title = htmlspecialchars(stripcslashes(get_post_meta($post_id, '_aioseop_title', true))); + $description = htmlspecialchars(stripcslashes(get_post_meta($post_id, '_aioseop_description', true))); + $aiosp_meta = htmlspecialchars(stripcslashes(get_post_meta($post_id, '_aioseop_meta', true))); + $aiosp_disable = htmlspecialchars(stripcslashes(get_post_meta($post_id, '_aioseop_disable', true))); + $aiosp_titleatr = htmlspecialchars(stripcslashes(get_post_meta($post_id, '_aioseop_titleatr', true))); + $aiosp_menulabel = htmlspecialchars(stripcslashes(get_post_meta($post_id, '_aioseop_menulabel', true))); + + ?> + + + wp_version, 0, 3) >= '2.5') { ?> +
    +

    +
    +
    + +
    +
    +
    +

    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + is_admin()) { ?> + + + + + + + + + + + + + + + + + + + + + + +
    +

    + + +
    + + + /> +
    + + wp_version, 0, 3) >= '2.5') { ?> +
    + +
    + +
    + + + wp_version, 0, 3) == '1.5') { + $file = 'all-in-one-seo-pack/all_in_one_seo_pack.php'; + } + //add_management_page(__('All in One SEO Title', 'all_in_one_seo_pack'), __('All in One SEO', 'all_in_one_seo_pack'), 10, $file, array($this, 'management_panel')); + add_submenu_page('options-general.php', __('All in One SEO', 'all_in_one_seo_pack'), __('All in One SEO', 'all_in_one_seo_pack'), 10, $file, array($this, 'options_panel')); + } + + function management_panel() { + $message = null; + $base_url = "edit.php?page=" . __FILE__; + //echo($base_url); + $type = $_REQUEST['type']; + if (!isset($type)) { + $type = "posts"; + } +?> + + + +1, + "aiosp_donate"=>0, + "aiosp_home_title"=>null, + "aiosp_home_description"=>'', + "aiosp_home_keywords"=>null, + "aiosp_max_words_excerpt"=>'something', + "aiosp_rewrite_titles"=>1, + "aiosp_post_title_format"=>'%post_title% | %blog_title%', + "aiosp_page_title_format"=>'%page_title% | %blog_title%', + "aiosp_category_title_format"=>'%category_title% | %blog_title%', + "aiosp_archive_title_format"=>'%date% | %blog_title%', + "aiosp_tag_title_format"=>'%tag% | %blog_title%', + "aiosp_search_title_format"=>'%search% | %blog_title%', + "aiosp_description_format"=>'%description%', + "aiosp_404_title_format"=>'Nothing found for %request_words%', + "aiosp_paged_format"=>' - Part %page%', + "aiosp_use_categories"=>0, + "aiosp_dynamic_postspage_keywords"=>1, + "aiosp_category_noindex"=>1, + "aiosp_archive_noindex"=>1, + "aiosp_tags_noindex"=>0, + "aiosp_cap_cats"=>1, + "aiosp_generate_descriptions"=>1, + "aiosp_debug_info"=>null, + "aiosp_post_meta_tags"=>'', + "aiosp_page_meta_tags"=>'', + "aiosp_home_meta_tags"=>'', + "aiosp_enabled" =>0, + "aiosp_use_tags_as_keywords" =>1, + "aiosp_do_log"=>null); + update_option('aioseop_options', $res_aioseop_options); + + } + + + + // update options + if ($_POST['action'] && $_POST['action'] == 'aiosp_update' && $_POST['Submit']!='') { + $nonce = $_POST['nonce-aioseop']; + if (!wp_verify_nonce($nonce, 'aioseop-nonce')) die ( 'Security Check - If you receive this in error, log out and back in to WordPress'); + $message = __("All in One SEO Options Updated.", 'all_in_one_seo_pack'); + $aioseop_options['aiosp_can'] = $_POST['aiosp_can']; + $aioseop_options['aiosp_donate'] = $_POST['aiosp_donate']; + $aioseop_options['aiosp_home_title'] = $_POST['aiosp_home_title']; + $aioseop_options['aiosp_home_description'] = $_POST['aiosp_home_description']; + $aioseop_options['aiosp_home_keywords'] = $_POST['aiosp_home_keywords']; + $aioseop_options['aiosp_max_words_excerpt'] = $_POST['aiosp_max_words_excerpt']; + $aioseop_options['aiosp_rewrite_titles'] = $_POST['aiosp_rewrite_titles']; + $aioseop_options['aiosp_post_title_format'] = $_POST['aiosp_post_title_format']; + $aioseop_options['aiosp_page_title_format'] = $_POST['aiosp_page_title_format']; + $aioseop_options['aiosp_category_title_format'] = $_POST['aiosp_category_title_format']; + $aioseop_options['aiosp_archive_title_format'] = $_POST['aiosp_archive_title_format']; + $aioseop_options['aiosp_tag_title_format'] = $_POST['aiosp_tag_title_format']; + $aioseop_options['aiosp_search_title_format'] = $_POST['aiosp_search_title_format']; + $aioseop_options['aiosp_description_format'] = $_POST['aiosp_description_format']; + $aioseop_options['aiosp_404_title_format'] = $_POST['aiosp_404_title_format']; + $aioseop_options['aiosp_paged_format'] = $_POST['aiosp_paged_format']; + $aioseop_options['aiosp_use_categories'] = $_POST['aiosp_use_categories']; + $aioseop_options['aiosp_dynamic_postspage_keywords'] = $_POST['aiosp_dynamic_postspage_keywords']; + $aioseop_options['aiosp_category_noindex'] = $_POST['aiosp_category_noindex']; + $aioseop_options['aiosp_archive_noindex'] = $_POST['aiosp_archive_noindex']; + $aioseop_options['aiosp_tags_noindex'] = $_POST['aiosp_tags_noindex']; + $aioseop_options['aiosp_generate_descriptions'] = $_POST['aiosp_generate_descriptions']; + $aioseop_options['aiosp_cap_cats'] = $_POST['aiosp_cap_cats']; + $aioseop_options['aiosp_debug_info'] = $_POST['aiosp_debug_info']; + $aioseop_options['aiosp_post_meta_tags'] = $_POST['aiosp_post_meta_tags']; + $aioseop_options['aiosp_page_meta_tags'] = $_POST['aiosp_page_meta_tags']; + $aioseop_options['aiosp_home_meta_tags'] = $_POST['aiosp_home_meta_tags']; + $aioseop_options['aiosp_ex_pages'] = $_POST['aiosp_ex_pages']; + $aioseop_options['aiosp_do_log'] = $_POST['aiosp_do_log']; + $aioseop_options['aiosp_enabled'] = $_POST['aiosp_enabled']; + $aioseop_options['aiosp_use_tags_as_keywords'] = $_POST['aiosp_use_tags_as_keywords']; + + update_option('aioseop_options', $aioseop_options); + + if (function_exists('wp_cache_flush')) { + wp_cache_flush(); + } + } /*elseif ($_POST['aiosp_upgrade']) { + $message = __("Upgraded to newest version. Please revisit the options page to make sure you see the newest version.", 'all_in_one_seo_pack'); + $success = $this->install_newest_version(); + if (!$success) { + $message = __("Upgrade failed", 'all_in_one_seo_pack'); + if (isset($this->upgrade_error) && !empty($this->upgrade_error)) { + $message .= ": " . $this->upgrade_error; + } else { + $message .= "."; + } + } + }*/ + +?> + +

    + + +
    +

    +by Michael Torbert of Semper Fi Web Design +

    +version ", 'all_in_one_seo_pack') ?> +  + +| +| +| +| +
    + + + +

    + +
    +
    +
    +

    Donate

    +If you like this plugin and find it useful, help keep this plugin free and actively developed by clicking the donate button or send me a gift from my Amazon wishlist. Also, don't forget to follow me on Twitter. +
    + + <?php _e('Donate with Paypal', 'all_in_one_seo_pack') ?> + + + <?php _e('My Amazon Wish List', 'all_in_one_seo_pack') ?> + + + <?php _e('Follow Us on Twitter', 'all_in_one_seo_pack') ?> + + +
    + +
    +
    +

    PageLines Themes

    + We would also like to recommend PageLines for Professional WordPress Themes. They are attractive, affordable, performance optimized CMS themes that integrate perfectly with All in One SEO Pack to put your professional website at the top of the rankings. +
    + + <?php _e('iBlogPro theme', 'all_in_one_seo_pack') ?> + + + <?php _e('Pagelines Themes', 'all_in_one_seo_pack') ?> + + + <?php _e('WhiteHouse theme', 'all_in_one_seo_pack') ?> + +
    +
    +
    + + + + +

    + +get_item_quantity(3); + +// Build an array of all the items, starting with element 0 (first element). +$rss_items = $rss->get_items(0, $maxitems); +?> + + + + +get_item_quantity(3); + +// Build an array of all the items, starting with element 0 (first element). +$rss_items = $rss->get_items(0, $maxitems); +?> + + + + +items)){ +$items = array_slice($rss->items, 0, $maxitems); +?> + + + +items)){ +$items = array_slice($rss->items, 0, $maxitems); +?> + + + + + +get_var("SELECT COUNT(*) FROM $wpdb->postmeta WHERE meta_key = 'keywords'"); +$somecount = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->postmeta WHERE meta_key = 'title'") + $somecount; +$somecount = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->postmeta WHERE meta_key = 'description'") + $somecount; +$somecount = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->postmeta WHERE meta_key = 'aiosp_meta'") + $somecount; +$somecount = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->postmeta WHERE meta_key = 'aiosp_disable'") + $somecount; +if($somecount > 0){ +echo "

    Your database meta needs to be updated. " . $somecount . " old fields remaining (Back up your database before updating.) +

    + + +
    +

    "; +} + +if(!get_option('aioseop_options')){ + echo "

    Your database options need to be updated.(Back up your database before updating.) +

    + + +
    +

    "; + +} + +?> + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +/> + +
    + + + + + + > Enabled
    +> Disabled + +
    + + + + + + + +
    + + + + + + + +
    + + + + + + + +
    + + + + + +/> + +
    + + + + + +/> + +
    + + + + + + + +
    + + + + + + + +
    + + + + + + + +
    + + + + + + + +
    + + + + + + + +
    + + + + + + + +
    + + + + + + + +
    + + + + + + + +
    + + + + + + + +
    + + + + +/> + +
    + + + + +/> + +
    + + + + +/> + +
    + + + + + +/> + +
    + + + + + +/> + +
    + + + + + +/> + +
    + + + + + +/> + +
    + + + + + +/> + +
    + + + + + + + +
    + + + + + + + +
    + + + + + + + +
    + + + + + + + +
    + + + + + +/> + +
    + + + + + +/> + +
    +

    + + + + + + + +

    + + +


    +Check out these other great plugins!
    +SMS Text Message - sends SMS updates to your readers
    +WordPress Security Scan - provides vital security for your WordPress site +

    +
    +
    + \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/all-in-one-seo-pack/all_in_one_seo_pack-bg_BG.mo Binary file web/wp-content/plugins/all-in-one-seo-pack/all_in_one_seo_pack-bg_BG.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/all-in-one-seo-pack/all_in_one_seo_pack-bg_NO.mo Binary file web/wp-content/plugins/all-in-one-seo-pack/all_in_one_seo_pack-bg_NO.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/all-in-one-seo-pack/all_in_one_seo_pack-da_DK.mo Binary file web/wp-content/plugins/all-in-one-seo-pack/all_in_one_seo_pack-da_DK.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/all-in-one-seo-pack/all_in_one_seo_pack-de_DE.mo Binary file web/wp-content/plugins/all-in-one-seo-pack/all_in_one_seo_pack-de_DE.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/all-in-one-seo-pack/all_in_one_seo_pack-es_ES.mo Binary file web/wp-content/plugins/all-in-one-seo-pack/all_in_one_seo_pack-es_ES.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/all-in-one-seo-pack/all_in_one_seo_pack-fr_FR.mo Binary file web/wp-content/plugins/all-in-one-seo-pack/all_in_one_seo_pack-fr_FR.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/all-in-one-seo-pack/all_in_one_seo_pack-he_IL.mo Binary file web/wp-content/plugins/all-in-one-seo-pack/all_in_one_seo_pack-he_IL.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/all-in-one-seo-pack/all_in_one_seo_pack-hu_HU.mo Binary file web/wp-content/plugins/all-in-one-seo-pack/all_in_one_seo_pack-hu_HU.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/all-in-one-seo-pack/all_in_one_seo_pack-it_IT.mo Binary file web/wp-content/plugins/all-in-one-seo-pack/all_in_one_seo_pack-it_IT.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/all-in-one-seo-pack/all_in_one_seo_pack-ja.mo Binary file web/wp-content/plugins/all-in-one-seo-pack/all_in_one_seo_pack-ja.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/all-in-one-seo-pack/all_in_one_seo_pack-nl_NL.mo Binary file web/wp-content/plugins/all-in-one-seo-pack/all_in_one_seo_pack-nl_NL.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/all-in-one-seo-pack/all_in_one_seo_pack-pl_PL.mo Binary file web/wp-content/plugins/all-in-one-seo-pack/all_in_one_seo_pack-pl_PL.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/all-in-one-seo-pack/all_in_one_seo_pack-pt_BR.mo Binary file web/wp-content/plugins/all-in-one-seo-pack/all_in_one_seo_pack-pt_BR.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/all-in-one-seo-pack/all_in_one_seo_pack-ru_RU.mo Binary file web/wp-content/plugins/all-in-one-seo-pack/all_in_one_seo_pack-ru_RU.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/all-in-one-seo-pack/all_in_one_seo_pack-tr_TR.mo Binary file web/wp-content/plugins/all-in-one-seo-pack/all_in_one_seo_pack-tr_TR.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/all-in-one-seo-pack/all_in_one_seo_pack-uk.mo Binary file web/wp-content/plugins/all-in-one-seo-pack/all_in_one_seo_pack-uk.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/all-in-one-seo-pack/all_in_one_seo_pack-zh_CN.mo Binary file web/wp-content/plugins/all-in-one-seo-pack/all_in_one_seo_pack-zh_CN.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/all-in-one-seo-pack/all_in_one_seo_pack-zh_TW.mo Binary file web/wp-content/plugins/all-in-one-seo-pack/all_in_one_seo_pack-zh_TW.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/all-in-one-seo-pack/all_in_one_seo_pack.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/all-in-one-seo-pack/all_in_one_seo_pack.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,802 @@ +Options configuration panel | Pro Version | Donate | Support | Amazon Wishlist +Version: 1.6.8.2 +Author: Michael Torbert +Author URI: http://michaeltorbert.com +*/ + +/* +Copyright (C) 2008-2009 Michael Torbert, semperfiwebdesign.com (michael AT semperfiwebdesign DOT com) +Original code by uberdose of uberdose.com + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3 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, see . +*/ + +/*******************************************************************************************************/ +//register_activation_hook(__FILE__,'aioseop_activate_pl'); + +$UTF8_TABLES['strtolower'] = array( + "Z" => "z", "Y" => "y", "X" => "x", + "W" => "w", "V" => "v", "U" => "u", + "T" => "t", "S" => "s", "R" => "r", + "Q" => "q", "P" => "p", "O" => "o", + "N" => "n", "M" => "m", "L" => "l", + "K" => "k", "J" => "j", "I" => "i", + "H" => "h", "G" => "g", "F" => "f", + "E" => "e", "D" => "d", "C" => "c", + "B" => "b", "A" => "a", "Å" => "å", + "K" => "k", "Ω" => "ω", "Ώ" => "ώ", + "Ὼ" => "ὼ", "Ό" => "ό", "Ὸ" => "ὸ", + "Ῥ" => "ῥ", "Ύ" => "ύ", "Ὺ" => "ὺ", + "Ῡ" => "ῡ", "Ῠ" => " ", "Ί" => "ί", + "Ὶ" => "ὶ", "Ῑ" => "ῑ", "Ῐ" => "ῐ", + "Ή" => "ή", "Ὴ" => "ὴ", "Έ" => "έ", + "Ὲ" => "ὲ", "Ά" => "ά", "Ὰ" => "ὰ", + "Ᾱ" => "ᾱ", "Ᾰ" => "ᾰ", "Ὧ" => "ὧ", + "Ὦ" => "ὦ", "Ὥ" => "ὥ", "Ὤ" => "ὤ", + "Ὣ" => "ὣ", "Ὢ" => "ὢ", "Ὡ" => "ὡ", + "Ὠ" => " ", "Ὗ" => "ὗ", "Ὕ" => "ὕ", + "Ὓ" => "ὓ", "Ὑ" => "ὑ", "Ὅ" => "ὅ", + "Ὄ" => "ὄ", "Ὃ" => "ὃ", "Ὂ" => "ὂ", + "Ὁ" => "ὁ", "Ὀ" => "ὀ", "Ἷ" => "ἷ", + "Ἶ" => "ἶ", "Ἵ" => "ἵ", "Ἴ" => "ἴ", + "Ἳ" => "ἳ", "Ἲ" => "ἲ", "Ἱ" => "ἱ", + "Ἰ" => "ἰ", "Ἧ" => "ἧ", "Ἦ" => "ἦ", + "Ἥ" => "ἥ", "Ἤ" => "ἤ", "Ἣ" => "ἣ", + "Ἢ" => "ἢ", "Ἡ" => "ἡ", "Ἠ" => " ", + "Ἕ" => "ἕ", "Ἔ" => "ἔ", "Ἓ" => "ἓ", + "Ἒ" => "ἒ", "Ἑ" => "ἑ", "Ἐ" => "ἐ", + "Ἇ" => "ἇ", "Ἆ" => "ἆ", "Ἅ" => "ἅ", + "Ἄ" => "ἄ", "Ἃ" => "ἃ", "Ἂ" => "ἂ", + "Ἁ" => "ἁ", "Ἀ" => "ἀ", "Ỹ" => "ỹ", + "Ỷ" => "ỷ", "Ỵ" => "ỵ", "Ỳ" => "ỳ", + "Ự" => "ự", "Ữ" => "ữ", "Ử" => "ử", + "Ừ" => "ừ", "Ứ" => "ứ", "Ủ" => "ủ", + "Ụ" => "ụ", "Ợ" => "ợ", " " => "ỡ", + "Ở" => "ở", "Ờ" => "ờ", "Ớ" => "ớ", + "Ộ" => "ộ", "Ỗ" => "ỗ", "Ổ" => "ổ", + "Ồ" => "ồ", "Ố" => "ố", "Ỏ" => "ỏ", + "Ọ" => "ọ", "Ị" => "ị", "Ỉ" => "ỉ", + "Ệ" => "ệ", "Ễ" => "ễ", "Ể" => "ể", + "Ề" => "ề", "Ế" => "ế", "Ẽ" => "ẽ", + "Ẻ" => "ẻ", "Ẹ" => "ẹ", "Ặ" => "ặ", + "Ẵ" => "ẵ", "Ẳ" => "ẳ", "Ằ" => "ằ", + "Ắ" => "ắ", "Ậ" => "ậ", "Ẫ" => "ẫ", + "Ẩ" => "ẩ", "Ầ" => "ầ", "Ấ" => "ấ", + "Ả" => "ả", " " => "ạ", "Ẕ" => "ẕ", + "Ẓ" => "ẓ", "Ẑ" => "ẑ", "Ẏ" => "ẏ", + "Ẍ" => "ẍ", "Ẋ" => "ẋ", "Ẉ" => "ẉ", + "Ẇ" => "ẇ", "Ẅ" => "ẅ", "Ẃ" => "ẃ", + "Ẁ" => "ẁ", "Ṿ" => "ṿ", "Ṽ" => "ṽ", + "Ṻ" => "ṻ", "Ṹ" => "ṹ", "Ṷ" => "ṷ", + "Ṵ" => "ṵ", "Ṳ" => "ṳ", "Ṱ" => "ṱ", + "Ṯ" => "ṯ", "Ṭ" => "ṭ", "Ṫ" => "ṫ", + "Ṩ" => "ṩ", "Ṧ" => "ṧ", "Ṥ" => "ṥ", + "Ṣ" => "ṣ", " " => "ṡ", "Ṟ" => "ṟ", + "Ṝ" => "ṝ", "Ṛ" => "ṛ", "Ṙ" => "ṙ", + "Ṗ" => "ṗ", "Ṕ" => "ṕ", "Ṓ" => "ṓ", + "Ṑ" => "ṑ", "Ṏ" => "ṏ", "Ṍ" => "ṍ", + "Ṋ" => "ṋ", "Ṉ" => "ṉ", "Ṇ" => "ṇ", + "Ṅ" => "ṅ", "Ṃ" => "ṃ", "Ṁ" => "ṁ", + "Ḿ" => "ḿ", "Ḽ" => "ḽ", "Ḻ" => "ḻ", + "Ḹ" => "ḹ", "Ḷ" => "ḷ", "Ḵ" => "ḵ", + "Ḳ" => "ḳ", "Ḱ" => "ḱ", "Ḯ" => "ḯ", + "Ḭ" => "ḭ", "Ḫ" => "ḫ", "Ḩ" => "ḩ", + "Ḧ" => "ḧ", "Ḥ" => "ḥ", "Ḣ" => "ḣ", + " " => "ḡ", "Ḟ" => "ḟ", "Ḝ" => "ḝ", + "Ḛ" => "ḛ", "Ḙ" => "ḙ", "Ḗ" => "ḗ", + "Ḕ" => "ḕ", "Ḓ" => "ḓ", "Ḑ" => "ḑ", + "Ḏ" => "ḏ", "Ḍ" => "ḍ", "Ḋ" => "ḋ", + "Ḉ" => "ḉ", "Ḇ" => "ḇ", "Ḅ" => "ḅ", + "Ḃ" => "ḃ", "Ḁ" => "ḁ", "Ֆ" => "ֆ", + "Օ" => "օ", "Ք" => "ք", "Փ" => "փ", + "Ւ" => "ւ", "Ց" => "ց", "Ր" => "ր", + "Տ" => "տ", "Վ" => "վ", "Ս" => "ս", + "Ռ" => "ռ", "Ջ" => "ջ", "Պ" => "պ", + "Չ" => "չ", "Ո" => "ո", "Շ" => "շ", + "Ն" => "ն", "Յ" => "յ", "Մ" => "մ", + "Ճ" => "ճ", "Ղ" => "ղ", "Ձ" => "ձ", + "Հ" => "հ", "Կ" => "կ", "Ծ" => "ծ", + "Խ" => "խ", "Լ" => "լ", "Ի" => "ի", + "Ժ" => "ժ", "Թ" => "թ", "Ը" => "ը", + "Է" => "է", "Զ" => "զ", "Ե" => "ե", + "Դ" => "դ", "Գ" => "գ", "Բ" => "բ", + "Ա" => "ա", "Ԏ" => "ԏ", "Ԍ" => "ԍ", + "Ԋ" => "ԋ", "Ԉ" => "ԉ", "Ԇ" => "ԇ", + "Ԅ" => "ԅ", "Ԃ" => "ԃ", "Ԁ" => "ԁ", + "Ӹ" => "ӹ", "Ӵ" => "ӵ", "Ӳ" => "ӳ", + "Ӱ" => "ӱ", "Ӯ" => "ӯ", "Ӭ" => "ӭ", + "Ӫ" => "ӫ", "Ө" => "ө", "Ӧ" => "ӧ", + "Ӥ" => "ӥ", "Ӣ" => "ӣ", " " => "ӡ", + "Ӟ" => "ӟ", "Ӝ" => "ӝ", "Ӛ" => "ӛ", + "Ә" => "ә", "Ӗ" => "ӗ", "Ӕ" => "ӕ", + "Ӓ" => "ӓ", "Ӑ" => "ӑ", "Ӎ" => "ӎ", + "Ӌ" => "ӌ", "Ӊ" => "ӊ", "Ӈ" => "ӈ", + "Ӆ" => "ӆ", "Ӄ" => "ӄ", "Ӂ" => "ӂ", + "Ҿ" => "ҿ", "Ҽ" => "ҽ", "Һ" => "һ", + "Ҹ" => "ҹ", "Ҷ" => "ҷ", "Ҵ" => "ҵ", + "Ҳ" => "ҳ", "Ұ" => "ұ", "Ү" => "ү", + "Ҭ" => "ҭ", "Ҫ" => "ҫ", "Ҩ" => "ҩ", + "Ҧ" => "ҧ", "Ҥ" => "ҥ", "Ң" => "ң", + " " => "ҡ", "Ҟ" => "ҟ", "Ҝ" => "ҝ", + "Қ" => "қ", "Ҙ" => "ҙ", "Җ" => "җ", + "Ҕ" => "ҕ", "Ғ" => "ғ", "Ґ" => "ґ", + "Ҏ" => "ҏ", "Ҍ" => "ҍ", "Ҋ" => "ҋ", + "Ҁ" => "ҁ", "Ѿ" => "ѿ", "Ѽ" => "ѽ", + "Ѻ" => "ѻ", "Ѹ" => "ѹ", "Ѷ" => "ѷ", + "Ѵ" => "ѵ", "Ѳ" => "ѳ", "Ѱ" => "ѱ", + "Ѯ" => "ѯ", "Ѭ" => "ѭ", "Ѫ" => "ѫ", + "Ѩ" => "ѩ", "Ѧ" => "ѧ", "Ѥ" => "ѥ", + "Ѣ" => "ѣ", " " => "ѡ", "Я" => "я", + "Ю" => "ю", "Э" => "э", "Ь" => "ь", + "Ы" => "ы", "Ъ" => "ъ", "Щ" => "щ", + "Ш" => "ш", "Ч" => "ч", "Ц" => "ц", + "Х" => "х", "Ф" => "ф", "У" => "у", + "Т" => "т", "С" => "с", " " => "р", + "П" => "п", "О" => "о", "Н" => "н", + "М" => "м", "Л" => "л", "К" => "к", + "Й" => "й", "И" => "и", "З" => "з", + "Ж" => "ж", "Е" => "е", "Д" => "д", + "Г" => "г", "В" => "в", "Б" => "б", + "А" => "а", "Џ" => "џ", "Ў" => "ў", + "Ѝ" => "ѝ", "Ќ" => "ќ", "Ћ" => "ћ", + "Њ" => "њ", "Љ" => "љ", "Ј" => "ј", + "Ї" => "ї", "І" => "і", "Ѕ" => "ѕ", + "Є" => "є", "Ѓ" => "ѓ", "Ђ" => "ђ", + "Ё" => "ё", "Ѐ" => "ѐ", "ϴ" => "θ", + "Ϯ" => "ϯ", "Ϭ" => "ϭ", "Ϫ" => "ϫ", + "Ϩ" => "ϩ", "Ϧ" => "ϧ", "Ϥ" => "ϥ", + "Ϣ" => "ϣ", " " => "ϡ", "Ϟ" => "ϟ", + "Ϝ" => "ϝ", "Ϛ" => "ϛ", "Ϙ" => "ϙ", + "Ϋ" => "ϋ", "Ϊ" => "ϊ", "Ω" => "ω", + "Ψ" => "ψ", "Χ" => "χ", "Φ" => "φ", + "Υ" => "υ", "Τ" => "τ", "Σ" => "σ", + "Ρ" => "ρ", " " => "π", "Ο" => "ο", + "Ξ" => "ξ", "Ν" => "ν", "Μ" => "μ", + "Λ" => "λ", "Κ" => "κ", "Ι" => "ι", + "Θ" => "θ", "Η" => "η", "Ζ" => "ζ", + "Ε" => "ε", "Δ" => "δ", "Γ" => "γ", + "Β" => "β", "Α" => "α", "Ώ" => "ώ", + "Ύ" => "ύ", "Ό" => "ό", "Ί" => "ί", + "Ή" => "ή", "Έ" => "έ", "Ά" => "ά", + "Ȳ" => "ȳ", "Ȱ" => "ȱ", "Ȯ" => "ȯ", + "Ȭ" => "ȭ", "Ȫ" => "ȫ", "Ȩ" => "ȩ", + "Ȧ" => "ȧ", "Ȥ" => "ȥ", "Ȣ" => "ȣ", + " " => "ƞ", "Ȟ" => "ȟ", "Ȝ" => "ȝ", + "Ț" => "ț", "Ș" => "ș", "Ȗ" => "ȗ", + "Ȕ" => "ȕ", "Ȓ" => "ȓ", "Ȑ" => "ȑ", + "Ȏ" => "ȏ", "Ȍ" => "ȍ", "Ȋ" => "ȋ", + "Ȉ" => "ȉ", "Ȇ" => "ȇ", "Ȅ" => "ȅ", + "Ȃ" => "ȃ", "Ȁ" => "ȁ", "Ǿ" => "ǿ", + "Ǽ" => "ǽ", "Ǻ" => "ǻ", "Ǹ" => "ǹ", + "Ƿ" => "ƿ", "Ƕ" => "ƕ", "Ǵ" => "ǵ", + "DZ" => "dz", "Ǯ" => "ǯ", "Ǭ" => "ǭ", + "Ǫ" => "ǫ", "Ǩ" => "ǩ", "Ǧ" => "ǧ", + "Ǥ" => "ǥ", "Ǣ" => "ǣ", " " => "ǡ", + "Ǟ" => "ǟ", "Ǜ" => "ǜ", "Ǚ" => "ǚ", + "Ǘ" => "ǘ", "Ǖ" => "ǖ", "Ǔ" => "ǔ", + "Ǒ" => "ǒ", "Ǐ" => "ǐ", "Ǎ" => "ǎ", + "NJ" => "nj", "LJ" => "lj", "DŽ" => "dž", + "Ƽ" => "ƽ", "Ƹ" => "ƹ", "Ʒ" => "ʒ", + "Ƶ" => "ƶ", "Ƴ" => "ƴ", "Ʋ" => "ʋ", + "Ʊ" => "ʊ", "Ư" => "ư", "Ʈ" => "ʈ", + "Ƭ" => "ƭ", "Ʃ" => "ʃ", "Ƨ" => "ƨ", + "Ʀ" => "ʀ", "Ƥ" => "ƥ", "Ƣ" => "ƣ", + " " => "ơ", "Ɵ" => "ɵ", "Ɲ" => "ɲ", + "Ɯ" => "ɯ", "Ƙ" => "ƙ", "Ɨ" => "ɨ", + "Ɩ" => "ɩ", "Ɣ" => "ɣ", "Ɠ" => " ", + "Ƒ" => "ƒ", "Ɛ" => "ɛ", "Ə" => "ə", + "Ǝ" => "ǝ", "Ƌ" => "ƌ", "Ɗ" => "ɗ", + "Ɖ" => "ɖ", "Ƈ" => "ƈ", "Ɔ" => "ɔ", + "Ƅ" => "ƅ", "Ƃ" => "ƃ", "Ɓ" => "ɓ", + "Ž" => "ž", "Ż" => "ż", "Ź" => "ź", + "Ÿ" => "ÿ", "Ŷ" => "ŷ", "Ŵ" => "ŵ", + "Ų" => "ų", "Ű" => "ű", "Ů" => "ů", + "Ŭ" => "ŭ", "Ū" => "ū", "Ũ" => "ũ", + "Ŧ" => "ŧ", "Ť" => "ť", "Ţ" => "ţ", + " " => "š", "Ş" => "ş", "Ŝ" => "ŝ", + "Ś" => "ś", "Ř" => "ř", "Ŗ" => "ŗ", + "Ŕ" => "ŕ", "Œ" => "œ", "Ő" => "ő", + "Ŏ" => "ŏ", "Ō" => "ō", "Ŋ" => "ŋ", + "Ň" => "ň", "Ņ" => "ņ", "Ń" => "ń", + "Ł" => "ł", "Ŀ" => "ŀ", "Ľ" => "ľ", + "Ļ" => "ļ", "Ĺ" => "ĺ", "Ķ" => "ķ", + "Ĵ" => "ĵ", "IJ" => "ij", "İ" => "i", + "Į" => "į", "Ĭ" => "ĭ", "Ī" => "ī", + "Ĩ" => "ĩ", "Ħ" => "ħ", "Ĥ" => "ĥ", + "Ģ" => "ģ", " " => "ġ", "Ğ" => "ğ", + "Ĝ" => "ĝ", "Ě" => "ě", "Ę" => "ę", + "Ė" => "ė", "Ĕ" => "ĕ", "Ē" => "ē", + "Đ" => "đ", "Ď" => "ď", "Č" => "č", + "Ċ" => "ċ", "Ĉ" => "ĉ", "Ć" => "ć", + "Ą" => "ą", "Ă" => "ă", "Ā" => "ā", + "Þ" => "þ", "Ý" => "ý", "Ü" => "ü", + "Û" => "û", "Ú" => "ú", "Ù" => "ù", + "Ø" => "ø", "Ö" => "ö", "Õ" => "õ", + "Ô" => "ô", "Ó" => "ó", "Ò" => "ò", + "Ñ" => "ñ", "Ð" => "ð", "Ï" => "ï", + "Î" => "î", "Í" => "í", "Ì" => "ì", + "Ë" => "ë", "Ê" => "ê", "É" => "é", + "È" => "è", "Ç" => "ç", "Æ" => "æ", + "Å" => "å", "Ä" => "ä", "Ã" => "ã", + "Â" => "â", "Á" => "á", "À" => " ", + "Z" => "z", "Y" => "y", "X" => "x", + "W" => "w", "V" => "v", "U" => "u", + "T" => "t", "S" => "s", "R" => "r", + "Q" => "q", "P" => "p", "O" => "o", + "N" => "n", "M" => "m", "L" => "l", + "K" => "k", "J" => "j", "I" => "i", + "H" => "h", "G" => "g", "F" => "f", + "E" => "e", "D" => "d", "C" => "c", + "B" => "b", "A" => "a", +); + + +$UTF8_TABLES['strtoupper'] = array( + "z" => "Z", "y" => "Y", "x" => "X", + "w" => "W", "v" => "V", "u" => "U", + "t" => "T", "s" => "S", "r" => "R", + "q" => "Q", "p" => "P", "o" => "O", + "n" => "N", "m" => "M", "l" => "L", + "k" => "K", "j" => "J", "i" => "I", + "h" => "H", "g" => "G", "f" => "F", + "e" => "E", "d" => "D", "c" => "C", + "b" => "B", "a" => "A", "ῳ" => "ῼ", + "ῥ" => "Ῥ", "ῡ" => "Ῡ", " " => "Ῠ", + "ῑ" => "Ῑ", "ῐ" => "Ῐ", "ῃ" => "ῌ", + "ι" => "Ι", "ᾳ" => "ᾼ", "ᾱ" => "Ᾱ", + "ᾰ" => "Ᾰ", "ᾧ" => "ᾯ", "ᾦ" => "ᾮ", + "ᾥ" => "ᾭ", "ᾤ" => "ᾬ", "ᾣ" => "ᾫ", + "ᾢ" => "ᾪ", "ᾡ" => "ᾩ", " " => "ᾨ", + "ᾗ" => "ᾟ", "ᾖ" => "ᾞ", "ᾕ" => "ᾝ", + "ᾔ" => "ᾜ", "ᾓ" => "ᾛ", "ᾒ" => "ᾚ", + "ᾑ" => "ᾙ", "ᾐ" => "ᾘ", "ᾇ" => "ᾏ", + "ᾆ" => "ᾎ", "ᾅ" => "ᾍ", "ᾄ" => "ᾌ", + "ᾃ" => "ᾋ", "ᾂ" => "ᾊ", "ᾁ" => "ᾉ", + "ᾀ" => "ᾈ", "ώ" => "Ώ", "ὼ" => "Ὼ", + "ύ" => "Ύ", "ὺ" => "Ὺ", "ό" => "Ό", + "ὸ" => "Ὸ", "ί" => "Ί", "ὶ" => "Ὶ", + "ή" => "Ή", "ὴ" => "Ὴ", "έ" => "Έ", + "ὲ" => "Ὲ", "ά" => "Ά", "ὰ" => "Ὰ", + "ὧ" => "Ὧ", "ὦ" => "Ὦ", "ὥ" => "Ὥ", + "ὤ" => "Ὤ", "ὣ" => "Ὣ", "ὢ" => "Ὢ", + "ὡ" => "Ὡ", " " => "Ὠ", "ὗ" => "Ὗ", + "ὕ" => "Ὕ", "ὓ" => "Ὓ", "ὑ" => "Ὑ", + "ὅ" => "Ὅ", "ὄ" => "Ὄ", "ὃ" => "Ὃ", + "ὂ" => "Ὂ", "ὁ" => "Ὁ", "ὀ" => "Ὀ", + "ἷ" => "Ἷ", "ἶ" => "Ἶ", "ἵ" => "Ἵ", + "ἴ" => "Ἴ", "ἳ" => "Ἳ", "ἲ" => "Ἲ", + "ἱ" => "Ἱ", "ἰ" => "Ἰ", "ἧ" => "Ἧ", + "ἦ" => "Ἦ", "ἥ" => "Ἥ", "ἤ" => "Ἤ", + "ἣ" => "Ἣ", "ἢ" => "Ἢ", "ἡ" => "Ἡ", + " " => "Ἠ", "ἕ" => "Ἕ", "ἔ" => "Ἔ", + "ἓ" => "Ἓ", "ἒ" => "Ἒ", "ἑ" => "Ἑ", + "ἐ" => "Ἐ", "ἇ" => "Ἇ", "ἆ" => "Ἆ", + "ἅ" => "Ἅ", "ἄ" => "Ἄ", "ἃ" => "Ἃ", + "ἂ" => "Ἂ", "ἁ" => "Ἁ", "ἀ" => "Ἀ", + "ỹ" => "Ỹ", "ỷ" => "Ỷ", "ỵ" => "Ỵ", + "ỳ" => "Ỳ", "ự" => "Ự", "ữ" => "Ữ", + "ử" => "Ử", "ừ" => "Ừ", "ứ" => "Ứ", + "ủ" => "Ủ", "ụ" => "Ụ", "ợ" => "Ợ", + "ỡ" => " ", "ở" => "Ở", "ờ" => "Ờ", + "ớ" => "Ớ", "ộ" => "Ộ", "ỗ" => "Ỗ", + "ổ" => "Ổ", "ồ" => "Ồ", "ố" => "Ố", + "ỏ" => "Ỏ", "ọ" => "Ọ", "ị" => "Ị", + "ỉ" => "Ỉ", "ệ" => "Ệ", "ễ" => "Ễ", + "ể" => "Ể", "ề" => "Ề", "ế" => "Ế", + "ẽ" => "Ẽ", "ẻ" => "Ẻ", "ẹ" => "Ẹ", + "ặ" => "Ặ", "ẵ" => "Ẵ", "ẳ" => "Ẳ", + "ằ" => "Ằ", "ắ" => "Ắ", "ậ" => "Ậ", + "ẫ" => "Ẫ", "ẩ" => "Ẩ", "ầ" => "Ầ", + "ấ" => "Ấ", "ả" => "Ả", "ạ" => " ", + "ẛ" => " ", "ẕ" => "Ẕ", "ẓ" => "Ẓ", + "ẑ" => "Ẑ", "ẏ" => "Ẏ", "ẍ" => "Ẍ", + "ẋ" => "Ẋ", "ẉ" => "Ẉ", "ẇ" => "Ẇ", + "ẅ" => "Ẅ", "ẃ" => "Ẃ", "ẁ" => "Ẁ", + "ṿ" => "Ṿ", "ṽ" => "Ṽ", "ṻ" => "Ṻ", + "ṹ" => "Ṹ", "ṷ" => "Ṷ", "ṵ" => "Ṵ", + "ṳ" => "Ṳ", "ṱ" => "Ṱ", "ṯ" => "Ṯ", + "ṭ" => "Ṭ", "ṫ" => "Ṫ", "ṩ" => "Ṩ", + "ṧ" => "Ṧ", "ṥ" => "Ṥ", "ṣ" => "Ṣ", + "ṡ" => " ", "ṟ" => "Ṟ", "ṝ" => "Ṝ", + "ṛ" => "Ṛ", "ṙ" => "Ṙ", "ṗ" => "Ṗ", + "ṕ" => "Ṕ", "ṓ" => "Ṓ", "ṑ" => "Ṑ", + "ṏ" => "Ṏ", "ṍ" => "Ṍ", "ṋ" => "Ṋ", + "ṉ" => "Ṉ", "ṇ" => "Ṇ", "ṅ" => "Ṅ", + "ṃ" => "Ṃ", "ṁ" => "Ṁ", "ḿ" => "Ḿ", + "ḽ" => "Ḽ", "ḻ" => "Ḻ", "ḹ" => "Ḹ", + "ḷ" => "Ḷ", "ḵ" => "Ḵ", "ḳ" => "Ḳ", + "ḱ" => "Ḱ", "ḯ" => "Ḯ", "ḭ" => "Ḭ", + "ḫ" => "Ḫ", "ḩ" => "Ḩ", "ḧ" => "Ḧ", + "ḥ" => "Ḥ", "ḣ" => "Ḣ", "ḡ" => " ", + "ḟ" => "Ḟ", "ḝ" => "Ḝ", "ḛ" => "Ḛ", + "ḙ" => "Ḙ", "ḗ" => "Ḗ", "ḕ" => "Ḕ", + "ḓ" => "Ḓ", "ḑ" => "Ḑ", "ḏ" => "Ḏ", + "ḍ" => "Ḍ", "ḋ" => "Ḋ", "ḉ" => "Ḉ", + "ḇ" => "Ḇ", "ḅ" => "Ḅ", "ḃ" => "Ḃ", + "ḁ" => "Ḁ", "ֆ" => "Ֆ", "օ" => "Օ", + "ք" => "Ք", "փ" => "Փ", "ւ" => "Ւ", + "ց" => "Ց", "ր" => "Ր", "տ" => "Տ", + "վ" => "Վ", "ս" => "Ս", "ռ" => "Ռ", + "ջ" => "Ջ", "պ" => "Պ", "չ" => "Չ", + "ո" => "Ո", "շ" => "Շ", "ն" => "Ն", + "յ" => "Յ", "մ" => "Մ", "ճ" => "Ճ", + "ղ" => "Ղ", "ձ" => "Ձ", "հ" => "Հ", + "կ" => "Կ", "ծ" => "Ծ", "խ" => "Խ", + "լ" => "Լ", "ի" => "Ի", "ժ" => "Ժ", + "թ" => "Թ", "ը" => "Ը", "է" => "Է", + "զ" => "Զ", "ե" => "Ե", "դ" => "Դ", + "գ" => "Գ", "բ" => "Բ", "ա" => "Ա", + "ԏ" => "Ԏ", "ԍ" => "Ԍ", "ԋ" => "Ԋ", + "ԉ" => "Ԉ", "ԇ" => "Ԇ", "ԅ" => "Ԅ", + "ԃ" => "Ԃ", "ԁ" => "Ԁ", "ӹ" => "Ӹ", + "ӵ" => "Ӵ", "ӳ" => "Ӳ", "ӱ" => "Ӱ", + "ӯ" => "Ӯ", "ӭ" => "Ӭ", "ӫ" => "Ӫ", + "ө" => "Ө", "ӧ" => "Ӧ", "ӥ" => "Ӥ", + "ӣ" => "Ӣ", "ӡ" => " ", "ӟ" => "Ӟ", + "ӝ" => "Ӝ", "ӛ" => "Ӛ", "ә" => "Ә", + "ӗ" => "Ӗ", "ӕ" => "Ӕ", "ӓ" => "Ӓ", + "ӑ" => "Ӑ", "ӎ" => "Ӎ", "ӌ" => "Ӌ", + "ӊ" => "Ӊ", "ӈ" => "Ӈ", "ӆ" => "Ӆ", + "ӄ" => "Ӄ", "ӂ" => "Ӂ", "ҿ" => "Ҿ", + "ҽ" => "Ҽ", "һ" => "Һ", "ҹ" => "Ҹ", + "ҷ" => "Ҷ", "ҵ" => "Ҵ", "ҳ" => "Ҳ", + "ұ" => "Ұ", "ү" => "Ү", "ҭ" => "Ҭ", + "ҫ" => "Ҫ", "ҩ" => "Ҩ", "ҧ" => "Ҧ", + "ҥ" => "Ҥ", "ң" => "Ң", "ҡ" => " ", + "ҟ" => "Ҟ", "ҝ" => "Ҝ", "қ" => "Қ", + "ҙ" => "Ҙ", "җ" => "Җ", "ҕ" => "Ҕ", + "ғ" => "Ғ", "ґ" => "Ґ", "ҏ" => "Ҏ", + "ҍ" => "Ҍ", "ҋ" => "Ҋ", "ҁ" => "Ҁ", + "ѿ" => "Ѿ", "ѽ" => "Ѽ", "ѻ" => "Ѻ", + "ѹ" => "Ѹ", "ѷ" => "Ѷ", "ѵ" => "Ѵ", + "ѳ" => "Ѳ", "ѱ" => "Ѱ", "ѯ" => "Ѯ", + "ѭ" => "Ѭ", "ѫ" => "Ѫ", "ѩ" => "Ѩ", + "ѧ" => "Ѧ", "ѥ" => "Ѥ", "ѣ" => "Ѣ", + "ѡ" => " ", "џ" => "Џ", "ў" => "Ў", + "ѝ" => "Ѝ", "ќ" => "Ќ", "ћ" => "Ћ", + "њ" => "Њ", "љ" => "Љ", "ј" => "Ј", + "ї" => "Ї", "і" => "І", "ѕ" => "Ѕ", + "є" => "Є", "ѓ" => "Ѓ", "ђ" => "Ђ", + "ё" => "Ё", "ѐ" => "Ѐ", "я" => "Я", + "ю" => "Ю", "э" => "Э", "ь" => "Ь", + "ы" => "Ы", "ъ" => "Ъ", "щ" => "Щ", + "ш" => "Ш", "ч" => "Ч", "ц" => "Ц", + "х" => "Х", "ф" => "Ф", "у" => "У", + "т" => "Т", "с" => "С", "р" => " ", + "п" => "П", "о" => "О", "н" => "Н", + "м" => "М", "л" => "Л", "к" => "К", + "й" => "Й", "и" => "И", "з" => "З", + "ж" => "Ж", "е" => "Е", "д" => "Д", + "г" => "Г", "в" => "В", "б" => "Б", + "а" => "А", "ϵ" => "Ε", "ϲ" => "Σ", + "ϱ" => "Ρ", "ϰ" => "Κ", "ϯ" => "Ϯ", + "ϭ" => "Ϭ", "ϫ" => "Ϫ", "ϩ" => "Ϩ", + "ϧ" => "Ϧ", "ϥ" => "Ϥ", "ϣ" => "Ϣ", + "ϡ" => " ", "ϟ" => "Ϟ", "ϝ" => "Ϝ", + "ϛ" => "Ϛ", "ϙ" => "Ϙ", "ϖ" => " ", + "ϕ" => "Φ", "ϑ" => "Θ", "ϐ" => "Β", + "ώ" => "Ώ", "ύ" => "Ύ", "ό" => "Ό", + "ϋ" => "Ϋ", "ϊ" => "Ϊ", "ω" => "Ω", + "ψ" => "Ψ", "χ" => "Χ", "φ" => "Φ", + "υ" => "Υ", "τ" => "Τ", "σ" => "Σ", + "ς" => "Σ", "ρ" => "Ρ", "π" => " ", + "ο" => "Ο", "ξ" => "Ξ", "ν" => "Ν", + "μ" => "Μ", "λ" => "Λ", "κ" => "Κ", + "ι" => "Ι", "θ" => "Θ", "η" => "Η", + "ζ" => "Ζ", "ε" => "Ε", "δ" => "Δ", + "γ" => "Γ", "β" => "Β", "α" => "Α", + "ί" => "Ί", "ή" => "Ή", "έ" => "Έ", + "ά" => "Ά", "ʒ" => "Ʒ", "ʋ" => "Ʋ", + "ʊ" => "Ʊ", "ʈ" => "Ʈ", "ʃ" => "Ʃ", + "ʀ" => "Ʀ", "ɵ" => "Ɵ", "ɲ" => "Ɲ", + "ɯ" => "Ɯ", "ɩ" => "Ɩ", "ɨ" => "Ɨ", + "ɣ" => "Ɣ", " " => "Ɠ", "ɛ" => "Ɛ", + "ə" => "Ə", "ɗ" => "Ɗ", "ɖ" => "Ɖ", + "ɔ" => "Ɔ", "ɓ" => "Ɓ", "ȳ" => "Ȳ", + "ȱ" => "Ȱ", "ȯ" => "Ȯ", "ȭ" => "Ȭ", + "ȫ" => "Ȫ", "ȩ" => "Ȩ", "ȧ" => "Ȧ", + "ȥ" => "Ȥ", "ȣ" => "Ȣ", "ȟ" => "Ȟ", + "ȝ" => "Ȝ", "ț" => "Ț", "ș" => "Ș", + "ȗ" => "Ȗ", "ȕ" => "Ȕ", "ȓ" => "Ȓ", + "ȑ" => "Ȑ", "ȏ" => "Ȏ", "ȍ" => "Ȍ", + "ȋ" => "Ȋ", "ȉ" => "Ȉ", "ȇ" => "Ȇ", + "ȅ" => "Ȅ", "ȃ" => "Ȃ", "ȁ" => "Ȁ", + "ǿ" => "Ǿ", "ǽ" => "Ǽ", "ǻ" => "Ǻ", + "ǹ" => "Ǹ", "ǵ" => "Ǵ", "dz" => "Dz", + "ǯ" => "Ǯ", "ǭ" => "Ǭ", "ǫ" => "Ǫ", + "ǩ" => "Ǩ", "ǧ" => "Ǧ", "ǥ" => "Ǥ", + "ǣ" => "Ǣ", "ǡ" => " ", "ǟ" => "Ǟ", + "ǝ" => "Ǝ", "ǜ" => "Ǜ", "ǚ" => "Ǚ", + "ǘ" => "Ǘ", "ǖ" => "Ǖ", "ǔ" => "Ǔ", + "ǒ" => "Ǒ", "ǐ" => "Ǐ", "ǎ" => "Ǎ", + "nj" => "Nj", "lj" => "Lj", "dž" => "Dž", + "ƿ" => "Ƿ", "ƽ" => "Ƽ", "ƹ" => "Ƹ", + "ƶ" => "Ƶ", "ƴ" => "Ƴ", "ư" => "Ư", + "ƭ" => "Ƭ", "ƨ" => "Ƨ", "ƥ" => "Ƥ", + "ƣ" => "Ƣ", "ơ" => " ", "ƞ" => " ", + "ƙ" => "Ƙ", "ƕ" => "Ƕ", "ƒ" => "Ƒ", + "ƌ" => "Ƌ", "ƈ" => "Ƈ", "ƅ" => "Ƅ", + "ƃ" => "Ƃ", "ſ" => "S", "ž" => "Ž", + "ż" => "Ż", "ź" => "Ź", "ŷ" => "Ŷ", + "ŵ" => "Ŵ", "ų" => "Ų", "ű" => "Ű", + "ů" => "Ů", "ŭ" => "Ŭ", "ū" => "Ū", + "ũ" => "Ũ", "ŧ" => "Ŧ", "ť" => "Ť", + "ţ" => "Ţ", "š" => " ", "ş" => "Ş", + "ŝ" => "Ŝ", "ś" => "Ś", "ř" => "Ř", + "ŗ" => "Ŗ", "ŕ" => "Ŕ", "œ" => "Œ", + "ő" => "Ő", "ŏ" => "Ŏ", "ō" => "Ō", + "ŋ" => "Ŋ", "ň" => "Ň", "ņ" => "Ņ", + "ń" => "Ń", "ł" => "Ł", "ŀ" => "Ŀ", + "ľ" => "Ľ", "ļ" => "Ļ", "ĺ" => "Ĺ", + "ķ" => "Ķ", "ĵ" => "Ĵ", "ij" => "IJ", + "ı" => "I", "į" => "Į", "ĭ" => "Ĭ", + "ī" => "Ī", "ĩ" => "Ĩ", "ħ" => "Ħ", + "ĥ" => "Ĥ", "ģ" => "Ģ", "ġ" => " ", + "ğ" => "Ğ", "ĝ" => "Ĝ", "ě" => "Ě", + "ę" => "Ę", "ė" => "Ė", "ĕ" => "Ĕ", + "ē" => "Ē", "đ" => "Đ", "ď" => "Ď", + "č" => "Č", "ċ" => "Ċ", "ĉ" => "Ĉ", + "ć" => "Ć", "ą" => "Ą", "ă" => "Ă", + "ā" => "Ā", "ÿ" => "Ÿ", "þ" => "Þ", + "ý" => "Ý", "ü" => "Ü", "û" => "Û", + "ú" => "Ú", "ù" => "Ù", "ø" => "Ø", + "ö" => "Ö", "õ" => "Õ", "ô" => "Ô", + "ó" => "Ó", "ò" => "Ò", "ñ" => "Ñ", + "ð" => "Ð", "ï" => "Ï", "î" => "Î", + "í" => "Í", "ì" => "Ì", "ë" => "Ë", + "ê" => "Ê", "é" => "É", "è" => "È", + "ç" => "Ç", "æ" => "Æ", "å" => "Å", + "ä" => "Ä", "ã" => "Ã", "â" => "Â", + "á" => "Á", " " => "À", "µ" => "Μ", + "z" => "Z", "y" => "Y", "x" => "X", + "w" => "W", "v" => "V", "u" => "U", + "t" => "T", "s" => "S", "r" => "R", + "q" => "Q", "p" => "P", "o" => "O", + "n" => "N", "m" => "M", "l" => "L", + "k" => "K", "j" => "J", "i" => "I", + "h" => "H", "g" => "G", "f" => "F", + "e" => "E", "d" => "D", "c" => "C", + "b" => "B", "a" => "A", +); + +if ( ! defined( 'WP_CONTENT_URL' ) ) + define( 'WP_CONTENT_URL', get_option( 'siteurl' ) . '/wp-content' ); +if ( ! defined( 'WP_CONTENT_DIR' ) ) + define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' ); +if ( ! defined( 'WP_PLUGIN_URL' ) ) + define( 'WP_PLUGIN_URL', WP_CONTENT_URL. '/plugins' ); +if ( ! defined( 'WP_PLUGIN_DIR' ) ) + define( 'WP_PLUGIN_DIR', WP_CONTENT_DIR . '/plugins' ); + +require_once( WP_PLUGIN_DIR . '/all-in-one-seo-pack/aioseop.class.php'); + +global $aioseop_options; +$aioseop_options = get_option('aioseop_options'); + + + +/* +add_option("aiosp_home_description", null, 'All in One SEO Plugin Home Description', 'yes'); +add_option("aiosp_home_title", null, 'All in One SEO Plugin Home Title', 'yes'); +add_option("aiosp_donate", 0, 'All in One SEO Pack Donate', 'no'); +add_option("aiosp_can", 1, 'All in One SEO Pack Canonical URLs', 'yes'); +add_option("aiosp_rewrite_titles", 1, 'All in One SEO Plugin Rewrite Titles', 'yes'); +add_option("aiosp_use_categories", 0, 'All in One SEO Plugin Use Categories', 'yes'); +add_option("aiosp_category_noindex", 1, 'All in One SEO Plugin Noindex for Categories', 'yes'); +add_option("aiosp_archive_noindex", 1, 'All in One SEO Plugin Noindex for Archives', 'yes'); +add_option("aiosp_tags_noindex", 0, 'All in One SEO Plugin Noindex for Tag Archives', 'yes'); +add_option("aiosp_generate_descriptions", 1, 'All in One SEO Plugin Autogenerate Descriptions', 'yes'); +add_option("aiosp_post_title_format", '%post_title% | %blog_title%', 'All in One SEO Plugin Post Title Format', 'yes'); +add_option("aiosp_page_title_format", '%page_title% | %blog_title%', 'All in One SEO Plugin Page Title Format', 'yes'); +add_option("aiosp_dynamic_postspage_keywords", 1, 'All in One SEO Plugin Dynamic Posts Page Keywords', 'yes'); +add_option("aiosp_category_title_format", '%category_title% | %blog_title%', 'All in One SEO Plugin Category Title Format', 'yes'); +add_option("aiosp_archive_title_format", '%date% | %blog_title%', 'All in One SEO Plugin Archive Title Format', 'yes'); +add_option("aiosp_tag_title_format", '%tag% | %blog_title%', 'All in One SEO Plugin Tag Title Format', 'yes'); +add_option("aiosp_search_title_format", '%search% | %blog_title%', 'All in One SEO Plugin Search Title Format', 'yes'); +add_option("aiosp_description_format", '%description%', 'All in One SEO Plugin Description Format', 'yes'); +add_option("aiosp_paged_format", ' - Part %page%', 'All in One SEO Plugin Paged Format', 'yes'); +add_option("aiosp_404_title_format", 'Nothing found for %request_words%', 'All in One SEO Plugin 404 Title Format', 'yes'); +add_option("aiosp_post_meta_tags", '', 'All in One SEO Plugin Additional Post Meta Tags', 'yes'); +add_option("aiosp_page_meta_tags", '', 'All in One SEO Plugin Additional Post Meta Tags', 'yes'); +add_option("aiosp_home_meta_tags", '', 'All in One SEO Plugin Additional Home Meta Tags', 'yes'); +add_option("aiosp_do_log", null, 'All in One SEO Plugin write log file', 'yes'); +*/ + +//$role = get_role('administrator'); +//$role->add_cap('Edit AIOSEOP Options'); +//$role->add_cap('Edit AIOSEOP on Posts/Pages'); + +////checking to see if things need to be updated + +//if_post('turn-on'){ + + /* automattic? +if(!get_option('aioseop_options')){ + aioseop_mrt_fix_meta(); //move this to the if also + aioseop_mrt_mkarry(); + } +*/ + +if($_POST['aioseop_migrate']) aioseop_mrt_fix_meta(); +if($_POST['aioseop_migrate_options']) aioseop_mrt_mkarry(); +if(!get_option('aiosp_post_title_format') && !get_option('aioseop_options')) aioseop_mrt_mkarry(); + +//}end _post('turn_on') + + +////end checking to see if things need to be updated + + +function aioseop_mrt_fix_meta(){ +global $wpdb; +$wpdb->query("UPDATE $wpdb->postmeta SET meta_key = '_aioseop_keywords' WHERE meta_key = 'keywords'"); +$wpdb->query("UPDATE $wpdb->postmeta SET meta_key = '_aioseop_title' WHERE meta_key = 'title'"); +$wpdb->query("UPDATE $wpdb->postmeta SET meta_key = '_aioseop_description' WHERE meta_key = 'description'"); +$wpdb->query("UPDATE $wpdb->postmeta SET meta_key = '_aioseop_meta' WHERE meta_key = 'aiosp_meta'"); +$wpdb->query("UPDATE $wpdb->postmeta SET meta_key = '_aioseop_disable' WHERE meta_key = 'aiosp_disable'"); +echo "

    Updating SEO post meta in database.

    1, +"aiosp_donate"=>0, +"aiosp_home_title"=>null, +"aiosp_home_description"=>'', +"aiosp_home_keywords"=>null, +"aiosp_max_words_excerpt"=>'something', +"aiosp_rewrite_titles"=>1, +"aiosp_post_title_format"=>'%post_title% | %blog_title%', +"aiosp_page_title_format"=>'%page_title% | %blog_title%', +"aiosp_category_title_format"=>'%category_title% | %blog_title%', +"aiosp_archive_title_format"=>'%date% | %blog_title%', +"aiosp_tag_title_format"=>'%tag% | %blog_title%', +"aiosp_search_title_format"=>'%search% | %blog_title%', +"aiosp_description_format"=>'%description%', +"aiosp_404_title_format"=>'Nothing found for %request_words%', +"aiosp_paged_format"=>' - Part %page%', +"aiosp_use_categories"=>0, +"aiosp_dynamic_postspage_keywords"=>1, +"aiosp_category_noindex"=>1, +"aiosp_archive_noindex"=>1, +"aiosp_tags_noindex"=>0, +"aiosp_cap_cats"=>1, +"aiosp_generate_descriptions"=>1, +"aiosp_debug_info"=>null, +"aiosp_post_meta_tags"=>'', +"aiosp_page_meta_tags"=>'', +"aiosp_home_meta_tags"=>'', +"aiosp_enabled" =>0, +"aiosp_use_tags_as_keywords" =>1, +"aiosp_do_log"=>null); + +if(get_option('aiosp_post_title_format')){ +foreach( $naioseop_options as $aioseop_opt_name => $value ) { + if( $aioseop_oldval = get_option($aioseop_opt_name) ) { + $naioseop_options[$aioseop_opt_name] = $aioseop_oldval; + + } + if( $aioseop_oldval == ''){ + $naioseop_options[$aioseop_opt_name] = ''; + } + + delete_option($aioseop_opt_name); + } +} +add_option('aioseop_options',$naioseop_options); +echo "

    Updating SEO configuration options in database

    All in One SEO Pack must be configured. Go to the admin page to enable and configure the plugin.

    '; +}else{ + echo '

    All in One SEO Pack must be configured. Go to the admin page to enable and configure the plugin.

    '; +} +} + +//add_action('after_plugin_row_all-in-one-seo-pack/all_in_one_seo_pack.php', 'add_plugin_row', 10, 2); + +function add_plugin_row($links, $file) { + +echo ''; +echo wp_remote_fopen('http://aioseop.semperfiwebdesign.com/'); +echo ''; + +} + +if($aioseop_options['aiosp_enabled']){ + add_action('wp_list_pages', 'aioseop_list_pages'); + remove_action( 'wp_head', 'rel_canonical' ); +} + +function aioseop_activate_pl(){ + if(get_option('aioseop_options')){ + $aioseop_options = get_option('aioseop_options'); + $aioseop_options['aiosp_enabled'] = "0"; + $aioseop_options['aiosp_donate'] = "0"; + update_option('aioseop_options',$aioseop_options); + } +} + + +$aiosp = new All_in_One_SEO_Pack(); +add_action('edit_post', array($aiosp, 'post_meta_tags')); +add_action('publish_post', array($aiosp, 'post_meta_tags')); +add_action('save_post', array($aiosp, 'post_meta_tags')); +add_action('edit_page_form', array($aiosp, 'post_meta_tags')); +add_action('init', array($aiosp, 'init')); +add_action('wp_head', array($aiosp, 'wp_head')); +add_action('template_redirect', array($aiosp, 'template_redirect')); +//add_action('admin_head',array($aiosp, 'seo_mrt_admin_head'); +add_action('admin_menu', array($aiosp, 'admin_menu')); +add_action('admin_menu', 'aiosp_meta_box_add'); + +add_action('admin_menu', 'aioseop_mrt_nap'); + +function aioseop_mrt_nap(){ +// add_object_page('All in One SEO Pack','All in One SEO Pack','administrator','aioseop','sometop2'); +// add_object_page('All in One SEO Pack', 'SEO', 8, "__FILE__", 'aioseop_mrt_nap_menu2a','http://65.190.51.165/aioseo/wp-content/plugins/all-in-one-seo-pack/images/globe.png'); + add_submenu_page("__FILE__", 'Settings', 'Settings', 8, '__FILE__', 'aioseop_mrt_nap_menu2a'); + add_submenu_page("__FILE__", 'Tools', 'Tools', 8, 'subpageb', 'aioseop_mrt_nap_menu2b'); +} + +function aioseop_mrt_nap_menu(){ + echo "hi"; + +} + +function aioseop_mrt_nap_menu2a(){ + echo "here1"; +} + +function aioseop_mrt_nap_menu2b(){ + echo "here2"; +} + + +if( ($_POST['aiosp_enabled'] == null && $aioseop_options['aiosp_enabled']!='1') || $_POST['aiosp_enabled']=='0'){ +add_action( 'admin_notices', 'aioseop_activation_notice'); +} + + +// The following two functions copied entirely and modified slightly from Sarah G's Page Menu Editor, http://wordpress.org/extend/plugins/page-menu-editor/ +function aioseop_list_pages($content){ + $url = preg_replace(array('/\//', '/\./', '/\-/'), array('\/', '\.', '\-'), get_option('siteurl')); + $pattern = '/
  • ([^<]+)<\/a>/i'; + return preg_replace_callback($pattern, "aioseop_filter_callback", $content); + } + +function aioseop_filter_callback($matches) { + global $wpdb; + if ($matches[1] && !empty($matches[1])) $postID = $matches[1]; + if (empty($postID)) $postID = get_option("page_on_front"); + $title_attrib = stripslashes(get_post_meta($postID, '_aioseop_titleatr', true)); + $menulabel = stripslashes(get_post_meta($postID, '_aioseop_menulabel', true)); + if (empty($menulabel)) $menulabel = $matches[4]; + if (!empty($title_attrib)) : + $filtered = '
  • '.$menulabel.''; + else : + $filtered = '
  • '.$menulabel.''; + endif; + return $filtered; +} + +if (substr($aiosp->wp_version, 0, 3) < '2.5') { + add_action('dbx_post_advanced', array($aiosp, 'add_meta_tags_textinput')); + add_action('dbx_page_advanced', array($aiosp, 'add_meta_tags_textinput')); +} + + + + +function aiosp_meta_box_add() { + if ( function_exists('add_meta_box') ) { + add_meta_box('aiosp',__('All in One SEO Pack', 'all_in_one_seo_pack'),'aiosp_meta','post'); + add_meta_box('aiosp',__('All in One SEO Pack', 'all_in_one_seo_pack'),'aiosp_meta','page'); + } else { + add_action('dbx_post_advanced', array($aiosp, 'add_meta_tags_textinput')); + add_action('dbx_page_advanced', array($aiosp, 'add_meta_tags_textinput')); + } +} + +function aiosp_meta() { + + global $post; + + $post_id = $post; + if (is_object($post_id)){ + $post_id = $post_id->ID; + } + $keywords = htmlspecialchars(stripcslashes(get_post_meta($post_id, '_aioseop_keywords', true))); + $title = htmlspecialchars(stripcslashes(get_post_meta($post_id, '_aioseop_title', true))); + $description = htmlspecialchars(stripcslashes(get_post_meta($post_id, '_aioseop_description', true))); + $aiosp_meta = htmlspecialchars(stripcslashes(get_post_meta($post_id, '_aiosp_meta', true))); + $aiosp_disable = htmlspecialchars(stripcslashes(get_post_meta($post_id, '_aioseop_disable', true))); + $aiosp_titleatr = htmlspecialchars(stripcslashes(get_post_meta($post_id, '_aioseop_titleatr', true))); + $aiosp_menulabel = htmlspecialchars(stripcslashes(get_post_meta($post_id, '_aioseop_menulabel', true))); + ?> + + + + + + + + + + + + + + + + + + + + + +post_type=='page'){ ?> + + + + + + + + + + + + + + + + +
    +

    + + +
    + + + /> +
    + diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/all-in-one-seo-pack/all_in_one_seo_pack.pot --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/all-in-one-seo-pack/all_in_one_seo_pack.pot Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,293 @@ +msgid "" +msgstr "" +"Project-Id-Version: \n" +"POT-Creation-Date: \n" +"PO-Revision-Date: 2007-12-11 06:09+0200\n" +"Last-Translator: Baris Unver \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=iso-8859-1\n" +"Content-Transfer-Encoding: 8bit\n" + +msgid "All in One SEO Pack" +msgstr "" + +msgid "Title:" +msgstr "" + +msgid "Keywords (comma separated):" +msgstr "" + +msgid "Description:" +msgstr "" + +msgid " characters. Most search engines use a maximum of 160 chars for the description." +msgstr "" + +msgid "All in One SEO" +msgstr "" + +msgid "All in One SEO Options Updated." +msgstr "" + +msgid "All in One SEO Plugin Options" +msgstr "" + +msgid "This is version " +msgstr "" + +msgid "All in One SEO Plugin Release History" +msgstr "" + +msgid "FAQ" +msgstr "" + +msgid "All in One SEO Plugin Feedback" +msgstr "" + +msgid "Feedback" +msgstr "" + +msgid "All in One SEO Plugin Translations" +msgstr "" + +msgid "Translations" +msgstr "" + +msgid "Click for Help!" +msgstr "" + +msgid "Home Title:" +msgstr "" + +msgid "As the name implies, this will be the title of your homepage. This is independent of any other option. If not set, the default blog title will get used." +msgstr "" + +msgid "Home Description:" +msgstr "" + +msgid "The META description for your homepage. Independent of any other options, the default is no META description at all if this is not set." +msgstr "" + +msgid "Home Keywords (comma separated):" +msgstr "" + +msgid "A comma separated list of your most important keywords for your site that will be written as META keywords on your homepage. Don't stuff everything in here." +msgstr "" + +msgid "Rewrite Titles:" +msgstr "" + +msgid "Note that this is all about the title tag. This is what you see in your browser's window title bar. This is NOT visible on a page, only in the window title bar and of course in the source. If set, all page, post, category, search and archive page titles get rewritten. You can specify the format for most of them. For example: The default templates puts the title tag of posts like this: \"Blog Archive >> Blog Name >> Post Title\" (maybe I've overdone slightly). This is far from optimal. With the default post title format, Rewrite Title rewrites this to \"Post Title | Blog Name\". If you have manually defined a title (in one of the text fields for All in One SEO Plugin input) this will become the title of your post in the format string." +msgstr "" + +msgid "Post Title Format:" +msgstr "" + +msgid "The following macros are supported:" +msgstr "" + +msgid "%blog_title% - Your blog title" +msgstr "" + +msgid "%blog_description% - Your blog description" +msgstr "" + +msgid "%post_title% - The original title of the post" +msgstr "" + +msgid "%category_title% - The (main) category of the post" +msgstr "" + +msgid "%category% - Alias for %category_title%" +msgstr "" + +msgid "Page Title Format:" +msgstr "" + +msgid "%page_title% - The original title of the page" +msgstr "" + +msgid "Category Title Format:" +msgstr "" + +msgid "%category_title% - The original title of the category" +msgstr "" + +msgid "%category_description% - The description of the category" +msgstr "" + +msgid "Archive Title Format:" +msgstr "" + +msgid "%date% - The original archive title given by wordpress, e.g. \"2007\" or \"2007 August\"" +msgstr "" + +msgid "Tag Title Format:" +msgstr "" + +msgid "%tag% - The name of the tag" +msgstr "" + +msgid "Search Title Format:" +msgstr "" + +msgid "%search% - What was searched for" +msgstr "" + +msgid "Description Format:" +msgstr "" + +msgid "%description% - The original description as determined by the plugin, e.g. the excerpt if one is set or an auto-generated one if that option is set" +msgstr "" + +msgid "404 Title Format:" +msgstr "" + +msgid "%request_url% - The original URL path, like \"/url-that-does-not-exist/\"" +msgstr "" + +msgid "%request_words% - The URL path in human readable form, like \"Url That Does Not Exist\"" +msgstr "" + +msgid "Use Categories for META keywords:" +msgstr "" + +msgid "Check this if you want your categories for a given post used as the META keywords for this post (in addition to any keywords and tags you specify on the post edit page)." +msgstr "" + +msgid "Use noindex for Categories:" +msgstr "" + +msgid "Check this for excluding category pages from being crawled. Useful for avoiding duplicate content." +msgstr "" + +msgid "Use noindex for Archives:" +msgstr "" + +msgid "Check this for excluding archive pages from being crawled. Useful for avoiding duplicate content." +msgstr "" + +msgid "Use noindex for Tag Archives:" +msgstr "" + +msgid "Check this for excluding tag pages from being crawled. Useful for avoiding duplicate content." +msgstr "" + +msgid "Autogenerate Descriptions:" +msgstr "" + +msgid "Check this and your META descriptions will get autogenerated if there's no excerpt." +msgstr "" + +msgid "Update Options" +msgstr "" + +msgid "Additional Post Headers:" +msgstr "" + +msgid "Additional Page Headers:" +msgstr "" + +msgid "What you enter here will be copied verbatim to your header on post pages. You can enter whatever additional headers you want here, even references to stylesheets." +msgstr "" + +msgid "What you enter here will be copied verbatim to your header on pages. You can enter whatever additional headers you want here, even references to stylesheets." +msgstr "" + +msgid "%wp_title% - The original wordpress title, e.g. post_title for posts" +msgstr "" + +msgid "Upgraded to newest version. Please revisit the options page to make sure you see the newest version." +msgstr "" + +msgid "Upgrade failed" +msgstr "" + +msgid "(Remember: Backup early, backup often!)" +msgstr "" + +msgid "Please make sure that %s is writable." +msgstr "" + +msgid "One Click Upgrade" +msgstr "" + +msgid "Should I upgrade?" +msgstr "" + +msgid "Additional META:" +msgstr "" + +msgid "Could not download distribution (%s)" +msgstr "" + +msgid "Could not download distribution (%s): %s" +msgstr "" + +msgid "Could not open %s for writing" +msgstr "" + +msgid "Please make sure %s is writable" +msgstr "" + +msgid "Could not write to %s" +msgstr "" + +msgid "Disable on this page/post:" +msgstr "" + +msgid "Paged Format:" +msgstr "" + +msgid "This string gets appended/prepended to titles when they are for paged index pages (like home or archive pages)." +msgstr "" + +msgid "%page% - The page number" +msgstr "" + +msgid "Part %page%" +msgstr "" + +msgid "Log important events:" +msgstr "" + +msgid "Check this and SEO pack will create a log of important events (all_in_one_seo_pack.log) in its plugin directory which might help debugging it. Make sure this directory is writable." +msgstr "" + +msgid "%page_author_login% - This page's author' login" +msgstr "" + +msgid "%page_author_nicename% - This page's author' nicename" +msgstr "" + +msgid "%page_author_firstname% - This page's author' first name (capitalized)" +msgstr "" + +msgid "%page_author_lastname% - This page's author' last name (capitalized)" +msgstr "" + +msgid "%post_author_login% - This post's author' login" +msgstr "" + +msgid "%post_author_nicename% - This post's author' nicename" +msgstr "" + +msgid "%post_author_firstname% - This post's author' first name (capitalized)" +msgstr "" + +msgid "%post_author_lastname% - This post's author' last name (capitalized)" +msgstr "" + +msgid "Additional Home Headers:" +msgstr "" + +msgid "What you enter here will be copied verbatim to your header on the home page. You can enter whatever additional headers you want here, even references to stylesheets." +msgstr "" + +msgid "Click here for Support" +msgstr "" + +msgid "You can click on option titles to get help!" +msgstr "" + diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/all-in-one-seo-pack/images/amazon.jpg Binary file web/wp-content/plugins/all-in-one-seo-pack/images/amazon.jpg has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/all-in-one-seo-pack/images/donate.jpg Binary file web/wp-content/plugins/all-in-one-seo-pack/images/donate.jpg has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/all-in-one-seo-pack/images/error.png Binary file web/wp-content/plugins/all-in-one-seo-pack/images/error.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/all-in-one-seo-pack/images/globe.png Binary file web/wp-content/plugins/all-in-one-seo-pack/images/globe.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/all-in-one-seo-pack/images/iblogpro.jpg Binary file web/wp-content/plugins/all-in-one-seo-pack/images/iblogpro.jpg has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/all-in-one-seo-pack/images/pagelines.jpg Binary file web/wp-content/plugins/all-in-one-seo-pack/images/pagelines.jpg has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/all-in-one-seo-pack/images/stationpro.jpg Binary file web/wp-content/plugins/all-in-one-seo-pack/images/stationpro.jpg has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/all-in-one-seo-pack/images/twitter.jpg Binary file web/wp-content/plugins/all-in-one-seo-pack/images/twitter.jpg has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/all-in-one-seo-pack/images/twitter.png Binary file web/wp-content/plugins/all-in-one-seo-pack/images/twitter.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/all-in-one-seo-pack/images/whitehouse.jpg Binary file web/wp-content/plugins/all-in-one-seo-pack/images/whitehouse.jpg has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/all-in-one-seo-pack/pclzip.lib.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/all-in-one-seo-pack/pclzip.lib.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,5651 @@ +zipname = $p_zipname; + $this->zip_fd = 0; + $this->magic_quotes_status = -1; + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 1); + return; + } + + function create($p_filelist) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, 'PclZip::create', "filelist='$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(); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "$v_size arguments passed to the method"); + + // ----- 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)) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Variable list of options detected"); + + // ----- 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_CRYPT => 'optional' + )); + if ($v_result != 1) { + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0); + return 0; + } + } + + // ----- Look for 2 args + // Here we need to support the first historic synopsis of the + // method. + else { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Static synopsis"); + + // ----- 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"); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return 0; + } + } + } + + // ----- 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"); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0); + 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 { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Ignore an empty filename"); + } + } + } + + // ----- 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' + ); + 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) { + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0); + return 0; + } + } + + // ----- Expand the filelist (expand directories) + $v_result = $this->privFileDescrExpand($v_filedescr_list, $v_options); + if ($v_result != 1) { + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0); + return 0; + } + + // ----- Call the create fct + $v_result = $this->privCreate($v_filedescr_list, $p_result_list, $v_options); + if ($v_result != 1) { + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0); + return 0; + } + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $p_result_list); + 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) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, 'PclZip::add', "filelist='$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(); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "$v_size arguments passed to the method"); + + // ----- 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)) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Variable list of options detected"); + + // ----- 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_CRYPT => 'optional' + )); + if ($v_result != 1) { + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0); + return 0; + } + } + + // ----- Look for 2 args + // Here we need to support the first historic synopsis of the + // method. + else { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Static synopsis"); + + // ----- 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return 0; + } + } + } + + // ----- 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"); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0); + 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' + ); + 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) { + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0); + return 0; + } + } + + // ----- Expand the filelist (expand directories) + $v_result = $this->privFileDescrExpand($v_filedescr_list, $v_options); + if ($v_result != 1) { + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0); + return 0; + } + + // ----- Call the create fct + $v_result = $this->privAdd($v_filedescr_list, $p_result_list, $v_options); + if ($v_result != 1) { + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0); + return 0; + } + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $p_result_list); + 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 exists 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() + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, 'PclZip::listContent', ""); + $v_result=1; + + // ----- Reset the error handler + $this->privErrorReset(); + + // ----- Check archive + if (!$this->privCheckFormat()) { + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0); + return(0); + } + + // ----- Call the extracting fct + $p_list = array(); + if (($v_result = $this->privList($p_list)) != 1) + { + unset($p_list); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0, PclZip::errorInfo()); + return(0); + } + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $p_list); + 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() + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::extract", ""); + $v_result=1; + + // ----- Reset the error handler + $this->privErrorReset(); + + // ----- Check archive + if (!$this->privCheckFormat()) { + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0); + 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(); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "$v_size arguments passed to the method"); + + // ----- 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)) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Variable list of options"); + + // ----- 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' + )); + if ($v_result != 1) { + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0); + 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 { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Static synopsis"); + + // ----- 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0, PclZip::errorInfo()); + return 0; + } + } + } + + // ----- Trace + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "path='$v_path', remove_path='$v_remove_path', remove_all_path='".($v_remove_path?'true':'false')."'"); + + // ----- 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); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0, PclZip::errorInfo()); + return(0); + } + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $p_list); + 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) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::extractByIndex", "index='$p_index', ..."); + $v_result=1; + + // ----- Reset the error handler + $this->privErrorReset(); + + // ----- Check archive + if (!$this->privCheckFormat()) { + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0); + 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(); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "$v_size arguments passed to the method"); + + // ----- 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)) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Variable list of options"); + + // ----- 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' + )); + if ($v_result != 1) { + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0); + 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; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Option PCLZIP_OPT_EXTRACT_AS_STRING not set."); + } + else { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Option PCLZIP_OPT_EXTRACT_AS_STRING set."); + } + } + + // ----- Look for 2 args + // Here we need to support the first historic synopsis of the + // method. + else { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Static synopsis"); + + // ----- 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return 0; + } + } + } + + // ----- Trace + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "index='$p_index', path='$v_path', remove_path='$v_remove_path', remove_all_path='".($v_remove_path?'true':'false')."'"); + + // ----- 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) { + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0); + return 0; + } + $v_options[PCLZIP_OPT_BY_INDEX] = $v_options_trick[PCLZIP_OPT_BY_INDEX]; + + // ----- Call the extracting fct + if (($v_result = $this->privExtractByRule($p_list, $v_path, $v_remove_path, $v_remove_all_path, $v_options)) < 1) { + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0, PclZip::errorInfo()); + return(0); + } + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $p_list); + 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() + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::delete", ""); + $v_result=1; + + // ----- Reset the error handler + $this->privErrorReset(); + + // ----- Check archive + if (!$this->privCheckFormat()) { + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0); + return(0); + } + + // ----- Set default values + $v_options = array(); + + // ----- Look for variable options arguments + $v_size = func_num_args(); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "$v_size arguments passed to the method"); + + // ----- 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) { + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0); + 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); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0, PclZip::errorInfo()); + return(0); + } + + // ----- Magic quotes trick + $this->privSwapBackMagicQuotes(); + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_list); + return $v_list; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : deleteByIndex() + // Description : + // ***** Deprecated ***** + // delete(PCLZIP_OPT_BY_INDEX, $p_index) should be prefered. + // -------------------------------------------------------------------------------- + function deleteByIndex($p_index) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::deleteByIndex", "index='$p_index'"); + + $p_list = $this->delete(PCLZIP_OPT_BY_INDEX, $p_index); + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $p_list); + 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() + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::properties", ""); + + // ----- Reset the error handler + $this->privErrorReset(); + + // ----- Magic quotes trick + $this->privDisableMagicQuotes(); + + // ----- Check archive + if (!$this->privCheckFormat()) { + $this->privSwapBackMagicQuotes(); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0); + 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 + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary read mode"); + 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), 0); + return 0; + } + + // ----- Read the central directory informations + $v_central_dir = array(); + if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1) + { + $this->privSwapBackMagicQuotes(); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0); + 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_prop); + 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) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::duplicate", ""); + $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')) + { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "The parameter is valid PclZip object '".$p_archive->zipname."'"); + + // ----- 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)) + { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "The parameter is a filename '$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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::merge", ""); + $v_result = 1; + + // ----- Reset the error handler + $this->privErrorReset(); + + // ----- Check archive + if (!$this->privCheckFormat()) { + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0); + 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')) + { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "The parameter is valid PclZip object"); + + // ----- 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)) + { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "The parameter is a filename"); + + // ----- 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privCheckFormat", ""); + $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."'"); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, false, PclZip::errorInfo()); + 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."'"); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, false, PclZip::errorInfo()); + return(false); + } + + // ----- Check the magic code + // TBC + + // ----- Check the central header + // TBC + + // ----- Check each file header + // TBC + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privParseOptions", ""); + $v_result=1; + + // ----- Read the options + $i=0; + while ($i<$p_size) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Looking for table index $i, option = '".PclZipUtilOptionText($p_options_list[$i])."(".$p_options_list[$i].")'"); + + // ----- 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + + // ----- Get the value + $v_result_list[$p_options_list[$i]] = PclZipUtilTranslateWinPath($p_options_list[$i+1], false); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($p_options_list[$i])." = '".$v_result_list[$p_options_list[$i]]."'"); + $i++; + 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + 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); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($p_options_list[$i])." = '".$v_result_list[$p_options_list[$i]]."'"); + $i++; + } + else { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($p_options_list[$i])." set with an empty value is ignored."); + } + 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + ////--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($p_options_list[$i])." = '".$v_result_list[$p_options_list[$i]]."'"); + $i++; + break; + + // ----- Look for options that request an EREG or PREG expression + case PCLZIP_OPT_BY_EREG : + 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($p_options_list[$i])." = '".$v_result_list[$p_options_list[$i]]."'"); + $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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($p_options_list[$i])." = '".$v_result_list[$p_options_list[$i]]."'"); + $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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + + // ----- Get the value + $v_work_list = array(); + if (is_string($p_options_list[$i+1])) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Index value is a 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])) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Index value is an 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])) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Index value is an array"); + $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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + + // ----- Get the value + $v_result_list[$p_options_list[$i]] = $p_options_list[$i+1]; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($p_options_list[$i])." = '".$v_result_list[$p_options_list[$i]]."'"); + $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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + + // ----- Get the value + $v_function_name = $p_options_list[$i+1]; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "call-back ".PclZipUtilOptionText($p_options_list[$i])." = '".$v_function_name."'"); + + // ----- 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + 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') { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Detect a mandatory option : ".PclZipUtilOptionText($key)."(".$key.")"); + // ----- Look if present + if (!isset($v_result_list[$key])) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Missing mandatory parameter ".PclZipUtilOptionText($key)."(".$key.")"); + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + } + } + } + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privFileDescrParseAtt", ""); + $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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + 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)."'"); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + + $p_filedescr['filename'] = PclZipUtilPathReduction($v_value); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($v_key)." = '".$v_value."'"); + + if ($p_filedescr['filename'] == '') { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid empty filename for attribute '".PclZipUtilOptionText($v_key)."'"); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + 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)."'"); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + + $p_filedescr['new_short_name'] = PclZipUtilPathReduction($v_value); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($v_key)." = '".$v_value."'"); + + if ($p_filedescr['new_short_name'] == '') { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid empty short filename for attribute '".PclZipUtilOptionText($v_key)."'"); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + 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)."'"); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + + $p_filedescr['new_full_name'] = PclZipUtilPathReduction($v_value); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($v_key)." = '".$v_value."'"); + + if ($p_filedescr['new_full_name'] == '') { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid empty full filename for attribute '".PclZipUtilOptionText($v_key)."'"); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + break; + + default : + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, + "Unknown parameter '".$v_key."'"); + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + 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') { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Detect a mandatory option : ".PclZipUtilOptionText($key)."(".$key.")"); + // ----- Look if present + if (!isset($p_file_list[$key])) { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Missing mandatory parameter ".PclZipUtilOptionText($key)."(".$key.")"); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + } + } + } + + // end foreach + } + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privFileDescrExpand() + // Description : + // Parameters : + // Return Values : + // 1 on success. + // 0 on failure. + // -------------------------------------------------------------------------------- + function privFileDescrExpand(&$p_filedescr_list, &$p_options) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privFileDescrExpand", ""); + $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) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Looking for '".$v_item_handler."' in the directory"); + + // ----- 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']) { + $v_dirlist_descr[$v_dirlist_nb]['new_full_name'] = $v_descr['stored_filename'].'/'.$v_item_handler; + } + + $v_dirlist_nb++; + } + } + else { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Unable to open dir '".$v_descr['filename']."' in read mode. Skipped."); + // 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) { + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + // ----- Concat the resulting list + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Merging result list (size '".sizeof($v_result_list)."') with dirlist (size '".sizeof($v_dirlist_descr)."')"); + $v_result_list = array_merge($v_result_list, $v_dirlist_descr); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "merged result list is size '".sizeof($v_result_list)."'"); + } + else { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Nothing in this folder to expand."); + } + + // ----- Free local array + unset($v_dirlist_descr); + } + } + + // ----- Get the result list + $p_filedescr_list = $v_result_list; + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privCreate() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privCreate($p_filedescr_list, &$p_result_list, &$p_options) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privCreate", "list"); + $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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privAdd() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privAdd($p_filedescr_list, &$p_result_list, &$p_options) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privAdd", "list"); + $v_result=1; + $v_list_detail = array(); + + // ----- Look if the archive exists or is empty + if ((!is_file($this->zipname)) || (filesize($this->zipname) == 0)) + { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Archive does not exist, or is empty, create it."); + + // ----- Do a create + $v_result = $this->privCreate($p_filedescr_list, $p_result_list, $p_options); + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + // ----- Magic quotes trick + $this->privDisableMagicQuotes(); + + // ----- Open the zip file + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary read mode"); + if (($v_result=$this->privOpenFd('rb')) != 1) + { + // ----- Magic quotes trick + $this->privSwapBackMagicQuotes(); + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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(); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + // ----- Go to beginning of File + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position in file : ".ftell($this->zip_fd)."'"); + @rewind($this->zip_fd); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position in file : ".ftell($this->zip_fd)."'"); + + // ----- Creates a temporay file + $v_zip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.tmp'; + + // ----- Open the temporary file in write mode + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary read 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + 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); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read $v_read_size bytes"); + $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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + // ----- Store the offset of the central dir + $v_offset = @ftell($this->zip_fd); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "New offset of central dir : $v_offset"); + + // ----- 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); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read $v_read_size bytes"); + $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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privOpenFd() + // Description : + // Parameters : + // -------------------------------------------------------------------------------- + function privOpenFd($p_mode) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privOpenFd", 'mode='.$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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + + // ----- Open the zip file + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Open file in '.$p_mode.' mode'); + 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privCloseFd() + // Description : + // Parameters : + // -------------------------------------------------------------------------------- + function privCloseFd() + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privCloseFd", ""); + $v_result=1; + + if ($this->zip_fd != 0) + @fclose($this->zip_fd); + $this->zip_fd = 0; + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privAddList", "list"); + $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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privAddFileList", "filedescr_list"); + $v_result=1; + $v_header = array(); + + // ----- Recuperate the current number of elt in list + $v_nb = sizeof($p_result_list); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Before add, list have ".$v_nb." elements"); + + // ----- Loop on the files + for ($j=0; ($jprivAddFile($p_filedescr_list[$j], $v_header, + $p_options); + if ($v_result != 1) { + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + // ----- Store the file infos + $p_result_list[$v_nb++] = $v_header; + } + } + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "After add, list have ".$v_nb." elements"); + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privAddFile() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privAddFile($p_filedescr, &$p_header, &$p_options) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privAddFile", "filename='".$p_filedescr['filename']."'"); + $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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + + // ----- Look for a stored different filename + if (isset($p_filedescr['stored_filename'])) { + $v_stored_filename = $p_filedescr['stored_filename']; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, 'Stored filename is NOT the same "'.$v_stored_filename.'"'); + } + else { + $v_stored_filename = $p_filedescr['stored_filename']; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, 'Stored filename is the same'); + } + + // ----- Set the file properties + clearstatcache(); + $p_header['version'] = 20; + $p_header['version_extracted'] = 10; + $p_header['flag'] = 0; + $p_header['compression'] = 0; + $p_header['mtime'] = filemtime($p_filename); + $p_header['crc'] = 0; + $p_header['compressed_size'] = 0; + $p_header['size'] = filesize($p_filename); + $p_header['filename_len'] = strlen($p_filename); + $p_header['extra_len'] = 0; + $p_header['comment_len'] = 0; + $p_header['disk'] = 0; + $p_header['internal'] = 0; +// $p_header['external'] = (is_file($p_filename)?0xFE49FFE0:0x41FF0010); + $p_header['external'] = (is_file($p_filename)?0x00000000:0x00000010); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Header external extension '".sprintf("0x%X",$p_header['external'])."'"); + $p_header['offset'] = 0; + $p_header['filename'] = $p_filename; + $p_header['stored_filename'] = $v_stored_filename; + $p_header['extra'] = ''; + $p_header['comment'] = ''; + $p_header['status'] = 'ok'; + $p_header['index'] = -1; + + // ----- Look for pre-add callback + if (isset($p_options[PCLZIP_CB_PRE_ADD])) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "A pre-callback '".$p_options[PCLZIP_CB_PRE_ADD]."()') is defined for the extraction"); + + // ----- 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. + eval('$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']); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "New stored filename is '".$p_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 (is_file($p_filename)) + { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "'".$p_filename."' is a file"); + // ----- 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"); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + + if ($p_options[PCLZIP_OPT_NO_COMPRESSION]) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "File will not be compressed"); + // ----- Read the file content + $v_content_compressed = @fread($v_file, $p_header['size']); + + // ----- Calculate the CRC + $p_header['crc'] = @crc32($v_content_compressed); + + // ----- Set header parameters + $p_header['compressed_size'] = $p_header['size']; + $p_header['compression'] = 0; + } + else { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "File will be compressed"); + // ----- Read the file content + $v_content = @fread($v_file, $p_header['size']); + + // ----- Calculate the CRC + $p_header['crc'] = @crc32($v_content); + + // ----- Compress the file + $v_content_compressed = @gzdeflate($v_content); + + // ----- Set header parameters + $p_header['compressed_size'] = strlen($v_content_compressed); + $p_header['compression'] = 8; + } + + // ----- Look for encryption + /* + if ((isset($p_options[PCLZIP_OPT_CRYPT])) + && ($p_options[PCLZIP_OPT_CRYPT] != "")) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "File need to be crypted ...."); + + // Should be a random header + $v_header = 'xxxxxxxxxxxx'; + $v_content_compressed = PclZipUtilZipEncrypt($v_content_compressed, + $p_header['compressed_size'], + $v_header, + $p_header['crc'], + "test"); + + $p_header['compressed_size'] += 12; + $p_header['flag'] = 1; + + // ----- Add the header to the data + $v_content_compressed = $v_header.$v_content_compressed; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Size after header : ".strlen($v_content_compressed).""); + } + */ + + // ----- Call the header generation + if (($v_result = $this->privWriteFileHeader($p_header)) != 1) { + @fclose($v_file); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + // ----- Write the compressed (or not) content + @fwrite($this->zip_fd, + $v_content_compressed, $p_header['compressed_size']); + + // ----- Close the file + @fclose($v_file); + } + + // ----- Look for a directory + else { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "'".$p_filename."' is a 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) + { + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + } + } + + // ----- Look for post-add callback + if (isset($p_options[PCLZIP_CB_POST_ADD])) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "A post-callback '".$p_options[PCLZIP_CB_POST_ADD]."()') is defined for the extraction"); + + // ----- 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. + eval('$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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privCalculateStoredFilename", "filename='".$p_filedescr['filename']."'"); + $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'])) { + $v_stored_filename = $p_filedescr['new_full_name']; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Changing full name of '".$p_filename."' for '".$v_stored_filename."'"); + } + + // ----- Look for path and/or short name change + else { + + // ----- Look for short name change + 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']; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Changing short name of '".$p_filename."' for '".$v_stored_filename."'"); + } + 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); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Remove all path selected change '".$p_filename."' for '".$v_stored_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 = ""; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Path to remove is the current folder"); + } + else { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Remove path '$p_remove_dir' in file '$v_stored_filename'"); + $v_stored_filename = substr($v_stored_filename, + strlen($p_remove_dir)); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Result is '$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; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Add path '$p_add_dir' in file '$p_filename' = '$v_stored_filename'"); + } + } + + // ----- Filename (reduce the path of stored name) + $v_stored_filename = PclZipUtilPathReduction($v_stored_filename); + $p_filedescr['stored_filename'] = $v_stored_filename; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Stored filename will be '".$p_filedescr['stored_filename']."', strlen ".strlen($p_filedescr['stored_filename'])); + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privWriteFileHeader() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privWriteFileHeader(&$p_header) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privWriteFileHeader", 'file="'.$p_header['filename'].'", stored as "'.$p_header['stored_filename'].'"'); + $v_result=1; + + // ----- Store the offset position of the file + $p_header['offset'] = ftell($this->zip_fd); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, 'File offset of the header :'.$p_header['offset']); + + // ----- Transform UNIX mtime to DOS format mdate/mtime + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Date : \''.date("d/m/y H:i:s", $p_header['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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privWriteCentralFileHeader() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privWriteCentralFileHeader(&$p_header) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privWriteCentralFileHeader", 'file="'.$p_header['filename'].'", stored as "'.$p_header['stored_filename'].'"'); + $v_result=1; + + // TBC + //for(reset($p_header); $key = key($p_header); next($p_header)) { + // //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "header[$key] = ".$p_header[$key]); + //} + + // ----- Transform UNIX mtime to DOS format mdate/mtime + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Date : \''.date("d/m/y H:i:s", $p_header['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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privWriteCentralHeader() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privWriteCentralHeader($p_nb_entries, $p_size, $p_offset, $p_comment) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privWriteCentralHeader", 'nb_entries='.$p_nb_entries.', size='.$p_size.', offset='.$p_offset.', comment="'.$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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privList() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privList(&$p_list) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privList", "list"); + $v_result=1; + + // ----- Magic quotes trick + $this->privDisableMagicQuotes(); + + // ----- Open the zip file + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary read mode"); + 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + + // ----- Read the central directory informations + $v_central_dir = array(); + if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1) + { + $this->privSwapBackMagicQuotes(); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + // ----- Go to beginning of Central Dir + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Offset : ".$v_central_dir['offset']."'"); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Position in file : ".ftell($this->zip_fd)."'"); + @rewind($this->zip_fd); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Position in file : ".ftell($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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Position in file : ".ftell($this->zip_fd)."'"); + + // ----- 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(); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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. + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privConvertHeader2FileInfo($p_header, &$p_info) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privConvertHeader2FileInfo", "Filename='".$p_header['filename']."'"); + $v_result=1; + + // ----- Get the interesting attributes + $p_info['filename'] = $p_header['filename']; + $p_info['stored_filename'] = $p_header['stored_filename']; + $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']; + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privExtractByRule", "path='$p_path', remove_path='$p_remove_path', remove_all_path='".($p_remove_all_path?'true':'false')."'"); + $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) == "/") + { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Destination path [$p_path] ends by '/'"); + $p_path = substr($p_path, 0, strlen($p_path)-1); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Modified to [$p_path]"); + } + } + + // ----- 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 + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary read mode"); + if (($v_result = $this->privOpenFd('rb')) != 1) + { + $this->privSwapBackMagicQuotes(); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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(); + + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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++) + { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Read next file header entry : '$i'"); + + // ----- Read next Central dir entry + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Position before rewind : ".ftell($this->zip_fd)."'"); + @rewind($this->zip_fd); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Position after rewind : ".ftell($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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Position after fseek : ".ftell($this->zip_fd)."'"); + + // ----- Read the file header + $v_header = array(); + if (($v_result = $this->privReadCentralFileHeader($v_header)) != 1) + { + // ----- Close the zip file + $this->privCloseFd(); + $this->privSwapBackMagicQuotes(); + + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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)) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extract with rule 'ByName'"); + + // ----- 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])) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "The directory is in the file path"); + $v_extract = true; + } + } + // ----- Look for a filename + elseif ($v_header['stored_filename'] == $p_options[PCLZIP_OPT_BY_NAME][$j]) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "The file is the right one."); + $v_extract = true; + } + } + } + + // ----- Look for extract by ereg rule + else if ( (isset($p_options[PCLZIP_OPT_BY_EREG])) + && ($p_options[PCLZIP_OPT_BY_EREG] != "")) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extract by ereg '".$p_options[PCLZIP_OPT_BY_EREG]."'"); + + if (ereg($p_options[PCLZIP_OPT_BY_EREG], $v_header['stored_filename'])) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Filename match the regular expression"); + $v_extract = true; + } + } + + // ----- Look for extract by preg rule + else if ( (isset($p_options[PCLZIP_OPT_BY_PREG])) + && ($p_options[PCLZIP_OPT_BY_PREG] != "")) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extract with rule 'ByEreg'"); + + if (preg_match($p_options[PCLZIP_OPT_BY_PREG], $v_header['stored_filename'])) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Filename match the regular expression"); + $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)) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extract with rule 'ByIndex'"); + + // ----- 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'])) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Found as part of an index range"); + $v_extract = true; + } + if ($i>=$p_options[PCLZIP_OPT_BY_INDEX][$j]['end']) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Do not look this index range for next loop"); + $j_start = $j+1; + } + + if ($p_options[PCLZIP_OPT_BY_INDEX][$j]['start']>$i) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Index range is greater than index, stop loop"); + break; + } + } + } + + // ----- Look for no rule, which means extract all the archive + else { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extract with no rule (extract all)"); + $v_extract = true; + } + + // ----- Check compression method + if ( ($v_extract) + && ( ($v_header['compression'] != 8) + && ($v_header['compression'] != 0))) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Unsupported compression method (".$v_header['compression'].")"); + $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)) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "PCLZIP_OPT_STOP_ON_ERROR is selected, extraction will be stopped"); + + $this->privSwapBackMagicQuotes(); + + PclZip::privErrorLog(PCLZIP_ERR_UNSUPPORTED_COMPRESSION, + "Filename '".$v_header['stored_filename']."' is " + ."compressed by an unsupported compression " + ."method (".$v_header['compression'].") "); + + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + } + + // ----- Check encrypted files + if (($v_extract) && (($v_header['flag'] & 1) == 1)) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Unsupported file encryption"); + $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)) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "PCLZIP_OPT_STOP_ON_ERROR is selected, extraction will be stopped"); + + $this->privSwapBackMagicQuotes(); + + PclZip::privErrorLog(PCLZIP_ERR_UNSUPPORTED_ENCRYPTION, + "Unsupported encryption for " + ." filename '".$v_header['stored_filename'] + ."'"); + + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + } + + // ----- Look for real extraction + if (($v_extract) && ($v_header['status'] != 'ok')) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "No need for extract"); + $v_result = $this->privConvertHeader2FileInfo($v_header, + $p_file_list[$v_nb_extracted++]); + if ($v_result != 1) { + $this->privCloseFd(); + $this->privSwapBackMagicQuotes(); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + $v_extract = false; + } + + // ----- Look for real extraction + if ($v_extract) + { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extracting file '".$v_header['filename']."', index '$i'"); + + // ----- Go to the file position + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position before rewind : ".ftell($this->zip_fd)."'"); + @rewind($this->zip_fd); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position after rewind : ".ftell($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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position after fseek : ".ftell($this->zip_fd)."'"); + + // ----- Look for extraction as string + if ($p_options[PCLZIP_OPT_EXTRACT_AS_STRING]) { + + // ----- Extracting the file + $v_result1 = $this->privExtractFileAsString($v_header, $v_string); + if ($v_result1 < 1) { + $this->privCloseFd(); + $this->privSwapBackMagicQuotes(); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result1); + 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(); + + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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(); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result1); + 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(); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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(); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result1); + 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(); + + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + // ----- Look for user callback abort + if ($v_result1 == 2) { + break; + } + } + } + } + + // ----- Close the zip file + $this->privCloseFd(); + $this->privSwapBackMagicQuotes(); + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, 'PclZip::privExtractFile', "path='$p_path', remove_path='$p_remove_path', remove_all_path='".($p_remove_all_path?'true':'false')."'"); + $v_result=1; + + // ----- Read the file header + if (($v_result = $this->privReadFileHeader($v_header)) != 1) + { + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Found file '".$v_header['filename']."', size '".$v_header['size']."'"); + + // ----- 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) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "The entry is a folder : need to be filtered"); + + $p_entry['status'] = "filtered"; + + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "All path is removed"); + // ----- Get the basename of the path + $p_entry['filename'] = basename($p_entry['filename']); + } + + // ----- Look for path to remove + else if ($p_remove_path != "") + { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Look for some path to remove"); + if (PclZipUtilPathInclusion($p_remove_path, $p_entry['filename']) == 2) + { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "The folder is the same as the removed path '".$p_entry['filename']."'"); + + // ----- Change the file status + $p_entry['status'] = "filtered"; + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + $p_remove_path_size = strlen($p_remove_path); + if (substr($p_entry['filename'], 0, $p_remove_path_size) == $p_remove_path) + { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Found path '$p_remove_path' to remove in file '".$p_entry['filename']."'"); + + // ----- Remove the path + $p_entry['filename'] = substr($p_entry['filename'], $p_remove_path_size); + + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Resulting file is '".$p_entry['filename']."'"); + } + } + + // ----- 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])) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Check the extract directory restriction"); + $v_inclusion + = PclZipUtilPathInclusion($p_options[PCLZIP_OPT_EXTRACT_DIR_RESTRICTION], + $p_entry['filename']); + if ($v_inclusion == 0) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "PCLZIP_OPT_EXTRACT_DIR_RESTRICTION is selected, file is outside restriction"); + + PclZip::privErrorLog(PCLZIP_ERR_DIRECTORY_RESTRICTION, + "Filename '".$p_entry['filename']."' is " + ."outside PCLZIP_OPT_EXTRACT_DIR_RESTRICTION"); + + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + } + + // ----- Look for pre-extract callback + if (isset($p_options[PCLZIP_CB_PRE_EXTRACT])) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "A pre-callback '".$p_options[PCLZIP_CB_PRE_EXTRACT]."()') is defined for the extraction"); + + // ----- 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);'); + if ($v_result == 0) { + // ----- Change the file status + $p_entry['status'] = "skipped"; + $v_result = 1; + } + + // ----- Look for abort result + if ($v_result == 2) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "User callback abort the extraction"); + // ----- 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']; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "New filename is '".$p_entry['filename']."'"); + } + + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extracting file (with path) '".$p_entry['filename']."', size '$v_header[size]'"); + + // ----- 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'])) + { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "File '".$p_entry['filename']."' already exists"); + + // ----- Look if file is a directory + if (is_dir($p_entry['filename'])) + { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Existing file '".$p_entry['filename']."' is a directory"); + + // ----- 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)) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "PCLZIP_OPT_STOP_ON_ERROR is selected, extraction will be stopped"); + + PclZip::privErrorLog(PCLZIP_ERR_ALREADY_A_DIRECTORY, + "Filename '".$p_entry['filename']."' is " + ."already used by an existing directory"); + + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + } + // ----- Look if file is write protected + else if (!is_writeable($p_entry['filename'])) + { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Existing file '".$p_entry['filename']."' is write protected"); + + // ----- 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)) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "PCLZIP_OPT_STOP_ON_ERROR is selected, extraction will be stopped"); + + PclZip::privErrorLog(PCLZIP_ERR_WRITE_OPEN_FAIL, + "Filename '".$p_entry['filename']."' exists " + ."and is write protected"); + + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + } + + // ----- Look if the extracted file is older + else if (filemtime($p_entry['filename']) > $p_entry['mtime']) + { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Existing file '".$p_entry['filename']."' is newer (".date("l dS of F Y h:i:s A", filemtime($p_entry['filename'])).") than the extracted file (".date("l dS of F Y h:i:s A", $p_entry['mtime']).")"); + // ----- Change the file status + if ( (isset($p_options[PCLZIP_OPT_REPLACE_NEWER])) + && ($p_options[PCLZIP_OPT_REPLACE_NEWER]===true)) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "PCLZIP_OPT_REPLACE_NEWER is selected, file will be replaced"); + } + else { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "File will not be replaced"); + $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)) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "PCLZIP_OPT_STOP_ON_ERROR is selected, extraction will be stopped"); + + PclZip::privErrorLog(PCLZIP_ERR_WRITE_OPEN_FAIL, + "Newer version of '".$p_entry['filename']."' exists " + ."and option PCLZIP_OPT_REPLACE_NEWER is not selected"); + + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + } + } + else { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Existing file '".$p_entry['filename']."' is older than the extrated one - will be replaced by the extracted one (".date("l dS of F Y h:i:s A", filemtime($p_entry['filename'])).") than the extracted file (".date("l dS of F Y h:i:s A", $p_entry['mtime']).")"); + } + } + + // ----- 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) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Unable to create path for '".$p_entry['filename']."'"); + + // ----- Change the file status + $p_entry['status'] = "path_creation_fail"; + + // ----- Return + ////--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + //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) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extracting an un-compressed file"); + + // ----- Opening destination file + if (($v_dest_file = @fopen($p_entry['filename'], 'wb')) == 0) + { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Error while opening '".$p_entry['filename']."' in write binary mode"); + + // ----- Change the file status + $p_entry['status'] = "write_error"; + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Read '".$p_entry['size']."' bytes"); + + // ----- 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); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Read $v_read_size bytes"); + $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 { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extracting a compressed file (Compression method ".$p_entry['compression'].")"); + // ----- TBC + // Need to be finished + if (($p_entry['flag'] & 1) == 1) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "File is encrypted"); + /* + // ----- Read the encryption header + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Read 12 encryption header bytes"); + $v_encryption_header = @fread($this->zip_fd, 12); + + // ----- Read the encrypted & compressed file in a buffer + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Read '".($p_entry['compressed_size']-12)."' compressed & encrypted bytes"); + $v_buffer = @fread($this->zip_fd, $p_entry['compressed_size']-12); + + // ----- Decrypt the buffer + $this->privDecrypt($v_encryption_header, $v_buffer, + $p_entry['compressed_size']-12, $p_entry['crc']); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Buffer is '".$v_buffer."'"); + */ + } + else { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Read '".$p_entry['compressed_size']."' compressed bytes"); + // ----- 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) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Unable to inflate compressed file"); + + // ----- Change the file status + // TBC + $p_entry['status'] = "error"; + + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + // ----- Opening destination file + if (($v_dest_file = @fopen($p_entry['filename'], 'wb')) == 0) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Error while opening '".$p_entry['filename']."' in write binary mode"); + + // ----- Change the file status + $p_entry['status'] = "write_error"; + + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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])) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "chmod option activated '".$p_options[PCLZIP_OPT_SET_CHMOD]."'"); + + // ----- Change the mode of the file + @chmod($p_entry['filename'], $p_options[PCLZIP_OPT_SET_CHMOD]); + } + + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extraction done"); + } + } + + // ----- 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])) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "A post-callback '".$p_options[PCLZIP_CB_POST_EXTRACT]."()') is defined for the extraction"); + + // ----- 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_POST_EXTRACT].'(PCLZIP_CB_POST_EXTRACT, $v_local_header);'); + + // ----- Look for abort result + if ($v_result == 2) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "User callback abort the extraction"); + $v_result = PCLZIP_ERR_USER_ABORTED; + } + } + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privExtractFileInOutput() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privExtractFileInOutput(&$p_entry, &$p_options) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, 'PclZip::privExtractFileInOutput', ""); + $v_result=1; + + // ----- Read the file header + if (($v_result = $this->privReadFileHeader($v_header)) != 1) { + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Found file '".$v_header['filename']."', size '".$v_header['size']."'"); + + // ----- 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])) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "A pre-callback '".$p_options[PCLZIP_CB_PRE_EXTRACT]."()') is defined for the extraction"); + + // ----- 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);'); + if ($v_result == 0) { + // ----- Change the file status + $p_entry['status'] = "skipped"; + $v_result = 1; + } + + // ----- Look for abort result + if ($v_result == 2) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "User callback abort the extraction"); + // ----- 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']; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "New filename is '".$p_entry['filename']."'"); + } + + // ----- Trace + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extracting file (with path) '".$p_entry['filename']."', size '$v_header[size]'"); + + // ----- 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']) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extracting an un-compressed file"); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Reading '".$p_entry['size']."' bytes"); + + // ----- 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 { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extracting a compressed file"); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Reading '".$p_entry['size']."' bytes"); + + // ----- 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); + } + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extraction done"); + } + } + + // ----- 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])) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "A post-callback '".$p_options[PCLZIP_CB_POST_EXTRACT]."()') is defined for the extraction"); + + // ----- 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_POST_EXTRACT].'(PCLZIP_CB_POST_EXTRACT, $v_local_header);'); + + // ----- Look for abort result + if ($v_result == 2) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "User callback abort the extraction"); + $v_result = PCLZIP_ERR_USER_ABORTED; + } + } + + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privExtractFileAsString() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privExtractFileAsString(&$p_entry, &$p_string) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, 'PclZip::privExtractFileAsString', "p_entry['filename']='".$p_entry['filename']."'"); + $v_result=1; + + // ----- Read the file header + $v_header = array(); + if (($v_result = $this->privReadFileHeader($v_header)) != 1) + { + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Found file '".$v_header['filename']."', size '".$v_header['size']."'"); + + // ----- Check that the file header is coherent with $p_entry info + if ($this->privCheckFileHeaders($v_header, $p_entry) != 1) { + // TBC + } + + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extracting file in string (with path) '".$p_entry['filename']."', size '$v_header[size]'"); + + // ----- 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) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extracting an un-compressed file"); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Reading '".$p_entry['size']."' bytes"); + + // ----- Reading the file + $p_string = @fread($this->zip_fd, $p_entry['compressed_size']); + } + else { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extracting a compressed file (compression method '".$p_entry['compression']."')"); + + // ----- 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 + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extraction done"); + } + else { + // TBC : error : can not extract a folder in a string + } + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privReadFileHeader() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privReadFileHeader(&$p_header) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privReadFileHeader", ""); + $v_result=1; + + // ----- Read the 4 bytes signature + $v_binary_data = @fread($this->zip_fd, 4); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Binary data is : '".sprintf("%08x", $v_binary_data)."'"); + $v_data = unpack('Vid', $v_binary_data); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Binary signature is : '".sprintf("0x%08x", $v_data['id'])."'"); + + // ----- Check signature + if ($v_data['id'] != 0x04034b50) + { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Invalid File header"); + + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Invalid archive structure'); + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + 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"; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Invalid block size : ".strlen($v_binary_data)); + + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Invalid block size : ".strlen($v_binary_data)); + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + + // ----- Extract the values + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Header : '".$v_binary_data."'"); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Header (Hex) : '".bin2hex($v_binary_data)."'"); + $v_data = unpack('vversion/vflag/vcompression/vmtime/vmdate/Vcrc/Vcompressed_size/Vsize/vfilename_len/vextra_len', $v_binary_data); + + // ----- Get filename + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "File name length : ".$v_data['filename_len']); + $p_header['filename'] = fread($this->zip_fd, $v_data['filename_len']); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Filename : \''.$p_header['filename'].'\''); + + // ----- Get extra_fields + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extra field length : ".$v_data['extra_len']); + if ($v_data['extra_len'] != 0) { + $p_header['extra'] = fread($this->zip_fd, $v_data['extra_len']); + } + else { + $p_header['extra'] = ''; + } + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Extra field : \''.bin2hex($p_header['extra']).'\''); + + // ----- Extract properties + $p_header['version_extracted'] = $v_data['version']; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Version need to extract : ('.$p_header['version_extracted'].') \''.($p_header['version_extracted']/10).'.'.($p_header['version_extracted']%10).'\''); + $p_header['compression'] = $v_data['compression']; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Compression method : \''.$p_header['compression'].'\''); + $p_header['size'] = $v_data['size']; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Size : \''.$p_header['size'].'\''); + $p_header['compressed_size'] = $v_data['compressed_size']; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Compressed Size : \''.$p_header['compressed_size'].'\''); + $p_header['crc'] = $v_data['crc']; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'CRC : \''.sprintf("0x%X", $p_header['crc']).'\''); + $p_header['flag'] = $v_data['flag']; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Flag : \''.$p_header['flag'].'\''); + $p_header['filename_len'] = $v_data['filename_len']; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Filename_len : \''.$p_header['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); + + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Date : \''.date("d/m/y H:i:s", $p_header['mtime']).'\''); + } + else + { + $p_header['mtime'] = time(); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Date is actual : \''.date("d/m/y H:i:s", $p_header['mtime']).'\''); + } + + // TBC + //for(reset($v_data); $key = key($v_data); next($v_data)) { + // //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Attribut[$key] = ".$v_data[$key]); + //} + + // ----- Set the stored filename + $p_header['stored_filename'] = $p_header['filename']; + + // ----- Set the status field + $p_header['status'] = "ok"; + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privReadCentralFileHeader() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privReadCentralFileHeader(&$p_header) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privReadCentralFileHeader", ""); + $v_result=1; + + // ----- Read the 4 bytes signature + $v_binary_data = @fread($this->zip_fd, 4); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Binary data is : '".sprintf("%08x", $v_binary_data)."'"); + $v_data = unpack('Vid', $v_binary_data); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Binary signature is : '".sprintf("0x%08x", $v_data['id'])."'"); + + // ----- Check signature + if ($v_data['id'] != 0x02014b50) + { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Invalid Central Dir File signature"); + + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Invalid archive structure'); + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + 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"; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Invalid block size : ".strlen($v_binary_data)); + + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Invalid block size : ".strlen($v_binary_data)); + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + + // ----- Extract the values + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Header : '".$v_binary_data."'"); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Header (Hex) : '".bin2hex($v_binary_data)."'"); + $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 + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "File name length : ".$p_header['filename_len']); + if ($p_header['filename_len'] != 0) + $p_header['filename'] = fread($this->zip_fd, $p_header['filename_len']); + else + $p_header['filename'] = ''; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Filename : \''.$p_header['filename'].'\''); + + // ----- Get extra + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Extra length : ".$p_header['extra_len']); + if ($p_header['extra_len'] != 0) + $p_header['extra'] = fread($this->zip_fd, $p_header['extra_len']); + else + $p_header['extra'] = ''; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Extra : \''.$p_header['extra'].'\''); + + // ----- Get comment + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Comment length : ".$p_header['comment_len']); + if ($p_header['comment_len'] != 0) + $p_header['comment'] = fread($this->zip_fd, $p_header['comment_len']); + else + $p_header['comment'] = ''; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Comment : \''.$p_header['comment'].'\''); + + // ----- Extract properties + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Version : \''.($p_header['version']/10).'.'.($p_header['version']%10).'\''); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Version need to extract : \''.($p_header['version_extracted']/10).'.'.($p_header['version_extracted']%10).'\''); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Size : \''.$p_header['size'].'\''); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Compressed Size : \''.$p_header['compressed_size'].'\''); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'CRC : \''.sprintf("0x%X", $p_header['crc']).'\''); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Flag : \''.$p_header['flag'].'\''); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Offset : \''.$p_header['offset'].'\''); + + // ----- Recuperate date in UNIX format + 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); + + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Date : \''.date("d/m/y H:i:s", $p_header['mtime']).'\''); + } + else + { + $p_header['mtime'] = time(); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Date is actual : \''.date("d/m/y H:i:s", $p_header['mtime']).'\''); + } + + // ----- 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 + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Internal (Hex) : '".sprintf("Ox%04X", $p_header['internal'])."'"); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "External (Hex) : '".sprintf("Ox%04X", $p_header['external'])."' (".(($p_header['external']&0x00000010)==0x00000010?'is a folder':'is a file').')'); + if (substr($p_header['filename'], -1) == '/') { + //$p_header['external'] = 0x41FF0010; + $p_header['external'] = 0x00000010; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Force folder external : \''.sprintf("Ox%04X", $p_header['external']).'\''); + } + + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Header of filename : \''.$p_header['filename'].'\''); + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privCheckFileHeaders() + // Description : + // Parameters : + // Return Values : + // 1 on success, + // 0 on error; + // -------------------------------------------------------------------------------- + function privCheckFileHeaders(&$p_local_header, &$p_central_header) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privCheckFileHeaders", ""); + $v_result=1; + + // ----- Check the static values + // TBC + if ($p_local_header['filename'] != $p_central_header['filename']) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Bad check "filename" : TBC To Be Completed'); + } + if ($p_local_header['version_extracted'] != $p_central_header['version_extracted']) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Bad check "version_extracted" : TBC To Be Completed'); + } + if ($p_local_header['flag'] != $p_central_header['flag']) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Bad check "flag" : TBC To Be Completed'); + } + if ($p_local_header['compression'] != $p_central_header['compression']) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Bad check "compression" : TBC To Be Completed'); + } + if ($p_local_header['mtime'] != $p_central_header['mtime']) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Bad check "mtime" : TBC To Be Completed'); + } + if ($p_local_header['filename_len'] != $p_central_header['filename_len']) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Bad check "filename_len" : TBC To Be Completed'); + } + + // ----- Look for flag bit 3 + if (($p_local_header['flag'] & 8) == 8) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Purpose bit flag bit 3 set !'); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'File size, compression size and crc found in central header'); + $p_local_header['size'] = $p_central_header['size']; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Size : \''.$p_local_header['size'].'\''); + $p_local_header['compressed_size'] = $p_central_header['compressed_size']; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Compressed Size : \''.$p_local_header['compressed_size'].'\''); + $p_local_header['crc'] = $p_central_header['crc']; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'CRC : \''.sprintf("0x%X", $p_local_header['crc']).'\''); + } + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privReadEndCentralDir() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privReadEndCentralDir(&$p_central_dir) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privReadEndCentralDir", ""); + $v_result=1; + + // ----- Go to the end of the zip file + $v_size = filesize($this->zipname); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Size of the file :$v_size"); + @fseek($this->zip_fd, $v_size); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Position at end of zip file : \''.ftell($this->zip_fd).'\''); + 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + 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) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Look for central dir with no comment'); + @fseek($this->zip_fd, $v_size-22); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Position after min central position : \''.ftell($this->zip_fd).'\''); + 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + + // ----- Read for bytes + $v_binary_data = @fread($this->zip_fd, 4); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Binary data is : '".sprintf("%08x", $v_binary_data)."'"); + $v_data = @unpack('Vid', $v_binary_data); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Binary signature is : '".sprintf("0x%08x", $v_data['id'])."'"); + + // ----- Check signature + if ($v_data['id'] == 0x06054b50) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Found central dir at the default position."); + $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) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Start extended search of end central dir'); + $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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Position after max central position : \''.ftell($this->zip_fd).'\''); + + // ----- 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); + + // ----- Compare the bytes + if ($v_bytes == 0x504b0506) + { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Found End Central Dir signature at position : \''.ftell($this->zip_fd).'\''); + $v_pos++; + break; + } + + $v_pos++; + } + + // ----- Look if not found end of central dir + if ($v_pos == $v_size) + { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Unable to find End of Central Dir Record signature"); + + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Unable to find End of Central Dir Record signature"); + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + 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) + { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Invalid End of Central Dir Record size : ".strlen($v_binary_data)); + + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Invalid End of Central Dir Record size : ".strlen($v_binary_data)); + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + + // ----- Extract the values + ////--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Central Dir Record : '".$v_binary_data."'"); + ////--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Central Dir Record (Hex) : '".bin2hex($v_binary_data)."'"); + $v_data = unpack('vdisk/vdisk_start/vdisk_entries/ventries/Vsize/Voffset/vcomment_size', $v_binary_data); + + // ----- Check the global size + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Comment length : ".$v_data['comment_size']); + if (($v_pos + $v_data['comment_size'] + 18) != $v_size) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "The central dir is not at the end of the archive. Some trailing bytes exists after the archive."); + + // ----- 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + 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'] = ''; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Comment : \''.$p_central_dir['comment'].'\''); + + $p_central_dir['entries'] = $v_data['entries']; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Nb of entries : \''.$p_central_dir['entries'].'\''); + $p_central_dir['disk_entries'] = $v_data['disk_entries']; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Nb of entries for this disk : \''.$p_central_dir['disk_entries'].'\''); + $p_central_dir['offset'] = $v_data['offset']; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Offset of Central Dir : \''.$p_central_dir['offset'].'\''); + $p_central_dir['size'] = $v_data['size']; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Size of Central Dir : \''.$p_central_dir['size'].'\''); + $p_central_dir['disk'] = $v_data['disk']; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Disk number : \''.$p_central_dir['disk'].'\''); + $p_central_dir['disk_start'] = $v_data['disk_start']; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Start disk number : \''.$p_central_dir['disk_start'].'\''); + + // TBC + //for(reset($p_central_dir); $key = key($p_central_dir); next($p_central_dir)) { + // //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "central_dir[$key] = ".$p_central_dir[$key]); + //} + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privDeleteByRule() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privDeleteByRule(&$p_result_list, &$p_options) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privDeleteByRule", ""); + $v_result=1; + $v_list_detail = array(); + + // ----- Open the zip file + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary read mode"); + if (($v_result=$this->privOpenFd('rb')) != 1) + { + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + // ----- Read the central directory informations + $v_central_dir = array(); + if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1) + { + $this->privCloseFd(); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + // ----- Go to beginning of File + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position in file : ".ftell($this->zip_fd)."'"); + @rewind($this->zip_fd); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position in file : ".ftell($this->zip_fd)."'"); + + // ----- Scan all the files + // ----- Start at beginning of Central Dir + $v_pos_entry = $v_central_dir['offset']; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position before rewind : ".ftell($this->zip_fd)."'"); + @rewind($this->zip_fd); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position after rewind : ".ftell($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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position after fseek : ".ftell($this->zip_fd)."'"); + + // ----- Read each entry + $v_header_list = array(); + $j_start = 0; + for ($i=0, $v_nb_extracted=0; $i<$v_central_dir['entries']; $i++) + { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Read next file header entry (index '$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(); + + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Filename (index '$i') : '".$v_header_list[$v_nb_extracted]['stored_filename']."'"); + + // ----- 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)) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extract with rule 'ByName'"); + + // ----- 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])) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "The directory is in the file path"); + $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])) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "The entry is the searched directory"); + $v_found = true; + } + } + // ----- Look for a filename + elseif ($v_header_list[$v_nb_extracted]['stored_filename'] == $p_options[PCLZIP_OPT_BY_NAME][$j]) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "The file is the right one."); + $v_found = true; + } + } + } + + // ----- Look for extract by ereg rule + else if ( (isset($p_options[PCLZIP_OPT_BY_EREG])) + && ($p_options[PCLZIP_OPT_BY_EREG] != "")) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extract by ereg '".$p_options[PCLZIP_OPT_BY_EREG]."'"); + + if (ereg($p_options[PCLZIP_OPT_BY_EREG], $v_header_list[$v_nb_extracted]['stored_filename'])) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Filename match the regular expression"); + $v_found = true; + } + } + + // ----- Look for extract by preg rule + else if ( (isset($p_options[PCLZIP_OPT_BY_PREG])) + && ($p_options[PCLZIP_OPT_BY_PREG] != "")) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extract with rule 'ByEreg'"); + + if (preg_match($p_options[PCLZIP_OPT_BY_PREG], $v_header_list[$v_nb_extracted]['stored_filename'])) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Filename match the regular expression"); + $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)) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extract with rule 'ByIndex'"); + + // ----- 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'])) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Found as part of an index range"); + $v_found = true; + } + if ($i>=$p_options[PCLZIP_OPT_BY_INDEX][$j]['end']) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Do not look this index range for next loop"); + $j_start = $j+1; + } + + if ($p_options[PCLZIP_OPT_BY_INDEX][$j]['start']>$i) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Index range is greater than index, stop loop"); + break; + } + } + } + else { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "No argument mean remove all file"); + $v_found = true; + } + + // ----- Look for deletion + if ($v_found) + { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "File '".$v_header_list[$v_nb_extracted]['stored_filename']."', index '$i' need to be deleted"); + unset($v_header_list[$v_nb_extracted]); + } + else + { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "File '".$v_header_list[$v_nb_extracted]['stored_filename']."', index '$i' will not be deleted"); + $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 + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary write mode"); + if (($v_result = $v_temp_zip->privOpenFd('wb')) != 1) { + $this->privCloseFd(); + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + // ----- Look which file need to be kept + for ($i=0; $izip_fd)."'"); + @rewind($this->zip_fd); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position after rewind : ".ftell($this->zip_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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position after fseek : ".ftell($this->zip_fd)."'"); + + // ----- 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Offset for this file is '".$v_header_list[$i]['offset']."'"); + + // ----- 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + } + + // ----- Store the offset of the central dir + $v_offset = @ftell($v_temp_zip->zip_fd); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "New offset of central dir : $v_offset"); + + // ----- Re-Create the Central Dir files header + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Creates the new central directory"); + for ($i=0; $iprivWriteCentralFileHeader($v_header_list[$i])) != 1) { + $v_temp_zip->privCloseFd(); + $this->privCloseFd(); + @unlink($v_zip_temp_name); + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + // ----- Transform the header to a 'usable' info + $v_temp_zip->privConvertHeader2FileInfo($v_header_list[$i], $p_result_list[$i]); + } + + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Creates the central directory footer"); + + // ----- 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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) { + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + if (($v_result = $this->privWriteCentralHeader(0, 0, 0, '')) != 1) { + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + $this->privCloseFd(); + } + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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; + + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privDirCheck", "entry='$p_dir', is_dir='".($p_is_dir?"true":"false")."'"); + + // ----- Remove the final '/' + if (($p_is_dir) && (substr($p_dir, -1)=='/')) + { + $p_dir = substr($p_dir, 0, strlen($p_dir)-1); + } + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Looking for entry '$p_dir'"); + + // ----- Check the directory availability + if ((is_dir($p_dir)) || ($p_dir == "")) + { + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, "'$p_dir' is a directory"); + return 1; + } + + // ----- Extract parent directory + $p_parent_dir = dirname($p_dir); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Parent directory is '$p_parent_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) + { + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + } + } + + // ----- Create the directory + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Create directory '$p_dir'"); + if (!@mkdir($p_dir, 0777)) + { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_DIR_CREATE_FAIL, "Unable to create directory '$p_dir'"); + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + return PclZip::errorCode(); + } + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result, "Directory '$p_dir' created"); + 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) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privMerge", "archive='".$p_archive_to_add->zipname."'"); + $v_result=1; + + // ----- Look if the archive_to_add exists + if (!is_file($p_archive_to_add->zipname)) + { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Archive to add does not exist. End of merge."); + + // ----- Nothing to merge, so merge is a success + $v_result = 1; + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + // ----- Look if the archive exists + if (!is_file($this->zipname)) + { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Archive does not exist, duplicate the archive_to_add."); + + // ----- Do a duplicate + $v_result = $this->privDuplicate($p_archive_to_add->zipname); + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + // ----- Open the zip file + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary read mode"); + if (($v_result=$this->privOpenFd('rb')) != 1) + { + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + // ----- Read the central directory informations + $v_central_dir = array(); + if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1) + { + $this->privCloseFd(); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + // ----- Go to beginning of File + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position in zip : ".ftell($this->zip_fd)."'"); + @rewind($this->zip_fd); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position in zip : ".ftell($this->zip_fd)."'"); + + // ----- Open the archive_to_add file + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open archive_to_add in binary read mode"); + if (($v_result=$p_archive_to_add->privOpenFd('rb')) != 1) + { + $this->privCloseFd(); + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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(); + + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + // ----- Go to beginning of File + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position in archive_to_add : ".ftell($p_archive_to_add->zip_fd)."'"); + @rewind($p_archive_to_add->zip_fd); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position in archive_to_add : ".ftell($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 + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary read 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + 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); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read $v_read_size bytes"); + $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); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read $v_read_size bytes"); + $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); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "New offset of central dir : $v_offset"); + + // ----- 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); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read $v_read_size bytes"); + $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); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read $v_read_size bytes"); + $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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privDuplicate() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privDuplicate($p_archive_filename) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privDuplicate", "archive_filename='$p_archive_filename'"); + $v_result=1; + + // ----- Look if the $p_archive_filename exists + if (!is_file($p_archive_filename)) + { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Archive to duplicate does not exist. End of duplicate."); + + // ----- Nothing to duplicate, so duplicate is a success. + $v_result = 1; + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + // ----- Open the zip file + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary read mode"); + if (($v_result=$this->privOpenFd('wb')) != 1) + { + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + // ----- Open the temporary file in write mode + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary read 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo()); + 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); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Read $v_read_size bytes"); + $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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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 : privDecrypt() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privDecrypt($p_encryption_header, &$p_buffer, $p_size, $p_crc) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, 'PclZip::privDecrypt', "size=".$p_size.""); + $v_result=1; + + // ----- To Be Modified ;-) + $v_pwd = "test"; + + $p_buffer = PclZipUtilZipDecrypt($p_buffer, $p_size, $p_encryption_header, + $p_crc, $v_pwd); + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privDisableMagicQuotes() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privDisableMagicQuotes() + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, 'PclZip::privDisableMagicQuotes', ""); + $v_result=1; + + // ----- Look if function exists + if ( (!function_exists("get_magic_quotes_runtime")) + || (!function_exists("set_magic_quotes_runtime"))) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Functions *et_magic_quotes_runtime are not supported"); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + // ----- Look if already done + if ($this->magic_quotes_status != -1) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "magic_quote already disabled"); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + // ----- Get and memorize the magic_quote value + $this->magic_quotes_status = @get_magic_quotes_runtime(); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Current magic_quotes_runtime status is '".($this->magic_quotes_status==0?'disable':'enable')."'"); + + // ----- Disable magic_quotes + if ($this->magic_quotes_status == 1) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Disable magic_quotes"); + @set_magic_quotes_runtime(0); + } + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privSwapBackMagicQuotes() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privSwapBackMagicQuotes() + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, 'PclZip::privSwapBackMagicQuotes', ""); + $v_result=1; + + // ----- Look if function exists + if ( (!function_exists("get_magic_quotes_runtime")) + || (!function_exists("set_magic_quotes_runtime"))) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Functions *et_magic_quotes_runtime are not supported"); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + // ----- Look if something to do + if ($this->magic_quotes_status != -1) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "magic_quote not modified"); + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + + // ----- Swap back magic_quotes + if ($this->magic_quotes_status == 1) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Enable back magic_quotes"); + @set_magic_quotes_runtime($this->magic_quotes_status); + } + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + return $v_result; + } + // -------------------------------------------------------------------------------- + + } + // End of class + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : PclZipUtilPathReduction() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function PclZipUtilPathReduction($p_dir) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZipUtilPathReduction", "dir='$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; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Invalid path is unchanged"); + $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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZipUtilPathInclusion", "dir='$p_dir', path='$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); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Replacing ./ by full path in p_dir '".$p_dir."'"); + } + if ( ($p_path == '.') + || ((strlen($p_path) >=2) && (substr($p_path, 0, 2) == './'))) { + $p_path = PclZipUtilTranslateWinPath(getcwd(), FALSE).'/'.substr($p_path, 1); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Replacing ./ by full path in p_path '".$p_path."'"); + } + + // ----- 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)) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Working on dir($i)='".$v_list_dir[$i]."' and path($j)='".$v_list_path[$j]."'"); + + // ----- 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] != '')) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Items ($i,$j) are different"); + $v_result = 0; + } + + // ----- Next items + $i++; + $j++; + } + + // ----- Look if everything seems to be the same + if ($v_result) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Look for tie break"); + // ----- 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++; + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Looking on dir($i)='".($i < $v_list_dir_size?$v_list_dir[$i]:'')."' and path($j)='".($j < $v_list_path_size?$v_list_path[$j]:'')."'"); + + 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 + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZipUtilCopyBlock", "size=$p_size, mode=$p_mode"); + $v_result = 1; + + if ($p_mode==0) + { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Src offset before read :".(@ftell($p_src))); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Dest offset before write :".(@ftell($p_dest))); + while ($p_size != 0) + { + $v_read_size = ($p_size < PCLZIP_READ_BLOCK_SIZE ? $p_size : PCLZIP_READ_BLOCK_SIZE); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read $v_read_size bytes"); + $v_buffer = @fread($p_src, $v_read_size); + @fwrite($p_dest, $v_buffer, $v_read_size); + $p_size -= $v_read_size; + } + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Src offset after read :".(@ftell($p_src))); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Dest offset after write :".(@ftell($p_dest))); + } + else if ($p_mode==1) + { + while ($p_size != 0) + { + $v_read_size = ($p_size < PCLZIP_READ_BLOCK_SIZE ? $p_size : PCLZIP_READ_BLOCK_SIZE); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read $v_read_size bytes"); + $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); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read $v_read_size bytes"); + $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); + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read $v_read_size bytes"); + $v_buffer = @gzread($p_src, $v_read_size); + @gzwrite($p_dest, $v_buffer, $v_read_size); + $p_size -= $v_read_size; + } + } + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZipUtilRename", "source=$p_src, destination=$p_dest"); + $v_result = 1; + + // ----- Try to rename the files + if (!@rename($p_src, $p_dest)) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Fail to rename file, try copy+unlink"); + + // ----- Try to copy & unlink the src + if (!@copy($p_src, $p_dest)) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Fail to copy file"); + $v_result = 0; + } + else if (!@unlink($p_src)) { + //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Fail to unlink old filename"); + $v_result = 0; + } + } + + // ----- Return + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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) + { + //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZipUtilOptionText", "option='".$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)) { + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_key); + return $v_key; + } + } + + $v_result = 'Unknown'; + + //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result); + 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 000000000000 -r 03b0d1493584 web/wp-content/plugins/all-in-one-seo-pack/readme.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/all-in-one-seo-pack/readme.txt Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,70 @@ +=== All in One SEO Pack === +Contributors: hallsofmontezuma +Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=mrtorbert%40gmail%2ecom&item_name=All%20In%20One%20SEO%20Pack&item_number=Support%20Open%20Source&no_shipping=0&no_note=1&tax=0¤cy_code=USD&lc=US&bn=PP%2dDonationsBF&charset=UTF%2d8 +Tags: post,google,seo,meta,meta keywords,meta description,title,posts,plugin, search engine optimization +Requires at least: 1.5 +Tested up to: 2.8.6 +Stable tag: trunk + +Automatically optimizes your Wordpress blog for Search Engines (Search Engine Optimization). + +== Description == + +**Optimizes** your Wordpress blog for Search Engines (**Search Engine Optimization**). + +**[Pro Version](http://wpplugins.com/plugin/50/all-in-one-seo-pack-pro-version)** + +**If upgrading, please back up your database first!** + +[Support](http://semperfiwebdesign.com/forum/) | +[Change Log](http://semperfiwebdesign.com/documentation/all-in-one-seo-pack/all-in-one-seo-pack-release-history/) | +[FAQ](http://semperfiwebdesign.com/documentation/all-in-one-seo-pack/all-in-one-seo-faq/)| +[Translations](http://semperfiwebdesign.com/documentation/all-in-one-seo-pack/translations-for-all-in-one-seo-pack/) + +Some features: + +* Canonical URLs +* Fine tune Page Navigational Links +* Built-in API so other plugins/themes can access and extend functionality +* Provides SEO Integration for WP e-Commerce sites +* Nonce Security +* Support for CMS-style WordPress installations +* Automatically optimizes your **titles** for search engines +* Generates **META tags automatically** +* Avoids the typical duplicate content found on Wordpress blogs +* For beginners, you don't even have to look at the options, it works out-of-the-box. Just install. +* For advanced users, you can fine-tune everything +* You can override any title and set any META description and any META keywords you want. +* Backward-Compatibility with many other plugins, like Auto Meta, Ultimate Tag Warrior and others. + +Be sure to check out: +[WP Security Scan](http://wordpress.org/extend/plugins/wp-security-scan/) +and +[SMS Text Message](http://wordpress.org/extend/plugins/sms-text-message/) + +Follow me on Twitter to keep up with the latest updates [Michael +Torbert](http://twitter.com/michaeltorbert/) + +== Installation == + +You can use the built in installer and upgrader, or you can install the plugin +manually. + +1. You can either use the automatic plugin installer or your FTP program to upload it to your wp-content/plugins directory +the top-level folder. Don't just upload all the php files and put them in `/wp-content/plugins/`. +1. Activate the plugin through the 'Plugins' menu in WordPress +1. Visit your SEO options (*Options - All in One SEO*) for Wordpress 2.3.x, (*Settings - All in One SEO*) for Wordpress 2.5.x-2.8.x +1. Configure any options as desired, and then enable the plugin +1. That's it! + +If you have to upgrade manually simply repeat the installation steps and re-enable the plugin. + +**If upgrading, please back up your database first!** + +[Upgrade guide for upgrading from 1.5.x and below to +1.6.x](http://onefinejay.com/2009/07/11/a-guide-to-upgrading-to-aioseop-v1-6-1) + +== Frequently Asked Questions == + +Please read these **[FAQs](http://semperfiwebdesign.com/documentation/all-in-one-seo-pack/all-in-one-seo-faq/)** before requesting +**[My Plugin Support Forum](http://semperfiwebdesign.com/forum/)** diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/calendar/calendar.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/calendar/calendar.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,2712 @@ +get_results("UPDATE ".WP_CALENDAR_TABLE." SET event_author=".$wpdb->get_var("SELECT MIN(ID) FROM ".$wpdb->prefix."users",0,0)." WHERE event_author=".$id); +} + +// Function to add the calendar style into the header +function calendar_wp_head() +{ + global $wpdb; + + // If the calendar isn't installed or upgraded this won't work + check_calendar(); + + $styles = $wpdb->get_results("SELECT config_value FROM " . WP_CALENDAR_CONFIG_TABLE . " WHERE config_item='calendar_style'"); + if (!empty($styles)) + { + foreach ($styles as $style) + { + echo ' +'; + } + } +} + +// Function to deal with adding the calendar menus +function calendar_menu() +{ + global $wpdb; + + // We make use of the Calendar tables so we must have installed Calendar + check_calendar(); + + // Set admin as the only one who can use Calendar for security + $allowed_group = 'manage_options'; + + // Use the database to *potentially* override the above if allowed + $configs = $wpdb->get_results("SELECT config_value FROM " . WP_CALENDAR_CONFIG_TABLE . " WHERE config_item='can_manage_events'"); + if (!empty($configs)) + { + foreach ($configs as $config) + { + $allowed_group = $config->config_value; + } + } + + // Add the admin panel pages for Calendar. Use permissions pulled from above + if (function_exists('add_menu_page')) + { + add_menu_page(__('Calendar','calendar'), __('Calendar','calendar'), $allowed_group, 'calendar', 'edit_calendar'); + } + if (function_exists('add_submenu_page')) + { + add_submenu_page('calendar', __('Manage Calendar','calendar'), __('Manage Calendar','calendar'), $allowed_group, 'calendar', 'edit_calendar'); + add_action( "admin_head", 'calendar_add_javascript' ); + // Note only admin can change calendar options + add_submenu_page('calendar', __('Manage Categories','calendar'), __('Manage Categories','calendar'), 'manage_options', 'calendar-categories', 'manage_categories'); + add_submenu_page('calendar', __('Calendar Config','calendar'), __('Calendar Options','calendar'), 'manage_options', 'calendar-config', 'edit_calendar_config'); + } +} + +// Function to add the javascript to the admin header +function calendar_add_javascript() +{ + echo ' + +'; +} + +// Function to deal with loading the calendar into pages +function calendar_insert($content) +{ + if (preg_match('{CALENDAR}',$content)) + { + $cal_output = calendar(); + $content = str_replace('{CALENDAR}',$cal_output,$content); + } + return $content; +} + +// Function to check what version of Calendar is installed and install if needed +function check_calendar() +{ + // Checks to make sure Calendar is installed, if not it adds the default + // database tables and populates them with test data. If it is, then the + // version is checked through various means and if it is not up to date + // then it is upgraded. + + // Lets see if this is first run and create us a table if it is! + global $wpdb, $initial_style; + + // All this style info will go into the database on a new install + // This looks nice in the Kubrick theme + $initial_style = " .calnk a:hover { + background-position:0 0; + text-decoration:none; + color:#000000; + border-bottom:1px dotted #000000; + } + .calnk a:visited { + text-decoration:none; + color:#000000; + border-bottom:1px dotted #000000; + } + .calnk a { + text-decoration:none; + color:#000000; + border-bottom:1px dotted #000000; + } + .calnk a span { + display:none; + } + .calnk a:hover span { + color:#333333; + background:#F6F79B; + display:block; + position:absolute; + margin-top:1px; + padding:5px; + width:150px; + z-index:100; + } + .calendar-table { + border:none; + width:100%; + } + .calendar-heading { + height:25px; + text-align:center; + border:1px solid #D6DED5; + background-color:#E4EBE3; + } + .calendar-next { + width:25%; + text-align:center; + } + .calendar-prev { + width:25%; + text-align:center; + } + .calendar-month { + width:50%; + text-align:center; + font-weight:bold; + } + .normal-day-heading { + text-align:center; + width:25px; + height:25px; + font-size:0.8em; + border:1px solid #DFE6DE; + background-color:#EBF2EA; + } + .weekend-heading { + text-align:center; + width:25px; + height:25px; + font-size:0.8em; + border:1px solid #DFE6DE; + background-color:#EBF2EA; + color:#FF0000; + } + .day-with-date { + vertical-align:text-top; + text-align:left; + width:60px; + height:60px; + border:1px solid #DFE6DE; + } + .no-events { + + } + .day-without-date { + width:60px; + height:60px; + border:1px solid #E9F0E8; + } + span.weekend { + color:#FF0000; + } + .current-day { + vertical-align:text-top; + text-align:left; + width:60px; + height:60px; + border:1px solid #BFBFBF; + background-color:#E4EBE3; + } + span.event { + font-size:0.75em; + } + .kjo-link { + font-size:0.75em; + text-align:center; + } + .event-title { + text-align:center; + font-weight:bold; + font-size:1.2em; + } + .event-title-break { + width:96%; + margin-left:2%; + margin-right:2%; + margin-top:5px; + margin-bottom:5px; + text-align:center; + height:1px; + background-color:#000000; + } + .event-content-break { + width:96%; + margin-left:2%; + margin-right:2%; + margin-top:5px; + margin-bottom:5px; + text-align:center; + height:1px; + background-color:#000000; + } + .calendar-date-switcher { + height:25px; + text-align:center; + border:1px solid #D6DED5; + background-color:#E4EBE3; + } + .calendar-date-switcher form { + margin:0; + padding:0; + } + .calendar-date-switcher input { + border:1px #D6DED5 solid; + } + .calendar-date-switcher select { + border:1px #D6DED5 solid; + } + .cat-key { + width:100%; + margin-top:10px; + padding:5px; + border:1px solid #D6DED5; + }"; + + + // Assume this is not a new install until we prove otherwise + $new_install = false; + $vone_point_one_upgrade = false; + $vone_point_two_beta_upgrade = false; + + $wp_calendar_exists = false; + $wp_calendar_config_exists = false; + $wp_calendar_config_version_number_exists = false; + + // Determine the calendar version + $tables = $wpdb->get_results("show tables;"); + foreach ( $tables as $table ) + { + foreach ( $table as $value ) + { + if ( $value == WP_CALENDAR_TABLE ) + { + $wp_calendar_exists = true; + } + if ( $value == WP_CALENDAR_CONFIG_TABLE ) + { + $wp_calendar_config_exists = true; + + // We now try and find the calendar version number + // This will be a lot easier than finding other stuff + // in the future. + $version_number = $wpdb->get_var("SELECT config_value FROM " . WP_CALENDAR_CONFIG_TABLE . " WHERE config_item='calendar_version'"); + if ($version_number == "1.2") + { + $wp_calendar_config_version_number_exists = true; + } + } + } + } + + if ($wp_calendar_exists == false && $wp_calendar_config_exists == false) + { + $new_install = true; + } + else if ($wp_calendar_exists == true && $wp_calendar_config_exists == false) + { + $vone_point_one_upgrade = true; + } + else if ($wp_calendar_exists == true && $wp_calendar_config_exists == true && $wp_calendar_config_version_number_exists == false) + { + $vone_point_two_beta_upgrade = true; + } + + // Now we've determined what the current install is or isn't + // we perform operations according to the findings + if ( $new_install == true ) + { + $sql = "CREATE TABLE " . WP_CALENDAR_TABLE . " ( + event_id INT(11) NOT NULL AUTO_INCREMENT , + event_begin DATE NOT NULL , + event_end DATE NOT NULL , + event_title VARCHAR(30) NOT NULL , + event_desc TEXT NOT NULL , + event_time TIME , + event_recur CHAR(1) , + event_repeats INT(3) , + event_author BIGINT(20) UNSIGNED, + PRIMARY KEY (event_id) + )"; + $wpdb->get_results($sql); + $sql = "CREATE TABLE " . WP_CALENDAR_CONFIG_TABLE . " ( + config_item VARCHAR(30) NOT NULL , + config_value TEXT NOT NULL , + PRIMARY KEY (config_item) + )"; + $wpdb->get_results($sql); + $sql = "INSERT INTO ".WP_CALENDAR_CONFIG_TABLE." SET config_item='can_manage_events', config_value='edit_posts'"; + $wpdb->get_results($sql); + $sql = "INSERT INTO ".WP_CALENDAR_CONFIG_TABLE." SET config_item='calendar_style', config_value='".$initial_style."'"; + $wpdb->get_results($sql); + $sql = "INSERT INTO ".WP_CALENDAR_CONFIG_TABLE." SET config_item='display_author', config_value='false'"; + $wpdb->get_results($sql); + $sql = "INSERT INTO ".WP_CALENDAR_CONFIG_TABLE." SET config_item='display_jump', config_value='false'"; + $wpdb->get_results($sql); + $sql = "INSERT INTO ".WP_CALENDAR_CONFIG_TABLE." SET config_item='display_todays', config_value='true'"; + $wpdb->get_results($sql); + $sql = "INSERT INTO ".WP_CALENDAR_CONFIG_TABLE." SET config_item='display_upcoming', config_value='true'"; + $wpdb->get_results($sql); + $sql = "INSERT INTO ".WP_CALENDAR_CONFIG_TABLE." SET config_item='display_upcoming_days', config_value=7"; + $wpdb->get_results($sql); + + $sql = "INSERT INTO ".WP_CALENDAR_CONFIG_TABLE." SET config_item='calendar_version', config_value='1.2'"; + $wpdb->get_results($sql); + $sql = "INSERT INTO ".WP_CALENDAR_CONFIG_TABLE." SET config_item='enable_categories', config_value='false'"; + $wpdb->get_results($sql); + $sql = "ALTER TABLE ".WP_CALENDAR_TABLE." ADD COLUMN event_category BIGINT(20) UNSIGNED"; + $wpdb->get_results($sql); + $sql = "UPDATE " . WP_CALENDAR_TABLE . " SET event_category=1"; + $wpdb->get_results($sql); + $sql = "ALTER TABLE ".WP_CALENDAR_TABLE." ADD COLUMN event_link TEXT"; + $wpdb->get_results($sql); + $sql = "UPDATE " . WP_CALENDAR_TABLE . " SET event_link=''"; + $wpdb->get_results($sql); + $sql = "CREATE TABLE " . WP_CALENDAR_CATEGORIES_TABLE . " ( + category_id INT(11) NOT NULL AUTO_INCREMENT, + category_name VARCHAR(30) NOT NULL , + category_colour VARCHAR(30) NOT NULL , + PRIMARY KEY (category_id) + )"; + $wpdb->get_results($sql); + $sql = "INSERT INTO " . WP_CALENDAR_CATEGORIES_TABLE . " SET category_id=1, category_name='General', category_colour='#F6F79B'"; + $wpdb->get_results($sql); + } + else if ($vone_point_one_upgrade == true) + { + $sql = "ALTER TABLE ".WP_CALENDAR_TABLE." ADD COLUMN event_author BIGINT(20) UNSIGNED"; + $wpdb->get_results($sql); + $sql = "UPDATE ".WP_CALENDAR_TABLE." SET event_author=".$wpdb->get_var("SELECT MIN(ID) FROM ".$wpdb->prefix."users",0,0); + $wpdb->get_results($sql); + $sql = "ALTER TABLE ".WP_CALENDAR_TABLE." MODIFY event_desc TEXT NOT NULL"; + $wpdb->get_results($sql); + $sql = "CREATE TABLE " . WP_CALENDAR_CONFIG_TABLE . " ( + config_item VARCHAR(30) NOT NULL , + config_value TEXT NOT NULL , + PRIMARY KEY (config_item) + )"; + $wpdb->get_results($sql); + $sql = "INSERT INTO ".WP_CALENDAR_CONFIG_TABLE." SET config_item='can_manage_events', config_value='edit_posts'"; + $wpdb->get_results($sql); + $sql = "INSERT INTO ".WP_CALENDAR_CONFIG_TABLE." SET config_item='calendar_style', config_value='".$initial_style."'"; + $wpdb->get_results($sql); + $sql = "INSERT INTO ".WP_CALENDAR_CONFIG_TABLE." SET config_item='display_author', config_value='false'"; + $wpdb->get_results($sql); + $sql = "INSERT INTO ".WP_CALENDAR_CONFIG_TABLE." SET config_item='display_jump', config_value='false'"; + $wpdb->get_results($sql); + $sql = "INSERT INTO ".WP_CALENDAR_CONFIG_TABLE." SET config_item='display_todays', config_value='true'"; + $wpdb->get_results($sql); + $sql = "INSERT INTO ".WP_CALENDAR_CONFIG_TABLE." SET config_item='display_upcoming', config_value='true'"; + $wpdb->get_results($sql); + $sql = "INSERT INTO ".WP_CALENDAR_CONFIG_TABLE." SET config_item='display_upcoming_days', config_value=7"; + $wpdb->get_results($sql); + + $sql = "INSERT INTO ".WP_CALENDAR_CONFIG_TABLE." SET config_item='calendar_version', config_value='1.2'"; + $wpdb->get_results($sql); + $sql = "INSERT INTO ".WP_CALENDAR_CONFIG_TABLE." SET config_item='enable_categories', config_value='false'"; + $wpdb->get_results($sql); + $sql = "ALTER TABLE ".WP_CALENDAR_TABLE." ADD COLUMN event_category BIGINT(20) UNSIGNED"; + $wpdb->get_results($sql); + $sql = "UPDATE " . WP_CALENDAR_TABLE . " SET event_category=1"; + $wpdb->get_results($sql); + $sql = "ALTER TABLE ".WP_CALENDAR_TABLE." ADD COLUMN event_link TEXT"; + $wpdb->get_results($sql); + $sql = "UPDATE " . WP_CALENDAR_TABLE . " SET event_link=''"; + $wpdb->get_results($sql); + $sql = "CREATE TABLE " . WP_CALENDAR_CATEGORIES_TABLE . " ( + category_id INT(11) NOT NULL AUTO_INCREMENT, + category_name VARCHAR(30) NOT NULL , + category_colour VARCHAR(30) NOT NULL , + PRIMARY KEY (category_id) + )"; + $wpdb->get_results($sql); + $sql = "INSERT INTO " . WP_CALENDAR_CATEGORIES_TABLE . " SET category_id=1, category_name='General', category_colour='#F6F79B'"; + $wpdb->get_results($sql); + } + else if ($vone_point_two_beta_upgrade == true) + { + $sql = "INSERT INTO ".WP_CALENDAR_CONFIG_TABLE." SET config_item='calendar_version', config_value='1.2'"; + $wpdb->get_results($sql); + $sql = "INSERT INTO ".WP_CALENDAR_CONFIG_TABLE." SET config_item='enable_categories', config_value='false'"; + $wpdb->get_results($sql); + $sql = "ALTER TABLE ".WP_CALENDAR_TABLE." ADD COLUMN event_category BIGINT(20) UNSIGNED"; + $wpdb->get_results($sql); + $sql = "UPDATE " . WP_CALENDAR_TABLE . " SET event_category=1"; + $wpdb->get_results($sql); + $sql = "ALTER TABLE ".WP_CALENDAR_TABLE." ADD COLUMN event_link TEXT"; + $wpdb->get_results($sql); + $sql = "UPDATE " . WP_CALENDAR_TABLE . " SET event_link=''"; + $wpdb->get_results($sql); + $sql = "CREATE TABLE " . WP_CALENDAR_CATEGORIES_TABLE . " ( + category_id INT(11) NOT NULL AUTO_INCREMENT, + category_name VARCHAR(30) NOT NULL , + category_colour VARCHAR(30) NOT NULL , + PRIMARY KEY (category_id) + )"; + $wpdb->get_results($sql); + $sql = "INSERT INTO " . WP_CALENDAR_CATEGORIES_TABLE . " SET category_id=1, category_name='General', category_colour='#F6F79B'"; + $wpdb->get_results($sql); + $sql = "UPDATE " . WP_CALENDAR_CONFIG_TABLE . " SET config_value='".$initial_style."' WHERE config_item='calendar_style'"; + $wpdb->get_results($sql); + } +} + +// Used on the manage events admin page to display a list of events +function wp_events_display_list() +{ + global $wpdb; + + $events = $wpdb->get_results("SELECT * FROM " . WP_CALENDAR_TABLE . " ORDER BY event_begin DESC"); + + if ( !empty($events) ) + { + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + event_category; + $this_cat = $wpdb->get_row($sql); + ?> + + + + + + +
    event_id; ?>event_title; ?>event_desc; ?>event_begin; ?>event_end; ?> + event_recur == 'S') { echo __('Never','calendar'); } + else if ($event->event_recur == 'W') { echo __('Weekly','calendar'); } + else if ($event->event_recur == 'M') { echo __('Monthly','calendar'); } + else if ($event->event_recur == 'Y') { echo __('Yearly','calendar'); } + ?> + + event_recur == 'S') { echo __('N/A','calendar'); } + else if ($event->event_repeats == 0) { echo __('Forever','calendar'); } + else if ($event->event_repeats > 0) { echo $event->event_repeats.' '.__('Times','calendar'); } + ?> + event_author); echo $e->display_name; ?>category_name; ?>
    + +

    +

    ".__('Bad Monkey! No banana!','calendar')."

  • "; + return; + } + else + { + $data = $wpdb->get_results("SELECT * FROM " . WP_CALENDAR_TABLE . " WHERE event_id='" . mysql_escape_string($event_id) . "' LIMIT 1"); + if ( empty($data) ) + { + echo "

    ".__("An event with that ID couldn't be found",'calendar')."

    "; + return; + } + $data = $data[0]; + } + // Recover users entries if they exist; in other words if editing an event went wrong + if (!empty($users_entries)) + { + $data = $users_entries; + } + } + // Deal with possibility that form was submitted but not saved due to error - recover user's entries here + else + { + $data = $users_entries; + } + + ?> + +
    + + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + " /> +
    + " /> +
    event_time))); + } + } + else + { + echo date("H:i"); + } + ?>" /> +
    event_repeats != NULL) + { + $repeats = $data->event_repeats; + } + else + { + $repeats = 0; + } + + if ($data->event_recur == "S") + { + $selected_s = 'selected="selected"'; + } + else if ($data->event_recur == "W") + { + $selected_w = 'selected="selected"'; + } + else if ($data->event_recur == "M") + { + $selected_m = 'selected="selected"'; + } + else if ($data->event_recur == "Y") + { + $selected_y = 'selected="selected"'; + } + ?> + + +
    + +
    +
    +
     
    +
    + +
    + + + += strtotime($begin)) + { + $start_date_ok = 1; + $end_date_ok = 1; + } + else + { + ?> +

    :

    + +

    :

    + +

    :

    + +

    :

    + +

    :

    + +

    :

    + = 0) && ($recur == 'W' || $recur == 'M' || $recur == 'Y'))) + { + $recurring_ok = 1; + } + else + { + ?> +

    :

    + ID.", event_category=".mysql_escape_string($category).", event_link='".mysql_escape_string($linky)."'"; + + $wpdb->get_results($sql); + + $sql = "SELECT event_id FROM " . WP_CALENDAR_TABLE . " WHERE event_title='" . mysql_escape_string($title) . "'" + . " AND event_desc='" . mysql_escape_string($desc) . "' AND event_begin='" . mysql_escape_string($begin) . "' AND event_end='" . mysql_escape_string($end) . "' AND event_recur='" . mysql_escape_string($recur) . "' AND event_repeats='" . mysql_escape_string($repeats) . "' LIMIT 1"; + $result = $wpdb->get_results($sql); + + if ( empty($result) || empty($result[0]->event_id) ) + { + ?> +

    :

    + +

    + event_title = $title; + $users_entries->event_desc = $desc; + $users_entries->event_begin = $begin; + $users_entries->event_end = $end; + $users_entries->event_time = $time; + $users_entries->event_recur = $recur; + $users_entries->event_repeats = $repeats; + $users_entries->event_category = $category; + $users_entries->event_link = $linky; + } +} +// Permit saving of events that have been edited +elseif ( $action == 'edit_save' ) +{ + $title = !empty($_REQUEST['event_title']) ? $_REQUEST['event_title'] : ''; + $desc = !empty($_REQUEST['event_desc']) ? $_REQUEST['event_desc'] : ''; + $begin = !empty($_REQUEST['event_begin']) ? $_REQUEST['event_begin'] : ''; + $end = !empty($_REQUEST['event_end']) ? $_REQUEST['event_end'] : ''; + $time = !empty($_REQUEST['event_time']) ? $_REQUEST['event_time'] : ''; + $recur = !empty($_REQUEST['event_recur']) ? $_REQUEST['event_recur'] : ''; + $repeats = !empty($_REQUEST['event_repeats']) ? $_REQUEST['event_repeats'] : ''; + $category = !empty($_REQUEST['event_category']) ? $_REQUEST['event_category'] : ''; + $linky = !empty($_REQUEST['event_link']) ? $_REQUEST['event_link'] : ''; + + // Deal with the fools who have left magic quotes turned on + if ( ini_get('magic_quotes_gpc') ) + { + $title = stripslashes($title); + $desc = stripslashes($desc); + $begin = stripslashes($begin); + $end = stripslashes($end); + $time = stripslashes($time); + $recur = stripslashes($recur); + $repeats = stripslashes($repeats); + $category = stripslashes($category); + $linky = stripslashes($linky); + } + + if ( empty($event_id) ) + { + ?> +

    :

    + = strtotime($begin)) + { + $start_date_ok = 1; + $end_date_ok = 1; + } + else + { + ?> +

    :

    + +

    :

    + +

    :

    + +

    :

    + +

    :

    + +

    :

    + = 0) && ($recur == 'W' || $recur == 'M' || $recur == 'Y'))) + { + $recurring_ok = 1; + } + else + { + ?> +

    :

    + ID . ", event_category=".mysql_escape_string($category).", event_link='".mysql_escape_string($linky)."' WHERE event_id='" . mysql_escape_string($event_id) . "'"; + + $wpdb->get_results($sql); + + $sql = "SELECT event_id FROM " . WP_CALENDAR_TABLE . " WHERE event_title='" . mysql_escape_string($title) . "'" + . " AND event_desc='" . mysql_escape_string($desc) . "' AND event_begin='" . mysql_escape_string($begin) . "' AND event_end='" . mysql_escape_string($end) . "' AND event_recur='" . mysql_escape_string($recur) . "' AND event_repeats='" . mysql_escape_string($repeats) . "' LIMIT 1"; + $result = $wpdb->get_results($sql); + + if ( empty($result) || empty($result[0]->event_id) ) + { + ?> +

    :

    + +

    + event_title = $title; + $users_entries->event_desc = $desc; + $users_entries->event_begin = $begin; + $users_entries->event_end = $end; + $users_entries->event_time = $time; + $users_entries->event_recur = $recur; + $users_entries->event_repeats = $repeats; + $users_entries->event_category = $category; + $users_entries->event_link = $linky; + $error_with_saving = 1; + } + } +} +// Deal with deleting an event from the database +elseif ( $action == 'delete' ) +{ + if ( empty($event_id) ) + { + ?> +

    :

    + get_results($sql); + + $sql = "SELECT event_id FROM " . WP_CALENDAR_TABLE . " WHERE event_id='" . mysql_escape_string($event_id) . "'"; + $result = $wpdb->get_results($sql); + + if ( empty($result) || empty($result[0]->event_id) ) + { + ?> +

    + +

    :

    + + +
    + +

    +

    ".__("You must provide an event id in order to edit it",'calendar')."

    "; + } + else + { + wp_events_edit_form('edit_save', $event_id); + } + } + else + { + ?> +

    + + +

    + +
    + +get_results("UPDATE " . WP_CALENDAR_CONFIG_TABLE . " SET config_value = '".$new_perms."' WHERE config_item='can_manage_events'"); + $wpdb->get_results("UPDATE " . WP_CALENDAR_CONFIG_TABLE . " SET config_value = '".$calendar_style."' WHERE config_item='calendar_style'"); + $wpdb->get_results("UPDATE " . WP_CALENDAR_CONFIG_TABLE . " SET config_value = '".$disp_author."' WHERE config_item='display_author'"); + $wpdb->get_results("UPDATE " . WP_CALENDAR_CONFIG_TABLE . " SET config_value = '".$disp_jump."' WHERE config_item='display_jump'"); + $wpdb->get_results("UPDATE " . WP_CALENDAR_CONFIG_TABLE . " SET config_value = '".$disp_todays."' WHERE config_item='display_todays'"); + $wpdb->get_results("UPDATE " . WP_CALENDAR_CONFIG_TABLE . " SET config_value = '".$disp_upcoming."' WHERE config_item='display_upcoming'"); + $wpdb->get_results("UPDATE " . WP_CALENDAR_CONFIG_TABLE . " SET config_value = '".$display_upcoming_days."' WHERE config_item='display_upcoming_days'"); + $wpdb->get_results("UPDATE " . WP_CALENDAR_CONFIG_TABLE . " SET config_value = '".$enable_categories."' WHERE config_item='enable_categories'"); + + // Check to see if we are replacing the original style + if (mysql_escape_string($_POST['reset_styles']) == 'on') + { + $wpdb->get_results("UPDATE " . WP_CALENDAR_CONFIG_TABLE . " SET config_value = '".$initial_style."' WHERE config_item='calendar_style'"); + } + + echo "

    ".__('Settings saved','calendar').".

    "; + } + + // Pull the values out of the database that we need for the form + $configs = $wpdb->get_results("SELECT config_value FROM " . WP_CALENDAR_CONFIG_TABLE . " WHERE config_item='can_manage_events'"); + if (!empty($configs)) + { + foreach ($configs as $config) + { + $allowed_group = $config->config_value; + } + } + + $configs = $wpdb->get_results("SELECT config_value FROM " . WP_CALENDAR_CONFIG_TABLE . " WHERE config_item='calendar_style'"); + if (!empty($configs)) + { + foreach ($configs as $config) + { + $calendar_style = $config->config_value; + } + } + $configs = $wpdb->get_results("SELECT config_value FROM " . WP_CALENDAR_CONFIG_TABLE . " WHERE config_item='display_author'"); + if (!empty($configs)) + { + foreach ($configs as $config) + { + if ($config->config_value == 'true') + { + $yes_disp_author = 'selected="selected"'; + } + else + { + $no_disp_author = 'selected="selected"'; + } + } + } + $configs = $wpdb->get_results("SELECT config_value FROM " . WP_CALENDAR_CONFIG_TABLE . " WHERE config_item='display_jump'"); + if (!empty($configs)) + { + foreach ($configs as $config) + { + if ($config->config_value == 'true') + { + $yes_disp_jump = 'selected="selected"'; + } + else + { + $no_disp_jump = 'selected="selected"'; + } + } + } + $configs = $wpdb->get_results("SELECT config_value FROM " . WP_CALENDAR_CONFIG_TABLE . " WHERE config_item='display_todays'"); + if (!empty($configs)) + { + foreach ($configs as $config) + { + if ($config->config_value == 'true') + { + $yes_disp_todays = 'selected="selected"'; + } + else + { + $no_disp_todays = 'selected="selected"'; + } + } + } + $configs = $wpdb->get_results("SELECT config_value FROM " . WP_CALENDAR_CONFIG_TABLE . " WHERE config_item='display_upcoming'"); + if (!empty($configs)) + { + foreach ($configs as $config) + { + if ($config->config_value == 'true') + { + $yes_disp_upcoming = 'selected="selected"'; + } + else + { + $no_disp_upcoming = 'selected="selected"'; + } + } + } + $configs = $wpdb->get_results("SELECT config_value FROM " . WP_CALENDAR_CONFIG_TABLE . " WHERE config_item='display_upcoming_days'"); + if (!empty($configs)) + { + foreach ($configs as $config) + { + $upcoming_days = $config->config_value; + } + } + $configs = $wpdb->get_results("SELECT config_value FROM " . WP_CALENDAR_CONFIG_TABLE . " WHERE config_item='enable_categories'"); + if (!empty($configs)) + { + foreach ($configs as $config) + { + if ($config->config_value == 'true') + { + $yes_enable_categories = 'selected="selected"'; + } + else + { + $no_enable_categories = 'selected="selected"'; + } + } + } + if ($allowed_group == 'read') { $subscriber_selected='selected="selected"';} + else if ($allowed_group == 'edit_posts') { $contributor_selected='selected="selected"';} + else if ($allowed_group == 'publish_posts') { $author_selected='selected="selected"';} + else if ($allowed_group == 'moderate_comments') { $editor_selected='selected="selected"';} + else if ($allowed_group == 'manage_options') { $admin_selected='selected="selected"';} + + // Now we render the form + ?> + + +
    +

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

    +
    +
    +
     
    +
    + +
    +
    + + +get_results($sql); + echo "

    ".__('Category added successfully','calendar')."

    "; + } + else if (isset($_GET['mode']) && isset($_GET['category_id']) && $_GET['mode'] == 'delete') + { + $sql = "DELETE FROM " . WP_CALENDAR_CATEGORIES_TABLE . " WHERE category_id=".mysql_escape_string($_GET['category_id']); + $wpdb->get_results($sql); + $sql = "UPDATE " . WP_CALENDAR_TABLE . " SET event_category=1 WHERE event_category=".mysql_escape_string($_GET['category_id']); + $wpdb->get_results($sql); + echo "

    ".__('Category deleted successfully','calendar')."

    "; + } + else if (isset($_GET['mode']) && isset($_GET['category_id']) && $_GET['mode'] == 'edit' && !isset($_POST['mode'])) + { + $sql = "SELECT * FROM " . WP_CALENDAR_CATEGORIES_TABLE . " WHERE category_id=".mysql_escape_string($_GET['category_id']); + $cur_cat = $wpdb->get_row($sql); + ?> +
    +

    +
    + + +
    +
    + + + + + + + + + +
    :
    :
    +
    +
     
    +
    + +
    +
    + get_results($sql); + echo "

    ".__('Category edited successfully','calendar')."

    "; + } + + if ($_GET['mode'] != 'edit' || $_POST['mode'] == 'edit') + { +?> + +
    +

    +
    + + +
    +
    + + + + + + + + + +
    :
    :
    +
    +
     
    +
    + +
    +

    +get_results("SELECT * FROM " . WP_CALENDAR_CATEGORIES_TABLE . " ORDER BY category_id ASC"); + + if ( !empty($categories) ) + { + ?> + + + + + + + + + + + + + + + + + category_id == 1) + { + echo ''; + } + else + { + ?> + + + + +
    category_id; ?>category_name; ?> '.__('N/A','calendar').'
    + '.__('There are no categories in the database - something has gone wrong!','calendar').'

    '; + } + +?> +
    + +'jan','feb','mar','apr','may','jun','jul','aug','sept','oct','nov','dec'); + $next_year = $cur_year + 1; + + if ($cur_month == 12) + { + return ''.__('Next','calendar').' »'; + } + else + { + $next_month = $cur_month + 1; + $month = $mod_rewrite_months[$next_month]; + return ''.__('Next','calendar').' »'; + } +} + +// Configure the "Previous" link in the calendar +function prev_link($cur_year,$cur_month) +{ + $mod_rewrite_months = array(1=>'jan','feb','mar','apr','may','jun','jul','aug','sept','oct','nov','dec'); + $last_year = $cur_year - 1; + + if ($cur_month == 1) + { + return '« '.__('Prev','calendar').''; + } + else + { + $next_month = $cur_month - 1; + $month = $mod_rewrite_months[$next_month]; + return '« '.__('Prev','calendar').''; + } +} + +// Print upcoming events +function upcoming_events() +{ + global $wpdb; + + // This function cannot be called unless calendar is up to date + check_calendar(); + + // Find out if we should be displaying upcoming events + $display = $wpdb->get_var("SELECT config_value FROM ".WP_CALENDAR_CONFIG_TABLE." WHERE config_item='display_upcoming'",0,0); + + if ($display == 'true') + { + // Get number of days we should go into the future + $future_days = $wpdb->get_var("SELECT config_value FROM ".WP_CALENDAR_CONFIG_TABLE." WHERE config_item='display_upcoming_days'",0,0); + $day_count = 1; + + while ($day_count < $future_days+1) + { + list($y,$m,$d) = split("-",date("Y-m-d",mktime($day_count*24,0,0,date("m"),date("d"),date("Y")))); + $events = grab_events($y,$m,$d); + usort($events, "time_cmp"); + if (count($events) != 0) { + $output .= '
  • '.date(get_option('date_format'),mktime($day_count*24,0,0,date("m"),date("d"),date("Y"))).'
      '; + } + foreach($events as $event) + { + if ($event->event_time == '00:00:00') { + $time_string = ' '.__('all day','calendar'); + } + else { + $time_string = ' '.__('at','calendar').' '.date(get_option('time_format'), strtotime($event->event_time)); + } + $output .= '
    • '.draw_widget_event($event).$time_string.'
    • '; + } + if (count($events) != 0) { + $output .= '
  • '; + } + $day_count = $day_count+1; + } + + if ($output != '') + { + $visual = '
  • '.__('Upcoming Events','calendar').'

      '; + $visual .= $output; + $visual .= '
  • '; + return $visual; + } + } +} + +// Print todays events +function todays_events() +{ + global $wpdb; + + // This function cannot be called unless calendar is up to date + check_calendar(); + + // Find out if we should be displaying todays events + $display = $wpdb->get_var("SELECT config_value FROM ".WP_CALENDAR_CONFIG_TABLE." WHERE config_item='display_todays'",0,0); + + if ($display == 'true') + { + $output = '
  • '.__('Today\'s Events','calendar').'

      '; + $events = grab_events(date("Y"),date("m"),date("d")); + usort($events, "time_cmp"); + foreach($events as $event) + { + if ($event->event_time == '00:00:00') { + $time_string = ' '.__('all day','calendar'); + } + else { + $time_string = ' '.__('at','calendar').' '.date(get_option('time_format'), strtotime($event->event_time)); + } + $output .= '
    • '.draw_widget_event($event).$time_string.'
    • '; + } + $output .= '
  • '; + if (count($events) != 0) + { + return $output; + } + } +} + +// Function to compare time in event objects +function time_cmp($a, $b) +{ + if ($a->event_time == $b->event_time) { + return 0; + } + return ($a->event_time < $b->event_time) ? -1 : 1; +} + +// Used to draw multiple events +function draw_events($events) +{ + // We need to sort arrays of objects by time + usort($events, "time_cmp"); + + // Now process the events + foreach($events as $event) + { + $output .= draw_event($event); + } + return $output; +} + +// Widget todays events +function todays_events_widget() { + global $wpdb; + + // This function cannot be called unless calendar is up to date + check_calendar(); + + // Find out if we should be displaying todays events + $display = $wpdb->get_var("SELECT config_value FROM ".WP_CALENDAR_CONFIG_TABLE." WHERE config_item='display_todays'",0,0); + + if ($display == 'true') + { + $output = '
      '; + $events = grab_events(date("Y"),date("m"),date("d")); + usort($events, "time_cmp"); + foreach($events as $event) + { + if ($event->event_time == '00:00:00') { + $time_string = ' '.__('all day','calendar'); + } + else { + $time_string = ' '.__('at','calendar').' '.date(get_option('time_format'), strtotime($event->event_time)); + } + $output .= '
    • '.draw_widget_event($event).$time_string.'
    • '; + } + $output .= '
    '; + if (count($events) != 0) + { + return $output; + } + } +} + +// Widget upcoming events +function upcoming_events_widget() { + global $wpdb; + + // This function cannot be called unless calendar is up to date + check_calendar(); + + // Find out if we should be displaying upcoming events + $display = $wpdb->get_var("SELECT config_value FROM ".WP_CALENDAR_CONFIG_TABLE." WHERE config_item='display_upcoming'",0,0); + + if ($display == 'true') + { + // Get number of days we should go into the future + $future_days = $wpdb->get_var("SELECT config_value FROM ".WP_CALENDAR_CONFIG_TABLE." WHERE config_item='display_upcoming_days'",0,0); + $day_count = 1; + + while ($day_count < $future_days+1) + { + list($y,$m,$d) = split("-",date("Y-m-d",mktime($day_count*24,0,0,date("m"),date("d"),date("Y")))); + $events = grab_events($y,$m,$d); + usort($events, "time_cmp"); + if (count($events) != 0) { + $output .= '
  • '.date(get_option('date_format'),mktime($day_count*24,0,0,date("m"),date("d"),date("Y"))).'
      '; + } + foreach($events as $event) + { + if ($event->event_time == '00:00:00') { + $time_string = ' '.__('all day','calendar'); + } + else { + $time_string = ' '.__('at','calendar').' '.date(get_option('time_format'), strtotime($event->event_time)); + } + $output .= '
    • '.draw_widget_event($event).$time_string.'
    • '; + } + if (count($events) != 0) { + $output .= '
  • '; + } + $day_count = $day_count+1; + } + + if ($output != '') + { + $visual = '
      '; + $visual .= $output; + $visual .= '
    '; + return $visual; + } + } +} + +// The widget to show todays events in the sidebar +function widget_init_calendar_today() { + // Check for required functions + if (!function_exists('register_sidebar_widget')) + return; + + function widget_calendar_today($args) { + extract($args); + $the_title = get_option('calendar_today_widget_title'); + $widget_title = empty($the_title) ? __('Today\'s Events','calendar') : $the_title; + $the_events = todays_events_widget(); + if ($the_events != '') { + echo $before_widget; + echo $before_title . $widget_title . $after_title; + echo $the_events; + echo $after_widget; + } + } + + function widget_calendar_today_control() { + $widget_title = get_option('calendar_today_widget_title'); + if (isset($_POST['calendar_today_widget_title'])) { + update_option('calendar_today_widget_title',strip_tags($_POST['calendar_today_widget_title'])); + } + ?> +

    + +

    + +

    + +

    + get_var("SELECT config_value FROM ".WP_CALENDAR_CONFIG_TABLE." WHERE config_item='display_author'",0,0); + $show_cat = $wpdb->get_var("SELECT config_value FROM ".WP_CALENDAR_CONFIG_TABLE." WHERE config_item='enable_categories'",0,0); + + if ($show_cat == 'true') + { + $sql = "SELECT * FROM " . WP_CALENDAR_CATEGORIES_TABLE . " WHERE category_id=".$event->event_category; + $cat_details = $wpdb->get_row($sql); + $style = "background-color:".$cat_details->category_colour.";"; + } + + $header_details .= '
    '.$event->event_title.'
    '; + if ($event->event_time != "00:00:00") + { + $header_details .= ''.__('Time','calendar').': ' . date(get_option('time_format'), strtotime($event->event_time)) . '
    '; + } + if ($display_author == 'true') + { + $e = get_userdata($event->event_author); + $header_details .= ''.__('Posted by', 'calendar').': '.$e->display_name.'
    '; + } + if ($display_author == 'true' || $event->event_time != "00:00:00") + { + $header_details .= '
    '; + } + if ($event->event_link != '') { $linky = $event->event_link; } + else { $linky = '#'; } + + $details = '
    +* ' . $event->event_title . '' . $header_details . '' . $event->event_desc . ''; + + return $details; +} + +// Draw an event but customise the HTML for use in the widget +function draw_widget_event($event) +{ + global $wpdb; + + // Calendar must be updated to run this function + check_calendar(); + + // Before we do anything we want to know if we + // should display the author and/or show categories. + // We check for this later + $display_author = $wpdb->get_var("SELECT config_value FROM ".WP_CALENDAR_CONFIG_TABLE." WHERE config_item='display_author'",0,0); + $show_cat = $wpdb->get_var("SELECT config_value FROM ".WP_CALENDAR_CONFIG_TABLE." WHERE config_item='enable_categories'",0,0); + + if ($show_cat == 'true') + { + $sql = "SELECT * FROM " . WP_CALENDAR_CATEGORIES_TABLE . " WHERE category_id=".$event->event_category; + $cat_details = $wpdb->get_row($sql); + $style = "background-color:".$cat_details->category_colour.";"; + } + + $header_details .= '
    '.$event->event_title.'
    '; + if ($event->event_time != "00:00:00") + { + $header_details .= ''.__('Time','calendar').': ' . date(get_option('time_format'), strtotime($event->event_time)) . '
    '; + } + if ($display_author == 'true') + { + $e = get_userdata($event->event_author); + $header_details .= ''.__('Posted by','calendar').': '.$e->display_name.'
    '; + } + if ($display_author == 'true' || $event->event_time != "00:00:00") + { + $header_details .= '
    '; + } + if ($event->event_link != '') { $linky = $event->event_link; } + else { $linky = '#'; } + + $details = '' . $event->event_title . '' . $header_details . '' . $event->event_desc . ''; + + return $details; +} + +// Grab all events for the requested date from calendar +function grab_events($y,$m,$d) +{ + global $wpdb; + + $arr_events = array(); + + // Get the date format right + $date = $y . '-' . $m . '-' . $d; + + // Firstly we check for conventional events. These will form the first instance of a recurring event + // or the only instance of a one-off event + $events = $wpdb->get_results("SELECT * FROM " . WP_CALENDAR_TABLE . " WHERE event_begin <= '$date' AND event_end >= '$date' AND event_recur = 'S' ORDER BY event_id"); + if (!empty($events)) + { + foreach($events as $event) + { + array_push($arr_events, $event); + } + } + + // Even if there were results for that query, we may still have events recurring + // from the past on this day. We now methodically check the for these events + + /* + The yearly code - easy because the day and month will be the same, so we return all yearly + events that match the date part. Out of these we show those with a repeat of 0, and fast-foward + a number of years for those with a value more than 0. Those that land in the future are displayed. + */ + + + // Deal with forever recurring year events + $events = $wpdb->get_results("SELECT * FROM " . WP_CALENDAR_TABLE . " WHERE event_recur = 'Y' AND EXTRACT(YEAR FROM '$date') >= EXTRACT(YEAR FROM event_begin) AND event_repeats = 0 ORDER BY event_id"); + + if (!empty($events)) + { + foreach($events as $event) + { + // This is going to get complex so lets setup what we would place in for + // an event so we can drop it in with ease + + // Technically we don't care about the years, but we need to find out if the + // event spans the turn of a year so we can deal with it appropriately. + $year_begin = date('Y',strtotime($event->event_begin)); + $year_end = date('Y',strtotime($event->event_end)); + + if ($year_begin == $year_end) + { + if (date('m-d',strtotime($event->event_begin)) <= date('m-d',strtotime($date)) && + date('m-d',strtotime($event->event_end)) >= date('m-d',strtotime($date))) + { + array_push($arr_events, $event); + } + } + else if ($year_begin < $year_end) + { + if (date('m-d',strtotime($event->event_begin)) <= date('m-d',strtotime($date)) || + date('m-d',strtotime($event->event_end)) >= date('m-d',strtotime($date))) + { + array_push($arr_events, $event); + } + } + } + } + + // Now the ones that happen a finite number of times + $events = $wpdb->get_results("SELECT * FROM " . WP_CALENDAR_TABLE . " WHERE event_recur = 'Y' AND EXTRACT(YEAR FROM '$date') >= EXTRACT(YEAR FROM event_begin) AND event_repeats != 0 AND (EXTRACT(YEAR FROM '$date')-EXTRACT(YEAR FROM event_begin)) <= event_repeats ORDER BY event_id"); + if (!empty($events)) + { + foreach($events as $event) + { + // This is going to get complex so lets setup what we would place in for + // an event so we can drop it in with ease + + // Technically we don't care about the years, but we need to find out if the + // event spans the turn of a year so we can deal with it appropriately. + $year_begin = date('Y',strtotime($event->event_begin)); + $year_end = date('Y',strtotime($event->event_end)); + + if ($year_begin == $year_end) + { + if (date('m-d',strtotime($event->event_begin)) <= date('m-d',strtotime($date)) && + date('m-d',strtotime($event->event_end)) >= date('m-d',strtotime($date))) + { + array_push($arr_events, $event); + } + } + else if ($year_begin < $year_end) + { + if (date('m-d',strtotime($event->event_begin)) <= date('m-d',strtotime($date)) || + date('m-d',strtotime($event->event_end)) >= date('m-d',strtotime($date))) + { + array_push($arr_events, $event); + } + } + } + } + + /* + The monthly code - just as easy because as long as the day of the month is correct, then we + show the event + */ + + // The monthly events that never stop recurring + $events = $wpdb->get_results("SELECT * FROM " . WP_CALENDAR_TABLE . " WHERE event_recur = 'M' AND EXTRACT(YEAR FROM '$date') >= EXTRACT(YEAR FROM event_begin) AND event_repeats = 0 ORDER BY event_id"); + if (!empty($events)) + { + foreach($events as $event) + { + // This is going to get complex so lets setup what we would place in for + // an event so we can drop it in with ease + + // Technically we don't care about the years or months, but we need to find out if the + // event spans the turn of a year or month so we can deal with it appropriately. + $month_begin = date('m',strtotime($event->event_begin)); + $month_end = date('m',strtotime($event->event_end)); + + if ($month_begin == $month_end) + { + if (date('d',strtotime($event->event_begin)) <= date('d',strtotime($date)) && + date('d',strtotime($event->event_end)) >= date('d',strtotime($date))) + { + array_push($arr_events, $event); + } + } + else if ($month_begin < $month_end) + { + if ( ($event->event_begin <= date('Y-m-d',strtotime($date))) && (date('d',strtotime($event->event_begin)) <= date('d',strtotime($date)) || + date('d',strtotime($event->event_end)) >= date('d',strtotime($date))) ) + { + array_push($arr_events, $event); + } + } + } + } + + + // Now the ones that happen a finite number of times + $events = $wpdb->get_results("SELECT * FROM " . WP_CALENDAR_TABLE . " WHERE event_recur = 'M' AND EXTRACT(YEAR FROM '$date') >= EXTRACT(YEAR FROM event_begin) AND event_repeats != 0 AND (PERIOD_DIFF(EXTRACT(YEAR_MONTH FROM '$date'),EXTRACT(YEAR_MONTH FROM event_begin))) <= event_repeats ORDER BY event_id"); + if (!empty($events)) + { + foreach($events as $event) + { + // This is going to get complex so lets setup what we would place in for + // an event so we can drop it in with ease + + // Technically we don't care about the years or months, but we need to find out if the + // event spans the turn of a year or month so we can deal with it appropriately. + $month_begin = date('m',strtotime($event->event_begin)); + $month_end = date('m',strtotime($event->event_end)); + + if ($month_begin == $month_end) + { + if (date('d',strtotime($event->event_begin)) <= date('d',strtotime($date)) && + date('d',strtotime($event->event_end)) >= date('d',strtotime($date))) + { + array_push($arr_events, $event); + } + } + else if ($month_begin < $month_end) + { + if ( ($event->event_begin <= date('Y-m-d',strtotime($date))) && (date('d',strtotime($event->event_begin)) <= date('d',strtotime($date)) || + date('d',strtotime($event->event_end)) >= date('d',strtotime($date))) ) + { + array_push($arr_events, $event); + } + } + } + } + + + /* + Weekly - well isn't this fun! We need to scan all weekly events, find what day they fell on + and see if that matches the current day. If it does, we check to see if the repeats are 0. + If they are, display the event, if not, we fast forward from the original day in week blocks + until the number is exhausted. If the date we arrive at is in the future, display the event. + */ + + // The weekly events that never stop recurring + $events = $wpdb->get_results("SELECT * FROM " . WP_CALENDAR_TABLE . " WHERE event_recur = 'W' AND '$date' >= event_begin AND event_repeats = 0 ORDER BY event_id"); + if (!empty($events)) + { + foreach($events as $event) + { + // This is going to get complex so lets setup what we would place in for + // an event so we can drop it in with ease + + // Now we are going to check to see what day the original event + // fell on and see if the current date is both after it and on + // the correct day. If it is, display the event! + $day_start_event = date('D',strtotime($event->event_begin)); + $day_end_event = date('D',strtotime($event->event_end)); + $current_day = date('D',strtotime($date)); + + $plan = array(); + $plan['Mon'] = 1; + $plan['Tue'] = 2; + $plan['Wed'] = 3; + $plan['Thu'] = 4; + $plan['Fri'] = 5; + $plan['Sat'] = 6; + $plan['Sun'] = 7; + + if ($plan[$day_start_event] > $plan[$day_end_event]) + { + if (($plan[$day_start_event] <= $plan[$current_day]) || ($plan[$current_day] <= $plan[$day_end_event])) + { + array_push($arr_events, $event); + } + } + else if (($plan[$day_start_event] < $plan[$day_end_event]) || ($plan[$day_start_event]== $plan[$day_end_event])) + { + if (($plan[$day_start_event] <= $plan[$current_day]) && ($plan[$current_day] <= $plan[$day_end_event])) + { + array_push($arr_events, $event); + } + } + + } + } + + // The weekly events that have a limit on how many times they occur + $events = $wpdb->get_results("SELECT * FROM " . WP_CALENDAR_TABLE . " WHERE event_recur = 'W' AND '$date' >= event_begin AND event_repeats != 0 AND (event_repeats*7) >= (TO_DAYS('$date') - TO_DAYS(event_end)) ORDER BY event_id"); + if (!empty($events)) + { + foreach($events as $event) + { + // This is going to get complex so lets setup what we would place in for + // an event so we can drop it in with ease + + // Now we are going to check to see what day the original event + // fell on and see if the current date is both after it and on + // the correct day. If it is, display the event! + $day_start_event = date('D',strtotime($event->event_begin)); + $day_end_event = date('D',strtotime($event->event_end)); + $current_day = date('D',strtotime($date)); + + $plan = array(); + $plan['Mon'] = 1; + $plan['Tue'] = 2; + $plan['Wed'] = 3; + $plan['Thu'] = 4; + $plan['Fri'] = 5; + $plan['Sat'] = 6; + $plan['Sun'] = 7; + + if ($plan[$day_start_event] > $plan[$day_end_event]) + { + if (($plan[$day_start_event] <= $plan[$current_day]) || ($plan[$current_day] <= $plan[$day_end_event])) + { + array_push($arr_events, $event); + } + } + else if (($plan[$day_start_event] < $plan[$day_end_event]) || ($plan[$day_start_event]== $plan[$day_end_event])) + { + if (($plan[$day_start_event] <= $plan[$current_day]) && ($plan[$current_day] <= $plan[$day_end_event])) + { + array_push($arr_events, $event); + } + } + + } + } + + return $arr_events; +} + + +// Actually do the printing of the calendar +// Compared to searching for and displaying events +// this bit is really rather easy! +function calendar() +{ + global $wpdb; + + // First things first, make sure calendar is up to date + check_calendar(); + + // Deal with the week not starting on a monday + if (get_option('start_of_week') == 0) + { + $name_days = array(1=>__('Sunday','calendar'),__('Monday','calendar'),__('Tuesday','calendar'),__('Wednesday','calendar'),__('Thursday','calendar'),__('Friday','calendar'),__('Saturday','calendar')); + } + // Choose Monday if anything other than Sunday is set + else + { + $name_days = array(1=>__('Monday','calendar'),__('Tuesday','calendar'),__('Wednesday','calendar'),__('Thursday','calendar'),__('Friday','calendar'),__('Saturday','calendar'),__('Sunday','calendar')); + } + + // Carry on with the script + $name_months = array(1=>__('January','calendar'),__('February','calendar'),__('March','calendar'),__('April','calendar'),__('May','calendar'),__('June','calendar'),__('July','calendar'),__('August','calendar'),__('September','calendar'),__('October','calendar'),__('November','calendar'),__('December','calendar')); + + // If we don't pass arguments we want a calendar that is relevant to today + if (empty($_GET['month']) || empty($_GET['yr'])) + { + $c_year = date("Y"); + $c_month = date("m"); + $c_day = date("d"); + } + + // Years get funny if we exceed 3000, so we use this check + if ($_GET['yr'] <= 3000 && $_GET['yr'] >= 0) + { + // This is just plain nasty and all because of permalinks + // which are no longer used, this will be cleaned up soon + if ($_GET['month'] == 'jan' || $_GET['month'] == 'feb' || $_GET['month'] == 'mar' || $_GET['month'] == 'apr' || $_GET['month'] == 'may' || $_GET['month'] == 'jun' || $_GET['month'] == 'jul' || $_GET['month'] == 'aug' || $_GET['month'] == 'sept' || $_GET['month'] == 'oct' || $_GET['month'] == 'nov' || $_GET['month'] == 'dec') + { + + // Again nasty code to map permalinks into something + // databases can understand. This will be cleaned up + $c_year = mysql_escape_string($_GET['yr']); + if ($_GET['month'] == 'jan') { $t_month = 1; } + else if ($_GET['month'] == 'feb') { $t_month = 2; } + else if ($_GET['month'] == 'mar') { $t_month = 3; } + else if ($_GET['month'] == 'apr') { $t_month = 4; } + else if ($_GET['month'] == 'may') { $t_month = 5; } + else if ($_GET['month'] == 'jun') { $t_month = 6; } + else if ($_GET['month'] == 'jul') { $t_month = 7; } + else if ($_GET['month'] == 'aug') { $t_month = 8; } + else if ($_GET['month'] == 'sept') { $t_month = 9; } + else if ($_GET['month'] == 'oct') { $t_month = 10; } + else if ($_GET['month'] == 'nov') { $t_month = 11; } + else if ($_GET['month'] == 'dec') { $t_month = 12; } + $c_month = $t_month; + $c_day = date("d"); + } + // No valid month causes the calendar to default to today + else + { + $c_year = date("Y"); + $c_month = date("m"); + $c_day = date("d"); + } + } + // No valid year causes the calendar to default to today + else + { + $c_year = date("Y"); + $c_month = date("m"); + $c_day = date("d"); + } + + // Fix the days of the week if week start is not on a monday + if (get_option('start_of_week') == 0) + { + $first_weekday = date("w",mktime(0,0,0,$c_month,1,$c_year)); + $first_weekday = ($first_weekday==0?1:$first_weekday+1); + } + // Otherwise assume the week starts on a Monday. Anything other + // than Sunday or Monday is just plain odd + else + { + $first_weekday = date("w",mktime(0,0,0,$c_month,1,$c_year)); + $first_weekday = ($first_weekday==0?7:$first_weekday); + } + + $days_in_month = date("t", mktime (0,0,0,$c_month,1,$c_year)); + + // Start the table and add the header and naviagtion + $calendar_body .= ' + +'; + + // We want to know if we should display the date switcher + $date_switcher = $wpdb->get_var("SELECT config_value FROM ".WP_CALENDAR_CONFIG_TABLE." WHERE config_item='display_jump'",0,0); + + if ($date_switcher == 'true') + { + $calendar_body .= ' + + +'; + } + + // The header of the calendar table and the links. Note calls to link functions + $calendar_body .= ' + + +'; + + // Print the headings of the days of the week + $calendar_body .= ' +'; + for ($i=1; $i<=7; $i++) + { + // Colours need to be different if the starting day of the week is different + if (get_option('start_of_week') == 0) + { + $calendar_body .= ' +'; + } + else + { + $calendar_body .= ' +'; + } + } + $calendar_body .= ' +'; + + for ($i=1; $i<=$days_in_month;) + { + $calendar_body .= ' +'; + for ($ii=1; $ii<=7; $ii++) + { + if ($ii==$first_weekday && $i==1) + { + $go = TRUE; + } + elseif ($i > $days_in_month ) + { + $go = FALSE; + } + + if ($go) + { + // Colours again, this time for the day numbers + if (get_option('start_of_week') == 0) + { + // This bit of code is for styles believe it or not. + $grabbed_events = grab_events($c_year,$c_month,$i); + $no_events_class = ''; + if (!count($grabbed_events)) + { + $no_events_class = ' no-events'; + } + $calendar_body .= ' +'; + } + else + { + $grabbed_events = grab_events($c_year,$c_month,$i); + $no_events_class = ''; + if (!count($grabbed_events)) + { + $no_events_class = ' no-events'; + } + $calendar_body .= ' +'; + } + } + else + { + $calendar_body .= ' +'; + } + } + $calendar_body .= ' +'; + } + $show_cat = $wpdb->get_var("SELECT config_value FROM ".WP_CALENDAR_CONFIG_TABLE." WHERE config_item='enable_categories'",0,0); + + if ($show_cat == 'true') + { + $sql = "SELECT * FROM " . WP_CALENDAR_CATEGORIES_TABLE . " ORDER BY category_name ASC"; + $cat_details = $wpdb->get_results($sql); + $calendar_body .= ' +'; + } + $calendar_body .= '
    +
    +'; + $qsa = array(); + parse_str($_SERVER['QUERY_STRING'],$qsa); + foreach ($qsa as $name => $argument) + { + if ($name != 'month' && $name != 'yr') + { + $calendar_body .= ' +'; + } + } + function month_comparison($month) + { + $current_month = strtolower(date("M", time())); + if (isset($_GET['yr']) && isset($_GET['month'])) + { + if ($month == $_GET['month']) + { + return ' selected="selected"'; + } + } + elseif ($month == $current_month) + { + return ' selected="selected"'; + } + } + // We build the months in the switcher + $calendar_body .= ' + '.__('Month','calendar').': + '.__('Year','calendar').': + +
    +
    + + + + + + +
    ' . prev_link($c_year,$c_month) . ''.$name_months[(int)$c_month].' '.$c_year.'' . next_link($c_year,$c_month) . '
    +
    '.$name_days[$i].''.$name_days[$i].'
    1?'':'class="weekend"').'>'.$i++.'' . draw_events($grabbed_events) . ''.$i++.'' . draw_events($grabbed_events) . ' 
    + + +'; + foreach($cat_details as $cat_detail) + { + $calendar_body .= ''; + } + $calendar_body .= '
    '.__('Category Key','calendar').'
    '.$cat_detail->category_name.'
    +
    +'; + + // A little link to yours truely. See the README if you wish to remove this + $calendar_body .= ' +'; + + // Phew! After that bit of string building, spit it all out. + // The actual printing is done by the calling function. + return $calendar_body; +} + +?> diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/calendar/calendar.pot --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/calendar/calendar.pot Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,505 @@ +# Calendar translation file +# Copyright (C) 2009 Kieran O'Shea +# This file is distributed under the same license as the PACKAGE package. +# Kieran O'Shea , 2009 + +#: calendar.php:116 +msgid "Calendar" +msgstr "" + +#: calendar.php:120 +msgid "Manage Calendar" +msgstr "" + +#: calendar.php:123 calendar.php:1628 +msgid "Manage Categories" +msgstr "" + +#: calendar.php:124 +msgid "Calendar Config" +msgstr "" + +#: calendar.php:124 calendar.php:1437 +msgid "Calendar Options" +msgstr "" + +#: calendar.php:516 calendar.php:1640 +msgid "ID" +msgstr "" + +#: calendar.php:517 calendar.php:1992 calendar.php:2025 +msgid "Title" +msgstr "" + +#: calendar.php:518 +msgid "Description" +msgstr "" + +#: calendar.php:519 calendar.php:665 +msgid "Start Date" +msgstr "" + +#: calendar.php:520 calendar.php:683 +msgid "End Date" +msgstr "" + +#: calendar.php:521 +msgid "Recurs" +msgstr "" + +#: calendar.php:522 +msgid "Repeats" +msgstr "" + +#: calendar.php:523 calendar.php:1447 +msgid "Author" +msgstr "" + +#: calendar.php:524 +msgid "Category" +msgstr "" + +#: calendar.php:525 calendar.php:565 calendar.php:1643 calendar.php:1657 +msgid "Edit" +msgstr "" + +#: calendar.php:526 calendar.php:566 calendar.php:1644 calendar.php:1666 +msgid "Delete" +msgstr "" + +#: calendar.php:544 +msgid "Never" +msgstr "" + +#: calendar.php:545 +msgid "Weekly" +msgstr "" + +#: calendar.php:546 +msgid "Monthly" +msgstr "" + +#: calendar.php:547 +msgid "Yearly" +msgstr "" + +#: calendar.php:553 calendar.php:1661 +msgid "N/A" +msgstr "" + +#: calendar.php:554 +msgid "Forever" +msgstr "" + +#: calendar.php:555 +msgid "Times" +msgstr "" + +#: calendar.php:566 +msgid "Are you sure you want to delete this event?" +msgstr "" + +#: calendar.php:577 +msgid "There are no events in the database!" +msgstr "" + +#: calendar.php:593 +msgid "Bad Monkey! No banana!" +msgstr "" + +#: calendar.php:601 +msgid "An event with that ID couldn't be found" +msgstr "" + +#: calendar.php:628 +msgid "Event Title" +msgstr "" + +#: calendar.php:633 +msgid "Event Description" +msgstr "" + +#: calendar.php:637 +msgid "Event Category" +msgstr "" + +#: calendar.php:661 +msgid "Event Link (Optional)" +msgstr "" + +#: calendar.php:679 calendar.php:704 +msgid "Select Date" +msgstr "" + +#: calendar.php:708 +msgid "Time (hh:mm)" +msgstr "" + +#: calendar.php:726 +msgid "Optional, set blank if not required." +msgstr "" + +#: calendar.php:726 +msgid "Current time difference from GMT is " +msgstr "" + +#: calendar.php:726 +msgid " hour(s)" +msgstr "" + +#: calendar.php:730 +msgid "Recurring Events" +msgstr "" + +#: calendar.php:758 +msgid "Repeats for" +msgstr "" + +#: calendar.php:766 +msgid "" +"Entering 0 means forever. Where the recurrance interval is left at none, the " +"event will not reoccur." +msgstr "" + +#: calendar.php:773 calendar.php:1503 calendar.php:1590 calendar.php:1626 +msgid "Save" +msgstr "" + +#: calendar.php:878 calendar.php:885 calendar.php:892 calendar.php:905 +#: calendar.php:916 calendar.php:927 calendar.php:938 calendar.php:956 +#: calendar.php:1040 calendar.php:1047 calendar.php:1054 calendar.php:1067 +#: calendar.php:1078 calendar.php:1089 calendar.php:1100 calendar.php:1150 +#: calendar.php:1170 +msgid "Error" +msgstr "" + +#: calendar.php:878 calendar.php:1040 +msgid "" +"Your event end date must be either after or the same as your event begin date" +msgstr "" + +#: calendar.php:885 calendar.php:1047 +msgid "" +"Your date formatting is correct but one or more of your dates is invalid. " +"Check for number of days in month and leap year related errors." +msgstr "" + +#: calendar.php:892 calendar.php:1054 +msgid "" +"Both start and end dates must be entered and be in the format YYYY-MM-DD" +msgstr "" + +#: calendar.php:905 calendar.php:1067 +msgid "The time field must either be blank or be entered in the format hh:mm" +msgstr "" + +#: calendar.php:916 calendar.php:1078 +msgid "" +"The URL entered must either be prefixed with http:// or be completely blank" +msgstr "" + +#: calendar.php:927 calendar.php:1089 +msgid "" +"The event title must be between 1 and 30 characters in length and contain no " +"punctuation. Spaces are allowed but the title must not start with one." +msgstr "" + +#: calendar.php:938 calendar.php:1100 +msgid "" +"The repetition value must be 0 unless a type of recurrance is selected in " +"which case the repetition value must be 0 or higher" +msgstr "" + +#: calendar.php:956 +msgid "" +"An event with the details you submitted could not be found in the database. " +"This may indicate a problem with your database or the way in which it is " +"configured." +msgstr "" + +#: calendar.php:962 +msgid "Event added. It will now show in your calendar." +msgstr "" + +#: calendar.php:1010 calendar.php:1118 +msgid "Failure" +msgstr "" + +#: calendar.php:1010 +msgid "You can't update an event if you haven't submitted an event id" +msgstr "" + +#: calendar.php:1118 +msgid "" +"The database failed to return data to indicate the event has been updated " +"sucessfully. This may indicate a problem with your database or the way in " +"which it is configured." +msgstr "" + +#: calendar.php:1124 +msgid "Event updated successfully" +msgstr "" + +#: calendar.php:1150 +msgid "You can't delete an event if you haven't submitted an event id" +msgstr "" + +#: calendar.php:1164 +msgid "Event deleted successfully" +msgstr "" + +#: calendar.php:1170 +msgid "" +"Despite issuing a request to delete, the event still remains in the " +"database. Please investigate." +msgstr "" + +#: calendar.php:1186 +msgid "Edit Event" +msgstr "" + +#: calendar.php:1190 +msgid "You must provide an event id in order to edit it" +msgstr "" + +#: calendar.php:1200 +msgid "Add Event" +msgstr "" + +#: calendar.php:1203 +msgid "Manage Events" +msgstr "" + +#: calendar.php:1294 +msgid "Settings saved" +msgstr "" + +#: calendar.php:1443 +msgid "Choose the lowest user group that may manage events" +msgstr "" + +#: calendar.php:1445 +msgid "Subscriber" +msgstr "" + +#: calendar.php:1446 +msgid "Contributor" +msgstr "" + +#: calendar.php:1448 +msgid "Editor" +msgstr "" + +#: calendar.php:1449 +msgid "Administrator" +msgstr "" + +#: calendar.php:1454 +msgid "Do you want to display the author name on events?" +msgstr "" + +#: calendar.php:1456 calendar.php:1464 calendar.php:1472 calendar.php:1480 +#: calendar.php:1489 +msgid "Yes" +msgstr "" + +#: calendar.php:1457 calendar.php:1465 calendar.php:1473 calendar.php:1481 +#: calendar.php:1490 +msgid "No" +msgstr "" + +#: calendar.php:1462 +msgid "Display a jumpbox for changing month and year quickly?" +msgstr "" + +#: calendar.php:1470 +msgid "Display todays events?" +msgstr "" + +#: calendar.php:1478 +msgid "Display upcoming events?" +msgstr "" + +#: calendar.php:1483 +msgid "for" +msgstr "" + +#: calendar.php:1483 +msgid "days into the future" +msgstr "" + +#: calendar.php:1487 +msgid "Enable event categories?" +msgstr "" + +#: calendar.php:1495 +msgid "Configure the stylesheet for Calendar" +msgstr "" + +#: calendar.php:1497 +msgid "Tick this box if you wish to reset the Calendar style to default" +msgstr "" + +#: calendar.php:1555 +msgid "Category added successfully" +msgstr "" + +#: calendar.php:1563 +msgid "Category deleted successfully" +msgstr "" + +#: calendar.php:1571 +msgid "Edit Category" +msgstr "" + +#: calendar.php:1579 calendar.php:1615 calendar.php:1641 +msgid "Category Name" +msgstr "" + +#: calendar.php:1583 calendar.php:1619 +msgid "Category Colour (Hex format)" +msgstr "" + +#: calendar.php:1599 +msgid "Category edited successfully" +msgstr "" + +#: calendar.php:1607 +msgid "Add Category" +msgstr "" + +#: calendar.php:1642 +msgid "Category Colour" +msgstr "" + +#: calendar.php:1666 +msgid "Are you sure you want to delete this category?" +msgstr "" + +#: calendar.php:1679 +msgid "There are no categories in the database - something has gone wrong!" +msgstr "" + +#: calendar.php:1750 calendar.php:1756 +msgid "Next" +msgstr "" + +#: calendar.php:1768 calendar.php:1774 +msgid "Prev" +msgstr "" + +#: calendar.php:1806 calendar.php:1848 calendar.php:1904 calendar.php:1946 +msgid "all day" +msgstr "" + +#: calendar.php:1809 calendar.php:1851 calendar.php:1907 calendar.php:1949 +msgid "at" +msgstr "" + +#: calendar.php:1821 calendar.php:2011 calendar.php:2031 calendar.php:2032 +msgid "Upcoming Events" +msgstr "" + +#: calendar.php:1842 calendar.php:1978 calendar.php:1998 calendar.php:1999 +msgid "Today's Events" +msgstr "" + +#: calendar.php:2060 calendar.php:2104 +msgid "Time" +msgstr "" + +#: calendar.php:2065 calendar.php:2109 +msgid "Posted by" +msgstr "" + +#: calendar.php:2404 calendar.php:2409 +msgid "Sunday" +msgstr "" + +#: calendar.php:2404 calendar.php:2409 +msgid "Monday" +msgstr "" + +#: calendar.php:2404 calendar.php:2409 +msgid "Tuesday" +msgstr "" + +#: calendar.php:2404 calendar.php:2409 +msgid "Wednesday" +msgstr "" + +#: calendar.php:2404 calendar.php:2409 +msgid "Thursday" +msgstr "" + +#: calendar.php:2404 calendar.php:2409 +msgid "Friday" +msgstr "" + +#: calendar.php:2404 calendar.php:2409 +msgid "Saturday" +msgstr "" + +#: calendar.php:2413 calendar.php:2523 +msgid "January" +msgstr "" + +#: calendar.php:2413 calendar.php:2524 +msgid "February" +msgstr "" + +#: calendar.php:2413 calendar.php:2525 +msgid "March" +msgstr "" + +#: calendar.php:2413 calendar.php:2526 +msgid "April" +msgstr "" + +#: calendar.php:2413 calendar.php:2527 +msgid "May" +msgstr "" + +#: calendar.php:2413 calendar.php:2528 +msgid "June" +msgstr "" + +#: calendar.php:2413 calendar.php:2529 +msgid "July" +msgstr "" + +#: calendar.php:2413 calendar.php:2530 +msgid "August" +msgstr "" + +#: calendar.php:2413 calendar.php:2531 +msgid "September" +msgstr "" + +#: calendar.php:2413 calendar.php:2532 +msgid "October" +msgstr "" + +#: calendar.php:2413 calendar.php:2533 +msgid "November" +msgstr "" + +#: calendar.php:2413 calendar.php:2534 +msgid "December" +msgstr "" + +#: calendar.php:2522 +msgid "Month" +msgstr "" + +#: calendar.php:2536 +msgid "Year" +msgstr "" + +#: calendar.php:2683 +msgid "Category Key" +msgstr "" + +#: calendar.php:2697 +msgid "Calendar developed and supported by " +msgstr "" diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/calendar/javascript.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/calendar/javascript.js Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,1467 @@ +// =================================================================== +// 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; i9?"":"0")+x} + +// ------------------------------------------------------------------ +// isDate ( date_string, format_string ) +// Returns true if date string matches format of format string and +// is a valid date. Else returns false. +// It is recommended that you trim whitespace around the value before +// passing it to this function, as whitespace is NOT ignored! +// ------------------------------------------------------------------ +function isDate(val,format) { + var date=getDateFromFormat(val,format); + if (date==0) { return false; } + return true; + } + +// ------------------------------------------------------------------- +// compareDates(date1,date1format,date2,date2format) +// Compare two date strings to see which is greater. +// Returns: +// 1 if date1 is greater than date2 +// 0 if date2 is greater than date1 of if they are the same +// -1 if either of the dates is in an invalid format +// ------------------------------------------------------------------- +function compareDates(date1,dateformat1,date2,dateformat2) { + var d1=getDateFromFormat(date1,dateformat1); + var d2=getDateFromFormat(date2,dateformat2); + if (d1==0 || d2==0) { + return -1; + } + else if (d1 > d2) { + return 1; + } + return 0; + } + +// ------------------------------------------------------------------ +// formatDate (date_object, format) +// Returns a date in the output format specified. +// The format string uses the same abbreviations as in getDateFromFormat() +// ------------------------------------------------------------------ +function formatDate(date,format) { + format=format+""; + var result=""; + var i_format=0; + var c=""; + var token=""; + var y=date.getYear()+""; + var M=date.getMonth()+1; + var d=date.getDate(); + var E=date.getDay(); + var H=date.getHours(); + var m=date.getMinutes(); + var s=date.getSeconds(); + var yyyy,yy,MMM,MM,dd,hh,h,mm,ss,ampm,HH,H,KK,K,kk,k; + // Convert real date parts into formatted versions + var value=new Object(); + if (y.length < 4) {y=""+(y-0+1900);} + value["y"]=""+y; + value["yyyy"]=y; + value["yy"]=y.substring(2,4); + value["M"]=M; + value["MM"]=LZ(M); + value["MMM"]=MONTH_NAMES[M-1]; + value["NNN"]=MONTH_NAMES[M+11]; + value["d"]=d; + value["dd"]=LZ(d); + value["E"]=DAY_NAMES[E+7]; + value["EE"]=DAY_NAMES[E]; + value["H"]=H; + value["HH"]=LZ(H); + if (H==0){value["h"]=12;} + else if (H>12){value["h"]=H-12;} + else {value["h"]=H;} + value["hh"]=LZ(value["h"]); + if (H>11){value["K"]=H-12;} else {value["K"]=H;} + value["k"]=H+1; + value["KK"]=LZ(value["K"]); + value["kk"]=LZ(value["k"]); + if (H > 11) { value["a"]="PM"; } + else { value["a"]="AM"; } + value["m"]=m; + value["mm"]=LZ(m); + value["s"]=s; + value["ss"]=LZ(s); + while (i_format < format.length) { + c=format.charAt(i_format); + token=""; + while ((format.charAt(i_format)==c) && (i_format < format.length)) { + token += format.charAt(i_format++); + } + if (value[token] != null) { result=result + value[token]; } + else { result=result + token; } + } + return result; + } + +// ------------------------------------------------------------------ +// Utility functions for parsing in getDateFromFormat() +// ------------------------------------------------------------------ +function _isInteger(val) { + var digits="1234567890"; + for (var i=0; i < val.length; i++) { + if (digits.indexOf(val.charAt(i))==-1) { return false; } + } + return true; + } +function _getInt(str,i,minlength,maxlength) { + for (var x=maxlength; x>=minlength; x--) { + var token=str.substring(i,i+x); + if (token.length < minlength) { return null; } + if (_isInteger(token)) { return token; } + } + return null; + } + +// ------------------------------------------------------------------ +// getDateFromFormat( date_string , format_string ) +// +// This function takes a date string and a format string. It matches +// If the date string matches the format string, it returns the +// getTime() of the date. If it does not match, it returns 0. +// ------------------------------------------------------------------ +function getDateFromFormat(val,format) { + val=val+""; + format=format+""; + var i_val=0; + var i_format=0; + var c=""; + var token=""; + var token2=""; + var x,y; + var now=new Date(); + var year=now.getYear(); + var month=now.getMonth()+1; + var date=1; + var hh=now.getHours(); + var mm=now.getMinutes(); + var ss=now.getSeconds(); + var ampm=""; + + while (i_format < format.length) { + // Get next token from format string + c=format.charAt(i_format); + token=""; + while ((format.charAt(i_format)==c) && (i_format < format.length)) { + token += format.charAt(i_format++); + } + // Extract contents of value based on format token + if (token=="yyyy" || token=="yy" || token=="y") { + if (token=="yyyy") { x=4;y=4; } + if (token=="yy") { x=2;y=2; } + if (token=="y") { x=2;y=4; } + year=_getInt(val,i_val,x,y); + if (year==null) { return 0; } + i_val += year.length; + if (year.length==2) { + if (year > 70) { year=1900+(year-0); } + else { year=2000+(year-0); } + } + } + else if (token=="MMM"||token=="NNN"){ + month=0; + for (var i=0; i11)) { + month=i+1; + if (month>12) { month -= 12; } + i_val += month_name.length; + break; + } + } + } + if ((month < 1)||(month>12)){return 0;} + } + else if (token=="EE"||token=="E"){ + for (var i=0; i12)){return 0;} + i_val+=month.length;} + else if (token=="dd"||token=="d") { + date=_getInt(val,i_val,token.length,2); + if(date==null||(date<1)||(date>31)){return 0;} + i_val+=date.length;} + else if (token=="hh"||token=="h") { + hh=_getInt(val,i_val,token.length,2); + if(hh==null||(hh<1)||(hh>12)){return 0;} + i_val+=hh.length;} + else if (token=="HH"||token=="H") { + hh=_getInt(val,i_val,token.length,2); + if(hh==null||(hh<0)||(hh>23)){return 0;} + i_val+=hh.length;} + else if (token=="KK"||token=="K") { + hh=_getInt(val,i_val,token.length,2); + if(hh==null||(hh<0)||(hh>11)){return 0;} + i_val+=hh.length;} + else if (token=="kk"||token=="k") { + hh=_getInt(val,i_val,token.length,2); + if(hh==null||(hh<1)||(hh>24)){return 0;} + i_val+=hh.length;hh--;} + else if (token=="mm"||token=="m") { + mm=_getInt(val,i_val,token.length,2); + if(mm==null||(mm<0)||(mm>59)){return 0;} + i_val+=mm.length;} + else if (token=="ss"||token=="s") { + ss=_getInt(val,i_val,token.length,2); + if(ss==null||(ss<0)||(ss>59)){return 0;} + i_val+=ss.length;} + else if (token=="a") { + if (val.substring(i_val,i_val+2).toLowerCase()=="am") {ampm="AM";} + else if (val.substring(i_val,i_val+2).toLowerCase()=="pm") {ampm="PM";} + else {return 0;} + i_val+=2;} + else { + if (val.substring(i_val,i_val+token.length)!=token) {return 0;} + else {i_val+=token.length;} + } + } + // If there are any trailing characters left in the value, it doesn't match + if (i_val != val.length) { return 0; } + // Is date valid for month? + if (month==2) { + // Check for leap year + if ( ( (year%4==0)&&(year%100 != 0) ) || (year%400==0) ) { // leap year + if (date > 29){ return 0; } + } + else { if (date > 28) { return 0; } } + } + if ((month==4)||(month==6)||(month==9)||(month==11)) { + if (date > 30) { return 0; } + } + // Correct hours value + if (hh<12 && ampm=="PM") { hh=hh-0+12; } + else if (hh>11 && ampm=="AM") { hh-=12; } + var newdate=new Date(year,month-1,date,hh,mm,ss); + return newdate.getTime(); + } + +// ------------------------------------------------------------------ +// parseDate( date_string [, prefer_euro_format] ) +// +// This function takes a date string and tries to match it to a +// number of possible date formats to get the value. It will try to +// match against the following international formats, in this order: +// y-M-d MMM d, y MMM d,y y-MMM-d d-MMM-y MMM d +// M/d/y M-d-y M.d.y MMM-d M/d M-d +// d/M/y d-M-y d.M.y d-MMM d/M d-M +// A second argument may be passed to instruct the method to search +// for formats like d/M/y (european format) before M/d/y (American). +// Returns a Date object or null if no patterns match. +// ------------------------------------------------------------------ +function parseDate(val) { + var preferEuro=(arguments.length==2)?arguments[1]:false; + generalFormats=new Array('y-M-d','MMM d, y','MMM d,y','y-MMM-d','d-MMM-y','MMM d'); + monthFirst=new Array('M/d/y','M-d-y','M.d.y','MMM-d','M/d','M-d'); + dateFirst =new Array('d/M/y','d-M-y','d.M.y','d-MMM','d/M','d-M'); + var checkList=new Array('generalFormats',preferEuro?'dateFirst':'monthFirst',preferEuro?'monthFirst':'dateFirst'); + var d=null; + 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 + "px"; + 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: CalendarPopup.js */ + +// HISTORY +// ------------------------------------------------------------------ +// Feb 7, 2005: Fixed a CSS styles to use px unit +// March 29, 2004: Added check in select() method for the form field +// being disabled. If it is, just return and don't do anything. +// March 24, 2004: Fixed bug - when month name and abbreviations were +// changed, date format still used original values. +// January 26, 2004: Added support for drop-down month and year +// navigation (Thanks to Chris Reid for the idea) +// September 22, 2003: Fixed a minor problem in YEAR calendar with +// CSS prefix. +// August 19, 2003: Renamed the function to get styles, and made it +// work correctly without an object reference +// August 18, 2003: Changed showYearNavigation and +// showYearNavigationInput to optionally take an argument of +// true or false +// July 31, 2003: Added text input option for year navigation. +// Added a per-calendar CSS prefix option to optionally use +// different styles for different calendars. +// July 29, 2003: Fixed bug causing the Today link to be clickable +// even though today falls in a disabled date range. +// Changed formatting to use pure CSS, allowing greater control +// over look-and-feel options. +// June 11, 2003: Fixed bug causing the Today link to be unselectable +// under certain cases when some days of week are disabled +// March 14, 2003: Added ability to disable individual dates or date +// ranges, display as light gray and strike-through +// March 14, 2003: Removed dependency on graypixel.gif and instead +/// use table border coloring +// March 12, 2003: Modified showCalendar() function to allow optional +// start-date parameter +// March 11, 2003: Modified select() function to allow optional +// start-date parameter +/* +DESCRIPTION: This object implements a popup calendar to allow the user to +select a date, month, quarter, or year. + +COMPATABILITY: Works with Netscape 4.x, 6.x, IE 5.x on Windows. Some small +positioning errors - usually with Window positioning - occur on the +Macintosh platform. +The calendar can be modified to work for any location in the world by +changing which weekday is displayed as the first column, changing the month +names, and changing the column headers for each day. + +USAGE: +// Create a new CalendarPopup object of type WINDOW +var cal = new CalendarPopup(); + +// Create a new CalendarPopup object of type DIV using the DIV named 'mydiv' +var cal = new CalendarPopup('mydiv'); + +// Easy method to link the popup calendar with an input box. +cal.select(inputObject, anchorname, dateFormat); +// Same method, but passing a default date other than the field's current value +cal.select(inputObject, anchorname, dateFormat, '01/02/2000'); +// This is an example call to the popup calendar from a link to populate an +// input box. Note that to use this, date.js must also be included!! +Select + +// Set the type of date select to be used. By default it is 'date'. +cal.setDisplayType(type); + +// When a date, month, quarter, or year is clicked, a function is called and +// passed the details. You must write this function, and tell the calendar +// popup what the function name is. +// Function to be called for 'date' select receives y, m, d +cal.setReturnFunction(functionname); +// Function to be called for 'month' select receives y, m +cal.setReturnMonthFunction(functionname); +// Function to be called for 'quarter' select receives y, q +cal.setReturnQuarterFunction(functionname); +// Function to be called for 'year' select receives y +cal.setReturnYearFunction(functionname); + +// Show the calendar relative to a given anchor +cal.showCalendar(anchorname); + +// Hide the calendar. The calendar is set to autoHide automatically +cal.hideCalendar(); + +// Set the month names to be used. Default are English month names +cal.setMonthNames("January","February","March",...); + +// Set the month abbreviations to be used. Default are English month abbreviations +cal.setMonthAbbreviations("Jan","Feb","Mar",...); + +// Show navigation for changing by the year, not just one month at a time +cal.showYearNavigation(); + +// Show month and year dropdowns, for quicker selection of month of dates +cal.showNavigationDropdowns(); + +// Set the text to be used above each day column. The days start with +// sunday regardless of the value of WeekStartDay +cal.setDayHeaders("S","M","T",...); + +// Set the day for the first column in the calendar grid. By default this +// is Sunday (0) but it may be changed to fit the conventions of other +// countries. +cal.setWeekStartDay(1); // week is Monday - Sunday + +// Set the weekdays which should be disabled in the 'date' select popup. You can +// then allow someone to only select week end dates, or Tuedays, for example +cal.setDisabledWeekDays(0,1); // To disable selecting the 1st or 2nd days of the week + +// Selectively disable individual days or date ranges. Disabled days will not +// be clickable, and show as strike-through text on current browsers. +// Date format is any format recognized by parseDate() in date.js +// Pass a single date to disable: +cal.addDisabledDates("2003-01-01"); +// Pass null as the first parameter to mean "anything up to and including" the +// passed date: +cal.addDisabledDates(null, "01/02/03"); +// Pass null as the second parameter to mean "including the passed date and +// anything after it: +cal.addDisabledDates("Jan 01, 2003", null); +// Pass two dates to disable all dates inbetween and including the two +cal.addDisabledDates("January 01, 2003", "Dec 31, 2003"); + +// When the 'year' select is displayed, set the number of years back from the +// current year to start listing years. Default is 2. +// This is also used for year drop-down, to decide how many years +/- to display +cal.setYearSelectStartOffset(2); + +// Text for the word "Today" appearing on the calendar +cal.setTodayText("Today"); + +// The calendar uses CSS classes for formatting. If you want your calendar to +// have unique styles, you can set the prefix that will be added to all the +// classes in the output. +// For example, normal output may have this: +// Today +// But if you set the prefix like this: +cal.setCssPrefix("Test"); +// The output will then look like: +// Today +// And you can define that style somewhere in your page. + +// When using Year navigation, you can make the year be an input box, so +// the user can manually change it and jump to any year +cal.showYearNavigationInput(); + +// Set the calendar offset to be different than the default. By default it +// will appear just below and to the right of the anchorname. So if you have +// a text box where the date will go and and anchor immediately after the +// text box, the calendar will display immediately under the text box. +cal.offsetX = 20; +cal.offsetY = 20; + +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 CalendarPopup 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 CalendarPopup object + or the autoHide() will not work correctly. + +5) The calendar popup display uses style sheets to make it look nice. + +*/ + +// CONSTRUCTOR for the CalendarPopup Object +function CalendarPopup() { + var c; + if (arguments.length>0) { + c = new PopupWindow(arguments[0]); + } + else { + c = new PopupWindow(); + c.setSize(150,175); + } + c.offsetX = -152; + c.offsetY = 25; + c.autoHide(); + // Calendar-specific properties + c.monthNames = new Array("January","February","March","April","May","June","July","August","September","October","November","December"); + c.monthAbbreviations = new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"); + c.dayHeaders = new Array("S","M","T","W","T","F","S"); + c.returnFunction = "CP_tmpReturnFunction"; + c.returnMonthFunction = "CP_tmpReturnMonthFunction"; + c.returnQuarterFunction = "CP_tmpReturnQuarterFunction"; + c.returnYearFunction = "CP_tmpReturnYearFunction"; + c.weekStartDay = 0; + c.isShowYearNavigation = false; + c.displayType = "date"; + c.disabledWeekDays = new Object(); + c.disabledDatesExpression = ""; + c.yearSelectStartOffset = 2; + c.currentDate = null; + c.todayText="Today"; + c.cssPrefix=""; + c.isShowNavigationDropdowns=false; + c.isShowYearNavigationInput=false; + window.CP_calendarObject = null; + window.CP_targetInput = null; + window.CP_dateFormat = "MM/dd/yyyy"; + // Method mappings + c.copyMonthNamesToWindow = CP_copyMonthNamesToWindow; + c.setReturnFunction = CP_setReturnFunction; + c.setReturnMonthFunction = CP_setReturnMonthFunction; + c.setReturnQuarterFunction = CP_setReturnQuarterFunction; + c.setReturnYearFunction = CP_setReturnYearFunction; + c.setMonthNames = CP_setMonthNames; + c.setMonthAbbreviations = CP_setMonthAbbreviations; + c.setDayHeaders = CP_setDayHeaders; + c.setWeekStartDay = CP_setWeekStartDay; + c.setDisplayType = CP_setDisplayType; + c.setDisabledWeekDays = CP_setDisabledWeekDays; + c.addDisabledDates = CP_addDisabledDates; + c.setYearSelectStartOffset = CP_setYearSelectStartOffset; + c.setTodayText = CP_setTodayText; + c.showYearNavigation = CP_showYearNavigation; + c.showCalendar = CP_showCalendar; + c.hideCalendar = CP_hideCalendar; + c.getStyles = getCalendarStyles; + c.refreshCalendar = CP_refreshCalendar; + c.getCalendar = CP_getCalendar; + c.select = CP_select; + c.setCssPrefix = CP_setCssPrefix; + c.showNavigationDropdowns = CP_showNavigationDropdowns; + c.showYearNavigationInput = CP_showYearNavigationInput; + c.copyMonthNamesToWindow(); + // Return the object + return c; + } +function CP_copyMonthNamesToWindow() { + // Copy these values over to the date.js + if (typeof(window.MONTH_NAMES)!="undefined" && window.MONTH_NAMES!=null) { + window.MONTH_NAMES = new Array(); + for (var i=0; i\n"; + result += '
    \n'; + } + else { + result += '
    \n'; + result += '
    \n'; + result += '
    \n'; + } + // Code for DATE display (default) + // ------------------------------- + if (this.displayType=="date" || this.displayType=="week-end") { + if (this.currentDate==null) { this.currentDate = now; } + if (arguments.length > 0) { var month = arguments[0]; } + else { var month = this.currentDate.getMonth()+1; } + if (arguments.length > 1 && arguments[1]>0 && arguments[1]-0==arguments[1]) { var year = arguments[1]; } + else { var year = this.currentDate.getFullYear(); } + var daysinmonth= new Array(0,31,28,31,30,31,30,31,31,30,31,30,31); + if ( ( (year%4 == 0)&&(year%100 != 0) ) || (year%400 == 0) ) { + daysinmonth[2] = 29; + } + var current_month = new Date(year,month-1,1); + var display_year = year; + var display_month = month; + var display_date = 1; + var weekday= current_month.getDay(); + var offset = 0; + + offset = (weekday >= this.weekStartDay) ? weekday-this.weekStartDay : 7-this.weekStartDay+weekday ; + if (offset > 0) { + display_month--; + if (display_month < 1) { display_month = 12; display_year--; } + display_date = daysinmonth[display_month]-offset+1; + } + var next_month = month+1; + var next_month_year = year; + if (next_month > 12) { next_month=1; next_month_year++; } + var last_month = month-1; + var last_month_year = year; + if (last_month < 1) { last_month=12; last_month_year--; } + var date_class; + if (this.type!="WINDOW") { + result += ""; + } + result += '\n'; + var refresh = windowref+'CP_refreshCalendar'; + var refreshLink = 'javascript:' + refresh; + if (this.isShowNavigationDropdowns) { + result += ''; + result += ''; + + result += ''; + } + else { + if (this.isShowYearNavigation) { + result += ''; + result += ''; + result += ''; + result += ''; + + result += ''; + if (this.isShowYearNavigationInput) { + result += ''; + } + else { + result += ''; + } + result += ''; + } + else { + result += '\n'; + result += '\n'; + result += '\n'; + } + } + result += '
     <'+this.monthNames[month-1]+'> <'+year+'><<'+this.monthNames[month-1]+' '+year+'>>
    \n'; + result += '\n'; + result += '\n'; + for (var j=0; j<7; j++) { + + result += '\n'; + } + result += '\n'; + for (var row=1; row<=6; row++) { + result += '\n'; + for (var col=1; col<=7; col++) { + var disabled=false; + if (this.disabledDatesExpression!="") { + var ds=""+display_year+LZ(display_month)+LZ(display_date); + eval("disabled=("+this.disabledDatesExpression+")"); + } + var dateClass = ""; + if ((display_month == this.currentDate.getMonth()+1) && (display_date==this.currentDate.getDate()) && (display_year==this.currentDate.getFullYear())) { + dateClass = "cpCurrentDate"; + } + else if (display_month == month) { + dateClass = "cpCurrentMonthDate"; + } + else { + dateClass = "cpOtherMonthDate"; + } + if (disabled || this.disabledWeekDays[col-1]) { + result += ' \n'; + } + else { + var selected_date = display_date; + var selected_month = display_month; + var selected_year = display_year; + if (this.displayType=="week-end") { + var d = new Date(selected_year,selected_month-1,selected_date,0,0,0,0); + d.setDate(d.getDate() + (7-col)); + selected_year = d.getYear(); + if (selected_year < 1000) { selected_year += 1900; } + selected_month = d.getMonth()+1; + selected_date = d.getDate(); + } + result += ' \n'; + } + display_date++; + if (display_date > daysinmonth[display_month]) { + display_date=1; + display_month++; + } + if (display_month > 12) { + display_month=1; + display_year++; + } + } + result += ''; + } + var current_weekday = now.getDay() - this.weekStartDay; + if (current_weekday < 0) { + current_weekday += 7; + } + result += '\n'; + result += '
    '+this.dayHeaders[(this.weekStartDay+j)%7]+'
    '+display_date+''+display_date+'
    \n'; + if (this.disabledDatesExpression!="") { + var ds=""+now.getFullYear()+LZ(now.getMonth()+1)+LZ(now.getDate()); + eval("disabled=("+this.disabledDatesExpression+")"); + } + if (disabled || this.disabledWeekDays[current_weekday+1]) { + result += ' '+this.todayText+'\n'; + } + else { + result += ' '+this.todayText+'\n'; + } + result += '
    \n'; + result += '
    \n'; + } + + // Code common for MONTH, QUARTER, YEAR + // ------------------------------------ + if (this.displayType=="month" || this.displayType=="quarter" || this.displayType=="year") { + if (arguments.length > 0) { var year = arguments[0]; } + else { + if (this.displayType=="year") { var year = now.getFullYear()-this.yearSelectStartOffset; } + else { var year = now.getFullYear(); } + } + if (this.displayType!="year" && this.isShowYearNavigation) { + result += ""; + result += '\n'; + result += ' \n'; + result += ' \n'; + result += ' \n'; + result += '
    <<'+year+'>>
    \n'; + } + } + + // Code for MONTH display + // ---------------------- + if (this.displayType=="month") { + // If POPUP, write entire HTML document + result += '\n'; + for (var i=0; i<4; i++) { + result += ''; + for (var j=0; j<3; j++) { + var monthindex = ((i*3)+j); + result += ''; + } + result += ''; + } + result += '
    '+this.monthAbbreviations[monthindex]+'
    \n'; + } + + // Code for QUARTER display + // ------------------------ + if (this.displayType=="quarter") { + result += '
    \n'; + for (var i=0; i<2; i++) { + result += ''; + for (var j=0; j<2; j++) { + var quarter = ((i*2)+j+1); + result += ''; + } + result += ''; + } + result += '

    Q'+quarter+'

    \n'; + } + + // Code for YEAR display + // --------------------- + if (this.displayType=="year") { + var yearColumnSize = 4; + result += ""; + result += '\n'; + result += ' \n'; + result += ' \n'; + result += '
    <<>>
    \n'; + result += '\n'; + for (var i=0; i'+currentyear+''; + } + result += ''; + } + result += '
    \n'; + } + // Common + if (this.type == "WINDOW") { + result += "\n"; + } + return result; + } + diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/calendar/readme.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/calendar/readme.txt Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,150 @@ +=== Calendar === +Contributors: KieranOShea +Donate link: http://www.kieranoshea.com +Tags: calendar, dates, times, events +Requires at least: 2.0 +Tested up to: 2.8 +Stable tag: 1.2.2 + +A simple but effective Calendar plugin for WordPress that allows you to +manage your events and appointments and display them to the world. + +== Description == + +A simple but effective Calendar plugin for WordPress that allows you to +manage your events and appointments and display them to the world on your +website. + +Features: + +* Monthly view of events +* Mouse-over details for each event +* Events can have a timestamp (optional) +* Events can display their author (optional) +* Events can span more than one day +* Multiple events per day possible +* Events can repeat on a weekly, monthly or yearly basis +* Repeats can occur indefinitely or a limited number of times +* Easy to use events manager in admin dashboard +* Sidebar function/Widget to show todays events +* Sidebar function/Widget to show upcoming events +* Lists of todays events can be displayed in posts or pages +* Lists of upcoming events can be displayed in posts or pages +* Comprehensive options panel for admin +* Modifiable CSS using the options panel +* Optional drop down boxes to quickly change month and year +* User groups other than admin can be permitted to manage events +* Events can be placed into categories +* A calendar of events for just one of more categories can be displayed +* Categories system can be switched on or off +* Pop up javascript calendars help the choosing of dates +* Events can be links pointing to a location of your choice +* Full internationalisation is possible +* Comaptible with WordPress MU + +== Installation == + +The installation is extremely simple and straightforward. It only takes a second. + +Installing: + +1. Upload the whole calendar directory into your WordPress plugins directory. + +2. Activate the plugin on your WordPress plugins page + +3. Configure Calendar using the following pages in the admin panel: + + Calendar -> Manage Events + + Calendar -> Manage Categories + + Calendar -> Calendar Options + +4. Edit or create a page on your blog which includes the text {CALENDAR} and visit + the page you have edited or created. You should see your calendar in action. + +Upgrading from 1.2 or later: + +1. Deactivate the plugin (you will not lose any events) + +2. Remove your current calendar directory from the WordPress plugins directory + +2. Upload the whole calendar directory into your WordPress plugins directory. + +3. Activate the plugin on your WordPress plugins page + +4. Configure Calendar using the following pages in the admin panel: + + Calendar -> Manage Events + + Calendar -> Manage Categories + + Calendar -> Calendar Options + +5. Edit or create a page on your blog which includes the text {CALENDAR} and visit + the page you have edited or created page. You should see your calendar in action. + +Upgrading from 1.1: + +1. Deactivate the plugin (you will not lose any events) + +2. Remove the Rewrite rules from your .htaccess file that you added + when you first installed Calendar. + +3. Delete plugins/calendar.php, wp-admin/edit-calendar.php, wp-calendar.php + +4. Upload the whole calendar directory into your WordPress plugins directory. + +5. Activate the plugin on your WordPress plugins page + +6. Configure Calendar using the following pages in the admin panel: + + Calendar -> Manage Events + + Calendar -> Manage Categories + + Calendar -> Calendar Options + +7. Edit or create a page on your blog which includes the text {CALENDAR} and visit + the page you have edited or created page. You should see your calendar in action. + +Uninstalling: + +1. Deactivate the plugin on the plugins page of your blog dashboard + +2. Delete the uploaded files for the plugin + +3. Remove the text {CALENDAR} from the page you were using to show calendar, or delete that page + +== Frequently Asked Questions == + += Where are the frequently asked questions for Calendar? = + + They are located on [Kieran O'Shea's forum](http://www.kieranoshea.com/forum/viewtopic.php?f=13&t=10 "Kieran O'Shea's forum"). + Please note that you should check these before asking any support questions or thinking your calendar install isn't working + properly. + += Where can I get support for the plugin? = + + Support is only available on [Kieran O'Shea's forum](http://www.kieranoshea.com/forum/viewtopic.php?f=13&t=10 "Kieran O'Shea's forum"). + Regrettably e-mail support became too cumberome to manage and so now all support and bug report e-mails for calendar will be ignored. All + such queries will be answered promptly on the forums, although please make sure you search first before asking your question. + += Can I remove the link to your site? = + + Yes, you may do this, but please be aware that support will not be provided + to those who choose to remove the link. When you ask your support question + you will be asked for the URL to your blog and the presence of the link will + be checked before support will be provided. + +== Screenshots == + +1. Calendar being used on a blog page + +2. Widgets showing in the sidebar + +3. The event management screen of calendar + +4. The category management screen of calendar + +5. The options screen of Calendar diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/calendar/screenshot-1.png Binary file web/wp-content/plugins/calendar/screenshot-1.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/calendar/screenshot-2.png Binary file web/wp-content/plugins/calendar/screenshot-2.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/calendar/screenshot-3.png Binary file web/wp-content/plugins/calendar/screenshot-3.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/calendar/screenshot-4.png Binary file web/wp-content/plugins/calendar/screenshot-4.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/calendar/screenshot-5.png Binary file web/wp-content/plugins/calendar/screenshot-5.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/K2/ec3_sidebar_module.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/event-calendar/K2/ec3_sidebar_module.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,81 @@ + +

    + + +

    +

    + + . + +

    + 5) +); +register_sidebar_module_control( + __('Upcoming Events','ec3'), + 'ec3_k2mod_list_control' +); + +?> diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/K2/readme.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/event-calendar/K2/readme.txt Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,36 @@ +== Display in a K2 SIDEBAR MODULE == + +If you are using K2 (http://getk2.com), an advanced template for WordPress, then +there is an option for displaying the EventCalendar in the sidebar of your blog. + +Within the eventcalendar3 plugin directory, you will find a K2 directory that +contains the ec3_sidebar_module.php. Copy this file into /app/modules/ of your +K2 theme install. + +Next, go to 'Presentation > K2 Sidebar Modules'. You should see two new modules: +'Event Calendar' and 'Upcoming Events' in the "Module's type" listing. Enter a +module name, select an EC module and click on the 'Add' button. Your module +name will appear on the left-hand side, currently appearing at the bottom of the +list. + +By clicking on your module name, you will be able to see the module options. + +There are several parameters within this interface you can set: + + o You can change the module's name. + + o You can show/hide the module's name in the sidebar. + + o You can customize where the module appears in the sidebar. + + o Number of events to show in the Upcoming Events list. [Default: 5] + +You can move your EventCalendar module to any location within the sidebar by +dragging it to the desired spot. + +Be sure to 'Save' before leaving so your changes will be recorded. + +Finally, if you want to control other aspects of the Event Calendar, please +click on the link following these parameters within the module control. You will +be taken to 'Event Calendar Options' so you can further customize the +presentation of the Event Calendar plugin. diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/LICENSE --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/event-calendar/LICENSE Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,341 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 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. + + 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 + + + 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) 19yy + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +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) 19yy 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 Library General +Public License instead of this License. diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/Makefile --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/event-calendar/Makefile Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,77 @@ +# Copyright (c) 2006, Alex Tingle. $Revision: 184 $ +# +# 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 + + +# Generates gettext translation file. +# Just drop .po files into the gettext directory and make will do the rest. + +PHP_FILES := $(wildcard *.php) $(wildcard */*.php) +PO_FILES := $(wildcard gettext/ec3-*.po) +MO_FILES := $(patsubst %.po,%.mo,$(PO_FILES)) + +# EventCalendar's PO template +POT := gettext/ec3.pot + +# Working space - The shell command creates this directory. +TEMPDIR := $(shell mktemp -t -d eventcalendar.XXXXXXXXXXXXX) +# Temporary files, filtered for gettext calls in the 'ec3' domain. +XPHP_FILES := $(patsubst %,$(TEMPDIR)/%,$(PHP_FILES)) + +# xgettext generates a .pot template from souce code. +XGETTEXT := xgettext +XGETTEXT_OPTIONS := \ + --default-domain=ec3 \ + --language=php \ + --keyword=_x_ \ + --from-code=UTF-8 \ + --msgid-bugs-address='eventcalendar@firetree.net' \ + +.PHONY: all +all: $(POT) $(MO_FILES) $(TEMPDIR)/delete + +$(MO_FILES): %.mo: %.po + @echo "MSGFMT: $@" + msgfmt -o$@ $< + +$(PO_FILES): %: $(POT) + @echo "MSGMERGE: $@" + msgmerge -U $@ $(POT) + touch $@ + +$(POT): $(XPHP_FILES) gettext/pot.sed + @echo "XGETTEXT: $@" + cd $(TEMPDIR) && \ + $(XGETTEXT) $(XGETTEXT_OPTIONS) -o- $(PHP_FILES) \ + | sed -f $(CURDIR)/gettext/pot.sed \ + > $(CURDIR)/$@ + +.INTERMEDIATE: $(XPHP_FILES) +$(XPHP_FILES): $(TEMPDIR)/%: % + @echo "SED_FILTER: $<" + mkdir -p $(@D) + sed "s/_[_e]\(([^)]*,['\"]ec3['\"])\)/_x_\1/" $< > $@ + +# Force the temporary directory to be deleted when everything is done. +$(TEMPDIR)/delete: + rm -rf $(TEMPDIR) + +.PHONY: clean +clean: $(TEMPDIR)/delete + rm -f $(POT) + rm -f $(MO_FILES) + +.SILENT: +.DELETE_ON_ERROR: diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/TODO.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/event-calendar/TODO.txt Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,97 @@ +TODO: Event Calendar 3.1.4 +========================== + + ? Fix XML entity rendering on Safari (works on IE/Firefox) + + o Include an example of how to make events show up differently from other + categories. + + o Next/Prev links on single post page may link to an event post, even + in advanced mode, when such posts won't show up on the front page. + (Reported by Gerjan Boer) + + o Events in calendar popup not listed in time order. Popup shows start time + every day for multi-day events. + (Reported by Craig Rothman) + +Event List: + + o Provide better example CSS. (Include it in ec3.css). + +FUTURE +====== + + o Multiple event categories. + With colour-coding for each category. + Export each category as a separate iCalendar. + + o Fix category count. + Templates that show the number of posts in each category will not + always show the correct number for the event category. In advanced mode, + expired events are not listed in the cat page, but they would be included in + this count. + + o Allow import of a public iCalendar. + + o Repeating events (create upcoming ones in a batch job, triggered every so + often?) + + o Consider upcoming.org integration. + + o Whole-page calendar. + Some people want a HUGE calendar, not in the sidebar. This doesn't + work well if they have a sidebar calendar as well, because the calendar + has a unique ID. Should probably allow a new id to be set in the + ec3_get_calendar() template function. + (See also, the next item...) + + o New template function to list event titles inside the calendar table. + Like this: http://www.writingsalons.com/classes/index-12.php + Make sure that all the links work properly, even w/o JavaScript. + + o "ZZamboni" wrote: + > I do have one feature request: I do most of my blog posting from Ecto + > and not from the WP post editor. I was wondering if it would be possible + > to set the event date by including a special tag in the text. Something + > like '[eventdate 2006-09-31]' for a full-day event, '[eventdate + > 2006-09-31 14:00:00 2006-09-31 16:00:00]' for a regular event, and that + > does not get displayed, but is used to set the appropriate fields in the + > event record. + + o 'Calendar-Page'-formatting template. Alternative to ec3_the_schedule(). + Suggested by Karl Kolk. + +Event List: + + o Option to show N days in advance, rather than N next events. + + o Possibly: break the function into its component parts, and enable folks to + generate the contents with their own loop - and then provide an example loop + in get_events(). + + o "rumorhasit" wrote: + > while the event date/time does show up in the posts, it does not show up + > (correctly) in the sidebar. The side bar should be display the dates + > the same way as the post (ie., starttime - finishitime). Instead the + > side bar only shows a "starttime" and that's it. Seems counter + > intuitive to have both, especially considering the more detailed event + > date/time is not associated with the sidebar for upcoming events. + That's a good idea. It should be straightforward to add start and end + dates to the template code for the ec3_get_events() function. + + o customize display of listing (instead of just ul ) [heather] + + o month headings/grouping (like it does with posts on same day) [heather] + http://wordpress.org/support/topic/46841 + += DONE = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = + + ? Fix bug where event is also in another category -> multiple tooltips. + -> Can't reproduce this now. + + x Deal with local timezones correctly. + + x Document ?ec3_today ?ec3_days=N ?ec3_from=DATE ?ec3_before=DATE listing + options. Nobody knows about them! + + x Promote ec3_get_events() diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/addEvent.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/event-calendar/addEvent.js Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,39 @@ +//===================================================================== +// Event Listener +// by Scott Andrew - http://scottandrew.com +// edited by Mark Wubben, is now set to false +// Now allows callback lists for objects with an Id - Alex Tingle +//===================================================================== +function firetree_addEvent(obj, evType, fn) +{ + if(obj.id){ + if(!document._callbacks_by_id) + document._callbacks_by_id=new Array(); + if(!document._callbacks_by_id[obj.id]) + document._callbacks_by_id[obj.id]=new Array(); + document._callbacks_by_id[obj.id].push(fn); + fn=callback; + } + + if(obj.addEventListener){ + obj.addEventListener(evType, fn, false); + return true; + } else if (obj.attachEvent){ + var r = obj.attachEvent('on'+evType, fn); + return r; + } else { + return false; + } + + function callback(e) + { + var n; + if(e.currentTarget) n=e.currentTarget; // Mozilla/Safari/w3c + else if(window.event) n=window.event.srcElement; // IE + else return; + + if(n.id && document._callbacks_by_id[n.id]) + for(var i=0; iadvanced=false; + + ?> + + + + + + + + + + + + + + + +
    +
    +
    +

    +
    +
    +
    + + event_editor_box() ?> + +
    +
    +
    +
    + + get_results( + "SELECT + sched_id, + DATE_FORMAT(start,'%Y-%m-%d %H:%i') AS start, + DATE_FORMAT(end,'%Y-%m-%d %H:%i') AS end, + allday, + rpt + FROM $ec3->schedule WHERE post_id=$post_ID ORDER BY start"); + else + $schedule = false; + + if(function_exists('wp_create_nonce')) + { + echo ''; + } + ?> + + + + + + + + + + + + schedule_row( + $s->start,$s->end,$s->sched_id,'update',$s->allday + ); + $ec3_rows=count($schedule); + } + $default=ec3_strftime('%Y-%m-%d %H:00',3600+time()); + $this->schedule_row($default,$default,'_','create',False); + ?> + + + + +
    +

    + + +

    +
    + + + > + + + " value="" /> + + + + " value="" /> + + + + /> + + + +

    + +

    + + + save_post_called) && $this->save_post_called[$post_ID]) + return; + if(!isset($this->save_post_called)) + $this->save_post_called=array(); + $this->save_post_called[$post_ID]=true; + + global $ec3,$wpdb; + // Use this to check the DB before DELETE/UPDATE. Should use + // ...IGNORE, but some people insist on using ancient version of MySQL. + $count_where="SELECT COUNT(0) FROM $ec3->schedule WHERE"; + + // If this post is no longer an event, then purge all schedule records. + if(isset($_POST['ec3_rows']) && '0'==$_POST['ec3_rows']) + { + if($wpdb->get_var("$count_where post_id=$post_ID")) + $wpdb->query("DELETE FROM $ec3->schedule WHERE post_id=$post_ID"); + return; + } + + // Find all of our parameters + $sched_entries=array(); + $fields =array('start','end','allday','rpt'); + foreach($_POST as $k => $v) + { + if(preg_match('/^ec3_(action|'.implode('|',$fields).')_(_?)([0-9]+)$/',$k,$match)) + { + $sid=intval($match[3]); + if(!isset( $sched_entries[$sid] )) + $sched_entries[ $sid ]=array('allday' => 0); + $sched_entries[ $sid ][ $match[1] ] = $v; + } + } + + foreach($sched_entries as $sid => $vals) + { + // Bail out if the input data looks suspect. + if(!array_key_exists('action',$vals) || count($vals)<3) + continue; + // Save the value of 'action' and remove it. Leave just the column vals. + $action=$vals['action']; + unset($vals['action']); + // Reformat the column values for SQL: + foreach($vals as $k => $v) + if('allday'==$k) + $vals[$k]=intval($v); + else + $vals[$k]="'".$wpdb->escape($v)."'"; + $sid_ok=$wpdb->get_var("$count_where post_id=$post_ID AND sched_id=$sid"); + // Execute the SQL. + if($action=='delete' && $sid>0 && $sid_ok): + $wpdb->query( + "DELETE FROM $ec3->schedule + WHERE post_id=$post_ID + AND sched_id=$sid" + ); + elseif($action=='update' && $sid>0 && $sid_ok): + $wpdb->query( + "UPDATE $ec3->schedule + SET ".$this->implode_assoc(', ',$vals)." + WHERE post_id=$post_ID + AND sched_id=$sid" + ); + elseif($action=='create'): + $wpdb->query( + "INSERT INTO $ec3->schedule + (post_id, ".implode(', ',array_keys($vals)).") + VALUES ($post_ID,".implode(', ',array_values($vals)).")" + ); + endif; + } + // Force all end dates to be >= start dates. + $wpdb->query("UPDATE $ec3->schedule SET end=start WHERE end$value) + $result[]=$key."=".$value; + return implode($glue,$result); + } + + + // + // OPTIONS + // + + + /** Upgrade the installation, if necessary. */ + function upgrade_database() + { + global $ec3,$wpdb; + // Check version - return if no upgrade required. + $installed_version=get_option('ec3_version'); + if($installed_version==$ec3->version) + return; + + $v0=$this->ec3_version($installed_version); + $v1=$this->ec3_version($ec3->version); + for($i=0; $i $v1[$i] ) + return; // Installed version later than this one ?!?! + if( $v0[$i] < $v1[$i] ) + break; // Installed version earlier than this one. + } + + // Upgrade. + $tables=$wpdb->get_results('SHOW TABLES',ARRAY_N); + if(!$tables) + die(__('Error upgrading database for EventCalendar plugin.','ec3')); + + $table_exists=false; + foreach($tables as $t) + if(preg_match("/$ec3->schedule/",$t[0])) + $table_exists=true; + + if(!$table_exists) + { + $wpdb->query( + "CREATE TABLE $ec3->schedule ( + sched_id BIGINT(20) AUTO_INCREMENT, + post_id BIGINT(20), + start DATETIME, + end DATETIME, + allday BOOL, + rpt VARCHAR(64), + PRIMARY KEY(sched_id) + )"); + // Force the special upgrade page if we are coming from v3.0 + if( $ec3->event_category && + ( empty($v0) || $v0[0]<3 || ($v0[0]==3 && $v0[1]==0) ) ) + { + update_option('ec3_upgrade_posts',1); + } + } // end if(!$table_exists) + + // Record the new version number + update_option('ec3_version',$ec3->version); + echo '

    ' + . sprintf( + __('Upgraded database to EventCalendar Version %s','ec3'), + $ec3->version + ); + if($table_exists) + echo '
    ('.__('Table already existed','ec3').')'; + echo ".

    \n"; + } // end function upgrade_database(); + + /** Utility function used by upgrade_database(). + * Breaks apart a version string into an array of comparable parts. */ + function ec3_version($str) + { + $s=preg_replace('/([a-z])([0-9])/','\1.\2',$str); + $v=explode('.',$s); + $result=array(); + foreach($v as $i) + { + if(preg_match('/^[0-9]+$/',$i)) + $result[]=intval($i); + elseif(empty($i)) + $result[]=0; + else + $result[]=$i; + } + return $result; + } + + + function action_admin_menu() + { + global $ec3; + add_options_page( + __('Event Calendar Options','ec3'), + 'EventCalendar', + 6, + 'ec3_admin', + 'ec3_options_subpanel' + ); + + if(empty($ec3->event_category)) + return; // Until EC is properly configured, only show the options page. + + if(function_exists('add_meta_box')) + { + add_meta_box( + 'ec3_schedule_editor', // HTML id for container div + __('Event Editor','ec3'), + 'ec3_event_editor_box', // callback function + 'post', // page type + 'advanced', // context + 'high' // priority + ); + } + else + { + // Old (pre WP2.5) functionality. + add_filter('simple_edit_form', array(&$ec3_admin,'filter_edit_form')); + if($ec3->wp_have_dbx) + add_filter('dbx_post_advanced', array(&$ec3_admin,'filter_edit_form')); + else + add_filter('edit_form_advanced',array(&$ec3_admin,'filter_edit_form')); + } + } + + + function options_subpanel() + { + global $ec3; + + if(isset($_POST['info_update'])) + { + echo '

    '; + if(isset($_POST['ec3_event_category'])) + $ec3->set_event_category( intval($_POST['ec3_event_category']) ); + if(isset($_POST['ec3_num_months'])) + $ec3->set_num_months( intval($_POST['ec3_num_months']) ); + if(isset($_POST['ec3_show_only_events'])) + $ec3->set_show_only_events( intval($_POST['ec3_show_only_events']) ); + if(isset($_POST['ec3_day_length'])) + $ec3->set_day_length( intval($_POST['ec3_day_length']) ); + if(isset($_POST['ec3_hide_logo'])) + $ec3->set_hide_logo( intval($_POST['ec3_hide_logo']) ); + if(isset($_POST['ec3_hide_event_box'])) + $ec3->set_hide_event_box( intval($_POST['ec3_hide_event_box']) ); + if(isset($_POST['ec3_advanced'])) + $ec3->set_advanced( intval($_POST['ec3_advanced']) ); + if(isset($_POST['ec3_navigation'])) + $ec3->set_navigation( intval($_POST['ec3_navigation']) ); + if(isset($_POST['ec3_disable_popups'])) + $ec3->set_disable_popups( intval($_POST['ec3_disable_popups']) ); + if(isset($_POST['ec3_tz'])) + $ec3->set_tz( $_POST['ec3_tz'] ); + _e('Options saved.'); + echo '

    '; + } + ?> + +
    +
    +

    + + + +

    : +

    + + + + + + + + + + + + + + + + + + + + + tz_disabled): ?> + + + + + + + + +
    : + +
    + + +
    : + +
    : + +
    + + +
    : + +
    + + +
    : + +
    + +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    : + +
    : + +
    : + +
    : + +
    : + +
    + + +
    : + +
    + + +
    + +

    +
    + +
    upgrade_database(); // May set option ec3_force_upgrade + + if( intval(get_option('ec3_upgrade_posts')) || + isset($_POST['ec3_upgrade_posts']) ) + { + require_once(dirname(__FILE__).'/upgrade-posts.php'); + ec3_upgrade_posts(); + return; + } + + // Normal options page... + $ec3_admin->options_subpanel(); +} + +function ec3_event_editor_box() +{ + global $ec3_admin; + $ec3_admin->event_editor_box(); +} + + +// +// Hook in... +if($ec3->event_category) +{ + add_filter('admin_head',array(&$ec3_admin,'filter_admin_head')); + add_action('save_post', array(&$ec3_admin,'action_save_post')); + // TODO v3.2 - don't use the edit_post hook. + add_action('edit_post', array(&$ec3_admin,'action_save_post')); +} + +// Always hook into the admin_menu - it's required to allow users to +// set things up. +add_action('admin_menu', array(&$ec3_admin,'action_admin_menu')); + +?> diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/css/calendar-blue.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/event-calendar/css/calendar-blue.css Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,232 @@ +/* The main calendar widget. DIV containing a table. */ + +div.calendar { position: relative; } + +.calendar, .calendar table { + border: 1px solid #556; + font-size: 11px; + color: #000; + cursor: default; + background: #eef; + font-family: tahoma,verdana,sans-serif; +} + +/* Header part -- contains navigation buttons and day names. */ + +.calendar .button { /* "<<", "<", ">", ">>" buttons have this class */ + text-align: center; /* They are the navigation buttons */ + padding: 2px; /* Make the buttons seem like they're pressing */ +} + +.calendar .nav { + background: #778 url(menuarrow.gif) no-repeat 100% 100%; +} + +.calendar thead .title { /* This holds the current "month, year" */ + font-weight: bold; /* Pressing it will take you to the current date */ + text-align: center; + background: #fff; + color: #000; + padding: 2px; +} + +.calendar thead .headrow { /* Row containing navigation buttons */ + background: #778; + color: #fff; +} + +.calendar thead .daynames { /* Row containing the day names */ + background: #bdf; +} + +.calendar thead .name { /* Cells containing the day names */ + border-bottom: 1px solid #556; + padding: 2px; + text-align: center; + color: #000; +} + +.calendar thead .weekend { /* How a weekend day name shows in header */ + color: #a66; +} + +.calendar thead .hilite { /* How do the buttons in header appear when hover */ + background-color: #aaf; + color: #000; + border: 1px solid #04f; + padding: 1px; +} + +.calendar thead .active { /* Active (pressed) buttons in header */ + background-color: #77c; + padding: 2px 0px 0px 2px; +} + +/* The body part -- contains all the days in month. */ + +.calendar tbody .day { /* Cells containing month days dates */ + width: 2em; + color: #456; + text-align: right; + padding: 2px 4px 2px 2px; +} +.calendar tbody .day.othermonth { + font-size: 80%; + color: #bbb; +} +.calendar tbody .day.othermonth.oweekend { + color: #fbb; +} + +.calendar table .wn { + padding: 2px 3px 2px 2px; + border-right: 1px solid #000; + background: #bdf; +} + +.calendar tbody .rowhilite td { + background: #def; +} + +.calendar tbody .rowhilite td.wn { + background: #eef; +} + +.calendar tbody td.hilite { /* Hovered cells */ + background: #def; + padding: 1px 3px 1px 1px; + border: 1px solid #bbb; +} + +.calendar tbody td.active { /* Active (pressed) cells */ + background: #cde; + padding: 2px 2px 0px 2px; +} + +.calendar tbody td.selected { /* Cell showing today date */ + font-weight: bold; + border: 1px solid #000; + padding: 1px 3px 1px 1px; + background: #fff; + color: #000; +} + +.calendar tbody td.weekend { /* Cells showing weekend days */ + color: #a66; +} + +.calendar tbody td.today { /* Cell showing selected date */ + font-weight: bold; + color: #00f; +} + +.calendar tbody .disabled { color: #999; } + +.calendar tbody .emptycell { /* Empty cells (the best is to hide them) */ + visibility: hidden; +} + +.calendar tbody .emptyrow { /* Empty row (some months need less than 6 rows) */ + display: none; +} + +/* The footer part -- status bar and "Close" button */ + +.calendar tfoot .footrow { /* The in footer (only one right now) */ + text-align: center; + background: #556; + color: #fff; +} + +.calendar tfoot .ttip { /* Tooltip (status bar) cell */ + background: #fff; + color: #445; + border-top: 1px solid #556; + padding: 1px; +} + +.calendar tfoot .hilite { /* Hover style for buttons in footer */ + background: #aaf; + border: 1px solid #04f; + color: #000; + padding: 1px; +} + +.calendar tfoot .active { /* Active (pressed) style for buttons in footer */ + background: #77c; + padding: 2px 0px 0px 2px; +} + +/* Combo boxes (menus that display months/years for direct selection) */ + +.calendar .combo { + position: absolute; + display: none; + top: 0px; + left: 0px; + width: 4em; + cursor: default; + border: 1px solid #655; + background: #def; + color: #000; + font-size: 90%; + z-index: 100; +} + +.calendar .combo .label, +.calendar .combo .label-IEfix { + text-align: center; + padding: 1px; +} + +.calendar .combo .label-IEfix { + width: 4em; +} + +.calendar .combo .hilite { + background: #acf; +} + +.calendar .combo .active { + border-top: 1px solid #46a; + border-bottom: 1px solid #46a; + background: #eef; + font-weight: bold; +} + +.calendar td.time { + border-top: 1px solid #000; + padding: 1px 0px; + text-align: center; + background-color: #f4f0e8; +} + +.calendar td.time .hour, +.calendar td.time .minute, +.calendar td.time .ampm { + padding: 0px 3px 0px 4px; + border: 1px solid #889; + font-weight: bold; + background-color: #fff; +} + +.calendar td.time .ampm { + text-align: center; +} + +.calendar td.time .colon { + padding: 0px 2px 0px 3px; + font-weight: bold; +} + +.calendar td.time span.hilite { + border-color: #000; + background-color: #667; + color: #fff; +} + +.calendar td.time span.active { + border-color: #f00; + background-color: #000; + color: #0f0; +} \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/css/menuarrow.gif Binary file web/wp-content/plugins/event-calendar/css/menuarrow.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/date.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/event-calendar/date.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,248 @@ +0) + { + $this->year_num =$year_num; + $this->month_num=$month_num; + $this->day_num =$day_num; + } + if(0==$this->year_num && is_single()) + $this->from_single(); + if(0==$this->year_num && $ec3->is_date_range) + $this->from_date_range(); + if(0==$this->year_num) + $this->from_date(); // Falls back to today. + } + + function from_single() + { + global $wp_query; + if($wp_query->posts && $wp_query->posts[0]->ec3_schedule) + { + $this->year_num= + intval(mysql2date('Y',$wp_query->posts[0]->ec3_schedule[0]->start)); + $this->month_num= + intval(mysql2date('m',$wp_query->posts[0]->ec3_schedule[0]->start)); + } + } + + function from_date_range() + { + global $wp_query; + if('' != $wp_query->query_vars['ec3_from']) + { + $c=explode('_',$wp_query->query_vars['ec3_from']); + $this->year_num=intval($c[0]); + $this->month_num=intval($c[1]); + } + } + + /** Utility function. Calculates the value of month/year for the current + * page. Code block from wp-includes/template-functions-general.php + * (get_calendar function). */ + function from_date() + { + global + $m, + $monthnum, + $wpdb, + $year; + + if (isset($_GET['w'])) { + $w = ''.intval($_GET['w']); + } + + // 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)) { +// $calendar = substr($m, 0, 6); + $thisyear = ''.intval(substr($m, 0, 4)); + if (strlen($m) < 6) { + $thismonth = '01'; + } else { + $thismonth = ''.zeroise(intval(substr($m, 4, 2)), 2); + } + } else { + $thisyear=ec3_strftime("%Y"); + $thismonth=ec3_strftime("%m"); + } + + $this->year_num =intval($thisyear); + $this->month_num=intval($thismonth); + $this->day_num =1; + } + + /** Month arithmetic. Returns a new date object. */ + function plus_months($month_count) + { + $result=new ec3_Date($this->year_num,$this->month_num,$this->day_num); + $result->month_num += $month_count; + if($month_count>0) + { + while($result->month_num>12) + { + $result->month_num -= 12; + $result->year_num++; + } + } + else + { + while($result->month_num<1) + { + $result->month_num += 12; + $result->year_num--; + } + } + return $result; + } + /** Convenience function for accessing plus_months(). */ + function prev_month() { return $this->plus_months(-1); } + function next_month() { return $this->plus_months( 1); } + + /** Modifies the current object to be one day in the future. */ + function increment_day() + { + $this->day_num++; + if($this->day_num > $this->days_in_month()) + { + $this->day_num=1; + $this->month_num++; + if($this->month_num>12) + { + $this->month_num=1; + $this->year_num++; + } + $this->_days_in_month=0; + } + $this->_unixdate=0; + } + + function month_id() // e.g. ec3_2005_06 + { + return 'ec3_' . $this->year_num . '_' . $this->month_num; + } + function day_id() // e.g. ec3_2005_06_25 + { + $result='ec3_'.$this->year_num.'_'.$this->month_num.'_'.$this->day_num; + global $ec3_today_id; + if($result==$ec3_today_id) + return 'today'; + else + return $result; + } + function day_link() + { + global $ec3; + if($ec3->show_only_events) + { + return get_option('home') . '/?m=' + . $this->year_num + . zeroise($this->month_num, 2) + . zeroise($this->day_num, 2) + . "&cat=" . $ec3->event_category; + } + else + return get_day_link($this->year_num,$this->month_num,$this->day_num); + } + function month_name() // e.g. June + { + global $month; + return $month[zeroise($this->month_num,2)]; + } + function month_abbrev() // e.g. Jun + { + global $month_abbrev; + return $month_abbrev[ $this->month_name() ]; + } + function month_link() + { + global $ec3; + if($ec3->show_only_events) + { + return get_option('home') . '/?m=' + . $this->year_num + . zeroise($this->month_num, 2) + . "&cat=" . $ec3->event_category; + } + else + return get_month_link($this->year_num,$this->month_num); + } + function days_in_month() + { + if(0==$this->_days_in_month) + $this->_days_in_month=intval(date('t', $this->to_unixdate())); + return $this->_days_in_month; + } + function week_day() + { + return intval(date('w', $this->to_unixdate())); + } + function to_unixdate() + { + if(0==intval($this->_unixdate)) + { + $this->_unixdate = + mktime(0,0,0, $this->month_num,$this->day_num,$this->year_num); + } + return $this->_unixdate; + } +} // end class ec3_Date + + +/** Converts a MySQL date object into an EC3 date object. */ +function ec3_mysql2date(&$mysqldate) +{ + $as_str=mysql2date('Y,n,j',$mysqldate); + $as_arr=explode(',',$as_str); + return new ec3_Date($as_arr[0],$as_arr[1],$as_arr[2]); +} + +/** Converts a day or month Id to a PHP date. */ +function ec3_dayid2php(&$id) +{ + $parts=explode('_',$id); + $year =intval($parts[1]); + $month=intval($parts[2]); + $day =(count($parts)>=4? intval($parts[3]): 1); + return mktime( 0,0,0, $month,$day,$year); +} + +?> diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/day.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/event-calendar/day.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,53 @@ +is_event=True; + } + $this->titles[]=$safe_title; + } + function get_titles() + { + return implode(', ',$this->titles); + } +} + +?> diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/ec.png Binary file web/wp-content/plugins/event-calendar/ec.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/ec3.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/event-calendar/ec3.css Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,159 @@ +/* EventCalendar. Copyright (C) 2005 2006, Alex Tingle. $Revision: 263 $ + * This file is licensed under the GNU GPL. See LICENSE file for details. + */ + +/*** + *** Calendar + ***/ + +#wp-calendar table { + width:100%; +} + +#wp-calendar #prev { + text-align:left; +} + +#wp-calendar #next { + text-align:right; +} + +.ec3_eventday a { + color:#fff !IMPORTANT; +} +.ec3_eventday { + border:solid 1px #3366FF; + background-color:#333333; +} + +#wp-calendar table td, +#wp-calendar table th { + text-align:center; +} + +#wp-calendar table td, +#wp-calendar table td.pad:hover, +#wp-calendar table.nav tr td { + padding:1px; + border:none; +} +#wp-calendar caption { + background:#FFFFFF; +} +#wp-calendar table td:hover, +#wp-calendar table #today { + padding:0px; + border:solid 1px #999; +} + +/* The EC graphic. */ +.ec3_ec { + display:block; + float:right; + border:none; + width:13px; + height:9px; +} +.ec3_ec span { display:none } + + +/*** + *** Popup + ***/ + +.ec3_popup { + margin:0 !IMPORTANT; + padding:0 !IMPORTANT; + border:none; + position:absolute; + border-collapse:collapse; + filter:alpha(opacity=87); + -moz-opacity:.87; + opacity:.87; + z-index:30000; +} + +.ec3_popup td { + padding:0; +} + +.ec3_popup table { + border:solid #999 1px; /* popup border */ + background-color:#ccc; /* popup background colour */ + font-size:x-small; /* popup font size */ + color:black; + text-align:left; +} + +.ec3_popup table td { + padding:1.5px 3px 1.5px 3px; +} + +#ec3_shadow0 div { width:8px; height:32px; } +#ec3_shadow0 { + margin:0; + padding:0; + border:none; + width:8px; + background-repeat:no-repeat; + background-position:bottom right; + vertical-align:bottom; +} + +#ec3_shadow1 { + margin:0; + padding:0; + border:none; + height:16px; + background-repeat:repeat-x; +} + +#ec3_shadow2 div { width:8px; height:32px; } + +#ec3_shadow2 { + margin:0; + padding:0; + border:none; + width:8px; + background-repeat:no-repeat; + background-position:bottom left; + vertical-align:bottom; +} + +/*** + *** Event list + ***/ + +.ec3_list { + word-spacing:-1px; + letter-spacing:-0.2px; + color:#2c8084; +} + +.ec3_list li { + font-size:1em !IMPORTANT; +} + +.ec3_list li:before { + content:"" !IMPORTANT; +} + +/*** + *** Schedule + ***/ + +table.ec3_schedule { + border-collapse:collapse; + margin:0.5ex 1ex 0.5ex 0; + border:solid 1px #800; + float:left; +} + +table.ec3_schedule td { + padding:0 0.5ex 0 0.5ex; + color:#800; +} + +td.ec3_start { text-align:right; } + +td.ec3_to { text-align:center; } diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/ec3.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/event-calendar/ec3.js Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,439 @@ +/* EventCalendar. Copyright (C) 2005-2007, Alex Tingle. $Revision: 284 $ + * This file is licensed under the GNU GPL. See LICENSE file for details. + */ + +// Set in HTML file: +// var ec3.start_of_week +// var ec3.month_of_year +// var ec3.month_abbrev +// var ec3.myfiles +// var ec3.home +// var ec3.hide_logo +// var ec3.viewpostsfor + +/** Register an onload function. */ +function WindowOnload(f) +{ + var prev=window.onload; + window.onload=function(){ if(prev)prev(); f(); } +} + +// namespace +function ec3() +{ + WindowOnload( function() + { + // Overwrite the href links in ec3_prev & ec3_next to activate EC3. + var prev=document.getElementById('ec3_prev'); + var next=document.getElementById('ec3_next'); + if(prev && next) + { + // Check for cat limit in month link + var xCat=new RegExp('&cat=[0-9]+$'); + var match=xCat.exec(prev.href); + if(match) + ec3.catClause=match[0]; + // Replace links + prev.href='javascript:ec3.go_prev()'; + next.href='javascript:ec3.go_next()'; + // Pre-load image. + ec3.imgwait=new Image(14,14); + ec3.imgwait.src=ec3.myfiles+'/ec_load.gif'; + // Convert strings from PHP into Unicode + ec3.viewpostsfor=unencode(ec3.viewpostsfor); + for(var i=0; i6) + { + tr=document.createElement('tr'); + tbody.appendChild(tr); + col=0; + } + if(col1 && !ec3.hide_logo) + { + a=document.createElement('a'); + a.href='http://blog.firetree.net/?ec3_version='+ec3.version; + a.title='Event Calendar '+ec3.version; + td.style.verticalAlign='bottom'; + td.appendChild(a); + div=document.createElement('div'); + div.className='ec3_ec'; + div.align='right'; // keeps IE happy + a.appendChild(div); + } + + // set table's element id + table.id='ec3_'+year_num+'_'+month_num; + + return table; + } // end create_calendar() + + + /** Dispatch an XMLHttpRequest for a month of calendar entries. */ + function loadDates(month_num,year_num) + { + var req=new XMLHttpRequest(); + if(req) + { + ec3.reqs.push(req); + req.onreadystatechange=process_xml; + req.open("GET", + ec3.home+'/?ec3_xml='+year_num+'_'+month_num,true); + set_spinner(1); + req.send(null); + } + } + + + /** Obtain an array of all the calendar tables. */ + function get_calendars() + { + var div=document.getElementById('wp-calendar'); + var result=new Array(); + for(var i=0; i0) + return result; + else + return 0; + } + ec3.get_calendars=get_calendars; + + + /** Changes the link text in the forward and backwards buttons. + * Parameters are the 0-based month numbers. */ + function rewrite_controls(prev_month0,next_month0) + { + var prev=document.getElementById('ec3_prev'); + if(prev && prev.firstChild && prev.firstChild.nodeType==ec3.TEXT_NODE) + prev.firstChild.data='\u00ab\u00a0'+ec3.month_abbrev[prev_month0%12]; + var next=document.getElementById('ec3_next'); + if(next && next.firstChild && next.firstChild.nodeType==ec3.TEXT_NODE) + next.firstChild.data=ec3.month_abbrev[next_month0%12]+'\u00a0\u00bb'; + } + + + /** Turn the busy spinner on or off. */ + function set_spinner(on) + { + var spinner=document.getElementById('ec3_spinner'); + var publish=document.getElementById('ec3_publish'); + if(spinner) + { + if(on) + { + spinner.style.display='inline'; + if(publish) + publish.style.display='none'; + } + else + { + spinner.style.display='none'; + if(publish) + publish.style.display='inline'; + } + } + } + + + /** Called when the user clicks the 'previous month' button. */ + function go_prev() + { + var calendars=get_calendars(); + if(!calendars) + return; + var pn=calendars[0].parentNode; + + // calculate date of new calendar + var id_array=calendars[0].id.split('_'); + if(id_array.length<3) + return; + var year_num=parseInt(id_array[1]); + var month_num=parseInt(id_array[2])-1; + if(month_num==0) + { + month_num=12; + year_num--; + } + // Get new calendar + var newcal=document.getElementById('ec3_'+year_num+'_'+month_num); + if(newcal) + { + // Add in the new first calendar + newcal.style.display=ec3.calendar_display; + } + else + { + newcal=create_calendar(calendars[0],month_num,year_num); + pn.insertBefore( newcal, calendars[0] ); + loadDates(month_num,year_num); + } + // Hide the last calendar + ec3.calendar_display=calendars[calendars.length-1].style.display; + calendars[calendars.length-1].style.display='none'; + + // Re-write the forward & back buttons. + rewrite_controls(month_num+10,month_num+calendars.length-1); + } + ec3.go_prev=go_prev; + + + /** Called when the user clicks the 'next month' button. */ + function go_next() + { + var calendars=get_calendars(); + if(!calendars) + return; + var pn=calendars[0].parentNode; + var last_cal=calendars[calendars.length-1]; + + // calculate date of new calendar + var id_array=last_cal.id.split('_'); + if(id_array.length<3) + return; + var year_num=parseInt(id_array[1]); + var month_num=1+parseInt(id_array[2]); + if(month_num==13) + { + month_num=1; + year_num++; + } + // Get new calendar + var newcal=document.getElementById('ec3_'+year_num+'_'+month_num); + if(newcal) + { + // Add in the new last calendar + newcal.style.display=ec3.calendar_display; + } + else + { + newcal=create_calendar(calendars[0],month_num,year_num); + if(last_cal.nextSibling) + pn.insertBefore(newcal,last_cal.nextSibling); + else + pn.appendChild(newcal); + loadDates(month_num,year_num); + } + // Hide the first calendar + ec3.calendar_display=calendars[0].style.display; + calendars[0].style.display='none'; + + // Re-write the forward & back buttons. + rewrite_controls(month_num-calendars.length+11,month_num); + } + ec3.go_next=go_next; + + + /** Triggered when the XML load is complete. Checks that load is OK, and then + * updates calendar days. */ + function process_xml() + { + var busy=0; + for(var i=0; i0) + { + Ec3EditForm.catinput.checked=true; + Ec3EditForm.dummyinput.checked=true; + } + else + { + Ec3EditForm.catinput.checked=false; + Ec3EditForm.dummyinput.checked=false; + } + } + + Ec3EditForm.add_row=function() + { + // Get the second-from-last TR + var trs=Ec3EditForm.fieldset_se.getElementsByTagName('tr'); + var tr=trs[trs.length-2]; + // Make a new row, based on it & add it into the table. + var new_tr=tr.cloneNode(1); + + var selects=new_tr.getElementsByTagName('select'); + for(var i=0; i=0) + { + // Change the end time to preserve the event duration. + var start=input; + var end=document.getElementById(start.id.replace('_start_','_end_')); + var start_date0=parseInt(start.getAttribute('ec3_date')); + var end_date0=parseInt(end.getAttribute('ec3_date')); + var start_date1=Date.parseDate(start.value,fmt).getTime(); + start.setAttribute('ec3_date',start_date1); + var delta=start_date1 - start_date0; + var end_date1=end_date0+delta; + end.setAttribute('ec3_date',end_date1); + end.value=(new Date(end_date1)).print(fmt); + } + else if(input.id.indexOf('ec3_end_')>=0) + { + // Make sure that the start time is before the end time. + var start=document.getElementById(input.id.replace('_end_','_start_')); + var end=input; + var start_date0=parseInt(start.getAttribute('ec3_date')); + var end_date0=parseInt(end.getAttribute('ec3_date')); + var end_date1=Date.parseDate(end.value,fmt).getTime(); + end.setAttribute('ec3_date',end_date1); + if(start_date0>end_date1) + { + var start_date1=end_date1; + start.setAttribute('ec3_date',start_date1); + start.value=(new Date(start_date1)).print(fmt); + } + } + } + + function cal_changed(cal) + { + input_changed(cal.params.inputField); + } + +} // end namespace Ec3EditForm + + +// Export public functions from namespace. +Ec3EditForm(); diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/eventcalendar3.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/event-calendar/eventcalendar3.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,602 @@ +Event Calendar Options screen. +Author: Alex Tingle +Author URI: http://blog.firetree.net/ +*/ + +/* +Copyright (c) 2005-2008, Alex Tingle. + +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. +*/ + +require_once(dirname(__FILE__).'/options.php'); +require_once(dirname(__FILE__).'/date.php'); +require_once(dirname(__FILE__).'/day.php'); +require_once(dirname(__FILE__).'/template-functions.php'); +require_once(dirname(__FILE__).'/admin.php'); +require_once(dirname(__FILE__).'/tz.php'); + + +$ec3_today_id=str_replace('_0','_',ec3_strftime("ec3_%Y_%m_%d")); + + +/** Read the schedule table for the posts, and add an ec3_schedule array + * to each post. */ +function ec3_filter_the_posts($posts) +{ + if('array'!=gettype($posts) || 0==count($posts)) + return $posts; + + $post_ids=array(); + // Can't use foreach, because it gets *copies* (in PHP<5) + for($i=0; $iID); + $posts[$i]->ec3_schedule=array(); + } + global $ec3,$wp_query,$wpdb; + $schedule=$wpdb->get_results( + "SELECT post_id,start,end,allday,rpt,IF(end>='$ec3->today',1,0) AS active + FROM $ec3->schedule + WHERE post_id IN (".implode(',',$post_ids).") + ORDER BY start" + ); + // Flip $post_ids so that it maps post ID to position in the $posts array. + $post_ids=array_flip($post_ids); + if($post_ids && $schedule) + foreach($schedule as $s) + { + $i=$post_ids[$s->post_id]; + $posts[$i]->ec3_schedule[]=$s; + } + return $posts; +} + + +function ec3_action_wp_head() +{ + global $ec3,$month,$month_abbrev; +?> + + + + + + +nocss): ?> + + +advanced=false; +} + + +/** Rewrite date restrictions if the query is day- or category- specific. */ +function ec3_filter_posts_where(&$where) +{ + global $ec3,$wp_query,$wpdb; + + // To prevent breaking prior to WordPress v2.3 + if(function_exists('get_the_tags') && $wp_query->is_tag) + return $where; + + if($wp_query->is_page || $wp_query->is_single || $wp_query->is_admin) + return $where; + + if($wp_query->is_date): + + // Transfer events' 'post_date' restrictions to 'start' + $df='YEAR|MONTH|DAYOFMONTH|HOUR|MINUTE|SECOND|WEEK'; // date fields + $re="/ AND (($df)\($wpdb->posts\.post_date(,[^\)]+)?\) *= *('[^']+'|\d+\b))/i"; + if(preg_match_all($re,$where,$matches)): + $where_post_date = implode(' AND ',$matches[1]); + + $rdate=array(0,0,0); + $rtime=array(0,0,0); + for($i=0; $i='%2\$s')", + preg_replace("/\b$wpdb->posts\.post_date\b/",'start',$where_post_date), + str_replace( "'", '', implode('-',$rdate).' '.implode(':',$rtime) ) + ); + + $where=preg_replace($re,'',$where); + if(is_category($ec3->event_category)): + $where.=" AND ($where_start) "; + $ec3->order_by_start=true; + else: + $where.=" AND (($where_post_date) OR ($where_start)) "; + endif; + $ec3->join_ec3_sch=true; + endif; + + elseif($ec3->is_date_range): + + $where_start=array(); + if( !empty($ec3->range_from) ) + $where_start[]="end>='$ec3->range_from'"; + if( !empty($ec3->range_before) ) + $where_start[]="start<='$ec3->range_before'"; + + if($where_start): + $where_start=implode(' AND ',$where_start); + $where.=" AND ($where_start AND ec3_sch.post_id IS NOT NULL) "; + $ec3->order_by_start=true; + $ec3->join_ec3_sch=true; + endif; + + elseif($ec3->advanced): + if(is_category($ec3->event_category)): + + // Hide inactive events + $where.=" AND ec3_sch.post_id IS NOT NULL "; + $ec3->join_ec3_sch=true; + $ec3->join_only_active_events=true; + $ec3->order_by_start=true; + global $wp; + $wp->did_permalink=false; // Allows zero results without -> 404 + + elseif($wp_query->is_search): + + $where.=' AND (ec3_sch.post_id IS NULL OR ' + ."ec3_sch.end>='$ec3->today')"; + $ec3->join_ec3_sch=true; + + elseif(!$wp_query->is_category): + + // Hide all events + $where.=" AND ec3_sch.post_id IS NULL "; + $ec3->join_ec3_sch=true; + + endif; + endif; + + return $where; +} + +/** */ +function ec3_filter_posts_join(&$join) +{ + global $ec3,$wpdb; + // The necessary joins are decided upon in ec3_filter_posts_where(). + if($ec3->join_ec3_sch || $ec3->order_by_start) + { + $join.=" LEFT JOIN $ec3->schedule ec3_sch ON ec3_sch.post_id=id "; + if($ec3->join_only_active_events) + $join.="AND ec3_sch.end>='$ec3->today' "; + } + return $join; +} + +/** Change the order of event listings (only advanced mode). */ +function ec3_filter_posts_orderby(&$orderby) +{ + global $ec3, $wpdb; + if($ec3->order_by_start) + { + $regexp="/(?posts\.post_date\b( DESC\b| ASC\b)?/i"; + if(preg_match($regexp,$orderby,$match)) + { + if($match[1] && $match[1]==' DESC') + $orderby=preg_replace($regexp,'ec3_sch.start',$orderby); + else + $orderby=preg_replace($regexp,'ec3_sch.start DESC',$orderby); + } + else + { + // Someone's been playing around with the orderby - just overwrite it. + $orderby='ec3_sch.start'; + } + } + return $orderby; +} + + +/** Eliminate double-listings for posts with >1 scheduled event. */ +function ec3_filter_posts_groupby(&$groupby) +{ + global $ec3,$wpdb; + if($ec3->join_ec3_sch || $ec3->order_by_start) + { + if(empty($groupby)) + $groupby="{$wpdb->posts}.ID"; + if($ec3->is_listing) + $groupby.=',ec3_sch.sched_id'; + } + return $groupby; +} + + +/** Add a sched_id field, if we want a listing. */ +function ec3_filter_posts_fields(&$fields) +{ + global $ec3; + if($ec3->is_listing && ($ec3->join_ec3_sch || $ec3->order_by_start)) + $fields.=',ec3_sch.sched_id'; + return $fields; +} + + +function ec3_filter_query_vars($wpvarstoreset) +{ + if(isset($_GET['ec3_xml'])) + ec3_filter_query_vars_xml(); + if(isset($_GET['ec3_ical']) || isset($_GET['ec3_vcal'])) + ec3_filter_query_vars_ical(); + if(isset($_GET['ec3_dump'])) + ec3_filter_query_vars_dump(); + // else... + $wpvarstoreset[]='ec3_today'; + $wpvarstoreset[]='ec3_days'; + $wpvarstoreset[]='ec3_from'; // ?? Deprecated + $wpvarstoreset[]='ec3_after'; + $wpvarstoreset[]='ec3_before'; + $wpvarstoreset[]='ec3_listing'; + // Turn-off broken canonical redirection when both m= & cat= are set. + if(isset($_GET['m']) && isset($_GET['cat'])) + remove_action('template_redirect','redirect_canonical'); + return $wpvarstoreset; +} + + +/** If the parameter ec3_xml is set, then brutally hijack the page and replace + * it with XML calendar data. This is used by XmlHttpRequests from the + * active calendar JavaScript. */ +function ec3_filter_query_vars_xml() +{ + $components=explode('_',$_GET['ec3_xml']); + if(count($components)==2) + { + $date=new ec3_Date($components[0],$components[1]); + $end=$date->next_month(); + $calendar_days=ec3_util_calendar_days($date->month_id(),$end->month_id()); + @header('Content-type: text/xml'); + echo ''; + echo "\n"; + foreach($calendar_days as $day_id=>$day) + { + if('today'==$day_id) + $dc=explode('_', ec3_strftime(":_%Y_%m_%d") ); + else + $dc=explode('_',$day_id); + if(count($dc)==4) + { + $date->day_num=$dc[3]; + $titles=$day->get_titles(); + echo "\n"; + } + } + echo "\n"; + exit(0); + } +} + + +/** If the parameter ec3_ical is set, then brutally hijack the page and replace + * it with iCalendar data. + * (Includes fixes contributed by Matthias Tarasiewicz & Marc Schumann.)*/ +function ec3_filter_query_vars_ical($wpvarstoreset=NULL) +{ + // + // Generate the iCalendar + + $name=preg_replace('/([\\,;])/','\\\\$1',get_bloginfo_rss('name')); + $filename=preg_replace('/[^0-9a-zA-Z]/','',$name).'.ics'; + + header("Content-Type: text/calendar; charset=" . get_option('blog_charset')); + header("Content-Disposition: inline; filename=$filename"); + 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'); + + echo "BEGIN:VCALENDAR\r\n"; + echo "VERSION:2.0\r\n"; + echo "X-WR-CALNAME:$name\r\n"; + + global $ec3,$wpdb; + + $calendar_entries = $wpdb->get_results( + "SELECT + post_id, + sched_id, + post_title, + post_excerpt, + DATE_FORMAT(start,IF(allday,'%Y%m%d','%Y-%m-%d %H:%i')) AS dt_start, + IF( allday, + DATE_FORMAT(DATE_ADD(end, INTERVAL 1 DAY),'%Y%m%d'), + DATE_FORMAT(end,'%Y-%m-%d %H:%i') + ) AS dt_end, + $ec3->wp_user_nicename AS user_nicename, + IF(allday,'TRANSPARENT','OPAQUE') AS transp, + allday + FROM $wpdb->posts p + LEFT JOIN $wpdb->users u ON p.post_author=u.ID + INNER JOIN $ec3->schedule s ON p.id=s.post_id + WHERE post_status='publish' + ORDER BY start" + ); + + if($calendar_entries) + foreach($calendar_entries as $entry) + { + // ?? Should add line folding at 75 octets at some time as per RFC 2445. + $summary=preg_replace('/([\\,;])/','\\\\$1',$entry->post_title); + $permalink=get_permalink($entry->post_id); + + echo "BEGIN:VEVENT\r\n"; + echo "SUMMARY:$summary\r\n"; + echo "URL;VALUE=URI:$permalink\r\n"; + echo "UID:$entry->sched_id-$permalink\r\n"; + $description=''; + if(strlen($entry->post_excerpt)>0) + { + // I can't get iCal to understand iCalendar encoding. + // So just strip out newlines here: + $description=preg_replace('/[ \r\n]+/',' ',$entry->post_excerpt.' '); + $description=preg_replace('/([\\,;])/','\\\\$1',$description); + } + $description.='['.sprintf(__('by: %s'),$entry->user_nicename).']'; + echo "DESCRIPTION:$description\r\n"; + echo "TRANSP:$entry->transp\r\n"; // for availability. + if($entry->allday) + { + echo "DTSTART;VALUE=DATE:$entry->dt_start\r\n"; + echo "DTEND;VALUE=DATE:$entry->dt_end\r\n"; + } + else + { + // Convert timestamps to UTC + echo sprintf("DTSTART;VALUE=DATE-TIME:%s\r\n",ec3_to_utc($entry->dt_start)); + echo sprintf("DTEND;VALUE=DATE-TIME:%s\r\n",ec3_to_utc($entry->dt_end)); + } + echo "END:VEVENT\r\n"; + } + + echo "END:VCALENDAR\r\n"; + exit(0); +} + + +/** Test function. Helps to diagnose problems. + * The output from this feature has been chosen to NOT reveal any private + * information, yet be of real use for debugging. + */ +function ec3_filter_query_vars_dump($wpvarstoreset=NULL) +{ + global $ec3, $wpdb; + echo "
    \n";
    +  echo "POSTS:\n";
    +  print_r( $wpdb->get_results(
    +    "SELECT ID,post_date,post_date_gmt,post_status,post_name,post_modified,
    +       post_modified_gmt,post_type
    +     FROM $wpdb->posts ORDER BY ID"
    +  ));
    +  if($ec3->wp_have_categories)
    +  {
    +    echo "POST2CAT:\n";
    +    print_r($wpdb->get_results("SELECT * FROM $wpdb->post2cat ORDER BY post_id"));
    +  }
    +  echo "EC3_SCHEDULE:\n";
    +  print_r($wpdb->get_results("SELECT * FROM $ec3->schedule ORDER BY post_id"));
    +  echo "EC3 OPTIONS:\n";
    +  print_r($wpdb->get_results(
    +    "SELECT option_name,option_value
    +     FROM $wpdb->options WHERE option_name LIKE 'ec3_%'"
    +  ));
    +  echo "ACTIVE PLUGINS:\n";
    +  print_r( $wpdb->get_var(
    +    "SELECT option_value
    +     FROM $wpdb->options WHERE option_name='active_plugins'"
    +  ));
    +  echo "
    \n"; + exit(0); +} + + +/** Add support for new query vars: + * + * - ec3_today : sets date to today. + * - ec3_days=N : Finds events for the next N days. + * - ec3_after=YYYY-MM-DD : limits search to events on or after YYYY-MM-DD. + * - ec3_before=YYYY-MM-DD : limits search to events on or before YYYY-MM-DD. + */ +function ec3_filter_parse_query($wp_query) +{ + global $ec3; + // query_posts() can be called multiple times. So reset all our variables. + $ec3->reset_query(); + // Deal with EC3-specific parameters. + if( !empty($wp_query->query_vars['ec3_listing']) ) + { + $ec3->is_listing=true; + } + if( !empty($wp_query->query_vars['ec3_today']) ) + { + // Force the value of 'm' to today's date. + $wp_query->query_vars['m']=ec3_strftime('%Y%m%d'); + $wp_query->is_date=true; + $wp_query->is_day=true; + $wp_query->is_month=true; + $wp_query->is_year=true; + $ec3->is_today=true; + return; + } + if( !empty($wp_query->query_vars['ec3_days']) ) + { + // Show the next N days. + $ec3->days=intval($wp_query->query_vars['ec3_days']); + $secs=$ec3->days*24*3600; + $wp_query->query_vars['ec3_after' ]=ec3_strftime('%Y_%m_%d'); + $wp_query->query_vars['ec3_before']=ec3_strftime('%Y_%m_%d',time()+$secs); + } + + // Get values (if any) for after ($a) & before ($b). + if( !empty($wp_query->query_vars['ec3_after']) ) + $a=$wp_query->query_vars['ec3_after']; + else if( !empty($wp_query->query_vars['ec3_from']) ) + $a=$wp_query->query_vars['ec3_from']; + $b=$wp_query->query_vars['ec3_before']; + if( $a=='today' ) + $a=ec3_strftime('%Y-%m-%d'); + if( $b=='today' ) + $b=ec3_strftime('%Y-%m-%d'); + + $re='/\d\d\d\d[-_]\d?\d[-_]\d?\d/'; + if( !empty($a) && preg_match($re,$a) || + !empty($b) && preg_match($re,$b) ) + { + // Kill any other date parameters. + foreach(array('m','second','minute','hour','day','monthnum','year','w') + as $param) + { + unset($wp_query->query_vars[$param]); + } + $wp_query->is_date=false; + $wp_query->is_time=false; + $wp_query->is_day=false; + $wp_query->is_month=false; + $wp_query->is_year=false; + $ec3->is_date_range=true; + $ec3->range_from =$a; + $ec3->range_before=$b; + } +} + + +function ec3_filter_the_content(&$post_content) +{ + return ec3_get_schedule() . $post_content; +} + + +/** Replaces default wp_trim_excerpt filter. Fakes an excerpt if needed. + * Adds a textual summary of the schedule to the excerpt.*/ +function ec3_get_the_excerpt($text) +{ + global $post; + + if(empty($text)) + { + $text=$post->post_content; + if(!$post->ec3_schedule) + $text=apply_filters('the_content', $text); + $text=str_replace(']]>', ']]>', $text); + $text=strip_tags($text); + $excerpt_length=55; + $words=explode(' ', $text, $excerpt_length + 1); + if(count($words) > $excerpt_length) + { + array_pop($words); + array_push($words, '[...]'); + $text=implode(' ', $words); + } + } + + if($post->ec3_schedule) + { + $schedule=ec3_get_schedule('%s; ',"%1\$s %3\$s %2\$s. ",'[ %s] '); + /* $text=$schedule.$text;*/ + } + + return $text; +} + + +// +// Hook in... +if($ec3->event_category) +{ + add_action('wp_head', 'ec3_action_wp_head'); + add_action('admin_head', 'ec3_action_admin_head'); + add_filter('query_vars', 'ec3_filter_query_vars'); + add_filter('parse_query', 'ec3_filter_parse_query'); + add_filter('posts_where', 'ec3_filter_posts_where',11); + add_filter('posts_join', 'ec3_filter_posts_join'); + add_filter('posts_groupby','ec3_filter_posts_groupby'); + add_filter('posts_fields', 'ec3_filter_posts_fields'); + add_filter('the_posts', 'ec3_filter_the_posts'); + + if(!$ec3->hide_event_box) + add_filter('the_content','ec3_filter_the_content',20); + + remove_filter('get_the_excerpt', 'wp_trim_excerpt'); + add_filter('get_the_excerpt', 'ec3_get_the_excerpt'); + + if($ec3->advanced) + add_filter('posts_orderby','ec3_filter_posts_orderby',11); +} + +?> diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/gettext/ec3-ca_ES.mo Binary file web/wp-content/plugins/event-calendar/gettext/ec3-ca_ES.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/gettext/ec3-ca_ES.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/event-calendar/gettext/ec3-ca_ES.po Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,281 @@ +# Event Calendar plug-in for WordPress. +# Copyright (C) 2006, Alex Tingle +# This file is distributed under the same license as the wpcal package. +# Alex Tingle , 2005. +# , fuzzy +# +# +msgid "" +msgstr "" +"Project-Id-Version: wpcal 3.1.1._rc1\n" +"Report-Msgid-Bugs-To: eventcalendar@firetree.net\n" +"POT-Creation-Date: 2008-10-24 12:00+0100\n" +"PO-Revision-Date: 2007-02-17 17:30+0100\n" +"Last-Translator: cubells \n" +"Language-Team: Catalan \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: admin.php:67 admin.php:393 +msgid "Event Editor" +msgstr "Editor d'esdeveniments" + +#: admin.php:108 +msgid "Start" +msgstr "Comença" + +#: admin.php:109 +msgid "End" +msgstr "Acaba" + +#: admin.php:110 +msgid "All Day" +msgstr "Durant tot el dia" + +#: admin.php:111 +msgid "Repeat" +msgstr "Repeteix" + +#: admin.php:132 +msgid "Add a new event" +msgstr "Afegeix un nou esdeveniment" + +#: admin.php:178 +msgid "Delete this event" +msgstr "Esborra aquest esdeveniment" + +#: admin.php:316 +msgid "Error upgrading database for EventCalendar plugin." +msgstr "Error actualitzant la base de dades del connector EventCalendar" + +#: admin.php:347 +#, php-format +msgid "Upgraded database to EventCalendar Version %s" +msgstr "Actualitzada la base de dades de l'EventCalendar Versió %s" + +#: admin.php:351 +msgid "Table already existed" +msgstr "La Taula ja existeix" + +#: admin.php:379 admin.php:446 +msgid "Event Calendar Options" +msgstr "Opcions del Calendari d'Esdeveniments" + +#: admin.php:450 +msgid "Easter Egg" +msgstr "" + +#: admin.php:452 upgrade-posts.php:124 +msgid "Upgrade Event Posts" +msgstr "" + +#: admin.php:459 +msgid "Event category" +msgstr "Categoria per als esdeveniments" + +#: admin.php:469 +msgid "" +"Event posts are put into this category for you. Don't make this your default " +"post category." +msgstr "" +"Els esdeveniments són agefits en aquesta categoria de manera automàtica. No " +"hauria de ser la categoria predeterminada per a les teves entrades." + +#: admin.php:475 +msgid "Show schedule within posts" +msgstr "Pel que fa als horaris dintre de les entrades" + +#: admin.php:479 +msgid "Show Schedule" +msgstr "Mostra els horaris" + +#: admin.php:482 +msgid "Hide Schedule" +msgstr "Amaga els horaris" + +#: admin.php:489 +msgid "Show events as blog entries" +msgstr "Pel que fa als esdeveniments i les entrades" + +#: admin.php:493 +msgid "Events are Normal Posts" +msgstr "Els esdeveniments són entrades normals" + +#: admin.php:496 +msgid "Keep Events Separate" +msgstr "Manté els esdeveniments separats" + +#: admin.php:500 +msgid "" +"Keep Events Separate: the Event Category page shows future events, in date " +"order. Events do not appear on front page." +msgstr "" +"Manté els esdeveniments separats: la pàgina de la categoria dels " +"esdeveniments mostra els esdeveniments futurs ordenats per data. Els " +"esdeveniments no apareixen a la pàgina principal." + +#: admin.php:506 admin.php:518 +msgid "Timezone" +msgstr "Zona horària" + +#: admin.php:510 +msgid "unknown" +msgstr "Desconeguda" + +#: admin.php:514 +msgid "" +"You cannot change your timezone. Turn off PHP's 'safe mode' or upgrade to " +"PHP5." +msgstr "" +"No pots canviar la teva zona horària. Deshabilita el 'safe mode' del PHP o " +"actualitza a PHP5." + +#: admin.php:530 +msgid "Calendar Display" +msgstr "Mostra el Calendari" + +#: admin.php:535 +msgid "Number of months" +msgstr "Nombre de mesos" + +#: admin.php:542 +msgid "Show all categories in calendar" +msgstr "Mostra totes les categories al calendari" + +#: admin.php:546 +msgid "Only Show Events" +msgstr "Mostra solament els esdeveniments" + +#: admin.php:549 +msgid "Show All Posts" +msgstr "Mostra totes les entrades" + +#: admin.php:556 +msgid "Show day names as" +msgstr "Mostra els noms dels dies com" + +#: admin.php:560 +msgid "Single Letter" +msgstr "Una lletra simple" + +#: admin.php:563 +msgid "3-Letter Abbreviation" +msgstr "Una abreviatura de 3 lletres" + +#: admin.php:566 +msgid "Full Day Name" +msgstr "El nom del dia sencer" + +#: admin.php:573 +msgid "Show Event Calendar logo" +msgstr "Pel que fa al logotip del Calendari" + +#: admin.php:577 +msgid "Show Logo" +msgstr "Mostra el logotip" + +#: admin.php:580 +msgid "Hide Logo" +msgstr "Amaga el logotip" + +#: admin.php:587 +msgid "Position of navigation links" +msgstr "Pel que fa a la posició dels enllaços de navegació" + +#: admin.php:591 +msgid "Above Calendar" +msgstr "Damunt del calendari" + +#: admin.php:594 +msgid "Below Calendar" +msgstr "Sota el calendari" + +#: admin.php:597 +msgid "Hidden" +msgstr "Ocults" + +#: admin.php:601 +msgid "" +"The navigation links are more usable when they are above the calendar, but " +"you might prefer them below or hidden for aesthetic reasons." +msgstr "" +"Els enllaços de navegació són més usables quan estan a sobre del calendari, " +"però pots preferir-los per sota o ocults per raons estètiques." + +#: admin.php:607 +msgid "Popup event lists" +msgstr "Finestres emergents de la llista d'esdeveniments" + +#: admin.php:611 +msgid "Show Popups" +msgstr "Mostra finestres emergents" + +#: admin.php:614 +msgid "Hide Popups" +msgstr "Oculta les finestres emergents" + +#: admin.php:618 +msgid "You might want to disable popups if you use Nicetitles." +msgstr "" +"Pots no voler habilitar les finestres emergents si fas ús de Nicetitles." + +#: template-functions.php:29 +msgid "You must choose an event category." +msgstr "Has de triar una categoria per a l'esdeveniment" + +#: template-functions.php:32 widget.php:84 widget.php:162 +#: K2/ec3_sidebar_module.php:64 +msgid "Go to Event Calendar Options" +msgstr "Vés a les opcions del Calendari d'Esdeveniments" + +#: template-functions.php:91 +msgid "Subscribe to iCalendar." +msgstr "Subscriu-te al iCalendar" + +#: template-functions.php:166 template-functions.php:448 +msgid "all day" +msgstr "durant tot el dia" + +#: template-functions.php:284 widget.php:93 widget.php:101 +#: K2/ec3_sidebar_module.php:31 +msgid "Event Calendar" +msgstr "Calendari d'Esdeveniments" + +#: template-functions.php:364 widget.php:172 widget.php:180 +#: K2/ec3_sidebar_module.php:71 K2/ec3_sidebar_module.php:77 +msgid "Upcoming Events" +msgstr "Esdeveniments futurs" + +#: template-functions.php:469 +msgid "No events." +msgstr "No hi ha esdeveniments" + +#: template-functions.php:506 template-functions.php:520 +#: template-functions.php:532 +msgid "to" +msgstr "a" + +#: upgrade-posts.php:39 +msgid "Post upgraded." +msgstr "" + +#: upgrade-posts.php:40 +#, php-format +msgid "%d posts upgraded." +msgstr "" + +#: widget.php:96 +msgid "Display upcoming events in a dynamic calendar." +msgstr "" + +#: widget.php:153 +msgid "Number of events:" +msgstr "Nombre d'esdeveniments" + +#: widget.php:175 +msgid "Display upcoming events as a list." +msgstr "" + +#~ msgid "EXAMPLE SIDEBAR CODE:" +#~ msgstr "EXEMPLE DE CODI PER ALS MENUS LATERALS" diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/gettext/ec3-cs_CZ.mo Binary file web/wp-content/plugins/event-calendar/gettext/ec3-cs_CZ.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/gettext/ec3-cs_CZ.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/event-calendar/gettext/ec3-cs_CZ.po Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,279 @@ +# Event Calendar plug-in for WordPress. +# Copyright (C) 2006, Alex Tingle +# This file is distributed under the same license as the wpcal package. +# Alex Tingle , 2005. +# , fuzzy +# +# +msgid "" +msgstr "" +"Project-Id-Version: wpcal 3.1.1._rc1\n" +"Report-Msgid-Bugs-To: eventcalendar@firetree.net\n" +"POT-Creation-Date: 2008-10-24 12:00+0100\n" +"PO-Revision-Date: 2008-04-29 14:02+0100\n" +"Last-Translator: Michal Franěk \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: admin.php:67 admin.php:393 +msgid "Event Editor" +msgstr "Editor událostí" + +#: admin.php:108 +msgid "Start" +msgstr "Začátek" + +#: admin.php:109 +msgid "End" +msgstr "Konec" + +#: admin.php:110 +msgid "All Day" +msgstr "Celý den" + +#: admin.php:111 +msgid "Repeat" +msgstr "Opakovat" + +#: admin.php:132 +msgid "Add a new event" +msgstr "Přidej novou událost" + +#: admin.php:178 +msgid "Delete this event" +msgstr "Smaž tuto událost" + +#: admin.php:316 +msgid "Error upgrading database for EventCalendar plugin." +msgstr "Chyba při upgrade databáze pro rozšíření EventCalendar." + +#: admin.php:347 +#, php-format +msgid "Upgraded database to EventCalendar Version %s" +msgstr "Databáze byla upgradována pro EventCalendar verze %s" + +#: admin.php:351 +msgid "Table already existed" +msgstr "Tabulka již existovala." + +#: admin.php:379 admin.php:446 +msgid "Event Calendar Options" +msgstr "Možnosti \"Kalendáře událostí\"" + +#: admin.php:450 +msgid "Easter Egg" +msgstr "" + +#: admin.php:452 upgrade-posts.php:124 +msgid "Upgrade Event Posts" +msgstr "" + +#: admin.php:459 +msgid "Event category" +msgstr "Rubrika událostí" + +#: admin.php:469 +msgid "" +"Event posts are put into this category for you. Don't make this your default " +"post category." +msgstr "" +"Příspěvky-události jsou automaticky vloženy do této rubriky. Nepoužívejte ji " +"jako svou výchozí rubriku pro příspěvky." + +#: admin.php:475 +msgid "Show schedule within posts" +msgstr "Ukaž rozvrh v příspěvcích" + +#: admin.php:479 +msgid "Show Schedule" +msgstr "Ukaž rozvrh" + +#: admin.php:482 +msgid "Hide Schedule" +msgstr "Skryj rozvrh" + +#: admin.php:489 +msgid "Show events as blog entries" +msgstr "Ukazuj události jako příspěvky blogu" + +#: admin.php:493 +msgid "Events are Normal Posts" +msgstr "Události jsou jako obvyklé příspěvky" + +#: admin.php:496 +msgid "Keep Events Separate" +msgstr "Udržuj události oddělené" + +#: admin.php:500 +msgid "" +"Keep Events Separate: the Event Category page shows future events, in date " +"order. Events do not appear on front page." +msgstr "" +"Udržuj události oddělené: Stránka rubriky událostí bude ukazujovat události " +"v chronologickém pořadí. Události se nebudou objevovat na úvodní stránce." + +#: admin.php:506 admin.php:518 +msgid "Timezone" +msgstr "Časové pásmo" + +#: admin.php:510 +msgid "unknown" +msgstr "neznámý" + +#: admin.php:514 +msgid "" +"You cannot change your timezone. Turn off PHP's 'safe mode' or upgrade to " +"PHP5." +msgstr "" +"Není možno změnit časové pásmo. Je třeba vypnout PHP \"safe mode\" nebo " +"upgradovat na PHP5." + +#: admin.php:530 +msgid "Calendar Display" +msgstr "Vzhled kalendáře" + +#: admin.php:535 +msgid "Number of months" +msgstr "Počet měsíců" + +#: admin.php:542 +msgid "Show all categories in calendar" +msgstr "Ukazuj všechny rubriky v kalendáři" + +#: admin.php:546 +msgid "Only Show Events" +msgstr "Ukazuj pouze události" + +#: admin.php:549 +msgid "Show All Posts" +msgstr "Ukazuj všechny příspěvky" + +#: admin.php:556 +msgid "Show day names as" +msgstr "Ukazuj jména dní jako" + +#: admin.php:560 +msgid "Single Letter" +msgstr "Jedno písmeno" + +#: admin.php:563 +msgid "3-Letter Abbreviation" +msgstr "Trojpísmenná zkratka" + +#: admin.php:566 +msgid "Full Day Name" +msgstr "Celé jméno dne" + +#: admin.php:573 +msgid "Show Event Calendar logo" +msgstr "Ukazuj logo Event Calendar" + +#: admin.php:577 +msgid "Show Logo" +msgstr "Ukazuj Logo" + +#: admin.php:580 +msgid "Hide Logo" +msgstr "Skryj logo" + +#: admin.php:587 +msgid "Position of navigation links" +msgstr "Pozice navigačních odkazů" + +#: admin.php:591 +msgid "Above Calendar" +msgstr "Nad kalendářem" + +#: admin.php:594 +msgid "Below Calendar" +msgstr "Pod kalendářem" + +#: admin.php:597 +msgid "Hidden" +msgstr "Skryté" + +#: admin.php:601 +msgid "" +"The navigation links are more usable when they are above the calendar, but " +"you might prefer them below or hidden for aesthetic reasons." +msgstr "" +"Navigační odkazy je optimální zobrazovat nad kalendářem, ovšem z estetického " +"hlediska je můžete chtít pod ním či plně skryté." + +#: admin.php:607 +msgid "Popup event lists" +msgstr "Vyskovací okna událostí" + +#: admin.php:611 +msgid "Show Popups" +msgstr "Ukazuj vyskakovací okna" + +#: admin.php:614 +msgid "Hide Popups" +msgstr "Neukazuj vyskakovací okna" + +#: admin.php:618 +msgid "You might want to disable popups if you use Nicetitles." +msgstr "" +"Pokud používate efekty jako jsou Nicetitles, je lepší vyskakovací okna skrýt." + +#: template-functions.php:29 +msgid "You must choose an event category." +msgstr "Musíte zvolit rubriku událostí." + +#: template-functions.php:32 widget.php:84 widget.php:162 +#: K2/ec3_sidebar_module.php:64 +msgid "Go to Event Calendar Options" +msgstr "Jdi na možnosti \"Kalendáře událostí\"." + +#: template-functions.php:91 +msgid "Subscribe to iCalendar." +msgstr "Sledovat kalendář pomocí iCalendar." + +#: template-functions.php:166 template-functions.php:448 +msgid "all day" +msgstr "celý den" + +#: template-functions.php:284 widget.php:93 widget.php:101 +#: K2/ec3_sidebar_module.php:31 +msgid "Event Calendar" +msgstr "Kalendář událostí" + +#: template-functions.php:364 widget.php:172 widget.php:180 +#: K2/ec3_sidebar_module.php:71 K2/ec3_sidebar_module.php:77 +msgid "Upcoming Events" +msgstr "Nadcházející události" + +#: template-functions.php:469 +msgid "No events." +msgstr "Nejsou žádné události." + +#: template-functions.php:506 template-functions.php:520 +#: template-functions.php:532 +msgid "to" +msgstr "až" + +#: upgrade-posts.php:39 +msgid "Post upgraded." +msgstr "" + +#: upgrade-posts.php:40 +#, php-format +msgid "%d posts upgraded." +msgstr "" + +#: widget.php:96 +msgid "Display upcoming events in a dynamic calendar." +msgstr "" + +#: widget.php:153 +msgid "Number of events:" +msgstr "Počet událostí" + +#: widget.php:175 +msgid "Display upcoming events as a list." +msgstr "" + +#~ msgid "EXAMPLE SIDEBAR CODE:" +#~ msgstr "UKÁZKA KÓDU PRO POSTRANNÍ LIŠTU." diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/gettext/ec3-de_DE.mo Binary file web/wp-content/plugins/event-calendar/gettext/ec3-de_DE.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/gettext/ec3-de_DE.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/event-calendar/gettext/ec3-de_DE.po Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,299 @@ +# Event Calendar plug-in for WordPress. +# Copyright (C) 2006, Alex Tingle +# This file is distributed under the same license as the wpcal package. +# Alex Tingle , 2005. +# +msgid "" +msgstr "" +"Project-Id-Version: wpcal 3.1._pre15\n" +"Report-Msgid-Bugs-To: eventcalendar@firetree.net\n" +"POT-Creation-Date: 2008-10-24 12:00+0100\n" +"PO-Revision-Date: 2006-10-05 20:36+0100\n" +"Last-Translator: Marc Schumann \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" + +#: admin.php:67 admin.php:393 +#, fuzzy +msgid "Event Editor" +msgstr "Terminplan" + +#: admin.php:108 +msgid "Start" +msgstr "Beginn" + +#: admin.php:109 +msgid "End" +msgstr "Ende" + +#: admin.php:110 +msgid "All Day" +msgstr "Ganztägig" + +#: admin.php:111 +msgid "Repeat" +msgstr "Zyklisch" + +#: admin.php:132 +msgid "Add a new event" +msgstr "" + +#: admin.php:178 +msgid "Delete this event" +msgstr "" + +#: admin.php:316 +msgid "Error upgrading database for EventCalendar plugin." +msgstr "" +"Bei der Anpassung der Datebank für das EventCalendar-Plugin ist ein Fehler " +"aufgetreten." + +#: admin.php:347 +#, php-format +msgid "Upgraded database to EventCalendar Version %s" +msgstr "Datenbank für EventCalendar Version %s angepasst" + +#: admin.php:351 +msgid "Table already existed" +msgstr "Die Tabelle existierte bereits" + +#: admin.php:379 admin.php:446 +msgid "Event Calendar Options" +msgstr "Einstellungen für EventCalendar" + +#: admin.php:450 +msgid "Easter Egg" +msgstr "" + +#: admin.php:452 upgrade-posts.php:124 +msgid "Upgrade Event Posts" +msgstr "" + +#: admin.php:459 +msgid "Event category" +msgstr "Terminkategorie" + +#: admin.php:469 +msgid "" +"Event posts are put into this category for you. Don't make this your default " +"post category." +msgstr "" + +#: admin.php:475 +#, fuzzy +msgid "Show schedule within posts" +msgstr "Zeige Termin-Box in Beiträgen" + +#: admin.php:479 +msgid "Show Schedule" +msgstr "Zeigen" + +#: admin.php:482 +msgid "Hide Schedule" +msgstr "Verbergen" + +#: admin.php:489 +msgid "Show events as blog entries" +msgstr "Zeige Termine als Beiträge" + +#: admin.php:493 +msgid "Events are Normal Posts" +msgstr "Termine sind normale Beiträge" + +#: admin.php:496 +msgid "Keep Events Separate" +msgstr "Termine separat halten" + +#: admin.php:500 +msgid "" +"Keep Events Separate: the Event Category page shows future events, in date " +"order. Events do not appear on front page." +msgstr "" +"Termine separat halten: die Seite der Terminkategorie zeigt zukünftige " +"Termine in zeitlicher Reihenfolge. Termine sind auf der Hauptseite nicht " +"sichtbar." + +#: admin.php:506 admin.php:518 +msgid "Timezone" +msgstr "" + +#: admin.php:510 +msgid "unknown" +msgstr "" + +#: admin.php:514 +msgid "" +"You cannot change your timezone. Turn off PHP's 'safe mode' or upgrade to " +"PHP5." +msgstr "" + +#: admin.php:530 +msgid "Calendar Display" +msgstr "Kalenderanzeige" + +#: admin.php:535 +msgid "Number of months" +msgstr "Anzahl angezeigter Monate" + +#: admin.php:542 +msgid "Show all categories in calendar" +msgstr "Alle Kategorien im Kalender anzeigen" + +#: admin.php:546 +msgid "Only Show Events" +msgstr "Nur Termine zeigen" + +#: admin.php:549 +msgid "Show All Posts" +msgstr "Alle Beiträge zeigen" + +#: admin.php:556 +msgid "Show day names as" +msgstr "Zeige Wochentagsnamen als" + +#: admin.php:560 +msgid "Single Letter" +msgstr "Ein Buchstabe" + +#: admin.php:563 +msgid "3-Letter Abbreviation" +msgstr "Drei-Buchstaben-Abkürzung" + +#: admin.php:566 +msgid "Full Day Name" +msgstr "Vollständiger Wochentagsname" + +#: admin.php:573 +msgid "Show Event Calendar logo" +msgstr "Zeige das EventCalendar-Logo" + +#: admin.php:577 +msgid "Show Logo" +msgstr "Logo zeigen" + +#: admin.php:580 +msgid "Hide Logo" +msgstr "Logo verbergen" + +#: admin.php:587 +msgid "Position of navigation links" +msgstr "Position der Navigationsverweise" + +#: admin.php:591 +msgid "Above Calendar" +msgstr "Über dem Kalender" + +#: admin.php:594 +msgid "Below Calendar" +msgstr "Unter dem Kalender" + +#: admin.php:597 +msgid "Hidden" +msgstr "Verborgen" + +#: admin.php:601 +msgid "" +"The navigation links are more usable when they are above the calendar, but " +"you might prefer them below or hidden for aesthetic reasons." +msgstr "" +"Die Navigationsverweise sind etwas erreichbarer, wenn sie oberhalb des " +"Kalenders liegen, aber aus ästhetischen Gründen möchten Sie sie " +"möglicherweise unterhalb des Kalenders anordnen." + +#: admin.php:607 +msgid "Popup event lists" +msgstr "Aufklappfenster mit Terminlisten anzeigen" + +#: admin.php:611 +msgid "Show Popups" +msgstr "Aufklappfenster zeigen" + +#: admin.php:614 +msgid "Hide Popups" +msgstr "Aufklappfenster verbergen" + +#: admin.php:618 +msgid "You might want to disable popups if you use Nicetitles." +msgstr "" +"Wenn Sie Nicetitles im Einsatz haben, werden Sie möglicherweise auf " +"Aufklappfenster verzichten wollen." + +#: template-functions.php:29 +msgid "You must choose an event category." +msgstr "" + +#: template-functions.php:32 widget.php:84 widget.php:162 +#: K2/ec3_sidebar_module.php:64 +msgid "Go to Event Calendar Options" +msgstr "Die EventCalendar-Einstellungen anzeigen" + +#: template-functions.php:91 +msgid "Subscribe to iCalendar." +msgstr "Den iCalendar abonnieren." + +#: template-functions.php:166 template-functions.php:448 +msgid "all day" +msgstr "ganztägig" + +#: template-functions.php:284 widget.php:93 widget.php:101 +#: K2/ec3_sidebar_module.php:31 +msgid "Event Calendar" +msgstr "Terminkalender" + +#: template-functions.php:364 widget.php:172 widget.php:180 +#: K2/ec3_sidebar_module.php:71 K2/ec3_sidebar_module.php:77 +msgid "Upcoming Events" +msgstr "Nächste Termine" + +#: template-functions.php:469 +msgid "No events." +msgstr "Keine Termine." + +#: template-functions.php:506 template-functions.php:520 +#: template-functions.php:532 +msgid "to" +msgstr "bis" + +#: upgrade-posts.php:39 +msgid "Post upgraded." +msgstr "" + +#: upgrade-posts.php:40 +#, php-format +msgid "%d posts upgraded." +msgstr "" + +#: widget.php:96 +msgid "Display upcoming events in a dynamic calendar." +msgstr "" + +#: widget.php:153 +msgid "Number of events:" +msgstr "" + +#: widget.php:175 +msgid "Display upcoming events as a list." +msgstr "" + +#, fuzzy +#~ msgid "Update Options" +#~ msgstr "Aktualisierungsoptionen" + +#~ msgid "Schedule Editor" +#~ msgstr "Terminplan" + +#~ msgid "Show" +#~ msgstr "Zeigen" + +#~ msgid "Hide" +#~ msgstr "Verbergen" + +#~ msgid "EventCalendar module" +#~ msgstr "EventCalendar-Modul" + +#~ msgid "Options set." +#~ msgstr "Einstellungen gesichert." diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/gettext/ec3-dk_DK.mo Binary file web/wp-content/plugins/event-calendar/gettext/ec3-dk_DK.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/gettext/ec3-dk_DK.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/event-calendar/gettext/ec3-dk_DK.po Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,278 @@ +# Event Calendar plug-in for WordPress. +# Copyright (C) 2006, Alex Tingle +# This file is distributed under the same license as the wpcal package. +# Alex Tingle , 2005. +# +msgid "" +msgstr "" +"Project-Id-Version: wpcal 3.1.1._rc1\n" +"Report-Msgid-Bugs-To: eventcalendar@firetree.net\n" +"POT-Creation-Date: 2008-10-24 12:00+0100\n" +"PO-Revision-Date: 2007-04-16 17:40+0100\n" +"Last-Translator: Simon Bognolo \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: admin.php:67 admin.php:393 +msgid "Event Editor" +msgstr "Begivenhedsredigering" + +#: admin.php:108 +msgid "Start" +msgstr "Start" + +#: admin.php:109 +msgid "End" +msgstr "Slut" + +#: admin.php:110 +msgid "All Day" +msgstr "Hele dagen" + +#: admin.php:111 +msgid "Repeat" +msgstr "Gentag" + +#: admin.php:132 +msgid "Add a new event" +msgstr "Tilføj en ny begivenhed" + +#: admin.php:178 +msgid "Delete this event" +msgstr "Slet denne begivenhed" + +#: admin.php:316 +msgid "Error upgrading database for EventCalendar plugin." +msgstr "" +"Der skete en fejl under opgraderingen af databasen forEventCalendars plugin." + +#: admin.php:347 +#, php-format +msgid "Upgraded database to EventCalendar Version %s" +msgstr "Opgraderede databasen til EvenCalendar version %s" + +#: admin.php:351 +msgid "Table already existed" +msgstr "Tabellen eksisterede allerede" + +#: admin.php:379 admin.php:446 +msgid "Event Calendar Options" +msgstr "Indstillinger for EventCalendar" + +#: admin.php:450 +msgid "Easter Egg" +msgstr "" + +#: admin.php:452 upgrade-posts.php:124 +msgid "Upgrade Event Posts" +msgstr "" + +#: admin.php:459 +msgid "Event category" +msgstr "Begivenhedskategorier" + +#: admin.php:469 +msgid "" +"Event posts are put into this category for you. Don't make this your default " +"post category." +msgstr "" +"Begivenhedsindlæg indsættes automatisk i denne kategori. Brug ikke denne " +"kategori som standard for indlæg." + +#: admin.php:475 +msgid "Show schedule within posts" +msgstr "Vis tidsplan i indlæg" + +#: admin.php:479 +msgid "Show Schedule" +msgstr "Vis Tidsplan" + +#: admin.php:482 +msgid "Hide Schedule" +msgstr "Gem tidsplan" + +#: admin.php:489 +msgid "Show events as blog entries" +msgstr "Vis begivenheder som blogindlæg" + +#: admin.php:493 +msgid "Events are Normal Posts" +msgstr "Begivenheder er normale indlæg" + +#: admin.php:496 +msgid "Keep Events Separate" +msgstr "Hold begivenheder separat" + +#: admin.php:500 +msgid "" +"Keep Events Separate: the Event Category page shows future events, in date " +"order. Events do not appear on front page." +msgstr "" +"Hold begivenheder separat: Siden for begivenhedskategorier viser fremtidige " +"begivenheder kronologisk. Begivenheder vises ikke på forsiden." + +#: admin.php:506 admin.php:518 +msgid "Timezone" +msgstr "Tidszone" + +#: admin.php:510 +msgid "unknown" +msgstr "ukendt" + +#: admin.php:514 +msgid "" +"You cannot change your timezone. Turn off PHP's 'safe mode' or upgrade to " +"PHP5." +msgstr "" +"Du kan ikke ændre din tidszone. Sluk for PHPs 'safe mode' eller opgrader til " +"PHP5." + +#: admin.php:530 +msgid "Calendar Display" +msgstr "Vis kalender" + +#: admin.php:535 +msgid "Number of months" +msgstr "Antal måneder" + +#: admin.php:542 +msgid "Show all categories in calendar" +msgstr "Vis alle kategorier i kalenderen" + +#: admin.php:546 +msgid "Only Show Events" +msgstr "Vis kun begivenheder" + +#: admin.php:549 +msgid "Show All Posts" +msgstr "Vis alle indlæg" + +#: admin.php:556 +msgid "Show day names as" +msgstr "Vis dagenes navne som" + +#: admin.php:560 +msgid "Single Letter" +msgstr "Enkelte bogstaver" + +#: admin.php:563 +msgid "3-Letter Abbreviation" +msgstr "3-bogstavs forkortelser" + +#: admin.php:566 +msgid "Full Day Name" +msgstr "Hele navnet" + +#: admin.php:573 +msgid "Show Event Calendar logo" +msgstr "Vis EventCalendar logoet" + +#: admin.php:577 +msgid "Show Logo" +msgstr "Vis logo" + +#: admin.php:580 +msgid "Hide Logo" +msgstr "Gem logo" + +#: admin.php:587 +msgid "Position of navigation links" +msgstr "Placering af navigationlinks" + +#: admin.php:591 +msgid "Above Calendar" +msgstr "Over kalenderen" + +#: admin.php:594 +msgid "Below Calendar" +msgstr "Under kalenderen" + +#: admin.php:597 +msgid "Hidden" +msgstr "Skjult" + +#: admin.php:601 +msgid "" +"The navigation links are more usable when they are above the calendar, but " +"you might prefer them below or hidden for aesthetic reasons." +msgstr "" +"Navigationlinkene er placeret mest brugervenligt over kalenderen, men du kan " +"placere dem under kalenderen, eller helt skjule dem af æstetiske årsager." + +#: admin.php:607 +msgid "Popup event lists" +msgstr "Popup begivenhedsliste" + +#: admin.php:611 +msgid "Show Popups" +msgstr "Vis Popups" + +#: admin.php:614 +msgid "Hide Popups" +msgstr "Skjul Popups" + +#: admin.php:618 +msgid "You might want to disable popups if you use Nicetitles." +msgstr "Skjul eventuelt Popups, hvis du bruger Nicetitles" + +#: template-functions.php:29 +msgid "You must choose an event category." +msgstr "Du skal vælge en begivenhedskategori." + +#: template-functions.php:32 widget.php:84 widget.php:162 +#: K2/ec3_sidebar_module.php:64 +msgid "Go to Event Calendar Options" +msgstr "Gå til EventCalendarens indstillinger" + +#: template-functions.php:91 +msgid "Subscribe to iCalendar." +msgstr "Abbonner på iCalendar." + +#: template-functions.php:166 template-functions.php:448 +msgid "all day" +msgstr "hele dagen" + +#: template-functions.php:284 widget.php:93 widget.php:101 +#: K2/ec3_sidebar_module.php:31 +msgid "Event Calendar" +msgstr "EventCalendar" + +#: template-functions.php:364 widget.php:172 widget.php:180 +#: K2/ec3_sidebar_module.php:71 K2/ec3_sidebar_module.php:77 +msgid "Upcoming Events" +msgstr "Kommende begivenheder" + +#: template-functions.php:469 +msgid "No events." +msgstr "Ingen begivenheder." + +#: template-functions.php:506 template-functions.php:520 +#: template-functions.php:532 +msgid "to" +msgstr "til" + +#: upgrade-posts.php:39 +msgid "Post upgraded." +msgstr "" + +#: upgrade-posts.php:40 +#, php-format +msgid "%d posts upgraded." +msgstr "" + +#: widget.php:96 +msgid "Display upcoming events in a dynamic calendar." +msgstr "" + +#: widget.php:153 +msgid "Number of events:" +msgstr "Antal begivenheder:" + +#: widget.php:175 +msgid "Display upcoming events as a list." +msgstr "" + +#~ msgid "EXAMPLE SIDEBAR CODE:" +#~ msgstr "EKSEMPELKODE FOR SIDEBAR:" diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/gettext/ec3-es_ES.mo Binary file web/wp-content/plugins/event-calendar/gettext/ec3-es_ES.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/gettext/ec3-es_ES.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/event-calendar/gettext/ec3-es_ES.po Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,305 @@ +# Event Calendar plug-in for WordPress. +# Copyright (C) 2006, Alex Tingle +# This file is distributed under the same license as the wpcal package. +# Alex Tingle , 2005. +# +msgid "" +msgstr "" +"Project-Id-Version: wpcal 3.1._pre15\n" +"Report-Msgid-Bugs-To: eventcalendar@firetree.net\n" +"POT-Creation-Date: 2008-10-24 12:00+0100\n" +"PO-Revision-Date: 2008-10-10 19:16+0100\n" +"Last-Translator: Maira Belmonte \n" +"Language-Team: WordPress-es \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" + +#: admin.php:67 admin.php:393 +msgid "Event Editor" +msgstr "Editor de eventos" + +#: admin.php:108 +msgid "Start" +msgstr "Comienzo" + +#: admin.php:109 +msgid "End" +msgstr "Final" + +#: admin.php:110 +msgid "All Day" +msgstr "Todo el día" + +#: admin.php:111 +msgid "Repeat" +msgstr "Repetir" + +#: admin.php:132 +msgid "Add a new event" +msgstr "Añadir evento nuevo" + +#: admin.php:178 +msgid "Delete this event" +msgstr "Borrar este evento" + +#: admin.php:316 +msgid "Error upgrading database for EventCalendar plugin." +msgstr "Error al actualizar la base de datos para el plugin Event Calendar." + +#: admin.php:347 +#, php-format +msgid "Upgraded database to EventCalendar Version %s" +msgstr "Base de datos actualizada a la versión %s de Event Calendar" + +#: admin.php:351 +msgid "Table already existed" +msgstr "La tabla ya existe." + +#: admin.php:379 admin.php:446 +msgid "Event Calendar Options" +msgstr "Opciones de Event Calendar" + +#: admin.php:450 +msgid "Easter Egg" +msgstr "" + +#: admin.php:452 upgrade-posts.php:124 +msgid "Upgrade Event Posts" +msgstr "" + +#: admin.php:459 +msgid "Event category" +msgstr "Categoría para los eventos" + +#: admin.php:469 +msgid "" +"Event posts are put into this category for you. Don't make this your default " +"post category." +msgstr "" +"En esta categoría se pondrán los eventos. No la conviertas en tu categoróa " +"predeterminada." + +#: admin.php:475 +msgid "Show schedule within posts" +msgstr "Mostrar la fecha en las entradas" + +#: admin.php:479 +msgid "Show Schedule" +msgstr "Mostrar fecha" + +#: admin.php:482 +msgid "Hide Schedule" +msgstr "Ocultar fecha" + +#: admin.php:489 +msgid "Show events as blog entries" +msgstr "Mostrar los eventos en el blog" + +#: admin.php:493 +msgid "Events are Normal Posts" +msgstr "Eventos como entradas normales" + +#: admin.php:496 +msgid "Keep Events Separate" +msgstr "Mantener aparte los eventos" + +#: admin.php:500 +msgid "" +"Keep Events Separate: the Event Category page shows future events, in date " +"order. Events do not appear on front page." +msgstr "" +"Mantener aparte los eventos: la página de la categoría de eventos mostrará " +"los eventos futuros, por orden de fecha. Los eventos no aparecerán en la " +"página principal." + +#: admin.php:506 admin.php:518 +msgid "Timezone" +msgstr "Zona horaria" + +#: admin.php:510 +msgid "unknown" +msgstr "desconocido" + +#: admin.php:514 +msgid "" +"You cannot change your timezone. Turn off PHP's 'safe mode' or upgrade to " +"PHP5." +msgstr "" +"No es posible cambiar tu zona horaria. Desactiva el modo seguro de PHP o " +"actualízate a PHP5." + +#: admin.php:530 +msgid "Calendar Display" +msgstr "Aspecto del calendario" + +#: admin.php:535 +msgid "Number of months" +msgstr "Número de meses" + +#: admin.php:542 +msgid "Show all categories in calendar" +msgstr "Mostrar todas las categorías" + +#: admin.php:546 +msgid "Only Show Events" +msgstr "Mostrar sólo los eventos" + +#: admin.php:549 +msgid "Show All Posts" +msgstr "Mostrar todas las entradas" + +#: admin.php:556 +msgid "Show day names as" +msgstr "Mostrar nombres de meses con" + +#: admin.php:560 +msgid "Single Letter" +msgstr "Una letra" + +#: admin.php:563 +msgid "3-Letter Abbreviation" +msgstr "Abreviatura de tres letras" + +#: admin.php:566 +msgid "Full Day Name" +msgstr "Nombre completo" + +#: admin.php:573 +msgid "Show Event Calendar logo" +msgstr "Mostrar el logo de EventCalendar" + +#: admin.php:577 +msgid "Show Logo" +msgstr "Mostrar logo" + +#: admin.php:580 +msgid "Hide Logo" +msgstr "Ocultar logo" + +#: admin.php:587 +msgid "Position of navigation links" +msgstr "Posición de los enlaces de navegación" + +#: admin.php:591 +msgid "Above Calendar" +msgstr "Sobre el calendario" + +#: admin.php:594 +msgid "Below Calendar" +msgstr "Bajo el calendario" + +#: admin.php:597 +msgid "Hidden" +msgstr "Ocultar" + +#: admin.php:601 +msgid "" +"The navigation links are more usable when they are above the calendar, but " +"you might prefer them below or hidden for aesthetic reasons." +msgstr "" +"Los enlaces de navegación son más útiles si van sobre el calendario, pero " +"tal vez los prefiera debajo u ocultos por motivos estéticos." + +#: admin.php:607 +msgid "Popup event lists" +msgstr "Mensajes emergentes de la lista de eventos" + +#: admin.php:611 +msgid "Show Popups" +msgstr "Mostrar mensajes" + +#: admin.php:614 +msgid "Hide Popups" +msgstr "Ocultar mensajes" + +#: admin.php:618 +msgid "You might want to disable popups if you use Nicetitles." +msgstr "Tal vez prefieras ocultar los mensajes si empleas Nicetitles." + +#: template-functions.php:29 +msgid "You must choose an event category." +msgstr "Debes elegir una categría de eventos." + +#: template-functions.php:32 widget.php:84 widget.php:162 +#: K2/ec3_sidebar_module.php:64 +msgid "Go to Event Calendar Options" +msgstr "Ir a las opciones de Event Calendar" + +#: template-functions.php:91 +msgid "Subscribe to iCalendar." +msgstr "Suscribirse a iCalendar." + +#: template-functions.php:166 template-functions.php:448 +msgid "all day" +msgstr "todo el día" + +#: template-functions.php:284 widget.php:93 widget.php:101 +#: K2/ec3_sidebar_module.php:31 +msgid "Event Calendar" +msgstr "Event Calendar" + +#: template-functions.php:364 widget.php:172 widget.php:180 +#: K2/ec3_sidebar_module.php:71 K2/ec3_sidebar_module.php:77 +msgid "Upcoming Events" +msgstr "Próximos eventos" + +#: template-functions.php:469 +msgid "No events." +msgstr "No hay eventos." + +#: template-functions.php:506 template-functions.php:520 +#: template-functions.php:532 +msgid "to" +msgstr "a" + +#: upgrade-posts.php:39 +msgid "Post upgraded." +msgstr "" + +#: upgrade-posts.php:40 +#, php-format +msgid "%d posts upgraded." +msgstr "" + +#: widget.php:96 +msgid "Display upcoming events in a dynamic calendar." +msgstr "" + +#: widget.php:153 +msgid "Number of events:" +msgstr "Número de eventos:" + +#: widget.php:175 +msgid "Display upcoming events as a list." +msgstr "" + +#~ msgid "Update Options" +#~ msgstr "Actualizar opciones" + +#~ msgid "EXAMPLE SIDEBAR CODE:" +#~ msgstr "EJEMPLO DE CÓDIGO PARA LA BARRA LATERAL:" + +#~ msgid "Options saved." +#~ msgstr "Opciones guardadas." + +#~ msgid "- Select -" +#~ msgstr "- Seleccionar -" + +#~ msgid "View posts for %1$s %2$s" +#~ msgstr "Ver todas las entradas para %1$s %2$s" + +#~ msgid "by: %s" +#~ msgstr "de: %s" + +#~ msgid "Title:" +#~ msgstr "Título:" + +#~ msgid "Schedule Editor" +#~ msgstr "Fecha del evento" diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/gettext/ec3-fi_FI.mo Binary file web/wp-content/plugins/event-calendar/gettext/ec3-fi_FI.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/gettext/ec3-fi_FI.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/event-calendar/gettext/ec3-fi_FI.po Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,278 @@ +msgid "" +msgstr "" +"Project-Id-Version: Event Calendar v3.1.0\n" +"Report-Msgid-Bugs-To: eventcalendar@firetree.net\n" +"POT-Creation-Date: 2008-10-24 12:00+0100\n" +"PO-Revision-Date: 2006-11-01 21:14+0200\n" +"Last-Translator: Ralf Strandell \n" +"Language-Team: Ralf Strandell \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Finnish\n" +"X-Poedit-Country: FINLAND\n" +"X-Poedit-SourceCharset: utf-8\n" + +#: admin.php:67 admin.php:393 +msgid "Event Editor" +msgstr "Tapahtumien muokkaus" + +#: admin.php:108 +msgid "Start" +msgstr "Alkaa" + +#: admin.php:109 +msgid "End" +msgstr "Päättyy" + +#: admin.php:110 +msgid "All Day" +msgstr "Koko päivä" + +#: admin.php:111 +msgid "Repeat" +msgstr "Toisto" + +#: admin.php:132 +msgid "Add a new event" +msgstr "Lisää tapahtuma" + +#: admin.php:178 +msgid "Delete this event" +msgstr "Poista tämä tapahtuma" + +#: admin.php:316 +msgid "Error upgrading database for EventCalendar plugin." +msgstr "EventCalendar -lisäosan tietokannan päivityksessä virheitä" + +#: admin.php:347 +#, php-format +msgid "Upgraded database to EventCalendar Version %s" +msgstr "Tietokanta päivitetty EventCalendar versio %s:n" + +#: admin.php:351 +msgid "Table already existed" +msgstr "Taulu oli jo olemassa" + +#: admin.php:379 admin.php:446 +msgid "Event Calendar Options" +msgstr "Tapahtumakalenterin asetukset" + +#: admin.php:450 +msgid "Easter Egg" +msgstr "" + +#: admin.php:452 upgrade-posts.php:124 +msgid "Upgrade Event Posts" +msgstr "" + +#: admin.php:459 +msgid "Event category" +msgstr "Luokka" + +#: admin.php:469 +msgid "" +"Event posts are put into this category for you. Don't make this your default " +"post category." +msgstr "" +"Tapahtumat sijoitetaan tähän luokkaan. Tämän luokan näkymistä blogin " +"etusivulla voidaan erikseen säädellä. Tästä luokasta ei saa tehdä " +"blogiviestien oletusluokkaa." + +#: admin.php:475 +msgid "Show schedule within posts" +msgstr "Tapahtuman aikaleima" + +#: admin.php:479 +msgid "Show Schedule" +msgstr "Näytä aikaleima" + +#: admin.php:482 +msgid "Hide Schedule" +msgstr "Kätke aikaleima" + +#: admin.php:489 +msgid "Show events as blog entries" +msgstr "Tapahtumien näyttäminen blogissa" + +#: admin.php:493 +msgid "Events are Normal Posts" +msgstr "Tapahtumat näkyvät tavallisina blogiviesteinä etusivulla" + +#: admin.php:496 +msgid "Keep Events Separate" +msgstr "Pidä tapahtumat erillään" + +#: admin.php:500 +msgid "" +"Keep Events Separate: the Event Category page shows future events, in date " +"order. Events do not appear on front page." +msgstr "" +"Pidä tapahtumat erillään: Tapahtumat eivät näy etusivulla, mutta " +"tapahtumaluokan sivulla ne näkyvät aikajärjestyksessä." + +#: admin.php:506 admin.php:518 +msgid "Timezone" +msgstr "Aikavyöhyke" + +#: admin.php:510 +msgid "unknown" +msgstr "tuntematon" + +#: admin.php:514 +msgid "" +"You cannot change your timezone. Turn off PHP's 'safe mode' or upgrade to " +"PHP5." +msgstr "" +"Aikavyöhykettä ei voi vaihtaa. Poista PHP:n 'safe mode' käytöstä tai päivitä " +"PHP5:n" + +#: admin.php:530 +msgid "Calendar Display" +msgstr "Kalenteri" + +#: admin.php:535 +msgid "Number of months" +msgstr "Kuukausia" + +#: admin.php:542 +msgid "Show all categories in calendar" +msgstr "Näytä kalenterissa" + +#: admin.php:546 +msgid "Only Show Events" +msgstr "Vain tapahtumat" + +#: admin.php:549 +msgid "Show All Posts" +msgstr "Kaikki viestit" + +#: admin.php:556 +msgid "Show day names as" +msgstr "Näytä päivät" + +#: admin.php:560 +msgid "Single Letter" +msgstr "Yhdellä kirjaimella" + +#: admin.php:563 +msgid "3-Letter Abbreviation" +msgstr "Kolmella kirjaimella" + +#: admin.php:566 +msgid "Full Day Name" +msgstr "Koko nimellä" + +#: admin.php:573 +msgid "Show Event Calendar logo" +msgstr "Näytä Event Calendar—logo" + +#: admin.php:577 +msgid "Show Logo" +msgstr "Näytä logo" + +#: admin.php:580 +msgid "Hide Logo" +msgstr "Kätke logo" + +#: admin.php:587 +msgid "Position of navigation links" +msgstr "Selauslinkkien sijainti" + +#: admin.php:591 +msgid "Above Calendar" +msgstr "Kalenterin yllä" + +#: admin.php:594 +msgid "Below Calendar" +msgstr "Kalenterin alla" + +#: admin.php:597 +msgid "Hidden" +msgstr "Piilossa" + +#: admin.php:601 +msgid "" +"The navigation links are more usable when they are above the calendar, but " +"you might prefer them below or hidden for aesthetic reasons." +msgstr "" +"Selauslinkit ovat helpoimmin käytettävissä kalenterin yllä, mutta " +"ulkonäkösyistä ne voidaan sijoittaa alle tai kätkeä." + +#: admin.php:607 +msgid "Popup event lists" +msgstr "Ponnahdustekstin tyyppi" + +#: admin.php:611 +msgid "Show Popups" +msgstr "Allekkainen lista kalenterin alla" + +#: admin.php:614 +msgid "Hide Popups" +msgstr "Ei allekkaista listaa" + +#: admin.php:618 +msgid "You might want to disable popups if you use Nicetitles." +msgstr "" +"Ponnahduslista kannattanee poistaa käytöstä Nicetitles -ominaisuutta " +"käytettäessä." + +#: template-functions.php:29 +msgid "You must choose an event category." +msgstr "Tapahtuman luokka on valittava" + +#: template-functions.php:32 widget.php:84 widget.php:162 +#: K2/ec3_sidebar_module.php:64 +msgid "Go to Event Calendar Options" +msgstr "Siirry tapahtumakalenterin asetuksiin" + +#: template-functions.php:91 +msgid "Subscribe to iCalendar." +msgstr "Tilaa iCalendar." + +#: template-functions.php:166 template-functions.php:448 +msgid "all day" +msgstr "koko päivä" + +#: template-functions.php:284 widget.php:93 widget.php:101 +#: K2/ec3_sidebar_module.php:31 +msgid "Event Calendar" +msgstr "Tapahtumakalenteri" + +#: template-functions.php:364 widget.php:172 widget.php:180 +#: K2/ec3_sidebar_module.php:71 K2/ec3_sidebar_module.php:77 +msgid "Upcoming Events" +msgstr "Tulevia tapahtumia" + +#: template-functions.php:469 +msgid "No events." +msgstr "Ei tapahtumia." + +#: template-functions.php:506 template-functions.php:520 +#: template-functions.php:532 +msgid "to" +msgstr "–" + +#: upgrade-posts.php:39 +msgid "Post upgraded." +msgstr "" + +#: upgrade-posts.php:40 +#, php-format +msgid "%d posts upgraded." +msgstr "" + +#: widget.php:96 +msgid "Display upcoming events in a dynamic calendar." +msgstr "" + +#: widget.php:153 +msgid "Number of events:" +msgstr "Tapahtumien lukumäärä:" + +#: widget.php:175 +msgid "Display upcoming events as a list." +msgstr "" + +#~ msgid "EXAMPLE SIDEBAR CODE:" +#~ msgstr "ESIMERKKIKOODIA SIVUPALKKIIN:" diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/gettext/ec3-fr_FR.mo Binary file web/wp-content/plugins/event-calendar/gettext/ec3-fr_FR.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/gettext/ec3-fr_FR.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/event-calendar/gettext/ec3-fr_FR.po Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,286 @@ +# Event Calendar plug-in for WordPress. +# Copyright (C) 2006, Alex Tingle +# This file is distributed under the same license as the wpcal package. +# Alex Tingle , 2005. +# +# +msgid "" +msgstr "" +"Project-Id-Version: wpcal 3.1._rc2\n" +"Report-Msgid-Bugs-To: eventcalendar@firetree.net\n" +"POT-Creation-Date: 2008-10-24 12:00+0100\n" +"PO-Revision-Date: 2008-06-01 23:16+0100\n" +"Last-Translator: Comme une image \n" +"Language-Team: French \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Country: France\n" +"X-Poedit-Language: French\n" +"X-Poedit-SourceCharset: utf-8\n" + +#: admin.php:67 admin.php:393 +msgid "Event Editor" +msgstr "Editeur d'événement" + +#: admin.php:108 +msgid "Start" +msgstr "Début" + +#: admin.php:109 +msgid "End" +msgstr "Fin" + +#: admin.php:110 +msgid "All Day" +msgstr "Journée Entière" + +#: admin.php:111 +msgid "Repeat" +msgstr "Répéter" + +#: admin.php:132 +msgid "Add a new event" +msgstr "Ajouter un nouvel événement" + +#: admin.php:178 +msgid "Delete this event" +msgstr "Supprimer cet événement" + +#: admin.php:316 +msgid "Error upgrading database for EventCalendar plugin." +msgstr "" +"Erreur pendant la mise à jour de la base de données de l'extension " +"EventCalendar" + +#: admin.php:347 +#, php-format +msgid "Upgraded database to EventCalendar Version %s" +msgstr "Mise à jour effectuée de la base de données EventCalendar Version %s" + +#: admin.php:351 +msgid "Table already existed" +msgstr "La table existe déjà" + +#: admin.php:379 admin.php:446 +msgid "Event Calendar Options" +msgstr "Options du calendrier d'événement" + +#: admin.php:450 +msgid "Easter Egg" +msgstr "" + +#: admin.php:452 upgrade-posts.php:124 +msgid "Upgrade Event Posts" +msgstr "" + +#: admin.php:459 +msgid "Event category" +msgstr "Catégorie d'événement" + +#: admin.php:469 +msgid "" +"Event posts are put into this category for you. Don't make this your default " +"post category." +msgstr "" +"Les événements sont placés dans cette catégorie pour vous. N'en faites pas " +"votre catégorie de message par défaut." + +#: admin.php:475 +msgid "Show schedule within posts" +msgstr "Montrer le programme dans les messages" + +#: admin.php:479 +msgid "Show Schedule" +msgstr "Montrer le programme" + +#: admin.php:482 +msgid "Hide Schedule" +msgstr "Cacher le programme" + +#: admin.php:489 +msgid "Show events as blog entries" +msgstr "Montrer les événements comme des articles du blog" + +#: admin.php:493 +msgid "Events are Normal Posts" +msgstr "Les événements sont des messages normaux" + +#: admin.php:496 +msgid "Keep Events Separate" +msgstr "Garder les événements séparés" + +#: admin.php:500 +msgid "" +"Keep Events Separate: the Event Category page shows future events, in date " +"order. Events do not appear on front page." +msgstr "" +"Garder les événements séparés : la page de catégorie d'événement montre " +"les événements futurs, par ordre chronologique. Les événements " +"n'apparaissent pas en première page." + +#: admin.php:506 admin.php:518 +msgid "Timezone" +msgstr "Fuseau horaire" + +#: admin.php:510 +msgid "unknown" +msgstr "inconnu" + +#: admin.php:514 +msgid "" +"You cannot change your timezone. Turn off PHP's 'safe mode' or upgrade to " +"PHP5." +msgstr "" +"Vous ne pouvez changer votre fuseau horaire. Désactivez le 'safe mode' de " +"PHP ou mettez à jour vers PHP5" + +#: admin.php:530 +msgid "Calendar Display" +msgstr "Affichage du calendrier" + +#: admin.php:535 +msgid "Number of months" +msgstr "Nombre de mois" + +#: admin.php:542 +msgid "Show all categories in calendar" +msgstr "Montrer toutes les catégories dans le calendrier" + +#: admin.php:546 +msgid "Only Show Events" +msgstr "Montrer seulement les événements" + +#: admin.php:549 +msgid "Show All Posts" +msgstr "Montrer tous les messages" + +#: admin.php:556 +msgid "Show day names as" +msgstr "Montrer les noms de jour comme" + +#: admin.php:560 +msgid "Single Letter" +msgstr "Un seul caractère" + +#: admin.php:563 +msgid "3-Letter Abbreviation" +msgstr "Abréviation 3 caractères" + +#: admin.php:566 +msgid "Full Day Name" +msgstr "Nom de jour long" + +#: admin.php:573 +msgid "Show Event Calendar logo" +msgstr "Montrer le logo du calendrier d'événement" + +#: admin.php:577 +msgid "Show Logo" +msgstr "Monter le logo" + +#: admin.php:580 +msgid "Hide Logo" +msgstr "Cacher le logo" + +#: admin.php:587 +msgid "Position of navigation links" +msgstr "Position des liens de navigation" + +#: admin.php:591 +msgid "Above Calendar" +msgstr "Au dessus du calendrier" + +#: admin.php:594 +msgid "Below Calendar" +msgstr "En dessous du calendrier" + +#: admin.php:597 +msgid "Hidden" +msgstr "Caché" + +#: admin.php:601 +msgid "" +"The navigation links are more usable when they are above the calendar, but " +"you might prefer them below or hidden for aesthetic reasons." +msgstr "" +"Les liens de navigation sont plus utiles lorsqu'ils sont au dessus du " +"calendrier, mais vous préférez peut-être les avoir en dessous ou cachés pour " +"des raisons esthétiques." + +#: admin.php:607 +msgid "Popup event lists" +msgstr "Popup des listes d'événement" + +#: admin.php:611 +msgid "Show Popups" +msgstr "Afficher les popups" + +#: admin.php:614 +msgid "Hide Popups" +msgstr "Cacher les popups" + +#: admin.php:618 +msgid "You might want to disable popups if you use Nicetitles." +msgstr "" +"Vous souhaiterez peut-être désactiver les popups si vous utilisez Nicetitles." + +#: template-functions.php:29 +msgid "You must choose an event category." +msgstr "Vous devez choisir une catégorie d'événement." + +#: template-functions.php:32 widget.php:84 widget.php:162 +#: K2/ec3_sidebar_module.php:64 +msgid "Go to Event Calendar Options" +msgstr "Aller aux options du calendrier d'événement" + +#: template-functions.php:91 +msgid "Subscribe to iCalendar." +msgstr "S'abonner à iCalendar." + +#: template-functions.php:166 template-functions.php:448 +msgid "all day" +msgstr "journée entière" + +#: template-functions.php:284 widget.php:93 widget.php:101 +#: K2/ec3_sidebar_module.php:31 +msgid "Event Calendar" +msgstr "Calendrier d'événement" + +#: template-functions.php:364 widget.php:172 widget.php:180 +#: K2/ec3_sidebar_module.php:71 K2/ec3_sidebar_module.php:77 +msgid "Upcoming Events" +msgstr "Evénements à venir" + +#: template-functions.php:469 +msgid "No events." +msgstr "Pas d'événement." + +#: template-functions.php:506 template-functions.php:520 +#: template-functions.php:532 +msgid "to" +msgstr "au" + +#: upgrade-posts.php:39 +msgid "Post upgraded." +msgstr "" + +#: upgrade-posts.php:40 +#, php-format +msgid "%d posts upgraded." +msgstr "" + +#: widget.php:96 +msgid "Display upcoming events in a dynamic calendar." +msgstr "" + +#: widget.php:153 +msgid "Number of events:" +msgstr "Nombre d'événements :" + +#: widget.php:175 +msgid "Display upcoming events as a list." +msgstr "" + +#~ msgid "EXAMPLE SIDEBAR CODE:" +#~ msgstr "EXEMPLE DE CODE DE BARRE LATERALE :" diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/gettext/ec3-hu_HU.mo Binary file web/wp-content/plugins/event-calendar/gettext/ec3-hu_HU.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/gettext/ec3-hu_HU.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/event-calendar/gettext/ec3-hu_HU.po Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,277 @@ +# Event Calendar plug-in for WordPress. +# Copyright (C) 2006, Alex Tingle +# This file is distributed under the same license as the wpcal package. +# Alex Tingle , 2005. +# +msgid "" +msgstr "" +"Project-Id-Version: wpcal 3.1.1._rc1\n" +"Report-Msgid-Bugs-To: eventcalendar@firetree.net\n" +"POT-Creation-Date: 2008-10-24 12:00+0100\n" +"PO-Revision-Date: 2007-05-03 00:27+0100\n" +"Last-Translator: Elbandi \n" +"Language-Team: Andras Elso \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: admin.php:67 admin.php:393 +msgid "Event Editor" +msgstr "Esemény szerkesztõ" + +#: admin.php:108 +msgid "Start" +msgstr "Kezdés" + +#: admin.php:109 +msgid "End" +msgstr "Vég" + +#: admin.php:110 +msgid "All Day" +msgstr "Egész napos" + +#: admin.php:111 +msgid "Repeat" +msgstr "Ismétlõdõ" + +#: admin.php:132 +msgid "Add a new event" +msgstr "Új esemény hozzáadása" + +#: admin.php:178 +msgid "Delete this event" +msgstr "Esemény törléses" + +#: admin.php:316 +msgid "Error upgrading database for EventCalendar plugin." +msgstr "Hiba az EventCalendar plugin adatbázis frissítésekor." + +#: admin.php:347 +#, php-format +msgid "Upgraded database to EventCalendar Version %s" +msgstr "Adatbázis frissitve az EventCalendar verziohoz: %s" + +#: admin.php:351 +msgid "Table already existed" +msgstr "A tábla már létezik" + +#: admin.php:379 admin.php:446 +msgid "Event Calendar Options" +msgstr "EventCalendar beállítások" + +#: admin.php:450 +msgid "Easter Egg" +msgstr "" + +#: admin.php:452 upgrade-posts.php:124 +msgid "Upgrade Event Posts" +msgstr "" + +#: admin.php:459 +msgid "Event category" +msgstr "Esemény kategória" + +#: admin.php:469 +msgid "" +"Event posts are put into this category for you. Don't make this your default " +"post category." +msgstr "" +"Események ebbe a kategóriába tartoznak. Ne tedd ezt a kategóriát az " +"alapértelmezettnek." + +#: admin.php:475 +msgid "Show schedule within posts" +msgstr "Ütemezés mutatása" + +#: admin.php:479 +msgid "Show Schedule" +msgstr "Megmutat" + +#: admin.php:482 +msgid "Hide Schedule" +msgstr "Elrejt" + +#: admin.php:489 +msgid "Show events as blog entries" +msgstr "Események mutatása mint blog bejegyzés" + +#: admin.php:493 +msgid "Events are Normal Posts" +msgstr "Események normál postok" + +#: admin.php:496 +msgid "Keep Events Separate" +msgstr "Események külön tartása" + +#: admin.php:500 +msgid "" +"Keep Events Separate: the Event Category page shows future events, in date " +"order. Events do not appear on front page." +msgstr "" +"Események külön tartása: az esemény kategória oldal mutatja az eljövendõ " +"eseményeket, datum szerint. Az események nem jelennek meg a fõoldalon." + +#: admin.php:506 admin.php:518 +msgid "Timezone" +msgstr "Idõzona" + +#: admin.php:510 +msgid "unknown" +msgstr "ismeretlen" + +#: admin.php:514 +msgid "" +"You cannot change your timezone. Turn off PHP's 'safe mode' or upgrade to " +"PHP5." +msgstr "" +"Nem tudod változtatni az idõzonát. Kapcsold ki a 'safe mode'-ot a PHP-bõl " +"vagy frissíts PHP5-re." + +#: admin.php:530 +msgid "Calendar Display" +msgstr "Naptár kinézet" + +#: admin.php:535 +msgid "Number of months" +msgstr "Hónapok száma" + +#: admin.php:542 +msgid "Show all categories in calendar" +msgstr "Minten kategória mutatása a naptárban" + +#: admin.php:546 +msgid "Only Show Events" +msgstr "Csak az események mutatása" + +#: admin.php:549 +msgid "Show All Posts" +msgstr "Minden bejegyzés mutatása" + +#: admin.php:556 +msgid "Show day names as" +msgstr "Napnevek mutatása mint" + +#: admin.php:560 +msgid "Single Letter" +msgstr "Egy betü" + +#: admin.php:563 +msgid "3-Letter Abbreviation" +msgstr "3 betüs rövidítés" + +#: admin.php:566 +msgid "Full Day Name" +msgstr "Teljes nap nevek" + +#: admin.php:573 +msgid "Show Event Calendar logo" +msgstr "EventCalendar logo mutatása" + +#: admin.php:577 +msgid "Show Logo" +msgstr "Logo mutatása" + +#: admin.php:580 +msgid "Hide Logo" +msgstr "Logo elrejtése" + +#: admin.php:587 +msgid "Position of navigation links" +msgstr "Navigációs link helye" + +#: admin.php:591 +msgid "Above Calendar" +msgstr "Naptár felett" + +#: admin.php:594 +msgid "Below Calendar" +msgstr "Naptár alatt" + +#: admin.php:597 +msgid "Hidden" +msgstr "Rejtett" + +#: admin.php:601 +msgid "" +"The navigation links are more usable when they are above the calendar, but " +"you might prefer them below or hidden for aesthetic reasons." +msgstr "" +"A navigációs linkek sokkal hasznosabbak ha a naptár felett vannak, de ha " +"akarod alulra is rakhatod oket, vagy akar elrejtheted esztétikai okokból." + +#: admin.php:607 +msgid "Popup event lists" +msgstr "Felugróablakok az események listájával" + +#: admin.php:611 +msgid "Show Popups" +msgstr "Felugrók megjelenítése" + +#: admin.php:614 +msgid "Hide Popups" +msgstr "Felugrók elrejtése" + +#: admin.php:618 +msgid "You might want to disable popups if you use Nicetitles." +msgstr "Könnyen letilthatod a felugró ablakokat, ha Szépcímeket használsz" + +#: template-functions.php:29 +msgid "You must choose an event category." +msgstr "Ki kell jelölnöd egy esemény kategóriát." + +#: template-functions.php:32 widget.php:84 widget.php:162 +#: K2/ec3_sidebar_module.php:64 +msgid "Go to Event Calendar Options" +msgstr "Ugrás a EventCalendar beállításokhoz" + +#: template-functions.php:91 +msgid "Subscribe to iCalendar." +msgstr "Feliratkozás iCalendar-ra." + +#: template-functions.php:166 template-functions.php:448 +msgid "all day" +msgstr "egész napos" + +#: template-functions.php:284 widget.php:93 widget.php:101 +#: K2/ec3_sidebar_module.php:31 +msgid "Event Calendar" +msgstr "Esemény Naptár" + +#: template-functions.php:364 widget.php:172 widget.php:180 +#: K2/ec3_sidebar_module.php:71 K2/ec3_sidebar_module.php:77 +msgid "Upcoming Events" +msgstr "Közeledõ esemény" + +#: template-functions.php:469 +msgid "No events." +msgstr "Nincs esemény." + +#: template-functions.php:506 template-functions.php:520 +#: template-functions.php:532 +msgid "to" +msgstr "-" + +#: upgrade-posts.php:39 +msgid "Post upgraded." +msgstr "" + +#: upgrade-posts.php:40 +#, php-format +msgid "%d posts upgraded." +msgstr "" + +#: widget.php:96 +msgid "Display upcoming events in a dynamic calendar." +msgstr "" + +#: widget.php:153 +msgid "Number of events:" +msgstr "Események száma:" + +#: widget.php:175 +msgid "Display upcoming events as a list." +msgstr "" + +#~ msgid "EXAMPLE SIDEBAR CODE:" +#~ msgstr "Minta SIDEBAR kod:" diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/gettext/ec3-it_IT.mo Binary file web/wp-content/plugins/event-calendar/gettext/ec3-it_IT.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/gettext/ec3-it_IT.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/event-calendar/gettext/ec3-it_IT.po Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,277 @@ +# Event Calendar plug-in for WordPress. +# Copyright (C) 2006, Alex Tingle +# This file is distributed under the same license as the wpcal package. +# Alex Tingle , 2005. +# +msgid "" +msgstr "" +"Project-Id-Version: wpcal 3.1._pre15\n" +"Report-Msgid-Bugs-To: eventcalendar@firetree.net\n" +"POT-Creation-Date: 2008-10-24 12:00+0100\n" +"PO-Revision-Date: 2008-11-08 11:54+0100\n" +"Last-Translator: Lorenzo De Tomasi \n" +"Language-Team: italian \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" + +#: admin.php:67 +#: admin.php:393 +msgid "Event Editor" +msgstr "Modifica eventi" + +#: admin.php:108 +msgid "Start" +msgstr "Inizio" + +#: admin.php:109 +msgid "End" +msgstr "Fine" + +#: admin.php:110 +msgid "All Day" +msgstr "Tutto il giorno" + +#: admin.php:111 +msgid "Repeat" +msgstr "Ripeti" + +#: admin.php:132 +msgid "Add a new event" +msgstr "Aggiungi un nuovo evento" + +#: admin.php:178 +msgid "Delete this event" +msgstr "Cancella questo evento" + +#: admin.php:316 +msgid "Error upgrading database for EventCalendar plugin." +msgstr "Si è verificato un errore durante l'aggiornamento del database del plugin EventCalendar" + +#: admin.php:347 +#, php-format +msgid "Upgraded database to EventCalendar Version %s" +msgstr "Aggiornamento effettuato al database di EventCalendar Versione %s" + +#: admin.php:351 +msgid "Table already existed" +msgstr "Tabella già esistente" + +#: admin.php:379 +#: admin.php:446 +msgid "Event Calendar Options" +msgstr "Opzioni di Event Calendar" + +#: admin.php:450 +msgid "Easter Egg" +msgstr "Uovo di Pasqua" + +#: admin.php:452 +#: upgrade-posts.php:124 +msgid "Upgrade Event Posts" +msgstr "Aggiorna gli articoli evento" + +#: admin.php:459 +msgid "Event category" +msgstr "Categoria eventi" + +#: admin.php:469 +msgid "Event posts are put into this category for you. Don't make this your default post category." +msgstr "Questa categoria viene assegnata agli eventi automaticamente. Non utilizzarla come categoria di default." + +#: admin.php:475 +msgid "Show schedule within posts" +msgstr "Mostra il programma negli articoli" + +#: admin.php:479 +msgid "Show Schedule" +msgstr "Mostra il programma" + +#: admin.php:482 +msgid "Hide Schedule" +msgstr "Nascondi il programma" + +#: admin.php:489 +msgid "Show events as blog entries" +msgstr "Mostra gli eventi come articoli del blog" + +#: admin.php:493 +msgid "Events are Normal Posts" +msgstr "Gli eventi sono articoli normali" + +#: admin.php:496 +msgid "Keep Events Separate" +msgstr "Mantieni gli eventi separati" + +#: admin.php:500 +msgid "Keep Events Separate: the Event Category page shows future events, in date order. Events do not appear on front page." +msgstr "Mantieni gli eventi separati: la pagina con la categoria eventi mostra eventi futuri, in ordine cronologico. Gli eventi non compaiono nella pagina principale." + +#: admin.php:506 +#: admin.php:518 +msgid "Timezone" +msgstr "Fuso orario" + +#: admin.php:510 +msgid "unknown" +msgstr "sconosciuto" + +#: admin.php:514 +msgid "You cannot change your timezone. Turn off PHP's 'safe mode' or upgrade to PHP5." +msgstr "Non puoi cambiare il tuo fuso orario. Disabilita la modalità 'safe mode' in PHP o aggiorna a PHP5." + +#: admin.php:530 +msgid "Calendar Display" +msgstr "Display del calendario" + +#: admin.php:535 +msgid "Number of months" +msgstr "Numero di mesi" + +#: admin.php:542 +msgid "Show all categories in calendar" +msgstr "Mostra tutte le categorie nel calendario" + +#: admin.php:546 +msgid "Only Show Events" +msgstr "Mostra solo gli eventi" + +#: admin.php:549 +msgid "Show All Posts" +msgstr "Mostra tutti gli articoli" + +#: admin.php:556 +msgid "Show day names as" +msgstr "Mostra i nomi dei giorni come" + +#: admin.php:560 +msgid "Single Letter" +msgstr "Lettera singola" + +#: admin.php:563 +msgid "3-Letter Abbreviation" +msgstr "Abbreviazione a tre lettere" + +#: admin.php:566 +msgid "Full Day Name" +msgstr "Nome del giorno per esteso" + +#: admin.php:573 +msgid "Show Event Calendar logo" +msgstr "Mostra il logo di Event Calendar" + +#: admin.php:577 +msgid "Show Logo" +msgstr "Mostra il logo" + +#: admin.php:580 +msgid "Hide Logo" +msgstr "Nascondi il logo" + +#: admin.php:587 +msgid "Position of navigation links" +msgstr "Posizione dei link di navigazione" + +#: admin.php:591 +msgid "Above Calendar" +msgstr "Sopra il calendario" + +#: admin.php:594 +msgid "Below Calendar" +msgstr "Sotto il calendario" + +#: admin.php:597 +msgid "Hidden" +msgstr "Nascosto" + +#: admin.php:601 +msgid "The navigation links are more usable when they are above the calendar, but you might prefer them below or hidden for aesthetic reasons." +msgstr "I link per la navigazione sono più utilizzabili quando sono sopra il calendario, ma puoi averli sotto o nasconderli per motivi estetici." + +#: admin.php:607 +msgid "Popup event lists" +msgstr "Popup lista eventi" + +#: admin.php:611 +msgid "Show Popups" +msgstr "Mostra i popups" + +#: admin.php:614 +msgid "Hide Popups" +msgstr "Nascondi i popups" + +#: admin.php:618 +msgid "You might want to disable popups if you use Nicetitles." +msgstr "Probabilmente vuoi disabilitare i popups se usi una struttura personalizzata dei permalink" + +#: template-functions.php:29 +msgid "You must choose an event category." +msgstr "Devi scegliere una categoria per gli eventi." + +#: template-functions.php:32 +#: widget.php:84 +#: widget.php:162 +#: K2/ec3_sidebar_module.php:64 +msgid "Go to Event Calendar Options" +msgstr "Vai alle opzioni di Event Calendar" + +#: template-functions.php:91 +msgid "Subscribe to iCalendar." +msgstr "Abbonati a iCalendar." + +#: template-functions.php:166 +#: template-functions.php:448 +msgid "all day" +msgstr "tutto il giorno" + +#: template-functions.php:284 +#: widget.php:93 +#: widget.php:101 +#: K2/ec3_sidebar_module.php:31 +msgid "Event Calendar" +msgstr "Calendario eventi" + +#: template-functions.php:364 +#: widget.php:172 +#: widget.php:180 +#: K2/ec3_sidebar_module.php:71 +#: K2/ec3_sidebar_module.php:77 +msgid "Upcoming Events" +msgstr "Prossimi eventi" + +#: template-functions.php:469 +msgid "No events." +msgstr "Nessun evento." + +#: template-functions.php:506 +#: template-functions.php:520 +#: template-functions.php:532 +msgid "to" +msgstr "a" + +#: upgrade-posts.php:39 +msgid "Post upgraded." +msgstr "Articolo aggiornato." + +#: upgrade-posts.php:40 +#, php-format +msgid "%d posts upgraded." +msgstr "%d articoli aggiornati." + +#: widget.php:96 +msgid "Display upcoming events in a dynamic calendar." +msgstr "Mostra i prossimi eventi in un calendario dinamico." + +#: widget.php:153 +msgid "Number of events:" +msgstr "Numero di eventi:" + +#: widget.php:175 +msgid "Display upcoming events as a list." +msgstr "Mostra i prossimi eventi come lista." + +#~ msgid "EXAMPLE SIDEBAR CODE:" +#~ msgstr "ESEMPIO DI CODICE PER LA BARRA LATERALE:" + diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/gettext/ec3-mk_MK.mo Binary file web/wp-content/plugins/event-calendar/gettext/ec3-mk_MK.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/gettext/ec3-mk_MK.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/event-calendar/gettext/ec3-mk_MK.po Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,279 @@ +# Event Calendar plug-in for WordPress. +# Copyright (C) 2006, Alex Tingle +# This file is distributed under the same license as the wpcal package. +# Alex Tingle , 2005. +# +msgid "" +msgstr "" +"Project-Id-Version: wpcal 3.1.0\n" +"Report-Msgid-Bugs-To: eventcalendar@firetree.net\n" +"POT-Creation-Date: 2008-10-24 12:00+0100\n" +"PO-Revision-Date: 2006-12-05 09:26+0100\n" +"Last-Translator: Vanco Ordanoski \n" +"Language-Team: Event Calendar \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: admin.php:67 admin.php:393 +msgid "Event Editor" +msgstr "Уредувач на активности" + +#: admin.php:108 +msgid "Start" +msgstr "Почеток" + +#: admin.php:109 +msgid "End" +msgstr "Крај" + +#: admin.php:110 +msgid "All Day" +msgstr "Цел ден" + +#: admin.php:111 +msgid "Repeat" +msgstr "Се повторува" + +#: admin.php:132 +msgid "Add a new event" +msgstr "Додади нова активност" + +#: admin.php:178 +msgid "Delete this event" +msgstr "Избриши ја оваа активност" + +#: admin.php:316 +msgid "Error upgrading database for EventCalendar plugin." +msgstr "Грешка во надградбата на базата на податоци на EventCalendar." + +#: admin.php:347 +#, php-format +msgid "Upgraded database to EventCalendar Version %s" +msgstr "Базата е надградена во верзија %s на EventCalendar" + +#: admin.php:351 +msgid "Table already existed" +msgstr "Табелата веќе постоеше" + +#: admin.php:379 admin.php:446 +msgid "Event Calendar Options" +msgstr "Опции на Event Calendar" + +#: admin.php:450 +msgid "Easter Egg" +msgstr "" + +#: admin.php:452 upgrade-posts.php:124 +msgid "Upgrade Event Posts" +msgstr "" + +#: admin.php:459 +msgid "Event category" +msgstr "Категорија на активности" + +#: admin.php:469 +msgid "" +"Event posts are put into this category for you. Don't make this your default " +"post category." +msgstr "" +"Содржините со активности се ставаат во оваа категорија. На ја поставувајте " +"како своја подразбрана категорија за содржини." + +#: admin.php:475 +msgid "Show schedule within posts" +msgstr "Прикажи ја агендата заедно со другите содржини" + +#: admin.php:479 +msgid "Show Schedule" +msgstr "Прикажи ја агендата" + +#: admin.php:482 +msgid "Hide Schedule" +msgstr "Сокриј ја агендата" + +#: admin.php:489 +msgid "Show events as blog entries" +msgstr "Прикажи ги активностите како блог содржини" + +#: admin.php:493 +msgid "Events are Normal Posts" +msgstr "Активностите се нормални содржини" + +#: admin.php:496 +msgid "Keep Events Separate" +msgstr "Чувај ги активностите посебно" + +#: admin.php:500 +msgid "" +"Keep Events Separate: the Event Category page shows future events, in date " +"order. Events do not appear on front page." +msgstr "" +"Чувај ги активностите посебно: Страницата со категории на активности ги " +"прикажува идните активности, подредени по датум. Активностите не се " +"појавуваат на насловната страна." + +#: admin.php:506 admin.php:518 +msgid "Timezone" +msgstr "Временска зона" + +#: admin.php:510 +msgid "unknown" +msgstr "непознато" + +#: admin.php:514 +msgid "" +"You cannot change your timezone. Turn off PHP's 'safe mode' or upgrade to " +"PHP5." +msgstr "" +"Не можете да ја промените временската зона. Исклучете го 'safe mode' на PHP, " +"или надградете се на PHP5." + +#: admin.php:530 +msgid "Calendar Display" +msgstr "Приказ на календарот" + +#: admin.php:535 +msgid "Number of months" +msgstr "Број на месеци" + +#: admin.php:542 +msgid "Show all categories in calendar" +msgstr "Прикажи ги сите категории во календарот" + +#: admin.php:546 +msgid "Only Show Events" +msgstr "Прикажи ги само активностите" + +#: admin.php:549 +msgid "Show All Posts" +msgstr "Прикажи ги сите постови" + +#: admin.php:556 +msgid "Show day names as" +msgstr "Прикажи ги имињата на деновите со" + +#: admin.php:560 +msgid "Single Letter" +msgstr "Кратенка од една буква" + +#: admin.php:563 +msgid "3-Letter Abbreviation" +msgstr "Кратенка од три букви" + +#: admin.php:566 +msgid "Full Day Name" +msgstr "Полно име на денот" + +#: admin.php:573 +msgid "Show Event Calendar logo" +msgstr "Прикажи го логото на Event Calendar" + +#: admin.php:577 +msgid "Show Logo" +msgstr "Прикажи го логото" + +#: admin.php:580 +msgid "Hide Logo" +msgstr "Сокриј го логото" + +#: admin.php:587 +msgid "Position of navigation links" +msgstr "Позиција на линковите за навигација" + +#: admin.php:591 +msgid "Above Calendar" +msgstr "Над календарот" + +#: admin.php:594 +msgid "Below Calendar" +msgstr "Под календарот" + +#: admin.php:597 +msgid "Hidden" +msgstr "Сокриено" + +#: admin.php:601 +msgid "" +"The navigation links are more usable when they are above the calendar, but " +"you might prefer them below or hidden for aesthetic reasons." +msgstr "" +"Линковите за навигација се поупотребливи кога се над календарот, но вие " +"можеби повеќе сакате да бидат под него или сокриени, од естетски причини." + +#: admin.php:607 +msgid "Popup event lists" +msgstr "Popup листа на активности" + +#: admin.php:611 +msgid "Show Popups" +msgstr "Прикажи ги popup-ите" + +#: admin.php:614 +msgid "Hide Popups" +msgstr "Сокриј ги popup-ите" + +#: admin.php:618 +msgid "You might want to disable popups if you use Nicetitles." +msgstr "" +"Можеби ќе сакате да ги исклучите popup-ите ако употребувате Nicetitles." + +#: template-functions.php:29 +msgid "You must choose an event category." +msgstr "Морате да изберете категорија на активностите." + +#: template-functions.php:32 widget.php:84 widget.php:162 +#: K2/ec3_sidebar_module.php:64 +msgid "Go to Event Calendar Options" +msgstr "Прејди на опциите на Event Calendar" + +#: template-functions.php:91 +msgid "Subscribe to iCalendar." +msgstr "Претплати се на iCalendar." + +#: template-functions.php:166 template-functions.php:448 +msgid "all day" +msgstr "цел ден" + +#: template-functions.php:284 widget.php:93 widget.php:101 +#: K2/ec3_sidebar_module.php:31 +msgid "Event Calendar" +msgstr "Календар на активности" + +#: template-functions.php:364 widget.php:172 widget.php:180 +#: K2/ec3_sidebar_module.php:71 K2/ec3_sidebar_module.php:77 +msgid "Upcoming Events" +msgstr "Следни активности" + +#: template-functions.php:469 +msgid "No events." +msgstr "Нема активности." + +#: template-functions.php:506 template-functions.php:520 +#: template-functions.php:532 +msgid "to" +msgstr "до" + +#: upgrade-posts.php:39 +msgid "Post upgraded." +msgstr "" + +#: upgrade-posts.php:40 +#, php-format +msgid "%d posts upgraded." +msgstr "" + +#: widget.php:96 +msgid "Display upcoming events in a dynamic calendar." +msgstr "" + +#: widget.php:153 +msgid "Number of events:" +msgstr "Број на активности:" + +#: widget.php:175 +msgid "Display upcoming events as a list." +msgstr "" + +#~ msgid "EXAMPLE SIDEBAR CODE:" +#~ msgstr "ПРИМЕР НА ПРОГРАМСКИ КОД ВО СТРАНИЧНА ВЕРТИКАЛА:" diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/gettext/ec3-nb_NO.mo Binary file web/wp-content/plugins/event-calendar/gettext/ec3-nb_NO.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/gettext/ec3-nb_NO.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/event-calendar/gettext/ec3-nb_NO.po Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,295 @@ +# Event Calendar plug-in for WordPress. +# Copyright (C) 2006, Alex Tingle +# This file is distributed under the same license as the wpcal package. +# Alex Tingle , 2005. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: wpcal 3.1._pre15\n" +"Report-Msgid-Bugs-To: eventcalendar@firetree.net\n" +"POT-Creation-Date: 2008-10-24 12:00+0100\n" +"PO-Revision-Date: 2006-10-05 23:33:22+0200\n" +"Last-Translator: Realf Ording Helgesen\n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: admin.php:67 admin.php:393 +#, fuzzy +msgid "Event Editor" +msgstr "Tidspunkt-editor" + +#: admin.php:108 +msgid "Start" +msgstr "Start" + +#: admin.php:109 +msgid "End" +msgstr "Slutt" + +#: admin.php:110 +msgid "All Day" +msgstr "Hele dagen" + +#: admin.php:111 +msgid "Repeat" +msgstr "Gjenta" + +#: admin.php:132 +msgid "Add a new event" +msgstr "" + +#: admin.php:178 +msgid "Delete this event" +msgstr "" + +#: admin.php:316 +msgid "Error upgrading database for EventCalendar plugin." +msgstr "Feil ved oppgradering av database for EventCalendar plugin" + +#: admin.php:347 +#, php-format +msgid "Upgraded database to EventCalendar Version %s" +msgstr "Oppgraderte databasen til EventCalendar versjon %s" + +#: admin.php:351 +msgid "Table already existed" +msgstr "Tabellen eksisterte allerede" + +#: admin.php:379 admin.php:446 +msgid "Event Calendar Options" +msgstr "Event Calendar-innstillinger" + +#: admin.php:450 +msgid "Easter Egg" +msgstr "" + +#: admin.php:452 upgrade-posts.php:124 +msgid "Upgrade Event Posts" +msgstr "" + +#: admin.php:459 +msgid "Event category" +msgstr "Hendelseskategori" + +#: admin.php:469 +msgid "" +"Event posts are put into this category for you. Don't make this your default " +"post category." +msgstr "" + +#: admin.php:475 +#, fuzzy +msgid "Show schedule within posts" +msgstr "Vis hendelsesboks i innleggene" + +#: admin.php:479 +msgid "Show Schedule" +msgstr "Vis" + +#: admin.php:482 +msgid "Hide Schedule" +msgstr "Skjul" + +#: admin.php:489 +msgid "Show events as blog entries" +msgstr "Vis hendelser som blog-innlegg" + +#: admin.php:493 +msgid "Events are Normal Posts" +msgstr "Hendelser er normale innlegg" + +#: admin.php:496 +msgid "Keep Events Separate" +msgstr "Hold hendelser separate" + +#: admin.php:500 +msgid "" +"Keep Events Separate: the Event Category page shows future events, in date " +"order. Events do not appear on front page." +msgstr "" +"Hold hendelser adskilte: Event Calendar-siden viser fremtidige hendelser, " +"sortert etter dato. Hendelser vises ikke på forsiden." + +#: admin.php:506 admin.php:518 +msgid "Timezone" +msgstr "Tidssone" + +#: admin.php:510 +msgid "unknown" +msgstr "" + +#: admin.php:514 +msgid "" +"You cannot change your timezone. Turn off PHP's 'safe mode' or upgrade to " +"PHP5." +msgstr "" + +#: admin.php:530 +msgid "Calendar Display" +msgstr "Kalendervisning" + +#: admin.php:535 +msgid "Number of months" +msgstr "Antall måneder" + +#: admin.php:542 +msgid "Show all categories in calendar" +msgstr "Vis alle kategorier i kalender" + +#: admin.php:546 +msgid "Only Show Events" +msgstr "Vis bare hendelser" + +#: admin.php:549 +msgid "Show All Posts" +msgstr "Vis alle innlegg" + +#: admin.php:556 +msgid "Show day names as" +msgstr "Vis navn på dager som" + +#: admin.php:560 +msgid "Single Letter" +msgstr "Enkeltbokstav" + +#: admin.php:563 +msgid "3-Letter Abbreviation" +msgstr "3-bokstavers forkortelse" + +#: admin.php:566 +msgid "Full Day Name" +msgstr "Fullt navn på dag" + +#: admin.php:573 +msgid "Show Event Calendar logo" +msgstr "Vis Event Calendar-logo" + +#: admin.php:577 +msgid "Show Logo" +msgstr "Vis logo" + +#: admin.php:580 +msgid "Hide Logo" +msgstr "Skjul logo" + +#: admin.php:587 +msgid "Position of navigation links" +msgstr "Plassering av navigeringslinker" + +#: admin.php:591 +msgid "Above Calendar" +msgstr "Over kalenderen" + +#: admin.php:594 +msgid "Below Calendar" +msgstr "Under kalenderen" + +#: admin.php:597 +msgid "Hidden" +msgstr "Skjult" + +#: admin.php:601 +msgid "" +"The navigation links are more usable when they are above the calendar, but " +"you might prefer them below or hidden for aesthetic reasons." +msgstr "" +"Navigasjonslinkene er mer brukbare når de er over kalenderen, men du vil " +"kanskje foretrekke å ha dem under eller skjult av estetiske årsaker." + +#: admin.php:607 +msgid "Popup event lists" +msgstr "Popup hendelseslister" + +#: admin.php:611 +msgid "Show Popups" +msgstr "Vis popups" + +#: admin.php:614 +msgid "Hide Popups" +msgstr "Skjul popups" + +#: admin.php:618 +msgid "You might want to disable popups if you use Nicetitles." +msgstr "Dersom du bruker Nicetitles, vil du muligens slå av popups" + +#: template-functions.php:29 +msgid "You must choose an event category." +msgstr "" + +#: template-functions.php:32 widget.php:84 widget.php:162 +#: K2/ec3_sidebar_module.php:64 +msgid "Go to Event Calendar Options" +msgstr "Gå til Event Calendar-innstillinger" + +#: template-functions.php:91 +msgid "Subscribe to iCalendar." +msgstr "Abonner på iCalendar" + +#: template-functions.php:166 template-functions.php:448 +msgid "all day" +msgstr "hele dagen" + +#: template-functions.php:284 widget.php:93 widget.php:101 +#: K2/ec3_sidebar_module.php:31 +msgid "Event Calendar" +msgstr "Event Calendar" + +#: template-functions.php:364 widget.php:172 widget.php:180 +#: K2/ec3_sidebar_module.php:71 K2/ec3_sidebar_module.php:77 +msgid "Upcoming Events" +msgstr "Kommende hendelser" + +#: template-functions.php:469 +msgid "No events." +msgstr "Ingen hendelser." + +#: template-functions.php:506 template-functions.php:520 +#: template-functions.php:532 +msgid "to" +msgstr "til" + +#: upgrade-posts.php:39 +msgid "Post upgraded." +msgstr "" + +#: upgrade-posts.php:40 +#, php-format +msgid "%d posts upgraded." +msgstr "" + +#: widget.php:96 +msgid "Display upcoming events in a dynamic calendar." +msgstr "" + +#: widget.php:153 +msgid "Number of events:" +msgstr "Antall hendelser:" + +#: widget.php:175 +msgid "Display upcoming events as a list." +msgstr "" + +#, fuzzy +#~ msgid "Update Options" +#~ msgstr "Oppdateringsinnstillinger" + +#~ msgid "EXAMPLE SIDEBAR CODE:" +#~ msgstr "EKSEMPEL PÅ SIDEMENY-KODE" + +#~ msgid "Schedule Editor" +#~ msgstr "Tidspunkt-editor" + +#~ msgid "Show" +#~ msgstr "Vis" + +#~ msgid "Hide" +#~ msgstr "Skjul" + +#~ msgid "EventCalendar module" +#~ msgstr "EventCalendar-modul" + +#~ msgid "Options set." +#~ msgstr "Innstillinger satt." diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/gettext/ec3-nl_NL.mo Binary file web/wp-content/plugins/event-calendar/gettext/ec3-nl_NL.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/gettext/ec3-nl_NL.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/event-calendar/gettext/ec3-nl_NL.po Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,303 @@ +# Event Calendar plug-in for WordPress. +# Copyright (C) 2006, Alex Tingle +# This file is distributed under the same license as the wpcal package. +# Alex Tingle , 2005. +# +msgid "" +msgstr "" +"Project-Id-Version: wpcal 3.1._pre15\n" +"Report-Msgid-Bugs-To: eventcalendar@firetree.net\n" +"POT-Creation-Date: 2008-10-24 12:00+0100\n" +"PO-Revision-Date: 2006-12-15 14:46+0100\n" +"Last-Translator: P. Mathijssen \n" +"Language-Team: nl_NL \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Dutch\n" +"X-Poedit-Country: NETHERLANDS\n" +"X-Poedit-SourceCharset: utf-8\n" + +#: admin.php:67 admin.php:393 +#, fuzzy +msgid "Event Editor" +msgstr "Gebeurtenis bewerker" + +#: admin.php:108 +msgid "Start" +msgstr "Start" + +#: admin.php:109 +msgid "End" +msgstr "Einde" + +#: admin.php:110 +msgid "All Day" +msgstr "De gehele dag" + +#: admin.php:111 +msgid "Repeat" +msgstr "Herhaal" + +#: admin.php:132 +msgid "Add a new event" +msgstr "Een nieuwe gebeurtenis toevoegen" + +#: admin.php:178 +msgid "Delete this event" +msgstr "Verwijder deze gebeurtenis" + +#: admin.php:316 +msgid "Error upgrading database for EventCalendar plugin." +msgstr "" +"Fout tijdens het opwaarderen van de database voor EventCalendar plugin." + +#: admin.php:347 +#, php-format +msgid "Upgraded database to EventCalendar Version %s" +msgstr "Database opgewaardeerd naar EventCalendar Versie %s" + +#: admin.php:351 +msgid "Table already existed" +msgstr "Tabel bestaat reeds" + +#: admin.php:379 admin.php:446 +msgid "Event Calendar Options" +msgstr "Event Calendar Opties" + +#: admin.php:450 +msgid "Easter Egg" +msgstr "" + +#: admin.php:452 upgrade-posts.php:124 +msgid "Upgrade Event Posts" +msgstr "" + +#: admin.php:459 +msgid "Event category" +msgstr "Gebeurtenis categorie" + +#: admin.php:469 +msgid "" +"Event posts are put into this category for you. Don't make this your default " +"post category." +msgstr "" +"Gebeurtenis berichten worden in deze categorie geplaatst. Maak dit niet uw " +"standaard berichten categorie." + +#: admin.php:475 +#, fuzzy +msgid "Show schedule within posts" +msgstr "Geef een gebeurtenis kader weer bij de berichten" + +#: admin.php:479 +msgid "Show Schedule" +msgstr "Geef weer" + +#: admin.php:482 +msgid "Hide Schedule" +msgstr "Verbergen" + +#: admin.php:489 +msgid "Show events as blog entries" +msgstr "Laat gebeurtenissen zien als blog berichten" + +#: admin.php:493 +msgid "Events are Normal Posts" +msgstr "Gebeurtenissen zijn normale berichten" + +#: admin.php:496 +msgid "Keep Events Separate" +msgstr "Houd gebeurtenissen apart" + +#: admin.php:500 +msgid "" +"Keep Events Separate: the Event Category page shows future events, in date " +"order. Events do not appear on front page." +msgstr "" +"Houd gebeurtenissen apart: de gebeurtenis categorie pagina laat toekomstige " +"gebeurtenissen zien,gesorteerd op datum. gebeurtenissen verschijnen niet op " +"de home page." + +#: admin.php:506 admin.php:518 +msgid "Timezone" +msgstr "Tijdzone" + +#: admin.php:510 +msgid "unknown" +msgstr "onbekend" + +#: admin.php:514 +msgid "" +"You cannot change your timezone. Turn off PHP's 'safe mode' or upgrade to " +"PHP5." +msgstr "" +"U kunt uw tijdzone niet veranderen. Zorg dat PHP 'safe mode' uit staat op " +"opwaardeer naar PHP5." + +#: admin.php:530 +msgid "Calendar Display" +msgstr "Kalender weergave" + +#: admin.php:535 +msgid "Number of months" +msgstr "Aantal maanden" + +#: admin.php:542 +msgid "Show all categories in calendar" +msgstr "Laat alle categoriën in de kalender zien" + +#: admin.php:546 +msgid "Only Show Events" +msgstr "Laat alleen gebeurtenissen zien" + +#: admin.php:549 +msgid "Show All Posts" +msgstr "Laat alle berichten zien" + +#: admin.php:556 +msgid "Show day names as" +msgstr "Geef dagnamen weer als" + +#: admin.php:560 +msgid "Single Letter" +msgstr "Een letter" + +#: admin.php:563 +msgid "3-Letter Abbreviation" +msgstr "3-letter afkorting" + +#: admin.php:566 +msgid "Full Day Name" +msgstr "Volledige dagnaam" + +#: admin.php:573 +msgid "Show Event Calendar logo" +msgstr "Geef Event Calendar logo weer" + +#: admin.php:577 +msgid "Show Logo" +msgstr "Geef logo weer" + +#: admin.php:580 +msgid "Hide Logo" +msgstr "Verberg logo" + +#: admin.php:587 +msgid "Position of navigation links" +msgstr "Positie van navigatie links" + +#: admin.php:591 +msgid "Above Calendar" +msgstr "Boven de kalender" + +#: admin.php:594 +msgid "Below Calendar" +msgstr "Onder de kalender" + +#: admin.php:597 +msgid "Hidden" +msgstr "Verborgen" + +#: admin.php:601 +msgid "" +"The navigation links are more usable when they are above the calendar, but " +"you might prefer them below or hidden for aesthetic reasons." +msgstr "" +"De navigatie links zijn handiger als ze boven de kalender staan, maar je kan " +"voorkeur hebben voor onder de kalender of verborgen, om vormgevingsredenen" + +#: admin.php:607 +msgid "Popup event lists" +msgstr "Popup gebeurtenis lijsten" + +#: admin.php:611 +msgid "Show Popups" +msgstr "Geef popups weer" + +#: admin.php:614 +msgid "Hide Popups" +msgstr "Verberg popups" + +#: admin.php:618 +msgid "You might want to disable popups if you use Nicetitles." +msgstr "Je kan popups eventueel uitschakelen als je Nicetitles gebruikt" + +#: template-functions.php:29 +msgid "You must choose an event category." +msgstr "U moet een gebeurtenis categorie kiezen." + +#: template-functions.php:32 widget.php:84 widget.php:162 +#: K2/ec3_sidebar_module.php:64 +msgid "Go to Event Calendar Options" +msgstr "Ga naar de Event Calendar opties" + +#: template-functions.php:91 +msgid "Subscribe to iCalendar." +msgstr "Meld je aan voor iCalendar" + +#: template-functions.php:166 template-functions.php:448 +msgid "all day" +msgstr "de gehele dag" + +#: template-functions.php:284 widget.php:93 widget.php:101 +#: K2/ec3_sidebar_module.php:31 +msgid "Event Calendar" +msgstr "Event Calendar" + +#: template-functions.php:364 widget.php:172 widget.php:180 +#: K2/ec3_sidebar_module.php:71 K2/ec3_sidebar_module.php:77 +msgid "Upcoming Events" +msgstr "Komende gebeurtenissen" + +#: template-functions.php:469 +msgid "No events." +msgstr "Geen gebeurtenissen" + +#: template-functions.php:506 template-functions.php:520 +#: template-functions.php:532 +msgid "to" +msgstr "tot" + +#: upgrade-posts.php:39 +msgid "Post upgraded." +msgstr "" + +#: upgrade-posts.php:40 +#, php-format +msgid "%d posts upgraded." +msgstr "" + +#: widget.php:96 +msgid "Display upcoming events in a dynamic calendar." +msgstr "" + +#: widget.php:153 +msgid "Number of events:" +msgstr "Aantal gebeurtenissen" + +#: widget.php:175 +msgid "Display upcoming events as a list." +msgstr "" + +#, fuzzy +#~ msgid "Update Options" +#~ msgstr "Wijzig opties" + +#~ msgid "EXAMPLE SIDEBAR CODE:" +#~ msgstr "VOORBEELD ZIJBALK CODE" + +#~ msgid "Schedule Editor" +#~ msgstr "Event programma editor" + +#~ msgid "Show" +#~ msgstr "Geef weer" + +#~ msgid "Hide" +#~ msgstr "Verbergen" + +#~ msgid "EventCalendar module" +#~ msgstr "EventKalender module" + +#~ msgid "Options set." +#~ msgstr "Opties bewaard." diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/gettext/ec3-pt_BR.mo Binary file web/wp-content/plugins/event-calendar/gettext/ec3-pt_BR.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/gettext/ec3-pt_BR.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/event-calendar/gettext/ec3-pt_BR.po Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,278 @@ +# Event Calendar plug-in for WordPress. +# Copyright (C) 2006, Alex Tingle +# This file is distributed under the same license as the wpcal package. +# Alex Tingle , 2005. +# +msgid "" +msgstr "" +"Project-Id-Version: wpcal 3.1.0\n" +"Report-Msgid-Bugs-To: eventcalendar@firetree.net\n" +"POT-Creation-Date: 2008-10-24 12:00+0100\n" +"PO-Revision-Date: 2006-12-13 17:41-0300\n" +"Last-Translator: spark \n" +"Language-Team: SYDI.NET\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: admin.php:67 admin.php:393 +msgid "Event Editor" +msgstr "Editor de Eventos" + +#: admin.php:108 +msgid "Start" +msgstr "Início" + +#: admin.php:109 +msgid "End" +msgstr "Término" + +#: admin.php:110 +msgid "All Day" +msgstr "O dia todo" + +#: admin.php:111 +msgid "Repeat" +msgstr "Repetir" + +#: admin.php:132 +msgid "Add a new event" +msgstr "Novo Evento" + +#: admin.php:178 +msgid "Delete this event" +msgstr "Apagar evento" + +#: admin.php:316 +msgid "Error upgrading database for EventCalendar plugin." +msgstr "Erro ao atualizar banco de dados para o plugin EventCalendar" + +#: admin.php:347 +#, php-format +msgid "Upgraded database to EventCalendar Version %s" +msgstr "Banco de dados atualizado para o EventCalendar versão %s" + +#: admin.php:351 +msgid "Table already existed" +msgstr "Tabela já existe" + +#: admin.php:379 admin.php:446 +msgid "Event Calendar Options" +msgstr "Opções do EventCalendar" + +#: admin.php:450 +msgid "Easter Egg" +msgstr "" + +#: admin.php:452 upgrade-posts.php:124 +msgid "Upgrade Event Posts" +msgstr "" + +#: admin.php:459 +msgid "Event category" +msgstr "Categoria dos eventos" + +#: admin.php:469 +msgid "" +"Event posts are put into this category for you. Don't make this your default " +"post category." +msgstr "" +"Artigos serão colocados nesta categoria para você. Não a deixe como " +"categoria 'default'." + +#: admin.php:475 +msgid "Show schedule within posts" +msgstr "Mostrar agenda dentro dos posts" + +#: admin.php:479 +msgid "Show Schedule" +msgstr "Mostrar agenda" + +#: admin.php:482 +msgid "Hide Schedule" +msgstr "Esconder agenda" + +#: admin.php:489 +msgid "Show events as blog entries" +msgstr "Mostrar eventos como artigos no blog" + +#: admin.php:493 +msgid "Events are Normal Posts" +msgstr "Eventos são artigos normais" + +#: admin.php:496 +msgid "Keep Events Separate" +msgstr "Manter Eventos Separados" + +#: admin.php:500 +msgid "" +"Keep Events Separate: the Event Category page shows future events, in date " +"order. Events do not appear on front page." +msgstr "" +"Manter Eventos Separados: A página de categoria de eventos mostrará os " +"eventos futuros, por ordem de data. Eventos não aparecerão na listagem de " +"artigos na home" + +#: admin.php:506 admin.php:518 +msgid "Timezone" +msgstr "Zona de Tempo" + +#: admin.php:510 +msgid "unknown" +msgstr "desconhecido" + +#: admin.php:514 +msgid "" +"You cannot change your timezone. Turn off PHP's 'safe mode' or upgrade to " +"PHP5." +msgstr "" +"Você não pode mudar sua zona de tempo. Desligue o 'safe mode' do PHP ou " +"atualize-o para a versão PHP5" + +#: admin.php:530 +msgid "Calendar Display" +msgstr "Mostrar Calendário" + +#: admin.php:535 +msgid "Number of months" +msgstr "Número de meses" + +#: admin.php:542 +msgid "Show all categories in calendar" +msgstr "Mostrar todas as categorias no calendáario" + +#: admin.php:546 +msgid "Only Show Events" +msgstr "Mostrar apenas Eventos" + +#: admin.php:549 +msgid "Show All Posts" +msgstr "Mostrar todos os Artigos" + +#: admin.php:556 +msgid "Show day names as" +msgstr "Mostrar nome do dia como" + +#: admin.php:560 +msgid "Single Letter" +msgstr "Uma Letra" + +#: admin.php:563 +msgid "3-Letter Abbreviation" +msgstr "Abreviação com 3 Letras" + +#: admin.php:566 +msgid "Full Day Name" +msgstr "Nome completo" + +#: admin.php:573 +msgid "Show Event Calendar logo" +msgstr "Mostrar Logo do EventCalendar" + +#: admin.php:577 +msgid "Show Logo" +msgstr "Mostrar Logo" + +#: admin.php:580 +msgid "Hide Logo" +msgstr "Esconder Logo" + +#: admin.php:587 +msgid "Position of navigation links" +msgstr "Posicionamento dos links de navegação" + +#: admin.php:591 +msgid "Above Calendar" +msgstr "Acima do Calendário" + +#: admin.php:594 +msgid "Below Calendar" +msgstr "Abaixo do Calendário" + +#: admin.php:597 +msgid "Hidden" +msgstr "Escondido" + +#: admin.php:601 +msgid "" +"The navigation links are more usable when they are above the calendar, but " +"you might prefer them below or hidden for aesthetic reasons." +msgstr "" +"Os links de navegação são mais úteis quando estão acima do calendário, mas " +"você pode preferi-los abaixo ou mesmo escondidos, por razões estéticas" + +#: admin.php:607 +msgid "Popup event lists" +msgstr "Lista de Eventos em Popup" + +#: admin.php:611 +msgid "Show Popups" +msgstr "Mostrar Popups" + +#: admin.php:614 +msgid "Hide Popups" +msgstr "Esconder Popups" + +#: admin.php:618 +msgid "You might want to disable popups if you use Nicetitles." +msgstr "Você pode querer desabilitar popups se usar Títulos Curtos" + +#: template-functions.php:29 +msgid "You must choose an event category." +msgstr "Você deve escolher uma categoria de eventos." + +#: template-functions.php:32 widget.php:84 widget.php:162 +#: K2/ec3_sidebar_module.php:64 +msgid "Go to Event Calendar Options" +msgstr "Vá para as opções do EventCalendar" + +#: template-functions.php:91 +msgid "Subscribe to iCalendar." +msgstr "Assine o iCalendar" + +#: template-functions.php:166 template-functions.php:448 +msgid "all day" +msgstr "o dia todo" + +#: template-functions.php:284 widget.php:93 widget.php:101 +#: K2/ec3_sidebar_module.php:31 +msgid "Event Calendar" +msgstr "Calendário de Eventos" + +#: template-functions.php:364 widget.php:172 widget.php:180 +#: K2/ec3_sidebar_module.php:71 K2/ec3_sidebar_module.php:77 +msgid "Upcoming Events" +msgstr "Próximos Eventos" + +#: template-functions.php:469 +msgid "No events." +msgstr "Nenhum Evento" + +#: template-functions.php:506 template-functions.php:520 +#: template-functions.php:532 +msgid "to" +msgstr "até" + +#: upgrade-posts.php:39 +msgid "Post upgraded." +msgstr "" + +#: upgrade-posts.php:40 +#, php-format +msgid "%d posts upgraded." +msgstr "" + +#: widget.php:96 +msgid "Display upcoming events in a dynamic calendar." +msgstr "" + +#: widget.php:153 +msgid "Number of events:" +msgstr "Número de eventos" + +#: widget.php:175 +msgid "Display upcoming events as a list." +msgstr "" + +#~ msgid "EXAMPLE SIDEBAR CODE:" +#~ msgstr "Codigo de exemplo para o sidebar.php" diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/gettext/ec3-ro_RO.mo Binary file web/wp-content/plugins/event-calendar/gettext/ec3-ro_RO.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/gettext/ec3-ro_RO.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/event-calendar/gettext/ec3-ro_RO.po Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,303 @@ +# Event Calendar plug-in for WordPress. +# Copyright (C) 2006, Alex Tingle +# This file is distributed under the same license as the wpcal package. +# Alex Tingle , 2005. +# +msgid "" +msgstr "" +"Project-Id-Version: wpcal 3.1.0\n" +"Report-Msgid-Bugs-To: eventcalendar@firetree.net\n" +"POT-Creation-Date: 2008-10-24 12:00+0100\n" +"PO-Revision-Date: 2007-03-30 17:06+0200\n" +"Last-Translator: Sushkov Stanislav \n" +"Language-Team: WordPress Romania \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Romanian\n" +"X-Poedit-Country: ROMANIA\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-KeywordsList: __;_e\n" +"X-Poedit-Basepath: .\n" +"X-Poedit-SearchPath-0: .\n" + +#: admin.php:67 admin.php:393 +msgid "Event Editor" +msgstr "Editor Evenimente" + +#: admin.php:108 +msgid "Start" +msgstr "Start" + +#: admin.php:109 +msgid "End" +msgstr "Sfârșit" + +#: admin.php:110 +msgid "All Day" +msgstr "Întreaga Zi" + +#: admin.php:111 +msgid "Repeat" +msgstr "Repetă" + +#: admin.php:132 +msgid "Add a new event" +msgstr "Adaugă un nou eveniment" + +#: admin.php:178 +msgid "Delete this event" +msgstr "Şterge acest eveniment" + +#: admin.php:316 +msgid "Error upgrading database for EventCalendar plugin." +msgstr "Eroare la actualizarea bazei de date pentru modulul EventCalendar." + +#: admin.php:347 +#, php-format +msgid "Upgraded database to EventCalendar Version %s" +msgstr "Baza de date actualizată pentru versiunea %s a EventCalendar-ului" + +#: admin.php:351 +msgid "Table already existed" +msgstr "Tabelul deja există" + +#: admin.php:379 admin.php:446 +msgid "Event Calendar Options" +msgstr "Opţiuni Calendar Evenimente" + +#: admin.php:450 +msgid "Easter Egg" +msgstr "" + +#: admin.php:452 upgrade-posts.php:124 +msgid "Upgrade Event Posts" +msgstr "" + +#: admin.php:459 +msgid "Event category" +msgstr "Categorie Evenimente" + +#: admin.php:469 +msgid "" +"Event posts are put into this category for you. Don't make this your default " +"post category." +msgstr "" +"Articolele evenimente sunt adăugate în această categorie pentru tine. Să nu " +"faci categoria implicită pentru articole." + +#: admin.php:475 +msgid "Show schedule within posts" +msgstr "Arată programările în articole" + +#: admin.php:479 +msgid "Show Schedule" +msgstr "Afişează Programare" + +#: admin.php:482 +msgid "Hide Schedule" +msgstr "Ascunde Programare" + +#: admin.php:489 +msgid "Show events as blog entries" +msgstr "Afişează evenimentele drept articole" + +#: admin.php:493 +msgid "Events are Normal Posts" +msgstr "Evenimentele sunt articole normale" + +#: admin.php:496 +msgid "Keep Events Separate" +msgstr "Ţine evenimentele separat" + +#: admin.php:500 +msgid "" +"Keep Events Separate: the Event Category page shows future events, in date " +"order. Events do not appear on front page." +msgstr "" +"Ţine evenimentele separat: pagina cu Categoria Evenimentelor afişează " +"evenimentele din viitor, în ordinea cronologică. Evenimentele nu apar pe " +"prima pagină." + +#: admin.php:506 admin.php:518 +msgid "Timezone" +msgstr "Zona timpului" + +#: admin.php:510 +msgid "unknown" +msgstr "necunoscut" + +#: admin.php:514 +msgid "" +"You cannot change your timezone. Turn off PHP's 'safe mode' or upgrade to " +"PHP5." +msgstr "" +"Nu poţi schimba zona timpului. Închide 'safe mode'-ul la PHP sau " +"actualizează la PHP5." + +#: admin.php:530 +msgid "Calendar Display" +msgstr "Afişare Calendar" + +#: admin.php:535 +msgid "Number of months" +msgstr "Numărul de luni" + +#: admin.php:542 +msgid "Show all categories in calendar" +msgstr "Afişează toate categoriile în calendar" + +#: admin.php:546 +msgid "Only Show Events" +msgstr "Afişează doar evenimentele" + +#: admin.php:549 +msgid "Show All Posts" +msgstr "Afişează toate articolele" + +#: admin.php:556 +msgid "Show day names as" +msgstr "Afişează numele zilelor ca" + +#: admin.php:560 +msgid "Single Letter" +msgstr "O literă" + +#: admin.php:563 +msgid "3-Letter Abbreviation" +msgstr "Abreviere din 3 litere" + +#: admin.php:566 +msgid "Full Day Name" +msgstr "Nume întreg zi" + +#: admin.php:573 +msgid "Show Event Calendar logo" +msgstr "Afişează logo-ul modulului" + +#: admin.php:577 +msgid "Show Logo" +msgstr "Afişează logo" + +#: admin.php:580 +msgid "Hide Logo" +msgstr "Ascunde logo" + +#: admin.php:587 +msgid "Position of navigation links" +msgstr "Poziţionare link-uri navigare" + +#: admin.php:591 +msgid "Above Calendar" +msgstr "Deasupra calendarului" + +#: admin.php:594 +msgid "Below Calendar" +msgstr "Sub calendar" + +#: admin.php:597 +msgid "Hidden" +msgstr "Ascunse" + +#: admin.php:601 +msgid "" +"The navigation links are more usable when they are above the calendar, but " +"you might prefer them below or hidden for aesthetic reasons." +msgstr "" +"Link-urile pentru navigare îs mai folositoare deasupra calendarului, însă le " +"puteţi şi ascunde sau amplasa sub calendar din motive estetice." + +#: admin.php:607 +msgid "Popup event lists" +msgstr "Liste evenimente popup" + +#: admin.php:611 +msgid "Show Popups" +msgstr "Afişează popup-uri" + +#: admin.php:614 +msgid "Hide Popups" +msgstr "Ascunde popup-uri" + +#: admin.php:618 +msgid "You might want to disable popups if you use Nicetitles." +msgstr "" +"Probabil că doriţi să dezactivaţi popup-urile în caz că folosiţi Nicetitles." + +#: template-functions.php:29 +msgid "You must choose an event category." +msgstr "Trebuie să alegeţi o categorie pentru evenimente." + +#: template-functions.php:32 widget.php:84 widget.php:162 +#: K2/ec3_sidebar_module.php:64 +msgid "Go to Event Calendar Options" +msgstr "Mergi la Opţiuni Calendar Evenimente" + +#: template-functions.php:91 +msgid "Subscribe to iCalendar." +msgstr "Abonează-te la iCalendar" + +#: template-functions.php:166 template-functions.php:448 +msgid "all day" +msgstr "întreaga zi" + +#: template-functions.php:284 widget.php:93 widget.php:101 +#: K2/ec3_sidebar_module.php:31 +msgid "Event Calendar" +msgstr "Calendar Evenimente" + +#: template-functions.php:364 widget.php:172 widget.php:180 +#: K2/ec3_sidebar_module.php:71 K2/ec3_sidebar_module.php:77 +msgid "Upcoming Events" +msgstr "Evenimente ce se apropie." + +#: template-functions.php:469 +msgid "No events." +msgstr "Nici un eveniment." + +#: template-functions.php:506 template-functions.php:520 +#: template-functions.php:532 +msgid "to" +msgstr "până în" + +#: upgrade-posts.php:39 +msgid "Post upgraded." +msgstr "" + +#: upgrade-posts.php:40 +#, php-format +msgid "%d posts upgraded." +msgstr "" + +#: widget.php:96 +msgid "Display upcoming events in a dynamic calendar." +msgstr "" + +#: widget.php:153 +msgid "Number of events:" +msgstr "Numărul de evenimente:" + +#: widget.php:175 +msgid "Display upcoming events as a list." +msgstr "" + +#~ msgid "Update Options" +#~ msgstr "Actualizează Opţiuni" + +#~ msgid "EXAMPLE SIDEBAR CODE:" +#~ msgstr "EXEMPLE COD PENTRU PANOU:" + +#~ msgid "Options saved." +#~ msgstr "Opțiuni salvate." + +#~ msgid "- Select -" +#~ msgstr "- Selectează -" + +#~ msgid "View posts for %1$s %2$s" +#~ msgstr "Vezi articolele pentru %1$s %2$s" + +#~ msgid "by: %s" +#~ msgstr "de: %s" + +#~ msgid "Title:" +#~ msgstr "Titlu:" diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/gettext/ec3-ru_RU.mo Binary file web/wp-content/plugins/event-calendar/gettext/ec3-ru_RU.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/gettext/ec3-ru_RU.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/event-calendar/gettext/ec3-ru_RU.po Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,278 @@ +# Event Calendar plug-in for WordPress. +# Copyright (C) 2006, 2007 Alex Tingle +# This file is distributed under the same license as the wpcal package. +# Alex Tingle , 2005. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: wpcal 3.1.1\n" +"Report-Msgid-Bugs-To: eventcalendar@firetree.net\n" +"POT-Creation-Date: 2008-10-24 12:00+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: admin.php:67 admin.php:393 +msgid "Event Editor" +msgstr "Редактор событий" + +#: admin.php:108 +msgid "Start" +msgstr "Начало" + +#: admin.php:109 +msgid "End" +msgstr "Конец" + +#: admin.php:110 +msgid "All Day" +msgstr "Весь день" + +#: admin.php:111 +msgid "Repeat" +msgstr "Повторить" + +#: admin.php:132 +msgid "Add a new event" +msgstr "Добавить новое событие" + +#: admin.php:178 +msgid "Delete this event" +msgstr "Удалить это событие" + +#: admin.php:316 +msgid "Error upgrading database for EventCalendar plugin." +msgstr "Ошибка обновления базы данных плагина EventCalendar." + +#: admin.php:347 +#, php-format +msgid "Upgraded database to EventCalendar Version %s" +msgstr "База данных EventCalendar обновлена до версии %s" + +#: admin.php:351 +msgid "Table already existed" +msgstr "Таблица уже существует" + +#: admin.php:379 admin.php:446 +msgid "Event Calendar Options" +msgstr "Настройки Календаря Событий" + +#: admin.php:450 +msgid "Easter Egg" +msgstr "" + +#: admin.php:452 upgrade-posts.php:124 +msgid "Upgrade Event Posts" +msgstr "" + +#: admin.php:459 +msgid "Event category" +msgstr "Категория событий" + +#: admin.php:469 +msgid "" +"Event posts are put into this category for you. Don't make this your default " +"post category." +msgstr "" +"Сообщения с событиями календаря помещаются в эту категорию. Не делайте ее " +"вашей основнойкатегорией сообщений." + +#: admin.php:475 +msgid "Show schedule within posts" +msgstr "Показывать расписание в сообщениях" + +#: admin.php:479 +msgid "Show Schedule" +msgstr "Показать расписание" + +#: admin.php:482 +msgid "Hide Schedule" +msgstr "Спрятать расписание" + +#: admin.php:489 +msgid "Show events as blog entries" +msgstr "Показывать события как сообщения" + +#: admin.php:493 +msgid "Events are Normal Posts" +msgstr "События - обычные сообщения" + +#: admin.php:496 +msgid "Keep Events Separate" +msgstr "Сохранять события отдельно" + +#: admin.php:500 +msgid "" +"Keep Events Separate: the Event Category page shows future events, in date " +"order. Events do not appear on front page." +msgstr "" + +#: admin.php:506 admin.php:518 +msgid "Timezone" +msgstr "Временная зона" + +#: admin.php:510 +msgid "unknown" +msgstr "неизвестно" + +#: admin.php:514 +msgid "" +"You cannot change your timezone. Turn off PHP's 'safe mode' or upgrade to " +"PHP5." +msgstr "" +"Вы не можете изменить временную зону. Выключите PHP 'safe mode' или обновите " +"PHP до версииPHP5." + +#: admin.php:530 +msgid "Calendar Display" +msgstr "Вид календаря" + +#: admin.php:535 +msgid "Number of months" +msgstr "Количество месяцев" + +#: admin.php:542 +msgid "Show all categories in calendar" +msgstr "Показывать все категории в календаре" + +#: admin.php:546 +msgid "Only Show Events" +msgstr "Показывать только события" + +#: admin.php:549 +msgid "Show All Posts" +msgstr "Показать все сообщения" + +#: admin.php:556 +msgid "Show day names as" +msgstr "Показывать названия дней как" + +#: admin.php:560 +msgid "Single Letter" +msgstr "Одна буква" + +#: admin.php:563 +msgid "3-Letter Abbreviation" +msgstr "Трехбуквенная аббревиатура" + +#: admin.php:566 +msgid "Full Day Name" +msgstr "Полное название дня" + +#: admin.php:573 +msgid "Show Event Calendar logo" +msgstr "Показывать логотип календаря" + +#: admin.php:577 +msgid "Show Logo" +msgstr "Показывать логотип" + +#: admin.php:580 +msgid "Hide Logo" +msgstr "Скрыть логотип" + +#: admin.php:587 +msgid "Position of navigation links" +msgstr "Расположение навигационных ссылок" + +#: admin.php:591 +msgid "Above Calendar" +msgstr "Над календарем" + +#: admin.php:594 +msgid "Below Calendar" +msgstr "Под календарем" + +#: admin.php:597 +msgid "Hidden" +msgstr "Скрыты" + +#: admin.php:601 +msgid "" +"The navigation links are more usable when they are above the calendar, but " +"you might prefer them below or hidden for aesthetic reasons." +msgstr "" +"Навигационные ссылки более удобны, когда они находятся над календарем, но вы " +"можете предпочесть убрать их вниз или вообще скрыть из соображений эстетики." + +#: admin.php:607 +msgid "Popup event lists" +msgstr "Всплывающие списки событий" + +#: admin.php:611 +msgid "Show Popups" +msgstr "Показывать всплывающие списки" + +#: admin.php:614 +msgid "Hide Popups" +msgstr "Скрыть всплывающие списки" + +#: admin.php:618 +msgid "You might want to disable popups if you use Nicetitles." +msgstr "" +"Вы можете захотеть отключить всплывающие списки если вы используете " +"Nicetitles." + +#: template-functions.php:29 +msgid "You must choose an event category." +msgstr "Выберите категорию событий." + +#: template-functions.php:32 widget.php:84 widget.php:162 +#: K2/ec3_sidebar_module.php:64 +msgid "Go to Event Calendar Options" +msgstr "Перейти к настройкам календаря" + +#: template-functions.php:91 +msgid "Subscribe to iCalendar." +msgstr "Подпишитесь с помошью iCalendar." + +#: template-functions.php:166 template-functions.php:448 +msgid "all day" +msgstr "весь день" + +#: template-functions.php:284 widget.php:93 widget.php:101 +#: K2/ec3_sidebar_module.php:31 +msgid "Event Calendar" +msgstr "Календарь событий" + +#: template-functions.php:364 widget.php:172 widget.php:180 +#: K2/ec3_sidebar_module.php:71 K2/ec3_sidebar_module.php:77 +msgid "Upcoming Events" +msgstr "Предстоящие события" + +#: template-functions.php:469 +msgid "No events." +msgstr "Нет событий." + +#: template-functions.php:506 template-functions.php:520 +#: template-functions.php:532 +msgid "to" +msgstr "по" + +#: upgrade-posts.php:39 +msgid "Post upgraded." +msgstr "" + +#: upgrade-posts.php:40 +#, php-format +msgid "%d posts upgraded." +msgstr "" + +#: widget.php:96 +msgid "Display upcoming events in a dynamic calendar." +msgstr "" + +#: widget.php:153 +msgid "Number of events:" +msgstr "Количество событий:" + +#: widget.php:175 +msgid "Display upcoming events as a list." +msgstr "" + +#~ msgid "EXAMPLE SIDEBAR CODE:" +#~ msgstr "ПРИМЕР КОДА БОКОВОЙ КОЛОНКИ:" diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/gettext/ec3-sl_SI.mo Binary file web/wp-content/plugins/event-calendar/gettext/ec3-sl_SI.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/gettext/ec3-sl_SI.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/event-calendar/gettext/ec3-sl_SI.po Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,301 @@ +# Copyright (C) 2006, 2007 Alex Tingle +# This file is distributed under the same license as the wpcal package. +# Alex Tingle , 2005. +# +msgid "" +msgstr "" +"Project-Id-Version: ec3 3.1.1 sl 1\n" +"Report-Msgid-Bugs-To: eventcalendar@firetree.net\n" +"POT-Creation-Date: 2008-10-24 12:00+0100\n" +"PO-Revision-Date: 2008-10-11 01:19+0100\n" +"Last-Translator: Damjan Gerli \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=4; plural=n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%" +"100==4 ? 2 : 3;\n" +"X-Poedit-Language: Slovenian\n" +"X-Poedit-Country: SLOVENIA\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-KeywordsList: __;_e\n" +"X-Poedit-Basepath: .\n" + +#: admin.php:67 admin.php:393 +msgid "Event Editor" +msgstr "Urejevalec dogodkov" + +#: admin.php:108 +msgid "Start" +msgstr "začetek" + +#: admin.php:109 +msgid "End" +msgstr "konec" + +#: admin.php:110 +msgid "All Day" +msgstr "ves dan" + +#: admin.php:111 +msgid "Repeat" +msgstr "ponovi" + +#: admin.php:132 +msgid "Add a new event" +msgstr "Dodaj nov dogodek" + +#: admin.php:178 +msgid "Delete this event" +msgstr "Izbriši ta dogodek" + +#: admin.php:316 +msgid "Error upgrading database for EventCalendar plugin." +msgstr "Napaka pri nadgradnji podatkovne baze za vtičnik EventCalendar." + +#: admin.php:347 +#, php-format +msgid "Upgraded database to EventCalendar Version %s" +msgstr "Nadgrajena podatkovna baza za EventCalendar vezija %s" + +#: admin.php:351 +msgid "Table already existed" +msgstr "Tabela že obstaja" + +#: admin.php:379 admin.php:446 +msgid "Event Calendar Options" +msgstr "Nastavitve za Event Calendar" + +#: admin.php:450 +msgid "Easter Egg" +msgstr "" + +#: admin.php:452 upgrade-posts.php:124 +msgid "Upgrade Event Posts" +msgstr "" + +#: admin.php:459 +msgid "Event category" +msgstr "Kategorija dogodka" + +#: admin.php:469 +msgid "" +"Event posts are put into this category for you. Don't make this your default " +"post category." +msgstr "" +"Prispevki dogodkov bodo za vas postavljeni v to kategorijo. Ne določite te " +"kategorije kot privzete za prispevke." + +#: admin.php:475 +msgid "Show schedule within posts" +msgstr "Pokaži urnik med prispevki" + +#: admin.php:479 +msgid "Show Schedule" +msgstr "pokaži urnik" + +#: admin.php:482 +msgid "Hide Schedule" +msgstr "skrij urnik" + +#: admin.php:489 +msgid "Show events as blog entries" +msgstr "Pokaži dogodke kot vnose spletnika" + +#: admin.php:493 +msgid "Events are Normal Posts" +msgstr "dogodki so običajni prispevki" + +#: admin.php:496 +msgid "Keep Events Separate" +msgstr "obdrži dogodke ločene" + +#: admin.php:500 +msgid "" +"Keep Events Separate: the Event Category page shows future events, in date " +"order. Events do not appear on front page." +msgstr "" +"Obdrži dogodke ločene: stran kategorija dogodka prikaže bodoče dogodke po " +"datumu. Dogodki se ne izpišejo na glavno stran." + +#: admin.php:506 admin.php:518 +msgid "Timezone" +msgstr "Časovni pas" + +#: admin.php:510 +msgid "unknown" +msgstr "neznan" + +#: admin.php:514 +msgid "" +"You cannot change your timezone. Turn off PHP's 'safe mode' or upgrade to " +"PHP5." +msgstr "" +"Ne morete spremeniti časovnega pasa. Izklopite 'varen način' v PHP-ju ali ga " +"nadgradite s PHP5." + +#: admin.php:530 +msgid "Calendar Display" +msgstr "Pokaži koledar" + +#: admin.php:535 +msgid "Number of months" +msgstr "Število mesecev" + +#: admin.php:542 +msgid "Show all categories in calendar" +msgstr "V koledarju pokaži vse kategorije" + +#: admin.php:546 +msgid "Only Show Events" +msgstr "pokaži samo dogodke" + +#: admin.php:549 +msgid "Show All Posts" +msgstr "pokaži vse prispevke" + +#: admin.php:556 +msgid "Show day names as" +msgstr "Pokaži imena dnevov kot" + +#: admin.php:560 +msgid "Single Letter" +msgstr "posamezno črko" + +#: admin.php:563 +msgid "3-Letter Abbreviation" +msgstr "okrajšavo na 3 črke" + +#: admin.php:566 +msgid "Full Day Name" +msgstr "dolgo ime dneva" + +#: admin.php:573 +msgid "Show Event Calendar logo" +msgstr "Pokaži logotip Event Calendar-ja" + +#: admin.php:577 +msgid "Show Logo" +msgstr "pokaži logotip" + +#: admin.php:580 +msgid "Hide Logo" +msgstr "skrij logotip" + +#: admin.php:587 +msgid "Position of navigation links" +msgstr "Navigacijske povezave naj bodo" + +#: admin.php:591 +msgid "Above Calendar" +msgstr "nad koledarjem" + +#: admin.php:594 +msgid "Below Calendar" +msgstr "pod koledarjem" + +#: admin.php:597 +msgid "Hidden" +msgstr "skrite" + +#: admin.php:601 +msgid "" +"The navigation links are more usable when they are above the calendar, but " +"you might prefer them below or hidden for aesthetic reasons." +msgstr "" +"Navigacijske povezave so bolj uporabne če so nad koledarjem, vendar jih " +"morda zaradi estetičnih razlogov želite pod koledarjem ali celo skrite." + +#: admin.php:607 +msgid "Popup event lists" +msgstr "Pojavno okno liste dogodkov" + +#: admin.php:611 +msgid "Show Popups" +msgstr "pokaži pojavna okna" + +#: admin.php:614 +msgid "Hide Popups" +msgstr "skrij pojavna okna" + +#: admin.php:618 +msgid "You might want to disable popups if you use Nicetitles." +msgstr "Mogoče bi hoteli onemogočiti pojavna okna če uporabljate Nicetitles." + +#: template-functions.php:29 +msgid "You must choose an event category." +msgstr "Izbrati moraš kategorijo za dogodke." + +#: template-functions.php:32 widget.php:84 widget.php:162 +#: K2/ec3_sidebar_module.php:64 +msgid "Go to Event Calendar Options" +msgstr "Pojdi na Nastavitve za Event Calendar" + +#: template-functions.php:91 +msgid "Subscribe to iCalendar." +msgstr "Naroči se na iCalendar." + +#: template-functions.php:166 template-functions.php:448 +msgid "all day" +msgstr "ves dan" + +#: template-functions.php:284 widget.php:93 widget.php:101 +#: K2/ec3_sidebar_module.php:31 +msgid "Event Calendar" +msgstr "Koledar dogodkov" + +#: template-functions.php:364 widget.php:172 widget.php:180 +#: K2/ec3_sidebar_module.php:71 K2/ec3_sidebar_module.php:77 +msgid "Upcoming Events" +msgstr "Prihodnji dogodki" + +#: template-functions.php:469 +msgid "No events." +msgstr "Ni dogodkov." + +#: template-functions.php:506 template-functions.php:520 +#: template-functions.php:532 +msgid "to" +msgstr "do" + +#: upgrade-posts.php:39 +msgid "Post upgraded." +msgstr "" + +#: upgrade-posts.php:40 +#, php-format +msgid "%d posts upgraded." +msgstr "" + +#: widget.php:96 +msgid "Display upcoming events in a dynamic calendar." +msgstr "" + +#: widget.php:153 +msgid "Number of events:" +msgstr "Število dogodkov:" + +#: widget.php:175 +msgid "Display upcoming events as a list." +msgstr "" + +#~ msgid "Update Options" +#~ msgstr "Shrani spremembe" + +#~ msgid "EXAMPLE SIDEBAR CODE:" +#~ msgstr "PRIMER KODE STRANSKE PASICE:" + +#~ msgid "Options saved." +#~ msgstr "Spremembe so bile shranjene." + +#~ msgid "- Select -" +#~ msgstr "- Izberi -" + +#~ msgid "View posts for %1$s %2$s" +#~ msgstr "Poglej prispevke za %1$s %2$s" + +#~ msgid "by: %s" +#~ msgstr "avtor: %s" + +#~ msgid "Title:" +#~ msgstr "Naslov:" diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/gettext/ec3-sv_SE.mo Binary file web/wp-content/plugins/event-calendar/gettext/ec3-sv_SE.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/gettext/ec3-sv_SE.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/event-calendar/gettext/ec3-sv_SE.po Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,280 @@ +# Event Calendar plug-in for WordPress. +# Copyright (C) 2006, 2007 Alex Tingle +# This file is distributed under the same license as the wpcal package. +# Alex Tingle , 2005. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: wpcal 3.1.1._rc3\n" +"Report-Msgid-Bugs-To: eventcalendar@firetree.net\n" +"POT-Creation-Date: 2008-10-24 12:00+0100\n" +"PO-Revision-Date: 2007-10-29 00:43+1\n" +"Last-Translator: Anders Laurin \n" +"Language-Team: Svenska (Swedish) \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: admin.php:67 admin.php:393 +msgid "Event Editor" +msgstr "Evenemangseditor" + +#: admin.php:108 +msgid "Start" +msgstr "Början" + +#: admin.php:109 +msgid "End" +msgstr "Slut" + +#: admin.php:110 +msgid "All Day" +msgstr "Hela dygnet" + +#: admin.php:111 +msgid "Repeat" +msgstr "Repetera" + +#: admin.php:132 +msgid "Add a new event" +msgstr "Lägg till ett nytt evenemang" + +#: admin.php:178 +msgid "Delete this event" +msgstr "Ta bort detta evenemang" + +#: admin.php:316 +msgid "Error upgrading database for EventCalendar plugin." +msgstr "Ett fel inträffade vid uppgradering av databasen för EventCalendar." + +#: admin.php:347 +#, php-format +msgid "Upgraded database to EventCalendar Version %s" +msgstr "Uppgraderade databasen till EventCalendar Version %s" + +#: admin.php:351 +msgid "Table already existed" +msgstr "Tabellen existerar redan" + +#: admin.php:379 admin.php:446 +msgid "Event Calendar Options" +msgstr "Inställningar Evenemangskalender" + +#: admin.php:450 +msgid "Easter Egg" +msgstr "" + +#: admin.php:452 upgrade-posts.php:124 +msgid "Upgrade Event Posts" +msgstr "" + +#: admin.php:459 +msgid "Event category" +msgstr "Evenemangskategorin" + +#: admin.php:469 +msgid "" +"Event posts are put into this category for you. Don't make this your default " +"post category." +msgstr "" +"Evememang placeras i denna kategori. Gör inte denna kategori till din " +"standardkategori" + +#: admin.php:475 +msgid "Show schedule within posts" +msgstr "Visa schema i poster" + +#: admin.php:479 +msgid "Show Schedule" +msgstr "Visa schema" + +#: admin.php:482 +msgid "Hide Schedule" +msgstr "Dölj schema" + +#: admin.php:489 +msgid "Show events as blog entries" +msgstr "Visa evenemang som blogginlägg" + +#: admin.php:493 +msgid "Events are Normal Posts" +msgstr "Evenemang är normala poster" + +#: admin.php:496 +msgid "Keep Events Separate" +msgstr "Evenemang visas separat" + +#: admin.php:500 +msgid "" +"Keep Events Separate: the Event Category page shows future events, in date " +"order. Events do not appear on front page." +msgstr "" +"Evenemang visas separat: Evenemangskategorin visar framtida evenemang, i " +"datumordning. Evenemang visas inte på förstasidan." + +#: admin.php:506 admin.php:518 +msgid "Timezone" +msgstr "Tidszon" + +#: admin.php:510 +msgid "unknown" +msgstr "okänd" + +#: admin.php:514 +msgid "" +"You cannot change your timezone. Turn off PHP's 'safe mode' or upgrade to " +"PHP5." +msgstr "" +"Du kan inte ändra din tidszon. Stäng av PHP's 'säkert läge' eller uppgradera " +"till PHP5." + +#: admin.php:530 +msgid "Calendar Display" +msgstr "Kalenderfönster" + +#: admin.php:535 +msgid "Number of months" +msgstr "Antal månader" + +#: admin.php:542 +msgid "Show all categories in calendar" +msgstr "Visa alla kategorier i kalendern" + +#: admin.php:546 +msgid "Only Show Events" +msgstr "Visa bara evenemang" + +#: admin.php:549 +msgid "Show All Posts" +msgstr "Visa alla poster" + +#: admin.php:556 +msgid "Show day names as" +msgstr "Visa veckodagar som" + +#: admin.php:560 +msgid "Single Letter" +msgstr "en bokstav" + +#: admin.php:563 +msgid "3-Letter Abbreviation" +msgstr "tre bokstäver" + +#: admin.php:566 +msgid "Full Day Name" +msgstr "Hela veckodagsnamnet" + +#: admin.php:573 +msgid "Show Event Calendar logo" +msgstr "Visa Evenemangskalender logotyp" + +#: admin.php:577 +msgid "Show Logo" +msgstr "Visa Logotyp" + +#: admin.php:580 +msgid "Hide Logo" +msgstr "Dölj Logotyp" + +#: admin.php:587 +msgid "Position of navigation links" +msgstr "Permalänkarnas position" + +#: admin.php:591 +msgid "Above Calendar" +msgstr "över Kalendern" + +#: admin.php:594 +msgid "Below Calendar" +msgstr "Under Kalendern" + +#: admin.php:597 +msgid "Hidden" +msgstr "Dold" + +#: admin.php:601 +msgid "" +"The navigation links are more usable when they are above the calendar, but " +"you might prefer them below or hidden for aesthetic reasons." +msgstr "" +"Permalänkarna är mer användbara när de finns ovanför kalendern, men du " +"föredrar förmodligen att ha dem under, eller dolda, för utseendets skull." + +#: admin.php:607 +msgid "Popup event lists" +msgstr "Popup-fönster för evenemangslista" + +#: admin.php:611 +msgid "Show Popups" +msgstr "Visa popup-fönster" + +#: admin.php:614 +msgid "Hide Popups" +msgstr "Dölj popup-fönster" + +#: admin.php:618 +msgid "You might want to disable popups if you use Nicetitles." +msgstr "" +"Du föredrar förmodligen att inaktivera popup-fönster om du använder " +"Nicetitles." + +#: template-functions.php:29 +msgid "You must choose an event category." +msgstr "Du måste välja en evenemangskategori." + +#: template-functions.php:32 widget.php:84 widget.php:162 +#: K2/ec3_sidebar_module.php:64 +msgid "Go to Event Calendar Options" +msgstr "Gå till Inställningar för Evenemangskalender" + +#: template-functions.php:91 +msgid "Subscribe to iCalendar." +msgstr "Prenumerera på iCalendar." + +#: template-functions.php:166 template-functions.php:448 +msgid "all day" +msgstr "hela dygnet" + +#: template-functions.php:284 widget.php:93 widget.php:101 +#: K2/ec3_sidebar_module.php:31 +msgid "Event Calendar" +msgstr "Evenemangskalender" + +#: template-functions.php:364 widget.php:172 widget.php:180 +#: K2/ec3_sidebar_module.php:71 K2/ec3_sidebar_module.php:77 +msgid "Upcoming Events" +msgstr "Kommande evenemang" + +#: template-functions.php:469 +msgid "No events." +msgstr "Inga evenemang." + +#: template-functions.php:506 template-functions.php:520 +#: template-functions.php:532 +msgid "to" +msgstr "till" + +#: upgrade-posts.php:39 +msgid "Post upgraded." +msgstr "" + +#: upgrade-posts.php:40 +#, php-format +msgid "%d posts upgraded." +msgstr "" + +#: widget.php:96 +msgid "Display upcoming events in a dynamic calendar." +msgstr "" + +#: widget.php:153 +msgid "Number of events:" +msgstr "Antal evenemang:" + +#: widget.php:175 +msgid "Display upcoming events as a list." +msgstr "" + +#~ msgid "EXAMPLE SIDEBAR CODE:" +#~ msgstr "EXEMPEL På SIDOMENYKOD:" diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/gettext/ec3-tr_TR.mo Binary file web/wp-content/plugins/event-calendar/gettext/ec3-tr_TR.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/gettext/ec3-tr_TR.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/event-calendar/gettext/ec3-tr_TR.po Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,281 @@ +# Event Calendar plug-in for WordPress. +# Copyright (C) 2006, Alex Tingle +# This file is distributed under the same license as the wpcal package. +# Alex Tingle , 2005. +# +msgid "" +msgstr "" +"Project-Id-Version: wpcal 3.1.0\n" +"Report-Msgid-Bugs-To: eventcalendar@firetree.net\n" +"POT-Creation-Date: 2008-10-24 12:00+0100\n" +"PO-Revision-Date: 2008-05-19 16:06+0200\n" +"Last-Translator: Roman Neumüller \n" +"Language-Team: Roman Neumüller \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Turkish\n" +"X-Poedit-Country: TURKEY\n" + +#: admin.php:67 admin.php:393 +msgid "Event Editor" +msgstr "Etkinlik Editörü" + +#: admin.php:108 +msgid "Start" +msgstr "Başlangıç" + +#: admin.php:109 +msgid "End" +msgstr "Son" + +#: admin.php:110 +msgid "All Day" +msgstr "Bütün gün" + +#: admin.php:111 +msgid "Repeat" +msgstr "Tekrar" + +#: admin.php:132 +msgid "Add a new event" +msgstr "Yeni bir etkinlik ekle" + +#: admin.php:178 +msgid "Delete this event" +msgstr "Bu etkinliği sil" + +#: admin.php:316 +msgid "Error upgrading database for EventCalendar plugin." +msgstr "Etkinlik Takvimi güncellerken bir hata oluştu." + +#: admin.php:347 +#, php-format +msgid "Upgraded database to EventCalendar Version %s" +msgstr "Etkinlik Takvimi'nin sürümünü %s yükseltti." + +#: admin.php:351 +msgid "Table already existed" +msgstr "Tablo zaten var" + +#: admin.php:379 admin.php:446 +msgid "Event Calendar Options" +msgstr "Etkinlik Takvimi Tercihleri" + +#: admin.php:450 +msgid "Easter Egg" +msgstr "" + +#: admin.php:452 upgrade-posts.php:124 +msgid "Upgrade Event Posts" +msgstr "" + +#: admin.php:459 +msgid "Event category" +msgstr "Etkinlik kategorisi" + +#: admin.php:469 +msgid "" +"Event posts are put into this category for you. Don't make this your default " +"post category." +msgstr "" +"Etkinlik yazıları bu kategoriye konacak. Bu kategori varsayılan kategori " +"olmasın." + +#: admin.php:475 +msgid "Show schedule within posts" +msgstr "Yazılarında programı göster" + +#: admin.php:479 +msgid "Show Schedule" +msgstr "Programı Göster" + +#: admin.php:482 +msgid "Hide Schedule" +msgstr "Programı Gizle" + +#: admin.php:489 +msgid "Show events as blog entries" +msgstr "Etkinlikler blogun öğe olarak göster" + +#: admin.php:493 +msgid "Events are Normal Posts" +msgstr "Etkinlikler normal yazı olarak algıla" + +#: admin.php:496 +msgid "Keep Events Separate" +msgstr "Etkinlikleri Ayırılsın" + +#: admin.php:500 +msgid "" +"Keep Events Separate: the Event Category page shows future events, in date " +"order. Events do not appear on front page." +msgstr "" +"Etkinlikleri Ayırın: Etkinlik Kategori sayfası gelecek zaman içindeki " +"etkinlikleri tarih sırasına göre gösterir. Etkinlikler ana sayfada görünmez." + +#: admin.php:506 admin.php:518 +msgid "Timezone" +msgstr "Zaman dilimi" + +#: admin.php:510 +msgid "unknown" +msgstr "bilinmeyen" + +#: admin.php:514 +msgid "" +"You cannot change your timezone. Turn off PHP's 'safe mode' or upgrade to " +"PHP5." +msgstr "" +"Zaman dilimi değişemezsin. PHP 'safe_mode=off' ayarlamak ya da PHP5'e " +"yükseltmek lazım." + +#: admin.php:530 +msgid "Calendar Display" +msgstr "Takvim Görünümü" + +#: admin.php:535 +msgid "Number of months" +msgstr "Ay sayısı" + +#: admin.php:542 +msgid "Show all categories in calendar" +msgstr "Takvimde tüm kategorileri göster" + +#: admin.php:546 +msgid "Only Show Events" +msgstr "Sadece etkinlikleri göster" + +#: admin.php:549 +msgid "Show All Posts" +msgstr "Tüm Yazıları Göster" + +#: admin.php:556 +msgid "Show day names as" +msgstr "Gün isimlerini şu şekilde göster" + +#: admin.php:560 +msgid "Single Letter" +msgstr "Tek Harf" + +#: admin.php:563 +msgid "3-Letter Abbreviation" +msgstr "3-Harf Kısaltma" + +#: admin.php:566 +msgid "Full Day Name" +msgstr "Günün Tam İsmi" + +#: admin.php:573 +msgid "Show Event Calendar logo" +msgstr "Etkinlik Takvimi Logosunu Göster" + +#: admin.php:577 +msgid "Show Logo" +msgstr "Logoyu Göster" + +#: admin.php:580 +msgid "Hide Logo" +msgstr "Logoyu Gizle" + +#: admin.php:587 +msgid "Position of navigation links" +msgstr "Gezinim bağlantılarının pozisyonu" + +#: admin.php:591 +msgid "Above Calendar" +msgstr "Takvimin Üstünde" + +#: admin.php:594 +msgid "Below Calendar" +msgstr "Takvimin Altında" + +#: admin.php:597 +msgid "Hidden" +msgstr "Saklı" + +#: admin.php:601 +msgid "" +"The navigation links are more usable when they are above the calendar, but " +"you might prefer them below or hidden for aesthetic reasons." +msgstr "" +"Gezdirme bağlantıları takvimin üstünde daha pratik oluyor - ama istersen " +"altta koyabilirsin ya da tamamen gizlenebilir." + +#: admin.php:607 +msgid "Popup event lists" +msgstr "Etkinlik listesi açılır pencere olarak aç" + +#: admin.php:611 +msgid "Show Popups" +msgstr "Açılır Penceleri göster" + +#: admin.php:614 +msgid "Hide Popups" +msgstr "Açılır Pencereleri gizle" + +#: admin.php:618 +msgid "You might want to disable popups if you use Nicetitles." +msgstr "" +"Eğer Nicetitles kullanıyorsan belki açılır pencereleri devre dışı " +"bırakmak isteyebilirsin." + +#: template-functions.php:29 +msgid "You must choose an event category." +msgstr "Bir etkinlik kategorisi seçmek gerek." + +#: template-functions.php:32 widget.php:84 widget.php:162 +#: K2/ec3_sidebar_module.php:64 +msgid "Go to Event Calendar Options" +msgstr "Etkinlik Takviminin tercihleri sayfasına git" + +#: template-functions.php:91 +msgid "Subscribe to iCalendar." +msgstr "iCalendar'de abone ol" + +#: template-functions.php:166 template-functions.php:448 +msgid "all day" +msgstr "bütün gün" + +#: template-functions.php:284 widget.php:93 widget.php:101 +#: K2/ec3_sidebar_module.php:31 +msgid "Event Calendar" +msgstr "Etkinlik Takvimi" + +#: template-functions.php:364 widget.php:172 widget.php:180 +#: K2/ec3_sidebar_module.php:71 K2/ec3_sidebar_module.php:77 +msgid "Upcoming Events" +msgstr "Gelecek Etkinlikler" + +#: template-functions.php:469 +msgid "No events." +msgstr "Şu anda hiç bir etkinlik yok." + +#: template-functions.php:506 template-functions.php:520 +#: template-functions.php:532 +msgid "to" +msgstr "son:" + +#: upgrade-posts.php:39 +msgid "Post upgraded." +msgstr "" + +#: upgrade-posts.php:40 +#, php-format +msgid "%d posts upgraded." +msgstr "" + +#: widget.php:96 +msgid "Display upcoming events in a dynamic calendar." +msgstr "" + +#: widget.php:153 +msgid "Number of events:" +msgstr "Etkinlikler sayısı:" + +#: widget.php:175 +msgid "Display upcoming events as a list." +msgstr "" + +#~ msgid "EXAMPLE SIDEBAR CODE:" +#~ msgstr "Örnek Yan Menü Kodu:" diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/gettext/ec3.pot --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/event-calendar/gettext/ec3.pot Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,267 @@ +# Event Calendar plug-in for WordPress. +# Copyright (C) 2006, 2007 Alex Tingle +# This file is distributed under the same license as the wpcal package. +# Alex Tingle , 2005. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: wpcal 3.1.4\n" +"Report-Msgid-Bugs-To: eventcalendar@firetree.net\n" +"POT-Creation-Date: 2008-11-09 16:24+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: admin.php:67 admin.php:393 +msgid "Event Editor" +msgstr "" + +#: admin.php:108 +msgid "Start" +msgstr "" + +#: admin.php:109 +msgid "End" +msgstr "" + +#: admin.php:110 +msgid "All Day" +msgstr "" + +#: admin.php:111 +msgid "Repeat" +msgstr "" + +#: admin.php:132 +msgid "Add a new event" +msgstr "" + +#: admin.php:178 +msgid "Delete this event" +msgstr "" + +#: admin.php:316 +msgid "Error upgrading database for EventCalendar plugin." +msgstr "" + +#: admin.php:347 +#, php-format +msgid "Upgraded database to EventCalendar Version %s" +msgstr "" + +#: admin.php:351 +msgid "Table already existed" +msgstr "" + +#: admin.php:379 admin.php:446 +msgid "Event Calendar Options" +msgstr "" + +#: admin.php:450 +msgid "Easter Egg" +msgstr "" + +#: admin.php:452 upgrade-posts.php:124 +msgid "Upgrade Event Posts" +msgstr "" + +#: admin.php:459 +msgid "Event category" +msgstr "" + +#: admin.php:469 +msgid "" +"Event posts are put into this category for you. Don't make this your default " +"post category." +msgstr "" + +#: admin.php:475 +msgid "Show schedule within posts" +msgstr "" + +#: admin.php:479 +msgid "Show Schedule" +msgstr "" + +#: admin.php:482 +msgid "Hide Schedule" +msgstr "" + +#: admin.php:489 +msgid "Show events as blog entries" +msgstr "" + +#: admin.php:493 +msgid "Events are Normal Posts" +msgstr "" + +#: admin.php:496 +msgid "Keep Events Separate" +msgstr "" + +#: admin.php:500 +msgid "" +"Keep Events Separate: the Event Category page shows future events, in date " +"order. Events do not appear on front page." +msgstr "" + +#: admin.php:506 admin.php:518 +msgid "Timezone" +msgstr "" + +#: admin.php:510 +msgid "unknown" +msgstr "" + +#: admin.php:514 +msgid "" +"You cannot change your timezone. Turn off PHP's 'safe mode' or upgrade to " +"PHP5." +msgstr "" + +#: admin.php:530 +msgid "Calendar Display" +msgstr "" + +#: admin.php:535 +msgid "Number of months" +msgstr "" + +#: admin.php:542 +msgid "Show all categories in calendar" +msgstr "" + +#: admin.php:546 +msgid "Only Show Events" +msgstr "" + +#: admin.php:549 +msgid "Show All Posts" +msgstr "" + +#: admin.php:556 +msgid "Show day names as" +msgstr "" + +#: admin.php:560 +msgid "Single Letter" +msgstr "" + +#: admin.php:563 +msgid "3-Letter Abbreviation" +msgstr "" + +#: admin.php:566 +msgid "Full Day Name" +msgstr "" + +#: admin.php:573 +msgid "Show Event Calendar logo" +msgstr "" + +#: admin.php:577 +msgid "Show Logo" +msgstr "" + +#: admin.php:580 +msgid "Hide Logo" +msgstr "" + +#: admin.php:587 +msgid "Position of navigation links" +msgstr "" + +#: admin.php:591 +msgid "Above Calendar" +msgstr "" + +#: admin.php:594 +msgid "Below Calendar" +msgstr "" + +#: admin.php:597 +msgid "Hidden" +msgstr "" + +#: admin.php:601 +msgid "" +"The navigation links are more usable when they are above the calendar, but " +"you might prefer them below or hidden for aesthetic reasons." +msgstr "" + +#: admin.php:607 +msgid "Popup event lists" +msgstr "" + +#: admin.php:611 +msgid "Show Popups" +msgstr "" + +#: admin.php:614 +msgid "Hide Popups" +msgstr "" + +#: admin.php:618 +msgid "You might want to disable popups if you use Nicetitles." +msgstr "" + +#: template-functions.php:29 +msgid "You must choose an event category." +msgstr "" + +#: template-functions.php:32 widget.php:84 widget.php:162 +#: K2/ec3_sidebar_module.php:64 +msgid "Go to Event Calendar Options" +msgstr "" + +#: template-functions.php:91 +msgid "Subscribe to iCalendar." +msgstr "" + +#: template-functions.php:166 template-functions.php:448 +msgid "all day" +msgstr "" + +#: template-functions.php:284 widget.php:93 widget.php:101 +#: K2/ec3_sidebar_module.php:31 +msgid "Event Calendar" +msgstr "" + +#: template-functions.php:364 widget.php:172 widget.php:180 +#: K2/ec3_sidebar_module.php:71 K2/ec3_sidebar_module.php:77 +msgid "Upcoming Events" +msgstr "" + +#: template-functions.php:469 +msgid "No events." +msgstr "" + +#: template-functions.php:506 template-functions.php:520 +#: template-functions.php:532 +msgid "to" +msgstr "" + +#: upgrade-posts.php:39 +msgid "Post upgraded." +msgstr "" + +#: upgrade-posts.php:40 +#, php-format +msgid "%d posts upgraded." +msgstr "" + +#: widget.php:96 +msgid "Display upcoming events in a dynamic calendar." +msgstr "" + +#: widget.php:153 +msgid "Number of events:" +msgstr "" + +#: widget.php:175 +msgid "Display upcoming events as a list." +msgstr "" diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/gettext/pot.sed --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/event-calendar/gettext/pot.sed Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,26 @@ +# Copyright (c) 2006-2008 Alex Tingle. +# +# 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 + + +# Fills in some details in the ec3.pot file. +1,/^$/ { + s/SOME DESCRIPTIVE TITLE/Event Calendar plug-in for WordPress/ + s/YEAR THE PACKAGE.S COPYRIGHT HOLDER/2006, 2007 Alex Tingle/ + s/PACKAGE/wpcal/ + s/FIRST AUTHOR , YEAR./Alex Tingle , 2005./ + s/VERSION/3.1.4/ + s/CHARSET/UTF-8/ +} diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/js/calendar-en.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/event-calendar/js/calendar-en.js Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,127 @@ +// ** I18N + +// Calendar EN language +// Author: Mihai Bazon, +// Encoding: any +// Distributed under the same terms as the calendar itself. + +// For translators: please use UTF-8 if possible. We strongly believe that +// Unicode is the answer to a real internationalized world. Also please +// include your contact information in the header, as can be seen above. + +// full day names +Calendar._DN = new Array +("Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday", + "Sunday"); + +// Please note that the following array of short day names (and the same goes +// for short month names, _SMN) isn't absolutely necessary. We give it here +// for exemplification on how one can customize the short day names, but if +// they are simply the first N letters of the full name you can simply say: +// +// Calendar._SDN_len = N; // short day name length +// Calendar._SMN_len = N; // short month name length +// +// If N = 3 then this is not needed either since we assume a value of 3 if not +// present, to be compatible with translation files that were written before +// this feature. + +// short day names +Calendar._SDN = new Array +("Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat", + "Sun"); + +// First day of the week. "0" means display Sunday first, "1" means display +// Monday first, etc. +Calendar._FD = 0; + +// full month names +Calendar._MN = new Array +("January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December"); + +// short month names +Calendar._SMN = new Array +("Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec"); + +// tooltips +Calendar._TT = {}; +Calendar._TT["INFO"] = "About the calendar"; + +Calendar._TT["ABOUT"] = +"DHTML Date/Time Selector\n" + +"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) +"For latest version visit: http://www.dynarch.com/projects/calendar/\n" + +"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + +"\n\n" + +"Date selection:\n" + +"- Use the \xab, \xbb buttons to select year\n" + +"- Use the " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " buttons to select month\n" + +"- Hold mouse button on any of the above buttons for faster selection."; +Calendar._TT["ABOUT_TIME"] = "\n\n" + +"Time selection:\n" + +"- Click on any of the time parts to increase it\n" + +"- or Shift-click to decrease it\n" + +"- or click and drag for faster selection."; + +Calendar._TT["PREV_YEAR"] = "Prev. year (hold for menu)"; +Calendar._TT["PREV_MONTH"] = "Prev. month (hold for menu)"; +Calendar._TT["GO_TODAY"] = "Go Today"; +Calendar._TT["NEXT_MONTH"] = "Next month (hold for menu)"; +Calendar._TT["NEXT_YEAR"] = "Next year (hold for menu)"; +Calendar._TT["SEL_DATE"] = "Select date"; +Calendar._TT["DRAG_TO_MOVE"] = "Drag to move"; +Calendar._TT["PART_TODAY"] = " (today)"; + +// the following is to inform that "%s" is to be the first day of week +// %s will be replaced with the day name. +Calendar._TT["DAY_FIRST"] = "Display %s first"; + +// This may be locale-dependent. It specifies the week-end days, as an array +// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 +// means Monday, etc. +Calendar._TT["WEEKEND"] = "0,6"; + +Calendar._TT["CLOSE"] = "Close"; +Calendar._TT["TODAY"] = "Today"; +Calendar._TT["TIME_PART"] = "(Shift-)Click or drag to change value"; + +// date formats +Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; +Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; + +Calendar._TT["WK"] = "wk"; +Calendar._TT["TIME"] = "Time:"; diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/js/calendar-setup.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/event-calendar/js/calendar-setup.js Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,200 @@ +/* Copyright Mihai Bazon, 2002, 2003 | http://dynarch.com/mishoo/ + * --------------------------------------------------------------------------- + * + * The DHTML Calendar + * + * Details and latest version at: + * http://dynarch.com/mishoo/calendar.epl + * + * This script is distributed under the GNU Lesser General Public License. + * Read the entire license text here: http://www.gnu.org/licenses/lgpl.html + * + * This file defines helper functions for setting up the calendar. They are + * intended to help non-programmers get a working calendar on their site + * quickly. This script should not be seen as part of the calendar. It just + * shows you what one can do with the calendar, while in the same time + * providing a quick and simple method for setting it up. If you need + * exhaustive customization of the calendar creation process feel free to + * modify this code to suit your needs (this is recommended and much better + * than modifying calendar.js itself). + */ + +// $Id: calendar-setup.js,v 1.25 2005/03/07 09:51:33 mishoo Exp $ + +/** + * This function "patches" an input field (or other element) to use a calendar + * widget for date selection. + * + * The "params" is a single object that can have the following properties: + * + * prop. name | description + * ------------------------------------------------------------------------------------------------- + * inputField | the ID of an input field to store the date + * displayArea | the ID of a DIV or other element to show the date + * button | ID of a button or other element that will trigger the calendar + * eventName | event that will trigger the calendar, without the "on" prefix (default: "click") + * ifFormat | date format that will be stored in the input field + * daFormat | the date format that will be used to display the date in displayArea + * singleClick | (true/false) wether the calendar is in single click mode or not (default: true) + * firstDay | numeric: 0 to 6. "0" means display Sunday first, "1" means display Monday first, etc. + * align | alignment (default: "Br"); if you don't know what's this see the calendar documentation + * range | array with 2 elements. Default: [1900, 2999] -- the range of years available + * weekNumbers | (true/false) if it's true (default) the calendar will display week numbers + * flat | null or element ID; if not null the calendar will be a flat calendar having the parent with the given ID + * flatCallback | function that receives a JS Date object and returns an URL to point the browser to (for flat calendar) + * disableFunc | function that receives a JS Date object and should return true if that date has to be disabled in the calendar + * onSelect | function that gets called when a date is selected. You don't _have_ to supply this (the default is generally okay) + * onClose | function that gets called when the calendar is closed. [default] + * onUpdate | function that gets called after the date is updated in the input field. Receives a reference to the calendar. + * date | the date that the calendar will be initially displayed to + * showsTime | default: false; if true the calendar will include a time selector + * timeFormat | the time format; can be "12" or "24", default is "12" + * electric | if true (default) then given fields/date areas are updated for each move; otherwise they're updated only on close + * step | configures the step of the years in drop-down boxes; default: 2 + * position | configures the calendar absolute position; default: null + * cache | if "true" (but default: "false") it will reuse the same calendar object, where possible + * showOthers | if "true" (but default: "false") it will show days from other months too + * + * None of them is required, they all have default values. However, if you + * pass none of "inputField", "displayArea" or "button" you'll get a warning + * saying "nothing to setup". + */ +Calendar.setup = function (params) { + function param_default(pname, def) { if (typeof params[pname] == "undefined") { params[pname] = def; } }; + + param_default("inputField", null); + param_default("displayArea", null); + param_default("button", null); + param_default("eventName", "click"); + param_default("ifFormat", "%Y/%m/%d"); + param_default("daFormat", "%Y/%m/%d"); + param_default("singleClick", true); + param_default("disableFunc", null); + param_default("dateStatusFunc", params["disableFunc"]); // takes precedence if both are defined + param_default("dateText", null); + param_default("firstDay", null); + param_default("align", "Br"); + param_default("range", [1900, 2999]); + param_default("weekNumbers", true); + param_default("flat", null); + param_default("flatCallback", null); + param_default("onSelect", null); + param_default("onClose", null); + param_default("onUpdate", null); + param_default("date", null); + param_default("showsTime", false); + param_default("timeFormat", "24"); + param_default("electric", true); + param_default("step", 2); + param_default("position", null); + param_default("cache", false); + param_default("showOthers", false); + param_default("multiple", null); + + var tmp = ["inputField", "displayArea", "button"]; + for (var i in tmp) { + if (typeof params[tmp[i]] == "string") { + params[tmp[i]] = document.getElementById(params[tmp[i]]); + } + } + if (!(params.flat || params.multiple || params.inputField || params.displayArea || params.button)) { + alert("Calendar.setup:\n Nothing to setup (no fields found). Please check your code"); + return false; + } + + function onSelect(cal) { + var p = cal.params; + var update = (cal.dateClicked || p.electric); + if (update && p.inputField) { + p.inputField.value = cal.date.print(p.ifFormat); + if (typeof p.inputField.onchange == "function") + p.inputField.onchange(); + } + if (update && p.displayArea) + p.displayArea.innerHTML = cal.date.print(p.daFormat); + if (update && typeof p.onUpdate == "function") + p.onUpdate(cal); + if (update && p.flat) { + if (typeof p.flatCallback == "function") + p.flatCallback(cal); + } + if (update && p.singleClick && cal.dateClicked) + cal.callCloseHandler(); + }; + + if (params.flat != null) { + if (typeof params.flat == "string") + params.flat = document.getElementById(params.flat); + if (!params.flat) { + alert("Calendar.setup:\n Flat specified but can't find parent."); + return false; + } + var cal = new Calendar(params.firstDay, params.date, params.onSelect || onSelect); + cal.showsOtherMonths = params.showOthers; + cal.showsTime = params.showsTime; + cal.time24 = (params.timeFormat == "24"); + cal.params = params; + cal.weekNumbers = params.weekNumbers; + cal.setRange(params.range[0], params.range[1]); + cal.setDateStatusHandler(params.dateStatusFunc); + cal.getDateText = params.dateText; + if (params.ifFormat) { + cal.setDateFormat(params.ifFormat); + } + if (params.inputField && typeof params.inputField.value == "string") { + cal.parseDate(params.inputField.value); + } + cal.create(params.flat); + cal.show(); + return false; + } + + var triggerEl = params.button || params.displayArea || params.inputField; + triggerEl["on" + params.eventName] = function() { + var dateEl = params.inputField || params.displayArea; + var dateFmt = params.inputField ? params.ifFormat : params.daFormat; + var mustCreate = false; + var cal = window.calendar; + if (dateEl) + params.date = Date.parseDate(dateEl.value || dateEl.innerHTML, dateFmt); + if (!(cal && params.cache)) { + window.calendar = cal = new Calendar(params.firstDay, + params.date, + params.onSelect || onSelect, + params.onClose || function(cal) { cal.hide(); }); + cal.showsTime = params.showsTime; + cal.time24 = (params.timeFormat == "24"); + cal.weekNumbers = params.weekNumbers; + mustCreate = true; + } else { + if (params.date) + cal.setDate(params.date); + cal.hide(); + } + if (params.multiple) { + cal.multiple = {}; + for (var i = params.multiple.length; --i >= 0;) { + var d = params.multiple[i]; + var ds = d.print("%Y%m%d"); + cal.multiple[ds] = d; + } + } + cal.showsOtherMonths = params.showOthers; + cal.yearStep = params.step; + cal.setRange(params.range[0], params.range[1]); + cal.params = params; + cal.setDateStatusHandler(params.dateStatusFunc); + cal.getDateText = params.dateText; + cal.setDateFormat(dateFmt); + if (mustCreate) + cal.create(); + cal.refresh(); + if (!params.position) + cal.showAtElement(params.button || params.displayArea || params.inputField, params.align); + else + cal.showAt(params.position[0], params.position[1]); + return false; + }; + + return cal; +}; diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/js/calendar.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/event-calendar/js/calendar.js Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,1806 @@ +/* Copyright Mihai Bazon, 2002-2005 | www.bazon.net/mishoo + * ----------------------------------------------------------- + * + * The DHTML Calendar, version 1.0 "It is happening again" + * + * Details and latest version at: + * www.dynarch.com/projects/calendar + * + * This script is developed by Dynarch.com. Visit us at www.dynarch.com. + * + * This script is distributed under the GNU Lesser General Public License. + * Read the entire license text here: http://www.gnu.org/licenses/lgpl.html + */ + +// $Id: calendar.js,v 1.51 2005/03/07 16:44:31 mishoo Exp $ + +/** The Calendar object constructor. */ +Calendar = function (firstDayOfWeek, dateStr, onSelected, onClose) { + // member variables + this.activeDiv = null; + this.currentDateEl = null; + this.getDateStatus = null; + this.getDateToolTip = null; + this.getDateText = null; + this.timeout = null; + this.onSelected = onSelected || null; + this.onClose = onClose || null; + this.dragging = false; + this.hidden = false; + this.minYear = 1970; + this.maxYear = 2050; + this.dateFormat = Calendar._TT["DEF_DATE_FORMAT"]; + this.ttDateFormat = Calendar._TT["TT_DATE_FORMAT"]; + this.isPopup = true; + this.weekNumbers = true; + this.firstDayOfWeek = typeof firstDayOfWeek == "number" ? firstDayOfWeek : Calendar._FD; // 0 for Sunday, 1 for Monday, etc. + this.showsOtherMonths = false; + this.dateStr = dateStr; + this.ar_days = null; + this.showsTime = false; + this.time24 = true; + this.yearStep = 2; + this.hiliteToday = true; + this.multiple = null; + // HTML elements + this.table = null; + this.element = null; + this.tbody = null; + this.firstdayname = null; + // Combo boxes + this.monthsCombo = null; + this.yearsCombo = null; + this.hilitedMonth = null; + this.activeMonth = null; + this.hilitedYear = null; + this.activeYear = null; + // Information + this.dateClicked = false; + + // one-time initializations + if (typeof Calendar._SDN == "undefined") { + // table of short day names + if (typeof Calendar._SDN_len == "undefined") + Calendar._SDN_len = 3; + var ar = new Array(); + for (var i = 8; i > 0;) { + ar[--i] = Calendar._DN[i].substr(0, Calendar._SDN_len); + } + Calendar._SDN = ar; + // table of short month names + if (typeof Calendar._SMN_len == "undefined") + Calendar._SMN_len = 3; + ar = new Array(); + for (var i = 12; i > 0;) { + ar[--i] = Calendar._MN[i].substr(0, Calendar._SMN_len); + } + Calendar._SMN = ar; + } +}; + +// ** constants + +/// "static", needed for event handlers. +Calendar._C = null; + +/// detect a special case of "web browser" +Calendar.is_ie = ( /msie/i.test(navigator.userAgent) && + !/opera/i.test(navigator.userAgent) ); + +Calendar.is_ie5 = ( Calendar.is_ie && /msie 5\.0/i.test(navigator.userAgent) ); + +/// detect Opera browser +Calendar.is_opera = /opera/i.test(navigator.userAgent); + +/// detect KHTML-based browsers +Calendar.is_khtml = /Konqueror|Safari|KHTML/i.test(navigator.userAgent); + +// BEGIN: UTILITY FUNCTIONS; beware that these might be moved into a separate +// library, at some point. + +Calendar.getAbsolutePos = function(el) { + var SL = 0, ST = 0; + var is_div = /^div$/i.test(el.tagName); + if (is_div && el.scrollLeft) + SL = el.scrollLeft; + if (is_div && el.scrollTop) + ST = el.scrollTop; + var r = { x: el.offsetLeft - SL, y: el.offsetTop - ST }; + if (el.offsetParent) { + var tmp = this.getAbsolutePos(el.offsetParent); + r.x += tmp.x; + r.y += tmp.y; + } + return r; +}; + +Calendar.isRelated = function (el, evt) { + var related = evt.relatedTarget; + if (!related) { + var type = evt.type; + if (type == "mouseover") { + related = evt.fromElement; + } else if (type == "mouseout") { + related = evt.toElement; + } + } + while (related) { + if (related == el) { + return true; + } + related = related.parentNode; + } + return false; +}; + +Calendar.removeClass = function(el, className) { + if (!(el && el.className)) { + return; + } + var cls = el.className.split(" "); + var ar = new Array(); + for (var i = cls.length; i > 0;) { + if (cls[--i] != className) { + ar[ar.length] = cls[i]; + } + } + el.className = ar.join(" "); +}; + +Calendar.addClass = function(el, className) { + Calendar.removeClass(el, className); + el.className += " " + className; +}; + +// FIXME: the following 2 functions totally suck, are useless and should be replaced immediately. +Calendar.getElement = function(ev) { + var f = Calendar.is_ie ? window.event.srcElement : ev.currentTarget; + while (f.nodeType != 1 || /^div$/i.test(f.tagName)) + f = f.parentNode; + return f; +}; + +Calendar.getTargetElement = function(ev) { + var f = Calendar.is_ie ? window.event.srcElement : ev.target; + while (f.nodeType != 1) + f = f.parentNode; + return f; +}; + +Calendar.stopEvent = function(ev) { + ev || (ev = window.event); + if (Calendar.is_ie) { + ev.cancelBubble = true; + ev.returnValue = false; + } else { + ev.preventDefault(); + ev.stopPropagation(); + } + return false; +}; + +Calendar.addEvent = function(el, evname, func) { + if (el.attachEvent) { // IE + el.attachEvent("on" + evname, func); + } else if (el.addEventListener) { // Gecko / W3C + el.addEventListener(evname, func, true); + } else { + el["on" + evname] = func; + } +}; + +Calendar.removeEvent = function(el, evname, func) { + if (el.detachEvent) { // IE + el.detachEvent("on" + evname, func); + } else if (el.removeEventListener) { // Gecko / W3C + el.removeEventListener(evname, func, true); + } else { + el["on" + evname] = null; + } +}; + +Calendar.createElement = function(type, parent) { + var el = null; + if (document.createElementNS) { + // use the XHTML namespace; IE won't normally get here unless + // _they_ "fix" the DOM2 implementation. + el = document.createElementNS("http://www.w3.org/1999/xhtml", type); + } else { + el = document.createElement(type); + } + if (typeof parent != "undefined") { + parent.appendChild(el); + } + return el; +}; + +// END: UTILITY FUNCTIONS + +// BEGIN: CALENDAR STATIC FUNCTIONS + +/** Internal -- adds a set of events to make some element behave like a button. */ +Calendar._add_evs = function(el) { + with (Calendar) { + addEvent(el, "mouseover", dayMouseOver); + addEvent(el, "mousedown", dayMouseDown); + addEvent(el, "mouseout", dayMouseOut); + if (is_ie) { + addEvent(el, "dblclick", dayMouseDblClick); + el.setAttribute("unselectable", true); + } + } +}; + +Calendar.findMonth = function(el) { + if (typeof el.month != "undefined") { + return el; + } else if (typeof el.parentNode.month != "undefined") { + return el.parentNode; + } + return null; +}; + +Calendar.findYear = function(el) { + if (typeof el.year != "undefined") { + return el; + } else if (typeof el.parentNode.year != "undefined") { + return el.parentNode; + } + return null; +}; + +Calendar.showMonthsCombo = function () { + var cal = Calendar._C; + if (!cal) { + return false; + } + var cal = cal; + var cd = cal.activeDiv; + var mc = cal.monthsCombo; + if (cal.hilitedMonth) { + Calendar.removeClass(cal.hilitedMonth, "hilite"); + } + if (cal.activeMonth) { + Calendar.removeClass(cal.activeMonth, "active"); + } + var mon = cal.monthsCombo.getElementsByTagName("div")[cal.date.getMonth()]; + Calendar.addClass(mon, "active"); + cal.activeMonth = mon; + var s = mc.style; + s.display = "block"; + if (cd.navtype < 0) + s.left = cd.offsetLeft + "px"; + else { + var mcw = mc.offsetWidth; + if (typeof mcw == "undefined") + // Konqueror brain-dead techniques + mcw = 50; + s.left = (cd.offsetLeft + cd.offsetWidth - mcw) + "px"; + } + s.top = (cd.offsetTop + cd.offsetHeight) + "px"; +}; + +Calendar.showYearsCombo = function (fwd) { + var cal = Calendar._C; + if (!cal) { + return false; + } + var cal = cal; + var cd = cal.activeDiv; + var yc = cal.yearsCombo; + if (cal.hilitedYear) { + Calendar.removeClass(cal.hilitedYear, "hilite"); + } + if (cal.activeYear) { + Calendar.removeClass(cal.activeYear, "active"); + } + cal.activeYear = null; + var Y = cal.date.getFullYear() + (fwd ? 1 : -1); + var yr = yc.firstChild; + var show = false; + for (var i = 12; i > 0; --i) { + if (Y >= cal.minYear && Y <= cal.maxYear) { + yr.innerHTML = Y; + yr.year = Y; + yr.style.display = "block"; + show = true; + } else { + yr.style.display = "none"; + } + yr = yr.nextSibling; + Y += fwd ? cal.yearStep : -cal.yearStep; + } + if (show) { + var s = yc.style; + s.display = "block"; + if (cd.navtype < 0) + s.left = cd.offsetLeft + "px"; + else { + var ycw = yc.offsetWidth; + if (typeof ycw == "undefined") + // Konqueror brain-dead techniques + ycw = 50; + s.left = (cd.offsetLeft + cd.offsetWidth - ycw) + "px"; + } + s.top = (cd.offsetTop + cd.offsetHeight) + "px"; + } +}; + +// event handlers + +Calendar.tableMouseUp = function(ev) { + var cal = Calendar._C; + if (!cal) { + return false; + } + if (cal.timeout) { + clearTimeout(cal.timeout); + } + var el = cal.activeDiv; + if (!el) { + return false; + } + var target = Calendar.getTargetElement(ev); + ev || (ev = window.event); + Calendar.removeClass(el, "active"); + if (target == el || target.parentNode == el) { + Calendar.cellClick(el, ev); + } + var mon = Calendar.findMonth(target); + var date = null; + if (mon) { + date = new Date(cal.date); + if (mon.month != date.getMonth()) { + date.setMonth(mon.month); + cal.setDate(date); + cal.dateClicked = false; + cal.callHandler(); + } + } else { + var year = Calendar.findYear(target); + if (year) { + date = new Date(cal.date); + if (year.year != date.getFullYear()) { + date.setFullYear(year.year); + cal.setDate(date); + cal.dateClicked = false; + cal.callHandler(); + } + } + } + with (Calendar) { + removeEvent(document, "mouseup", tableMouseUp); + removeEvent(document, "mouseover", tableMouseOver); + removeEvent(document, "mousemove", tableMouseOver); + cal._hideCombos(); + _C = null; + return stopEvent(ev); + } +}; + +Calendar.tableMouseOver = function (ev) { + var cal = Calendar._C; + if (!cal) { + return; + } + var el = cal.activeDiv; + var target = Calendar.getTargetElement(ev); + if (target == el || target.parentNode == el) { + Calendar.addClass(el, "hilite active"); + Calendar.addClass(el.parentNode, "rowhilite"); + } else { + if (typeof el.navtype == "undefined" || (el.navtype != 50 && (el.navtype == 0 || Math.abs(el.navtype) > 2))) + Calendar.removeClass(el, "active"); + Calendar.removeClass(el, "hilite"); + Calendar.removeClass(el.parentNode, "rowhilite"); + } + ev || (ev = window.event); + if (el.navtype == 50 && target != el) { + var pos = Calendar.getAbsolutePos(el); + var w = el.offsetWidth; + var x = ev.clientX; + var dx; + var decrease = true; + if (x > pos.x + w) { + dx = x - pos.x - w; + decrease = false; + } else + dx = pos.x - x; + + if (dx < 0) dx = 0; + var range = el._range; + var current = el._current; + var count = Math.floor(dx / 10) % range.length; + for (var i = range.length; --i >= 0;) + if (range[i] == current) + break; + while (count-- > 0) + if (decrease) { + if (--i < 0) + i = range.length - 1; + } else if ( ++i >= range.length ) + i = 0; + var newval = range[i]; + el.innerHTML = newval; + + cal.onUpdateTime(); + } + var mon = Calendar.findMonth(target); + if (mon) { + if (mon.month != cal.date.getMonth()) { + if (cal.hilitedMonth) { + Calendar.removeClass(cal.hilitedMonth, "hilite"); + } + Calendar.addClass(mon, "hilite"); + cal.hilitedMonth = mon; + } else if (cal.hilitedMonth) { + Calendar.removeClass(cal.hilitedMonth, "hilite"); + } + } else { + if (cal.hilitedMonth) { + Calendar.removeClass(cal.hilitedMonth, "hilite"); + } + var year = Calendar.findYear(target); + if (year) { + if (year.year != cal.date.getFullYear()) { + if (cal.hilitedYear) { + Calendar.removeClass(cal.hilitedYear, "hilite"); + } + Calendar.addClass(year, "hilite"); + cal.hilitedYear = year; + } else if (cal.hilitedYear) { + Calendar.removeClass(cal.hilitedYear, "hilite"); + } + } else if (cal.hilitedYear) { + Calendar.removeClass(cal.hilitedYear, "hilite"); + } + } + return Calendar.stopEvent(ev); +}; + +Calendar.tableMouseDown = function (ev) { + if (Calendar.getTargetElement(ev) == Calendar.getElement(ev)) { + return Calendar.stopEvent(ev); + } +}; + +Calendar.calDragIt = function (ev) { + var cal = Calendar._C; + if (!(cal && cal.dragging)) { + return false; + } + var posX; + var posY; + if (Calendar.is_ie) { + posY = window.event.clientY + document.body.scrollTop; + posX = window.event.clientX + document.body.scrollLeft; + } else { + posX = ev.pageX; + posY = ev.pageY; + } + cal.hideShowCovered(); + var st = cal.element.style; + st.left = (posX - cal.xOffs) + "px"; + st.top = (posY - cal.yOffs) + "px"; + return Calendar.stopEvent(ev); +}; + +Calendar.calDragEnd = function (ev) { + var cal = Calendar._C; + if (!cal) { + return false; + } + cal.dragging = false; + with (Calendar) { + removeEvent(document, "mousemove", calDragIt); + removeEvent(document, "mouseup", calDragEnd); + tableMouseUp(ev); + } + cal.hideShowCovered(); +}; + +Calendar.dayMouseDown = function(ev) { + var el = Calendar.getElement(ev); + if (el.disabled) { + return false; + } + var cal = el.calendar; + cal.activeDiv = el; + Calendar._C = cal; + if (el.navtype != 300) with (Calendar) { + if (el.navtype == 50) { + el._current = el.innerHTML; + addEvent(document, "mousemove", tableMouseOver); + } else + addEvent(document, Calendar.is_ie5 ? "mousemove" : "mouseover", tableMouseOver); + addClass(el, "hilite active"); + addEvent(document, "mouseup", tableMouseUp); + } else if (cal.isPopup) { + cal._dragStart(ev); + } + if (el.navtype == -1 || el.navtype == 1) { + if (cal.timeout) clearTimeout(cal.timeout); + cal.timeout = setTimeout("Calendar.showMonthsCombo()", 250); + } else if (el.navtype == -2 || el.navtype == 2) { + if (cal.timeout) clearTimeout(cal.timeout); + cal.timeout = setTimeout((el.navtype > 0) ? "Calendar.showYearsCombo(true)" : "Calendar.showYearsCombo(false)", 250); + } else { + cal.timeout = null; + } + return Calendar.stopEvent(ev); +}; + +Calendar.dayMouseDblClick = function(ev) { + Calendar.cellClick(Calendar.getElement(ev), ev || window.event); + if (Calendar.is_ie) { + document.selection.empty(); + } +}; + +Calendar.dayMouseOver = function(ev) { + var el = Calendar.getElement(ev); + if (Calendar.isRelated(el, ev) || Calendar._C || el.disabled) { + return false; + } + if (el.ttip) { + if (el.ttip.substr(0, 1) == "_") { + el.ttip = el.caldate.print(el.calendar.ttDateFormat) + el.ttip.substr(1); + } + el.calendar.tooltips.innerHTML = el.ttip; + } + if (el.navtype != 300) { + Calendar.addClass(el, "hilite"); + if (el.caldate) { + Calendar.addClass(el.parentNode, "rowhilite"); + } + } + return Calendar.stopEvent(ev); +}; + +Calendar.dayMouseOut = function(ev) { + with (Calendar) { + var el = getElement(ev); + if (isRelated(el, ev) || _C || el.disabled) + return false; + removeClass(el, "hilite"); + if (el.caldate) + removeClass(el.parentNode, "rowhilite"); + if (el.calendar) + el.calendar.tooltips.innerHTML = _TT["SEL_DATE"]; + return stopEvent(ev); + } +}; + +/** + * A generic "click" handler :) handles all types of buttons defined in this + * calendar. + */ +Calendar.cellClick = function(el, ev) { + var cal = el.calendar; + var closing = false; + var newdate = false; + var date = null; + if (typeof el.navtype == "undefined") { + if (cal.currentDateEl) { + Calendar.removeClass(cal.currentDateEl, "selected"); + Calendar.addClass(el, "selected"); + closing = (cal.currentDateEl == el); + if (!closing) { + cal.currentDateEl = el; + } + } + cal.date.setDateOnly(el.caldate); + date = cal.date; + var other_month = !(cal.dateClicked = !el.otherMonth); + if (!other_month && !cal.currentDateEl) + cal._toggleMultipleDate(new Date(date)); + else + newdate = !el.disabled; + // a date was clicked + if (other_month) + cal._init(cal.firstDayOfWeek, date); + } else { + if (el.navtype == 200) { + Calendar.removeClass(el, "hilite"); + cal.callCloseHandler(); + return; + } + date = new Date(cal.date); + if (el.navtype == 0) + date.setDateOnly(new Date()); // TODAY + // unless "today" was clicked, we assume no date was clicked so + // the selected handler will know not to close the calenar when + // in single-click mode. + // cal.dateClicked = (el.navtype == 0); + cal.dateClicked = false; + var year = date.getFullYear(); + var mon = date.getMonth(); + function setMonth(m) { + var day = date.getDate(); + var max = date.getMonthDays(m); + if (day > max) { + date.setDate(max); + } + date.setMonth(m); + }; + switch (el.navtype) { + case 400: + Calendar.removeClass(el, "hilite"); + var text = Calendar._TT["ABOUT"]; + if (typeof text != "undefined") { + text += cal.showsTime ? Calendar._TT["ABOUT_TIME"] : ""; + } else { + // FIXME: this should be removed as soon as lang files get updated! + text = "Help and about box text is not translated into this language.\n" + + "If you know this language and you feel generous please update\n" + + "the corresponding file in \"lang\" subdir to match calendar-en.js\n" + + "and send it back to to get it into the distribution ;-)\n\n" + + "Thank you!\n" + + "http://dynarch.com/mishoo/calendar.epl\n"; + } + alert(text); + return; + case -2: + if (year > cal.minYear) { + date.setFullYear(year - 1); + } + break; + case -1: + if (mon > 0) { + setMonth(mon - 1); + } else if (year-- > cal.minYear) { + date.setFullYear(year); + setMonth(11); + } + break; + case 1: + if (mon < 11) { + setMonth(mon + 1); + } else if (year < cal.maxYear) { + date.setFullYear(year + 1); + setMonth(0); + } + break; + case 2: + if (year < cal.maxYear) { + date.setFullYear(year + 1); + } + break; + case 100: + cal.setFirstDayOfWeek(el.fdow); + return; + case 50: + var range = el._range; + var current = el.innerHTML; + for (var i = range.length; --i >= 0;) + if (range[i] == current) + break; + if (ev && ev.shiftKey) { + if (--i < 0) + i = range.length - 1; + } else if ( ++i >= range.length ) + i = 0; + var newval = range[i]; + el.innerHTML = newval; + cal.onUpdateTime(); + return; + case 0: + // TODAY will bring us here + if ((typeof cal.getDateStatus == "function") && + cal.getDateStatus(date, date.getFullYear(), date.getMonth(), date.getDate())) { + return false; + } + break; + } + if (!date.equalsTo(cal.date)) { + cal.setDate(date); + newdate = true; + } else if (el.navtype == 0) + newdate = closing = true; + } + if (newdate) { + ev && cal.callHandler(); + } + if (closing) { + Calendar.removeClass(el, "hilite"); + ev && cal.callCloseHandler(); + } +}; + +// END: CALENDAR STATIC FUNCTIONS + +// BEGIN: CALENDAR OBJECT FUNCTIONS + +/** + * This function creates the calendar inside the given parent. If _par is + * null than it creates a popup calendar inside the BODY element. If _par is + * an element, be it BODY, then it creates a non-popup calendar (still + * hidden). Some properties need to be set before calling this function. + */ +Calendar.prototype.create = function (_par) { + var parent = null; + if (! _par) { + // default parent is the document body, in which case we create + // a popup calendar. + parent = document.getElementsByTagName("body")[0]; + this.isPopup = true; + } else { + parent = _par; + this.isPopup = false; + } + this.date = this.dateStr ? new Date(this.dateStr) : new Date(); + + var table = Calendar.createElement("table"); + this.table = table; + table.cellSpacing = 0; + table.cellPadding = 0; + table.calendar = this; + Calendar.addEvent(table, "mousedown", Calendar.tableMouseDown); + + var div = Calendar.createElement("div"); + this.element = div; + div.className = "calendar"; + if (this.isPopup) { + div.style.position = "absolute"; + div.style.display = "none"; + } + div.appendChild(table); + + var thead = Calendar.createElement("thead", table); + var cell = null; + var row = null; + + var cal = this; + var hh = function (text, cs, navtype) { + cell = Calendar.createElement("td", row); + cell.colSpan = cs; + cell.className = "button"; + if (navtype != 0 && Math.abs(navtype) <= 2) + cell.className += " nav"; + Calendar._add_evs(cell); + cell.calendar = cal; + cell.navtype = navtype; + cell.innerHTML = "
    " + text + "
    "; + return cell; + }; + + row = Calendar.createElement("tr", thead); + var title_length = 6; + (this.isPopup) && --title_length; + (this.weekNumbers) && ++title_length; + + hh("?", 1, 400).ttip = Calendar._TT["INFO"]; + this.title = hh("", title_length, 300); + this.title.className = "title"; + if (this.isPopup) { + this.title.ttip = Calendar._TT["DRAG_TO_MOVE"]; + this.title.style.cursor = "move"; + hh("×", 1, 200).ttip = Calendar._TT["CLOSE"]; + } + + row = Calendar.createElement("tr", thead); + row.className = "headrow"; + + this._nav_py = hh("«", 1, -2); + this._nav_py.ttip = Calendar._TT["PREV_YEAR"]; + + this._nav_pm = hh("‹", 1, -1); + this._nav_pm.ttip = Calendar._TT["PREV_MONTH"]; + + this._nav_now = hh(Calendar._TT["TODAY"], this.weekNumbers ? 4 : 3, 0); + this._nav_now.ttip = Calendar._TT["GO_TODAY"]; + + this._nav_nm = hh("›", 1, 1); + this._nav_nm.ttip = Calendar._TT["NEXT_MONTH"]; + + this._nav_ny = hh("»", 1, 2); + this._nav_ny.ttip = Calendar._TT["NEXT_YEAR"]; + + // day names + row = Calendar.createElement("tr", thead); + row.className = "daynames"; + if (this.weekNumbers) { + cell = Calendar.createElement("td", row); + cell.className = "name wn"; + cell.innerHTML = Calendar._TT["WK"]; + } + for (var i = 7; i > 0; --i) { + cell = Calendar.createElement("td", row); + if (!i) { + cell.navtype = 100; + cell.calendar = this; + Calendar._add_evs(cell); + } + } + this.firstdayname = (this.weekNumbers) ? row.firstChild.nextSibling : row.firstChild; + this._displayWeekdays(); + + var tbody = Calendar.createElement("tbody", table); + this.tbody = tbody; + + for (i = 6; i > 0; --i) { + row = Calendar.createElement("tr", tbody); + if (this.weekNumbers) { + cell = Calendar.createElement("td", row); + } + for (var j = 7; j > 0; --j) { + cell = Calendar.createElement("td", row); + cell.calendar = this; + Calendar._add_evs(cell); + } + } + + if (this.showsTime) { + row = Calendar.createElement("tr", tbody); + row.className = "time"; + + cell = Calendar.createElement("td", row); + cell.className = "time"; + cell.colSpan = 2; + cell.innerHTML = Calendar._TT["TIME"] || " "; + + cell = Calendar.createElement("td", row); + cell.className = "time"; + cell.colSpan = this.weekNumbers ? 4 : 3; + + (function(){ + function makeTimePart(className, init, range_start, range_end) { + var part = Calendar.createElement("span", cell); + part.className = className; + part.innerHTML = init; + part.calendar = cal; + part.ttip = Calendar._TT["TIME_PART"]; + part.navtype = 50; + part._range = []; + if (typeof range_start != "number") + part._range = range_start; + else { + for (var i = range_start; i <= range_end; ++i) { + var txt; + if (i < 10 && range_end >= 10) txt = '0' + i; + else txt = '' + i; + part._range[part._range.length] = txt; + } + } + Calendar._add_evs(part); + return part; + }; + var hrs = cal.date.getHours(); + var mins = cal.date.getMinutes(); + var t12 = !cal.time24; + var pm = (hrs > 12); + if (t12 && pm) hrs -= 12; + var H = makeTimePart("hour", hrs, t12 ? 1 : 0, t12 ? 12 : 23); + var span = Calendar.createElement("span", cell); + span.innerHTML = ":"; + span.className = "colon"; + var M = makeTimePart("minute", mins, 0, 59); + var AP = null; + cell = Calendar.createElement("td", row); + cell.className = "time"; + cell.colSpan = 2; + if (t12) + AP = makeTimePart("ampm", pm ? "pm" : "am", ["am", "pm"]); + else + cell.innerHTML = " "; + + cal.onSetTime = function() { + var pm, hrs = this.date.getHours(), + mins = this.date.getMinutes(); + if (t12) { + pm = (hrs >= 12); + if (pm) hrs -= 12; + if (hrs == 0) hrs = 12; + AP.innerHTML = pm ? "pm" : "am"; + } + H.innerHTML = (hrs < 10) ? ("0" + hrs) : hrs; + M.innerHTML = (mins < 10) ? ("0" + mins) : mins; + }; + + cal.onUpdateTime = function() { + var date = this.date; + var h = parseInt(H.innerHTML, 10); + if (t12) { + if (/pm/i.test(AP.innerHTML) && h < 12) + h += 12; + else if (/am/i.test(AP.innerHTML) && h == 12) + h = 0; + } + var d = date.getDate(); + var m = date.getMonth(); + var y = date.getFullYear(); + date.setHours(h); + date.setMinutes(parseInt(M.innerHTML, 10)); + date.setFullYear(y); + date.setMonth(m); + date.setDate(d); + this.dateClicked = false; + this.callHandler(); + }; + })(); + } else { + this.onSetTime = this.onUpdateTime = function() {}; + } + + var tfoot = Calendar.createElement("tfoot", table); + + row = Calendar.createElement("tr", tfoot); + row.className = "footrow"; + + cell = hh(Calendar._TT["SEL_DATE"], this.weekNumbers ? 8 : 7, 300); + cell.className = "ttip"; + if (this.isPopup) { + cell.ttip = Calendar._TT["DRAG_TO_MOVE"]; + cell.style.cursor = "move"; + } + this.tooltips = cell; + + div = Calendar.createElement("div", this.element); + this.monthsCombo = div; + div.className = "combo"; + for (i = 0; i < Calendar._MN.length; ++i) { + var mn = Calendar.createElement("div"); + mn.className = Calendar.is_ie ? "label-IEfix" : "label"; + mn.month = i; + mn.innerHTML = Calendar._SMN[i]; + div.appendChild(mn); + } + + div = Calendar.createElement("div", this.element); + this.yearsCombo = div; + div.className = "combo"; + for (i = 12; i > 0; --i) { + var yr = Calendar.createElement("div"); + yr.className = Calendar.is_ie ? "label-IEfix" : "label"; + div.appendChild(yr); + } + + this._init(this.firstDayOfWeek, this.date); + parent.appendChild(this.element); +}; + +/** keyboard navigation, only for popup calendars */ +Calendar._keyEvent = function(ev) { + var cal = window._dynarch_popupCalendar; + if (!cal || cal.multiple) + return false; + (Calendar.is_ie) && (ev = window.event); + var act = (Calendar.is_ie || ev.type == "keypress"), + K = ev.keyCode; + if (ev.ctrlKey) { + switch (K) { + case 37: // KEY left + act && Calendar.cellClick(cal._nav_pm); + break; + case 38: // KEY up + act && Calendar.cellClick(cal._nav_py); + break; + case 39: // KEY right + act && Calendar.cellClick(cal._nav_nm); + break; + case 40: // KEY down + act && Calendar.cellClick(cal._nav_ny); + break; + default: + return false; + } + } else switch (K) { + case 32: // KEY space (now) + Calendar.cellClick(cal._nav_now); + break; + case 27: // KEY esc + act && cal.callCloseHandler(); + break; + case 37: // KEY left + case 38: // KEY up + case 39: // KEY right + case 40: // KEY down + if (act) { + var prev, x, y, ne, el, step; + prev = K == 37 || K == 38; + step = (K == 37 || K == 39) ? 1 : 7; + function setVars() { + el = cal.currentDateEl; + var p = el.pos; + x = p & 15; + y = p >> 4; + ne = cal.ar_days[y][x]; + };setVars(); + function prevMonth() { + var date = new Date(cal.date); + date.setDate(date.getDate() - step); + cal.setDate(date); + }; + function nextMonth() { + var date = new Date(cal.date); + date.setDate(date.getDate() + step); + cal.setDate(date); + }; + while (1) { + switch (K) { + case 37: // KEY left + if (--x >= 0) + ne = cal.ar_days[y][x]; + else { + x = 6; + K = 38; + continue; + } + break; + case 38: // KEY up + if (--y >= 0) + ne = cal.ar_days[y][x]; + else { + prevMonth(); + setVars(); + } + break; + case 39: // KEY right + if (++x < 7) + ne = cal.ar_days[y][x]; + else { + x = 0; + K = 40; + continue; + } + break; + case 40: // KEY down + if (++y < cal.ar_days.length) + ne = cal.ar_days[y][x]; + else { + nextMonth(); + setVars(); + } + break; + } + break; + } + if (ne) { + if (!ne.disabled) + Calendar.cellClick(ne); + else if (prev) + prevMonth(); + else + nextMonth(); + } + } + break; + case 13: // KEY enter + if (act) + Calendar.cellClick(cal.currentDateEl, ev); + break; + default: + return false; + } + return Calendar.stopEvent(ev); +}; + +/** + * (RE)Initializes the calendar to the given date and firstDayOfWeek + */ +Calendar.prototype._init = function (firstDayOfWeek, date) { + var today = new Date(), + TY = today.getFullYear(), + TM = today.getMonth(), + TD = today.getDate(); + this.table.style.visibility = "hidden"; + var year = date.getFullYear(); + if (year < this.minYear) { + year = this.minYear; + date.setFullYear(year); + } else if (year > this.maxYear) { + year = this.maxYear; + date.setFullYear(year); + } + this.firstDayOfWeek = firstDayOfWeek; + this.date = new Date(date); + var month = date.getMonth(); + var mday = date.getDate(); + var no_days = date.getMonthDays(); + + // calendar voodoo for computing the first day that would actually be + // displayed in the calendar, even if it's from the previous month. + // WARNING: this is magic. ;-) + date.setDate(1); + var day1 = (date.getDay() - this.firstDayOfWeek) % 7; + if (day1 < 0) + day1 += 7; + date.setDate(-day1); + date.setDate(date.getDate() + 1); + + var row = this.tbody.firstChild; + var MN = Calendar._SMN[month]; + var ar_days = this.ar_days = new Array(); + var weekend = Calendar._TT["WEEKEND"]; + var dates = this.multiple ? (this.datesCells = {}) : null; + for (var i = 0; i < 6; ++i, row = row.nextSibling) { + var cell = row.firstChild; + if (this.weekNumbers) { + cell.className = "day wn"; + cell.innerHTML = date.getWeekNumber(); + cell = cell.nextSibling; + } + row.className = "daysrow"; + var hasdays = false, iday, dpos = ar_days[i] = []; + for (var j = 0; j < 7; ++j, cell = cell.nextSibling, date.setDate(iday + 1)) { + iday = date.getDate(); + var wday = date.getDay(); + cell.className = "day"; + cell.pos = i << 4 | j; + dpos[j] = cell; + var current_month = (date.getMonth() == month); + if (!current_month) { + if (this.showsOtherMonths) { + cell.className += " othermonth"; + cell.otherMonth = true; + } else { + cell.className = "emptycell"; + cell.innerHTML = " "; + cell.disabled = true; + continue; + } + } else { + cell.otherMonth = false; + hasdays = true; + } + cell.disabled = false; + cell.innerHTML = this.getDateText ? this.getDateText(date, iday) : iday; + if (dates) + dates[date.print("%Y%m%d")] = cell; + if (this.getDateStatus) { + var status = this.getDateStatus(date, year, month, iday); + if (this.getDateToolTip) { + var toolTip = this.getDateToolTip(date, year, month, iday); + if (toolTip) + cell.title = toolTip; + } + if (status === true) { + cell.className += " disabled"; + cell.disabled = true; + } else { + if (/disabled/i.test(status)) + cell.disabled = true; + cell.className += " " + status; + } + } + if (!cell.disabled) { + cell.caldate = new Date(date); + cell.ttip = "_"; + if (!this.multiple && current_month + && iday == mday && this.hiliteToday) { + cell.className += " selected"; + this.currentDateEl = cell; + } + if (date.getFullYear() == TY && + date.getMonth() == TM && + iday == TD) { + cell.className += " today"; + cell.ttip += Calendar._TT["PART_TODAY"]; + } + if (weekend.indexOf(wday.toString()) != -1) + cell.className += cell.otherMonth ? " oweekend" : " weekend"; + } + } + if (!(hasdays || this.showsOtherMonths)) + row.className = "emptyrow"; + } + this.title.innerHTML = Calendar._MN[month] + ", " + year; + this.onSetTime(); + this.table.style.visibility = "visible"; + this._initMultipleDates(); + // PROFILE + // this.tooltips.innerHTML = "Generated in " + ((new Date()) - today) + " ms"; +}; + +Calendar.prototype._initMultipleDates = function() { + if (this.multiple) { + for (var i in this.multiple) { + var cell = this.datesCells[i]; + var d = this.multiple[i]; + if (!d) + continue; + if (cell) + cell.className += " selected"; + } + } +}; + +Calendar.prototype._toggleMultipleDate = function(date) { + if (this.multiple) { + var ds = date.print("%Y%m%d"); + var cell = this.datesCells[ds]; + if (cell) { + var d = this.multiple[ds]; + if (!d) { + Calendar.addClass(cell, "selected"); + this.multiple[ds] = date; + } else { + Calendar.removeClass(cell, "selected"); + delete this.multiple[ds]; + } + } + } +}; + +Calendar.prototype.setDateToolTipHandler = function (unaryFunction) { + this.getDateToolTip = unaryFunction; +}; + +/** + * Calls _init function above for going to a certain date (but only if the + * date is different than the currently selected one). + */ +Calendar.prototype.setDate = function (date) { + if (!date.equalsTo(this.date)) { + this._init(this.firstDayOfWeek, date); + } +}; + +/** + * Refreshes the calendar. Useful if the "disabledHandler" function is + * dynamic, meaning that the list of disabled date can change at runtime. + * Just * call this function if you think that the list of disabled dates + * should * change. + */ +Calendar.prototype.refresh = function () { + this._init(this.firstDayOfWeek, this.date); +}; + +/** Modifies the "firstDayOfWeek" parameter (pass 0 for Synday, 1 for Monday, etc.). */ +Calendar.prototype.setFirstDayOfWeek = function (firstDayOfWeek) { + this._init(firstDayOfWeek, this.date); + this._displayWeekdays(); +}; + +/** + * Allows customization of what dates are enabled. The "unaryFunction" + * parameter must be a function object that receives the date (as a JS Date + * object) and returns a boolean value. If the returned value is true then + * the passed date will be marked as disabled. + */ +Calendar.prototype.setDateStatusHandler = Calendar.prototype.setDisabledHandler = function (unaryFunction) { + this.getDateStatus = unaryFunction; +}; + +/** Customization of allowed year range for the calendar. */ +Calendar.prototype.setRange = function (a, z) { + this.minYear = a; + this.maxYear = z; +}; + +/** Calls the first user handler (selectedHandler). */ +Calendar.prototype.callHandler = function () { + if (this.onSelected) { + this.onSelected(this, this.date.print(this.dateFormat)); + } +}; + +/** Calls the second user handler (closeHandler). */ +Calendar.prototype.callCloseHandler = function () { + if (this.onClose) { + this.onClose(this); + } + this.hideShowCovered(); +}; + +/** Removes the calendar object from the DOM tree and destroys it. */ +Calendar.prototype.destroy = function () { + var el = this.element.parentNode; + el.removeChild(this.element); + Calendar._C = null; + window._dynarch_popupCalendar = null; +}; + +/** + * Moves the calendar element to a different section in the DOM tree (changes + * its parent). + */ +Calendar.prototype.reparent = function (new_parent) { + var el = this.element; + el.parentNode.removeChild(el); + new_parent.appendChild(el); +}; + +// This gets called when the user presses a mouse button anywhere in the +// document, if the calendar is shown. If the click was outside the open +// calendar this function closes it. +Calendar._checkCalendar = function(ev) { + var calendar = window._dynarch_popupCalendar; + if (!calendar) { + return false; + } + var el = Calendar.is_ie ? Calendar.getElement(ev) : Calendar.getTargetElement(ev); + for (; el != null && el != calendar.element; el = el.parentNode); + if (el == null) { + // calls closeHandler which should hide the calendar. + window._dynarch_popupCalendar.callCloseHandler(); + return Calendar.stopEvent(ev); + } +}; + +/** Shows the calendar. */ +Calendar.prototype.show = function () { + var rows = this.table.getElementsByTagName("tr"); + for (var i = rows.length; i > 0;) { + var row = rows[--i]; + Calendar.removeClass(row, "rowhilite"); + var cells = row.getElementsByTagName("td"); + for (var j = cells.length; j > 0;) { + var cell = cells[--j]; + Calendar.removeClass(cell, "hilite"); + Calendar.removeClass(cell, "active"); + } + } + this.element.style.display = "block"; + this.hidden = false; + if (this.isPopup) { + window._dynarch_popupCalendar = this; + Calendar.addEvent(document, "keydown", Calendar._keyEvent); + Calendar.addEvent(document, "keypress", Calendar._keyEvent); + Calendar.addEvent(document, "mousedown", Calendar._checkCalendar); + } + this.hideShowCovered(); +}; + +/** + * Hides the calendar. Also removes any "hilite" from the class of any TD + * element. + */ +Calendar.prototype.hide = function () { + if (this.isPopup) { + Calendar.removeEvent(document, "keydown", Calendar._keyEvent); + Calendar.removeEvent(document, "keypress", Calendar._keyEvent); + Calendar.removeEvent(document, "mousedown", Calendar._checkCalendar); + } + this.element.style.display = "none"; + this.hidden = true; + this.hideShowCovered(); +}; + +/** + * Shows the calendar at a given absolute position (beware that, depending on + * the calendar element style -- position property -- this might be relative + * to the parent's containing rectangle). + */ +Calendar.prototype.showAt = function (x, y) { + var s = this.element.style; + s.left = x + "px"; + s.top = y + "px"; + this.show(); +}; + +/** Shows the calendar near a given element. */ +Calendar.prototype.showAtElement = function (el, opts) { + var self = this; + var p = Calendar.getAbsolutePos(el); + if (!opts || typeof opts != "string") { + this.showAt(p.x, p.y + el.offsetHeight); + return true; + } + function fixPosition(box) { + if (box.x < 0) + box.x = 0; + if (box.y < 0) + box.y = 0; + var cp = document.createElement("div"); + var s = cp.style; + s.position = "absolute"; + s.right = s.bottom = s.width = s.height = "0px"; + document.body.appendChild(cp); + var br = Calendar.getAbsolutePos(cp); + document.body.removeChild(cp); + if (Calendar.is_ie) { + br.y += document.documentElement.scrollTop || document.body.scrollTop; + br.x += document.documentElement.scrollLeft || document.body.scrollLeft; + } else { + br.y += window.scrollY; + br.x += window.scrollX; + } + var tmp = box.x + box.width - br.x; + if (tmp > 0) box.x -= tmp; + tmp = box.y + box.height - br.y; + if (tmp > 0) box.y -= tmp; + }; + this.element.style.display = "block"; + Calendar.continuation_for_the_fucking_khtml_browser = function() { + var w = self.element.offsetWidth; + var h = self.element.offsetHeight; + self.element.style.display = "none"; + var valign = opts.substr(0, 1); + var halign = "l"; + if (opts.length > 1) { + halign = opts.substr(1, 1); + } + // vertical alignment + switch (valign) { + case "T": p.y -= h; break; + case "B": p.y += el.offsetHeight; break; + case "C": p.y += (el.offsetHeight - h) / 2; break; + case "t": p.y += el.offsetHeight - h; break; + case "b": break; // already there + } + // horizontal alignment + switch (halign) { + case "L": p.x -= w; break; + case "R": p.x += el.offsetWidth; break; + case "C": p.x += (el.offsetWidth - w) / 2; break; + case "l": p.x += el.offsetWidth - w; break; + case "r": break; // already there + } + p.width = w; + p.height = h + 40; + self.monthsCombo.style.display = "none"; + fixPosition(p); + self.showAt(p.x, p.y); + }; + if (Calendar.is_khtml) + setTimeout("Calendar.continuation_for_the_fucking_khtml_browser()", 10); + else + Calendar.continuation_for_the_fucking_khtml_browser(); +}; + +/** Customizes the date format. */ +Calendar.prototype.setDateFormat = function (str) { + this.dateFormat = str; +}; + +/** Customizes the tooltip date format. */ +Calendar.prototype.setTtDateFormat = function (str) { + this.ttDateFormat = str; +}; + +/** + * Tries to identify the date represented in a string. If successful it also + * calls this.setDate which moves the calendar to the given date. + */ +Calendar.prototype.parseDate = function(str, fmt) { + if (!fmt) + fmt = this.dateFormat; + this.setDate(Date.parseDate(str, fmt)); +}; + +Calendar.prototype.hideShowCovered = function () { + if (!Calendar.is_ie && !Calendar.is_opera) + return; + function getVisib(obj){ + var value = obj.style.visibility; + if (!value) { + if (document.defaultView && typeof (document.defaultView.getComputedStyle) == "function") { // Gecko, W3C + if (!Calendar.is_khtml) + value = document.defaultView. + getComputedStyle(obj, "").getPropertyValue("visibility"); + else + value = ''; + } else if (obj.currentStyle) { // IE + value = obj.currentStyle.visibility; + } else + value = ''; + } + return value; + }; + + var tags = new Array("applet", "iframe", "select"); + var el = this.element; + + var p = Calendar.getAbsolutePos(el); + var EX1 = p.x; + var EX2 = el.offsetWidth + EX1; + var EY1 = p.y; + var EY2 = el.offsetHeight + EY1; + + for (var k = tags.length; k > 0; ) { + var ar = document.getElementsByTagName(tags[--k]); + var cc = null; + + for (var i = ar.length; i > 0;) { + cc = ar[--i]; + + p = Calendar.getAbsolutePos(cc); + var CX1 = p.x; + var CX2 = cc.offsetWidth + CX1; + var CY1 = p.y; + var CY2 = cc.offsetHeight + CY1; + + if (this.hidden || (CX1 > EX2) || (CX2 < EX1) || (CY1 > EY2) || (CY2 < EY1)) { + if (!cc.__msh_save_visibility) { + cc.__msh_save_visibility = getVisib(cc); + } + cc.style.visibility = cc.__msh_save_visibility; + } else { + if (!cc.__msh_save_visibility) { + cc.__msh_save_visibility = getVisib(cc); + } + cc.style.visibility = "hidden"; + } + } + } +}; + +/** Internal function; it displays the bar with the names of the weekday. */ +Calendar.prototype._displayWeekdays = function () { + var fdow = this.firstDayOfWeek; + var cell = this.firstdayname; + var weekend = Calendar._TT["WEEKEND"]; + for (var i = 0; i < 7; ++i) { + cell.className = "day name"; + var realday = (i + fdow) % 7; + if (i) { + cell.ttip = Calendar._TT["DAY_FIRST"].replace("%s", Calendar._DN[realday]); + cell.navtype = 100; + cell.calendar = this; + cell.fdow = realday; + Calendar._add_evs(cell); + } + if (weekend.indexOf(realday.toString()) != -1) { + Calendar.addClass(cell, "weekend"); + } + cell.innerHTML = Calendar._SDN[(i + fdow) % 7]; + cell = cell.nextSibling; + } +}; + +/** Internal function. Hides all combo boxes that might be displayed. */ +Calendar.prototype._hideCombos = function () { + this.monthsCombo.style.display = "none"; + this.yearsCombo.style.display = "none"; +}; + +/** Internal function. Starts dragging the element. */ +Calendar.prototype._dragStart = function (ev) { + if (this.dragging) { + return; + } + this.dragging = true; + var posX; + var posY; + if (Calendar.is_ie) { + posY = window.event.clientY + document.body.scrollTop; + posX = window.event.clientX + document.body.scrollLeft; + } else { + posY = ev.clientY + window.scrollY; + posX = ev.clientX + window.scrollX; + } + var st = this.element.style; + this.xOffs = posX - parseInt(st.left); + this.yOffs = posY - parseInt(st.top); + with (Calendar) { + addEvent(document, "mousemove", calDragIt); + addEvent(document, "mouseup", calDragEnd); + } +}; + +// BEGIN: DATE OBJECT PATCHES + +/** Adds the number of days array to the Date object. */ +Date._MD = new Array(31,28,31,30,31,30,31,31,30,31,30,31); + +/** Constants used for time computations */ +Date.SECOND = 1000 /* milliseconds */; +Date.MINUTE = 60 * Date.SECOND; +Date.HOUR = 60 * Date.MINUTE; +Date.DAY = 24 * Date.HOUR; +Date.WEEK = 7 * Date.DAY; + +Date.parseDate = function(str, fmt) { + var today = new Date(); + var y = 0; + var m = -1; + var d = 0; + var a = str.split(/\W+/); + var b = fmt.match(/%./g); + var i = 0, j = 0; + var hr = 0; + var min = 0; + for (i = 0; i < a.length; ++i) { + if (!a[i]) + continue; + switch (b[i]) { + case "%d": + case "%e": + d = parseInt(a[i], 10); + break; + + case "%m": + m = parseInt(a[i], 10) - 1; + break; + + case "%Y": + case "%y": + y = parseInt(a[i], 10); + (y < 100) && (y += (y > 29) ? 1900 : 2000); + break; + + case "%b": + case "%B": + for (j = 0; j < 12; ++j) { + if (Calendar._MN[j].substr(0, a[i].length).toLowerCase() == a[i].toLowerCase()) { m = j; break; } + } + break; + + case "%H": + case "%I": + case "%k": + case "%l": + hr = parseInt(a[i], 10); + break; + + case "%P": + case "%p": + if (/pm/i.test(a[i]) && hr < 12) + hr += 12; + else if (/am/i.test(a[i]) && hr >= 12) + hr -= 12; + break; + + case "%M": + min = parseInt(a[i], 10); + break; + } + } + if (isNaN(y)) y = today.getFullYear(); + if (isNaN(m)) m = today.getMonth(); + if (isNaN(d)) d = today.getDate(); + if (isNaN(hr)) hr = today.getHours(); + if (isNaN(min)) min = today.getMinutes(); + if (y != 0 && m != -1 && d != 0) + return new Date(y, m, d, hr, min, 0); + y = 0; m = -1; d = 0; + for (i = 0; i < a.length; ++i) { + if (a[i].search(/[a-zA-Z]+/) != -1) { + var t = -1; + for (j = 0; j < 12; ++j) { + if (Calendar._MN[j].substr(0, a[i].length).toLowerCase() == a[i].toLowerCase()) { t = j; break; } + } + if (t != -1) { + if (m != -1) { + d = m+1; + } + m = t; + } + } else if (parseInt(a[i], 10) <= 12 && m == -1) { + m = a[i]-1; + } else if (parseInt(a[i], 10) > 31 && y == 0) { + y = parseInt(a[i], 10); + (y < 100) && (y += (y > 29) ? 1900 : 2000); + } else if (d == 0) { + d = a[i]; + } + } + if (y == 0) + y = today.getFullYear(); + if (m != -1 && d != 0) + return new Date(y, m, d, hr, min, 0); + return today; +}; + +/** Returns the number of days in the current month */ +Date.prototype.getMonthDays = function(month) { + var year = this.getFullYear(); + if (typeof month == "undefined") { + month = this.getMonth(); + } + if (((0 == (year%4)) && ( (0 != (year%100)) || (0 == (year%400)))) && month == 1) { + return 29; + } else { + return Date._MD[month]; + } +}; + +/** Returns the number of day in the year. */ +Date.prototype.getDayOfYear = function() { + var now = new Date(this.getFullYear(), this.getMonth(), this.getDate(), 0, 0, 0); + var then = new Date(this.getFullYear(), 0, 0, 0, 0, 0); + var time = now - then; + return Math.floor(time / Date.DAY); +}; + +/** Returns the number of the week in year, as defined in ISO 8601. */ +Date.prototype.getWeekNumber = function() { + var d = new Date(this.getFullYear(), this.getMonth(), this.getDate(), 0, 0, 0); + var DoW = d.getDay(); + d.setDate(d.getDate() - (DoW + 6) % 7 + 3); // Nearest Thu + var ms = d.valueOf(); // GMT + d.setMonth(0); + d.setDate(4); // Thu in Week 1 + return Math.round((ms - d.valueOf()) / (7 * 864e5)) + 1; +}; + +/** Checks date and time equality */ +Date.prototype.equalsTo = function(date) { + return ((this.getFullYear() == date.getFullYear()) && + (this.getMonth() == date.getMonth()) && + (this.getDate() == date.getDate()) && + (this.getHours() == date.getHours()) && + (this.getMinutes() == date.getMinutes())); +}; + +/** Set only the year, month, date parts (keep existing time) */ +Date.prototype.setDateOnly = function(date) { + var tmp = new Date(date); + this.setDate(1); + this.setFullYear(tmp.getFullYear()); + this.setMonth(tmp.getMonth()); + this.setDate(tmp.getDate()); +}; + +/** Prints the date in a string according to the given format. */ +Date.prototype.print = function (str) { + var m = this.getMonth(); + var d = this.getDate(); + var y = this.getFullYear(); + var wn = this.getWeekNumber(); + var w = this.getDay(); + var s = {}; + var hr = this.getHours(); + var pm = (hr >= 12); + var ir = (pm) ? (hr - 12) : hr; + var dy = this.getDayOfYear(); + if (ir == 0) + ir = 12; + var min = this.getMinutes(); + var sec = this.getSeconds(); + s["%a"] = Calendar._SDN[w]; // abbreviated weekday name [FIXME: I18N] + s["%A"] = Calendar._DN[w]; // full weekday name + s["%b"] = Calendar._SMN[m]; // abbreviated month name [FIXME: I18N] + s["%B"] = Calendar._MN[m]; // full month name + // FIXME: %c : preferred date and time representation for the current locale + s["%C"] = 1 + Math.floor(y / 100); // the century number + s["%d"] = (d < 10) ? ("0" + d) : d; // the day of the month (range 01 to 31) + s["%e"] = d; // the day of the month (range 1 to 31) + // FIXME: %D : american date style: %m/%d/%y + // FIXME: %E, %F, %G, %g, %h (man strftime) + s["%H"] = (hr < 10) ? ("0" + hr) : hr; // hour, range 00 to 23 (24h format) + s["%I"] = (ir < 10) ? ("0" + ir) : ir; // hour, range 01 to 12 (12h format) + s["%j"] = (dy < 100) ? ((dy < 10) ? ("00" + dy) : ("0" + dy)) : dy; // day of the year (range 001 to 366) + s["%k"] = hr; // hour, range 0 to 23 (24h format) + s["%l"] = ir; // hour, range 1 to 12 (12h format) + s["%m"] = (m < 9) ? ("0" + (1+m)) : (1+m); // month, range 01 to 12 + s["%M"] = (min < 10) ? ("0" + min) : min; // minute, range 00 to 59 + s["%n"] = "\n"; // a newline character + s["%p"] = pm ? "PM" : "AM"; + s["%P"] = pm ? "pm" : "am"; + // FIXME: %r : the time in am/pm notation %I:%M:%S %p + // FIXME: %R : the time in 24-hour notation %H:%M + s["%s"] = Math.floor(this.getTime() / 1000); + s["%S"] = (sec < 10) ? ("0" + sec) : sec; // seconds, range 00 to 59 + s["%t"] = "\t"; // a tab character + // FIXME: %T : the time in 24-hour notation (%H:%M:%S) + s["%U"] = s["%W"] = s["%V"] = (wn < 10) ? ("0" + wn) : wn; + s["%u"] = w + 1; // the day of the week (range 1 to 7, 1 = MON) + s["%w"] = w; // the day of the week (range 0 to 6, 0 = SUN) + // FIXME: %x : preferred date representation for the current locale without the time + // FIXME: %X : preferred time representation for the current locale without the date + s["%y"] = ('' + y).substr(2, 2); // year without the century (range 00 to 99) + s["%Y"] = y; // year with the century + s["%%"] = "%"; // a literal '%' character + + var re = /%./g; + if (!Calendar.is_ie5 && !Calendar.is_khtml) + return str.replace(re, function (par) { return s[par] || par; }); + + var a = str.match(re); + for (var i = 0; i < a.length; i++) { + var tmp = s[a[i]]; + if (tmp) { + re = new RegExp(a[i], 'g'); + str = str.replace(re, tmp); + } + } + + return str; +}; + +Date.prototype.__msh_oldSetFullYear = Date.prototype.setFullYear; +Date.prototype.setFullYear = function(y) { + var d = new Date(this); + d.__msh_oldSetFullYear(y); + if (d.getMonth() != this.getMonth()) + this.setDate(28); + this.__msh_oldSetFullYear(y); +}; + +// END: DATE OBJECT PATCHES + + +// global object that remembers the calendar +window._dynarch_popupCalendar = null; diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/js/jquery-1.3.2.min.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/event-calendar/js/jquery-1.3.2.min.js Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/js/jquery-ui-1.7.2.custom.min.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/event-calendar/js/jquery-ui-1.7.2.custom.min.js Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,298 @@ +/* + * jQuery UI 1.7.2 + * + * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI + */ +jQuery.ui||(function(c){var i=c.fn.remove,d=c.browser.mozilla&&(parseFloat(c.browser.version)<1.9);c.ui={version:"1.7.2",plugin:{add:function(k,l,n){var m=c.ui[k].prototype;for(var j in n){m.plugins[j]=m.plugins[j]||[];m.plugins[j].push([l,n[j]])}},call:function(j,l,k){var n=j.plugins[l];if(!n||!j.element[0].parentNode){return}for(var m=0;m0){return true}m[j]=1;l=(m[j]>0);m[j]=0;return l},isOverAxis:function(k,j,l){return(k>j)&&(k<(j+l))},isOver:function(o,k,n,m,j,l){return c.ui.isOverAxis(o,n,j)&&c.ui.isOverAxis(k,m,l)},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};if(d){var f=c.attr,e=c.fn.removeAttr,h="http://www.w3.org/2005/07/aaa",a=/^aria-/,b=/^wairole:/;c.attr=function(k,j,l){var m=l!==undefined;return(j=="role"?(m?f.call(this,k,j,"wairole:"+l):(f.apply(this,arguments)||"").replace(b,"")):(a.test(j)?(m?k.setAttributeNS(h,j.replace(a,"aaa:"),l):f.call(this,k,j.replace(a,"aaa:"))):f.apply(this,arguments)))};c.fn.removeAttr=function(j){return(a.test(j)?this.each(function(){this.removeAttributeNS(h,j.replace(a,""))}):e.call(this,j))}}c.fn.extend({remove:function(){c("*",this).add(this).each(function(){c(this).triggerHandler("remove")});return i.apply(this,arguments)},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","").unbind("selectstart.ui")},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return false})},scrollParent:function(){var j;if((c.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){j=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(c.curCSS(this,"position",1))&&(/(auto|scroll)/).test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0)}else{j=this.parents().filter(function(){return(/(auto|scroll)/).test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!j.length?c(document):j}});c.extend(c.expr[":"],{data:function(l,k,j){return !!c.data(l,j[3])},focusable:function(k){var l=k.nodeName.toLowerCase(),j=c.attr(k,"tabindex");return(/input|select|textarea|button|object/.test(l)?!k.disabled:"a"==l||"area"==l?k.href||!isNaN(j):!isNaN(j))&&!c(k)["area"==l?"parents":"closest"](":hidden").length},tabbable:function(k){var j=c.attr(k,"tabindex");return(isNaN(j)||j>=0)&&c(k).is(":focusable")}});function g(m,n,o,l){function k(q){var p=c[m][n][q]||[];return(typeof p=="string"?p.split(/,?\s+/):p)}var j=k("getter");if(l.length==1&&typeof l[0]=="string"){j=j.concat(k("getterSetter"))}return(c.inArray(o,j)!=-1)}c.widget=function(k,j){var l=k.split(".")[0];k=k.split(".")[1];c.fn[k]=function(p){var n=(typeof p=="string"),o=Array.prototype.slice.call(arguments,1);if(n&&p.substring(0,1)=="_"){return this}if(n&&g(l,k,p,o)){var m=c.data(this[0],k);return(m?m[p].apply(m,o):undefined)}return this.each(function(){var q=c.data(this,k);(!q&&!n&&c.data(this,k,new c[l][k](this,p))._init());(q&&n&&c.isFunction(q[p])&&q[p].apply(q,o))})};c[l]=c[l]||{};c[l][k]=function(o,n){var m=this;this.namespace=l;this.widgetName=k;this.widgetEventPrefix=c[l][k].eventPrefix||k;this.widgetBaseClass=l+"-"+k;this.options=c.extend({},c.widget.defaults,c[l][k].defaults,c.metadata&&c.metadata.get(o)[k],n);this.element=c(o).bind("setData."+k,function(q,p,r){if(q.target==o){return m._setData(p,r)}}).bind("getData."+k,function(q,p){if(q.target==o){return m._getData(p)}}).bind("remove",function(){return m.destroy()})};c[l][k].prototype=c.extend({},c.widget.prototype,j);c[l][k].getterSetter="option"};c.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").removeAttr("aria-disabled")},option:function(l,m){var k=l,j=this;if(typeof l=="string"){if(m===undefined){return this._getData(l)}k={};k[l]=m}c.each(k,function(n,o){j._setData(n,o)})},_getData:function(j){return this.options[j]},_setData:function(j,k){this.options[j]=k;if(j=="disabled"){this.element[k?"addClass":"removeClass"](this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").attr("aria-disabled",k)}},enable:function(){this._setData("disabled",false)},disable:function(){this._setData("disabled",true)},_trigger:function(l,m,n){var p=this.options[l],j=(l==this.widgetEventPrefix?l:this.widgetEventPrefix+l);m=c.Event(m);m.type=j;if(m.originalEvent){for(var k=c.event.props.length,o;k;){o=c.event.props[--k];m[o]=m.originalEvent[o]}}this.element.trigger(m,n);return !(c.isFunction(p)&&p.call(this.element[0],m,n)===false||m.isDefaultPrevented())}};c.widget.defaults={disabled:false};c.ui.mouse={_mouseInit:function(){var j=this;this.element.bind("mousedown."+this.widgetName,function(k){return j._mouseDown(k)}).bind("click."+this.widgetName,function(k){if(j._preventClickEvent){j._preventClickEvent=false;k.stopImmediatePropagation();return false}});if(c.browser.msie){this._mouseUnselectable=this.element.attr("unselectable");this.element.attr("unselectable","on")}this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);(c.browser.msie&&this.element.attr("unselectable",this._mouseUnselectable))},_mouseDown:function(l){l.originalEvent=l.originalEvent||{};if(l.originalEvent.mouseHandled){return}(this._mouseStarted&&this._mouseUp(l));this._mouseDownEvent=l;var k=this,m=(l.which==1),j=(typeof this.options.cancel=="string"?c(l.target).parents().add(l.target).filter(this.options.cancel).length:false);if(!m||j||!this._mouseCapture(l)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){k.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(l)&&this._mouseDelayMet(l)){this._mouseStarted=(this._mouseStart(l)!==false);if(!this._mouseStarted){l.preventDefault();return true}}this._mouseMoveDelegate=function(n){return k._mouseMove(n)};this._mouseUpDelegate=function(n){return k._mouseUp(n)};c(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);(c.browser.safari||l.preventDefault());l.originalEvent.mouseHandled=true;return true},_mouseMove:function(j){if(c.browser.msie&&!j.button){return this._mouseUp(j)}if(this._mouseStarted){this._mouseDrag(j);return j.preventDefault()}if(this._mouseDistanceMet(j)&&this._mouseDelayMet(j)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,j)!==false);(this._mouseStarted?this._mouseDrag(j):this._mouseUp(j))}return !this._mouseStarted},_mouseUp:function(j){c(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=(j.target==this._mouseDownEvent.target);this._mouseStop(j)}return false},_mouseDistanceMet:function(j){return(Math.max(Math.abs(this._mouseDownEvent.pageX-j.pageX),Math.abs(this._mouseDownEvent.pageY-j.pageY))>=this.options.distance)},_mouseDelayMet:function(j){return this.mouseDelayMet},_mouseStart:function(j){},_mouseDrag:function(j){},_mouseStop:function(j){},_mouseCapture:function(j){return true}};c.ui.mouse.defaults={cancel:null,distance:1,delay:0}})(jQuery);;/* + * jQuery UI Draggable 1.7.2 + * + * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Draggables + * + * Depends: + * ui.core.js + */ +(function(a){a.widget("ui.draggable",a.extend({},a.ui.mouse,{_init:function(){if(this.options.helper=="original"&&!(/^(?:r|a|f)/).test(this.element.css("position"))){this.element[0].style.position="relative"}(this.options.addClasses&&this.element.addClass("ui-draggable"));(this.options.disabled&&this.element.addClass("ui-draggable-disabled"));this._mouseInit()},destroy:function(){if(!this.element.data("draggable")){return}this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy()},_mouseCapture:function(b){var c=this.options;if(this.helper||c.disabled||a(b.target).is(".ui-resizable-handle")){return false}this.handle=this._getHandle(b);if(!this.handle){return false}return true},_mouseStart:function(b){var c=this.options;this.helper=this._createHelper(b);this._cacheHelperProportions();if(a.ui.ddmanager){a.ui.ddmanager.current=this}this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};a.extend(this.offset,{click:{left:b.pageX-this.offset.left,top:b.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(b);this.originalPageX=b.pageX;this.originalPageY=b.pageY;if(c.cursorAt){this._adjustOffsetFromHelper(c.cursorAt)}if(c.containment){this._setContainment()}this._trigger("start",b);this._cacheHelperProportions();if(a.ui.ddmanager&&!c.dropBehaviour){a.ui.ddmanager.prepareOffsets(this,b)}this.helper.addClass("ui-draggable-dragging");this._mouseDrag(b,true);return true},_mouseDrag:function(b,d){this.position=this._generatePosition(b);this.positionAbs=this._convertPositionTo("absolute");if(!d){var c=this._uiHash();this._trigger("drag",b,c);this.position=c.position}if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"}if(a.ui.ddmanager){a.ui.ddmanager.drag(this,b)}return false},_mouseStop:function(c){var d=false;if(a.ui.ddmanager&&!this.options.dropBehaviour){d=a.ui.ddmanager.drop(this,c)}if(this.dropped){d=this.dropped;this.dropped=false}if((this.options.revert=="invalid"&&!d)||(this.options.revert=="valid"&&d)||this.options.revert===true||(a.isFunction(this.options.revert)&&this.options.revert.call(this.element,d))){var b=this;a(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){b._trigger("stop",c);b._clear()})}else{this._trigger("stop",c);this._clear()}return false},_getHandle:function(b){var c=!this.options.handle||!a(this.options.handle,this.element).length?true:false;a(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==b.target){c=true}});return c},_createHelper:function(c){var d=this.options;var b=a.isFunction(d.helper)?a(d.helper.apply(this.element[0],[c])):(d.helper=="clone"?this.element.clone():this.element);if(!b.parents("body").length){b.appendTo((d.appendTo=="parent"?this.element[0].parentNode:d.appendTo))}if(b[0]!=this.element[0]&&!(/(fixed|absolute)/).test(b.css("position"))){b.css("position","absolute")}return b},_adjustOffsetFromHelper:function(b){if(b.left!=undefined){this.offset.click.left=b.left+this.margins.left}if(b.right!=undefined){this.offset.click.left=this.helperProportions.width-b.right+this.margins.left}if(b.top!=undefined){this.offset.click.top=b.top+this.margins.top}if(b.bottom!=undefined){this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])){b.left+=this.scrollParent.scrollLeft();b.top+=this.scrollParent.scrollTop()}if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie)){b={top:0,left:0}}return{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var b=this.element.position();return{top:b.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:b.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:(parseInt(this.element.css("marginLeft"),10)||0),top:(parseInt(this.element.css("marginTop"),10)||0)}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e=this.options;if(e.containment=="parent"){e.containment=this.helper[0].parentNode}if(e.containment=="document"||e.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(e.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a(e.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!(/^(document|window|parent)$/).test(e.containment)&&e.containment.constructor!=Array){var c=a(e.containment)[0];if(!c){return}var d=a(e.containment).offset();var b=(a(c).css("overflow")!="hidden");this.containment=[d.left+(parseInt(a(c).css("borderLeftWidth"),10)||0)+(parseInt(a(c).css("paddingLeft"),10)||0)-this.margins.left,d.top+(parseInt(a(c).css("borderTopWidth"),10)||0)+(parseInt(a(c).css("paddingTop"),10)||0)-this.margins.top,d.left+(b?Math.max(c.scrollWidth,c.offsetWidth):c.offsetWidth)-(parseInt(a(c).css("borderLeftWidth"),10)||0)-(parseInt(a(c).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,d.top+(b?Math.max(c.scrollHeight,c.offsetHeight):c.offsetHeight)-(parseInt(a(c).css("borderTopWidth"),10)||0)-(parseInt(a(c).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}else{if(e.containment.constructor==Array){this.containment=e.containment}}},_convertPositionTo:function(f,h){if(!h){h=this.position}var c=f=="absolute"?1:-1;var e=this.options,b=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,g=(/(html|body)/i).test(b[0].tagName);return{top:(h.top+this.offset.relative.top*c+this.offset.parent.top*c-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(g?0:b.scrollTop()))*c)),left:(h.left+this.offset.relative.left*c+this.offset.parent.left*c-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():g?0:b.scrollLeft())*c))}},_generatePosition:function(e){var h=this.options,b=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,i=(/(html|body)/i).test(b[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()}var d=e.pageX;var c=e.pageY;if(this.originalPosition){if(this.containment){if(e.pageX-this.offset.click.leftthis.containment[2]){d=this.containment[2]+this.offset.click.left}if(e.pageY-this.offset.click.top>this.containment[3]){c=this.containment[3]+this.offset.click.top}}if(h.grid){var g=this.originalPageY+Math.round((c-this.originalPageY)/h.grid[1])*h.grid[1];c=this.containment?(!(g-this.offset.click.topthis.containment[3])?g:(!(g-this.offset.click.topthis.containment[2])?f:(!(f-this.offset.click.left
    ').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1000}).css(a(this).offset()).appendTo("body")})},stop:function(b,c){a("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}});a.ui.plugin.add("draggable","opacity",{start:function(c,d){var b=a(d.helper),e=a(this).data("draggable").options;if(b.css("opacity")){e._opacity=b.css("opacity")}b.css("opacity",e.opacity)},stop:function(b,c){var d=a(this).data("draggable").options;if(d._opacity){a(c.helper).css("opacity",d._opacity)}}});a.ui.plugin.add("draggable","scroll",{start:function(c,d){var b=a(this).data("draggable");if(b.scrollParent[0]!=document&&b.scrollParent[0].tagName!="HTML"){b.overflowOffset=b.scrollParent.offset()}},drag:function(d,e){var c=a(this).data("draggable"),f=c.options,b=false;if(c.scrollParent[0]!=document&&c.scrollParent[0].tagName!="HTML"){if(!f.axis||f.axis!="x"){if((c.overflowOffset.top+c.scrollParent[0].offsetHeight)-d.pageY=0;v--){var s=g.snapElements[v].left,n=s+g.snapElements[v].width,m=g.snapElements[v].top,A=m+g.snapElements[v].height;if(!((s-y=p&&n<=k)||(m>=p&&m<=k)||(nk))&&((e>=g&&e<=c)||(d>=g&&d<=c)||(ec));break;default:return false;break}};a.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(e,g){var b=a.ui.ddmanager.droppables[e.options.scope];var f=g?g.type:null;var h=(e.currentItem||e.element).find(":data(droppable)").andSelf();droppablesLoop:for(var d=0;d
    ').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=j.handles||(!c(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all"){this.handles="n,e,s,w,se,sw,ne,nw"}var k=this.handles.split(",");this.handles={};for(var f=0;f
    ');if(/sw|se|ne|nw/.test(h)){g.css({zIndex:++j.zIndex})}if("se"==h){g.addClass("ui-icon ui-icon-gripsmall-diagonal-se")}this.handles[h]=".ui-resizable-"+h;this.element.append(g)}}this._renderAxis=function(p){p=p||this.element;for(var m in this.handles){if(this.handles[m].constructor==String){this.handles[m]=c(this.handles[m],this.element).show()}if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var n=c(this.handles[m],this.element),o=0;o=/sw|ne|nw|se|n|s/.test(m)?n.outerHeight():n.outerWidth();var l=["padding",/ne|nw|n/.test(m)?"Top":/se|sw|s/.test(m)?"Bottom":/^e$/.test(m)?"Right":"Left"].join("");p.css(l,o);this._proportionallyResize()}if(!c(this.handles[m]).length){continue}}};this._renderAxis(this.element);this._handles=c(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!e.resizing){if(this.className){var i=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}e.axis=i&&i[1]?i[1]:"se"}});if(j.autoHide){this._handles.hide();c(this.element).addClass("ui-resizable-autohide").hover(function(){c(this).removeClass("ui-resizable-autohide");e._handles.show()},function(){if(!e.resizing){c(this).addClass("ui-resizable-autohide");e._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var d=function(f){c(f).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){d(this.element);var e=this.element;e.parent().append(this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")})).end().remove()}this.originalElement.css("resize",this.originalResizeStyle);d(this.originalElement)},_mouseCapture:function(e){var f=false;for(var d in this.handles){if(c(this.handles[d])[0]==e.target){f=true}}return this.options.disabled||!!f},_mouseStart:function(f){var i=this.options,e=this.element.position(),d=this.element;this.resizing=true;this.documentScroll={top:c(document).scrollTop(),left:c(document).scrollLeft()};if(d.is(".ui-draggable")||(/absolute/).test(d.css("position"))){d.css({position:"absolute",top:e.top,left:e.left})}if(c.browser.opera&&(/relative/).test(d.css("position"))){d.css({position:"relative",top:"auto",left:"auto"})}this._renderProxy();var j=b(this.helper.css("left")),g=b(this.helper.css("top"));if(i.containment){j+=c(i.containment).scrollLeft()||0;g+=c(i.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:j,top:g};this.size=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalSize=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalPosition={left:j,top:g};this.sizeDiff={width:d.outerWidth()-d.width(),height:d.outerHeight()-d.height()};this.originalMousePosition={left:f.pageX,top:f.pageY};this.aspectRatio=(typeof i.aspectRatio=="number")?i.aspectRatio:((this.originalSize.width/this.originalSize.height)||1);var h=c(".ui-resizable-"+this.axis).css("cursor");c("body").css("cursor",h=="auto"?this.axis+"-resize":h);d.addClass("ui-resizable-resizing");this._propagate("start",f);return true},_mouseDrag:function(d){var g=this.helper,f=this.options,l={},p=this,i=this.originalMousePosition,m=this.axis;var q=(d.pageX-i.left)||0,n=(d.pageY-i.top)||0;var h=this._change[m];if(!h){return false}var k=h.apply(this,[d,q,n]),j=c.browser.msie&&c.browser.version<7,e=this.sizeDiff;if(this._aspectRatio||d.shiftKey){k=this._updateRatio(k,d)}k=this._respectSize(k,d);this._propagate("resize",d);g.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});if(!this._helper&&this._proportionallyResizeElements.length){this._proportionallyResize()}this._updateCache(k);this._trigger("resize",d,this.ui());return false},_mouseStop:function(g){this.resizing=false;var h=this.options,l=this;if(this._helper){var f=this._proportionallyResizeElements,d=f.length&&(/textarea/i).test(f[0].nodeName),e=d&&c.ui.hasScroll(f[0],"left")?0:l.sizeDiff.height,j=d?0:l.sizeDiff.width;var m={width:(l.size.width-j),height:(l.size.height-e)},i=(parseInt(l.element.css("left"),10)+(l.position.left-l.originalPosition.left))||null,k=(parseInt(l.element.css("top"),10)+(l.position.top-l.originalPosition.top))||null;if(!h.animate){this.element.css(c.extend(m,{top:k,left:i}))}l.helper.height(l.size.height);l.helper.width(l.size.width);if(this._helper&&!h.animate){this._proportionallyResize()}}c("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",g);if(this._helper){this.helper.remove()}return false},_updateCache:function(d){var e=this.options;this.offset=this.helper.offset();if(a(d.left)){this.position.left=d.left}if(a(d.top)){this.position.top=d.top}if(a(d.height)){this.size.height=d.height}if(a(d.width)){this.size.width=d.width}},_updateRatio:function(g,f){var h=this.options,i=this.position,e=this.size,d=this.axis;if(g.height){g.width=(e.height*this.aspectRatio)}else{if(g.width){g.height=(e.width/this.aspectRatio)}}if(d=="sw"){g.left=i.left+(e.width-g.width);g.top=null}if(d=="nw"){g.top=i.top+(e.height-g.height);g.left=i.left+(e.width-g.width)}return g},_respectSize:function(k,f){var i=this.helper,h=this.options,q=this._aspectRatio||f.shiftKey,p=this.axis,s=a(k.width)&&h.maxWidth&&(h.maxWidthk.width),r=a(k.height)&&h.minHeight&&(h.minHeight>k.height);if(g){k.width=h.minWidth}if(r){k.height=h.minHeight}if(s){k.width=h.maxWidth}if(l){k.height=h.maxHeight}var e=this.originalPosition.left+this.originalSize.width,n=this.position.top+this.size.height;var j=/sw|nw|w/.test(p),d=/nw|ne|n/.test(p);if(g&&j){k.left=e-h.minWidth}if(s&&j){k.left=e-h.maxWidth}if(r&&d){k.top=n-h.minHeight}if(l&&d){k.top=n-h.maxHeight}var m=!k.width&&!k.height;if(m&&!k.left&&k.top){k.top=null}else{if(m&&!k.top&&k.left){k.left=null}}return k},_proportionallyResize:function(){var j=this.options;if(!this._proportionallyResizeElements.length){return}var f=this.helper||this.element;for(var e=0;e');var d=c.browser.msie&&c.browser.version<7,f=(d?1:0),g=(d?2:-1);this.helper.addClass(this._helper).css({width:this.element.outerWidth()+g,height:this.element.outerHeight()+g,position:"absolute",left:this.elementOffset.left-f+"px",top:this.elementOffset.top-f+"px",zIndex:++h.zIndex});this.helper.appendTo("body").disableSelection()}else{this.helper=this.element}},_change:{e:function(f,e,d){return{width:this.originalSize.width+e}},w:function(g,e,d){var i=this.options,f=this.originalSize,h=this.originalPosition;return{left:h.left+e,width:f.width-e}},n:function(g,e,d){var i=this.options,f=this.originalSize,h=this.originalPosition;return{top:h.top+d,height:f.height-d}},s:function(f,e,d){return{height:this.originalSize.height+d}},se:function(f,e,d){return c.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[f,e,d]))},sw:function(f,e,d){return c.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[f,e,d]))},ne:function(f,e,d){return c.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[f,e,d]))},nw:function(f,e,d){return c.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[f,e,d]))}},_propagate:function(e,d){c.ui.plugin.call(this,e,[d,this.ui()]);(e!="resize"&&this._trigger(e,d,this.ui()))},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}));c.extend(c.ui.resizable,{version:"1.7.2",eventPrefix:"resize",defaults:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,cancel:":input,option",containment:false,delay:0,distance:1,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1000}});c.ui.plugin.add("resizable","alsoResize",{start:function(e,f){var d=c(this).data("resizable"),g=d.options;_store=function(h){c(h).each(function(){c(this).data("resizable-alsoresize",{width:parseInt(c(this).width(),10),height:parseInt(c(this).height(),10),left:parseInt(c(this).css("left"),10),top:parseInt(c(this).css("top"),10)})})};if(typeof(g.alsoResize)=="object"&&!g.alsoResize.parentNode){if(g.alsoResize.length){g.alsoResize=g.alsoResize[0];_store(g.alsoResize)}else{c.each(g.alsoResize,function(h,i){_store(h)})}}else{_store(g.alsoResize)}},resize:function(f,h){var e=c(this).data("resizable"),i=e.options,g=e.originalSize,k=e.originalPosition;var j={height:(e.size.height-g.height)||0,width:(e.size.width-g.width)||0,top:(e.position.top-k.top)||0,left:(e.position.left-k.left)||0},d=function(l,m){c(l).each(function(){var p=c(this),q=c(this).data("resizable-alsoresize"),o={},n=m&&m.length?m:["width","height","top","left"];c.each(n||["width","height","top","left"],function(r,t){var s=(q[t]||0)+(j[t]||0);if(s&&s>=0){o[t]=s||null}});if(/relative/.test(p.css("position"))&&c.browser.opera){e._revertToRelativePosition=true;p.css({position:"absolute",top:"auto",left:"auto"})}p.css(o)})};if(typeof(i.alsoResize)=="object"&&!i.alsoResize.nodeType){c.each(i.alsoResize,function(l,m){d(l,m)})}else{d(i.alsoResize)}},stop:function(e,f){var d=c(this).data("resizable");if(d._revertToRelativePosition&&c.browser.opera){d._revertToRelativePosition=false;el.css({position:"relative"})}c(this).removeData("resizable-alsoresize-start")}});c.ui.plugin.add("resizable","animate",{stop:function(h,m){var n=c(this).data("resizable"),i=n.options;var g=n._proportionallyResizeElements,d=g.length&&(/textarea/i).test(g[0].nodeName),e=d&&c.ui.hasScroll(g[0],"left")?0:n.sizeDiff.height,k=d?0:n.sizeDiff.width;var f={width:(n.size.width-k),height:(n.size.height-e)},j=(parseInt(n.element.css("left"),10)+(n.position.left-n.originalPosition.left))||null,l=(parseInt(n.element.css("top"),10)+(n.position.top-n.originalPosition.top))||null;n.element.animate(c.extend(f,l&&j?{top:l,left:j}:{}),{duration:i.animateDuration,easing:i.animateEasing,step:function(){var o={width:parseInt(n.element.css("width"),10),height:parseInt(n.element.css("height"),10),top:parseInt(n.element.css("top"),10),left:parseInt(n.element.css("left"),10)};if(g&&g.length){c(g[0]).css({width:o.width,height:o.height})}n._updateCache(o);n._propagate("resize",h)}})}});c.ui.plugin.add("resizable","containment",{start:function(e,q){var s=c(this).data("resizable"),i=s.options,k=s.element;var f=i.containment,j=(f instanceof c)?f.get(0):(/parent/.test(f))?k.parent().get(0):f;if(!j){return}s.containerElement=c(j);if(/document/.test(f)||f==document){s.containerOffset={left:0,top:0};s.containerPosition={left:0,top:0};s.parentData={element:c(document),left:0,top:0,width:c(document).width(),height:c(document).height()||document.body.parentNode.scrollHeight}}else{var m=c(j),h=[];c(["Top","Right","Left","Bottom"]).each(function(p,o){h[p]=b(m.css("padding"+o))});s.containerOffset=m.offset();s.containerPosition=m.position();s.containerSize={height:(m.innerHeight()-h[3]),width:(m.innerWidth()-h[1])};var n=s.containerOffset,d=s.containerSize.height,l=s.containerSize.width,g=(c.ui.hasScroll(j,"left")?j.scrollWidth:l),r=(c.ui.hasScroll(j)?j.scrollHeight:d);s.parentData={element:j,left:n.left,top:n.top,width:g,height:r}}},resize:function(f,p){var s=c(this).data("resizable"),h=s.options,e=s.containerSize,n=s.containerOffset,l=s.size,m=s.position,q=s._aspectRatio||f.shiftKey,d={top:0,left:0},g=s.containerElement;if(g[0]!=document&&(/static/).test(g.css("position"))){d=n}if(m.left<(s._helper?n.left:0)){s.size.width=s.size.width+(s._helper?(s.position.left-n.left):(s.position.left-d.left));if(q){s.size.height=s.size.width/h.aspectRatio}s.position.left=h.helper?n.left:0}if(m.top<(s._helper?n.top:0)){s.size.height=s.size.height+(s._helper?(s.position.top-n.top):s.position.top);if(q){s.size.width=s.size.height*h.aspectRatio}s.position.top=s._helper?n.top:0}s.offset.left=s.parentData.left+s.position.left;s.offset.top=s.parentData.top+s.position.top;var k=Math.abs((s._helper?s.offset.left-d.left:(s.offset.left-d.left))+s.sizeDiff.width),r=Math.abs((s._helper?s.offset.top-d.top:(s.offset.top-n.top))+s.sizeDiff.height);var j=s.containerElement.get(0)==s.element.parent().get(0),i=/relative|absolute/.test(s.containerElement.css("position"));if(j&&i){k-=s.parentData.left}if(k+s.size.width>=s.parentData.width){s.size.width=s.parentData.width-k;if(q){s.size.height=s.size.width/s.aspectRatio}}if(r+s.size.height>=s.parentData.height){s.size.height=s.parentData.height-r;if(q){s.size.width=s.size.height*s.aspectRatio}}},stop:function(e,m){var p=c(this).data("resizable"),f=p.options,k=p.position,l=p.containerOffset,d=p.containerPosition,g=p.containerElement;var i=c(p.helper),q=i.offset(),n=i.outerWidth()-p.sizeDiff.width,j=i.outerHeight()-p.sizeDiff.height;if(p._helper&&!f.animate&&(/relative/).test(g.css("position"))){c(this).css({left:q.left-d.left-l.left,width:n,height:j})}if(p._helper&&!f.animate&&(/static/).test(g.css("position"))){c(this).css({left:q.left-d.left-l.left,width:n,height:j})}}});c.ui.plugin.add("resizable","ghost",{start:function(f,g){var d=c(this).data("resizable"),h=d.options,e=d.size;d.ghost=d.originalElement.clone();d.ghost.css({opacity:0.25,display:"block",position:"relative",height:e.height,width:e.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof h.ghost=="string"?h.ghost:"");d.ghost.appendTo(d.helper)},resize:function(e,f){var d=c(this).data("resizable"),g=d.options;if(d.ghost){d.ghost.css({position:"relative",height:d.size.height,width:d.size.width})}},stop:function(e,f){var d=c(this).data("resizable"),g=d.options;if(d.ghost&&d.helper){d.helper.get(0).removeChild(d.ghost.get(0))}}});c.ui.plugin.add("resizable","grid",{resize:function(d,l){var n=c(this).data("resizable"),g=n.options,j=n.size,h=n.originalSize,i=n.originalPosition,m=n.axis,k=g._aspectRatio||d.shiftKey;g.grid=typeof g.grid=="number"?[g.grid,g.grid]:g.grid;var f=Math.round((j.width-h.width)/(g.grid[0]||1))*(g.grid[0]||1),e=Math.round((j.height-h.height)/(g.grid[1]||1))*(g.grid[1]||1);if(/^(se|s|e)$/.test(m)){n.size.width=h.width+f;n.size.height=h.height+e}else{if(/^(ne)$/.test(m)){n.size.width=h.width+f;n.size.height=h.height+e;n.position.top=i.top-e}else{if(/^(sw)$/.test(m)){n.size.width=h.width+f;n.size.height=h.height+e;n.position.left=i.left-f}else{n.size.width=h.width+f;n.size.height=h.height+e;n.position.top=i.top-e;n.position.left=i.left-f}}}}});var b=function(d){return parseInt(d,10)||0};var a=function(d){return !isNaN(parseInt(d,10))}})(jQuery);;/* + * jQuery UI Selectable 1.7.2 + * + * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Selectables + * + * Depends: + * ui.core.js + */ +(function(a){a.widget("ui.selectable",a.extend({},a.ui.mouse,{_init:function(){var b=this;this.element.addClass("ui-selectable");this.dragged=false;var c;this.refresh=function(){c=a(b.options.filter,b.element[0]);c.each(function(){var d=a(this);var e=d.offset();a.data(this,"selectable-item",{element:this,$element:d,left:e.left,top:e.top,right:e.left+d.outerWidth(),bottom:e.top+d.outerHeight(),startselected:false,selected:d.hasClass("ui-selected"),selecting:d.hasClass("ui-selecting"),unselecting:d.hasClass("ui-unselecting")})})};this.refresh();this.selectees=c.addClass("ui-selectee");this._mouseInit();this.helper=a(document.createElement("div")).css({border:"1px dotted black"}).addClass("ui-selectable-helper")},destroy:function(){this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");this._mouseDestroy()},_mouseStart:function(d){var b=this;this.opos=[d.pageX,d.pageY];if(this.options.disabled){return}var c=this.options;this.selectees=a(c.filter,this.element[0]);this._trigger("start",d);a(c.appendTo).append(this.helper);this.helper.css({"z-index":100,position:"absolute",left:d.clientX,top:d.clientY,width:0,height:0});if(c.autoRefresh){this.refresh()}this.selectees.filter(".ui-selected").each(function(){var e=a.data(this,"selectable-item");e.startselected=true;if(!d.metaKey){e.$element.removeClass("ui-selected");e.selected=false;e.$element.addClass("ui-unselecting");e.unselecting=true;b._trigger("unselecting",d,{unselecting:e.element})}});a(d.target).parents().andSelf().each(function(){var e=a.data(this,"selectable-item");if(e){e.$element.removeClass("ui-unselecting").addClass("ui-selecting");e.unselecting=false;e.selecting=true;e.selected=true;b._trigger("selecting",d,{selecting:e.element});return false}})},_mouseDrag:function(i){var c=this;this.dragged=true;if(this.options.disabled){return}var e=this.options;var d=this.opos[0],h=this.opos[1],b=i.pageX,g=i.pageY;if(d>b){var f=b;b=d;d=f}if(h>g){var f=g;g=h;h=f}this.helper.css({left:d,top:h,width:b-d,height:g-h});this.selectees.each(function(){var j=a.data(this,"selectable-item");if(!j||j.element==c.element[0]){return}var k=false;if(e.tolerance=="touch"){k=(!(j.left>b||j.rightg||j.bottomd&&j.righth&&j.bottom=0;b--){this.items[b].item.removeData("sortable-item")}},_mouseCapture:function(e,f){if(this.reverting){return false}if(this.options.disabled||this.options.type=="static"){return false}this._refreshItems(e);var d=null,c=this,b=a(e.target).parents().each(function(){if(a.data(this,"sortable-item")==c){d=a(this);return false}});if(a.data(e.target,"sortable-item")==c){d=a(e.target)}if(!d){return false}if(this.options.handle&&!f){var g=false;a(this.options.handle,d).find("*").andSelf().each(function(){if(this==e.target){g=true}});if(!g){return false}}this.currentItem=d;this._removeCurrentsFromItems();return true},_mouseStart:function(e,f,b){var g=this.options,c=this;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(e);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");a.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(e);this.originalPageX=e.pageX;this.originalPageY=e.pageY;if(g.cursorAt){this._adjustOffsetFromHelper(g.cursorAt)}this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};if(this.helper[0]!=this.currentItem[0]){this.currentItem.hide()}this._createPlaceholder();if(g.containment){this._setContainment()}if(g.cursor){if(a("body").css("cursor")){this._storedCursor=a("body").css("cursor")}a("body").css("cursor",g.cursor)}if(g.opacity){if(this.helper.css("opacity")){this._storedOpacity=this.helper.css("opacity")}this.helper.css("opacity",g.opacity)}if(g.zIndex){if(this.helper.css("zIndex")){this._storedZIndex=this.helper.css("zIndex")}this.helper.css("zIndex",g.zIndex)}if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){this.overflowOffset=this.scrollParent.offset()}this._trigger("start",e,this._uiHash());if(!this._preserveHelperProportions){this._cacheHelperProportions()}if(!b){for(var d=this.containers.length-1;d>=0;d--){this.containers[d]._trigger("activate",e,c._uiHash(this))}}if(a.ui.ddmanager){a.ui.ddmanager.current=this}if(a.ui.ddmanager&&!g.dropBehaviour){a.ui.ddmanager.prepareOffsets(this,e)}this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(e);return true},_mouseDrag:function(f){this.position=this._generatePosition(f);this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs){this.lastPositionAbs=this.positionAbs}if(this.options.scroll){var g=this.options,b=false;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){if((this.overflowOffset.top+this.scrollParent[0].offsetHeight)-f.pageY=0;d--){var e=this.items[d],c=e.item[0],h=this._intersectsWithPointer(e);if(!h){continue}if(c!=this.currentItem[0]&&this.placeholder[h==1?"next":"prev"]()[0]!=c&&!a.ui.contains(this.placeholder[0],c)&&(this.options.type=="semi-dynamic"?!a.ui.contains(this.element[0],c):true)){this.direction=h==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(e)){this._rearrange(f,e)}else{break}this._trigger("change",f,this._uiHash());break}}this._contactContainers(f);if(a.ui.ddmanager){a.ui.ddmanager.drag(this,f)}this._trigger("sort",f,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(c,d){if(!c){return}if(a.ui.ddmanager&&!this.options.dropBehaviour){a.ui.ddmanager.drop(this,c)}if(this.options.revert){var b=this;var e=b.placeholder.offset();b.reverting=true;a(this.helper).animate({left:e.left-this.offset.parent.left-b.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:e.top-this.offset.parent.top-b.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){b._clear(c)})}else{this._clear(c,d)}return false},cancel:function(){var b=this;if(this.dragging){this._mouseUp();if(this.options.helper=="original"){this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else{this.currentItem.show()}for(var c=this.containers.length-1;c>=0;c--){this.containers[c]._trigger("deactivate",null,b._uiHash(this));if(this.containers[c].containerCache.over){this.containers[c]._trigger("out",null,b._uiHash(this));this.containers[c].containerCache.over=0}}}if(this.placeholder[0].parentNode){this.placeholder[0].parentNode.removeChild(this.placeholder[0])}if(this.options.helper!="original"&&this.helper&&this.helper[0].parentNode){this.helper.remove()}a.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null});if(this.domPosition.prev){a(this.domPosition.prev).after(this.currentItem)}else{a(this.domPosition.parent).prepend(this.currentItem)}return true},serialize:function(d){var b=this._getItemsAsjQuery(d&&d.connected);var c=[];d=d||{};a(b).each(function(){var e=(a(d.item||this).attr(d.attribute||"id")||"").match(d.expression||(/(.+)[-=_](.+)/));if(e){c.push((d.key||e[1]+"[]")+"="+(d.key&&d.expression?e[1]:e[2]))}});return c.join("&")},toArray:function(d){var b=this._getItemsAsjQuery(d&&d.connected);var c=[];d=d||{};b.each(function(){c.push(a(d.item||this).attr(d.attribute||"id")||"")});return c},_intersectsWith:function(m){var e=this.positionAbs.left,d=e+this.helperProportions.width,k=this.positionAbs.top,j=k+this.helperProportions.height;var f=m.left,c=f+m.width,n=m.top,i=n+m.height;var o=this.offset.click.top,h=this.offset.click.left;var g=(k+o)>n&&(k+o)f&&(e+h)m[this.floating?"width":"height"])){return g}else{return(f0?"down":"up")},_getDragHorizontalDirection:function(){var b=this.positionAbs.left-this.lastPositionAbs.left;return b!=0&&(b>0?"right":"left")},refresh:function(b){this._refreshItems(b);this.refreshPositions()},_connectWith:function(){var b=this.options;return b.connectWith.constructor==String?[b.connectWith]:b.connectWith},_getItemsAsjQuery:function(b){var l=this;var g=[];var e=[];var h=this._connectWith();if(h&&b){for(var d=h.length-1;d>=0;d--){var k=a(h[d]);for(var c=k.length-1;c>=0;c--){var f=a.data(k[c],"sortable");if(f&&f!=this&&!f.options.disabled){e.push([a.isFunction(f.options.items)?f.options.items.call(f.element):a(f.options.items,f.element).not(".ui-sortable-helper"),f])}}}}e.push([a.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):a(this.options.items,this.element).not(".ui-sortable-helper"),this]);for(var d=e.length-1;d>=0;d--){e[d][0].each(function(){g.push(this)})}return a(g)},_removeCurrentsFromItems:function(){var d=this.currentItem.find(":data(sortable-item)");for(var c=0;c=0;e--){var m=a(l[e]);for(var d=m.length-1;d>=0;d--){var g=a.data(m[d],"sortable");if(g&&g!=this&&!g.options.disabled){f.push([a.isFunction(g.options.items)?g.options.items.call(g.element[0],b,{item:this.currentItem}):a(g.options.items,g.element),g]);this.containers.push(g)}}}}for(var e=f.length-1;e>=0;e--){var k=f[e][1];var c=f[e][0];for(var d=0,n=c.length;d=0;d--){var e=this.items[d];if(e.instance!=this.currentContainer&&this.currentContainer&&e.item[0]!=this.currentItem[0]){continue}var c=this.options.toleranceElement?a(this.options.toleranceElement,e.item):e.item;if(!b){e.width=c.outerWidth();e.height=c.outerHeight()}var f=c.offset();e.left=f.left;e.top=f.top}if(this.options.custom&&this.options.custom.refreshContainers){this.options.custom.refreshContainers.call(this)}else{for(var d=this.containers.length-1;d>=0;d--){var f=this.containers[d].element.offset();this.containers[d].containerCache.left=f.left;this.containers[d].containerCache.top=f.top;this.containers[d].containerCache.width=this.containers[d].element.outerWidth();this.containers[d].containerCache.height=this.containers[d].element.outerHeight()}}},_createPlaceholder:function(d){var b=d||this,e=b.options;if(!e.placeholder||e.placeholder.constructor==String){var c=e.placeholder;e.placeholder={element:function(){var f=a(document.createElement(b.currentItem[0].nodeName)).addClass(c||b.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];if(!c){f.style.visibility="hidden"}return f},update:function(f,g){if(c&&!e.forcePlaceholderSize){return}if(!g.height()){g.height(b.currentItem.innerHeight()-parseInt(b.currentItem.css("paddingTop")||0,10)-parseInt(b.currentItem.css("paddingBottom")||0,10))}if(!g.width()){g.width(b.currentItem.innerWidth()-parseInt(b.currentItem.css("paddingLeft")||0,10)-parseInt(b.currentItem.css("paddingRight")||0,10))}}}}b.placeholder=a(e.placeholder.element.call(b.element,b.currentItem));b.currentItem.after(b.placeholder);e.placeholder.update(b,b.placeholder)},_contactContainers:function(d){for(var c=this.containers.length-1;c>=0;c--){if(this._intersectsWith(this.containers[c].containerCache)){if(!this.containers[c].containerCache.over){if(this.currentContainer!=this.containers[c]){var h=10000;var g=null;var e=this.positionAbs[this.containers[c].floating?"left":"top"];for(var b=this.items.length-1;b>=0;b--){if(!a.ui.contains(this.containers[c].element[0],this.items[b].item[0])){continue}var f=this.items[b][this.containers[c].floating?"left":"top"];if(Math.abs(f-e)this.containment[2]){d=this.containment[2]+this.offset.click.left}if(e.pageY-this.offset.click.top>this.containment[3]){c=this.containment[3]+this.offset.click.top}}if(h.grid){var g=this.originalPageY+Math.round((c-this.originalPageY)/h.grid[1])*h.grid[1];c=this.containment?(!(g-this.offset.click.topthis.containment[3])?g:(!(g-this.offset.click.topthis.containment[2])?f:(!(f-this.offset.click.left=0;c--){if(a.ui.contains(this.containers[c].element[0],this.currentItem[0])&&!e){f.push((function(g){return function(h){g._trigger("receive",h,this._uiHash(this))}}).call(this,this.containers[c]));f.push((function(g){return function(h){g._trigger("update",h,this._uiHash(this))}}).call(this,this.containers[c]))}}}for(var c=this.containers.length-1;c>=0;c--){if(!e){f.push((function(g){return function(h){g._trigger("deactivate",h,this._uiHash(this))}}).call(this,this.containers[c]))}if(this.containers[c].containerCache.over){f.push((function(g){return function(h){g._trigger("out",h,this._uiHash(this))}}).call(this,this.containers[c]));this.containers[c].containerCache.over=0}}if(this._storedCursor){a("body").css("cursor",this._storedCursor)}if(this._storedOpacity){this.helper.css("opacity",this._storedOpacity)}if(this._storedZIndex){this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex)}this.dragging=false;if(this.cancelHelperRemoval){if(!e){this._trigger("beforeStop",d,this._uiHash());for(var c=0;c *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1000}})})(jQuery);;/* + * jQuery UI Accordion 1.7.2 + * + * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Accordion + * + * Depends: + * ui.core.js + */ +(function(a){a.widget("ui.accordion",{_init:function(){var d=this.options,b=this;this.running=0;if(d.collapsible==a.ui.accordion.defaults.collapsible&&d.alwaysOpen!=a.ui.accordion.defaults.alwaysOpen){d.collapsible=!d.alwaysOpen}if(d.navigation){var c=this.element.find("a").filter(d.navigationFilter);if(c.length){if(c.filter(d.header).length){this.active=c}else{this.active=c.parent().parent().prev();c.addClass("ui-accordion-content-active")}}}this.element.addClass("ui-accordion ui-widget ui-helper-reset");if(this.element[0].nodeName=="UL"){this.element.children("li").addClass("ui-accordion-li-fix")}this.headers=this.element.find(d.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){a(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){a(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){a(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){a(this).removeClass("ui-state-focus")});this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");this.active=this._findActive(this.active||d.active).toggleClass("ui-state-default").toggleClass("ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");this.active.next().addClass("ui-accordion-content-active");a("").addClass("ui-icon "+d.icons.header).prependTo(this.headers);this.active.find(".ui-icon").toggleClass(d.icons.header).toggleClass(d.icons.headerSelected);if(a.browser.msie){this.element.find("a").css("zoom","1")}this.resize();this.element.attr("role","tablist");this.headers.attr("role","tab").bind("keydown",function(e){return b._keydown(e)}).next().attr("role","tabpanel");this.headers.not(this.active||"").attr("aria-expanded","false").attr("tabIndex","-1").next().hide();if(!this.active.length){this.headers.eq(0).attr("tabIndex","0")}else{this.active.attr("aria-expanded","true").attr("tabIndex","0")}if(!a.browser.safari){this.headers.find("a").attr("tabIndex","-1")}if(d.event){this.headers.bind((d.event)+".accordion",function(e){return b._clickHandler.call(b,e,this)})}},destroy:function(){var c=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role").unbind(".accordion").removeData("accordion");this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("tabindex");this.headers.find("a").removeAttr("tabindex");this.headers.children(".ui-icon").remove();var b=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active");if(c.autoHeight||c.fillHeight){b.css("height","")}},_setData:function(b,c){if(b=="alwaysOpen"){b="collapsible";c=!c}a.widget.prototype._setData.apply(this,arguments)},_keydown:function(e){var g=this.options,f=a.ui.keyCode;if(g.disabled||e.altKey||e.ctrlKey){return}var d=this.headers.length;var b=this.headers.index(e.target);var c=false;switch(e.keyCode){case f.RIGHT:case f.DOWN:c=this.headers[(b+1)%d];break;case f.LEFT:case f.UP:c=this.headers[(b-1+d)%d];break;case f.SPACE:case f.ENTER:return this._clickHandler({target:e.target},e.target)}if(c){a(e.target).attr("tabIndex","-1");a(c).attr("tabIndex","0");c.focus();return false}return true},resize:function(){var e=this.options,d;if(e.fillSpace){if(a.browser.msie){var b=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}d=this.element.parent().height();if(a.browser.msie){this.element.parent().css("overflow",b)}this.headers.each(function(){d-=a(this).outerHeight()});var c=0;this.headers.next().each(function(){c=Math.max(c,a(this).innerHeight()-a(this).height())}).height(Math.max(0,d-c)).css("overflow","auto")}else{if(e.autoHeight){d=0;this.headers.next().each(function(){d=Math.max(d,a(this).outerHeight())}).height(d)}}},activate:function(b){var c=this._findActive(b)[0];this._clickHandler({target:c},c)},_findActive:function(b){return b?typeof b=="number"?this.headers.filter(":eq("+b+")"):this.headers.not(this.headers.not(b)):b===false?a([]):this.headers.filter(":eq(0)")},_clickHandler:function(b,f){var d=this.options;if(d.disabled){return false}if(!b.target&&d.collapsible){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").find(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header);this.active.next().addClass("ui-accordion-content-active");var h=this.active.next(),e={options:d,newHeader:a([]),oldHeader:d.active,newContent:a([]),oldContent:h},c=(this.active=a([]));this._toggle(c,h,e);return false}var g=a(b.currentTarget||f);var i=g[0]==this.active[0];if(this.running||(!d.collapsible&&i)){return false}this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").find(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header);this.active.next().addClass("ui-accordion-content-active");if(!i){g.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").find(".ui-icon").removeClass(d.icons.header).addClass(d.icons.headerSelected);g.next().addClass("ui-accordion-content-active")}var c=g.next(),h=this.active.next(),e={options:d,newHeader:i&&d.collapsible?a([]):g,oldHeader:this.active,newContent:i&&d.collapsible?a([]):c.find("> *"),oldContent:h.find("> *")},j=this.headers.index(this.active[0])>this.headers.index(g[0]);this.active=i?a([]):g;this._toggle(c,h,e,i,j);return false},_toggle:function(b,i,g,j,k){var d=this.options,m=this;this.toShow=b;this.toHide=i;this.data=g;var c=function(){if(!m){return}return m._completed.apply(m,arguments)};this._trigger("changestart",null,this.data);this.running=i.size()===0?b.size():i.size();if(d.animated){var f={};if(d.collapsible&&j){f={toShow:a([]),toHide:i,complete:c,down:k,autoHeight:d.autoHeight||d.fillSpace}}else{f={toShow:b,toHide:i,complete:c,down:k,autoHeight:d.autoHeight||d.fillSpace}}if(!d.proxied){d.proxied=d.animated}if(!d.proxiedDuration){d.proxiedDuration=d.duration}d.animated=a.isFunction(d.proxied)?d.proxied(f):d.proxied;d.duration=a.isFunction(d.proxiedDuration)?d.proxiedDuration(f):d.proxiedDuration;var l=a.ui.accordion.animations,e=d.duration,h=d.animated;if(!l[h]){l[h]=function(n){this.slide(n,{easing:h,duration:e||700})}}l[h](f)}else{if(d.collapsible&&j){b.toggle()}else{i.hide();b.show()}c(true)}i.prev().attr("aria-expanded","false").attr("tabIndex","-1").blur();b.prev().attr("aria-expanded","true").attr("tabIndex","0").focus()},_completed:function(b){var c=this.options;this.running=b?0:--this.running;if(this.running){return}if(c.clearStyle){this.toShow.add(this.toHide).css({height:"",overflow:""})}this._trigger("change",null,this.data)}});a.extend(a.ui.accordion,{version:"1.7.2",defaults:{active:null,alwaysOpen:true,animated:"slide",autoHeight:true,clearStyle:false,collapsible:false,event:"click",fillSpace:false,header:"> li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:false,navigationFilter:function(){return this.href.toLowerCase()==location.href.toLowerCase()}},animations:{slide:function(j,h){j=a.extend({easing:"swing",duration:300},j,h);if(!j.toHide.size()){j.toShow.animate({height:"show"},j);return}if(!j.toShow.size()){j.toHide.animate({height:"hide"},j);return}var c=j.toShow.css("overflow"),g,d={},f={},e=["height","paddingTop","paddingBottom"],b;var i=j.toShow;b=i[0].style.width;i.width(parseInt(i.parent().width(),10)-parseInt(i.css("paddingLeft"),10)-parseInt(i.css("paddingRight"),10)-(parseInt(i.css("borderLeftWidth"),10)||0)-(parseInt(i.css("borderRightWidth"),10)||0));a.each(e,function(k,m){f[m]="hide";var l=(""+a.css(j.toShow[0],m)).match(/^([\d+-.]+)(.*)$/);d[m]={value:l[1],unit:l[2]||"px"}});j.toShow.css({height:0,overflow:"hidden"}).show();j.toHide.filter(":hidden").each(j.complete).end().filter(":visible").animate(f,{step:function(k,l){if(l.prop=="height"){g=(l.now-l.start)/(l.end-l.start)}j.toShow[0].style[l.prop]=(g*d[l.prop].value)+d[l.prop].unit},duration:j.duration,easing:j.easing,complete:function(){if(!j.autoHeight){j.toShow.css("height","")}j.toShow.css("width",b);j.toShow.css({overflow:c});j.complete()}})},bounceslide:function(b){this.slide(b,{easing:b.down?"easeOutBounce":"swing",duration:b.down?1000:200})},easeslide:function(b){this.slide(b,{easing:"easeinout",duration:700})}}})})(jQuery);;/* + * jQuery UI Dialog 1.7.2 + * + * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Dialog + * + * Depends: + * ui.core.js + * ui.draggable.js + * ui.resizable.js + */ +(function(c){var b={dragStart:"start.draggable",drag:"drag.draggable",dragStop:"stop.draggable",maxHeight:"maxHeight.resizable",minHeight:"minHeight.resizable",maxWidth:"maxWidth.resizable",minWidth:"minWidth.resizable",resizeStart:"start.resizable",resize:"drag.resizable",resizeStop:"stop.resizable"},a="ui-dialog ui-widget ui-widget-content ui-corner-all ";c.widget("ui.dialog",{_init:function(){this.originalTitle=this.element.attr("title");var l=this,m=this.options,j=m.title||this.originalTitle||" ",e=c.ui.dialog.getTitleId(this.element),k=(this.uiDialog=c("
    ")).appendTo(document.body).hide().addClass(a+m.dialogClass).css({position:"absolute",overflow:"hidden",zIndex:m.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(n){(m.closeOnEscape&&n.keyCode&&n.keyCode==c.ui.keyCode.ESCAPE&&l.close(n))}).attr({role:"dialog","aria-labelledby":e}).mousedown(function(n){l.moveToTop(false,n)}),g=this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(k),f=(this.uiDialogTitlebar=c("
    ")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(k),i=c('').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){i.addClass("ui-state-hover")},function(){i.removeClass("ui-state-hover")}).focus(function(){i.addClass("ui-state-focus")}).blur(function(){i.removeClass("ui-state-focus")}).mousedown(function(n){n.stopPropagation()}).click(function(n){l.close(n);return false}).appendTo(f),h=(this.uiDialogTitlebarCloseText=c("")).addClass("ui-icon ui-icon-closethick").text(m.closeText).appendTo(i),d=c("").addClass("ui-dialog-title").attr("id",e).html(j).prependTo(f);f.find("*").add(f).disableSelection();(m.draggable&&c.fn.draggable&&this._makeDraggable());(m.resizable&&c.fn.resizable&&this._makeResizable());this._createButtons(m.buttons);this._isOpen=false;(m.bgiframe&&c.fn.bgiframe&&k.bgiframe());(m.autoOpen&&this.open())},destroy:function(){(this.overlay&&this.overlay.destroy());this.uiDialog.hide();this.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");this.uiDialog.remove();(this.originalTitle&&this.element.attr("title",this.originalTitle))},close:function(f){var d=this;if(false===d._trigger("beforeclose",f)){return}(d.overlay&&d.overlay.destroy());d.uiDialog.unbind("keypress.ui-dialog");(d.options.hide?d.uiDialog.hide(d.options.hide,function(){d._trigger("close",f)}):d.uiDialog.hide()&&d._trigger("close",f));c.ui.dialog.overlay.resize();d._isOpen=false;if(d.options.modal){var e=0;c(".ui-dialog").each(function(){if(this!=d.uiDialog[0]){e=Math.max(e,c(this).css("z-index"))}});c.ui.dialog.maxZ=e}},isOpen:function(){return this._isOpen},moveToTop:function(f,e){if((this.options.modal&&!f)||(!this.options.stack&&!this.options.modal)){return this._trigger("focus",e)}if(this.options.zIndex>c.ui.dialog.maxZ){c.ui.dialog.maxZ=this.options.zIndex}(this.overlay&&this.overlay.$el.css("z-index",c.ui.dialog.overlay.maxZ=++c.ui.dialog.maxZ));var d={scrollTop:this.element.attr("scrollTop"),scrollLeft:this.element.attr("scrollLeft")};this.uiDialog.css("z-index",++c.ui.dialog.maxZ);this.element.attr(d);this._trigger("focus",e)},open:function(){if(this._isOpen){return}var e=this.options,d=this.uiDialog;this.overlay=e.modal?new c.ui.dialog.overlay(this):null;(d.next().length&&d.appendTo("body"));this._size();this._position(e.position);d.show(e.show);this.moveToTop(true);(e.modal&&d.bind("keypress.ui-dialog",function(h){if(h.keyCode!=c.ui.keyCode.TAB){return}var g=c(":tabbable",this),i=g.filter(":first")[0],f=g.filter(":last")[0];if(h.target==f&&!h.shiftKey){setTimeout(function(){i.focus()},1)}else{if(h.target==i&&h.shiftKey){setTimeout(function(){f.focus()},1)}}}));c([]).add(d.find(".ui-dialog-content :tabbable:first")).add(d.find(".ui-dialog-buttonpane :tabbable:first")).add(d).filter(":first").focus();this._trigger("open");this._isOpen=true},_createButtons:function(g){var f=this,d=false,e=c("
    ").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix");this.uiDialog.find(".ui-dialog-buttonpane").remove();(typeof g=="object"&&g!==null&&c.each(g,function(){return !(d=true)}));if(d){c.each(g,function(h,i){c('').addClass("ui-state-default ui-corner-all").text(h).click(function(){i.apply(f.element[0],arguments)}).hover(function(){c(this).addClass("ui-state-hover")},function(){c(this).removeClass("ui-state-hover")}).focus(function(){c(this).addClass("ui-state-focus")}).blur(function(){c(this).removeClass("ui-state-focus")}).appendTo(e)});e.appendTo(this.uiDialog)}},_makeDraggable:function(){var d=this,f=this.options,e;this.uiDialog.draggable({cancel:".ui-dialog-content",handle:".ui-dialog-titlebar",containment:"document",start:function(){e=f.height;c(this).height(c(this).height()).addClass("ui-dialog-dragging");(f.dragStart&&f.dragStart.apply(d.element[0],arguments))},drag:function(){(f.drag&&f.drag.apply(d.element[0],arguments))},stop:function(){c(this).removeClass("ui-dialog-dragging").height(e);(f.dragStop&&f.dragStop.apply(d.element[0],arguments));c.ui.dialog.overlay.resize()}})},_makeResizable:function(g){g=(g===undefined?this.options.resizable:g);var d=this,f=this.options,e=typeof g=="string"?g:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",alsoResize:this.element,maxWidth:f.maxWidth,maxHeight:f.maxHeight,minWidth:f.minWidth,minHeight:f.minHeight,start:function(){c(this).addClass("ui-dialog-resizing");(f.resizeStart&&f.resizeStart.apply(d.element[0],arguments))},resize:function(){(f.resize&&f.resize.apply(d.element[0],arguments))},handles:e,stop:function(){c(this).removeClass("ui-dialog-resizing");f.height=c(this).height();f.width=c(this).width();(f.resizeStop&&f.resizeStop.apply(d.element[0],arguments));c.ui.dialog.overlay.resize()}}).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_position:function(i){var e=c(window),f=c(document),g=f.scrollTop(),d=f.scrollLeft(),h=g;if(c.inArray(i,["center","top","right","bottom","left"])>=0){i=[i=="right"||i=="left"?i:"center",i=="top"||i=="bottom"?i:"middle"]}if(i.constructor!=Array){i=["center","middle"]}if(i[0].constructor==Number){d+=i[0]}else{switch(i[0]){case"left":d+=0;break;case"right":d+=e.width()-this.uiDialog.outerWidth();break;default:case"center":d+=(e.width()-this.uiDialog.outerWidth())/2}}if(i[1].constructor==Number){g+=i[1]}else{switch(i[1]){case"top":g+=0;break;case"bottom":g+=e.height()-this.uiDialog.outerHeight();break;default:case"middle":g+=(e.height()-this.uiDialog.outerHeight())/2}}g=Math.max(g,h);this.uiDialog.css({top:g,left:d})},_setData:function(e,f){(b[e]&&this.uiDialog.data(b[e],f));switch(e){case"buttons":this._createButtons(f);break;case"closeText":this.uiDialogTitlebarCloseText.text(f);break;case"dialogClass":this.uiDialog.removeClass(this.options.dialogClass).addClass(a+f);break;case"draggable":(f?this._makeDraggable():this.uiDialog.draggable("destroy"));break;case"height":this.uiDialog.height(f);break;case"position":this._position(f);break;case"resizable":var d=this.uiDialog,g=this.uiDialog.is(":data(resizable)");(g&&!f&&d.resizable("destroy"));(g&&typeof f=="string"&&d.resizable("option","handles",f));(g||this._makeResizable(f));break;case"title":c(".ui-dialog-title",this.uiDialogTitlebar).html(f||" ");break;case"width":this.uiDialog.width(f);break}c.widget.prototype._setData.apply(this,arguments)},_size:function(){var e=this.options;this.element.css({height:0,minHeight:0,width:"auto"});var d=this.uiDialog.css({height:"auto",width:e.width}).height();this.element.css({minHeight:Math.max(e.minHeight-d,0),height:e.height=="auto"?"auto":Math.max(e.height-d,0)})}});c.extend(c.ui.dialog,{version:"1.7.2",defaults:{autoOpen:true,bgiframe:false,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false,position:"center",resizable:true,show:null,stack:true,title:"",width:300,zIndex:1000},getter:"isOpen",uuid:0,maxZ:0,getTitleId:function(d){return"ui-dialog-title-"+(d.attr("id")||++this.uuid)},overlay:function(d){this.$el=c.ui.dialog.overlay.create(d)}});c.extend(c.ui.dialog.overlay,{instances:[],maxZ:0,events:c.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(d){return d+".dialog-overlay"}).join(" "),create:function(e){if(this.instances.length===0){setTimeout(function(){if(c.ui.dialog.overlay.instances.length){c(document).bind(c.ui.dialog.overlay.events,function(f){var g=c(f.target).parents(".ui-dialog").css("zIndex")||0;return(g>c.ui.dialog.overlay.maxZ)})}},1);c(document).bind("keydown.dialog-overlay",function(f){(e.options.closeOnEscape&&f.keyCode&&f.keyCode==c.ui.keyCode.ESCAPE&&e.close(f))});c(window).bind("resize.dialog-overlay",c.ui.dialog.overlay.resize)}var d=c("
    ").appendTo(document.body).addClass("ui-widget-overlay").css({width:this.width(),height:this.height()});(e.options.bgiframe&&c.fn.bgiframe&&d.bgiframe());this.instances.push(d);return d},destroy:function(d){this.instances.splice(c.inArray(this.instances,d),1);if(this.instances.length===0){c([document,window]).unbind(".dialog-overlay")}d.remove();var e=0;c.each(this.instances,function(){e=Math.max(e,this.css("z-index"))});this.maxZ=e},height:function(){if(c.browser.msie&&c.browser.version<7){var e=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);var d=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);if(e
    ");if(!c.values){c.values=[this._valueMin(),this._valueMin()]}if(c.values.length&&c.values.length!=2){c.values=[c.values[0],c.values[0]]}}else{this.range=a("
    ")}this.range.appendTo(this.element).addClass("ui-slider-range");if(c.range=="min"||c.range=="max"){this.range.addClass("ui-slider-range-"+c.range)}this.range.addClass("ui-widget-header")}if(a(".ui-slider-handle",this.element).length==0){a('
    ').appendTo(this.element).addClass("ui-slider-handle")}if(c.values&&c.values.length){while(a(".ui-slider-handle",this.element).length').appendTo(this.element).addClass("ui-slider-handle")}}this.handles=a(".ui-slider-handle",this.element).addClass("ui-state-default ui-corner-all");this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(d){d.preventDefault()}).hover(function(){if(!c.disabled){a(this).addClass("ui-state-hover")}},function(){a(this).removeClass("ui-state-hover")}).focus(function(){if(!c.disabled){a(".ui-slider .ui-state-focus").removeClass("ui-state-focus");a(this).addClass("ui-state-focus")}else{a(this).blur()}}).blur(function(){a(this).removeClass("ui-state-focus")});this.handles.each(function(d){a(this).data("index.ui-slider-handle",d)});this.handles.keydown(function(i){var f=true;var e=a(this).data("index.ui-slider-handle");if(b.options.disabled){return}switch(i.keyCode){case a.ui.keyCode.HOME:case a.ui.keyCode.END:case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:f=false;if(!b._keySliding){b._keySliding=true;a(this).addClass("ui-state-active");b._start(i,e)}break}var g,d,h=b._step();if(b.options.values&&b.options.values.length){g=d=b.values(e)}else{g=d=b.value()}switch(i.keyCode){case a.ui.keyCode.HOME:d=b._valueMin();break;case a.ui.keyCode.END:d=b._valueMax();break;case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:if(g==b._valueMax()){return}d=g+h;break;case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:if(g==b._valueMin()){return}d=g-h;break}b._slide(i,e,d);return f}).keyup(function(e){var d=a(this).data("index.ui-slider-handle");if(b._keySliding){b._stop(e,d);b._change(e,d);b._keySliding=false;a(this).removeClass("ui-state-active")}});this._refreshValue()},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");this._mouseDestroy()},_mouseCapture:function(d){var e=this.options;if(e.disabled){return false}this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();var h={x:d.pageX,y:d.pageY};var j=this._normValueFromMouse(h);var c=this._valueMax()-this._valueMin()+1,f;var k=this,i;this.handles.each(function(l){var m=Math.abs(j-k.values(l));if(c>m){c=m;f=a(this);i=l}});if(e.range==true&&this.values(1)==e.min){f=a(this.handles[++i])}this._start(d,i);k._handleIndex=i;f.addClass("ui-state-active").focus();var g=f.offset();var b=!a(d.target).parents().andSelf().is(".ui-slider-handle");this._clickOffset=b?{left:0,top:0}:{left:d.pageX-g.left-(f.width()/2),top:d.pageY-g.top-(f.height()/2)-(parseInt(f.css("borderTopWidth"),10)||0)-(parseInt(f.css("borderBottomWidth"),10)||0)+(parseInt(f.css("marginTop"),10)||0)};j=this._normValueFromMouse(h);this._slide(d,i,j);return true},_mouseStart:function(b){return true},_mouseDrag:function(d){var b={x:d.pageX,y:d.pageY};var c=this._normValueFromMouse(b);this._slide(d,this._handleIndex,c);return false},_mouseStop:function(b){this.handles.removeClass("ui-state-active");this._stop(b,this._handleIndex);this._change(b,this._handleIndex);this._handleIndex=null;this._clickOffset=null;return false},_detectOrientation:function(){this.orientation=this.options.orientation=="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(d){var c,h;if("horizontal"==this.orientation){c=this.elementSize.width;h=d.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{c=this.elementSize.height;h=d.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}var f=(h/c);if(f>1){f=1}if(f<0){f=0}if("vertical"==this.orientation){f=1-f}var e=this._valueMax()-this._valueMin(),i=f*e,b=i%this.options.step,g=this._valueMin()+i-b;if(b>(this.options.step/2)){g+=this.options.step}return parseFloat(g.toFixed(5))},_start:function(d,c){var b={handle:this.handles[c],value:this.value()};if(this.options.values&&this.options.values.length){b.value=this.values(c);b.values=this.values()}this._trigger("start",d,b)},_slide:function(f,e,d){var g=this.handles[e];if(this.options.values&&this.options.values.length){var b=this.values(e?0:1);if((this.options.values.length==2&&this.options.range===true)&&((e==0&&d>b)||(e==1&&d1){this.options.values[b]=e;this._refreshValue(c);if(!d){this._change(null,b)}}if(arguments.length){if(this.options.values&&this.options.values.length){return this._values(b)}else{return this.value()}}else{return this._values()}},_setData:function(b,d,c){a.widget.prototype._setData.apply(this,arguments);switch(b){case"disabled":if(d){this.handles.filter(".ui-state-focus").blur();this.handles.removeClass("ui-state-hover");this.handles.attr("disabled","disabled")}else{this.handles.removeAttr("disabled")}case"orientation":this._detectOrientation();this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue(c);break;case"value":this._refreshValue(c);break}},_step:function(){var b=this.options.step;return b},_value:function(){var b=this.options.value;if(bthis._valueMax()){b=this._valueMax()}return b},_values:function(b){if(arguments.length){var c=this.options.values[b];if(cthis._valueMax()){c=this._valueMax()}return c}else{return this.options.values}},_valueMin:function(){var b=this.options.min;return b},_valueMax:function(){var b=this.options.max;return b},_refreshValue:function(c){var f=this.options.range,d=this.options,l=this;if(this.options.values&&this.options.values.length){var i,h;this.handles.each(function(p,n){var o=(l.values(p)-l._valueMin())/(l._valueMax()-l._valueMin())*100;var m={};m[l.orientation=="horizontal"?"left":"bottom"]=o+"%";a(this).stop(1,1)[c?"animate":"css"](m,d.animate);if(l.options.range===true){if(l.orientation=="horizontal"){(p==0)&&l.range.stop(1,1)[c?"animate":"css"]({left:o+"%"},d.animate);(p==1)&&l.range[c?"animate":"css"]({width:(o-lastValPercent)+"%"},{queue:false,duration:d.animate})}else{(p==0)&&l.range.stop(1,1)[c?"animate":"css"]({bottom:(o)+"%"},d.animate);(p==1)&&l.range[c?"animate":"css"]({height:(o-lastValPercent)+"%"},{queue:false,duration:d.animate})}}lastValPercent=o})}else{var j=this.value(),g=this._valueMin(),k=this._valueMax(),e=k!=g?(j-g)/(k-g)*100:0;var b={};b[l.orientation=="horizontal"?"left":"bottom"]=e+"%";this.handle.stop(1,1)[c?"animate":"css"](b,d.animate);(f=="min")&&(this.orientation=="horizontal")&&this.range.stop(1,1)[c?"animate":"css"]({width:e+"%"},d.animate);(f=="max")&&(this.orientation=="horizontal")&&this.range[c?"animate":"css"]({width:(100-e)+"%"},{queue:false,duration:d.animate});(f=="min")&&(this.orientation=="vertical")&&this.range.stop(1,1)[c?"animate":"css"]({height:e+"%"},d.animate);(f=="max")&&(this.orientation=="vertical")&&this.range[c?"animate":"css"]({height:(100-e)+"%"},{queue:false,duration:d.animate})}}}));a.extend(a.ui.slider,{getter:"value values",version:"1.7.2",eventPrefix:"slide",defaults:{animate:false,delay:0,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null}})})(jQuery);;/* + * jQuery UI Tabs 1.7.2 + * + * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Tabs + * + * Depends: + * ui.core.js + */ +(function(a){a.widget("ui.tabs",{_init:function(){if(this.options.deselectable!==undefined){this.options.collapsible=this.options.deselectable}this._tabify(true)},_setData:function(b,c){if(b=="selected"){if(this.options.collapsible&&c==this.options.selected){return}this.select(c)}else{this.options[b]=c;if(b=="deselectable"){this.options.collapsible=c}this._tabify()}},_tabId:function(b){return b.title&&b.title.replace(/\s/g,"_").replace(/[^A-Za-z0-9\-_:\.]/g,"")||this.options.idPrefix+a.data(b)},_sanitizeSelector:function(b){return b.replace(/:/g,"\\:")},_cookie:function(){var b=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+a.data(this.list[0]));return a.cookie.apply(null,[b].concat(a.makeArray(arguments)))},_ui:function(c,b){return{tab:c,panel:b,index:this.anchors.index(c)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var b=a(this);b.html(b.data("label.tabs")).removeData("label.tabs")})},_tabify:function(n){this.list=this.element.children("ul:first");this.lis=a("li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return a("a",this)[0]});this.panels=a([]);var p=this,d=this.options;var c=/^#.+/;this.anchors.each(function(r,o){var q=a(o).attr("href");var s=q.split("#")[0],u;if(s&&(s===location.toString().split("#")[0]||(u=a("base")[0])&&s===u.href)){q=o.hash;o.href=q}if(c.test(q)){p.panels=p.panels.add(p._sanitizeSelector(q))}else{if(q!="#"){a.data(o,"href.tabs",q);a.data(o,"load.tabs",q.replace(/#.*$/,""));var w=p._tabId(o);o.href="#"+w;var v=a("#"+w);if(!v.length){v=a(d.panelTemplate).attr("id",w).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(p.panels[r-1]||p.list);v.data("destroy.tabs",true)}p.panels=p.panels.add(v)}else{d.disabled.push(r)}}});if(n){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all");this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(d.selected===undefined){if(location.hash){this.anchors.each(function(q,o){if(o.hash==location.hash){d.selected=q;return false}})}if(typeof d.selected!="number"&&d.cookie){d.selected=parseInt(p._cookie(),10)}if(typeof d.selected!="number"&&this.lis.filter(".ui-tabs-selected").length){d.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}d.selected=d.selected||0}else{if(d.selected===null){d.selected=-1}}d.selected=((d.selected>=0&&this.anchors[d.selected])||d.selected<0)?d.selected:0;d.disabled=a.unique(d.disabled.concat(a.map(this.lis.filter(".ui-state-disabled"),function(q,o){return p.lis.index(q)}))).sort();if(a.inArray(d.selected,d.disabled)!=-1){d.disabled.splice(a.inArray(d.selected,d.disabled),1)}this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active");if(d.selected>=0&&this.anchors.length){this.panels.eq(d.selected).removeClass("ui-tabs-hide");this.lis.eq(d.selected).addClass("ui-tabs-selected ui-state-active");p.element.queue("tabs",function(){p._trigger("show",null,p._ui(p.anchors[d.selected],p.panels[d.selected]))});this.load(d.selected)}a(window).bind("unload",function(){p.lis.add(p.anchors).unbind(".tabs");p.lis=p.anchors=p.panels=null})}else{d.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}this.element[d.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");if(d.cookie){this._cookie(d.selected,d.cookie)}for(var g=0,m;(m=this.lis[g]);g++){a(m)[a.inArray(g,d.disabled)!=-1&&!a(m).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled")}if(d.cache===false){this.anchors.removeData("cache.tabs")}this.lis.add(this.anchors).unbind(".tabs");if(d.event!="mouseover"){var f=function(o,i){if(i.is(":not(.ui-state-disabled)")){i.addClass("ui-state-"+o)}};var j=function(o,i){i.removeClass("ui-state-"+o)};this.lis.bind("mouseover.tabs",function(){f("hover",a(this))});this.lis.bind("mouseout.tabs",function(){j("hover",a(this))});this.anchors.bind("focus.tabs",function(){f("focus",a(this).closest("li"))});this.anchors.bind("blur.tabs",function(){j("focus",a(this).closest("li"))})}var b,h;if(d.fx){if(a.isArray(d.fx)){b=d.fx[0];h=d.fx[1]}else{b=h=d.fx}}function e(i,o){i.css({display:""});if(a.browser.msie&&o.opacity){i[0].style.removeAttribute("filter")}}var k=h?function(i,o){a(i).closest("li").removeClass("ui-state-default").addClass("ui-tabs-selected ui-state-active");o.hide().removeClass("ui-tabs-hide").animate(h,h.duration||"normal",function(){e(o,h);p._trigger("show",null,p._ui(i,o[0]))})}:function(i,o){a(i).closest("li").removeClass("ui-state-default").addClass("ui-tabs-selected ui-state-active");o.removeClass("ui-tabs-hide");p._trigger("show",null,p._ui(i,o[0]))};var l=b?function(o,i){i.animate(b,b.duration||"normal",function(){p.lis.removeClass("ui-tabs-selected ui-state-active").addClass("ui-state-default");i.addClass("ui-tabs-hide");e(i,b);p.element.dequeue("tabs")})}:function(o,i,q){p.lis.removeClass("ui-tabs-selected ui-state-active").addClass("ui-state-default");i.addClass("ui-tabs-hide");p.element.dequeue("tabs")};this.anchors.bind(d.event+".tabs",function(){var o=this,r=a(this).closest("li"),i=p.panels.filter(":not(.ui-tabs-hide)"),q=a(p._sanitizeSelector(this.hash));if((r.hasClass("ui-tabs-selected")&&!d.collapsible)||r.hasClass("ui-state-disabled")||r.hasClass("ui-state-processing")||p._trigger("select",null,p._ui(this,q[0]))===false){this.blur();return false}d.selected=p.anchors.index(this);p.abort();if(d.collapsible){if(r.hasClass("ui-tabs-selected")){d.selected=-1;if(d.cookie){p._cookie(d.selected,d.cookie)}p.element.queue("tabs",function(){l(o,i)}).dequeue("tabs");this.blur();return false}else{if(!i.length){if(d.cookie){p._cookie(d.selected,d.cookie)}p.element.queue("tabs",function(){k(o,q)});p.load(p.anchors.index(this));this.blur();return false}}}if(d.cookie){p._cookie(d.selected,d.cookie)}if(q.length){if(i.length){p.element.queue("tabs",function(){l(o,i)})}p.element.queue("tabs",function(){k(o,q)});p.load(p.anchors.index(this))}else{throw"jQuery UI Tabs: Mismatching fragment identifier."}if(a.browser.msie){this.blur()}});this.anchors.bind("click.tabs",function(){return false})},destroy:function(){var b=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var c=a.data(this,"href.tabs");if(c){this.href=c}var d=a(this).unbind(".tabs");a.each(["href","load","cache"],function(e,f){d.removeData(f+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){if(a.data(this,"destroy.tabs")){a(this).remove()}else{a(this).removeClass(["ui-state-default","ui-corner-top","ui-tabs-selected","ui-state-active","ui-state-hover","ui-state-focus","ui-state-disabled","ui-tabs-panel","ui-widget-content","ui-corner-bottom","ui-tabs-hide"].join(" "))}});if(b.cookie){this._cookie(null,b.cookie)}},add:function(e,d,c){if(c===undefined){c=this.anchors.length}var b=this,g=this.options,i=a(g.tabTemplate.replace(/#\{href\}/g,e).replace(/#\{label\}/g,d)),h=!e.indexOf("#")?e.replace("#",""):this._tabId(a("a",i)[0]);i.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var f=a("#"+h);if(!f.length){f=a(g.panelTemplate).attr("id",h).data("destroy.tabs",true)}f.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(c>=this.lis.length){i.appendTo(this.list);f.appendTo(this.list[0].parentNode)}else{i.insertBefore(this.lis[c]);f.insertBefore(this.panels[c])}g.disabled=a.map(g.disabled,function(k,j){return k>=c?++k:k});this._tabify();if(this.anchors.length==1){i.addClass("ui-tabs-selected ui-state-active");f.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){b._trigger("show",null,b._ui(b.anchors[0],b.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[c],this.panels[c]))},remove:function(b){var d=this.options,e=this.lis.eq(b).remove(),c=this.panels.eq(b).remove();if(e.hasClass("ui-tabs-selected")&&this.anchors.length>1){this.select(b+(b+1=b?--g:g});this._tabify();this._trigger("remove",null,this._ui(e.find("a")[0],c[0]))},enable:function(b){var c=this.options;if(a.inArray(b,c.disabled)==-1){return}this.lis.eq(b).removeClass("ui-state-disabled");c.disabled=a.grep(c.disabled,function(e,d){return e!=b});this._trigger("enable",null,this._ui(this.anchors[b],this.panels[b]))},disable:function(c){var b=this,d=this.options;if(c!=d.selected){this.lis.eq(c).addClass("ui-state-disabled");d.disabled.push(c);d.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[c],this.panels[c]))}},select:function(b){if(typeof b=="string"){b=this.anchors.index(this.anchors.filter("[href$="+b+"]"))}else{if(b===null){b=-1}}if(b==-1&&this.options.collapsible){b=this.options.selected}this.anchors.eq(b).trigger(this.options.event+".tabs")},load:function(e){var c=this,g=this.options,b=this.anchors.eq(e)[0],d=a.data(b,"load.tabs");this.abort();if(!d||this.element.queue("tabs").length!==0&&a.data(b,"cache.tabs")){this.element.dequeue("tabs");return}this.lis.eq(e).addClass("ui-state-processing");if(g.spinner){var f=a("span",b);f.data("label.tabs",f.html()).html(g.spinner)}this.xhr=a.ajax(a.extend({},g.ajaxOptions,{url:d,success:function(i,h){a(c._sanitizeSelector(b.hash)).html(i);c._cleanup();if(g.cache){a.data(b,"cache.tabs",true)}c._trigger("load",null,c._ui(c.anchors[e],c.panels[e]));try{g.ajaxOptions.success(i,h)}catch(j){}c.element.dequeue("tabs")}}))},abort:function(){this.element.queue([]);this.panels.stop(false,true);if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup()},url:function(c,b){this.anchors.eq(c).removeData("cache.tabs").data("load.tabs",b)},length:function(){return this.anchors.length}});a.extend(a.ui.tabs,{version:"1.7.2",getter:"length",defaults:{ajaxOptions:null,cache:false,cookie:null,collapsible:false,disabled:[],event:"click",fx:null,idPrefix:"ui-tabs-",panelTemplate:"
    ",spinner:"Loading…",tabTemplate:'
  • #{label}
  • '}});a.extend(a.ui.tabs.prototype,{rotation:null,rotate:function(d,f){var b=this,g=this.options;var c=b._rotate||(b._rotate=function(h){clearTimeout(b.rotation);b.rotation=setTimeout(function(){var i=g.selected;b.select(++i')}$.extend(Datepicker.prototype,{markerClassName:"hasDatepicker",log:function(){if(this.debug){console.log.apply("",arguments)}},setDefaults:function(settings){extendRemove(this._defaults,settings||{});return this},_attachDatepicker:function(target,settings){var inlineSettings=null;for(var attrName in this._defaults){var attrValue=target.getAttribute("date:"+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}}var nodeName=target.nodeName.toLowerCase();var inline=(nodeName=="div"||nodeName=="span");if(!target.id){target.id="dp"+(++this.uuid)}var inst=this._newInst($(target),inline);inst.settings=$.extend({},settings||{},inlineSettings||{});if(nodeName=="input"){this._connectDatepicker(target,inst)}else{if(inline){this._inlineDatepicker(target,inst)}}},_newInst:function(target,inline){var id=target[0].id.replace(/([:\[\]\.])/g,"\\\\$1");return{id:id,input:target,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:inline,dpDiv:(!inline?this.dpDiv:$('
    '))}},_connectDatepicker:function(target,inst){var input=$(target);inst.append=$([]);inst.trigger=$([]);if(input.hasClass(this.markerClassName)){return}var appendText=this._get(inst,"appendText");var isRTL=this._get(inst,"isRTL");if(appendText){inst.append=$(''+appendText+"");input[isRTL?"before":"after"](inst.append)}var showOn=this._get(inst,"showOn");if(showOn=="focus"||showOn=="both"){input.focus(this._showDatepicker)}if(showOn=="button"||showOn=="both"){var buttonText=this._get(inst,"buttonText");var buttonImage=this._get(inst,"buttonImage");inst.trigger=$(this._get(inst,"buttonImageOnly")?$("").addClass(this._triggerClass).attr({src:buttonImage,alt:buttonText,title:buttonText}):$('').addClass(this._triggerClass).html(buttonImage==""?buttonText:$("").attr({src:buttonImage,alt:buttonText,title:buttonText})));input[isRTL?"before":"after"](inst.trigger);inst.trigger.click(function(){if($.datepicker._datepickerShowing&&$.datepicker._lastInput==target){$.datepicker._hideDatepicker()}else{$.datepicker._showDatepicker(target)}return false})}input.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value}).bind("getData.datepicker",function(event,key){return this._get(inst,key)});$.data(target,PROP_NAME,inst)},_inlineDatepicker:function(target,inst){var divSpan=$(target);if(divSpan.hasClass(this.markerClassName)){return}divSpan.addClass(this.markerClassName).append(inst.dpDiv).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value}).bind("getData.datepicker",function(event,key){return this._get(inst,key)});$.data(target,PROP_NAME,inst);this._setDate(inst,this._getDefaultDate(inst));this._updateDatepicker(inst);this._updateAlternate(inst)},_dialogDatepicker:function(input,dateText,onSelect,settings,pos){var inst=this._dialogInst;if(!inst){var id="dp"+(++this.uuid);this._dialogInput=$('');this._dialogInput.keydown(this._doKeyDown);$("body").append(this._dialogInput);inst=this._dialogInst=this._newInst(this._dialogInput,false);inst.settings={};$.data(this._dialogInput[0],PROP_NAME,inst)}extendRemove(inst.settings,settings||{});this._dialogInput.val(dateText);this._pos=(pos?(pos.length?pos:[pos.pageX,pos.pageY]):null);if(!this._pos){var browserWidth=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;var browserHeight=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;var scrollX=document.documentElement.scrollLeft||document.body.scrollLeft;var scrollY=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[(browserWidth/2)-100+scrollX,(browserHeight/2)-150+scrollY]}this._dialogInput.css("left",this._pos[0]+"px").css("top",this._pos[1]+"px");inst.settings.onSelect=onSelect;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);if($.blockUI){$.blockUI(this.dpDiv)}$.data(this._dialogInput[0],PROP_NAME,inst);return this},_destroyDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();$.removeData(target,PROP_NAME);if(nodeName=="input"){inst.append.remove();inst.trigger.remove();$target.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress)}else{if(nodeName=="div"||nodeName=="span"){$target.removeClass(this.markerClassName).empty()}}},_enableDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();if(nodeName=="input"){target.disabled=false;inst.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else{if(nodeName=="div"||nodeName=="span"){var inline=$target.children("."+this._inlineClass);inline.children().removeClass("ui-state-disabled")}}this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value)})},_disableDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();if(nodeName=="input"){target.disabled=true;inst.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else{if(nodeName=="div"||nodeName=="span"){var inline=$target.children("."+this._inlineClass);inline.children().addClass("ui-state-disabled")}}this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value)});this._disabledInputs[this._disabledInputs.length]=target},_isDisabledDatepicker:function(target){if(!target){return false}for(var i=0;i-1)}},_showDatepicker:function(input){input=input.target||input;if(input.nodeName.toLowerCase()!="input"){input=$("input",input.parentNode)[0]}if($.datepicker._isDisabledDatepicker(input)||$.datepicker._lastInput==input){return}var inst=$.datepicker._getInst(input);var beforeShow=$.datepicker._get(inst,"beforeShow");extendRemove(inst.settings,(beforeShow?beforeShow.apply(input,[input,inst]):{}));$.datepicker._hideDatepicker(null,"");$.datepicker._lastInput=input;$.datepicker._setDateFromField(inst);if($.datepicker._inDialog){input.value=""}if(!$.datepicker._pos){$.datepicker._pos=$.datepicker._findPos(input);$.datepicker._pos[1]+=input.offsetHeight}var isFixed=false;$(input).parents().each(function(){isFixed|=$(this).css("position")=="fixed";return !isFixed});if(isFixed&&$.browser.opera){$.datepicker._pos[0]-=document.documentElement.scrollLeft;$.datepicker._pos[1]-=document.documentElement.scrollTop}var offset={left:$.datepicker._pos[0],top:$.datepicker._pos[1]};$.datepicker._pos=null;inst.rangeStart=null;inst.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});$.datepicker._updateDatepicker(inst);offset=$.datepicker._checkOffset(inst,offset,isFixed);inst.dpDiv.css({position:($.datepicker._inDialog&&$.blockUI?"static":(isFixed?"fixed":"absolute")),display:"none",left:offset.left+"px",top:offset.top+"px"});if(!inst.inline){var showAnim=$.datepicker._get(inst,"showAnim")||"show";var duration=$.datepicker._get(inst,"duration");var postProcess=function(){$.datepicker._datepickerShowing=true;if($.browser.msie&&parseInt($.browser.version,10)<7){$("iframe.ui-datepicker-cover").css({width:inst.dpDiv.width()+4,height:inst.dpDiv.height()+4})}};if($.effects&&$.effects[showAnim]){inst.dpDiv.show(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess)}else{inst.dpDiv[showAnim](duration,postProcess)}if(duration==""){postProcess()}if(inst.input[0].type!="hidden"){inst.input[0].focus()}$.datepicker._curInst=inst}},_updateDatepicker:function(inst){var dims={width:inst.dpDiv.width()+4,height:inst.dpDiv.height()+4};var self=this;inst.dpDiv.empty().append(this._generateHTML(inst)).find("iframe.ui-datepicker-cover").css({width:dims.width,height:dims.height}).end().find("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a").bind("mouseout",function(){$(this).removeClass("ui-state-hover");if(this.className.indexOf("ui-datepicker-prev")!=-1){$(this).removeClass("ui-datepicker-prev-hover")}if(this.className.indexOf("ui-datepicker-next")!=-1){$(this).removeClass("ui-datepicker-next-hover")}}).bind("mouseover",function(){if(!self._isDisabledDatepicker(inst.inline?inst.dpDiv.parent()[0]:inst.input[0])){$(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");$(this).addClass("ui-state-hover");if(this.className.indexOf("ui-datepicker-prev")!=-1){$(this).addClass("ui-datepicker-prev-hover")}if(this.className.indexOf("ui-datepicker-next")!=-1){$(this).addClass("ui-datepicker-next-hover")}}}).end().find("."+this._dayOverClass+" a").trigger("mouseover").end();var numMonths=this._getNumberOfMonths(inst);var cols=numMonths[1];var width=17;if(cols>1){inst.dpDiv.addClass("ui-datepicker-multi-"+cols).css("width",(width*cols)+"em")}else{inst.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("")}inst.dpDiv[(numMonths[0]!=1||numMonths[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");inst.dpDiv[(this._get(inst,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");if(inst.input&&inst.input[0].type!="hidden"&&inst==$.datepicker._curInst){$(inst.input[0]).focus()}},_checkOffset:function(inst,offset,isFixed){var dpWidth=inst.dpDiv.outerWidth();var dpHeight=inst.dpDiv.outerHeight();var inputWidth=inst.input?inst.input.outerWidth():0;var inputHeight=inst.input?inst.input.outerHeight():0;var viewWidth=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)+$(document).scrollLeft();var viewHeight=(window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)+$(document).scrollTop();offset.left-=(this._get(inst,"isRTL")?(dpWidth-inputWidth):0);offset.left-=(isFixed&&offset.left==inst.input.offset().left)?$(document).scrollLeft():0;offset.top-=(isFixed&&offset.top==(inst.input.offset().top+inputHeight))?$(document).scrollTop():0;offset.left-=(offset.left+dpWidth>viewWidth&&viewWidth>dpWidth)?Math.abs(offset.left+dpWidth-viewWidth):0;offset.top-=(offset.top+dpHeight>viewHeight&&viewHeight>dpHeight)?Math.abs(offset.top+dpHeight+inputHeight*2-viewHeight):0;return offset},_findPos:function(obj){while(obj&&(obj.type=="hidden"||obj.nodeType!=1)){obj=obj.nextSibling}var position=$(obj).offset();return[position.left,position.top]},_hideDatepicker:function(input,duration){var inst=this._curInst;if(!inst||(input&&inst!=$.data(input,PROP_NAME))){return}if(inst.stayOpen){this._selectDate("#"+inst.id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear))}inst.stayOpen=false;if(this._datepickerShowing){duration=(duration!=null?duration:this._get(inst,"duration"));var showAnim=this._get(inst,"showAnim");var postProcess=function(){$.datepicker._tidyDialog(inst)};if(duration!=""&&$.effects&&$.effects[showAnim]){inst.dpDiv.hide(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess)}else{inst.dpDiv[(duration==""?"hide":(showAnim=="slideDown"?"slideUp":(showAnim=="fadeIn"?"fadeOut":"hide")))](duration,postProcess)}if(duration==""){this._tidyDialog(inst)}var onClose=this._get(inst,"onClose");if(onClose){onClose.apply((inst.input?inst.input[0]:null),[(inst.input?inst.input.val():""),inst])}this._datepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if($.blockUI){$.unblockUI();$("body").append(this.dpDiv)}}this._inDialog=false}this._curInst=null},_tidyDialog:function(inst){inst.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(event){if(!$.datepicker._curInst){return}var $target=$(event.target);if(($target.parents("#"+$.datepicker._mainDivId).length==0)&&!$target.hasClass($.datepicker.markerClassName)&&!$target.hasClass($.datepicker._triggerClass)&&$.datepicker._datepickerShowing&&!($.datepicker._inDialog&&$.blockUI)){$.datepicker._hideDatepicker(null,"")}},_adjustDate:function(id,offset,period){var target=$(id);var inst=this._getInst(target[0]);if(this._isDisabledDatepicker(target[0])){return}this._adjustInstDate(inst,offset+(period=="M"?this._get(inst,"showCurrentAtPos"):0),period);this._updateDatepicker(inst)},_gotoToday:function(id){var target=$(id);var inst=this._getInst(target[0]);if(this._get(inst,"gotoCurrent")&&inst.currentDay){inst.selectedDay=inst.currentDay;inst.drawMonth=inst.selectedMonth=inst.currentMonth;inst.drawYear=inst.selectedYear=inst.currentYear}else{var date=new Date();inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear()}this._notifyChange(inst);this._adjustDate(target)},_selectMonthYear:function(id,select,period){var target=$(id);var inst=this._getInst(target[0]);inst._selectingMonthYear=false;inst["selected"+(period=="M"?"Month":"Year")]=inst["draw"+(period=="M"?"Month":"Year")]=parseInt(select.options[select.selectedIndex].value,10);this._notifyChange(inst);this._adjustDate(target)},_clickMonthYear:function(id){var target=$(id);var inst=this._getInst(target[0]);if(inst.input&&inst._selectingMonthYear&&!$.browser.msie){inst.input[0].focus()}inst._selectingMonthYear=!inst._selectingMonthYear},_selectDay:function(id,month,year,td){var target=$(id);if($(td).hasClass(this._unselectableClass)||this._isDisabledDatepicker(target[0])){return}var inst=this._getInst(target[0]);inst.selectedDay=inst.currentDay=$("a",td).html();inst.selectedMonth=inst.currentMonth=month;inst.selectedYear=inst.currentYear=year;if(inst.stayOpen){inst.endDay=inst.endMonth=inst.endYear=null}this._selectDate(id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear));if(inst.stayOpen){inst.rangeStart=this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay));this._updateDatepicker(inst)}},_clearDate:function(id){var target=$(id);var inst=this._getInst(target[0]);inst.stayOpen=false;inst.endDay=inst.endMonth=inst.endYear=inst.rangeStart=null;this._selectDate(target,"")},_selectDate:function(id,dateStr){var target=$(id);var inst=this._getInst(target[0]);dateStr=(dateStr!=null?dateStr:this._formatDate(inst));if(inst.input){inst.input.val(dateStr)}this._updateAlternate(inst);var onSelect=this._get(inst,"onSelect");if(onSelect){onSelect.apply((inst.input?inst.input[0]:null),[dateStr,inst])}else{if(inst.input){inst.input.trigger("change")}}if(inst.inline){this._updateDatepicker(inst)}else{if(!inst.stayOpen){this._hideDatepicker(null,this._get(inst,"duration"));this._lastInput=inst.input[0];if(typeof(inst.input[0])!="object"){inst.input[0].focus()}this._lastInput=null}}},_updateAlternate:function(inst){var altField=this._get(inst,"altField");if(altField){var altFormat=this._get(inst,"altFormat")||this._get(inst,"dateFormat");var date=this._getDate(inst);dateStr=this.formatDate(altFormat,date,this._getFormatConfig(inst));$(altField).each(function(){$(this).val(dateStr)})}},noWeekends:function(date){var day=date.getDay();return[(day>0&&day<6),""]},iso8601Week:function(date){var checkDate=new Date(date.getFullYear(),date.getMonth(),date.getDate());var firstMon=new Date(checkDate.getFullYear(),1-1,4);var firstDay=firstMon.getDay()||7;firstMon.setDate(firstMon.getDate()+1-firstDay);if(firstDay<4&&checkDatenew Date(checkDate.getFullYear(),12-1,28)){firstDay=new Date(checkDate.getFullYear()+1,1-1,4).getDay()||7;if(firstDay>4&&(checkDate.getDay()||7)0&&iValue="0"&&value.charAt(iValue)<="9"){num=num*10+parseInt(value.charAt(iValue++),10);size--}if(size==origSize){throw"Missing number at position "+iValue}return num};var getName=function(match,shortNames,longNames){var names=(lookAhead(match)?longNames:shortNames);var size=0;for(var j=0;j0&&iValue-1){month=1;day=doy;do{var dim=this._getDaysInMonth(year,month-1);if(day<=dim){break}month++;day-=dim}while(true)}var date=this._daylightSavingAdjust(new Date(year,month-1,day));if(date.getFullYear()!=year||date.getMonth()+1!=month||date.getDate()!=day){throw"Invalid date"}return date},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TIMESTAMP:"@",W3C:"yy-mm-dd",formatDate:function(format,date,settings){if(!date){return""}var dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort;var dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames;var monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort;var monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames;var lookAhead=function(match){var matches=(iFormat+1=0;m--){doy+=this._getDaysInMonth(date.getFullYear(),m)}output+=formatNumber("o",doy,3);break;case"m":output+=formatNumber("m",date.getMonth()+1,2);break;case"M":output+=formatName("M",date.getMonth(),monthNamesShort,monthNames);break;case"y":output+=(lookAhead("y")?date.getFullYear():(date.getYear()%100<10?"0":"")+date.getYear()%100);break;case"@":output+=date.getTime();break;case"'":if(lookAhead("'")){output+="'"}else{literal=true}break;default:output+=format.charAt(iFormat)}}}}return output},_possibleChars:function(format){var chars="";var literal=false;for(var iFormat=0;iFormatmaxDate?maxDate:date);return date},_determineDate:function(date,defaultDate){var offsetNumeric=function(offset){var date=new Date();date.setDate(date.getDate()+offset);return date};var offsetString=function(offset,getDaysInMonth){var date=new Date();var year=date.getFullYear();var month=date.getMonth();var day=date.getDate();var pattern=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g;var matches=pattern.exec(offset);while(matches){switch(matches[2]||"d"){case"d":case"D":day+=parseInt(matches[1],10);break;case"w":case"W":day+=parseInt(matches[1],10)*7;break;case"m":case"M":month+=parseInt(matches[1],10);day=Math.min(day,getDaysInMonth(year,month));break;case"y":case"Y":year+=parseInt(matches[1],10);day=Math.min(day,getDaysInMonth(year,month));break}matches=pattern.exec(offset)}return new Date(year,month,day)};date=(date==null?defaultDate:(typeof date=="string"?offsetString(date,this._getDaysInMonth):(typeof date=="number"?(isNaN(date)?defaultDate:offsetNumeric(date)):date)));date=(date&&date.toString()=="Invalid Date"?defaultDate:date);if(date){date.setHours(0);date.setMinutes(0);date.setSeconds(0);date.setMilliseconds(0)}return this._daylightSavingAdjust(date)},_daylightSavingAdjust:function(date){if(!date){return null}date.setHours(date.getHours()>12?date.getHours()+2:0);return date},_setDate:function(inst,date,endDate){var clear=!(date);var origMonth=inst.selectedMonth;var origYear=inst.selectedYear;date=this._determineDate(date,new Date());inst.selectedDay=inst.currentDay=date.getDate();inst.drawMonth=inst.selectedMonth=inst.currentMonth=date.getMonth();inst.drawYear=inst.selectedYear=inst.currentYear=date.getFullYear();if(origMonth!=inst.selectedMonth||origYear!=inst.selectedYear){this._notifyChange(inst)}this._adjustInstDate(inst);if(inst.input){inst.input.val(clear?"":this._formatDate(inst))}},_getDate:function(inst){var startDate=(!inst.currentYear||(inst.input&&inst.input.val()=="")?null:this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));return startDate},_generateHTML:function(inst){var today=new Date();today=this._daylightSavingAdjust(new Date(today.getFullYear(),today.getMonth(),today.getDate()));var isRTL=this._get(inst,"isRTL");var showButtonPanel=this._get(inst,"showButtonPanel");var hideIfNoPrevNext=this._get(inst,"hideIfNoPrevNext");var navigationAsDateFormat=this._get(inst,"navigationAsDateFormat");var numMonths=this._getNumberOfMonths(inst);var showCurrentAtPos=this._get(inst,"showCurrentAtPos");var stepMonths=this._get(inst,"stepMonths");var stepBigMonths=this._get(inst,"stepBigMonths");var isMultiMonth=(numMonths[0]!=1||numMonths[1]!=1);var currentDate=this._daylightSavingAdjust((!inst.currentDay?new Date(9999,9,9):new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));var minDate=this._getMinMaxDate(inst,"min",true);var maxDate=this._getMinMaxDate(inst,"max");var drawMonth=inst.drawMonth-showCurrentAtPos;var drawYear=inst.drawYear;if(drawMonth<0){drawMonth+=12;drawYear--}if(maxDate){var maxDraw=this._daylightSavingAdjust(new Date(maxDate.getFullYear(),maxDate.getMonth()-numMonths[1]+1,maxDate.getDate()));maxDraw=(minDate&&maxDrawmaxDraw){drawMonth--;if(drawMonth<0){drawMonth=11;drawYear--}}}inst.drawMonth=drawMonth;inst.drawYear=drawYear;var prevText=this._get(inst,"prevText");prevText=(!navigationAsDateFormat?prevText:this.formatDate(prevText,this._daylightSavingAdjust(new Date(drawYear,drawMonth-stepMonths,1)),this._getFormatConfig(inst)));var prev=(this._canAdjustMonth(inst,-1,drawYear,drawMonth)?''+prevText+"":(hideIfNoPrevNext?"":''+prevText+""));var nextText=this._get(inst,"nextText");nextText=(!navigationAsDateFormat?nextText:this.formatDate(nextText,this._daylightSavingAdjust(new Date(drawYear,drawMonth+stepMonths,1)),this._getFormatConfig(inst)));var next=(this._canAdjustMonth(inst,+1,drawYear,drawMonth)?''+nextText+"":(hideIfNoPrevNext?"":''+nextText+""));var currentText=this._get(inst,"currentText");var gotoDate=(this._get(inst,"gotoCurrent")&&inst.currentDay?currentDate:today);currentText=(!navigationAsDateFormat?currentText:this.formatDate(currentText,gotoDate,this._getFormatConfig(inst)));var controls=(!inst.inline?'":"");var buttonPanel=(showButtonPanel)?'
    '+(isRTL?controls:"")+(this._isInRange(inst,gotoDate)?'":"")+(isRTL?"":controls)+"
    ":"";var firstDay=parseInt(this._get(inst,"firstDay"),10);firstDay=(isNaN(firstDay)?0:firstDay);var dayNames=this._get(inst,"dayNames");var dayNamesShort=this._get(inst,"dayNamesShort");var dayNamesMin=this._get(inst,"dayNamesMin");var monthNames=this._get(inst,"monthNames");var monthNamesShort=this._get(inst,"monthNamesShort");var beforeShowDay=this._get(inst,"beforeShowDay");var showOtherMonths=this._get(inst,"showOtherMonths");var calculateWeek=this._get(inst,"calculateWeek")||this.iso8601Week;var endDate=inst.endDay?this._daylightSavingAdjust(new Date(inst.endYear,inst.endMonth,inst.endDay)):currentDate;var defaultDate=this._getDefaultDate(inst);var html="";for(var row=0;row'+(/all|left/.test(cornerClass)&&row==0?(isRTL?next:prev):"")+(/all|right/.test(cornerClass)&&row==0?(isRTL?prev:next):"")+this._generateMonthYearHeader(inst,drawMonth,drawYear,minDate,maxDate,selectedDate,row>0||col>0,monthNames,monthNamesShort)+'';var thead="";for(var dow=0;dow<7;dow++){var day=(dow+firstDay)%7;thead+="=5?' class="ui-datepicker-week-end"':"")+'>'+dayNamesMin[day]+""}calender+=thead+"";var daysInMonth=this._getDaysInMonth(drawYear,drawMonth);if(drawYear==inst.selectedYear&&drawMonth==inst.selectedMonth){inst.selectedDay=Math.min(inst.selectedDay,daysInMonth)}var leadDays=(this._getFirstDayOfMonth(drawYear,drawMonth)-firstDay+7)%7;var numRows=(isMultiMonth?6:Math.ceil((leadDays+daysInMonth)/7));var printDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,1-leadDays));for(var dRow=0;dRow";var tbody="";for(var dow=0;dow<7;dow++){var daySettings=(beforeShowDay?beforeShowDay.apply((inst.input?inst.input[0]:null),[printDate]):[true,""]);var otherMonth=(printDate.getMonth()!=drawMonth);var unselectable=otherMonth||!daySettings[0]||(minDate&&printDatemaxDate);tbody+='";printDate.setDate(printDate.getDate()+1);printDate=this._daylightSavingAdjust(printDate)}calender+=tbody+""}drawMonth++;if(drawMonth>11){drawMonth=0;drawYear++}calender+="
    =currentDate.getTime()&&printDate.getTime()<=endDate.getTime()?" "+this._currentClass:"")+(printDate.getTime()==today.getTime()?" ui-datepicker-today":""))+'"'+((!otherMonth||showOtherMonths)&&daySettings[2]?' title="'+daySettings[2]+'"':"")+(unselectable?"":" onclick=\"DP_jQuery.datepicker._selectDay('#"+inst.id+"',"+drawMonth+","+drawYear+', this);return false;"')+">"+(otherMonth?(showOtherMonths?printDate.getDate():" "):(unselectable?''+printDate.getDate()+"":'=currentDate.getTime()&&printDate.getTime()<=endDate.getTime()?" ui-state-active":"")+'" href="#">'+printDate.getDate()+""))+"
    "+(isMultiMonth?""+((numMonths[0]>0&&col==numMonths[1]-1)?'
    ':""):"");group+=calender}html+=group}html+=buttonPanel+($.browser.msie&&parseInt($.browser.version,10)<7&&!inst.inline?'':"");inst._keyEvent=false;return html},_generateMonthYearHeader:function(inst,drawMonth,drawYear,minDate,maxDate,selectedDate,secondary,monthNames,monthNamesShort){minDate=(inst.rangeStart&&minDate&&selectedDate "}else{var inMinYear=(minDate&&minDate.getFullYear()==drawYear);var inMaxYear=(maxDate&&maxDate.getFullYear()==drawYear);monthHtml+='"}if(!showMonthAfterYear){html+=monthHtml+((secondary||changeMonth||changeYear)&&(!(changeMonth&&changeYear))?" ":"")}if(secondary||!changeYear){html+=''+drawYear+""}else{var years=this._get(inst,"yearRange").split(":");var year=0;var endYear=0;if(years.length!=2){year=drawYear-10;endYear=drawYear+10}else{if(years[0].charAt(0)=="+"||years[0].charAt(0)=="-"){year=drawYear+parseInt(years[0],10);endYear=drawYear+parseInt(years[1],10)}else{year=parseInt(years[0],10);endYear=parseInt(years[1],10)}}year=(minDate?Math.max(year,minDate.getFullYear()):year);endYear=(maxDate?Math.min(endYear,maxDate.getFullYear()):endYear);html+='"}if(showMonthAfterYear){html+=(secondary||changeMonth||changeYear?" ":"")+monthHtml}html+="";return html},_adjustInstDate:function(inst,offset,period){var year=inst.drawYear+(period=="Y"?offset:0);var month=inst.drawMonth+(period=="M"?offset:0);var day=Math.min(inst.selectedDay,this._getDaysInMonth(year,month))+(period=="D"?offset:0);var date=this._daylightSavingAdjust(new Date(year,month,day));var minDate=this._getMinMaxDate(inst,"min",true);var maxDate=this._getMinMaxDate(inst,"max");date=(minDate&&datemaxDate?maxDate:date);inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();if(period=="M"||period=="Y"){this._notifyChange(inst)}},_notifyChange:function(inst){var onChange=this._get(inst,"onChangeMonthYear");if(onChange){onChange.apply((inst.input?inst.input[0]:null),[inst.selectedYear,inst.selectedMonth+1,inst])}},_getNumberOfMonths:function(inst){var numMonths=this._get(inst,"numberOfMonths");return(numMonths==null?[1,1]:(typeof numMonths=="number"?[1,numMonths]:numMonths))},_getMinMaxDate:function(inst,minMax,checkRange){var date=this._determineDate(this._get(inst,minMax+"Date"),null);return(!checkRange||!inst.rangeStart?date:(!date||inst.rangeStart>date?inst.rangeStart:date))},_getDaysInMonth:function(year,month){return 32-new Date(year,month,32).getDate()},_getFirstDayOfMonth:function(year,month){return new Date(year,month,1).getDay()},_canAdjustMonth:function(inst,offset,curYear,curMonth){var numMonths=this._getNumberOfMonths(inst);var date=this._daylightSavingAdjust(new Date(curYear,curMonth+(offset<0?offset:numMonths[1]),1));if(offset<0){date.setDate(this._getDaysInMonth(date.getFullYear(),date.getMonth()))}return this._isInRange(inst,date)},_isInRange:function(inst,date){var newMinDate=(!inst.rangeStart?null:this._daylightSavingAdjust(new Date(inst.selectedYear,inst.selectedMonth,inst.selectedDay)));newMinDate=(newMinDate&&inst.rangeStart=minDate)&&(!maxDate||date<=maxDate))},_getFormatConfig:function(inst){var shortYearCutoff=this._get(inst,"shortYearCutoff");shortYearCutoff=(typeof shortYearCutoff!="string"?shortYearCutoff:new Date().getFullYear()%100+parseInt(shortYearCutoff,10));return{shortYearCutoff:shortYearCutoff,dayNamesShort:this._get(inst,"dayNamesShort"),dayNames:this._get(inst,"dayNames"),monthNamesShort:this._get(inst,"monthNamesShort"),monthNames:this._get(inst,"monthNames")}},_formatDate:function(inst,day,month,year){if(!day){inst.currentDay=inst.selectedDay;inst.currentMonth=inst.selectedMonth;inst.currentYear=inst.selectedYear}var date=(day?(typeof day=="object"?day:this._daylightSavingAdjust(new Date(year,month,day))):this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));return this.formatDate(this._get(inst,"dateFormat"),date,this._getFormatConfig(inst))}});function extendRemove(target,props){$.extend(target,props);for(var name in props){if(props[name]==null||props[name]==undefined){target[name]=props[name]}}return target}function isArray(a){return(a&&(($.browser.safari&&typeof a=="object"&&a.length)||(a.constructor&&a.constructor.toString().match(/\Array\(\)/))))}$.fn.datepicker=function(options){if(!$.datepicker.initialized){$(document).mousedown($.datepicker._checkExternalClick).find("body").append($.datepicker.dpDiv);$.datepicker.initialized=true}var otherArgs=Array.prototype.slice.call(arguments,1);if(typeof options=="string"&&(options=="isDisabled"||options=="getDate")){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs))}if(options=="option"&&arguments.length==2&&typeof arguments[1]=="string"){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs))}return this.each(function(){typeof options=="string"?$.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this].concat(otherArgs)):$.datepicker._attachDatepicker(this,options)})};$.datepicker=new Datepicker();$.datepicker.initialized=false;$.datepicker.uuid=new Date().getTime();$.datepicker.version="1.7.2";window.DP_jQuery=$})(jQuery);;/* + * jQuery UI Progressbar 1.7.2 + * + * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Progressbar + * + * Depends: + * ui.core.js + */ +(function(a){a.widget("ui.progressbar",{_init:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this._valueMin(),"aria-valuemax":this._valueMax(),"aria-valuenow":this._value()});this.valueDiv=a('
    ').appendTo(this.element);this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow").removeData("progressbar").unbind(".progressbar");this.valueDiv.remove();a.widget.prototype.destroy.apply(this,arguments)},value:function(b){if(b===undefined){return this._value()}this._setData("value",b);return this},_setData:function(b,c){switch(b){case"value":this.options.value=c;this._refreshValue();this._trigger("change",null,{});break}a.widget.prototype._setData.apply(this,arguments)},_value:function(){var b=this.options.value;if(bthis._valueMax()){b=this._valueMax()}return b},_valueMin:function(){var b=0;return b},_valueMax:function(){var b=100;return b},_refreshValue:function(){var b=this.value();this.valueDiv[b==this._valueMax()?"addClass":"removeClass"]("ui-corner-right");this.valueDiv.width(b+"%");this.element.attr("aria-valuenow",b)}});a.extend(a.ui.progressbar,{version:"1.7.2",defaults:{value:0}})})(jQuery);;/* + * jQuery UI Effects 1.7.2 + * + * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Effects/ + */ +jQuery.effects||(function(d){d.effects={version:"1.7.2",save:function(g,h){for(var f=0;f');var j=f.parent();if(f.css("position")=="static"){j.css({position:"relative"});f.css({position:"relative"})}else{var i=f.css("top");if(isNaN(parseInt(i,10))){i="auto"}var h=f.css("left");if(isNaN(parseInt(h,10))){h="auto"}j.css({position:f.css("position"),top:i,left:h,zIndex:f.css("z-index")}).show();f.css({position:"relative",top:0,left:0})}j.css(g);return j},removeWrapper:function(f){if(f.parent().is(".ui-effects-wrapper")){return f.parent().replaceWith(f)}return f},setTransition:function(g,i,f,h){h=h||{};d.each(i,function(k,j){unit=g.cssUnit(j);if(unit[0]>0){h[j]=unit[0]*f+unit[1]}});return h},animateClass:function(h,i,k,j){var f=(typeof k=="function"?k:(j?j:null));var g=(typeof k=="string"?k:null);return this.each(function(){var q={};var o=d(this);var p=o.attr("style")||"";if(typeof p=="object"){p=p.cssText}if(h.toggle){o.hasClass(h.toggle)?h.remove=h.toggle:h.add=h.toggle}var l=d.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(h.add){o.addClass(h.add)}if(h.remove){o.removeClass(h.remove)}var m=d.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(h.add){o.removeClass(h.add)}if(h.remove){o.addClass(h.remove)}for(var r in m){if(typeof m[r]!="function"&&m[r]&&r.indexOf("Moz")==-1&&r.indexOf("length")==-1&&m[r]!=l[r]&&(r.match(/color/i)||(!r.match(/color/i)&&!isNaN(parseInt(m[r],10))))&&(l.position!="static"||(l.position=="static"&&!r.match(/left|top|bottom|right/)))){q[r]=m[r]}}o.animate(q,i,g,function(){if(typeof d(this).attr("style")=="object"){d(this).attr("style")["cssText"]="";d(this).attr("style")["cssText"]=p}else{d(this).attr("style",p)}if(h.add){d(this).addClass(h.add)}if(h.remove){d(this).removeClass(h.remove)}if(f){f.apply(this,arguments)}})})}};function c(g,f){var i=g[1]&&g[1].constructor==Object?g[1]:{};if(f){i.mode=f}var h=g[1]&&g[1].constructor!=Object?g[1]:(i.duration?i.duration:g[2]);h=d.fx.off?0:typeof h==="number"?h:d.fx.speeds[h]||d.fx.speeds._default;var j=i.callback||(d.isFunction(g[1])&&g[1])||(d.isFunction(g[2])&&g[2])||(d.isFunction(g[3])&&g[3]);return[g[0],i,h,j]}d.fn.extend({_show:d.fn.show,_hide:d.fn.hide,__toggle:d.fn.toggle,_addClass:d.fn.addClass,_removeClass:d.fn.removeClass,_toggleClass:d.fn.toggleClass,effect:function(g,f,h,i){return d.effects[g]?d.effects[g].call(this,{method:g,options:f||{},duration:h,callback:i}):null},show:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))){return this._show.apply(this,arguments)}else{return this.effect.apply(this,c(arguments,"show"))}},hide:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))){return this._hide.apply(this,arguments)}else{return this.effect.apply(this,c(arguments,"hide"))}},toggle:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))||(d.isFunction(arguments[0])||typeof arguments[0]=="boolean")){return this.__toggle.apply(this,arguments)}else{return this.effect.apply(this,c(arguments,"toggle"))}},addClass:function(g,f,i,h){return f?d.effects.animateClass.apply(this,[{add:g},f,i,h]):this._addClass(g)},removeClass:function(g,f,i,h){return f?d.effects.animateClass.apply(this,[{remove:g},f,i,h]):this._removeClass(g)},toggleClass:function(g,f,i,h){return((typeof f!=="boolean")&&f)?d.effects.animateClass.apply(this,[{toggle:g},f,i,h]):this._toggleClass(g,f)},morph:function(f,h,g,j,i){return d.effects.animateClass.apply(this,[{add:h,remove:f},g,j,i])},switchClass:function(){return this.morph.apply(this,arguments)},cssUnit:function(f){var g=this.css(f),h=[];d.each(["em","px","%","pt"],function(j,k){if(g.indexOf(k)>0){h=[parseFloat(g),k]}});return h}});d.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","outlineColor"],function(g,f){d.fx.step[f]=function(h){if(h.state==0){h.start=e(h.elem,f);h.end=b(h.end)}h.elem.style[f]="rgb("+[Math.max(Math.min(parseInt((h.pos*(h.end[0]-h.start[0]))+h.start[0],10),255),0),Math.max(Math.min(parseInt((h.pos*(h.end[1]-h.start[1]))+h.start[1],10),255),0),Math.max(Math.min(parseInt((h.pos*(h.end[2]-h.start[2]))+h.start[2],10),255),0)].join(",")+")"}});function b(g){var f;if(g&&g.constructor==Array&&g.length==3){return g}if(f=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(g)){return[parseInt(f[1],10),parseInt(f[2],10),parseInt(f[3],10)]}if(f=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(g)){return[parseFloat(f[1])*2.55,parseFloat(f[2])*2.55,parseFloat(f[3])*2.55]}if(f=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(g)){return[parseInt(f[1],16),parseInt(f[2],16),parseInt(f[3],16)]}if(f=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(g)){return[parseInt(f[1]+f[1],16),parseInt(f[2]+f[2],16),parseInt(f[3]+f[3],16)]}if(f=/rgba\(0, 0, 0, 0\)/.exec(g)){return a.transparent}return a[d.trim(g).toLowerCase()]}function e(h,f){var g;do{g=d.curCSS(h,f);if(g!=""&&g!="transparent"||d.nodeName(h,"body")){break}f="backgroundColor"}while(h=h.parentNode);return b(g)}var a={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]};d.easing.jswing=d.easing.swing;d.extend(d.easing,{def:"easeOutQuad",swing:function(g,h,f,j,i){return d.easing[d.easing.def](g,h,f,j,i)},easeInQuad:function(g,h,f,j,i){return j*(h/=i)*h+f},easeOutQuad:function(g,h,f,j,i){return -j*(h/=i)*(h-2)+f},easeInOutQuad:function(g,h,f,j,i){if((h/=i/2)<1){return j/2*h*h+f}return -j/2*((--h)*(h-2)-1)+f},easeInCubic:function(g,h,f,j,i){return j*(h/=i)*h*h+f},easeOutCubic:function(g,h,f,j,i){return j*((h=h/i-1)*h*h+1)+f},easeInOutCubic:function(g,h,f,j,i){if((h/=i/2)<1){return j/2*h*h*h+f}return j/2*((h-=2)*h*h+2)+f},easeInQuart:function(g,h,f,j,i){return j*(h/=i)*h*h*h+f},easeOutQuart:function(g,h,f,j,i){return -j*((h=h/i-1)*h*h*h-1)+f},easeInOutQuart:function(g,h,f,j,i){if((h/=i/2)<1){return j/2*h*h*h*h+f}return -j/2*((h-=2)*h*h*h-2)+f},easeInQuint:function(g,h,f,j,i){return j*(h/=i)*h*h*h*h+f},easeOutQuint:function(g,h,f,j,i){return j*((h=h/i-1)*h*h*h*h+1)+f},easeInOutQuint:function(g,h,f,j,i){if((h/=i/2)<1){return j/2*h*h*h*h*h+f}return j/2*((h-=2)*h*h*h*h+2)+f},easeInSine:function(g,h,f,j,i){return -j*Math.cos(h/i*(Math.PI/2))+j+f},easeOutSine:function(g,h,f,j,i){return j*Math.sin(h/i*(Math.PI/2))+f},easeInOutSine:function(g,h,f,j,i){return -j/2*(Math.cos(Math.PI*h/i)-1)+f},easeInExpo:function(g,h,f,j,i){return(h==0)?f:j*Math.pow(2,10*(h/i-1))+f},easeOutExpo:function(g,h,f,j,i){return(h==i)?f+j:j*(-Math.pow(2,-10*h/i)+1)+f},easeInOutExpo:function(g,h,f,j,i){if(h==0){return f}if(h==i){return f+j}if((h/=i/2)<1){return j/2*Math.pow(2,10*(h-1))+f}return j/2*(-Math.pow(2,-10*--h)+2)+f},easeInCirc:function(g,h,f,j,i){return -j*(Math.sqrt(1-(h/=i)*h)-1)+f},easeOutCirc:function(g,h,f,j,i){return j*Math.sqrt(1-(h=h/i-1)*h)+f},easeInOutCirc:function(g,h,f,j,i){if((h/=i/2)<1){return -j/2*(Math.sqrt(1-h*h)-1)+f}return j/2*(Math.sqrt(1-(h-=2)*h)+1)+f},easeInElastic:function(g,i,f,m,l){var j=1.70158;var k=0;var h=m;if(i==0){return f}if((i/=l)==1){return f+m}if(!k){k=l*0.3}if(h").css({position:"absolute",visibility:"visible",left:-d*(g/e),top:-f*(c/k)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:g/e,height:c/k,left:l.left+d*(g/e)+(b.options.mode=="show"?(d-Math.floor(e/2))*(g/e):0),top:l.top+f*(c/k)+(b.options.mode=="show"?(f-Math.floor(k/2))*(c/k):0),opacity:b.options.mode=="show"?0:1}).animate({left:l.left+d*(g/e)+(b.options.mode=="show"?0:(d-Math.floor(e/2))*(g/e)),top:l.top+f*(c/k)+(b.options.mode=="show"?0:(f-Math.floor(k/2))*(c/k)),opacity:b.options.mode=="show"?1:0},b.duration||500)}}setTimeout(function(){b.options.mode=="show"?h.css({visibility:"visible"}):h.css({visibility:"visible"}).hide();if(b.callback){b.callback.apply(h[0])}h.dequeue();a("div.ui-effects-explode").remove()},b.duration||500)})}})(jQuery);;/* + * jQuery UI Effects Fold 1.7.2 + * + * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Effects/Fold + * + * Depends: + * effects.core.js + */ +(function(a){a.effects.fold=function(b){return this.queue(function(){var e=a(this),k=["position","top","left"];var h=a.effects.setMode(e,b.options.mode||"hide");var o=b.options.size||15;var n=!(!b.options.horizFirst);var g=b.duration?b.duration/2:a.fx.speeds._default/2;a.effects.save(e,k);e.show();var d=a.effects.createWrapper(e).css({overflow:"hidden"});var i=((h=="show")!=n);var f=i?["width","height"]:["height","width"];var c=i?[d.width(),d.height()]:[d.height(),d.width()];var j=/([0-9]+)%/.exec(o);if(j){o=parseInt(j[1],10)/100*c[h=="hide"?0:1]}if(h=="show"){d.css(n?{height:0,width:o}:{height:o,width:0})}var m={},l={};m[f[0]]=h=="show"?c[0]:o;l[f[1]]=h=="show"?c[1]:0;d.animate(m,g,b.options.easing).animate(l,g,b.options.easing,function(){if(h=="hide"){e.hide()}a.effects.restore(e,k);a.effects.removeWrapper(e);if(b.callback){b.callback.apply(e[0],arguments)}e.dequeue()})})}})(jQuery);;/* + * jQuery UI Effects Highlight 1.7.2 + * + * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Effects/Highlight + * + * Depends: + * effects.core.js + */ +(function(a){a.effects.highlight=function(b){return this.queue(function(){var e=a(this),d=["backgroundImage","backgroundColor","opacity"];var h=a.effects.setMode(e,b.options.mode||"show");var c=b.options.color||"#ffff99";var g=e.css("backgroundColor");a.effects.save(e,d);e.show();e.css({backgroundImage:"none",backgroundColor:c});var f={backgroundColor:g};if(h=="hide"){f.opacity=0}e.animate(f,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){if(h=="hide"){e.hide()}a.effects.restore(e,d);if(h=="show"&&a.browser.msie){this.style.removeAttribute("filter")}if(b.callback){b.callback.apply(this,arguments)}e.dequeue()}})})}})(jQuery);;/* + * jQuery UI Effects Pulsate 1.7.2 + * + * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Effects/Pulsate + * + * Depends: + * effects.core.js + */ +(function(a){a.effects.pulsate=function(b){return this.queue(function(){var d=a(this);var g=a.effects.setMode(d,b.options.mode||"show");var f=b.options.times||5;var e=b.duration?b.duration/2:a.fx.speeds._default/2;if(g=="hide"){f--}if(d.is(":hidden")){d.css("opacity",0);d.show();d.animate({opacity:1},e,b.options.easing);f=f-2}for(var c=0;c').appendTo(document.body).addClass(b.options.className).css({top:d.top,left:d.left,height:f.innerHeight(),width:f.innerWidth(),position:"absolute"}).animate(g,b.duration,b.options.easing,function(){c.remove();(b.callback&&b.callback.apply(f[0],arguments));f.dequeue()})})}})(jQuery);; \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/manifest --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/event-calendar/manifest Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,59 @@ +eventcalendar3/addEvent.js +eventcalendar3/admin.css +eventcalendar3/admin.php +eventcalendar3/css/calendar-blue.css +eventcalendar3/date.php +eventcalendar3/day.php +eventcalendar3/ec3.css +eventcalendar3/ec3.js +eventcalendar3/ec_load.gif +eventcalendar3/ec.png +eventcalendar3/edit_form.js +eventcalendar3/eventcalendar3.php +eventcalendar3/gettext/ec3-ca_ES.mo +eventcalendar3/gettext/ec3-ca_ES.po +eventcalendar3/gettext/ec3-de_DE.mo +eventcalendar3/gettext/ec3-de_DE.po +eventcalendar3/gettext/ec3-dk_DK.mo +eventcalendar3/gettext/ec3-dk_DK.po +eventcalendar3/gettext/ec3-es_ES.mo +eventcalendar3/gettext/ec3-es_ES.po +eventcalendar3/gettext/ec3-fi_FI.mo +eventcalendar3/gettext/ec3-fi_FI.po +eventcalendar3/gettext/ec3-fr_FR.mo +eventcalendar3/gettext/ec3-fr_FR.po +eventcalendar3/gettext/ec3-it_IT.mo +eventcalendar3/gettext/ec3-it_IT.po +eventcalendar3/gettext/ec3-mk_MK.mo +eventcalendar3/gettext/ec3-mk_MK.po +eventcalendar3/gettext/ec3-nb_NO.mo +eventcalendar3/gettext/ec3-nb_NO.po +eventcalendar3/gettext/ec3-nl_NL.mo +eventcalendar3/gettext/ec3-nl_NL.po +eventcalendar3/gettext/ec3-pt_BR.mo +eventcalendar3/gettext/ec3-pt_BR.po +eventcalendar3/gettext/ec3-sv_SE.mo +eventcalendar3/gettext/ec3-sv_SE.po +eventcalendar3/gettext/ec3-tr_TR.mo +eventcalendar3/gettext/ec3-tr_TR.po +eventcalendar3/gettext/ec3.pot +eventcalendar3/gettext/pot.sed +eventcalendar3/js/calendar-en.js +eventcalendar3/js/calendar.js +eventcalendar3/js/calendar-setup.js +eventcalendar3/K2/ec3_sidebar_module.php +eventcalendar3/K2/readme.txt +eventcalendar3/LICENSE +eventcalendar3/Makefile +eventcalendar3/options.php +eventcalendar3/popup.js +eventcalendar3/publish.gif +eventcalendar3/readme.txt +eventcalendar3/shadow0.png +eventcalendar3/shadow1.png +eventcalendar3/shadow2.png +eventcalendar3/template-functions.php +eventcalendar3/TODO.txt +eventcalendar3/tz.php +eventcalendar3/widget.php +eventcalendar3/xmlhttprequest.js diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/options.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/event-calendar/options.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,281 @@ +myfiles=get_option('siteurl').'/wp-content/plugins/'.$mydir; + $this->schedule=$table_prefix.$this->schedule; // table name + + // wp_version < 2.0 + if(ereg('^1[.]',$wp_version)) + { + $this->wp_user_nicename='user_nickname'; + $this->wp_have_dbx=false; + } + // wp_version < 2.1 + if(ereg('^(1[.]|2[.]0)',$wp_version)) + { + $this->wp_in_category='category-'; + } + // wp_version < 2.3 + if(ereg('^(1[.]|2[.][012])',$wp_version)) + { + $this->wp_have_categories=true; + } + + $this->read_event_category(); + $this->read_show_only_events(); + $this->read_num_months(); + $this->read_day_length(); + $this->read_hide_logo(); + $this->read_hide_event_box(); + $this->read_advanced(); + $this->read_navigation(); + $this->read_disable_popups(); + $this->read_tz(); + } + + function reset_query() + { + $this->is_listing=false; + $this->is_date_range=false; + $this->is_today=false; + $this->days=false; + $this->range_from=false; + $this->range_before=false; + $this->join_ec3_sch=false; + $this->join_only_active_events=false; + $this->order_by_start=false; + } + + // READ functions + function read_event_category() + { + $this->event_category=intval( get_option('ec3_event_category') ); + } + function read_show_only_events() + { + $this->show_only_events=intval(get_option('ec3_show_only_events')); + } + function read_num_months() + { + $this->num_months =abs(intval(get_option('ec3_num_months'))); + if(!$this->num_months) + $this->num_months=1; + } + function read_day_length() + { + $this->day_length=intval(get_option('ec3_day_length')); + if($this->day_length==0) + $this->day_length=1; + } + function read_hide_logo() + { + $this->hide_logo=intval(get_option('ec3_hide_logo')); + } + function read_hide_event_box() + { + $this->hide_event_box=intval(get_option('ec3_hide_event_box')); + } + function read_advanced() + { + $this->advanced=intval(get_option('ec3_advanced')); + // Sometimes we want to play around with the value of advanced. + // 'advanced_setting' ALWAYS holds the REAL value. + $this->advanced_setting=$this->advanced; + } + function read_navigation() + { + $this->navigation=intval(get_option('ec3_navigation')); + } + function read_disable_popups() + { + $this->disable_popups=intval(get_option('ec3_disable_popups')); + } + function read_tz() + { + $this->tz = get_option('ec3_tz'); + if(empty($this->tz) || $this->tz=='wordpress') + { + // Use WordPress default (doesn't understand daylight saving time). + $gmt_offset=-intval(get_option('gmt_offset')); + $this->tz='UTC'; + if($gmt_offset>0) + $this->tz.='+'.$gmt_offset; + elseif($gmt_offset<0) + $this->tz.=$gmt_offset; + } + } + + // SET functions + function set_event_category($val) + { + if($this->event_category!=$val) + { + update_option('ec3_event_category',$val); + $this->read_event_category(); + } + } + function set_show_only_events($val) + { + if($this->show_only_events!=$val) + { + update_option('ec3_show_only_events',$val); + $this->read_show_only_events(); + } + } + function set_num_months($val) + { + if($this->num_months!=$val) + { + update_option('ec3_num_months',$val); + $this->read_num_months(); + } + } + function set_day_length($val) + { + if($this->day_length!=$val) + { + update_option('ec3_day_length',$val); + $this->read_day_length(); + } + } + function set_hide_logo($val) + { + if($this->hide_logo!=$val) + { + update_option('ec3_hide_logo',$val); + $this->read_hide_logo(); + } + } + function set_hide_event_box($val) + { + if($this->hide_event_box!=$val) + { + update_option('ec3_hide_event_box',$val); + $this->read_hide_event_box(); + } + } + function set_advanced($val) + { + if($this->advanced_setting!=$val) + { + update_option('ec3_advanced',$val); + } + // read_advanced() does some special magic, so we always call it. + $this->read_advanced(); + } + function set_navigation($val) + { + if($this->navigation!=$val) + { + update_option('ec3_navigation',$val); + $this->read_navigation(); + } + } + function set_disable_popups($val) + { + if($this->disable_popups!=$val) + { + update_option('ec3_disable_popups',$val); + $this->read_disable_popups(); + } + } + function set_tz($val) + { + if(!preg_match('/(WordPress|[_a-zA-Z\/]+)/',$val)) + return; + if($this->tz!=$val) + { + update_option('ec3_tz',$val); + $this->read_tz(); + } + } +} // end class ec3_Options + + +/** Singleton instance of ec3_Options. */ +$ec3=new ec3_Options(); + + +?> diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/popup.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/event-calendar/popup.js Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,216 @@ +/* EventCalendar. Copyright (C) 2005, Alex Tingle. $Revision: 65 $ + * This file is licensed under the GNU GPL. See LICENSE file for details. + */ + +/** class ec3_Popup */ +function ec3_Popup() +{ + + WindowOnload( function() + { + var calendars=ec3.get_calendars(); + if(!calendars) + return; + // Pre-load images. + ec3.imgShadow0=new Image(8,32); + ec3.imgShadow1=new Image(500,16); + ec3.imgShadow2=new Image(8,32); + ec3.imgShadow0.src=ec3.myfiles+'/shadow0.png'; + ec3.imgShadow1.src=ec3.myfiles+'/shadow1.png'; + ec3.imgShadow2.src=ec3.myfiles+'/shadow2.png'; + + // Generate the popup (but keep it hidden). + var table,tbody,tr,td; + ec3_Popup.popup=document.createElement('table'); + ec3_Popup.popup.style.display='none'; + ec3_Popup.popup.id='ec3_popup'; + ec3_Popup.popup.className='ec3_popup'; + tbody=ec3_Popup.popup.appendChild( document.createElement('tbody') ); + tr=tbody.appendChild( document.createElement('tr') ); + td=tr.appendChild( document.createElement('td') ); + td.id='ec3_shadow0'; + td.rowSpan=2; + td.appendChild( document.createElement('div') ); + td=tr.appendChild( document.createElement('td') ); + ec3_Popup.contents=td.appendChild( document.createElement('table') ); + ec3_Popup.contents.style.width=500; + td=tr.appendChild( document.createElement('td') ); + td.id='ec3_shadow2'; + td.rowSpan=2; + td.appendChild( document.createElement('div') ); + tr=tbody.appendChild( document.createElement('tr') ); + td=tr.appendChild( document.createElement('td') ); + td.id='ec3_shadow1'; + + document.body.appendChild(ec3_Popup.popup); + + // Add event handlers to the calendars. + for(var i=0; i is now set to false + //===================================================================== + function addEvent(obj, evType, fn){ + if(obj.addEventListener){ + obj.addEventListener(evType, fn, false); + return true; + } else if (obj.attachEvent){ + var r = obj.attachEvent('on'+evType, fn); + return r; + } else { + return false; + } + } + + //===================================================================== + // From http://www.quirksmode.org/ + //===================================================================== + function findPosX(obj) + { + var curleft = 0; + if (obj.offsetParent) + { + while(1) + { + curleft += obj.offsetLeft; + if(!obj.offsetParent) break; + obj = obj.offsetParent; + } + } + else if (obj.x) + curleft += obj.x; + return curleft; + } + + function findPosY(obj) + { + var curtop = 0; + if (obj.offsetParent) + { + while(1) + { + curtop += obj.offsetTop; + if(!obj.offsetParent) break; + obj = obj.offsetParent; + } + } + else if (obj.y) + curtop += obj.y; + return curtop; + } + +} // end namespace ec3_Popup + +// Export public functions from ec3_Popup namespace. +ec3_Popup(); diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/publish.gif Binary file web/wp-content/plugins/event-calendar/publish.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/readme.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/event-calendar/readme.txt Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,183 @@ +=== Event Calendar 3 === +Tags: calendar, event, events, vcalendar, icalendar, ical, ajax, widget, sidebar +Stable tag: 3.1.4 +Contributors: Alex Tingle +Donate link: http://www.amazon.co.uk/gp/registry/1S44DP6XXOFIN +Requires at least: 1.5 +Tested up to: 2.7 + +Manage future events as an online calendar. Display upcoming events in a dynamic +calendar, on a listings page, or as a list in the sidebar. + + +== Description == + +Manage future events as an online calendar. Display upcoming events in a dynamic +calendar, on a listings page, or as a list in the sidebar. You can subscribe to +the calendar from iCal (OSX) or Sunbird. + +Choose one WordPress category as the 'event' category, and then add posts for +dates in the future. Add the calendar or event list functions to your template, +or just use the 'Event Category' page to list your forthcoming events. + +EventCalendar works fine with WordPress v2. It should also work with WordPress +v1.5. Reports of successes and failures are most welcome. + + [Full Documentation](http://wpcal.firetree.net) + + +== Installation == + +Before you start, make sure that you have at least MySQL v4. + += 1. Upload to your plugins folder, usually `wp-content/plugins/` = + +The plugin is in the form of a directory called 'eventcalendar3'. + += 2. Activate the plugin on the plugin screen. = + +Don't try to view your blog yet. First you must... + += 3. Change settings on the "Options > Event Calendar" options screen. = + +You must choose which WordPress category to use for events. (Viewing the +options screen for the first time also sets up the database, and upgrades +events from older versions of EventCalendar.) + + [Details](http://wpcal.firetree.net/options) + += 4. Add the Event Calendar or Upcoming Events list to your sidebar. = + +If you use the WordPress Widgets, then the Event Calendar is available as an +easy to install widget. In order to use it you must first activate the 'Event +Calendar Widget' plugin. + +If you use the K2 template then the Event Calendar is available as a sidebar +module. + +Otherwise, you need to make a small adition to your template. Add the +following code to your sidebar.php: + + Event Calendar: +
  • + +
  • + + Upcoming Events: +
  • Events + +
  • + +If you are using an older template, then you should check that your HTML +header contains the following tag: `` + +Caution: The Event Calendar must be unique. If you try to show more than one +calendar on a page, then only the first will be displayed. + + [Details](http://wpcal.firetree.net/template-functions) + + +== How to make an Event Post == + +An event post is a normal blog post, with one or more attached events. On the +'Write Post' page, scroll down and you will see the 'Event Editor'. You might +need to click the little '+' in its blue bar, to see the controls. + +To start with, you will only see the column headings (Start, End and All Day) +and the '+' - add event button. Click '+' to add a new event. + +The event will start and end on the next full hour. To set the start date, click +on the '...' button, next to the start time. A popup calendar will appear. + +Select the new start date by clicking on the calendar. Optionally you can change +the time by clicking on the popup's time and dragging. Click on the 'X' to +dismiss the popup. + +You can also edit the date and time in the normal way, by clicking on the +numbers and changing them with the keyboard. If you edit the date manually like +this, make sure that you keep to the correct format: + YEAR-MONTH-DATE 24-HOURS:MINUTES + +Example: An event is scheduled from 2-4pm on 14th August, 2006. + + Start: 2006-08-14 14:00:00 + End: 2006-08-14 16:00:00 + +When you change the 'Start' field, the 'End' field updates automatically, so +that the event's duration remains the same. If you want to change the duration, +then edit the 'End' field, just as you did for the 'Start'. + +If you tick the 'All Day' checkbox, then the times are ignored - the event goes +on through the whole day. You can make the event span over more than one day if +you wish. You can also add more scheduled times for the same post. Just click +the '+' button to add more lines. + +To remove an event, click on the '-' button. + +When you've finished editing your events, just Save the post in the normal way. + + +== New Features in v3.1 == + +This is a significant re-write. Event dates are now kept in their own table, +so they are separate from the post date. There is a new Ajax interface on the +post edit screen that allows you to set the event date. + + o Event dates are shown in their own little box at the beginning of event + posts. + + o Multi-day events are now supported. + + o Timezones are properly supported, so eveything works properly for those + unforturnate people who don't live in the GMT timezone. + + o Translations are now available in the following languages: + + ca_ES Catalan (by Vicent Cubells) + cs_CZ Czech (by Michal Franek) + de_DE German (by Marc Schumann) + dk_DK Danish (by Simon Bognolo) + es_ES Spanish (by Maira Belmonte) + fi_FI Finnish (by Ralf Strandell) + fr_FR French (by Davy Morel & Jérôme aka Comme une image) + hu_HU Hungarian (by Elbandi) + it_IT Italian (by Jimmi) + mk_MK Macedonian (by Vanco Ordanoski) + nb_NO Norwegian (by Realf Ording Helgesen) + nl_NL Dutch (by Gerjan Boer & P. Mathijssen) + pt_BR Portuguese (Brazil) (by DJ Spark) + ro_RO Romanian (by Sushkov Stanislav) + ru_RU Russian (by Ivan Matveyev) + sl_SI Slovenian (by Damjan Gerli) + sv_SE Swedish (by Anders Laurin) + tr_TR Turkish (by Firat Cem Tezer & Roman Neumüller) + + If you would like to make a new translation, then just make a copy of the + file getttext/ec3.pot, and add your translated text. You can use the existing + .po files as an example. Post your file to the + [mailing list](http://penguin.firetree.net/eventcalendar) and we'll add it + into the project. + + +== Screenshots == + +1. The (AJAX) Event Calendar and Upcoming Events widets. + +2. The AJAX Event Calendar has nicely formatted popups. + +3. The Event Editor on the Write Post page. + +4. Event Calendar options page. + + +== Planned features == + +Some enhancements haven't made it into this release, but they are planned for +the future. Look in the file TODO.txt for details. + + +== Note: == + +Copyright (c) 2005-2008 Alex Tingle and others. +License: GPL +Some of this code was developed with the financial support of Stephen Hinton. diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/screenshot-1.png Binary file web/wp-content/plugins/event-calendar/screenshot-1.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/screenshot-2.png Binary file web/wp-content/plugins/event-calendar/screenshot-2.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/screenshot-3.jpg Binary file web/wp-content/plugins/event-calendar/screenshot-3.jpg has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/screenshot-4.jpg Binary file web/wp-content/plugins/event-calendar/screenshot-4.jpg has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/shadow0.png Binary file web/wp-content/plugins/event-calendar/shadow0.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/shadow1.png Binary file web/wp-content/plugins/event-calendar/shadow1.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/shadow2.png Binary file web/wp-content/plugins/event-calendar/shadow2.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/template-functions.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/event-calendar/template-functions.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,554 @@ +event_category) + {?> +
    +
    + + + + +
    + event_category; +} + + +/** Calculate the header (days of week). */ +function ec3_util_thead() +{ + global + $ec3, + $weekday, + $weekday_abbrev, + $weekday_initial; + + $result="\n"; + + $start_of_week =intval( get_option('start_of_week') ); + for($i=0; $i<7; $i++) + { + $full_day_name=$weekday[ ($i+$start_of_week) % 7 ]; + if(3==$ec3->day_length) + $display_day_name=$weekday_abbrev[$full_day_name]; + elseif($ec3->day_length<3) + $display_day_name=$weekday_initial[$full_day_name]; + else + $display_day_name=$full_day_name; + $result.="\t" + . "$display_day_name\n"; + } + + $result.="\n"; + return $result; +} + + +/** Echos the event calendar navigation controls. */ +function ec3_get_calendar_nav($date,$num_months) +{ + global $ec3; + echo "\n"; + + // Previous + $prev=$date->prev_month(); + echo "\t\n"; + + echo "\t\n"; + + // Next + $next=$date->plus_months($num_months); + echo "\t\n"; + + echo "\n"; +} + + +/** Generates an array of all 'ec3_Day's between the start of + * begin_month & end_month. Indexed by day_id. + * month_id is in the form: ec3__ */ +function ec3_util_calendar_days($begin_month_id,$end_month_id) +{ + $begin_date=date('Y-m-d 00:00:00',ec3_dayid2php($begin_month_id)); + $end_date =date('Y-m-d 00:00:00',ec3_dayid2php($end_month_id)); + global $ec3, $wpdb; + + $sql= + "SELECT DISTINCT + id, + post_title, + GREATEST(start,'$begin_date') AS start_date, + LEAST(end,'$end_date') AS end_date, + allday, + 1 AS is_event + FROM $wpdb->posts,$ec3->schedule + WHERE post_status='publish' + AND post_type='post' + AND post_id=id + AND end>='$begin_date' + AND start<'$end_date'"; + if(!$ec3->show_only_events) + { + // We are interested in normal posts, as well as events. + $sql="( $sql ) UNION + ( SELECT DISTINCT + id, + post_title, + post_date AS start_date, + post_date AS end_date, + 0 AS allday, + 0 AS is_event + FROM $wpdb->posts + WHERE post_status='publish' + AND post_type='post' + AND post_date>='$begin_date' + AND post_date<'$end_date' + AND post_dateget_results($sql); + + $calendar_days = array(); // result + if(!$calendar_entries) + return $calendar_days; + + // In advanced mode, we don't want to show events as blog posts in the cal. + $ignore_post_ids=array(); + if($ec3->advanced && !$ec3->show_only_events) + { + foreach($calendar_entries as $ent) + if($ent->is_event) + $ignore_post_ids[] = $ent->id; + } + + $current_post_id=0; + $current_day_id =''; + $time_format=get_option('time_format'); + $allday=str_replace(' ',' ',__('all day','ec3')); // #160==nbsp + foreach($calendar_entries as $ent) + { + if(!$ent->is_event && in_array($ent->id,$ignore_post_ids)) + continue; + if($current_post_id!=$ent->id) + { + $current_post_id=$ent->id; + $current_day_id=''; + } + $date=ec3_mysql2date($ent->start_date); + $end_date=ec3_mysql2date($ent->end_date); + while(true) + { + $day_id=$date->day_id(); + if($current_day_id==$day_id) + break; + $current_day_id=$day_id; + if(empty($calendar_days[$day_id])) + $calendar_days[$day_id] = new ec3_Day(); + + if($ent->allday) + $time=$allday; + else + $time=mysql2date($time_format,$ent->start_date); + //?? Should only record start time on FIRST day. + $calendar_days[$day_id]->add_post($ent->post_title,$time,$ent->is_event); + if($date->to_unixdate()==$end_date->to_unixdate()) + break; + $date->increment_day(); + } + } + return $calendar_days; +} + +/** Echos one event calendar month table. */ +function ec3_get_calendar_month($date,$calendar_days,$thead) +{ + global $ec3; + // + // Table start. + $title= + sprintf(__('View posts for %1$s %2$s'),$date->month_name(),$date->year_num); + echo "\n\n"; + echo $thead; + + // + // Table body + echo "\n\t"; + + $days_in_month =$date->days_in_month(); + $week_day=( $date->week_day() + 7 - intval(get_option('start_of_week')) ) % 7; + $col =0; + + while(True) + { + if($col>6) + { + echo "\n\t"; + $col=0; + } + if($col<$week_day) + { + // insert padding + $pad=$week_day-$col; + echo ""; + $col=$week_day; + } + // insert day + $day_id = $date->day_id(); + echo "'; + + $col++; + $date->increment_day(); + if(1==$date->day_num) + break; + $week_day=($week_day+1) % 7; + } + // insert padding + $pad=7-$col; + if($pad>1) + echo ""; + elseif($pad) + echo ""; + + echo "\n\n
    " + . '' + . $date->month_name() . ' ' . $date->year_num . "
     '; + echo 'is_event) + echo ' class="eventday"'; + echo ">$date->day_num"; + } + else + { + echo '>' . $date->day_num; + } + + echo '" + . "hide_logo? " style='display:none'>": ">") + . "EC 
    "; +} + + +/** Template function. Call this from your template to insert the + * Event Calendar. */ +function ec3_get_calendar() +{ + if(!ec3_check_installed(__('Event Calendar','ec3'))) + return; + global $ec3; + + // Can't cope with more than one calendar on the same page. Everything has + // a unique ID, so it can't be duplicated. + // Simple fix for problem: Just ignore all calls after the first. + $ec3->call_count++; + if($ec3->call_count>1) + { + echo "\n"; + return; + } + + echo "
    \n"; + + $this_month = new ec3_Date(); + + // Display navigation panel. + if(0==$ec3->navigation) + ec3_get_calendar_nav($this_month,$ec3->num_months); + + // Get entries + $end_month=$this_month->plus_months($ec3->num_months); + $calendar_days = + ec3_util_calendar_days( + $this_month->month_id(), + $end_month->month_id() + ); + + // Display months. + $thead=ec3_util_thead(); + for($i=0; $i<$ec3->num_months; $i++) + { + $next_month=$this_month->next_month(); + ec3_get_calendar_month($this_month,$calendar_days,$thead); + $this_month=$next_month; + } + + // Display navigation panel. + if(1==$ec3->navigation) + ec3_get_calendar_nav(new ec3_Date(),$ec3->num_months); + + echo "
    \n"; + + if(!$ec3->disable_popups) + echo "\t\n"; +} + + +/** Substitutes placeholders like '%key%' in $format with 'value' from $data + * array. */ +function ec3_format_str($format,$data) +{ + foreach($data as $k=>$v) + $format=str_replace("%$k%",$v,$format); + return $format; +} + + +define('EC3_DEFAULT_TEMPLATE_EVENT','%TITLE% (%TIME%)'); +define('EC3_DEFAULT_TEMPLATE_DAY', '%DATE%:'); +define('EC3_DEFAULT_DATE_FORMAT', 'j F'); +define('EC3_DEFAULT_TEMPLATE_MONTH',''); +define('EC3_DEFAULT_MONTH_FORMAT', 'F Y'); + +/** Template function. Call this from your template to insert a list of + * forthcoming events. Available template variables are: + * - template_day: %DATE% %SINCE% (only with Time Since plugin) + * - template_event: %DATE% %TIME% %LINK% %TITLE% %AUTHOR% + */ +function ec3_get_events( + $limit, + $template_event=EC3_DEFAULT_TEMPLATE_EVENT, + $template_day =EC3_DEFAULT_TEMPLATE_DAY, + $date_format =EC3_DEFAULT_DATE_FORMAT, + $template_month=EC3_DEFAULT_TEMPLATE_MONTH, + $month_format =EC3_DEFAULT_MONTH_FORMAT) +{ + if(!ec3_check_installed(__('Upcoming Events','ec3'))) + return; + global $ec3,$wpdb,$wp_version; + + // Parse $limit: + // NUMBER - limits number of posts + // NUMBER days - next NUMBER of days + if(empty($limit)) + { + $limit_numposts='LIMIT 5'; + } + elseif(preg_match('/^ *([0-9]+) *d(ays?)?/',$limit,$matches)) + { + $secs=intval($matches[1])*24*3600; + $and_before="AND start<='".ec3_strftime('%Y-%m-%d',time()+$secs)."'"; + } + elseif(intval($limit)<1) + { + $limit_numposts='LIMIT 5'; + } + else + { + $limit_numposts='LIMIT '.intval($limit); + } + + if(!$date_format) + $date_format=get_option('date_format'); + + // Find the upcoming events. + $calendar_entries = $wpdb->get_results( + "SELECT DISTINCT + p.id AS id, + post_title, + start, + u.$ec3->wp_user_nicename AS author, + allday + FROM $ec3->schedule s + LEFT JOIN $wpdb->posts p ON s.post_id=p.id + LEFT JOIN $wpdb->users u ON p.post_author = u.id + WHERE p.post_status='publish' + AND end>='$ec3->today' $and_before + ORDER BY start $limit_numposts" + ); + + echo "\n"; + echo "
      "; + // echo "
    • test
    • "; + if($calendar_entries) + { + $time_format=get_option('time_format'); + $current_month=false; + $current_date=false; + $data=array(); + foreach($calendar_entries as $entry) + { + // To use %SINCE%, you need Dunstan's 'Time Since' plugin. + if(function_exists('time_since')) + $data['SINCE']=time_since( time(), ec3_to_time($entry->start) ); + + // Month changed? + $data['MONTH']=mysql2date($month_format,$entry->start); + if((!$current_month || $current_month!=$data['MONTH']) && $template_month) + { + if($current_date) + echo "
    \n"; + if($current_month) + $id_accordion=str_replace(" ", "_",ec3_format_str($template_month,$data)); + $id_accordion=str_replace(":", "",$id_accordion); + echo " \n"; + echo "
  • ".ec3_format_str($template_month,$data)." \n
      \n"; + $current_month=$data['MONTH']; + $current_date=false; + } + + + // Date changed? + $data['DATE'] =mysql2date($date_format, $entry->start); + if((!$current_date || $current_date!=$data['DATE']) && $template_day) + { + if($current_date) + echo "
  • \n"; + $id_accordion=str_replace(" ", "_",ec3_format_str($template_day,$data)); + $id_accordion=str_replace(":", "",$id_accordion); + echo "
  • ".ec3_format_str($template_day,$data)." \n
      \n"; + $current_date=$data['DATE']; + } + + if($entry->allday) + $data['TIME']=__('all day','ec3'); + else + $data['TIME']=mysql2date($time_format,$entry->start); + + $data['TITLE'] = + htmlentities( + stripslashes(strip_tags($entry->post_title)), + ENT_QUOTES,get_option('blog_charset') + ); + $data['LINK'] =get_permalink($entry->id); + $data['AUTHOR']= + htmlentities($entry->author,ENT_QUOTES,get_option('blog_charset')); + echo "
    • ".ec3_format_str($template_event,$data)."
    • \n"; + } + if($current_date) + echo "
  • \n"; + if($current_month) + echo "\n"; + } + else + { + echo "
  • ".__('No events.','ec3')."
  • \n"; + } + echo " \n \n"; +} + +define('EC3_DEFAULT_FORMAT_SINGLE','%s'); +define('EC3_DEFAULT_FORMAT_RANGE','%1$s' + . '%3$s%2$s'); +define('EC3_DEFAULT_FORMAT_WRAPPER','%s
    '); + +/** Formats the schedule for the current post. + * Returns the HTML fragment as a string. */ +function ec3_get_schedule( + $format_single =EC3_DEFAULT_FORMAT_SINGLE, + $format_range =EC3_DEFAULT_FORMAT_RANGE, + $format_wrapper=EC3_DEFAULT_FORMAT_WRAPPER +) +{ + global $ec3,$post; + // Should have been set by ec3_filter_the_posts() + if(!$post || !$post->ec3_schedule) + return ''; + $result=''; + $date_format=get_option('date_format'); + $time_format=get_option('time_format'); + $current=false; + foreach($post->ec3_schedule as $s) + { + $date_start=mysql2date($date_format,$s->start); + $date_end =mysql2date($date_format,$s->end); + $time_start=mysql2date($time_format,$s->start); + $time_end =mysql2date($time_format,$s->end); + + if($s->allday) + { + if($date_start!=$date_end) + { + $result.=sprintf($format_range,$date_start,$date_end,__('to','ec3')); + } + elseif($date_start!=$current) + { + $current=$date_start; + $result.=sprintf($format_single,$date_start); + } + } + else + { + if($date_start!=$date_end) + { + $current=$date_start; + $result.=sprintf($format_range, + "$date_start $time_start","$date_end $time_end",__('to','ec3')); + } + else + { + if($date_start!=$current) + { + $current=$date_start; + $result.=sprintf($format_single,$date_start); + } + if($time_start==$time_end) + $result.=sprintf($format_single,$time_start); + else + $result.=sprintf($format_range,$time_start,$time_end,__('to','ec3')); + } + } + } + return sprintf($format_wrapper,$result); +} + + +/** Echos the schedule for the current post. */ +function ec3_the_schedule( + $format_single =EC3_DEFAULT_FORMAT_SINGLE, + $format_range =EC3_DEFAULT_FORMAT_RANGE, + $format_wrapper=EC3_DEFAULT_FORMAT_WRAPPER +) +{ + echo ec3_get_schedule($format_single,$format_range,$format_wrapper); +} + +?> diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/template-functions.php.old --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/event-calendar/template-functions.php.old Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,550 @@ +event_category) + {?> +
    +
    + + + + +
    + event_category; +} + + +/** Calculate the header (days of week). */ +function ec3_util_thead() +{ + global + $ec3, + $weekday, + $weekday_abbrev, + $weekday_initial; + + $result="\n"; + + $start_of_week =intval( get_option('start_of_week') ); + for($i=0; $i<7; $i++) + { + $full_day_name=$weekday[ ($i+$start_of_week) % 7 ]; + if(3==$ec3->day_length) + $display_day_name=$weekday_abbrev[$full_day_name]; + elseif($ec3->day_length<3) + $display_day_name=$weekday_initial[$full_day_name]; + else + $display_day_name=$full_day_name; + $result.="\t" + . "$display_day_name\n"; + } + + $result.="\n"; + return $result; +} + + +/** Echos the event calendar navigation controls. */ +function ec3_get_calendar_nav($date,$num_months) +{ + global $ec3; + echo "\n"; + + // Previous + $prev=$date->prev_month(); + echo "\t\n"; + + echo "\t\n"; + + // Next + $next=$date->plus_months($num_months); + echo "\t\n"; + + echo "\n"; +} + + +/** Generates an array of all 'ec3_Day's between the start of + * begin_month & end_month. Indexed by day_id. + * month_id is in the form: ec3__ */ +function ec3_util_calendar_days($begin_month_id,$end_month_id) +{ + $begin_date=date('Y-m-d 00:00:00',ec3_dayid2php($begin_month_id)); + $end_date =date('Y-m-d 00:00:00',ec3_dayid2php($end_month_id)); + global $ec3, $wpdb; + + $sql= + "SELECT DISTINCT + id, + post_title, + GREATEST(start,'$begin_date') AS start_date, + LEAST(end,'$end_date') AS end_date, + allday, + 1 AS is_event + FROM $wpdb->posts,$ec3->schedule + WHERE post_status='publish' + AND post_type='post' + AND post_id=id + AND end>='$begin_date' + AND start<'$end_date'"; + if(!$ec3->show_only_events) + { + // We are interested in normal posts, as well as events. + $sql="( $sql ) UNION + ( SELECT DISTINCT + id, + post_title, + post_date AS start_date, + post_date AS end_date, + 0 AS allday, + 0 AS is_event + FROM $wpdb->posts + WHERE post_status='publish' + AND post_type='post' + AND post_date>='$begin_date' + AND post_date<'$end_date' + AND post_dateget_results($sql); + + $calendar_days = array(); // result + if(!$calendar_entries) + return $calendar_days; + + // In advanced mode, we don't want to show events as blog posts in the cal. + $ignore_post_ids=array(); + if($ec3->advanced && !$ec3->show_only_events) + { + foreach($calendar_entries as $ent) + if($ent->is_event) + $ignore_post_ids[] = $ent->id; + } + + $current_post_id=0; + $current_day_id =''; + $time_format=get_option('time_format'); + $allday=str_replace(' ',' ',__('all day','ec3')); // #160==nbsp + foreach($calendar_entries as $ent) + { + if(!$ent->is_event && in_array($ent->id,$ignore_post_ids)) + continue; + if($current_post_id!=$ent->id) + { + $current_post_id=$ent->id; + $current_day_id=''; + } + $date=ec3_mysql2date($ent->start_date); + $end_date=ec3_mysql2date($ent->end_date); + while(true) + { + $day_id=$date->day_id(); + if($current_day_id==$day_id) + break; + $current_day_id=$day_id; + if(empty($calendar_days[$day_id])) + $calendar_days[$day_id] = new ec3_Day(); + + if($ent->allday) + $time=$allday; + else + $time=mysql2date($time_format,$ent->start_date); + //?? Should only record start time on FIRST day. + $calendar_days[$day_id]->add_post($ent->post_title,$time,$ent->is_event); + if($date->to_unixdate()==$end_date->to_unixdate()) + break; + $date->increment_day(); + } + } + return $calendar_days; +} + +/** Echos one event calendar month table. */ +function ec3_get_calendar_month($date,$calendar_days,$thead) +{ + global $ec3; + // + // Table start. + $title= + sprintf(__('View posts for %1$s %2$s'),$date->month_name(),$date->year_num); + echo "\n\n"; + echo $thead; + + // + // Table body + echo "\n\t"; + + $days_in_month =$date->days_in_month(); + $week_day=( $date->week_day() + 7 - intval(get_option('start_of_week')) ) % 7; + $col =0; + + while(True) + { + if($col>6) + { + echo "\n\t"; + $col=0; + } + if($col<$week_day) + { + // insert padding + $pad=$week_day-$col; + echo ""; + $col=$week_day; + } + // insert day + $day_id = $date->day_id(); + echo "'; + + $col++; + $date->increment_day(); + if(1==$date->day_num) + break; + $week_day=($week_day+1) % 7; + } + // insert padding + $pad=7-$col; + if($pad>1) + echo ""; + elseif($pad) + echo ""; + + echo "\n\n
    " + . '' + . $date->month_name() . ' ' . $date->year_num . "
     '; + echo 'is_event) + echo ' class="eventday"'; + echo ">$date->day_num"; + } + else + { + echo '>' . $date->day_num; + } + + echo '" + . "hide_logo? " style='display:none'>": ">") + . "EC 
    "; +} + + +/** Template function. Call this from your template to insert the + * Event Calendar. */ +function ec3_get_calendar() +{ + if(!ec3_check_installed(__('Event Calendar','ec3'))) + return; + global $ec3; + + // Can't cope with more than one calendar on the same page. Everything has + // a unique ID, so it can't be duplicated. + // Simple fix for problem: Just ignore all calls after the first. + $ec3->call_count++; + if($ec3->call_count>1) + { + echo "\n"; + return; + } + + echo "
    \n"; + + $this_month = new ec3_Date(); + + // Display navigation panel. + if(0==$ec3->navigation) + ec3_get_calendar_nav($this_month,$ec3->num_months); + + // Get entries + $end_month=$this_month->plus_months($ec3->num_months); + $calendar_days = + ec3_util_calendar_days( + $this_month->month_id(), + $end_month->month_id() + ); + + // Display months. + $thead=ec3_util_thead(); + for($i=0; $i<$ec3->num_months; $i++) + { + $next_month=$this_month->next_month(); + ec3_get_calendar_month($this_month,$calendar_days,$thead); + $this_month=$next_month; + } + + // Display navigation panel. + if(1==$ec3->navigation) + ec3_get_calendar_nav(new ec3_Date(),$ec3->num_months); + + echo "
    \n"; + + if(!$ec3->disable_popups) + echo "\t\n"; +} + + +/** Substitutes placeholders like '%key%' in $format with 'value' from $data + * array. */ +function ec3_format_str($format,$data) +{ + foreach($data as $k=>$v) + $format=str_replace("%$k%",$v,$format); + return $format; +} + + +define('EC3_DEFAULT_TEMPLATE_EVENT','%TITLE% (%TIME%)'); +define('EC3_DEFAULT_TEMPLATE_DAY', '%DATE%:'); +define('EC3_DEFAULT_DATE_FORMAT', 'j F'); +define('EC3_DEFAULT_TEMPLATE_MONTH',''); +define('EC3_DEFAULT_MONTH_FORMAT', 'F Y'); + +/** Template function. Call this from your template to insert a list of + * forthcoming events. Available template variables are: + * - template_day: %DATE% %SINCE% (only with Time Since plugin) + * - template_event: %DATE% %TIME% %LINK% %TITLE% %AUTHOR% + */ +function ec3_get_events( + $limit, + $template_event=EC3_DEFAULT_TEMPLATE_EVENT, + $template_day =EC3_DEFAULT_TEMPLATE_DAY, + $date_format =EC3_DEFAULT_DATE_FORMAT, + $template_month=EC3_DEFAULT_TEMPLATE_MONTH, + $month_format =EC3_DEFAULT_MONTH_FORMAT) +{ + if(!ec3_check_installed(__('Upcoming Events','ec3'))) + return; + global $ec3,$wpdb,$wp_version; + + // Parse $limit: + // NUMBER - limits number of posts + // NUMBER days - next NUMBER of days + if(empty($limit)) + { + $limit_numposts='LIMIT 5'; + } + elseif(preg_match('/^ *([0-9]+) *d(ays?)?/',$limit,$matches)) + { + $secs=intval($matches[1])*24*3600; + $and_before="AND start<='".ec3_strftime('%Y-%m-%d',time()+$secs)."'"; + } + elseif(intval($limit)<1) + { + $limit_numposts='LIMIT 5'; + } + else + { + $limit_numposts='LIMIT '.intval($limit); + } + + if(!$date_format) + $date_format=get_option('date_format'); + + // Find the upcoming events. + $calendar_entries = $wpdb->get_results( + "SELECT DISTINCT + p.id AS id, + post_title, + start, + u.$ec3->wp_user_nicename AS author, + allday + FROM $ec3->schedule s + LEFT JOIN $wpdb->posts p ON s.post_id=p.id + LEFT JOIN $wpdb->users u ON p.post_author = u.id + WHERE p.post_status='publish' + AND end>='$ec3->today' $and_before + ORDER BY start $limit_numposts" + ); + + echo "
      "; + echo "\n"; + if($calendar_entries) + { + $time_format=get_option('time_format'); + $current_month=false; + $current_date=false; + $data=array(); + foreach($calendar_entries as $entry) + { + // To use %SINCE%, you need Dunstan's 'Time Since' plugin. + if(function_exists('time_since')) + $data['SINCE']=time_since( time(), ec3_to_time($entry->start) ); + + // Month changed? + $data['MONTH']=mysql2date($month_format,$entry->start); + if((!$current_month || $current_month!=$data['MONTH']) && $template_month) + { + if($current_date) + echo "
    \n"; + if($current_month) + echo "\n"; + echo "
  • " + . ec3_format_str($template_month,$data)."\n
      \n"; + $current_month=$data['MONTH']; + $current_date=false; + } + + // Date changed? + $data['DATE'] =mysql2date($date_format, $entry->start); + if((!$current_date || $current_date!=$data['DATE']) && $template_day) + { + if($current_date) + echo "
  • \n"; + echo "
  • " + . ec3_format_str($template_day,$data)."\n
      \n"; + $current_date=$data['DATE']; + } + + if($entry->allday) + $data['TIME']=__('all day','ec3'); + else + $data['TIME']=mysql2date($time_format,$entry->start); + + $data['TITLE'] = + htmlentities( + stripslashes(strip_tags($entry->post_title)), + ENT_QUOTES,get_option('blog_charset') + ); + $data['LINK'] =get_permalink($entry->id); + $data['AUTHOR']= + htmlentities($entry->author,ENT_QUOTES,get_option('blog_charset')); + echo "
    • ".ec3_format_str($template_event,$data)."
    • \n"; + } + if($current_date) + echo "
  • \n"; + if($current_month) + echo "\n"; + } + else + { + echo "
  • ".__('No events.','ec3')."
  • \n"; + } + echo "\n"; +} + +define('EC3_DEFAULT_FORMAT_SINGLE','%s'); +define('EC3_DEFAULT_FORMAT_RANGE','%1$s' + . '%3$s%2$s'); +define('EC3_DEFAULT_FORMAT_WRAPPER','%s
    '); + +/** Formats the schedule for the current post. + * Returns the HTML fragment as a string. */ +function ec3_get_schedule( + $format_single =EC3_DEFAULT_FORMAT_SINGLE, + $format_range =EC3_DEFAULT_FORMAT_RANGE, + $format_wrapper=EC3_DEFAULT_FORMAT_WRAPPER +) +{ + global $ec3,$post; + // Should have been set by ec3_filter_the_posts() + if(!$post || !$post->ec3_schedule) + return ''; + $result=''; + $date_format=get_option('date_format'); + $time_format=get_option('time_format'); + $current=false; + foreach($post->ec3_schedule as $s) + { + $date_start=mysql2date($date_format,$s->start); + $date_end =mysql2date($date_format,$s->end); + $time_start=mysql2date($time_format,$s->start); + $time_end =mysql2date($time_format,$s->end); + + if($s->allday) + { + if($date_start!=$date_end) + { + $result.=sprintf($format_range,$date_start,$date_end,__('to','ec3')); + } + elseif($date_start!=$current) + { + $current=$date_start; + $result.=sprintf($format_single,$date_start); + } + } + else + { + if($date_start!=$date_end) + { + $current=$date_start; + $result.=sprintf($format_range, + "$date_start $time_start","$date_end $time_end",__('to','ec3')); + } + else + { + if($date_start!=$current) + { + $current=$date_start; + $result.=sprintf($format_single,$date_start); + } + if($time_start==$time_end) + $result.=sprintf($format_single,$time_start); + else + $result.=sprintf($format_range,$time_start,$time_end,__('to','ec3')); + } + } + } + return sprintf($format_wrapper,$result); +} + + +/** Echos the schedule for the current post. */ +function ec3_the_schedule( + $format_single =EC3_DEFAULT_FORMAT_SINGLE, + $format_range =EC3_DEFAULT_FORMAT_RANGE, + $format_wrapper=EC3_DEFAULT_FORMAT_WRAPPER +) +{ + echo ec3_get_schedule($format_single,$format_range,$format_wrapper); +} + +?> diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/tz.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/event-calendar/tz.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,575 @@ +tz_disabled=true; + $ec3->tz=getenv('TZ'); + +else: + + // PHP4 safe mode OFF + function ec3_tz_push($tz) + { + $old_tz=getenv('TZ'); + putenv("TZ=$tz"); + return $old_tz; + } + function ec3_tz_pop($tz) + { + putenv("TZ=$tz"); + } + +endif; + + +/** Converts a WordPress timestamp to Unix time. */ +function ec3_to_time($timestamp) +{ + global $ec3; + // Parse $timestamp and extract the Unix time. + $old_tz=ec3_tz_push($ec3->tz); + $unix_time = strtotime($timestamp); + ec3_tz_pop($old_tz); + // Unix time is seconds since the epoch (in UTC). + return $unix_time; +} + +/** Converts a WordPress timestamp to UTC. */ +function ec3_to_utc($timestamp,$fmt='%Y%m%dT%H%M00Z') +{ + $result = gmstrftime($fmt,ec3_to_time($timestamp)); + return $result; +} + +/** Formats a Unix time as a time in the current timezone. */ +function ec3_strftime($format,$unix_time=0) +{ + global $ec3; + if(!$unix_time) + $unix_time=time(); + // Express the Unix time as a string for timezone $ec3->tz. + $old_tz=ec3_tz_push($ec3->tz); + $result = strftime($format,$unix_time); + ec3_tz_pop($old_tz); + return $result; +} + + +$ec3->today=ec3_strftime("%Y-%m-%d 00:00:00"); + + +/** Call from within a + + + + + + + + + + + + have_posts()): $query->the_post(); ?> + + ec3_schedule)): + $post_date = get_post_time(); + $post_modified_date = get_post_modified_time(); + $rownum++; + if($rownum % 2) + { + $rowclass='alternate '; + } + else + { + $rowclass=''; + } + + if($post_modified_date >= $now) + { + $errstyle='background-color:#fcc'; + } + else + { + $errstyle=''; + } + ?> + + + + + + + + + + + + + + + + +
    OKTitlePost dateEvent date
    + + + + + + + + + +
    No posts to upgrade.
    + +

    + + 0): ?> + + + " /> + + + + + + + +

    + + + + + + + $v) + { + if(preg_match('/^ec3_(upgrade|'.implode('|',$fields).')_(_?)([0-9]+)$/',$k,$match)) + { + $pid=intval($match[3]); + if(!isset( $sched_entries[$pid] )) + $sched_entries[ $pid ]=array(); + $sched_entries[ $pid ][ $match[1] ] = $v; + } + } + + foreach($sched_entries as $pid => $vals) + { + if(empty($vals['upgrade']) || + empty($vals['postdate']) || + empty($vals['eventdate']) ) + { + continue; + } + $postdate = "'".$wpdb->escape($vals['postdate'])."'"; + $eventdate = "'".$wpdb->escape($vals['eventdate'])."'"; + $cnt=$wpdb->get_var( + "SELECT COUNT(0) FROM $ec3->schedule + WHERE post_id=$pid"); + if(!empty($cnt)) + continue; + // Create a schedule record. + $wpdb->query( + "INSERT INTO $ec3->schedule (post_id,start,end,allday,rpt) + VALUES ($pid,$eventdate,$eventdate,0,'')" + ); + // Modify the post date. + $wpdb->query( + "UPDATE $wpdb->posts + SET post_date=$postdate, post_date_gmt=$postdate + WHERE ID=$pid" + ); + $changed_count++; + } + return $changed_count; +} + +?> diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/widget.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/event-calendar/widget.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,188 @@ +Widget plugins (WordPress version 2.1 and earlier). After activating, please visit Sidebar Widgets for WordPress version 2.1 and earlier or Widgets for WordPress version 2.2 and subsequent to configure and arrange your new widgets. +Author: Darrell Schulte +Version: 3.1.4 +Author URI: http://wpcal.firetree.net + + This is a WordPress plugin (http://wordpress.org) and widget + (http://automattic.com/code/widgets/). +*/ + +/* +Copyright (c) 2006, Darrell Schulte. $Revision: 285 $ + +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. +*/ + +function ec3_widget_init() +{ + + if ( !function_exists('register_sidebar_widget') ) + return; + + /** Utility function: Gets the (possibly translated) widget title, given the + * value of the 'title' option. */ + function ec3_widget_title($title,$default) + { + if ( empty($title) ) + return __($default,'ec3'); + else + return apply_filters('widget_title',$title); + } + + + /** Event Calendar widget. */ + function ec3_widget_cal($args) + { + extract($args); + $options = get_option('ec3_widget_cal'); + echo $before_widget . $before_title; + echo ec3_widget_title($options['title'],'Event Calendar'); + echo $after_title; + ec3_get_calendar(); + echo $after_widget; + } + + function ec3_widget_cal_control() + { + $options = $newoptions = get_option('ec3_widget_cal'); + if ( $_POST["ec3_cal_submit"] ) + { + $newoptions['title']=strip_tags(stripslashes($_POST["ec3_cal_title"])); + } + if ( $options != $newoptions ) + { + $options = $newoptions; + update_option('ec3_widget_cal', $options); + } + $title = ec3_widget_title($options['title'],'Event Calendar'); + ?> +

    + +

    + +

    + . +

    + + + + __( 'Display upcoming events in a dynamic calendar.','ec3') + . ' (Event Calendar '. __('Plugin') .')' ) + ); + + register_widget_control( + array(__('Event Calendar','ec3'),'widgets'), + 'ec3_widget_cal_control' + ); + + + /** Upcoming Events widget. */ + function ec3_widget_list($args) + { + extract($args); + $options = get_option('ec3_widget_list'); + echo $before_widget . $before_title; + echo ec3_widget_title($options['title'],'Upcoming Events'); + echo $after_title; + ec3_get_events( + $options['limit'], + EC3_DEFAULT_TEMPLATE_EVENT, + EC3_DEFAULT_TEMPLATE_DAY, + get_option('date_format') + ); + echo $after_widget; + } + + function ec3_widget_list_control() + { + $options = $newoptions = get_option('ec3_widget_list'); + if ( $_POST["ec3_list_submit"] ) + { + $newoptions['title'] = strip_tags(stripslashes($_POST["ec3_list_title"])); + $newoptions['limit'] = strip_tags(stripslashes($_POST["ec3_limit"])); + } + if ( $options != $newoptions ) + { + $options = $newoptions; + update_option('ec3_widget_list', $options); + } + + $title = ec3_widget_title($options['title'],'Upcoming Events'); + $limit = $options['limit']; + + $ec3_limit_title = + __("Examples: '5', '5 days', '5d'. To display recent past events, use a negative number: '-5'."); + ?> + +

    + +

    +

    + +

    + +

    + + . +

    + + + + + __('Display upcoming events as a list.','ec3') + . ' (Event Calendar '. __('Plugin') .')' ) + ); + + register_widget_control( + array(__('Upcoming Events','ec3'),'widgets'), + 'ec3_widget_list_control' + ); +} + +add_action('widgets_init', 'ec3_widget_init'); + + +?> diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/widget.php.old --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/event-calendar/widget.php.old Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,187 @@ +Widget plugins (WordPress version 2.1 and earlier). After activating, please visit Sidebar Widgets for WordPress version 2.1 and earlier or Widgets for WordPress version 2.2 and subsequent to configure and arrange your new widgets. +Author: Darrell Schulte +Version: 3.1.4 +Author URI: http://wpcal.firetree.net + + This is a WordPress plugin (http://wordpress.org) and widget + (http://automattic.com/code/widgets/). +*/ + +/* +Copyright (c) 2006, Darrell Schulte. $Revision: 285 $ + +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. +*/ + +function ec3_widget_init() +{ + + if ( !function_exists('register_sidebar_widget') ) + return; + + /** Utility function: Gets the (possibly translated) widget title, given the + * value of the 'title' option. */ + function ec3_widget_title($title,$default) + { + if ( empty($title) ) + return __($default,'ec3'); + else + return apply_filters('widget_title',$title); + } + + + /** Event Calendar widget. */ + function ec3_widget_cal($args) + { + extract($args); + $options = get_option('ec3_widget_cal'); + echo $before_widget . $before_title; + echo ec3_widget_title($options['title'],'Event Calendar'); + echo $after_title; + ec3_get_calendar(); + echo $after_widget; + } + + function ec3_widget_cal_control() + { + $options = $newoptions = get_option('ec3_widget_cal'); + if ( $_POST["ec3_cal_submit"] ) + { + $newoptions['title']=strip_tags(stripslashes($_POST["ec3_cal_title"])); + } + if ( $options != $newoptions ) + { + $options = $newoptions; + update_option('ec3_widget_cal', $options); + } + $title = ec3_widget_title($options['title'],'Event Calendar'); + ?> +

    + +

    + +

    + . +

    + + + + __( 'Display upcoming events in a dynamic calendar.','ec3') + . ' (Event Calendar '. __('Plugin') .')' ) + ); + + register_widget_control( + array(__('Event Calendar','ec3'),'widgets'), + 'ec3_widget_cal_control' + ); + + + /** Upcoming Events widget. */ + function ec3_widget_list($args) + { + extract($args); + $options = get_option('ec3_widget_list'); + echo $before_widget . $before_title; + echo ec3_widget_title($options['title'],'Upcoming Events'); + echo $after_title; + ec3_get_events( + $options['limit'], + EC3_DEFAULT_TEMPLATE_EVENT, + EC3_DEFAULT_TEMPLATE_DAY, + get_option('date_format') + ); + echo $after_widget; + } + + function ec3_widget_list_control() + { + $options = $newoptions = get_option('ec3_widget_list'); + if ( $_POST["ec3_list_submit"] ) + { + $newoptions['title'] = strip_tags(stripslashes($_POST["ec3_list_title"])); + $newoptions['limit'] = strip_tags(stripslashes($_POST["ec3_limit"])); + } + if ( $options != $newoptions ) + { + $options = $newoptions; + update_option('ec3_widget_list', $options); + } + + $title = ec3_widget_title($options['title'],'Upcoming Events'); + $limit = $options['limit']; + + $ec3_limit_title = + __("Examples: '5', '5 days', '5d'. To display recent past events, use a negative number: '-5'."); + ?> + +

    + +

    +

    + +

    + +

    + + . +

    + + + + + __('Display upcoming events as a list.','ec3') + . ' (Event Calendar '. __('Plugin') .')' ) + ); + + register_widget_control( + array(__('Upcoming Events','ec3'),'widgets'), + 'ec3_widget_list_control' + ); +} + +add_action('widgets_init', 'ec3_widget_init'); + +?> diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/event-calendar/xmlhttprequest.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/event-calendar/xmlhttprequest.js Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,254 @@ +/* + +Cross-Browser XMLHttpRequest v1.2 +================================= + +Emulate Gecko 'XMLHttpRequest()' functionality in IE and Opera. Opera requires +the Sun Java Runtime Environment . + +by Andrew Gregory +http://www.scss.com.au/family/andrew/webdesign/xmlhttprequest/ + +This work is licensed under the Creative Commons Attribution License. To view a +copy of this license, visit http://creativecommons.org/licenses/by-sa/2.5/ or +send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California +94305, USA. + +Attribution: Leave my name and web address in this script intact. + +Not Supported in Opera +---------------------- +* user/password authentication +* responseXML data member + +Not Fully Supported in Opera +---------------------------- +* async requests +* abort() +* getAllResponseHeaders(), getAllResponseHeader(header) + +*/ +// IE support +if (window.ActiveXObject && !window.XMLHttpRequest) { + window.XMLHttpRequest = function() { + var msxmls = new Array( + 'Msxml2.XMLHTTP.5.0', + 'Msxml2.XMLHTTP.4.0', + 'Msxml2.XMLHTTP.3.0', + 'Msxml2.XMLHTTP', + 'Microsoft.XMLHTTP'); + for (var i = 0; i < msxmls.length; i++) { + try { + return new ActiveXObject(msxmls[i]); + } catch (e) { + } + } + return null; + }; +} +// Gecko support +/* ;-) */ +// Opera support +if (window.opera && !window.XMLHttpRequest) { + window.XMLHttpRequest = function() { + this.readyState = 0; // 0=uninitialized,1=loading,2=loaded,3=interactive,4=complete + this.status = 0; // HTTP status codes + this.statusText = ''; + this._headers = []; + this._aborted = false; + this._async = true; + this._defaultCharset = 'ISO-8859-1'; + this._getCharset = function() { + var charset = _defaultCharset; + var contentType = this.getResponseHeader('Content-type').toUpperCase(); + val = contentType.indexOf('CHARSET='); + if (val != -1) { + charset = contentType.substring(val); + } + val = charset.indexOf(';'); + if (val != -1) { + charset = charset.substring(0, val); + } + val = charset.indexOf(','); + if (val != -1) { + charset = charset.substring(0, val); + } + return charset; + }; + this.abort = function() { + this._aborted = true; + }; + this.getAllResponseHeaders = function() { + return this.getAllResponseHeader('*'); + }; + this.getAllResponseHeader = function(header) { + var ret = ''; + for (var i = 0; i < this._headers.length; i++) { + if (header == '*' || this._headers[i].h == header) { + ret += this._headers[i].h + ': ' + this._headers[i].v + '\n'; + } + } + return ret; + }; + this.getResponseHeader = function(header) { + var ret = getAllResponseHeader(header); + var i = ret.indexOf('\n'); + if (i != -1) { + ret = ret.substring(0, i); + } + return ret; + }; + this.setRequestHeader = function(header, value) { + this._headers[this._headers.length] = {h:header, v:value}; + }; + this.open = function(method, url, async, user, password) { + this.method = method; + this.url = url; + this._async = true; + this._aborted = false; + this._headers = []; + if (arguments.length >= 3) { + this._async = async; + } + if (arguments.length > 3) { + opera.postError('XMLHttpRequest.open() - user/password not supported'); + } + this.readyState = 1; + if (this.onreadystatechange) { + this.onreadystatechange(); + } + }; + this.send = function(data) { + if (!navigator.javaEnabled()) { + alert("XMLHttpRequest.send() - Java must be installed and enabled."); + return; + } + if (this._async) { + setTimeout(this._sendasync, 0, this, data); + // this is not really asynchronous and won't execute until the current + // execution context ends + } else { + this._sendsync(data); + } + } + this._sendasync = function(req, data) { + if (!req._aborted) { + req._sendsync(data); + } + }; + this._sendsync = function(data) { + this.readyState = 2; + if (this.onreadystatechange) { + this.onreadystatechange(); + } + // open connection + var url = new java.net.URL(new java.net.URL(window.location.href), this.url); + var conn = url.openConnection(); + for (var i = 0; i < this._headers.length; i++) { + conn.setRequestProperty(this._headers[i].h, this._headers[i].v); + } + this._headers = []; + if (this.method == 'POST') { + // POST data + conn.setDoOutput(true); + var wr = new java.io.OutputStreamWriter(conn.getOutputStream(), this._getCharset()); + wr.write(data); + wr.flush(); + wr.close(); + } + // read response headers + // NOTE: the getHeaderField() methods always return nulls for me :( + var gotContentEncoding = false; + var gotContentLength = false; + var gotContentType = false; + var gotDate = false; + var gotExpiration = false; + var gotLastModified = false; + for (var i = 0; ; i++) { + var hdrName = conn.getHeaderFieldKey(i); + var hdrValue = conn.getHeaderField(i); + if (hdrName == null && hdrValue == null) { + break; + } + if (hdrName != null) { + this._headers[this._headers.length] = {h:hdrName, v:hdrValue}; + switch (hdrName.toLowerCase()) { + case 'content-encoding': gotContentEncoding = true; break; + case 'content-length' : gotContentLength = true; break; + case 'content-type' : gotContentType = true; break; + case 'date' : gotDate = true; break; + case 'expires' : gotExpiration = true; break; + case 'last-modified' : gotLastModified = true; break; + } + } + } + // try to fill in any missing header information + var val; + val = conn.getContentEncoding(); + if (val != null && !gotContentEncoding) this._headers[this._headers.length] = {h:'Content-encoding', v:val}; + val = conn.getContentLength(); + if (val != -1 && !gotContentLength) this._headers[this._headers.length] = {h:'Content-length', v:val}; + val = conn.getContentType(); + if (val != null && !gotContentType) this._headers[this._headers.length] = {h:'Content-type', v:val}; + val = conn.getDate(); + if (val != 0 && !gotDate) this._headers[this._headers.length] = {h:'Date', v:(new Date(val)).toUTCString()}; + val = conn.getExpiration(); + if (val != 0 && !gotExpiration) this._headers[this._headers.length] = {h:'Expires', v:(new Date(val)).toUTCString()}; + val = conn.getLastModified(); + if (val != 0 && !gotLastModified) this._headers[this._headers.length] = {h:'Last-modified', v:(new Date(val)).toUTCString()}; + // read response data + var reqdata = ''; + var stream = conn.getInputStream(); + if (stream) { + var reader = new java.io.BufferedReader(new java.io.InputStreamReader(stream, this._getCharset())); + var line; + while ((line = reader.readLine()) != null) { + if (this.readyState == 2) { + this.readyState = 3; + if (this.onreadystatechange) { + this.onreadystatechange(); + } + } + reqdata += line + '\n'; + } + reader.close(); + this.status = 200; + this.statusText = 'OK'; + this.responseText = reqdata; + this.readyState = 4; + if (this.onreadystatechange) { + this.onreadystatechange(); + } + if (this.onload) { + this.onload(); + } + } else { + // error + this.status = 404; + this.statusText = 'Not Found'; + this.responseText = ''; + this.readyState = 4; + if (this.onreadystatechange) { + this.onreadystatechange(); + } + if (this.onerror) { + this.onerror(); + } + } + }; + }; +} +// ActiveXObject emulation +if (!window.ActiveXObject && window.XMLHttpRequest) { + window.ActiveXObject = function(type) { + switch (type.toLowerCase()) { + case 'microsoft.xmlhttp': + case 'msxml2.xmlhttp': + case 'msxml2.xmlhttp.3.0': + case 'msxml2.xmlhttp.4.0': + case 'msxml2.xmlhttp.5.0': + return new XMLHttpRequest(); + } + return null; + }; +} \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/feedburner-plugin/fdfeedburner.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/feedburner-plugin/fdfeedburner.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,234 @@ + + +
    +

    "; + _e('Configuration updated.'); + echo "

    "; +} +?> +

    +
    +

    How does this work?

    +

    +

    Feedburner.com and burn your feed. Enter the URL Feedburner created for you. You may optionally redirect your comments feed using the same procedure. To disable redirection, disable the plugin or erase the URLs.'); + ?>

    +

    +

    +
    +
    +

    +

    + +

    +

    + +

    Advanced Options

    +

    + /> + +

    +

    + /> + +

    +

    + /> + +

    + +

    +
    + +query_vars['category_name'] != null) { + $cat = $wp->query_vars['category_name']; + } + if ($wp->query_vars['cat'] != null) { + if ($wp_db_version >= 6124) { + // 6124 = WP 2.3 + $cat = $wpdb->get_var("SELECT slug FROM $wpdb->terms WHERE term_id = '".$wp->query_vars['cat']."' LIMIT 1"); + } else { + $cat = $wpdb->get_var("SELECT category_nicename FROM $wpdb->categories WHERE cat_ID = '".$wp->query_vars['cat']."' LIMIT 1"); + } + } + if ($options['feedburner_append_cats'] == 1 && $cat) { + $feed_url .= '_'.$cat; + } + + // Get tag + $tag = null; + if ($wp->query_vars['tag'] != null) { + $tag = $wp->query_vars['tag']; + } + if ($options['feedburner_append_cats'] == 1 && $tag) { + $feed_url .= '_'.$tag; + } + + // Get search terms + $search = null; + if ($wp->query_vars['s'] != null) { + $search = $wp->query_vars['s']; + } + + // Redirect comment feed + if ($feed == 'comments-rss2' || is_single() || $withcomments) { + if ($comment_url != null) { + header("Location: ".$comment_url); + die; + } + } else { + // Other feeds + switch($feed) { + case 'feed': + case 'rdf': + case 'rss': + case 'rss2': + case 'atom': + if (($cat || $tag) && $options['feedburner_no_cats'] == 1) { + // If this is a category/tag feed and redirect is disabled, do nothing + } else if ($search && $options['feedburner_no_search'] == 1) { + // If this is a search result feed and redirect is disabled, do nothing + } else { + if ($feed_url != null) { + // Redirect the feed + header("Location: ".$feed_url); + die; + } + } + } + } +} + +/* +================================================== +Add action hooks +================================================== +*/ +add_action('template_redirect', 'feedburner_redirect'); +?> diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/feedburner-plugin/readme.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/feedburner-plugin/readme.txt Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,30 @@ +=== FD Feedburner Plugin === +Contributors: fd +Donate link: http://flagrantdisregard.com/feedburner/ +Tags: feedburner, redirect, rss, feed +Requires at least: 2.0 +Tested up to: 2.8.4 +Stable tag: trunk + +Redirects the main feed and optionally the comments feed seamlessly and +transparently to Feedburner.com. + +== Description == + +Redirects the main feed and optionally the comments feed to Feedburner.com. It +does this seamlessly without the need to modify templates, setup new hidden +feeds, modify .htaccess files, or asking users to migrate to a new feed. All +existing feeds simply become Feedburner feeds seamlessly and transparently for +all users. Just tell the plugin what your Feedburner feed URL is and you're +done. + +== Installation == + +1. Copy fdfeedburner.php into wp-content/plugins +1. Activate the plugin through the 'Plugins' menu in WordPress +1. Configure your feed from the new Feedburner submenu + +== Changelog == + += 1.41 = +* Added option to not redirect search result feeds diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/future-posts-calendar/future_calendar.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/future-posts-calendar/future_calendar.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,277 @@ + +
    + + +
    + 'Future Posts'); + $options = (array) get_option('widget_fut_posts'); + + foreach ( $defaults as $key => $value ) + if ( !isset($options[$key]) ) + $options[$key] = $defaults[$key]; + + echo $before_widget . $before_title . $title . $after_title; + fcal_get_future_posts(0); + echo $after_widget; + } + + + register_sidebar_widget('Future Posts', 'widget_fut_posts'); + register_widget_control('Future Posts', 'widget_fut_posts_control'); +} + +// Delay plugin execution to ensure Dynamic Sidebar has a chance to load first +add_action('widgets_init', 'widget_fut_posts_init'); + + +function future_post_sidebar(){ + $title = __('Future Post','fcal'); + echo '
    ' . '

    ' . $title . '

    '; + fcal_get_future_posts(); + echo '
    '; +} + +function fcal_javascript(){ + echo ' + + '; +} + + +function get_future_calendar_html(){ +global $wp_version; + + if($wp_version < 2.5){ + echo '
    '; + echo '

    '.__('Future Post Dates','fcal').'

    '; + echo '
    '; + fcal_get_future_posts(); + echo '
    '; + }else{ + echo '
    '; + echo '

    '.__('Future Post Dates','fcal').'

    '; + fcal_get_future_posts(); + echo '
    '; + + } + +} + +function fcal_get_future_posts($onclick = 1){ +global $wpdb, $wp_locale; + + $thisyear = gmdate('Y', current_time('timestamp')); + $thismonth = gmdate('m', current_time('timestamp')); + + // Quick check. If we have no posts at all, abort! + if ( !$posts ) { + $gotsome = $wpdb->get_var("SELECT ID from $wpdb->posts WHERE post_type = 'post' AND post_status = 'future' ORDER BY post_date DESC LIMIT 1"); + if ( !$gotsome ){ + get_future_calendar($thismonth,$thisyear,$onclick); + return; + } + } + + get_future_calendar($thismonth,$thisyear,$onclick); + + //Technically thismonth is really nextmonth, but no reason to be technical about it + //But if thismonth is 12 then we need to reset it, and add a year otherwise we will be checking + // out the 13th month of this year. + if($thismonth == 12){ + $thismonth = 0; + $thisyear +=1; + } + // Get months this year and next with at least one post + $future = $wpdb->get_results("SELECT + DISTINCT MONTH(post_date) AS month, YEAR(post_date) AS year + FROM $wpdb->posts + WHERE post_date >'$thisyear-".($thismonth+1)."-01' + AND post_type = 'post' AND post_status = 'future' + ORDER BY post_date ASC"); + + foreach($future as $now){ + get_future_calendar($now->month,$now->year); + } +} + + +// Calendar Output... +function get_future_calendar( $thismonth ='', $thisyear='', $onclick=1, $initial=true ) { + global $wpdb, $timedifference, $wp_locale; + $unixmonth = mktime(0, 0 , 0, $thismonth, 1, $thisyear); + + // week_begins = 0 stands for Sunday + $week_begins = intval(get_option('start_of_week')); + $add_hours = intval(get_option('gmt_offset')); + $add_minutes = intval(60 * (get_option('gmt_offset') - $add_hours)); + + 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); + 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 = 'future' + AND post_date > '" . current_time('mysql') . '\'', ARRAY_N); + if ( $dayswithposts ) { + foreach ( $dayswithposts as $daywith ) { + $daywithpost[] = $daywith[0]; + } + } else { + $daywithpost = array(); + } + + + + if ( strstr($_SERVER['HTTP_USER_AGENT'], 'MSIE') || strstr(strtolower($_SERVER['HTTP_USER_AGENT']), 'camino') || strstr(strtolower($_SERVER['HTTP_USER_AGENT']), 'safari') ) + $ak_title_separator = "\n"; + else + $ak_title_separator = ', '; + + $ak_titles_for_day = array(); + //sets the Density Thermometer + $ak_posts_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 = 'future'" + ); + if ( $ak_post_titles ) { + foreach ( $ak_post_titles as $ak_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"] = str_replace('"', '"', wptexturize($ak_post_title->post_title)); + else + $ak_titles_for_day["$ak_post_title->dom"] .= $ak_title_separator . str_replace('"', '"', wptexturize($ak_post_title->post_title)); + + $ak_posts_for_day["$ak_post_title->dom"] +=1; + + } + } + + + // 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".''; } + + //Determines the Density Thermometer colors + $thermo = Array( "#BDFFBE", "#7AFFDE", "#2FEEFF", "#108BFF", "#0E72FF" ); + + + $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 ''; + + echo "\n\t\n\t\n\t
    ' . $wp_locale->get_month($thismonth) . ' ' . $thisyear . '
    $day_name
     
    '; + else + echo ''; + + if($onclick == 1){ + $onclick1 = 'onclick="fcal_set_date('.$day.','.($thismonth-1).','.$thisyear.')"'; + } + + // any posts on that day? + if ( in_array($day, $daywithpost) ) { + //Outputs the Density Thermometer along with the day... + echo ' 
    "; +} +?> diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/future-posts-calendar/readme.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/future-posts-calendar/readme.txt Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,18 @@ +=== Future Posts Calendar Plugin === +Contributors: Aaron Harun +Donate link: http://anthologyoi.com/about/donate/ +Tags: calendar, future posts, edit, post, date, admin,widget,stats +Requires at least: 2.1 +Tested up to: 2.5 (Trunk) +Stable tag: 1.0 + +This plugin adds a monthly calendar that shows all the dates you have future posts. + +== Description == +It adds a simple month-by-month calendar that shows all the months you have future posts for (and the current month no matter what), it highlights the days you have posts for, and as an added bonus if you click a day, the Post Timestamp boxes change to that day, month and year (although it doesn’t check the edit timestamp box to avoid accidental changes). + +== Installation == +1. Download the zip file +1. Unzip and upload future_posts.php to your *wp-content/plugins/* folder. +1. The new box will automatically appear on edit/write post pages. +1. Optionally you can add it as a sidebar widget or uncomment the line "//add_action('activity_box_end', 'get_future_calendar_html');" to have it appear on your dashboard, or use the Dashboard Editor plugin to add it as a widget. diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/ggis-subscribe/ggis-subscribe.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/ggis-subscribe/ggis-subscribe.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,558 @@ +formAction = 'http://dvector.com/ggis_wp-subscribe.php'; +// $this->formAction = WP_PLUGIN_URL . '/ggis_wp-subscribe.php'; + } + function addHeaderCode(){ + echo ''; + } + + // OUTPUT FUNCTIONS + var $processing_unit_tag; + var $processing_within; + var $unit_count; + var $widget_count; + var $regex; + function the_content_filter($content) { + $this->processing_within = 'p' . get_the_ID(); + $this->unit_count = 0; + + + $regex = '/\[-\s*ggis-subscribe\s*(\d+)?\s*(".*")?\s*-\]/'; +// $regex = '/\[-\s*ggis-subscribe\s+(\d+)(?:\s+.*?)?\s*-\]/'; // [-ggis-subscribe 1 -] +// $regex = '//'; + return preg_replace_callback($regex, array(&$this, 'the_content_filter_callback'), $content); + + $this->processing_within = null; + } + + function widget_text_filter($content) { + $this->widget_count += 1; + $this->processing_within = 'w' . $this->widget_count; + $this->unit_count = 0; + + $regex = '/\[-\s*ggis-subscribe\s*(\d+)?\s*(".*")?\s*-\]/'; + return preg_replace_callback($regex, array(&$this, 'the_content_filter_callback'), $content); + + $this->processing_within = null; + } + + function the_content_filter_callback($matches) { + + // GET AND SET VARIABLES + $list_select = ''; + $listonly = NULL; + $options = unserialize( get_option( 'ggis-Subscribe')); + $options['maillists'] = explode( ',', $options['maillists'] ); + $id = (int) $matches[1]; + + // DETERMINE FORM TYPE + if ( $id == 1 ){ + $listonly = str_replace( '"', '', $matches[2]); + if ( !is_email( $listonly) ){ + $id = 0; + } + }else { + $id = 0; + } + + // FORM HEADERS + $this->unit_count += 1; + $unit_tag = 'ggis-subscribe-f' . $id . '-' . $this->processing_within . '-o' . $this->unit_count; + $this->processing_unit_tag = $unit_tag; + + $form = '
    '; + $form .= '
    '; + $form .= ''; + $form .= ''; + $form .= ''; + + // CREATE EITHER A HIDDEN FIELD OR SELECT BOX FOR MAILING LIST + if ( $id == 1 ){ + $list_select .= ''; + }else{ + if ( count( $options['maillists']) == 1 ){ + $list_select .= ''; + } else{ + $list_select .= 'Which list?
    + '; + foreach( $this->managertypes as $manager ){ + $list_select .= '
    + + + date = $_POST['date']; + $g->notes = $_POST['notes']; + $g->setTags($_POST['tags']); + $g->eventName = $_POST['eventName']; + + if ( isset($_POST['performanceID']) ) { + foreach ( $_POST['performanceID'] as $key => $pid ) { + $p = new performance((empty($pid) ? null : $pid)); + $p->gigID = $g->id; + $p->link = $_POST['link'][$key]; + $p->shortNotes = $_POST['shortNotes'][$key]; + $p->ages = (empty($_POST['ages-custom'][$key]) ? $_POST['ages'][$key] : $_POST['ages-custom'][$key]); + $p->time = date("H:i:s", strtotime($_POST['hour'][$key] . ':' . $_POST['minute'][$key] . ' ' . $_POST['meridiem'][$key])); + $p->save(); + } + } + + $p = new performance(); + if ( isset($_POST['delete']) ) { + foreach ( $_POST['delete'] as $pid ) { + $p->get($pid); + $p->delete(); + } + } + + $g->save(); + + foreach ( $_POST['deletecustom'] as $key => $delete ) { + if ( $delete ) { + delete_post_meta($g->postID, $_POST['custom-key'][$key], $_POST['old-custom-value'][$key]); + } + } + + foreach ( $_POST['custom-key'] as $key => $field ) { + if ( is_array($_POST['custom-value'][$key]) ) { + foreach ( $_POST['custom-value'][$key] as $k => $v ) { + if ( $v === "" ) { + unset($_POST['custom-value'][$key][$k]); + } + } + } + if ( empty($_POST['custom-value'][$key]) && empty($_POST['old-custom-value'][$key]) ) { + // If both value fields are empty, just ignore this field. + continue; + } elseif ( $_POST['custom-value'][$key] === "" ) { + // If the old value is not empty, but the new one is, delete this sucker. + delete_post_meta($g->postID, $_POST['custom-key'][$key], $_POST['old-custom-value'][$key]); + } elseif ( $_POST['old-custom-value'][$key] === "" ) { + // If the old value is empty, but the new one is not, create a new custom field. + add_post_meta($g->postID, $_POST['custom-key'][$key], $_POST['custom-value'][$key]); + } elseif ( $_POST['old-custom-value'][$key] != $_POST['custom-value'][$key] && $_POST['old-custom-value'][$key] != serialize($_POST['custom-value'][$key]) ) { + // If the old and new values are not equal, update the custom field. + update_post_meta($g->postID, $_POST['custom-key'][$key], $_POST['custom-value'][$key], unserialize($_POST['old-custom-value'][$key])); + } + } + + echo '{success:true, gig:' . $g->toJSON() . '}'; + break; + + case 'performance-form': + if ( isset($_POST['id']) ) { + pForm($_POST['id'], false); + } else { + pForm((int) $_POST['count'], true); + } + break; +} + + +function pForm($id, $new = true, $remove = true) { + global $folder, $gcd, $options; + $p = new performance(); + if ( $new ) { + $count = 'c' . $id; + } else { + $p->get($id); + $count = 'id' . $id; + } + + $ages = $options['ages-list']; + + $time = explode(":", $p->time); + $minutes = $time[1]; + + if ( $options['time-12h'] ) { + if ( $time[0] == 0 ) { + $hour = "12"; + $meridiem = "AM"; + } elseif ( $time[0] == 12 ) { + $hour = "12"; + $meridiem = "PM"; + } elseif ( $time[0] < 12 ) { + $hour = $time[0]; + $meridiem = "AM"; + } else { + $hour = $time[0] - 12; + $meridiem = "PM"; + } + } else { + $hour = $time[0]; + } + ?> + + + + + + + + + + +
    + + +
    + + + + + + + + +
    <?php _e('Remove Performance', $gcd) ?>
    + +
    +
    + + + +
    + + + +
    + + + + + +
    + + diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/gigs-calendar/credits.ajax.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/gigs-calendar/credits.ajax.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,13 @@ + + +

    + Dan Coulter. If you need some custom PHP development (for WordPress or not), I am available for hire (you can get in touch with me through this plugin). To find other free plugins and useful tips for bands and musicians, visit my new site, Blogs for Bands.', $gcd) ?> +

    +

    + support the development of this free plugin through Paypal. If you have specific features that you need, you can request them through the feedback form or hire me to develop them for you.', $gcd) ?> +

    +

    + Silk icons were created by Mark James. They are licensed under the Creative Commons.', $gcd) ?> +

    + + diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/gigs-calendar/feedback.ajax.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/gigs-calendar/feedback.ajax.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,98 @@ + +

    + + + $value ) { + if ( $key != 'nonce' && $key != 'message' && $key != 'action' ) { + $msg .= $key . ': ' . $value . "\n"; + } + } + + $msg .= 'Plugin Version: ' . DTC_GIGS_PLUGIN_VERSION . "\n"; + $msg .= 'Database Version: ' . DTC_GIGS_DB_VERSION . "\n"; + + $msg .= "\nMessage:\n" . $_POST['message']; + + if ( $_POST['settings'] == '1' ) { + $msg .= "\n\n\nSettings:\n" . print_r($options, true); + } + if ( wp_mail($feedbackEmail, 'Gigs Calendar - ' . $_POST['type'], $msg, 'Reply-To: ' . str_replace(array("\r", "\n"), '', $_POST['email'])) ) { + echo '{success: true}'; + } else { + echo '{success: false}'; + } +} + +?> diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/gigs-calendar/gigs-calendar-admin-wp2.5.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/gigs-calendar/gigs-calendar-admin-wp2.5.css Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,23 @@ +ul#gigs-menu { + margin: .5em 0px; +} + +div.instructions { + background-color: #E4F2FD; +} + +table#gig-list.widefat table td { + border: 0px; +} + +div#postcustomstuff-new table td { + vertical-align: top; +} + +div#postcustomstuff-new table th { + line-height:1.3em; + padding:9px 15px 6px 10px; + text-align:left; + color:#D7D7D7; + background-color: #464646; +} \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/gigs-calendar/gigs-calendar-admin.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/gigs-calendar/gigs-calendar-admin.css Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,160 @@ +.todo { + display: none; +} + +a img { + border: 0px; +} + +#loading, .loading {text-align: center} + +ul#gigs-menu { + margin: 0px 5%; + padding: 0px; +} + +li.selected {font-weight: bold} + +img.inline-icon { + position: relative; + top: 3px; +} + +.inside { + display: none; +} + +ul#gigs-menu li { + display:inline; + list-style-image:none; + list-style-position:outside; + list-style-type:none; + text-align:center; + white-space:nowrap; + padding-right: 1em; + cursor: pointer; +} + +div#gigs-wrapper.wrap { + margin-top: 0px; +} + +div.gigs-page { + display: none; +} + +.drag { + cursor: move; +} + +.icon { + position: relative; + top: 3px; +} + +.clickable { + cursor: pointer; +} + +.no-margin { + margin: 0px; +} + +.done { + text-decoration: line-through; +} + +input.price { + width: 50px; +} + +form table, form td { + border: 0px; + border-collapse: collapse; + padding: 0px; +} + +form .wide { + width: 300px; +} + +form.new-item div, form.new-item td { + padding-bottom: 7px; +} + +tr.panel { + display: none; +} + +a img, td.actions a { + text-decoration: none; + border: 0px; +} + +span.link { + text-decoration: underline; + color: #6699CC; + cursor: pointer; +} + +div.instructions { + border: 1px solid #AAAAAA; + padding: 4px; + text-align: center; + font-size: .9em; +} + +.alternate input, .alternate select, .alternate textarea { + background-color: #fff; +} + +/**** Styles for Feedback page ****/ + #feedback form { + padding-left: 2em; + } + + #feedback textarea { + width: 500px; + height: 300px; + } + + #feedback form div { + margin-bottom: 7px; + } + +/**** Styles for Gigs page ****/ + table.performance { + border: 1px dotted #777777; + border-collapse: collapse; + } + + table.performance td { + padding: 3px; + } + + table.performance td div { + position: relative; + } + + table.performance div.delete-performance { + position: absolute; + top: 0px; + right: 0px; + } + +/**** Styles for Settings page ****/ + ul#gigs-table, ul#gig-title, ul.sortable { + list-style-image:none; + list-style-position:outside; + list-style-type:none; + padding-left: 1em; + } + + form div { + line-height: 2em; + } + + .sortable .handle { + cursor: move; + } + \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/gigs-calendar/gigs-calendar.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/gigs-calendar/gigs-calendar.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,917 @@ + + + + + = 2.5 ) { + ?> + + + + + + __('Gigs', $gcd), + 'archive' => __('Archive', $gcd), + 'venues' => __('Venues', $gcd), + 'tours' => __('Tours', $gcd), + 'settings' => __('Settings', $gcd), + 'feedback' => __('Feedback/Bugs', $gcd), + 'credits' => __('Credits', $gcd), + ); + + foreach ( $pages as $key => $name ) { + $pages[$key] = array('name'=>$name, 'key'=>$key, 'url'=>$folder . $key . '.ajax.php'); + } + + if ( $options['admin-only-settings'] && !current_user_can('administrator') ) { + unset($pages['settings']); + } + + $pages = apply_filters('gigCal_pages', $pages); + ?> + +
    +

    +
      + +
    • +
    • +
    • + + +
    • + + +
    +
    +
    +
    + +
    + +
    + +
    +
    + + sortTours(); + foreach ( $tours as $tour ) { + dtc_gigs::generateList(array( + 'caption'=> $is_archive ? __('Upcoming shows', $gcd) : '', + 'dateFormat' => 'short', + 'tour' => $tour, + )); + } + dtc_gigs::generateList(array( + 'caption'=> '
    ' . __('Other shows', $gcd) . '
    ', + 'dateFormat' => 'short', + 'tour' => -1, + )); + } else { + dtc_gigs::generateList(array( + 'caption'=> $is_archive ? __('Upcoming shows', $gcd) : '', + 'dateFormat' => 'short', + )); + } + } + if ( !empty($options['archive']) && is_page($options['archive']) ) { + if ( $options['tours-display'] ) { + $t = new tour(); + $tours = $t->sortTours(); + foreach ( $tours as $tour ) { + dtc_gigs::generateList(array( + 'upcoming'=>false, + 'caption'=> $is_archive ? __('Upcoming shows', $gcd) : '', + 'dateFormat' => 'short', + 'tour' => $tour, + )); + } + dtc_gigs::generateList(array( + 'upcoming'=>false, + 'caption'=> '
    ' . __('Other shows', $gcd) . '
    ', + 'dateFormat' => 'short', + 'tour' => -1, + )); + } else { + dtc_gigs::generateList(array( + 'upcoming'=>false, + 'caption'=> $is_parent ? __('Past show archive', $gcd) : '', + 'dateFormat' => 'archive', + )); + } + } + + dtcGigs::loadTemplate('rss'); + dtcGigs::loadTemplate('attribution'); + $out = ob_get_clean(); + if ( $options['calendar-position'] == 'bottom' ) { + $out = '
    ' . $in . '
    ' . $out; + } else { + $out .= '
    ' . $in . '
    '; + } + } else { + $g = new gig(); + if ( $g->getByPostID($post->ID) ) { + $data = array( + 'g' => $g, + 'v' => $g->getVenue(), + 'p' => $g->getPerformances(), + 'image_folder' => dtc_gigs::get_url() . 'images/', + 'tags' => $g->getTags(), + 'tags_slugs' => $g->getTags(true), + 'custom' => $g->getCustom(), + ); + ob_start(); + dtcGigs::loadTemplate('gig-post', null, $data); + $out = ob_get_clean(); + + $out = '
    ' . $in . '
    ' . $out; + } else { + $out = $in; + } + } + if ( preg_match_all('~\[gig-cal ?(.*?)\]~', $out, $matches) ) { + $matches[0] = array_unique($matches[0]); + foreach ( $matches[0] as $key => $match ) { + $args = array(); + parse_str(str_replace(' ', '&', $matches[1][$key]), $args); + $args['upcoming'] = (strpos($matches[1][$key], 'archive') !== FALSE) ? false : true; + $args['return'] = true; + $out = str_replace($match, dtc_gigs::generateList($args), $out); + } + } + return $out; + } + + function upgrade() { + global $wpdb; + + if ( isset($wpdb->charset) && !empty($wpdb->charset) ) { + $charset = ' DEFAULT CHARSET=' . $wpdb->charset; + } elseif ( defined(DB_CHARSET) && DB_CHARSET != '' ) { + $charset = ' DEFAULT CHARSET=' . DB_CHARSET; + } else { + $charset = ''; + } + + $queries = array( + array( // 1 + ' + CREATE TABLE IF NOT EXISTS `' . TABLE_VENUES . '` ( + `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , + `name` VARCHAR( 255 ) NOT NULL , + `address` TEXT NOT NULL , + `city` VARCHAR( 255 ) NOT NULL , + `state` VARCHAR( 255 ) NOT NULL , + `country` VARCHAR( 255 ) NOT NULL , + `postalCode` VARCHAR( 255 ) NOT NULL , + `contact` VARCHAR( 255 ) NOT NULL , + `phone` VARCHAR( 255 ) NOT NULL , + `email` VARCHAR( 255 ) NOT NULL , + `link` VARCHAR( 255 ) NOT NULL , + `notes` TEXT NOT NULL , + `private` TINYINT NOT NULL , + `apiID` INT UNSIGNED NOT NULL , + `deleted` TINYINT NOT NULL + ) ' . $charset . ' + ', ' + CREATE TABLE IF NOT EXISTS `' . TABLE_GIGS . '` ( + `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , + `venueID` INT UNSIGNED NOT NULL , + `date` DATE NOT NULL , + `notes` TEXT NOT NULL, + `postID` BIGINT UNSIGNED NOT NULL + ) ' . $charset . ' + ', ' + CREATE TABLE IF NOT EXISTS `' . TABLE_PERFORMANCES . '` ( + `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , + `gigID` INT UNSIGNED NOT NULL , + `time` TIME NULL , + `link` VARCHAR( 255 ) NOT NULL , + `shortNotes` VARCHAR( 255 ) NOT NULL , + `ages` VARCHAR( 255 ) NOT NULL + ) ' . $charset . ' + ' + ), array( // 2 + 'ALTER TABLE `' . TABLE_VENUES . '` ADD `customMap` VARCHAR( 255 ) NOT NULL', + 'ALTER TABLE `' . TABLE_GIGS . '` ADD `eventName` VARCHAR( 255 ) NOT NULL', + ), array( // 3 + ' + CREATE TABLE `' . TABLE_TOURS . '` ( + `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , + `name` VARCHAR( 255 ) NOT NULL , + `notes` MEDIUMTEXT NOT NULL , + `pos` INT UNSIGNED NOT NULL + ) ' . $charset . ' + ', ' + ALTER TABLE `' . TABLE_GIGS . '` ADD `tour_id` INT UNSIGNED NULL + ', + ), + + + + ); + for ( $i = (int) get_option('gig_db_version'); $i < (int) DTC_GIGS_DB_VERSION; $i++) { + if ( isset($queries[$i]) ) { + foreach ( $queries[$i] as $q ) { + $wpdb->query($q); + } + } + } + + if ( count($wpdb->get_results('show tables like "' . GIGS_DB_PREFIX . 'gigs_%"')) != 4 ) { + update_option("gig_db_version", -1); + } else { + update_option("gig_db_version", (int) DTC_GIGS_DB_VERSION); + } + } + + + function hide_posts($where) { + $o = get_option('gigs-calendar'); + if ( 0 < (int) get_option('gig_db_version') && $o['post-filtering'] ) { + global $wp_the_query; + global $wp_query; + global $wp_actions; + global $wpdb; + if ( in_array('get_sidebar', $wp_actions) ) { + $where .= ' AND ID NOT IN (SELECT postID FROM ' . TABLE_GIGS . ')'; + } elseif ( (is_single() || (function_exists('is_tag') && is_tag())) ) { + return $where; + } elseif ( (!is_category() || $wp_the_query->query_vars['cat'] != $o['category']) || defined('gigs-query-mod')) { + $where .= ' AND ID NOT IN (SELECT postID FROM ' . TABLE_GIGS . ')'; + } + } + return $where; + } + + function hide_archives($where) { + $o = get_option('gigs-calendar'); + if ( $o['post-filtering'] ) { + global $wpdb; + return $where . ' AND ID NOT IN (SELECT postID FROM ' . TABLE_GIGS . ')'; + } + } + + + function post_nav($where) { + $o = get_option('gigs-calendar'); + if ( 0 < (int) get_option('gig_db_version') && $o['post-filtering'] ) { + global $wp_the_query, $include_folder, $wpdb, $wp_version; + + include_once 'gigs-classes.php'; + + $wtq = $wp_the_query; + $g = new gig(); + + $table = ''; // This will let me support versions < 2.3 + if ( (float) $wp_version >= 2.3 ) { + $table = 'p.'; + } + + if ( $wtq->is_single && $wpdb->get_var('SELECT COUNT(*) FROM ' . TABLE_GIGS . ' WHERE postID = ' . $wtq->post->ID) ) { // Is a gig + $where .= ' AND ' . $table . 'ID IN (SELECT postID FROM ' . TABLE_GIGS . ')'; + } else { + $where .= ' AND ' . $table . 'ID NOT IN (SELECT postID FROM ' . TABLE_GIGS . ')'; + } + } + return $where; + } + + function widget_upcoming($args) { + extract($args); + $o = get_option('gigs-calendar'); + if ( !isset($o['widget']['upcoming']) ) $o['widget']['upcoming'] = array(); + ?> + + + true, + 'limit'=>$o['widget']['upcoming']['length'], + 'template'=>'upcoming-widget', + ), + $o['widget']['upcoming'] + )); + ?> + + 'City', + 'country' => 'Country', + 'venue' => 'Venue', + 'eventName' => 'Event Name', + ); + + ?> +

    + +

    +

    + +

    +

    + date() function syntax', $gcd) ?> +

    +

    + +

    +

    + +

    +

    + +

    +

    + +

    + __('Next Gig', $gcd)); + ?> + + + true, + 'limit'=>1, + 'template'=>'next-widget', + )); + ?> + + __('Next Gig', $gcd), + ); + + if ( !isset($o['widget']['next']) ) { + $o['widget']['next'] = array(); + } + + $o['widget']['next'] = array_merge($defaults, $o['widget']['next']); + + if ( isset($_POST['gigs_next_title']) ) { + $o['widget']['next']['title'] = !empty($_POST['gigs_next_title']) ? $_POST['gigs_next_title'] : $defaults['title']; + print_r($o['widget']); + update_option('gigs-calendar', $o); + } + + ?> +

    + +

    + true, + 'limit' => false, + 'tour' => false, + 'template' => 'gigs-list', + 'dateFormat' => ($args['upcoming'] === false ? 'archive' : 'short'), + 'force' => false, + 'year' => null, + 'month' => null, + 'caption' => null, + ); + + + $args = is_array($args) ? array_merge($defaults, $args) : $defaults; + extract($args); + + $listFields = array( + 'city' => __('City', $gcd), + 'country' => __('Country', $gcd), + 'venue' => __('Venue', $gcd), + 'eventName' => __('Event', $gcd), + 'date' => __('Date', $gcd), + 'time' => __('Time', $gcd), + 'shortNotes' => __('Notes', $gcd), + 'tickets' => __('Tickets', $gcd), + 'map' => __('Map', $gcd), + ); + + $show_fields = $options['gigs-table-show']; + if ( !$upcoming && in_array( 'tickets', $show_fields ) ) { + unset( $show_fields[array_search('tickets', $show_fields)] ); + } + + $gig_ids = array(); + if ( is_null($year) && is_null($month) ) { + $gigs = $wpdb->get_results(' + SELECT + *, + g.notes as gigNotes, + v.notes as venueNotes, + g.id as gigID, + v.link as venueLink + FROM + `' . TABLE_GIGS . '` AS g + LEFT JOIN + `' . TABLE_VENUES . '` AS v ON ( g.venueID = v.id ) + WHERE + `date` ' . ($upcoming ? '>=' : '<=') . ' CURDATE() + ' . (($tour && $tour != -1) ? ' AND tour_id = ' . (int) $tour : '') . ' + ' . ($tour == -1 ? ' AND tour_id is null' : '') . ' + ORDER BY + `date` ' . ($upcoming ? 'ASC' : 'DESC') . ' + ' . ( !empty($limit) ? ' LIMIT ' . $limit : '' ) . ' + + '); + } else { + $gigs = $wpdb->get_results(' + SELECT + *, + g.notes as gigNotes, + v.notes as venueNotes, + g.id as gigID, + v.link as venueLink + FROM + `' . TABLE_GIGS . '` AS g + LEFT JOIN + `' . TABLE_VENUES . '` AS v ON ( g.venueID = v.id ) + WHERE + 1=1 + ' . ( !is_null($year) ? 'AND YEAR(`date`) = ' . (int) $year : '' ) . ' + ' . ( !is_null($month) ? 'AND MONTH(`date`) = ' . (int) $month : '' ) . ' + ' . (($tour && $tour != -1) ? ' AND tour_id = ' . (int) $tour : '') . ' + ' . ($tour == -1 ? ' AND tour_id is null' : '') . ' + ORDER BY + `date` ' . ($upcoming ? 'ASC' : 'DESC') . ' + ' . ( !empty($limit) ? ' LIMIT ' . $limit : '' ) . ' + + '); + } + + if ( $tour !== false && $tour !== "false" ) { + if ( !count($gigs) && !$options['tours-empty'] && !$force ) { + return ''; + } + if ( $t != -1 && empty($caption) ) { + $t = new tour($tour); + $caption = '
    ' . $t->name . '
    ' . $t->notes . '
    '; + } + } + + + $performances = $wpdb->get_results(' + SELECT + p.* + FROM + `' . TABLE_GIGS . '` AS g + LEFT JOIN + `' . TABLE_PERFORMANCES . '` AS p ON ( g.id = p.gigID ) + ORDER BY + `time` ASC + '); + + foreach ( $gigs as $key => $g ) { + if ( empty($g->venueID) ) { + $g->mapLink = false; + } else { + $g->mapLink = dtcGigs::mapLink($g); + } + $g->cityState = $g->city . ( empty($g->state) ? '' : ', ' . $g->state ); + $g->cityStateCountry = $g->city . ( empty($g->state) ? '' : ', ' . $g->state ) . ( empty($g->country) ? '' : ', ' . $g->country ); + $g->cityCountry = $g->city . ( empty($g->country) ? '' : ', ' . $g->country ); + $g->permalink = get_permalink($g->postID); + $g->shortDate = dtcGigs::dateFormat($g->date, 'short'); + $g->longDate = dtcGigs::dateFormat($g->date, 'long'); + $g->archiveDate = dtcGigs::dateFormat($g->date, 'archive'); + $g->mysqlDate = $g->date; + $g->date = dtcGigs::dateFormat($g->date, $dateFormat); + $g->id = $g->gigID; + $g->id = $g->gigID; + $g->performances = array(); + $g->tags_slugs = array(); + $g->tags = function_exists('wp_get_post_tags') ? wp_get_post_tags($g->postID) : array(); + $gig_ids[$g->gigID] = $key; + foreach ( $g->tags as $tagkey => $tag ) { + $g->tags[$tagkey] = $tag->name; + $g->tags_slugs[$tagkey] = 'gc-' . $tag->slug; + } + $g->custom = get_post_custom($g->postID); + $gigs[$key] = $g; + } + + foreach ( $performances as $p ) { + $p->time_12h = dtcGigs::timeFormat($p->time, '12h'); + $p->time_24h = dtcGigs::timeFormat($p->time, '24h'); + $p->time = dtcGigs::timeFormat($p->time); + + if ( isset($gigs[$gig_ids[$p->gigID]]) ) { + $gigs[$gig_ids[$p->gigID]]->performances[] = $p; + } + } + + if ( is_file(dirname(__FILE__) . '/templates/' . $options['template'] . '/' . $template . '.php') ) { + include(dirname(__FILE__) . '/templates/' . $options['template'] . '/' . $template . '.php'); + } elseif ( is_file(ABSPATH . 'wp-content/gigs-templates/' . $options['template'] . '/' . $template . '.php') ) { + include(ABSPATH . 'wp-content/gigs-templates/' . $options['template'] . '/' . $template . '.php'); + } else { + include(dirname(__FILE__) . '/templates/' . 'basic/' . $template . '.php'); + } + $result = ob_get_clean(); + if ( $return ) return $result; + else echo $result; + } + + function upcomingList($args = array()) { + // This method has been depriciated. Stop using it! + global $include_folder; + $o = get_option('gigs-calendar'); + $defaults = array( + "length" => 5, + "dateFormat" => 'M j', + 'dateFormatYear' => 'M j, Y', + 'link' => array('city'), + 'return' => false, + ); + + + $args = array_merge($defaults, $args); + + include_once 'gigs-classes.php'; + $g = new gig(); + $g->search('`date` >= CURDATE()', '`date` ASC'); + + $count = 0; + if ( $g->_count ) : + + ?> +
      + fetch() ) : + $v = $g->getVenue(); + $p = $g->getPerformances(); + $link = array(); + foreach ( $args['link'] as $f ) { + switch ( $f ) { + case 'city': + $link[] = $v->getCity(); + break; + case 'venue': + $link[] = $v->name; + break; + case 'eventName': + $link[] = $g->eventName; + break; + } + } + $link = array_unique($link); + foreach ( $link as $key => $value ) { + if ( empty($value) ) unset($link[$key]); + } + ?> + +
    • date))) ? $args['dateFormat'] : $args['dateFormatYear'], strtotime($g->date . ' ' . $p->time)) ?>: + +
    • + = $args['length'] ) break; endwhile; ?> +
    + +
    + get_var('SELECT COUNT(*) FROM ' . TABLE_GIGS . ' WHERE postID = ' . (int) $id ) ) { + wp_publish_post($id); + } else { + _future_post_hook($id, $post); + } + } + } + + + + add_action('init', array('dtc_gigs', 'setup_future_hook')); + add_action('admin_menu', array('dtc_gigs', 'add_admin_page')); + + //add_filter('the_posts', array('dtc_gigs', 'test')); + + if ( 4.1 <= mysql_get_server_info() ) { + add_filter('posts_where', array('dtc_gigs', 'hide_posts')); + add_filter('get_next_post_where', array('dtc_gigs', 'post_nav')); + add_filter('get_previous_post_where', array('dtc_gigs', 'post_nav')); + add_filter('getarchives_where', array('dtc_gigs', 'hide_archives')); + } else { + + } + + add_filter('the_content', array('dtc_gigs', 'display')); + + add_action('plugins_loaded', array('dtc_gigs', 'init')); + + + if ( $_GET['page'] == 'gigs' ) : + // If not WP > 2.6, we'll need to include some custom scripts. + $folder = dtc_gigs::get_url(); + if ( (float) $wp_version < 2.6 ) { + wp_deregister_script('jquery'); + wp_deregister_script('interface'); + wp_deregister_script('jquery-form'); + wp_enqueue_script('jquery', $folder . 'js/jquery.js', array(), '1.2.6'); + wp_enqueue_script('jquery-form', $folder . 'js/jquery.form.js', array(), '2.02'); + wp_enqueue_script('jquery-ui-core', $folder . 'js/ui.core.js', array(), '1.5'); + wp_enqueue_script('jquery-ui-sortable', $folder . 'js/ui.sortable.js', array(), '1.5'); + } else { + wp_enqueue_script('jquery'); + wp_enqueue_script('jquery-form'); + wp_enqueue_script('jquery-ui-core'); + wp_enqueue_script('jquery-ui-sortable'); + } + wp_enqueue_script('jquery-ui-datepicker', $folder . 'js/ui.datepicker.min.js', array(), '1.5'); + wp_enqueue_script('jquery-tooltip', $folder . 'js/jquery.tooltip.min.js', array(), '1.2'); + + add_action('admin_head', array('dtc_gigs', 'admin_css')); + + if ( get_option('gig_db_version') != DTC_GIGS_DB_VERSION ) { + dtc_gigs::upgrade(); + } + + endif; + + add_action('wp_head', array('dtc_gigs', 'display_css')); +else: + require_once $include_folder . '/ajaxSetup.php'; +endif; + +?> diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/gigs-calendar/gigs-calendar.pot --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/gigs-calendar/gigs-calendar.pot Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,987 @@ +msgid "" +msgstr "" +"Project-Id-Version: Gigs Calendar\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2008-07-08 16:10-0600\n" +"PO-Revision-Date: 2008-07-08 16:10-0600\n" +"Last-Translator: Dan Coulter \n" +"Language-Team: Blogs for Bands \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-SourceCharset: utf-8\n" +"X-Poedit-KeywordsList: __;_e\n" +"X-Poedit-Basepath: .\n" +"X-Poedit-SearchPath-0: .\n" + +#: archive.ajax.php:16 +#: gigs.ajax.php:140 +#: tours.ajax.php:45 +#: venues.ajax.php:51 +msgid "ID" +msgstr "" + +#: archive.ajax.php:17 +#: gigs-calendar.php:620 +#: gigs.ajax.php:142 +#: settings.ajax.php:16 +#: settings.ajax.php:27 +msgid "Venue" +msgstr "" + +#: archive.ajax.php:18 +#: gigs-calendar.php:618 +#: gigs.ajax.php:143 +#: settings.ajax.php:14 +#: settings.ajax.php:26 +#: venues.ajax.php:53 +msgid "City" +msgstr "" + +#: archive.ajax.php:19 +#: gigs-calendar.php:622 +#: gigs.ajax.php:144 +#: settings.ajax.php:18 +#: settings.ajax.php:30 +msgid "Date" +msgstr "" + +#: archive.ajax.php:20 +#: gigs-calendar.php:623 +#: gigs.ajax.php:145 +#: settings.ajax.php:19 +msgid "Time" +msgstr "" + +#: archive.ajax.php:21 +#: gigs.ajax.php:146 +#: tours.ajax.php:48 +#: venues.ajax.php:56 +msgid "Actions" +msgstr "" + +#: archive.ajax.php:38 +#: gigs.ajax.php:164 +#: gigs.ajax.php:409 +msgid "View Gig" +msgstr "" + +#: archive.ajax.php:39 +#: gigs.ajax.php:165 +#: gigs.ajax.php:410 +#: tours.ajax.php:65 +#: tours.ajax.php:219 +#: venues.ajax.php:69 +#: venues.ajax.php:199 +msgid "Edit" +msgstr "" + +#: archive.ajax.php:41 +#: gigs-calendar.php:626 +#: gigs.ajax.php:167 +#: gigs.ajax.php:412 +#: tours.ajax.php:67 +#: tours.ajax.php:221 +#: venues.ajax.php:70 +#: venues.ajax.php:200 +#: templates/basic/gigs-list.php:28 +msgid "Map" +msgstr "" + +#: archive.ajax.php:44 +#: gigs.ajax.php:170 +#: gigs.ajax.php:415 +msgid "Edit WordPress Post" +msgstr "" + +#: archive.ajax.php:46 +#: gigs.ajax.php:172 +#: gigs.ajax.php:417 +#: settings.ajax.php:177 +#: tours.ajax.php:69 +#: tours.ajax.php:223 +#: venues.ajax.php:74 +#: venues.ajax.php:204 +msgid "Delete" +msgstr "" + +#: archive.ajax.php:122 +#: gigs.ajax.php:278 +msgid "Are you sure you want to remove this performance?" +msgstr "" + +#: archive.ajax.php:195 +#: gigs.ajax.php:22 +#: gigs.ajax.php:441 +msgid "Gig Information" +msgstr "" + +#: archive.ajax.php:196 +#: gigs.ajax.php:23 +#: gigs.ajax.php:442 +msgid "A \"gig\" is unique to a date at a venue." +msgstr "" + +#: archive.ajax.php:199 +#: gigs.ajax.php:26 +#: gigs.ajax.php:445 +msgid "Venue:" +msgstr "" + +#: archive.ajax.php:205 +#: gigs.ajax.php:41 +#: gigs.ajax.php:451 +msgid "Date:" +msgstr "" + +#: archive.ajax.php:209 +#: gigs.ajax.php:45 +#: gigs.ajax.php:455 +msgid "Event Name:" +msgstr "" + +#: archive.ajax.php:213 +#: gigs.ajax.php:49 +#: gigs.ajax.php:459 +msgid "Tour:" +msgstr "" + +#: archive.ajax.php:216 +#: gigs.ajax.php:52 +#: gigs.ajax.php:462 +#: settings.ajax.php:109 +#: settings.ajax.php:114 +msgid "--None--" +msgstr "" + +#: archive.ajax.php:226 +#: gigs.ajax.php:62 +#: gigs.ajax.php:472 +msgid "Post Tags:" +msgstr "" + +#: archive.ajax.php:231 +#: gigs.ajax.php:69 +#: gigs.ajax.php:478 +#: tours.ajax.php:28 +#: tours.ajax.php:252 +#: venues.ajax.php:36 +#: venues.ajax.php:243 +msgid "Description/Other notes:" +msgstr "" + +#: archive.ajax.php:242 +#: gigs.ajax.php:80 +#: gigs.ajax.php:489 +msgid "Click to expand" +msgstr "" + +#: archive.ajax.php:242 +#: gigs.ajax.php:80 +#: gigs.ajax.php:489 +msgid "Custom Fields" +msgstr "" + +#: archive.ajax.php:242 +#: gigs.ajax.php:80 +#: gigs.ajax.php:489 +msgid "Expand" +msgstr "" + +#: archive.ajax.php:242 +#: gigs.ajax.php:80 +#: gigs.ajax.php:489 +msgid "Collapse" +msgstr "" + +#: archive.ajax.php:248 +#: gigs.ajax.php:86 +#: gigs.ajax.php:495 +msgid "Key" +msgstr "" + +#: archive.ajax.php:249 +#: gigs.ajax.php:87 +#: gigs.ajax.php:496 +msgid "Value" +msgstr "" + +#: archive.ajax.php:266 +#: archive.ajax.php:315 +#: gigs.ajax.php:97 +#: gigs.ajax.php:189 +#: gigs.ajax.php:513 +#: gigs.ajax.php:562 +msgid "Remove Custom Field" +msgstr "" + +#: archive.ajax.php:279 +#: gigs.ajax.php:106 +#: gigs.ajax.php:526 +msgid "Add a new custom field" +msgstr "" + +#: archive.ajax.php:282 +#: gigs.ajax.php:109 +#: gigs.ajax.php:529 +msgid "Custom fields can be used to add extra metadata to a gig that you can use in a special template." +msgstr "" + +#: archive.ajax.php:289 +#: gigs.ajax.php:116 +#: gigs.ajax.php:536 +#: settings.ajax.php:171 +msgid "Performances" +msgstr "" + +#: archive.ajax.php:290 +#: gigs.ajax.php:117 +#: gigs.ajax.php:537 +msgid "You can add as many performances as
    you are giving at a venue on the given date." +msgstr "" + +#: archive.ajax.php:298 +#: gigs.ajax.php:123 +#: gigs.ajax.php:545 +msgid "Add another performance" +msgstr "" + +#: archive.ajax.php:304 +#: gigs.ajax.php:551 +msgid "Save Gig" +msgstr "" + +#: archive.ajax.php:305 +#: feedback.ajax.php:46 +#: gigs.ajax.php:130 +#: gigs.ajax.php:552 +#: tours.ajax.php:35 +#: venues.ajax.php:41 +#: venues.ajax.php:248 +msgid "Cancel" +msgstr "" + +#: archive.ajax.php:487 +#: gigs.ajax.php:745 +msgid "Performance Time:" +msgstr "" + +#: archive.ajax.php:508 +#: gigs.ajax.php:766 +msgid "AM" +msgstr "" + +#: archive.ajax.php:509 +#: gigs.ajax.php:767 +msgid "PM" +msgstr "" + +#: archive.ajax.php:515 +#: gigs.ajax.php:774 +msgid "Remove Performance" +msgstr "" + +#: archive.ajax.php:521 +#: gigs.ajax.php:780 +msgid "External Link (for tickets):" +msgstr "" + +#: archive.ajax.php:527 +#: gigs.ajax.php:786 +msgid "Short Notes:" +msgstr "" + +#: archive.ajax.php:533 +#: gigs.ajax.php:792 +msgid "Ages:" +msgstr "" + +#: archive.ajax.php:540 +#: gigs.ajax.php:799 +msgid "Or..." +msgstr "" + +#: credits.ajax.php:4 +msgid "The Gigs Calendar plugin for WordPress was developed by me, Dan Coulter. If you need some custom PHP development (for WordPress or not), I am available for hire (you can get in touch with me through this plugin). To find other free plugins and useful tips for bands and musicians, visit my new site, Blogs for Bands." +msgstr "" + +#: credits.ajax.php:7 +msgid "You can help support the development of this free plugin through Paypal. If you have specific features that you need, you can request them through the feedback form or hire me to develop them for you." +msgstr "" + +#: credits.ajax.php:10 +msgid "The lovely Silk icons were created by Mark James. They are licensed under the Creative Commons." +msgstr "" + +#: feedback.ajax.php:9 +msgid "Want to tell me what a great/horrible job I did?" +msgstr "" + +#: feedback.ajax.php:14 +msgid "Your name:" +msgstr "" + +#: feedback.ajax.php:26 +msgid "Email Address:" +msgstr "" + +#: feedback.ajax.php:28 +msgid "Type of feedback:" +msgstr "" + +#: feedback.ajax.php:30 +msgid "Bug Report" +msgstr "" + +#: feedback.ajax.php:31 +msgid "Feedback/Comments" +msgstr "" + +#: feedback.ajax.php:32 +msgid "Feature Request" +msgstr "" + +#: feedback.ajax.php:35 +msgid "If you're reporting a bug, please be as specific as possible. Also, please use English if you can." +msgstr "" + +#: feedback.ajax.php:36 +msgid "Additional information that might help (deselect anything you don't want to send, but I might ask you for it anyway)" +msgstr "" + +#: feedback.ajax.php:38 +msgid "Blog URL" +msgstr "" + +#: feedback.ajax.php:39 +msgid "WordPress Version" +msgstr "" + +#: feedback.ajax.php:40 +msgid "PHP Version" +msgstr "" + +#: feedback.ajax.php:41 +msgid "MySQL Info" +msgstr "" + +#: feedback.ajax.php:42 +msgid "Broswer Info" +msgstr "" + +#: feedback.ajax.php:44 +msgid "Include your plugin settings" +msgstr "" + +#: feedback.ajax.php:45 +msgid "Send Feedback" +msgstr "" + +#: feedback.ajax.php:60 +msgid "Thanks for your feedback! I’ll try to get back to you as soon as I can." +msgstr "" + +#: gigs-calendar.php:39 +#: gigs-calendar.php:122 +msgid "Gigs Calendar" +msgstr "" + +#: gigs-calendar.php:88 +msgid "Gigs" +msgstr "" + +#: gigs-calendar.php:89 +msgid "Archive" +msgstr "" + +#: gigs-calendar.php:90 +msgid "Venues" +msgstr "" + +#: gigs-calendar.php:91 +msgid "Tours" +msgstr "" + +#: gigs-calendar.php:92 +#: gigs-calendar.php:125 +msgid "Settings" +msgstr "" + +#: gigs-calendar.php:93 +#: gigs-calendar.php:126 +msgid "Feedback/Bugs" +msgstr "" + +#: gigs-calendar.php:94 +#: gigs-calendar.php:127 +#: settings.ajax.php:351 +msgid "Credits" +msgstr "" + +#: gigs-calendar.php:136 +msgid "Loading..." +msgstr "" + +#: gigs-calendar.php:208 +#: gigs-calendar.php:220 +#: gigs-calendar.php:232 +msgid "Upcoming shows" +msgstr "" + +#: gigs-calendar.php:214 +#: gigs-calendar.php:239 +msgid "Other shows" +msgstr "" + +#: gigs-calendar.php:246 +msgid "Past show archive" +msgstr "" + +#: gigs-calendar.php:455 +msgid "Upcoming Gigs" +msgstr "" + +#: gigs-calendar.php:485 +#: gigs-calendar.php:575 +msgid "Widget title:" +msgstr "" + +#: gigs-calendar.php:491 +msgid "Number of gigs to show on the sidebar:" +msgstr "" + +#: gigs-calendar.php:496 +msgid "Note: All date formats use the PHP date() function syntax" +msgstr "" + +#: gigs-calendar.php:500 +msgid "Date format for dates in the current year:" +msgstr "" + +#: gigs-calendar.php:506 +msgid "Date format for dates in a future year:" +msgstr "" + +#: gigs-calendar.php:512 +msgid "First piece of data in the link:" +msgstr "" + +#: gigs-calendar.php:522 +msgid "Second piece of data in the link:" +msgstr "" + +#: gigs-calendar.php:524 +msgid "None" +msgstr "" + +#: gigs-calendar.php:537 +#: gigs-calendar.php:557 +msgid "Next Gig" +msgstr "" + +#: gigs-calendar.php:619 +#: settings.ajax.php:15 +#: settings.ajax.php:28 +msgid "Country" +msgstr "" + +#: gigs-calendar.php:621 +msgid "Event" +msgstr "" + +#: gigs-calendar.php:624 +#: tours.ajax.php:47 +msgid "Notes" +msgstr "" + +#: gigs-calendar.php:625 +msgid "Tickets" +msgstr "" + +#: gigs.ajax.php:15 +msgid "Add a new gig" +msgstr "" + +#: gigs.ajax.php:30 +msgid "Select a venue" +msgstr "" + +#: gigs.ajax.php:36 +msgid "No venues found. You’ll need to add one" +msgstr "" + +#: gigs.ajax.php:45 +#: gigs.ajax.php:455 +msgid "Some artists perform under several names. Ignore the event name field if you don’t need to specify what this event is called or what band name you are playing under." +msgstr "" + +#: gigs.ajax.php:129 +msgid "Add Gig" +msgstr "" + +#: gigs.ajax.php:141 +#: settings.ajax.php:17 +#: settings.ajax.php:29 +msgid "Event Name" +msgstr "" + +#: rss.php:25 +msgid "Upcoming Gigs feed" +msgstr "" + +#: settings.ajax.php:20 +msgid "Short Notes" +msgstr "" + +#: settings.ajax.php:21 +msgid "Ticket Link" +msgstr "" + +#: settings.ajax.php:22 +msgid "Map Link" +msgstr "" + +#: settings.ajax.php:36 +msgid "Sorry, there aren’t any upcoming gigs right now. Check back soon!" +msgstr "" + +#: settings.ajax.php:37 +msgid "There aren’t any gigs here right now. Check back soon!" +msgstr "" + +#: settings.ajax.php:43 +msgid "Who" +msgstr "" + +#: settings.ajax.php:44 +msgid "All Ages" +msgstr "" + +#: settings.ajax.php:44 +msgid "21+" +msgstr "" + +#: settings.ajax.php:44 +msgid "16+" +msgstr "" + +#: settings.ajax.php:50 +msgid "TBD" +msgstr "" + +#: settings.ajax.php:74 +msgid "Oops! It looks like you’re missing some or all of the tables required for this plugin. They should have been created automatically, but you can create them with the tables.sql file in the same folder as this plugin. If you have any questions, you can use the feedback form in the next tab." +msgstr "" + +#: settings.ajax.php:78 +msgid "You need to select a page to list your calendar. You may need to go create a new page first." +msgstr "" + +#: settings.ajax.php:82 +msgid "Warning: You are running MySQL server version . This plugin requires version 4.1 or higher to hide the future gig posts from your homepage. Your best option is to use a plugin like Advanced Category Excluder to hide the gigs using the category option below." +msgstr "" + +#: settings.ajax.php:88 +msgid "General Options" +msgstr "" + +#: settings.ajax.php:90 +msgid "Select a location for the calendars on the page:" +msgstr "" + +#: settings.ajax.php:92 +msgid "Top" +msgstr "" + +#: settings.ajax.php:93 +msgid "Bottom" +msgstr "" + +#: settings.ajax.php:94 +#: settings.ajax.php:346 +msgid "Custom" +msgstr "" + +#: settings.ajax.php:99 +msgid "Display gigs as normal blog posts (turns off filtering):" +msgstr "" + +#: settings.ajax.php:101 +#: settings.ajax.php:165 +#: settings.ajax.php:276 +#: settings.ajax.php:284 +#: settings.ajax.php:292 +#: settings.ajax.php:328 +#: settings.ajax.php:336 +#: settings.ajax.php:355 +#: settings.ajax.php:366 +msgid "Yes" +msgstr "" + +#: settings.ajax.php:102 +#: settings.ajax.php:166 +#: settings.ajax.php:277 +#: settings.ajax.php:285 +#: settings.ajax.php:293 +#: settings.ajax.php:329 +#: settings.ajax.php:337 +#: settings.ajax.php:356 +#: settings.ajax.php:367 +#: settings.ajax.php:378 +msgid "No" +msgstr "" + +#: settings.ajax.php:106 +msgid "Note: If you select the custom location option, you don’t have to select a page, but you won’t get a link back to the calendar" +msgstr "" + +#: settings.ajax.php:108 +msgid "Select a page to house your calendar:" +msgstr "" + +#: settings.ajax.php:113 +msgid "Select a page to house your gigs archive:" +msgstr "" + +#: settings.ajax.php:118 +msgid "Select a category that gigs should be created under:" +msgstr "" + +#: settings.ajax.php:131 +msgid "Display this message if there are no upcoming gigs:" +msgstr "" + +#: settings.ajax.php:136 +msgid "Display this message if there are no past gigs:" +msgstr "" + +#: settings.ajax.php:140 +msgid "Administration Options" +msgstr "" + +#: settings.ajax.php:143 +msgid "Minimum permission level to administer the calendar: " +msgstr "" + +#: settings.ajax.php:147 +msgid "Subscriber" +msgstr "" + +#: settings.ajax.php:148 +msgid "Contributor" +msgstr "" + +#: settings.ajax.php:149 +msgid "Author" +msgstr "" + +#: settings.ajax.php:150 +msgid "Editor" +msgstr "" + +#: settings.ajax.php:151 +msgid "Administrator" +msgstr "" + +#: settings.ajax.php:163 +msgid "Only allow blog administrators to change calendar settings:" +msgstr "" + +#: settings.ajax.php:172 +msgid "Options you want in the \"ages\" dropdown." +msgstr "" + +#: settings.ajax.php:182 +msgid "Add" +msgstr "" + +#: settings.ajax.php:184 +msgid "Display Options" +msgstr "" + +#: settings.ajax.php:186 +msgid "Display template: " +msgstr "" + +#: settings.ajax.php:215 +msgid "Short date format:" +msgstr "" + +#: settings.ajax.php:217 +#: settings.ajax.php:221 +#: settings.ajax.php:226 +msgid "(uses PHP’s date() function format)" +msgstr "" + +#: settings.ajax.php:219 +msgid "Archives date format:" +msgstr "" + +#: settings.ajax.php:224 +msgid "Long date format:" +msgstr "" + +#: settings.ajax.php:229 +msgid "Time format:" +msgstr "" + +#: settings.ajax.php:231 +msgid "12 Hour" +msgstr "" + +#: settings.ajax.php:232 +msgid "24 Hour" +msgstr "" + +#: settings.ajax.php:237 +msgid "Text to display when the time is \"To be determined\":" +msgstr "" + +#: settings.ajax.php:242 +msgid "Gigs page table" +msgstr "" + +#: settings.ajax.php:243 +msgid "You can sort the fields by clicking on the names and dragging." +msgstr "" + +#: settings.ajax.php:263 +msgid "Field to use for the link to the gig:" +msgstr "" + +#: settings.ajax.php:274 +msgid "Link to the venue’s website from the gig list?" +msgstr "" + +#: settings.ajax.php:282 +msgid "Display column headers?" +msgstr "" + +#: settings.ajax.php:290 +msgid "Link to Gigs RSS feed?" +msgstr "" + +#: settings.ajax.php:297 +msgid "Single Gig Page" +msgstr "" + +#: settings.ajax.php:299 +msgid "Select and drag the fields for the gig post title." +msgstr "" + +#: settings.ajax.php:320 +msgid "Label next to the event name:" +msgstr "" + +#: settings.ajax.php:324 +msgid "Tours Options" +msgstr "" + +#: settings.ajax.php:326 +msgid "Do you want to split gigs by tour on your calendar page?" +msgstr "" + +#: settings.ajax.php:334 +msgid "Do you want to display empty tours?" +msgstr "" + +#: settings.ajax.php:342 +msgid "How should the tours be ordered?" +msgstr "" + +#: settings.ajax.php:344 +msgid "Date of the earliest gig" +msgstr "" + +#: settings.ajax.php:345 +msgid "Alphabetical" +msgstr "" + +#: settings.ajax.php:353 +msgid "Do you want to link back to me for building this plugin?" +msgstr "" + +#: settings.ajax.php:360 +msgid "Note: It’s ok to say \"no\". I’ve offered this freely with no expectations, but I’d be very grateful if you said \"yes\"" +msgstr "" + +#: settings.ajax.php:364 +msgid "Do you want to link back to Mark James for the Silk icons?" +msgstr "" + +#: settings.ajax.php:371 +msgid "Note: The Silk Icons that I used in this plugin are licensed under the Creative Commons. You must link back to him somewhere on your site. If you link to him on another page, giving him credit, or you have replaced the icons, or you do not display any of them publicly on your site, you may turn off this link." +msgstr "" + +#: settings.ajax.php:375 +msgid "Save Options" +msgstr "" + +#: settings.ajax.php:376 +msgid "If you made changes that would affect posts, do you want changes applied to existing gigs (possibly breaking existing links)?" +msgstr "" + +#: settings.ajax.php:379 +msgid "Yes, future gigs only" +msgstr "" + +#: settings.ajax.php:380 +msgid "Yes, all gigs, please" +msgstr "" + +#: tours.ajax.php:12 +msgid "Add a new tour" +msgstr "" + +#: tours.ajax.php:20 +#: tours.ajax.php:245 +msgid "Tour Information" +msgstr "" + +#: tours.ajax.php:24 +#: tours.ajax.php:248 +msgid "Tour Name:" +msgstr "" + +#: tours.ajax.php:34 +msgid "Add tour" +msgstr "" + +#: tours.ajax.php:46 +#: venues.ajax.php:52 +msgid "Name" +msgstr "" + +#: venues.ajax.php:13 +msgid "Add a new venue" +msgstr "" + +#: venues.ajax.php:19 +#: venues.ajax.php:226 +msgid "Name:" +msgstr "" + +#: venues.ajax.php:20 +#: venues.ajax.php:227 +msgid "Address:" +msgstr "" + +#: venues.ajax.php:21 +#: venues.ajax.php:228 +msgid "City:" +msgstr "" + +#: venues.ajax.php:22 +#: venues.ajax.php:229 +msgid "State/Province:" +msgstr "" + +#: venues.ajax.php:23 +#: venues.ajax.php:230 +msgid "Country:" +msgstr "" + +#: venues.ajax.php:24 +#: venues.ajax.php:231 +msgid "Postal Code:" +msgstr "" + +#: venues.ajax.php:25 +#: venues.ajax.php:232 +msgid "Custom location for Google Maps (?)" +msgstr "" + +#: venues.ajax.php:26 +#: venues.ajax.php:233 +msgid "Primary Contact:" +msgstr "" + +#: venues.ajax.php:27 +#: venues.ajax.php:234 +msgid "Phone:" +msgstr "" + +#: venues.ajax.php:28 +#: venues.ajax.php:235 +msgid "Email:" +msgstr "" + +#: venues.ajax.php:29 +#: venues.ajax.php:236 +msgid "Homepage:" +msgstr "" + +#: venues.ajax.php:33 +#: venues.ajax.php:240 +msgid "Hide information about this venue from the public:" +msgstr "" + +#: venues.ajax.php:40 +msgid "Add Venue" +msgstr "" + +#: venues.ajax.php:54 +msgid "Phone" +msgstr "" + +#: venues.ajax.php:55 +msgid "Email" +msgstr "" + +#: venues.ajax.php:72 +#: venues.ajax.php:202 +msgid "Homepage" +msgstr "" + +#: venues.ajax.php:247 +msgid "Save Changes" +msgstr "" + +#: templates/basic/attribution.php:4 +msgid "Powered by Blogs for Bands" +msgstr "" + +#: templates/basic/attribution.php:7 +msgid "Silk icons by Mark James" +msgstr "" + +#: templates/basic/gig-post.php:11 +msgid "When" +msgstr "" + +#: templates/basic/gig-post.php:24 +#: templates/basic/gigs-list.php:27 +#: templates/basic/gigs-list.php:39 +msgid "Buy Tickets" +msgstr "" + +#: templates/basic/gig-post.php:31 +msgid "Where" +msgstr "" + +#: templates/basic/gig-post.php:34 +msgid "Private Venue" +msgstr "" + +#: templates/basic/gig-post.php:42 +msgid "map" +msgstr "" + +#: templates/basic/gig-post.php:52 +msgid "Other Info" +msgstr "" + +#: templates/basic/gig-post.php:57 +msgid "Back to the calendar" +msgstr "" + +#: templates/basic/next-widget.php:11 +msgid "More Info..." +msgstr "" + +#: templates/basic/rss.php:2 +msgid "Subscribe to RSS calendar feed" +msgstr "" + diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/gigs-calendar/gigs-classes.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/gigs-calendar/gigs-classes.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,794 @@ +prefix)); +define('TABLE_VENUES', GIGS_DB_PREFIX . 'gigs_venue'); +define('TABLE_GIGS', GIGS_DB_PREFIX . 'gigs_gig'); +define('TABLE_PERFORMANCES', GIGS_DB_PREFIX . 'gigs_performance'); +define('TABLE_TOURS', GIGS_DB_PREFIX . 'gigs_tour'); + +class dtcGigs { + + function generateSlug($x) { + $x = strtolower($x); + $x = str_replace(' ', '-', $x); + $x = preg_replace('#[^a-z\-0-9]#', '', $x); + return $x; + } + + function escapeForInput($x) { + if ( '0000-00-00' == $x ) { + $x = ''; + } + echo htmlspecialchars($x); + } + + function dateFormat($date, $type = 'short') { + if ( is_null($date) || $date == '0000-00-00' ) return null; + $options = get_option('gigs-calendar'); + if ( isset($options['date'][$type]) ) { + return mysql2date($options['date'][$type], $date); + } else { + return mysql2date($type, $date); + } + } + + function selectFields($fields, $g) { + $options = get_option('gigs-calendar'); + + $result = ''; + foreach ( $options['gigs-table-show'] as $f ) { + if ( isset($fields[$f]) ) { + $tmp = $fields[$f]; + if ( $f == 'venue' && $options['list-venue-link'] && !empty($g->venueLink) ) { + $tmp = preg_replace("~\{(.*?)\}~", '\1', $tmp); + } elseif ( $f == $options['gig-link-field'] ) { + $tmp = preg_replace("~\{(.*?)\}~", '\1', $tmp); + } else { + $tmp = preg_replace("~\{(.*?)\}~", '\1', $tmp); + } + + $result .= $tmp; + } + } + + return $result; + } + + function timeFormat($time, $format = false) { + $options = get_option('gigs-calendar'); + if ( is_null($time) ) { + return $options['tbd-text']; + } + if ( $options['time-12h'] || $format === "12h" ) { + return mysql2date("g:ia", '2008-01-01 ' . $time); + } else { + return mysql2date("H:i", '2000-01-01 ' . $time); + } + } + + function mapLink($gig) { + global $options; + if ( empty($gig->customMap) ) { + $a = array(); + + if ( empty($gig->address) ) + $a[] = $gig->name . ' near:'; + else {} + $a[] = str_replace("\n", ", ", $gig->address); + if ( !empty($gig->city) ) $a[] = $gig->city; + if ( !empty($gig->state) ) $a[] = $gig->state; + if ( !empty($gig->country) ) $a[] = $gig->country; + if ( !empty($gig->postalCode) ) $a[] = $gig->postalCode; + return 'http://maps.google.com/?q=' . urlencode(str_replace('near:,', 'near:', implode(', ', $a))); + } else { + if ( preg_match("/^https?:\/\//", $gig->customMap) ) { + return $gig->customMap; + } else { + return 'http://maps.google.com/?q=' . urlencode($gig->customMap); + } + } + } + + function getAttribution() { + $options = get_option('gigs-calendar'); + ?> +
    + + Powered by Blogs for Bands + + + Silk icons by Mark James + +
    + $field ) { + if ( isset($data[$field['name']]) ) { + $value = array_pop($data[$field['name']]); + if ( empty($data[$field['name']]) ) unset($data[$field['name']]); + } else { + $value = $field['default']; + } + ?> + + + + + + + + + + + + + + + + + + $oValue ) : ?> + /> + +
    + + + + $oValue ) : ?> + /> + + +
    + + + + + id) ) { + $gig = $gig->id; + } elseif ( is_array($gig) && isset($gig['id']) ) { + $gig = $gig['id']; + } + + $g = new gig(); + if ( !$g->get($gig) ) { + return false; + } + + $classes = array( + 'gig', + mysql2date('\yY', $g->date), + mysql2date('\mm', $g->date), + ( $g->date >= date('Y-m-d') ? 'upcoming' : 'archive' ), + ); + + $classes = array_merge($classes, $g->getTags(true, 'gc-')); + + return implode(' ', apply_filters('gigCal_gigs_css_classes', $classes, $g)); + } +} + +class dtc_gigs_baseAR { + var $wpdb, $_rows, $_row, $_new = true, $_table, $_count; + + function dtc_gigs_baseAR($id = null){ + global $wpdb; + $this->wpdb = $wpdb; + if ( $id !== null ) { + $this->get($id); + } + } + + function fetch() { + if ( count($this->_rows) ) { + $this->_row = each($this->_rows); + if ( $this->_row ) { + $this->load(); + return true; + } else { + return false; + } + } else { + return false; + } + } + + function generate_slug() { + if ( isset($this->slug) ) { + $first = true; + $name = $this->_name; + do { + if ( $first ) { + $this->slug = dtcGigs::generateSlug($this->$name); + $first = false; + } else { + ereg('[0-9]*$', $this->slug, $match); + $match = ((int) $match[0]) + 1; + if ( 1 == $match ) $match++; + $this->slug = preg_replace('/[0-9]*$/', '', $this->slug); + $this->slug .= $match; + } + + } while ( $this->wpdb->get_var('SELECT COUNT(*) FROM `' . $this->_table . '` WHERE slug = "' . $this->slug . '"') ); + } + } + + + function get($id) { + $this->search('`id` = ' . (int) $id); + return $this->fetch(); + } + + function getRow() { + $row = array(); + foreach ( $this->_fields as $f ) { + $row[$f] = $this->$f; + } + return $row; + } + + function getTags($slugs = false, $prefix = '') { + if ( function_exists('wp_get_post_tags') ) { + $tags = wp_get_post_tags($this->postID); + foreach ( $tags as $key => $tag ) { + $tags[$key] = $prefix . ($slugs ? $tag->slug : $tag->name); + } + return $tags; + } else { + return array(); + } + } + + function getCustom() { + if ( !empty($this->postID) ) { + return get_post_custom($this->postID); + } + } + + function setTags($tags) { + if ( function_exists('wp_set_post_tags') ) + wp_set_post_tags($this->postID, $tags, false); + } + + + + + + function load() { + foreach ( $this->_fields as $f ) { + if ( is_null($this->_row['value']->$f) ) { + $this->$f = null; + } else { + $this->$f = stripslashes($this->_row['value']->$f); + } + } + } + + function search($where = null, $order = null) { + $this->_new = false; + $this->_rows = $this->wpdb->get_results('SELECT * FROM `' . $this->_table . '` ' . ($where !== null ? 'WHERE ' . $where : '') . ($order !== null ? ' ORDER BY ' . $order : '')); + $this->_count = count($this->_rows); + return count($this->_rows); + } + + function save($get_after = true) { + $first = true; + $name = $this->_name; + $this->generate_slug(); + if ( $this->_new ) { + $fields = $this->_fields; + $values = array(); + unset($fields[0]); + + $this->pre_insert(); + + foreach ( $fields as $f ) { + if ( is_null($this->$f) ) { + $values[$f] = 'null'; + } else { + $values[$f] = '"' . $this->wpdb->escape(stripslashes($this->$f)) . '"'; + } + } + + if ( !$this->wpdb->query('INSERT INTO `' . $this->_table . '` (`' . implode('`, `', $fields) . '`) VALUES (' . implode(', ', $values) . ')') ) { + return false; + } + $this->id = $this->wpdb->insert_id; + + $this->post_insert(); + if ( $get_after ) + $this->get((int) $this->id); + + return true; + } else { + $fields = $this->_fields; + $values = array(); + unset($fields[0]); + + $this->pre_update(); + + foreach ( $fields as $f ) { + if ( is_null($this->$f) ) { + $values[$f] = '`' . $f . '` = null'; + } else { + $values[$f] = '`' . $f . '` = "' . $this->wpdb->escape(stripslashes($this->$f)) . '"'; + } + } + + $result = (bool) $this->wpdb->query('UPDATE `' . $this->_table . '` SET ' . implode(', ', $values) . ' WHERE `id` = ' . (int) $this->id); + + if ( $result ) $this->post_update(); + + if ( $get_after ) + $this->get((int) $this->id); + + return $result; + } + } + + function pre_insert(){} + function post_insert(){} + function pre_update(){} + function post_update(){} + function extraJSON() {return array();} + + function delete() { + if ( !empty($this->id) ) { + return (bool) $this->wpdb->query('DELETE FROM `' . $this->_table . '` WHERE `id` = ' . (int) $this->id); + } + } + + function toJSON($single = true) { + if ( $single ) { + $fields = array(); + if ( function_exists("json_encode") ) { + foreach ( $this->_fields as $f ) { + $fields[$f] = $this->$f; + } + + $extra = $this->extraJSON(); + $fields = array_merge($fields, $extra); + return json_encode($fields); + } else { + foreach ( $this->_fields as $f ) { + $fields[] = '"' . $f . '":"' . str_replace("\n", '\n', addslashes($this->$f)) . '"'; + } + + $extra = $this->extraJSON(); + $fields = array_merge($fields, $extra); + + return '{' . implode(', ', $fields) . '}'; + } + } + } + + function getError() { + return $this->wpdb->last_error; + } +} + +class venue extends dtc_gigs_baseAR { + var $_table = TABLE_VENUES, $_name = 'name'; + var $id, $name, $address, $city, $state, $country, $postalCode, $contact, + $phone, $email, $link, $notes, $private = 0, $apiID = 0, $deleted = 0, $customMap; + var $_fields = array( + 'id', + 'name', + 'address', + 'city', + 'state', + 'country', + 'postalCode', + 'contact', + 'phone', + 'email', + 'link', + 'notes', + 'private', + 'apiID', + 'deleted', + 'customMap', + ); + + function delete($forReal = false) { + if ( $forReal ) { + return parent::delete(); + } else { + $this->deleted = 1; + return $this->save(); + + } + } + + function getAddress($oneLine = false) { + $a = array(); + $city = ""; + if ( $oneLine ) { + if ( !empty($this->address) ) $a[] = str_replace("\n", ', ', $this->address); + if ( !empty($this->city) ) $a[] = $this->city; + if ( !empty($this->state) ) $a[] = $this->state; + if ( !empty($this->postalCode) ) $a[] = $this->postalCode; + if ( !empty($this->country) ) $a[] = $this->country; + return implode(', ', $a); + } else { + if ( !empty($this->address) ) $a[] = $this->address; + if ( !empty($this->city) ) $temp .= $this->city; + if ( !empty($this->state) ) $temp .= (!empty($temp) ? ', ' : '' ) . $this->state; + if ( !empty($this->country) ) $temp .= (!empty($temp) ? ', ' : '' ) . $this->country; + if ( !empty($this->postalCode) ) $temp .= (!empty($temp) ? ' ' : '' ) . $this->postalCode; + if ( !empty($temp) ) $a[] = $temp; + return implode("\n", $a); + } + } + + function getCity() { + $c = array(); + if ( !empty($this->city) ) $c[] = $this->city; + if ( !empty($this->state) ) $c[] = $this->state; + //if ( !empty($this->country) ) $c[] = $this->country; + return implode(', ', $c); + } + + function getMapLink() { + global $options; + if ( empty($this->customMap) ) { + $a = array(); + + if ( empty($this->address) ) + $a[] = $this->name . ' near:'; + else {} + $a[] = str_replace("\n", ", ", $this->address); + if ( !empty($this->city) ) $a[] = $this->city; + if ( !empty($this->state) ) $a[] = $this->state; + if ( !empty($this->country) ) $a[] = $this->country; + if ( !empty($this->postalCode) ) $a[] = $this->postalCode; + return 'http://maps.google.com/?q=' . urlencode(str_replace('near:,', 'near:', implode(', ', $a))); + } else { + if ( preg_match("/^https?:\/\//", $this->customMap) ) { + return $this->customMap; + } else { + return 'http://maps.google.com/?q=' . urlencode($this->customMap); + } + } + } + + function extraJSON() { + if ( function_exists("json_encode") ) { + $fields['mapLink'] = $this->getMapLink(); + } else { + $fields[] = '"mapLink":"' . str_replace("\n", '\n', addslashes($this->getMapLink())) . '"'; + } + return $fields; + } +} + +class gig extends dtc_gigs_baseAR { + var $_table = TABLE_GIGS, $_name = 'id'; + var $id, $venueID = 0, $date, $notes, $postID = 0, $eventName, $tour_id = 0; + var $_fields = array( + 'id', + 'venueID', + 'date', + 'notes', + 'postID', + 'eventName', + 'tour_id', + ); + + function delete() { + $p = $this->getPerformances(); + while ( $p->fetch() ) { + $p->delete(); + } + wp_delete_post($this->postID); + return parent::delete(); + } + + function getByPostID($postID) { + $this->search("postID = " . (int) $postID); + return $this->fetch(); + } + + function getPermalink() { + $post = get_permalink($this->postID); + return $post; + } + + function getPerformances() { + $p = new performance(); + if ( $this->id ) { + $p->search("`gigID` = " . (int) $this->id, "`time`"); + } + return $p; + } + + function getVenue() { + $v = new venue(); + if ( $this->venueID ) { + $v->get($this->venueID); + } + return $v; + } + + function pre_insert() { + global $options, $wpdb; + $user = wp_get_current_user(); + $v = $this->getVenue(); + $p = $this->getPerformances(); + $p->fetch(); + + if ( $this->tour_id == -1 ) $this->tour_id = null; + + $title = array(); + foreach ( $options['gig-title-show'] as $f ) { + switch ( $f ) { + case 'city' : + $title[] = $v->getCity(); + break; + case 'eventName' : + $title[] = $this->eventName; + break; + case 'venue' : + $title[] = $v->name; + break; + case 'date' : + $title[] = dtcGigs::dateFormat($this->date); + break; + case 'country' : + $title[] = $v->country; + break; + } + } + + foreach ( $title as $key => $value ) { + if ( empty($value) ) unset($title[$key]); + } + + $post_data = array( + 'post_author' => $user->ID, + 'post_title' => $wpdb->escape(implode(' - ', $title)), + 'post_status' => 'publish', + 'post_type' => 'post', + 'post_category' => array($options['category']), + 'post_content' => '', + ); + + if ( $options['post-filtering'] ) { + $post_data = array_merge($post_data, array( + 'post_date' => $wpdb->escape($this->date . ' ' . $p->time), + 'post_modified' => $wpdb->escape($this->date . ' ' . $p->time), + 'post_date_gmt' => date('Y-m-d H:i:s', strtotime($this->date . ' ' . $p->time) - (60 * 60 * get_option('gmt_offset'))), + 'post_modified_gmt' => date('Y-m-d H:i:s', strtotime($this->date . ' ' . $p->time) - (60 * 60 * get_option('gmt_offset'))), + )); + } + $id = wp_insert_post($post_data); + $this->postID = $id; + } + + function pre_update() { + global $options, $wpdb, $wp_version; + $v = $this->getVenue(); + $p = $this->getPerformances(); + $p->fetch(); + + if ( $this->tour_id == -1 ) $this->tour_id = null; + + $title = array(); + foreach ( $options['gig-title-show'] as $f ) { + switch ( $f ) { + case 'city' : + $title[] = $v->getCity(); + break; + case 'eventName' : + $title[] = $this->eventName; + break; + case 'venue' : + $title[] = $v->name; + break; + case 'date' : + $title[] = dtcGigs::dateFormat($this->date); + break; + case 'country' : + $title[] = $v->country; + break; + } + } + + foreach ( $title as $key => $value ) { + if ( empty($value) ) unset($title[$key]); + } + + + $post = get_post($this->postID); + + if ( $options['post-filtering'] ) { + $post->post_date = $wpdb->escape($this->date . ' ' . $p->time); + $post->post_modified = $wpdb->escape($this->date . ' ' . $p->time); + $post->post_date_gmt = date('Y-m-d H:i:s', strtotime($this->date . ' ' . $p->time) - (60 * 60 * get_option('gmt_offset'))); + $post->post_modified_gmt = date('Y-m-d H:i:s', strtotime($this->date . ' ' . $p->time) - (60 * 60 * get_option('gmt_offset'))); + } + + $post->post_title = $wpdb->escape(implode(' - ', $title)); + $post->post_name = ""; + $post->post_status = "publish"; // Do this to trick WordPress into resetting the GUID. + $post->post_category = array($options['category']); + + wp_update_post($post); + if ( (float) $wp_version < 2.3 ) { // Hack to make it compatible with WP 2.2 + global $wpdb; + $wpdb->query('UPDATE ' . $wpdb->prefix . 'posts SET post_status = "publish" WHERE ID = ' . (int) $this->postID); + } + } + + function post_insert() { + global $wp_version; + if ( (float) $wp_version < 2.3 ) { // Hack to make it compatible with WP 2.2 + global $wpdb; + $wpdb->query('UPDATE ' . $wpdb->prefix . 'posts SET post_status = "publish" WHERE ID = ' . (int) $this->postID); + } else { + $post = get_post($this->postID); + $post->post_status = "publish"; + wp_update_post($post); + } + } + + function extraJSON() { + $post = get_post($this->postID); + $v = $this->getVenue(); + $p = $this->getPerformances(); + if ( function_exists("json_encode") ) { + $fields['permalink'] = $this->getPermalink(); + $fields['venue'] = $v->getRow(); + while ( $p->fetch() ) { + $fields['performances'][] = $p->getRow(); + } + } else { + $fields[] = '"permalink":"' . str_replace("\n", '\n', addslashes($this->getPermalink())) . '"'; + $ps = array(); + $fields[] = '"venue":' . $v->toJSON(); + while ( $p && $p->fetch() ) { + $ps[] = $p->toJSON(); + } + $fields[] = '"performances":[' . implode(', ', $ps) . ']'; + } + return $fields; + } +} + +class performance extends dtc_gigs_baseAR { + var $_table = TABLE_PERFORMANCES, $_name = 'id'; + var $id, $gigID = 0, $time = '20:00', $link, $shortNotes, $ages; + + var $_fields = array( + 'id', + 'gigID', + 'time', + 'link', + 'shortNotes', + 'ages', + ); +} + +class tour extends dtc_gigs_baseAR { + var $_table = TABLE_TOURS, $_name = 'id'; + var $id, $name, $notes, $pos = 0; + var $_fields = array( + 'id', + 'name', + 'notes', + 'pos', + ); + + function post_insert() { + $max = $this->wpdb->get_var('SELECT MAX(`pos`) FROM `' . $this->_table . '`') + 1; + $this->wpdb->query('UPDATE `' . $this->_table . '` SET `pos` = ' . $max . ' WHERE `id` = ' . (int) $this->id); + } + + function delete() { + $g = $this->getGigs(); + while ( $g->fetch() ) { + $g->tour_id = null; + $g->save(); + } + return parent::delete(); + } + + function sortTours($type = null) { + $options = get_option('gigs-calendar'); + $type = is_null($type) ? $options['tours-sort'] : $type; + switch ($type) { + case 'date' : + return $this->wpdb->get_col(' + SELECT DISTINCT + t.id + FROM + ' . TABLE_TOURS . ' t + LEFT JOIN + ' . TABLE_GIGS . ' g + ON + t.`id` = g.`tour_id` + WHERE + `date` is null OR `date` >= CURDATE() + ORDER BY + g.`date`, `name` + '); + break; + case 'alpha' : + return $this->wpdb->get_col(' + SELECT DISTINCT + t.id + FROM + ' . TABLE_TOURS . ' t + ORDER BY + `name` + '); + break; + } + } + + function getGigs($slice = 'all') { + $g = new gig(); + if ( $slice == 'past' ) { + $g->search('`date` <= CURDATE() AND `tour_id` = ' . (int) $this->id, '`date`'); + } elseif ( $slice == 'future' ) { + $g->search('`date` >= CURDATE() AND `tour_id` = ' . (int) $this->id, '`date`'); + } else { + $g->search('`tour_id` = ' . (int) $this->id, '`date`'); + } + return $g; + } + + function extraJSON(){ + $fields = array(); + $g = $this->getGigs(); + $gs = array(); + if ( function_exists("json_encode") ) { + while ( $g->fetch() ) { + $gs[] = $g->getRow(); + } + $fields['gigs'] = $gs; + } else { + while ( $g->fetch() ) { + $gs[] = $g->toJSON(); + } + $fields[] = '"gigs":[' . implode(',', $gs) . ']'; + } + return $fields; + } +} + +?> diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/gigs-calendar/gigs.ajax.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/gigs-calendar/gigs.ajax.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,845 @@ +search("date >= CURDATE()", 'date'); + $v->search('deleted = 0', 'name'); + ?> +
    + +
    + + + + + + + + + + + + + + + + fetch() ) : $v = $g->getVenue(); $p = $g->getPerformances(); $post = get_post($g->postID);?> + "> + + + + + + + + + "> + + + + + +
    id; ?>eventName; ?>name; ?>city . (!empty($v->state) ? ', ' . $v->state : '') ?>date ?> + fetch() ) : ?> + time) ?> + + +
    + <?php _e('View Gig', $gcd) ?> + <?php _e('Edit', $gcd) ?> + + <?php _e('Map', $gcd) ?> + + + <?php _e('Edit WordPress Post', $gcd) ?> + + <?php _e('Delete', $gcd) ?> + +
    +
    + + + venueID = $_POST['venueID']; + $g->date = $_POST['date']; + $g->notes = $_POST['notes']; + $g->eventName = $_POST['eventName']; + $g->tour_id = ( $_POST['tour_id'] == -1 ? null : $_POST['tour_id'] ); + + if ( $g->save() ) { + $g->setTags($_POST['tags']); + if ( isset($_POST['performanceID']) ) { + foreach ( $_POST['performanceID'] as $key => $pid ) { + $p = new performance((empty($pid) ? null : $pid)); + $p->gigID = $g->id; + $p->link = ($_POST['link'][$key] == 'http://') ? '' : $_POST['link'][$key]; + $p->shortNotes = $_POST['shortNotes'][$key]; + $p->ages = (empty($_POST['ages-custom'][$key]) ? $_POST['ages'][$key] : $_POST['ages-custom'][$key]); + $p->time = ($_POST['tbd'][$key] == "1") ? null : date("H:i:s", strtotime($_POST['hour'][$key] . ':' . $_POST['minute'][$key] . ' ' . $_POST['meridiem'][$key])); + $p->save(); + } + } + + foreach ( $_POST['custom-key'] as $key => $field ) { + if ( $_POST['custom-value'][$key] === "" ) { + // If the value is empty, just ignore this field. + continue; + } else { + if ( is_array($_POST['custom-value'][$key]) ) { + foreach ( $_POST['custom-value'][$key] as $k => $v ) { + if ( $v === "" ) { + unset($_POST['custom-value'][$key][$k]); + } + } + } + add_post_meta($g->postID, $_POST['custom-key'][$key], $_POST['custom-value'][$key]); + } + } + + + echo '{success:true, gig:' . $g->toJSON() . '}'; + } else { + echo '{success:false,error:"' . ($g->getError() == '' ? 'An unknown error has occurred' : 'DB Error: ' . addslashes($g->getError())) . '"}'; + } + break; + case 'getRow': + $g = new gig($_POST['id']); + $v = $g->getVenue(); + $p = $g->getPerformances(); + $post = get_post($g->postID); + ?> + "> + id; ?> + eventName; ?> + name; ?> + city . (!empty($v->state) ? ', ' . $v->state : '') ?> + date ?> + + fetch() ) : ?> + time) ?> + + + +
    + <?php _e('View Gig', $gcd) ?> + <?php _e('Edit', $gcd) ?> + + <?php _e('Map', $gcd) ?> + + + <?php _e('Edit WordPress Post', $gcd) ?> + + <?php _e('Delete', $gcd) ?> +
    + + + "> + + + + delete(); + echo '{"success": ' . ($result ? 'true' : 'false') . ',"action":"delete"' . ($result ? '' : ',"error":"db"') . '}'; + break; + case 'edit': + $g = new gig($_POST['id']); + $p = $g->getPerformances(); + $v = $g->getVenue(); + ?> +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + = 2.5 ) : ?> + postID); + dtcGigs::extraFields(apply_filters('gigCal_gigs_extraFields', array()), $metadata, $g->id); + ?> + + + + + fetch() ) : ?> + + + + + +
    +

    +
    +
    + name . ' - ' . $v->getCity() ?> +
    + +
    +
    + +
    +
    +

    <?php _e('Expand', $gcd); ?>

    +
    +
    + + + + + + + + + + $values ) { + foreach ( $values as $index => $value ) { + if ( substr($key, 0, 1) != '_' ) { + ?> + + + + + +
    + + + + <?php _e('Remove Custom Field', $gcd) ?>
    +
    +
    +

    + + + + +

    +

    +
    +
    +
    +

    +
    you are giving at a venue on the given date.', $gcd) ?>
    +
    + id, false) ?> +
    +
    +
    +
    + + + + + +
    +
    + + + setTags($_POST['tags']); + + $g->date = $_POST['date']; + $g->notes = $_POST['notes']; + $g->eventName = $_POST['eventName']; + $g->tour_id = ( $_POST['tour_id'] == -1 ? null : $_POST['tour_id'] ); + + if ( isset($_POST['performanceID']) ) { + foreach ( $_POST['performanceID'] as $key => $pid ) { + $p = new performance((empty($pid) ? null : $pid)); + $p->gigID = $g->id; + $p->link = ($_POST['link'][$key] == 'http://') ? '' : $_POST['link'][$key]; + $p->shortNotes = $_POST['shortNotes'][$key]; + $p->ages = (empty($_POST['ages-custom'][$key]) ? $_POST['ages'][$key] : $_POST['ages-custom'][$key]); + $p->time = ($_POST['tbd'][$key] == "1") ? null : date("H:i:s", strtotime($_POST['hour'][$key] . ':' . $_POST['minute'][$key] . ' ' . $_POST['meridiem'][$key])); + $p->save(); + } + } + + $p = new performance(); + if ( isset($_POST['delete']) ) { + foreach ( $_POST['delete'] as $pid ) { + $p->get($pid); + $p->delete(); + } + } + + $g->save(); + + if ( isset($_POST['deletecustom']) && is_array($_POST['deletecustom']) ) { + foreach ( $_POST['deletecustom'] as $key => $delete ) { + if ( $delete ) { + delete_post_meta($g->postID, $_POST['custom-key'][$key], $_POST['old-custom-value'][$key]); + } + } + } + + if ( isset($_POST['custom-key']) && is_array($_POST['custom-key']) ) { + + foreach ( $_POST['custom-key'] as $key => $field ) { + if ( is_array($_POST['custom-value'][$key]) ) { + foreach ( $_POST['custom-value'][$key] as $k => $v ) { + if ( $v === "" ) { + unset($_POST['custom-value'][$key][$k]); + } + } + } + if ( empty($_POST['custom-value'][$key]) && empty($_POST['old-custom-value'][$key]) ) { + // If both value fields are empty, just ignore this field. + continue; + } elseif ( $_POST['custom-value'][$key] === "" ) { + // If the old value is not empty, but the new one is, delete this sucker. + delete_post_meta($g->postID, $_POST['custom-key'][$key], $_POST['old-custom-value'][$key]); + } elseif ( $_POST['old-custom-value'][$key] === "" ) { + // If the old value is empty, but the new one is not, create a new custom field. + add_post_meta($g->postID, $_POST['custom-key'][$key], $_POST['custom-value'][$key]); + } elseif ( $_POST['old-custom-value'][$key] != $_POST['custom-value'][$key] && $_POST['old-custom-value'][$key] != serialize($_POST['custom-value'][$key]) ) { + // If the old and new values are not equal, update the custom field. + update_post_meta($g->postID, $_POST['custom-key'][$key], $_POST['custom-value'][$key], unserialize($_POST['old-custom-value'][$key])); + } + } + } + + echo '{success:true, gig:' . $g->toJSON() . '}'; + break; + + case 'performance-form': + if ( isset($_POST['id']) ) { + pForm($_POST['id'], false); + } else { + pForm((int) $_POST['count'], true); + } + break; +} + + +function pForm($id, $new = true, $remove = true) { + global $folder, $gcd, $options; + $p = new performance(); + if ( $new ) { + $count = 'c' . $id; + } else { + $p->get($id); + $count = 'id' . $id; + } + + $ages = $options['ages-list']; + + $time = explode(":", $p->time); + $minutes = $time[1]; + + if ( $options['time-12h'] ) { + if ( $time[0] == 0 ) { + $hour = "12"; + $meridiem = "AM"; + } elseif ( $time[0] == 12 ) { + $hour = "12"; + $meridiem = "PM"; + } elseif ( $time[0] < 12 ) { + $hour = $time[0]; + $meridiem = "AM"; + } else { + $hour = $time[0] - 12; + $meridiem = "PM"; + } + } else { + $hour = $time[0]; + } + ?> + + + + + + + + + + +
    + + +
    + + + + + + + + time) ) echo 'checked="checked"'; ?> type="checkbox" value="1" class="tbd" name="tbd[]" id="performance-tbd-"> + +
    <?php _e('Remove Performance', $gcd) ?>
    + +
    +
    + + + +
    + + + +
    + + + + + +
    + + diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/gigs-calendar/i18n/gigs-calendar-de_DE.mo Binary file web/wp-content/plugins/gigs-calendar/i18n/gigs-calendar-de_DE.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/gigs-calendar/i18n/gigs-calendar-es_ES.mo Binary file web/wp-content/plugins/gigs-calendar/i18n/gigs-calendar-es_ES.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/gigs-calendar/i18n/gigs-calendar-fi_FI.mo Binary file web/wp-content/plugins/gigs-calendar/i18n/gigs-calendar-fi_FI.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/gigs-calendar/i18n/gigs-calendar-fr_FR.mo Binary file web/wp-content/plugins/gigs-calendar/i18n/gigs-calendar-fr_FR.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/gigs-calendar/i18n/gigs-calendar-it_IT.mo Binary file web/wp-content/plugins/gigs-calendar/i18n/gigs-calendar-it_IT.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/gigs-calendar/i18n/gigs-calendar-nl_NL.mo Binary file web/wp-content/plugins/gigs-calendar/i18n/gigs-calendar-nl_NL.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/gigs-calendar/i18n/gigs-calendar-zh_CN.mo Binary file web/wp-content/plugins/gigs-calendar/i18n/gigs-calendar-zh_CN.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/gigs-calendar/images/add.png Binary file web/wp-content/plugins/gigs-calendar/images/add.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/gigs-calendar/images/ajax-loader.gif Binary file web/wp-content/plugins/gigs-calendar/images/ajax-loader.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/gigs-calendar/images/cancel.png Binary file web/wp-content/plugins/gigs-calendar/images/cancel.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/gigs-calendar/images/delete.png Binary file web/wp-content/plugins/gigs-calendar/images/delete.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/gigs-calendar/images/disk.png Binary file web/wp-content/plugins/gigs-calendar/images/disk.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/gigs-calendar/images/feed-icon.png Binary file web/wp-content/plugins/gigs-calendar/images/feed-icon.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/gigs-calendar/images/help.png Binary file web/wp-content/plugins/gigs-calendar/images/help.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/gigs-calendar/images/link.png Binary file web/wp-content/plugins/gigs-calendar/images/link.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/gigs-calendar/images/minus.gif Binary file web/wp-content/plugins/gigs-calendar/images/minus.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/gigs-calendar/images/money_dollar.png Binary file web/wp-content/plugins/gigs-calendar/images/money_dollar.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/gigs-calendar/images/page_edit.png Binary file web/wp-content/plugins/gigs-calendar/images/page_edit.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/gigs-calendar/images/page_white_edit.png Binary file web/wp-content/plugins/gigs-calendar/images/page_white_edit.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/gigs-calendar/images/page_white_magnify.png Binary file web/wp-content/plugins/gigs-calendar/images/page_white_magnify.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/gigs-calendar/images/plus.gif Binary file web/wp-content/plugins/gigs-calendar/images/plus.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/gigs-calendar/images/shape_square.png Binary file web/wp-content/plugins/gigs-calendar/images/shape_square.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/gigs-calendar/images/small-ajax-indicator.gif diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/gigs-calendar/images/world.png Binary file web/wp-content/plugins/gigs-calendar/images/world.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/gigs-calendar/js/jquery.form.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/gigs-calendar/js/jquery.form.js Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,872 @@ +/* + * jQuery Form Plugin + * version: 2.02 (12/16/2007) + * @requires jQuery v1.1 or later + * + * Examples at: http://malsup.com/jquery/form/ + * Dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + * + * Revision: $Id$ + */ + (function($) { +/** + * ajaxSubmit() provides a mechanism for submitting an HTML form using AJAX. + * + * ajaxSubmit accepts a single argument which can be either a success callback function + * or an options Object. If a function is provided it will be invoked upon successful + * completion of the submit and will be passed the response from the server. + * If an options Object is provided, the following attributes are supported: + * + * target: Identifies the element(s) in the page to be updated with the server response. + * This value may be specified as a jQuery selection string, a jQuery object, + * or a DOM element. + * default value: null + * + * url: URL to which the form data will be submitted. + * default value: value of form's 'action' attribute + * + * type: The method in which the form data should be submitted, 'GET' or 'POST'. + * default value: value of form's 'method' attribute (or 'GET' if none found) + * + * data: Additional data to add to the request, specified as key/value pairs (see $.ajax). + * + * beforeSubmit: Callback method to be invoked before the form is submitted. + * default value: null + * + * success: Callback method to be invoked after the form has been successfully submitted + * and the response has been returned from the server + * default value: null + * + * dataType: Expected dataType of the response. One of: null, 'xml', 'script', or 'json' + * default value: null + * + * semantic: Boolean flag indicating whether data must be submitted in semantic order (slower). + * default value: false + * + * resetForm: Boolean flag indicating whether the form should be reset if the submit is successful + * + * clearForm: Boolean flag indicating whether the form should be cleared if the submit is successful + * + * + * The 'beforeSubmit' callback can be provided as a hook for running pre-submit logic or for + * validating the form data. If the 'beforeSubmit' callback returns false then the form will + * not be submitted. The 'beforeSubmit' callback is invoked with three arguments: the form data + * in array format, the jQuery object, and the options object passed into ajaxSubmit. + * The form data array takes the following form: + * + * [ { name: 'username', value: 'jresig' }, { name: 'password', value: 'secret' } ] + * + * If a 'success' callback method is provided it is invoked after the response has been returned + * from the server. It is passed the responseText or responseXML value (depending on dataType). + * See jQuery.ajax for further details. + * + * + * The dataType option provides a means for specifying how the server response should be handled. + * This maps directly to the jQuery.httpData method. The following values are supported: + * + * 'xml': if dataType == 'xml' the server response is treated as XML and the 'success' + * callback method, if specified, will be passed the responseXML value + * 'json': if dataType == 'json' the server response will be evaluted and passed to + * the 'success' callback, if specified + * 'script': if dataType == 'script' the server response is evaluated in the global context + * + * + * Note that it does not make sense to use both the 'target' and 'dataType' options. If both + * are provided the target will be ignored. + * + * The semantic argument can be used to force form serialization in semantic order. + * This is normally true anyway, unless the form contains input elements of type='image'. + * If your form must be submitted with name/value pairs in semantic order and your form + * contains an input of type='image" then pass true for this arg, otherwise pass false + * (or nothing) to avoid the overhead for this logic. + * + * + * When used on its own, ajaxSubmit() is typically bound to a form's submit event like this: + * + * $("#form-id").submit(function() { + * $(this).ajaxSubmit(options); + * return false; // cancel conventional submit + * }); + * + * When using ajaxForm(), however, this is done for you. + * + * @example + * $('#myForm').ajaxSubmit(function(data) { + * alert('Form submit succeeded! Server returned: ' + data); + * }); + * @desc Submit form and alert server response + * + * + * @example + * var options = { + * target: '#myTargetDiv' + * }; + * $('#myForm').ajaxSubmit(options); + * @desc Submit form and update page element with server response + * + * + * @example + * var options = { + * success: function(responseText) { + * alert(responseText); + * } + * }; + * $('#myForm').ajaxSubmit(options); + * @desc Submit form and alert the server response + * + * + * @example + * var options = { + * beforeSubmit: function(formArray, jqForm) { + * if (formArray.length == 0) { + * alert('Please enter data.'); + * return false; + * } + * } + * }; + * $('#myForm').ajaxSubmit(options); + * @desc Pre-submit validation which aborts the submit operation if form data is empty + * + * + * @example + * var options = { + * url: myJsonUrl.php, + * dataType: 'json', + * success: function(data) { + * // 'data' is an object representing the the evaluated json data + * } + * }; + * $('#myForm').ajaxSubmit(options); + * @desc json data returned and evaluated + * + * + * @example + * var options = { + * url: myXmlUrl.php, + * dataType: 'xml', + * success: function(responseXML) { + * // responseXML is XML document object + * var data = $('myElement', responseXML).text(); + * } + * }; + * $('#myForm').ajaxSubmit(options); + * @desc XML data returned from server + * + * + * @example + * var options = { + * resetForm: true + * }; + * $('#myForm').ajaxSubmit(options); + * @desc submit form and reset it if successful + * + * @example + * $('#myForm).submit(function() { + * $(this).ajaxSubmit(); + * return false; + * }); + * @desc Bind form's submit event to use ajaxSubmit + * + * + * @name ajaxSubmit + * @type jQuery + * @param options object literal containing options which control the form submission process + * @cat Plugins/Form + * @return jQuery + */ +$.fn.ajaxSubmit = function(options) { + if (typeof options == 'function') + options = { success: options }; + + options = $.extend({ + url: this.attr('action') || window.location.toString(), + type: this.attr('method') || 'GET' + }, options || {}); + + // hook for manipulating the form data before it is extracted; + // convenient for use with rich editors like tinyMCE or FCKEditor + var veto = {}; + $.event.trigger('form.pre.serialize', [this, options, veto]); + if (veto.veto) return this; + + var a = this.formToArray(options.semantic); + if (options.data) { + for (var n in options.data) + a.push( { name: n, value: options.data[n] } ); + } + + // give pre-submit callback an opportunity to abort the submit + if (options.beforeSubmit && options.beforeSubmit(a, this, options) === false) return this; + + // fire vetoable 'validate' event + $.event.trigger('form.submit.validate', [a, this, options, veto]); + if (veto.veto) return this; + + var q = $.param(a);//.replace(/%20/g,'+'); + + if (options.type.toUpperCase() == 'GET') { + options.url += (options.url.indexOf('?') >= 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 = $('':"");return html},_generateMonthYearHeader:function(drawMonth,drawYear,minDate,maxDate,selectedDate,secondary){minDate=(this._rangeStart&&minDate&&selectedDate";for(var month=0;month<12;month++){if((!inMinYear||month>=minDate.getMonth())&&(!inMaxYear||month<=maxDate.getMonth())){html+='"}}html+=""}if(secondary||!this._get("changeYear")){html+=drawYear}else{var years=this._get("yearRange").split(":");var year=0;var endYear=0;if(years.length!=2){year=drawYear-10;endYear=drawYear+10}else{if(years[0].charAt(0)=="+"||years[0].charAt(0)=="-"){year=new Date().getFullYear()+parseInt(years[0],10);endYear=new Date().getFullYear()+parseInt(years[1],10)}else{year=parseInt(years[0],10);endYear=parseInt(years[1],10)}}year=(minDate?Math.max(year,minDate.getFullYear()):year);endYear=(maxDate?Math.min(endYear,maxDate.getFullYear()):endYear);html+='"}html+="
    ";return html},_addStatus:function(text){return" onmouseover=\"jQuery('#ui-datepicker-status-"+this._id+"').html('"+text+"');\" onmouseout=\"jQuery('#ui-datepicker-status-"+this._id+"').html(' ');\""},_adjustDate:function(offset,period){var year=this._drawYear+(period=="Y"?offset:0);var month=this._drawMonth+(period=="M"?offset:0);var day=Math.min(this._selectedDay,this._getDaysInMonth(year,month))+(period=="D"?offset:0);var date=new Date(year,month,day);var minDate=this._getMinMaxDate("min",true);var maxDate=this._getMinMaxDate("max");date=(minDate&&datemaxDate?maxDate:date);this._selectedDay=date.getDate();this._drawMonth=this._selectedMonth=date.getMonth();this._drawYear=this._selectedYear=date.getFullYear()},_getNumberOfMonths:function(){var numMonths=this._get("numberOfMonths");return(numMonths==null?[1,1]:(typeof numMonths=="number"?[1,numMonths]:numMonths))},_getMinMaxDate:function(minMax,checkRange){var date=this._determineDate(minMax+"Date",null);if(date){date.setHours(0);date.setMinutes(0);date.setSeconds(0);date.setMilliseconds(0)}return date||(checkRange?this._rangeStart:null)},_getDaysInMonth:function(year,month){return 32-new Date(year,month,32).getDate()},_getFirstDayOfMonth:function(year,month){return new Date(year,month,1).getDay()},_canAdjustMonth:function(offset,curYear,curMonth){var numMonths=this._getNumberOfMonths();var date=new Date(curYear,curMonth+(offset<0?offset:numMonths[1]),1);if(offset<0){date.setDate(this._getDaysInMonth(date.getFullYear(),date.getMonth()))}return this._isInRange(date)},_isInRange:function(date){var newMinDate=(!this._rangeStart?null:new Date(this._selectedYear,this._selectedMonth,this._selectedDay));newMinDate=(newMinDate&&this._rangeStart=minDate)&&(!maxDate||date<=maxDate))},_getFormatConfig:function(){var shortYearCutoff=this._get("shortYearCutoff");shortYearCutoff=(typeof shortYearCutoff!="string"?shortYearCutoff:new Date().getFullYear()%100+parseInt(shortYearCutoff,10));return{shortYearCutoff:shortYearCutoff,dayNamesShort:this._get("dayNamesShort"),dayNames:this._get("dayNames"),monthNamesShort:this._get("monthNamesShort"),monthNames:this._get("monthNames")}},_formatDate:function(day,month,year){if(!day){this._currentDay=this._selectedDay;this._currentMonth=this._selectedMonth;this._currentYear=this._selectedYear}var date=(day?(typeof day=="object"?day:new Date(year,month,day)):new Date(this._currentYear,this._currentMonth,this._currentDay));return $.datepicker.formatDate(this._get("dateFormat"),date,this._getFormatConfig())}});function extendRemove(target,props){$.extend(target,props);for(var name in props){if(props[name]==null){target[name]=null}}return target}$.fn.datepicker=function(options){var otherArgs=Array.prototype.slice.call(arguments,1);if(typeof options=="string"&&(options=="isDisabled"||options=="getDate")){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs))}return this.each(function(){typeof options=="string"?$.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this].concat(otherArgs)):$.datepicker._attachDatepicker(this,options)})};$.datepicker=new Datepicker();$(document).ready(function(){$(document.body).append($.datepicker._datepickerDiv).mousedown($.datepicker._checkExternalClick)})})(jQuery) \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/gigs-calendar/js/ui.sortable.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/gigs-calendar/js/ui.sortable.js Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,2 @@ +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}('(b(B){b A(E,D){9 C=B.2Q.3T&&B.2Q.3S<3R;5(E.2P&&!C){c E.2P(D)}5(E.2O){c!!(E.2O(D)&16)}1O(D=D.1g){5(D==E){c W}}c w}B.3Q("k.o",B.2f(B.k.3P,{3O:b(){9 C=4.6;4.O={};4.g.24("k-o");4.25();4.13=4.f.z?(/7|23/).17(4.f[0].v.e("3N")):w;5(!(/(2N|1s|3M)/).17(4.g.e("Y"))){4.g.e("Y","2N")}4.a=4.g.a();4.3L()},3K:{},k:b(C){c{l:(C||4)["l"],q:(C||4)["q"]||B([]),Y:(C||4)["Y"],3J:(C||4)["1b"],6:4.6,g:4.g,v:(C||4)["j"],3I:C?C.g:X}},t:b(F,E,C,D){B.k.1o.14(4,F,[E,4.k(C)]);5(!D){4.g.3H(F=="1z"?F:"1z"+F,[E,4.k(C)],4.6[F])}},2e:b(E){9 C=(B.1L(4.6.f)?4.6.f.14(4.g):B(4.6.f,4.g)).1F(".k-o-l");9 D=[];E=E||{};C.1v(b(){9 F=(B(4).2L(E.3G||"2K")||"").3F(E.3E||(/(.+)[-=3D](.+)/));5(F){D.1w((E.2M||F[1])+"[]="+(E.2M?F[1]:F[2]))}});c D.3C("&")},2d:b(C){9 D=(B.1L(4.6.f)?4.6.f.14(4.g):B(4.6.f,4.g)).1F(".k-o-l");9 E=[];D.1v(b(){E.1w(B(4).2L(C||"2K"))});c E},2F:b(J){9 E=4.1b.7,D=E+4.r.m,I=4.1b.8,H=I+4.r.n;9 F=J.7,C=F+J.m,K=J.8,G=K+J.n;5(4.6.1r=="2J"||(4.6.1r=="1S"&&4.r[4.13?"m":"n"]>J[4.13?"m":"n"])){c(I+4.a.p.8>K&&I+4.a.p.8F&&E+4.a.p.7J[4.13?"m":"n"])){5(!(I+4.a.p.8>K&&I+4.a.p.8F&&E+4.a.p.7F&&E+4.a.p.7F+J.m/2&&E+4.a.p.7K&&I+4.a.p.8K+J.n/2&&I+4.a.p.8F&&EC){c 1}}Z{5(H>K&&IG){c 2}}}c w},25:b(){4.2I();4.1T()},2I:b(){4.f=[];4.d=[4];9 C=4.f;9 E=[B.1L(4.6.f)?4.6.f.14(4.g):B(4.6.f,4.g)];5(4.6.28){P(9 F=4.6.28.z-1;F>=0;F--){9 H=B(4.6.28[F]);P(9 D=H.z-1;D>=0;D--){9 G=B.1f(H[D],"o");5(G&&!G.6.27){E.1w(B.1L(G.6.f)?G.6.f.14(G.g):B(G.6.f,G.g));4.d.1w(G)}}}}P(9 F=E.z-1;F>=0;F--){E[F].1v(b(){B.1f(4,"o-v",W);C.1w({v:B(4),m:0,n:0,7:0,8:0})})}},1T:b(C){P(9 E=4.f.z-1;E>=0;E--){9 D=4.f[E].v;5(!C){4.f[E].m=(4.6.1l?B(4.6.1l,D):D).1u()}5(!C){4.f[E].n=(4.6.1l?B(4.6.1l,D):D).1t()}9 F=(4.6.1l?B(4.6.1l,D):D).a();4.f[E].7=F.7;4.f[E].8=F.8}P(9 E=4.d.z-1;E>=0;E--){9 F=4.d[E].g.a();4.d[E].O.7=F.7;4.d[E].O.8=F.8;4.d[E].O.m=4.d[E].g.1u();4.d[E].O.n=4.d[E].g.1t()}},3B:b(){4.g.3A("k-o k-o-27").2H("o").3z(".o");4.3y();P(9 C=4.f.z-1;C>=0;C--){4.f[C].v.2H("o-v")}},1Z:b(E){9 C=E||4,F=C.6;5(F.q.3x==3w){9 D=F.q;F.q={g:b(){c B("<2G>").24(D)[0]},1i:b(G,H){H.e(G.a()).e({m:G.1u(),n:G.1t()})}}}C.q=B(F.q.g.14(C.g,C.j)).1q("S").e({Y:"1s"});F.q.1i.14(C.g,C.j,C.q)},2q:b(F){P(9 D=4.d.z-1;D>=0;D--){5(4.2F(4.d[D].O)){5(!4.d[D].O.1a){5(4.26!=4.d[D]){9 I=3v;9 H=X;9 E=4.1b[4.d[D].13?"7":"8"];P(9 C=4.f.z-1;C>=0;C--){5(!A(4.d[D].g[0],4.f[C].v[0])){1X}9 G=4.f[C][4.d[D].13?"7":"8"];5(1k.2E(G-E)=0;E--){4.d[E].t("3i",H,4)}}5(B.k.15){B.k.15.3h=4}5(B.k.15&&!J.2n){B.k.15.3g(4,H)}4.2j=W;4.2u(H);c W},2t:b(D,E){5(!E){E=4.Y}9 C=D=="1s"?1:-1;c{8:(E.8+4.a.s.8*C-(4.u[0]==h.S?0:4.u[0].N)*C+4.T.8*C),7:(E.7+4.a.s.7*C-(4.u[0]==h.S?0:4.u[0].M)*C+4.T.7*C)}},1Y:b(F){9 G=4.6;9 C={8:(F.1e-4.a.p.8-4.a.s.8+(4.u[0]==h.S?0:4.u[0].N)),7:(F.1c-4.a.p.7-4.a.s.7+(4.u[0]==h.S?0:4.u[0].M))};5(!4.1j){c C}5(4.i){5(C.7<4.i[0]){C.7=4.i[0]}5(C.8<4.i[1]){C.8=4.i[1]}5(C.7>4.i[2]){C.7=4.i[2]}5(C.8>4.i[3]){C.8=4.i[3]}}5(G.11){9 E=4.1j.8+1k.2v((C.8-4.1j.8)/G.11[1])*G.11[1];C.8=4.i?(!(E<4.i[1]||E>4.i[3])?E:(!(E<4.i[1])?E-G.11[1]:E+G.11[1])):E;9 D=4.1j.7+1k.2v((C.7-4.1j.7)/G.11[0])*G.11[0];C.7=4.i?(!(D<4.i[0]||D>4.i[2])?D:(!(D<4.i[0])?D-G.11[0]:D+G.11[0])):D}c C},2u:b(D){4.Y=4.1Y(D);4.1b=4.2t("1s");P(9 C=4.f.z-1;C>=0;C--){9 E=4.2s(4.f[C]);5(!E){1X}5(4.f[C].v[0]!=4.j[0]&&4.j[E==1?"3f":"1G"]()[0]!=4.f[C].v[0]&&!A(4.j[0],4.f[C].v[0])&&(4.6.2r=="3e-3d"?!A(4.g[0],4.f[C].v[0]):W)){4.2h=E==1?"2g":"3c";4.1D(D,4.f[C]);4.t("1W",D);3b}}4.2q(D);4.t("1z",D);5(!4.6.1I||4.6.1I=="x"){4.l[0].2p.7=4.Y.7+"2o"}5(!4.6.1I||4.6.1I=="y"){4.l[0].2p.8=4.Y.8+"2o"}5(B.k.15){B.k.15.3a(4,D)}c w},39:b(E,D){5(B.k.15&&!4.6.2n){B.k.15.38(4,E)}5(4.6.1V){9 C=4;9 F=C.j.a();5(C.q){C.q.2m({18:"37"},(L(4.6.1V,10)||2l)-36)}B(4.l).2m({7:F.7-4.a.s.7-C.T.7+(4.u[0]==h.S?0:4.u[0].M),8:F.8-4.a.s.8-C.T.8+(4.u[0]==h.S?0:4.u[0].N)},L(4.6.1V,10)||2l,b(){C.t("1p",E,X,D);C.1H(E)})}Z{4.t("1p",E,X,D);4.1H(E,D)}c w},1H:b(E,D){5(4.1U!=4.j.1G().1F(".k-o-l")[0]){4.t("1i",E,X,D)}5(!A(4.g[0],4.j[0])){5(4.1U==4.j.1G().1F(".k-o-l")[0]){4.t("1i",E,X,D)}4.t("1E",E,X,D);P(9 C=4.d.z-1;C>=0;C--){5(A(4.d[C].g[0],4.j[0])){4.d[C].t("1i",E,4,D);4.d[C].t("35",E,4,D)}}}P(9 C=4.d.z-1;C>=0;C--){4.d[C].t("34",E,4,D);5(4.d[C].O.1a){4.d[C].t("2k",E,4);4.d[C].O.1a=0}}4.2j=w;5(4.33){c w}B(4.j).e("2i","");5(4.q){4.q.1E()}4.l.1E();c W},1D:b(E,D,C){C?C.32(4.j):D.v[4.2h=="2g"?"31":"30"](4.j);4.1T(W);5(4.6.q){4.6.q.1i.14(4.g,4.j,4.q)}}}));B.2f(B.k.o,{2Z:"2e 2d",2Y:{1r:"1S",2X:0,2W:0,2V:":2U,2T",f:"> *",19:2S,2c:W,1q:"s"}});B.k.1o.1C("o","1h",{1n:b(E,D){9 C=B("S");5(C.e("1h")){D.6.1R=C.e("1h")}C.e("1h",D.6.1h)},1p:b(D,C){5(C.6.1R){B("S").e("1h",C.6.1R)}}});B.k.1o.1C("o","19",{1n:b(E,D){9 C=D.l;5(C.e("19")){D.6.1Q=C.e("19")}C.e("19",D.6.19)},1p:b(D,C){5(C.6.1Q){B(C.l).e("19",C.6.1Q)}}});B.k.1o.1C("o","18",{1n:b(E,D){9 C=D.l;5(C.e("18")){D.6.1P=C.e("18")}C.e("18",D.6.18)},1p:b(D,C){5(C.6.1P){B(C.l).e("18",C.6.1P)}}});B.k.1o.1C("o","1m",{1n:b(E,D){9 F=D.6;9 C=B(4).1f("o");F.V=F.V||20;F.U=F.U||20;C.R=b(G){2b{5(/1B|1m/.17(G.e("1A"))||(/1B|1m/).17(G.e("1A-y"))){c G}G=G.s()}1O(G[0].1g);c B(h)}(C.j);C.Q=b(G){2b{5(/1B|1m/.17(G.e("1A"))||(/1B|1m/).17(G.e("1A-x"))){c G}G=G.s()}1O(G[0].1g);c B(h)}(C.j);5(C.R[0]!=h&&C.R[0].1y!="1x"){C.1N=C.R.a()}5(C.Q[0]!=h&&C.Q[0].1y!="1x"){C.1M=C.Q.a()}},1z:b(E,D){9 F=D.6;9 C=B(4).1f("o");5(C.R[0]!=h&&C.R[0].1y!="1x"){5((C.1N.8+C.R[0].2a)-E.1e Gigs Calendar in your WordPress +admin panel. You'll probably want to set which WordPress page you want your +calendar to appear on. Once you've saved that, you are ready to get started. + +== Compatibility notes == += Browser = +This plugin's administration pages are currently only supported fully by the +Firefox and Safari browsers. When I am approaching version 1.0, I plan to +develop full support for IE7 and Opera. If you would like to know more about +my decision to focus on Firefox and Safari, feel free to get in touch with me. + += WordPress = +If you are using a WordPress version less than 2.3, you may need to create the +database tables manually. You can find the SQL in tables.sql. Get in touch with +me if you need help doing that. You might also want to consider updating to the +most recent version of WordPress. + += MySQL = +If you are using a MySQL version less than 4.1, filtering the gig posts from +your normal blog entries will be disabled. You will need to filter those based +on the category you select in the settings page using another plugin. I suggest +the Advanced Category Excluder (http://wordpress.org/extend/plugins/advanced-category-excluder/) plugin. diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/gigs-calendar/rss.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/gigs-calendar/rss.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,57 @@ +posts . ' p, + ' . TABLE_GIGS . ' g + WHERE + p.ID = g.postID AND + g.date >= CURDATE() + + ORDER BY g.date +'; + +$posts = $wpdb->get_results($query); +echo ''; +?> + + + <?php bloginfo('name') ?> - <?php _e('Upcoming Gigs feed', $gcd); ?> + + + + + + + Gigs Calendar v + + + + + getByPostID($post->ID); $p = $g->getPerformances(); $p->fetch(); ?> + + <?php echo the_title() ?> + + date . ' ' . $p->time)); ?> + + + + ]]> + + + + + + + + + + diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/gigs-calendar/settings.ajax.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/gigs-calendar/settings.ajax.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,488 @@ + 'm/d/y', + 'archive' => 'm/d/y', + 'long' => 'l, F j, Y', +); + + +switch ( $_POST['action'] ) : + case 'load': + $listFields = array( + 'city' => __('City', $gcd), + 'country' => __('Country', $gcd), + 'venue' => __('Venue', $gcd), + 'eventName' => __('Event Name', $gcd), + 'date' => __('Date', $gcd), + 'time' => __('Time', $gcd), + 'shortNotes' => __('Short Notes', $gcd), + 'tickets' => __('Ticket Link', $gcd), + 'map' => __('Map Link', $gcd), + ); + + $titleFields = array( + 'city' => __('City', $gcd), + 'venue' => __('Venue', $gcd), + 'country' => __('Country', $gcd), + 'eventName' => __('Event Name', $gcd), + 'date' => __('Date', $gcd), + ); + + $defaults = array( + 'archive' => -1, + 'category' => get_option('default_category'), + 'no-upcoming' => __('Sorry, there aren’t any upcoming gigs right now. Check back soon!', $gcd), + 'no-past' => __('There aren’t any gigs here right now. Check back soon!', $gcd), + 'silk-link' => 1, + 'b4b-link' => 1, + 'rss-link' => 1, + 'gigs-table-show' => array_keys($listFields), + 'gig-title-show' => array('city', 'date'), + 'eventName-label' => __("Who", $gcd), + 'ages-list' => array(__('All Ages', $gcd), __('21+', $gcd), __('16+', $gcd)), + 'list-venue-link' => 0, + 'list-headers' => 0, + 'template' => 'basic', + 'time-12h' => 1, + 'calendar-position' => "bottom", + 'tbd-text' => __("TBD"), + 'tours-display' => 0, + 'tours-empty' => 0, + 'tours-sort' => 'date', + 'user_level' => 'level_5', + 'post-filtering' => 1, + 'admin-only-settings' => 0, + ); + + unset($defaults['gigs-table-show'][array_search('eventName', $defaults['gigs-table-show'])]); + unset($defaults['gigs-table-show'][array_search('country', $defaults['gigs-table-show'])]); + + if ( is_array($options) ) { + $options = array_merge($defaults, $options); + } else { + $options = $defaults; + } + if ( is_array($options['date']) ) { + $options['date'] = array_merge($date_defaults, $options['date']); + } else { + $options['date'] = $date_defaults; + } + + if ( (int) get_option('gig_db_version') == -1 ) { + die (__('Oops! It looks like you’re missing some or all of the tables required for this plugin. They should have been created automatically, but you can create them with the tables.sql file in the same folder as this plugin. If you have any questions, you can use the feedback form in the next tab.')); + } + ?> + +
    new page first.', $gcd) ?>
    + + mysql_get_server_info() ) : ?> +
    + Warning: You are running MySQL server version . This plugin requires version 4.1 or higher to hide the future gig posts from your homepage. Your best option is to use a plugin like Advanced Category Excluder to hide the gigs using the category option below.'); ?> +
    + +
    + + +

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

    + +
    + +
    + + +

    +
    +
      + +
    • + + <? _e('Delete', $gcd) ?> + +
    • + +
    + <? _e('Add', $gcd) ?> + +

    +
    + +
    date() function format)', $gcd) ?>
    +
    date() function format)', $gcd) ?>
    + +
    date() function format)', $gcd) ?>
    + +
    + +
    + + +

    +
    +
      + + +
    • + + +
    • + + + $value ) : ?> + +
    • + + +
    • + + +
    +
    + +
    + +
    + +
    + +

    + +
    +
      + + +
    • + + +
    • + + + $value ) : ?> + +
    • + + +
    • + + +
    + +
    + +

    +
    + +
    + +
    + + +

    +
    +
    + Note: It’s ok to say "no". I’ve offered this freely with no expectations, but I’d be very grateful if you said "yes"', $gcd) ?> +
    + +
    +
    + Note: The Silk Icons that I used in this plugin are licensed under the Creative Commons. You must link back to him somewhere on your site. If you link to him on another page, giving him credit, or you have replaced the icons, or you do not display any of them publicly on your site, you may turn off this link.', $gcd) ?>
    + +

    +
    +
    + + +
    +
    + + + + + (empty($args['date-short']) ? $date_defaults['short'] : $args['date-short']), + 'archive' => (empty($args['date-archive']) ? $date_defaults['archive'] : $args['date-archive']), + 'long' => (empty($args['date-long']) ? $date_defaults['long'] : $args['date-long']), + ); + + unset($args['apply-changes'], $args['nonce'], $args['action'], $args['date-long'], $args['date-archive'], $args['date-short'], $args['long-date-format'], $args['short-date-format']); + + foreach ( $args as $key => $value ) { + if ( is_string($value) ) { + $args[$key] = stripslashes($value); + } + } + + $options = get_option('gigs-calendar'); + if ( is_array($options) ) { + $args = array_merge($options, $args); + } + if ( is_array($args['date']) ) { + $args['date'] = array_merge($args['date'], $dates); + } else { + $args['date'] = $dates; + } + + update_option('gigs-calendar', $args); + $options = get_option('gigs-calendar'); + if ( $_POST['apply-changes'] != 'no' ) { + $g = new gig(); + $g->search('future' == $_POST['apply-changes'] ? 'date >= CURDATE()' : null); + while ( $g->fetch() ) { + $g->save(false); + } + } + break; +endswitch; + +?> diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/gigs-calendar/tables.sql --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/gigs-calendar/tables.sql Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,60 @@ +-- Database tables for the Gigs Calendar Plugin v0.2 +-- Database version: 2 + +-- Note: Ignore this file unless your database tables are not created automatically. +-- Replace "[Your database prefix here]" with the appropriate database prefix, for example "wp_". + +-- -------------------------------------------------------- + +CREATE TABLE IF NOT EXISTS `[Your database prefix here]gigs_gig` ( + `id` int(10) unsigned NOT NULL auto_increment, + `venueID` int(10) unsigned NOT NULL, + `date` date NOT NULL, + `notes` text NOT NULL, + `postID` bigint(20) unsigned NOT NULL, + `eventName` varchar(255) NOT NULL, + `tour_id` INT UNSIGNED NULL, + PRIMARY KEY (`id`) +); + +-- -------------------------------------------------------- + +CREATE TABLE IF NOT EXISTS `[Your database prefix here]gigs_performance` ( + `id` int(10) unsigned NOT NULL auto_increment, + `gigID` int(10) unsigned NOT NULL, + `time` time default NULL, + `link` varchar(255) NOT NULL, + `shortNotes` varchar(255) NOT NULL, + `ages` varchar(255) NOT NULL, + PRIMARY KEY (`id`) +); + +-- -------------------------------------------------------- + +CREATE TABLE `[Your database prefix here]gigs_tour` ( + `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , + `name` VARCHAR( 255 ) NOT NULL , + `notes` MEDIUMTEXT NOT NULL , + `pos` INT UNSIGNED NOT NULL +); +-- -------------------------------------------------------- + +CREATE TABLE IF NOT EXISTS `[Your database prefix here]gigs_venue` ( + `id` int(10) unsigned NOT NULL auto_increment, + `name` varchar(255) NOT NULL, + `address` text NOT NULL, + `city` varchar(255) NOT NULL, + `state` varchar(255) NOT NULL, + `country` varchar(255) NOT NULL, + `postalCode` varchar(255) NOT NULL, + `contact` varchar(255) NOT NULL, + `phone` varchar(255) NOT NULL, + `email` varchar(255) NOT NULL, + `link` varchar(255) NOT NULL, + `notes` text NOT NULL, + `private` tinyint(4) NOT NULL, + `apiID` int(10) unsigned NOT NULL, + `deleted` tinyint(4) NOT NULL, + `customMap` varchar(255) NOT NULL, + PRIMARY KEY (`id`) +); diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/gigs-calendar/templates/basic/attribution.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/gigs-calendar/templates/basic/attribution.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,9 @@ + +
    + + Blogs for Bands', $gcd); ?> + + + Mark James', $gcd); ?> + +
    \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/gigs-calendar/templates/basic/gig-post.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/gigs-calendar/templates/basic/gig-post.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,60 @@ +
    + + + eventName) ) : ?> + + + + + + + + + + + + + + notes) ) : ?> + + + +
    eventName ?>
    +
    date, 'long'); ?>
    + fetch() ) : ?> +
    + time); ?> + shortNotes) ) : ?> + - + shortNotes; ?> + + - + ages; ?> + link) ) : ?> + <?php _e('Buy Tickets', $gcd); ?> + +
    + +
    + private ) : ?> +
    + +
    + link) ) : ?> + name; ?> + + name; ?> + + () +
    +
    getAddress()); ?>
    + notes) ) : ?> +

    notes); ?>

    + + +
    notes); ?>
    + +

    «

    + +
    + \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/gigs-calendar/templates/basic/gigs-list.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/gigs-calendar/templates/basic/gigs-list.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,55 @@ +
    + + + + + + + + + + + + + $g ) : ?> + performances as $key => $p ) : ?> + + '', + 'country' => '', + 'venue' => '', + 'eventName' => '', + 'date' => '', + 'time' => '', + 'shortNotes' => '', + 'tickets' => ( $upcoming ? '' : '' ), + 'map' => '', + ); + } else { + $fields = array( + 'city' => '', + 'country' => '', + 'venue' => '', + 'eventName' => '', + 'date' => '', + 'time' => '', + 'shortNotes' => '', + 'tickets' => ( $upcoming ? '' : '' ), + 'map' => '', + ); + } + echo dtcGigs::selectFields($fields, $g); + ?> + + + + +
    {' . $g->cityState . '}{' . $g->country . '}{' . $g->name . '}{' . $g->eventName . '}{' . $g->date . '}{' . $p->time . '}{' . $p->shortNotes . '}' . ( !empty($p->link) ? '' . __('Buy Tickets', $gcd) . '' : '') . '' . ($g->mapLink ? '' . __('Map', $gcd) . '' : '') . '{' . $p->time . '}{' . $p->shortNotes . '}' . ( !empty($p->link) ? '' . __('Buy Tickets', $gcd) . '' : '') . '
    + +
    + +
    + +
    \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/gigs-calendar/templates/basic/next-widget.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/gigs-calendar/templates/basic/next-widget.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,16 @@ + + + + +
    + diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/gigs-calendar/templates/basic/rss.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/gigs-calendar/templates/basic/rss.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,3 @@ + +
    + \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/gigs-calendar/templates/basic/style.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/gigs-calendar/templates/basic/style.css Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,78 @@ +div.attribution, div.gigs-rss { + text-align: center; + font-size: 87%; + margin: .5em 0px; +} + +div.gigs-rss img { + position: relative; + top: 2px; +} + +div.attribution span { + margin: 0px 1em; +} + +table.gigs { + width: 100%; + text-align: left; + font-size: .9em; + border-collapse: collapse; + border: 1px dotted #666; +} + +table.gigs td.icon { + width: 18px; + text-align: center; +} + +table.gigs td.time { + text-align: right; +} + +table.gigs a { + font-weight: bold; +} + +table.gigs a img { + border: 0px; +} + + +table.gigs tr.gig { + border-top: 1px dotted #666; +} + +table.gigs td.shortNotes { + padding-left: 4px; +} + +.bold { + font-weight: bold; +} + +img.buy { + position: relative; + top: 3px; +} + +table.gigs caption { + font-weight: bold; + font-size: 125%; + text-align: left; +} + +table.gigs caption div.notes{ + font-weight: normal; + font-size: 80%; + text-align: left; +} + +table.gigs, div.no-gigs { + margin-bottom: 1em; +} + +/** Next Gig Widget **/ + .gig.next { + padding-left: 10px; + } \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/gigs-calendar/templates/basic/upcoming-widget.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/gigs-calendar/templates/basic/upcoming-widget.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,30 @@ + +
      + cityState; + break; + case 'venue': + $link[] = $g->name; + break; + case 'eventName': + $link[] = $g->eventName; + break; + } + } + $link = array_unique($link); + foreach ( $link as $key => $value ) { + if ( empty($value) ) unset($link[$key]); + } + ?> +
    • mysqlDate . ' ' . $p->time, (date('Y') == date('Y', strtotime($g->mysqlDate))) ? $args['dateFormat'] : $args['dateFormatYear']) ?>: + +
    • + +
    + +
    + \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/gigs-calendar/templates/readme-first.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/gigs-calendar/templates/readme-first.txt Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,13 @@ +Gigs Calendar Templates + +WARNING! + +Do not edit any files in this folder. If you do, you do so at your own risk. +WordPress will delete any changes you make when you perform the automatic +upgrade for this plugin. + +Instead create a gigs-templates folder in your wp-content directory and copy +the basic template there before you make any changes. + +For more information, visit the official documentation page: +http://dev.blogsforbands.com/gigs-calendar-template-system/ \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/gigs-calendar/tours.ajax.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/gigs-calendar/tours.ajax.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,312 @@ +search(null, ($options['tours-sort'] == 'custom' ? '`pos`' : '`name`')); + ?> +
    + +
    + + + + + + + + + + + + + + fetch() ) : ?> + "> + + + + + + "> + + + + + +
    id; ?>name; ?>notes) ) > 40 ) { + echo substr( strip_tags($t->notes), 0, 40 ) . '...'; + } else { + echo strip_tags($t->notes); + } + ?> +
    + <?php _e('Edit', $gcd) ?> + + <?php _e('Map', $gcd) ?> + + <?php _e('Delete', $gcd) ?> +
    +
    + + + + + setupEvents = function() { + + + setupPerformances(); + } + + setupEvents(); + + }(jQuery)); + + + + + name = $_POST['name']; + $t->notes = $_POST['notes']; + + if ( $t->save() ) { + echo '{success:true, tour:' . $t->toJSON() . '}'; + } else { + echo '{success:false}'; + } + break; + case 'getRow': + $t = new tour($_POST['id']); + ?> + "> + id; ?> + name; ?> + notes) ) > 40 ) { + echo substr( strip_tags($t->notes), 0, 40 ) . '...'; + } else { + echo strip_tags($t->notes); + } + ?> + +
    + <?php _e('Edit', $gcd) ?> + + <?php _e('Map', $gcd) ?> + + <?php _e('Delete', $gcd) ?> +
    + + + "> + + + + delete(); + echo '{"success": ' . ($result ? 'true' : 'false') . ',"action":"delete"' . ($result ? '' : ',"error":"db"') . '}'; + break; + case 'edit': + $t = new tour($_POST['id']); + ?> +
    + + + + + + + + + +
    +

    +
    +
    + +
    +
    + + + + + +
    +
    + + + name = $_POST['name']; + $t->notes = $_POST['notes']; + + $t->save(); + echo '{success:true, tour:' . $t->toJSON() . '}'; + break; + + case 'performance-form': + if ( isset($_POST['id']) ) { + pForm($_POST['id'], false); + } else { + pForm((int) $_POST['count'], true); + } + break; +} +?> \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/gigs-calendar/venues.ajax.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/gigs-calendar/venues.ajax.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,306 @@ +get_results('SELECT * FROM `' . TABLE_CATS . '` ORDER BY `' . $options['categorySortColumn'] .'` ' . $options['categorySortDirection']); + $v = new venue(); + $v->search('deleted = 0', 'name'); + ?> +
    + +
    +
    +
    + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + +
    +
    + + + + +
    +
    +
    + + + + + + + + + + + + + + fetch() ) : ?> + "> + + + + + + + + "> + + + + + +
    id; ?>name; ?>city . (!empty($v->state) ? ', ' . $v->state : '') ?>phone ?> +
    + <?php _e('Edit', $gcd) ?> + <?php _e('Map', $gcd) ?> + link) ) : ?> + <?php _e('Homepage', $gcd) ?> + + <?php _e('Delete', $gcd) ?> +
    +
    + + + $value ) { + $v->$key = $value; + } + if ( $v->save() ) { + echo '{success:true, venue:' . $v->toJSON() . '}'; + } else { + echo '{success:false}'; + } + break; + case 'map': + //$v = new venue($_GET['id']); + case 'getRow': + $v = new venue($_POST['id']); + ?> + + id; ?> + name; ?> + city . (!empty($v->state) ? ', ' . $v->state : '') ?> + phone ?> + email) ? '' . $v->email . '' : '' ?> + +
    + <?php _e('Edit', $gcd) ?> + <?php _e('Map', $gcd) ?> + link) ) : ?> + <?php _e('Homepage', $gcd) ?> + + <?php _e('Delete', $gcd) ?> +
    + + + "> + + + + delete(); + echo '{"success": ' . ($result ? 'true' : 'false') . ',"action":"delete"' . ($result ? '' : ',"error":"db"') . '}'; + break; + + case 'edit': + $v = new venue($_POST['id']); + ?> +
    + + + + + + + + + + + + + + +
    +
    + +
    +
    +
    + +
    +
    + + + + + +
    +
    + + + $value ) { + $v->$key = $value; + } + if ( $v->save() ) { + echo '{success:true, venue:' . $v->toJSON() . '}'; + } else { + echo '{success:false}'; + } + break; +} + + diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/gigs-calendar/version.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/gigs-calendar/version.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,6 @@ + diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/documentation.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/google-sitemap-generator/documentation.txt Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,312 @@ + Google XML Sitemaps Generator for WordPress + ============================================================================== + + This generator will create a sitemaps.org compliant sitemap of your WordPress blog. + Currently homepage, posts, static pages, categories, archives and author pages are supported. + + The priority of a post depends on its comments. You can choose the way the priority + is calculated in the options screen. + + Feel free to visit my website under www.arnebrachhold.de or contact me at + himself [at] arnebrachhold [dot] de + + Have fun! + Arne + + Installation: + ============================================================================== + 1. Upload the full directory into your wp-content/plugins directory + 2. Make your blog directory writeable OR create two files called sitemap.xml + and sitemap.xml.gz and make them writeable via CHMOD In most cases, your blog directory is already writeable. + 2. Activate it in the Plugin options + 3. Edit or publish a post or click on Rebuild Sitemap on the Sitemap Administration Interface + + + Additional contributors: + ============================================================================== + Inspiration Michael Nguyen http://www.socialpatterns.com/ + SQL Improvements Rodney Shupe http://www.shupe.ca/ + Japanse Lang. File Hirosama http://hiromasa.zone.ne.jp/ + Spanish lang. File Omi http://equipajedemano.info/ + Italian lang. File Stefano Aglietti http://wordpress-it.it/ + Trad.Chinese File Kirin Lin http://kirin-lin.idv.tw/ + Simpl.Chinese File june6 http://www.june6.cn/ + Swedish Lang. File Tobias Bergius http://tobiasbergius.se/ + Czech Lang. File Peter Kahoun http://kahi.cz + Finnish Lang. File Olli Jarva http://kuvat.blog.olli.jarva.fi/ + Belorussian Lang. File Marcis Gasuns + Bulgarian Lang. File Alexander Dichev http://dichev.com + + Thanks to all contributors and bug reporters! There were much more people involved + in testing this plugin and reporting bugs, either by email or in the WordPress forums. + + Unfortunately I can't maintain a whole list here, but thanks again to everybody not listed here! + + + Release History: + ============================================================================== + 2005-06-05 1.0 First release + 2005-06-05 1.1 Added archive support + 2005-06-05 1.2 Added category support + 2005-06-05 2.0a Beta: Real Plugin! Static file generation, Admin UI + 2005-06-05 2.0 Various fixes, more help, more comments, configurable filename + 2005-06-07 2.01 Fixed 2 Bugs: 147 is now _e(strval($i)); instead of _e($i); 344 uses a full < ?php instead of < ? + Thanks to Christian Aust for reporting this :) + 2005-06-07 2.1 Correct usage of last modification date for cats and archives (thx to Rodney Shupe (http://www.shupe.ca/)) + Added support for .gz generation + Fixed bug which ignored different post/page priorities + Should support now different wordpress/admin directories + 2005-06-07 2.11 Fixed bug with hardcoded table table names instead of the $wpd vars + 2005-06-07 2.12 Changed SQL Statement of the categories to get it work on MySQL 3 + 2005-06-08 2.2 Added language file support: + - Japanese Language Files and code modifications by hiromasa (http://hiromasa.zone.ne.jp/) + - German Language File by Arne Brachhold (http://www.arnebrachhold.de) + 2005-06-14 2.5 Added support for external pages + Added support for Google Ping + Added the minimum Post Priority option + Added Spanish Language File by César Gómez Martín (http://www.cesargomez.org/) + Added Italian Language File by Stefano Aglietti (http://wordpress-it.it/) + Added Traditional Chine Language File by Kirin Lin (http://kirin-lin.idv.tw/) + 2005-07-03 2.6 Added support to store the files at a custom location + Changed the home URL to have a slash at the end + Required admin-functions.php so the script will work with external calls, wp-mail for example + Added support for other plugins to add content to the sitemap via add_filter() + 2005-07-20 2.7 Fixed wrong date format in additional pages + Added Simplified Chinese Language Files by june6 (http://www.june6.cn/) + Added Swedish Language File by Tobias Bergius (http://tobiasbergius.se/) + 2006-01-07 3.0b Added different priority calculation modes and introduced an API to create custom ones + Added support to use the Popularity Contest plugin by Alex King to calculate post priority + Added Button to restore default configuration + Added several links to homepage and support + Added option to exclude password protected posts + Added function to start sitemap creation via GET and a secret key + Posts and pages marked for publish with a date in the future won't be included + Improved compatiblity with other plugins + Improved speed and optimized settings handling + Improved user-interface + Recoded plugin architecture which is now fully OOP + 2006-01-07 3.0b1 Changed the way for hook support to be PHP5 and PHP4 compatible + Readded support for tools like w.Bloggar + Fixed "doubled-content" bug with WP2 + Added xmlns to enable validation + 2006-03-01 3.0b3 More performance + More caching + Better support for Popularity Contest and WP 2.x + 2006-11-16 3.0b4 Fixed bug with option SELECTS + Decreased memory usage which should solve timeout and memory problems + Updated namespace to support YAHOO and MSN + 2007-01-19 3.0b5 Javascripted page editor + WP 2 Design + YAHOO notification + New status report, removed ugly logfiles + Better Popularity Contest Support + Fixed double backslashes on windows systems + Added option to specify time limit and memory limit + Added option to define a XSLT stylesheet and added a default one + Fixed bug with sub-pages. Thanks to: + - Mike Baptiste (http://baptiste.us), + - Peter Claus Lamprecht (http://fastagent.de) + - Glenn Nicholas (http://publicityship.com.au) + Improved file handling, thanks to VJTD3 (http://www.VJTD3.com) + WP 2.1 improvements + 2007-01-23 3.0b6 Use memory_get_peak_usage instead of memory_get_usage if available + Removed the usage of REQUEST_URI since it not correct in all environments + Fixed that sitemap.xml.gz was not compressed + Added compat function "stripos" for PHP4 (Thanks to Joseph Abboud!) + Streamlined some code + 2007-05-17 3.0b7 Added option to include the author pages like /author/john + Small enhancements, removed stripos dependency and the added compat function + Added check to not build the sitemap if importing posts + Fixed missing domain parameter for translator name + Fixed WP 2.1 / Pre 2.1 post / pages database changes + Fixed wrong XSLT location (Thanks froosh) + Added Ask.com notification + Removed unused javascript + 2007-07-22 3.0b8 Changed category SQL to prevent unused cats from beeing included + Plugin will be loaded on "init" instead of direclty after the file has been loaded. + Added support for robots.txt modification + Switched YAHOO ping API from YAHOO Web Services to the "normal" ping service which doesn't require an app id + Search engines will only be pinged if the sitemap file has changed + 2007-09-02 3.0b9 Added tag support for WordPress 2.3 + Now using post_date_gmt instead of post_date everywhere + Fixed archive bug with static pages (Thanks to Peter Claus Lamprecht) + Fixed some missing translation domains, thanks to Kirin Lin! + Added Czech translation files for 2.7.1, thanks to Peter Kahoun (http://kahi.cz) + 2007-09-04 3.0b10 Added category support for WordPress 2.3 + Fixed bug with empty URLs in sitemap + Repaired GET building + Added more info on debug mode + 2007-09-23 3.0b11 Changed mysql queries to unbuffered queries + Uses MUCH less memory + Fixed really stupid bug with search engine pings + Option to set how many posts will be included + 2007-09-24 3.0 Yeah, 3.0 Final after one and a half year ;) + Removed useless functions + 2007-11-03 3.0.1 Using the Snoopy HTTP client for ping requests instead of wp_remote_fopen + Fixed undefined translation strings + Added "safemode" for SQL which doesn't use unbuffered results (old style) + Added option to run the building process in background using wp-cron + Removed unnecessary function_exists, Thanks to user00265 + Added links to test the ping if it failed. + 2007-11-25 3.0.2 Fixed bug which caused that some settings were not saved correctly + Added option to exclude pages or post by ID + Restored YAHOO ping service with API key since the other one is to unreliable. (see 3.0b8) + 2007-11-28 3.0.2.1 Fixed wrong XML Schema Location (Thanks to Emanuele Tessore) + Added Russian Language files by Sergey http://ryvkin.ru + 2007-12-30 3.0.3 Added Live Search Ping + Removed some hooks which rebuilt the sitemap with every comment + 2008-03-30 3.0.3.1 Added compatibility CSS for WP 2.5 + 2008-04-28 3.0.3.2 Improved WP 2.5 handling + 2008-04-29 3.0.3.3 Fixed author pages + Enhanced background building and increased delay to 15 seconds + Background building is enabled by default + 2008-04-28 3.1b1 Reorganized files in builder, loader and UI + Added 2 step loader so only code that's needed will be loaded + Improved WP 2.5 handling + Secured all admin actions with nonces + 2008-05-18 3.1b2 Fixed critical bug with the build in background option + Added notification if a build is scheduled + 2008-05-19 3.1b3 Cleaned up plugin directory and moved asset files to subfolders + Fixed background building bug in WP 2.1 + Removed auto-update plugin link for WP < 2.5 + 2008-05-22 3.1 Marked as 3.1 stable, updated documentation + 2008-05-27 3.1.0.1 Extracted UI JS to external file + Enabled the option to include following pages of multi-page posts + Script tries to raise memory and time limit if active + 2008-12-21 3.1.1 Fixed redirect issue if wp-admin is rewritten via mod_rewrite, thanks to macjoost + Fixed wrong path to assets, thanks PozHonks + Fixed wrong plugin URL if wp-content was renamed / redirected, thanks to wnorris + Updated WP User Interface for 2.7 + Various other small things + 2008-12-26 3.1.2 Changed the way the stylesheet is saved (default / custom stylesheet) + Sitemap is now build when page is published + Removed support for static robots.txt files, this is now handled via WordPress + Added compat. exceptions for WP 2.0 and WP 2.1 + 2009-06-07 3.1.3 Changed MSN Live Search to Bing + Exclude categories also now exludes the category itself and not only the posts + Pings now use the new WordPress HTTP API instead of Snoopy + Fixed bug that in localized WP installations priorities could not be saved. + The sitemap cron job is now cleared after a manual rebuild or after changing the config + Adjusted style of admin area for WP 2.8 and refreshed icons + Disabled the "Exclude categories" feature for WP 2.5.1, since it doesn't have the required functions yet + 2009-06-22 3.1.4 Fixed bug which broke all pings in WP < 2.7 + Added more output in debug mode if pings fail + Moved global post definitions for other plugins + Added small icon for ozh admin menu + Added more help links in UI + 2009-08-24 3.1.5 Added option to completely disable the last modification time + Fixed bug regarding the use of the HTTPS url for the XSL stylesheet if the sitemap was build via the admin panel + Improved handling of homepage if a single page was set for it + Fixed mktime warning which appeared sometimes + Fixed bug which caused inf. reloads after rebuilding the sitemap via the admin panel + Improved handling of missing sitemaps files if WP was moved to another location + 2009-08-31 3.1.6 Fixed PHP error "Only variables can be passed by reference" + Fixed wrong URLS of multi-page posts (Thanks artstorm!) + 2009-10-21 3.1.7 Added support for custom taxonomies (Thanks to Lee!) + 2009-11-07 3.1.8 Improved custom taxonomy handling and fixed wrong last modification date + Changed readme and backlinks + Fixed fatal error in WP < 2.3 + Fixed Update Notice in WP 2.8+ + Added warning if blog privacy is activated + Fixed custom URLs priorities were shown as 0 instead of 1 + 2009-11-13 3.1.9 Fixed MySQL Error if author pages were included + 2009-11-23 3.2 Added function to show the actual results of a ping instead of only linking to the url + Added new hook (sm_rebuild) for third party plugins to start building the sitemap + Fixed bug which showed the wrong URL for the latest Google ping result + Added some missing phpdoc documentation + Removed hardcoded php name for sitemap file for admin urls + Uses KSES for showing ping test results + Ping test fixed for WP < 2.3 + + Maybe Todo: + ============================================================================== + - Your wishes :) + + + License: + ============================================================================== + Copyright 2005 - 2009 ARNE BRACHHOLD (email : himself - arnebrachhold - de) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + + Developer Documentation + ============================================================================== + + Adding other pages to the sitemap via other plugins + + This plugin uses the action system of WordPress to allow other plugins + to add urls to the sitemap. Simply add your function with add_action to + the list and the plugin will execute yours every time the sitemap is build. + Use the static method "GetInstance" to get the generator and AddUrl method + to add your content. + + Sample: + + function your_pages() { + $generatorObject = &GoogleSitemapGenerator::GetInstance(); //Please note the "&" sign for PHP4! + if($generatorObject!=null) $generatorObject->AddUrl("http://blog.uri/tags/hello/",time(),"daily",0.5); + } + add_action("sm_buildmap","your_pages"); + + Parameters: + - The URL to the page + - The last modified data, as a UNIX timestamp (optional) + - The Change Frequency (daily, hourly, weekly and so on) (optional) + - The priority 0.0 to 1.0 (optional) + + + Rebuilding the sitemap on request + + If you want to rebuild the sitemap because dynamic content from your plugin has changed, + please use the "sm_rebuild" hook which is available since 3.1.9. + All other methods, like calling the Build method directly are highly unrecommended and might + not work anymore with the next version of the plugin. Using this hook, the sitemap plugin will + take care of everything like loading the required classes and so on. + + Sample: + + do_action("sm_rebuild"); + + The sitemap might not be rebuild immediately, since newer versions use a background WP-Cron + job by default to prevent that the user has to wait and avoid multiple rebuilds within a very short time. + In case the sitemap plugin is not installed, nothing will happen and no errors will be thrown. + + =============================================== + + Adding additional PriorityProviders + + This plugin uses several classes to calculate the post priority. + You can register your own provider and choose it at the options screen. + + Your class has to extend the GoogleSitemapGeneratorPrioProviderBase class + which has a default constructor and a method called GetPostPriority + which you can override. + + Look at the GoogleSitemapGeneratorPrioByPopularityContestProvider class + for an example. + + To register your provider to the sitemap generator, use the following filter: + + add_filter("sm_add_prio_provider","AddMyProvider"); + + Your function could look like this: + + function AddMyProvider($providers) { + array_push($providers,"MyProviderClass"); + return $providers; + } + + Note that you have to return the modified list! \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/img/icon-amazon.gif Binary file web/wp-content/plugins/google-sitemap-generator/img/icon-amazon.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/img/icon-arne.gif Binary file web/wp-content/plugins/google-sitemap-generator/img/icon-arne.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/img/icon-bing.gif Binary file web/wp-content/plugins/google-sitemap-generator/img/icon-bing.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/img/icon-donate.gif Binary file web/wp-content/plugins/google-sitemap-generator/img/icon-donate.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/img/icon-email.gif Binary file web/wp-content/plugins/google-sitemap-generator/img/icon-email.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/img/icon-google.gif Binary file web/wp-content/plugins/google-sitemap-generator/img/icon-google.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/img/icon-paypal.gif Binary file web/wp-content/plugins/google-sitemap-generator/img/icon-paypal.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/img/icon-trac.gif Binary file web/wp-content/plugins/google-sitemap-generator/img/icon-trac.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/img/icon-wordpress.gif Binary file web/wp-content/plugins/google-sitemap-generator/img/icon-wordpress.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/img/icon-yahoo.gif Binary file web/wp-content/plugins/google-sitemap-generator/img/icon-yahoo.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/img/sitemap.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/google-sitemap-generator/img/sitemap.js Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,109 @@ +/* + + $Id: sitemap.js 48032 2008-05-27 14:32:06Z arnee $ + +*/ + +function sm_addPage(url,priority,changeFreq,lastChanged) { + + var table = document.getElementById('sm_pageTable').getElementsByTagName('TBODY')[0]; + var ce = function(ele) { return document.createElement(ele) }; + var tr = ce('TR'); + + var td = ce('TD'); + var iUrl = ce('INPUT'); + iUrl.type="text"; + iUrl.style.width='95%'; + iUrl.name="sm_pages_ur[]"; + if(url) iUrl.value=url; + td.appendChild(iUrl); + tr.appendChild(td); + + td = ce('TD'); + td.style.width='150px'; + var iPrio = ce('SELECT'); + iPrio.style.width='95%'; + iPrio.name="sm_pages_pr[]"; + for(var i=0; i 1) { + firstRow.parentNode.removeChild(firstRow); + } + } + var cnt = table.getElementsByTagName('TR').length; + if(cnt%2) tr.className="alternate"; + + table.appendChild(tr); +} + +function sm_loadPages() { + for(var i=0; i, 2005. +# $Id: sitemap.pot 2327 2005-06-19 03:09:59 RedAltExport $ +msgid "" +msgstr "" +"Project-Id-Version: Sitemap v2.7.1 for WP\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-06-07 01:15+0100\n" +"PO-Revision-Date: 2009-07-15 03:12+0200\n" +"Last-Translator: Hazem Khaled \n" +"Language-Team: Sewar \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Arabic\n" +"X-Poedit-Country: ARABIAN WORLD\n" +"X-Poedit-SourceCharset: utf-8\n" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:846 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:642 +msgid "Comment Count" +msgstr "عدد التعليقات" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:858 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:654 +msgid "Uses the number of comments of the post to calculate the priority" +msgstr "أستخدم عدد التعليقات لحساب الأولوية" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:918 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:714 +msgid "Comment Average" +msgstr "متوسط التعليقات" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:930 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:726 +msgid "Uses the average comment count to calculate the priority" +msgstr "أستخدم متوسط التعليقات لحساب الأولوية" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:993 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:789 +msgid "Popularity Contest" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:1005 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:801 +msgid "Uses the activated Popularity Contest Plugin from Alex King. See Settings and Most Popular Posts" +msgstr "" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:1187 +msgid "Always" +msgstr "دائماً" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:1188 +msgid "Hourly" +msgstr "كل ساعة" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:1189 +msgid "Daily" +msgstr "يومياً" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:1190 +msgid "Weekly" +msgstr "اسبوعياً" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:1191 +msgid "Monthly" +msgstr "شهرياً" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:1192 +msgid "Yearly" +msgstr "سنوياً" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:1193 +msgid "Never" +msgstr "أبداً" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2600 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:102 +msgid "Thank you very much for your donation. You help me to continue support and development of this plugin and other free software!" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2600 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:102 +msgid "Hide this notice" +msgstr "أخفاء هذا التبليغ" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2657 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:108 +#, php-format +msgid "Thanks for using this plugin! You've installed this plugin over a month ago. If it works and your are satisfied with the results, isn't it worth at least one dollar? Donations help me to continue support and development of this free software! Sure, no problem!" +msgstr "شكراً ﻷستخدامك هذه الأضافة! لقد قمت بتركيب الإضافة من اكثر من شهر. إذا كنت راضي عن النتائج, يمكنك التبرع بدولار واحد على الأقل؟ المتبرعين ساعدوني بدعم وتطوير هذه الأضافة المجانية! أكيد, لا يوجد مشكلة!" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2657 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:108 +msgid "No thanks, please don't bug me anymore!" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:67 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:119 +msgid "Your sitemap is being refreshed at the moment. Depending on your blog size this might take some time!" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:69 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:121 +#, php-format +msgid "Your sitemap will be refreshed in %s seconds. Depending on your blog size this might take some time!" +msgstr "" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:146 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:453 +msgid "XML Sitemap Generator for WordPress" +msgstr "صانع خريطة الموقع" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:298 +msgid "Configuration updated" +msgstr "تم تحديث الإعدادات" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:299 +msgid "Error while saving options" +msgstr "حدث خطأ عند حفظ إعدادات الصفحات" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:301 +msgid "Pages saved" +msgstr "تم حفظ إعدادات الصفحات" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:302 +msgid "Error while saving pages" +msgstr "حدث خطأ عند حفظ إعدادات الصفحات" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2758 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:309 +msgid "The default configuration was restored." +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:374 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:466 +#, php-format +msgid "There is a new version of %1$s available. Download version %3$s here." +msgstr "هناك إصدارة جديدة %1$s متاحة. تحميل الأصدارة %3$s من هنا." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:376 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:468 +#, php-format +msgid "There is a new version of %1$s available. Download version %3$s here automatic upgrade unavailable for this plugin." +msgstr "هناك إصدارة جديدة %1$s متاحة. تحميل الأصدارة %3$s من هنا. التحديث التلقائي غير متاح في هذه المدونة." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:378 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:470 +#, php-format +msgid "There is a new version of %1$s available. Download version %3$s here or upgrade automatically." +msgstr "هناك إصدارة جديدة %1$s متاحة. تحميل الأصدارة %3$s من هنا او حدث تلقائياً." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2851 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2868 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:493 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:510 +msgid "open" +msgstr "فتح" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2852 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2869 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:494 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:511 +msgid "close" +msgstr "أغلاق" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2853 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2870 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:495 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:512 +msgid "click-down and drag to move this box" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2854 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2871 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:496 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:513 +msgid "click to %toggle% this box" +msgstr "أضغط لكي %toggle% هذا المربع" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2855 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2872 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:497 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:514 +msgid "use the arrow keys to move this box" +msgstr "أستخدم السهم لتحريك المربعات" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2856 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2873 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:498 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:515 +msgid ", or press the enter key to %toggle% it" +msgstr ", او أضغط على الزر لـ%toggle%" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2884 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:533 +msgid "About this Plugin:" +msgstr "عن هذه الأضافة" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:534 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap.php:141 +msgid "Plugin Homepage" +msgstr "الصفحة الرئيسية" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:421 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:535 +msgid "Suggest a Feature" +msgstr "رشح خاصية جديدة" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2887 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:536 +msgid "Notify List" +msgstr "قائمة التبليغ" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2888 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:537 +msgid "Support Forum" +msgstr "منتدى الدعم" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:424 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:538 +msgid "Report a Bug" +msgstr "أبلغ عن خطأ" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2889 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:540 +msgid "Donate with PayPal" +msgstr "تبرع بالباي بال" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2890 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:541 +msgid "My Amazon Wish List" +msgstr "قائمة رغباتي بأمازون" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2891 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:542 +msgid "translator_name" +msgstr "إعادة الترجمة : حازم خالد" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2891 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:542 +msgid "translator_url" +msgstr "http://HazemKhaled.com" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:545 +msgid "Sitemap Resources:" +msgstr "موارد خريطة الموقع:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2897 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:546 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:552 +msgid "Webmaster Tools" +msgstr "ادوات مدير الموقع" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2898 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:547 +msgid "Webmaster Blog" +msgstr "مدونة مدير الموقع" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2900 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:549 +msgid "Site Explorer" +msgstr "متصفح الموقع" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2901 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:550 +msgid "Search Blog" +msgstr "بحث المدونة" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3010 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:553 +msgid "Webmaster Center Blog" +msgstr "مدونة مركز مدير الموقع" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:555 +msgid "Sitemaps Protocol" +msgstr "بروتوكول خريطة الموقع" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2904 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:556 +msgid "Official Sitemaps FAQ" +msgstr "الأسئلة الشائعة الرسمية عن خريطة المواقع" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:557 +msgid "My Sitemaps FAQ" +msgstr "الأسئلة الشائعة عن خريطة الموقع" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2910 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:560 +msgid "Recent Donations:" +msgstr "أخر تبرع" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2914 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:564 +msgid "List of the donors" +msgstr "قائمة المتبرعين" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2916 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:566 +msgid "Hide this list" +msgstr "اخفاء هذه القائمة" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2919 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:569 +msgid "Thanks for your support!" +msgstr "شكراً لدعمك" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2931 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:587 +msgid "Status" +msgstr "الحالة" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2941 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:595 +#, php-format +msgid "The sitemap wasn't built yet. Click here to build it the first time." +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2947 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:601 +msgid "Your sitemap was last built on %date%." +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2949 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:603 +msgid "There was a problem writing your sitemap file. Make sure the file exists and is writable. Learn moreأعرف المزيد" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2956 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:610 +msgid "Your sitemap (zipped) was last built on %date%." +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2958 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:612 +msgid "There was a problem writing your zipped sitemap file. Make sure the file exists and is writable. Learn moreأعرف المزيد" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2964 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:618 +msgid "Google was successfully notified about changes." +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2967 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:621 +msgid "It took %time% seconds to notify Google, maybe you want to disable this feature to reduce the building time." +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3011 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:624 +#, php-format +msgid "There was a problem while notifying Google. View result" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2976 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:630 +msgid "YAHOO was successfully notified about changes." +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2979 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:633 +msgid "It took %time% seconds to notify YAHOO, maybe you want to disable this feature to reduce the building time." +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3023 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:636 +#, php-format +msgid "There was a problem while notifying YAHOO. View result" +msgstr "" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:642 +msgid "Bing was successfully notified about changes." +msgstr "" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:645 +msgid "It took %time% seconds to notify Bing, maybe you want to disable this feature to reduce the building time." +msgstr "" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:648 +#, php-format +msgid "There was a problem while notifying Bing. View result" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2988 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:654 +msgid "Ask.com was successfully notified about changes." +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2991 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:657 +msgid "It took %time% seconds to notify Ask.com, maybe you want to disable this feature to reduce the building time." +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3035 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:660 +#, php-format +msgid "There was a problem while notifying Ask.com. View result" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3002 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:668 +msgid "The building process took about %time% seconds to complete and used %memory% MB of memory." +msgstr "تم الأنشاء في حوالي %time% ثانية وأستخدام %memory% MB من الذاكرة." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3004 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:670 +msgid "The building process took about %time% seconds to complete." +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3008 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:674 +msgid "The content of your sitemap didn't change since the last time so the files were not written and no search engine was pinged." +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:586 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:682 +msgid "The building process might still be active! Reload the page in a few seconds and check if something has changed." +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3012 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:685 +msgid "The last run didn't finish! Maybe you can raise the memory or time limit for PHP scripts. Learn more" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3014 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:687 +msgid "The last known memory usage of the script was %memused%MB, the limit of your server is %memlimit%." +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3018 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:691 +msgid "The last known execution time of the script was %timeused% seconds, the limit of your server is %timelimit% seconds." +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3022 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:695 +msgid "The script stopped around post number %lastpost% (+/- 100)" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3025 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:698 +#, php-format +msgid "If you changed something on your server or blog, you should rebuild the sitemap manually." +msgstr "إذا تغير شيء على الخادم الخاص بك أو مدونتك, فيجب عليك إعادة غنشاء الخريطة يدوياً" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3027 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:700 +#, php-format +msgid "If you encounter any problems with the build process you can use the debug function to get more information." +msgstr "إذا واجهتك أي مشاكل في عملية انشاء الخريطة فيمكنك أستخدام debug function للحصول على المزيد من المعلومات" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:707 +msgid "Basic Options" +msgstr "إعدادات أساسية" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:709 +msgid "Sitemap files:" +msgstr "ملفات الخريطة" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3044 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3059 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3079 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3104 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3121 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:709 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:724 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:744 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:777 +msgid "Learn more" +msgstr "أعرف المزيد" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:714 +msgid "Write a normal XML file (your filename)" +msgstr "كتابة ملف XML عادي (ملف خريطة الموقع)" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:720 +msgid "Write a gzipped file (your filename + .gz)" +msgstr "كتابة ملف XML مضغوط (ملف خريطة الموقع + .gz)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3059 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:724 +msgid "Building mode:" +msgstr "نظام البناء:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3064 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:729 +msgid "Rebuild sitemap if you change the content of your blog" +msgstr "اعادة إنشاء الخريطة إذا قمت بتغيير محتوى المدونة" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3071 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:736 +msgid "Enable manual sitemap building via GET Request" +msgstr "إتاحة أنشاء الخريطة يدوياً عن طريق طلب GET" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3075 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:740 +msgid "This will allow you to refresh your sitemap if an external tool wrote into the WordPress database without using the WordPress API. Use the following URL to start the process: %1 Please check the logfile above to see if sitemap was successfully built." +msgstr "" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:744 +msgid "Update notification:" +msgstr "تحديث التبليغات:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3083 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:748 +msgid "Notify Google about updates of your Blog" +msgstr "تبليغ جوجل عن تحديثات موقعك" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3084 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:749 +#, php-format +msgid "No registration required, but you can join the Google Webmaster Tools to check crawling statistics." +msgstr "لا يحتاج للتسجيل, ولكن يمكنك التسجيل في Google Webmaster Tools لمتابعة أحصائيات أرشفة موقعك." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:753 +msgid "Notify Bing (formerly MSN Live Search) about updates of your Blog" +msgstr "أبلاغ BING (رسمياً MSN Live Search) عن التحديثات بمدونتك" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:754 +#, php-format +msgid "No registration required, but you can join the Bing Webmaster Tools to check crawling statistics." +msgstr "لا يحتاج للتسجيل, ولكن يمكنك التسجيل في Bing Webmaster Tools لمتابعة أحصائيات أرشفة موقعك." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3088 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:758 +msgid "Notify Ask.com about updates of your Blog" +msgstr "أبلاغ Ask.com عن تحديثات مدونتك" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3089 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:759 +msgid "No registration required." +msgstr "لا يحتاج للتسجيل" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3093 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:763 +msgid "Notify YAHOO about updates of your Blog" +msgstr "تبليغ YAHOO بتحديثات مدونتك" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3154 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:764 +msgid "Your Application ID:" +msgstr "رقم الطلب الخاص بك :" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:765 +#, php-format +msgid "Don't you have such a key? Request one here! %s2" +msgstr "" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:770 +msgid "Add sitemap URL to the virtual robots.txt file." +msgstr "إضافة خريطة الموقع لملف robots.txt" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:774 +msgid "The virtual robots.txt generated by WordPress is used. A real robots.txt file must NOT exist in the blog directory!" +msgstr "ملف robots.txt الأفتراضي الذي تم إنشائه بواسطة WordPress قيد الأستخدام. ملف robots.txt الفعلي يجب أن لا يكون موجود بمجلد المدونة!" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:777 +msgid "Advanced options:" +msgstr "خيارات متقدمة" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3124 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:780 +msgid "Limit the number of posts in the sitemap:" +msgstr "تحديد عدد التدوينات في الخريطة :" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3124 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:780 +msgid "Newer posts will be included first" +msgstr "التدوينة الجديدة ستدرج الأولى" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3127 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:783 +msgid "Try to increase the memory limit to:" +msgstr "حاول تزيد حد الذاكرة إلى:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3127 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:783 +msgid "e.g. \"4M\", \"16M\"" +msgstr "مثال : \"4M\", \"16M\"" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3130 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:786 +msgid "Try to increase the execution time limit to:" +msgstr "حاول زيادة مدة التنفيذ :" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3130 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:786 +msgid "in seconds, e.g. \"60\" or \"0\" for unlimited" +msgstr "بالثواني, مثال: \"60\" أو \"0\" للغير نهائي" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3133 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:790 +msgid "Include a XSLT stylesheet:" +msgstr "أستخدام ملف تنسيقي XSLT:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3133 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:791 +msgid "Full or relative URL to your .xsl file" +msgstr "الرابط كاملاً ملفم ال .xsl" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:791 +msgid "Use default" +msgstr "أستخدام الأفتراضي" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3152 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:797 +msgid "Enable MySQL standard mode. Use this only if you're getting MySQL errors. (Needs much more memory!)" +msgstr "تفعيل وضع MySQL القياسي. أستخدها فقط في حالة حدوث اخطاء MySQL. (يحتاج إلى المزيد من الذاكرة!)" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:798 +msgid "Upgrade WordPress at least to 2.2 to enable the faster MySQL access" +msgstr "يجب تحديث وردبريس للأصدارة 2.2 لتفعيل وصل أسرع لل MySQL" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3166 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:805 +msgid "Build the sitemap in a background process (You don't have to wait when you save a post)" +msgstr "بناء خريطة الموقع في كل مرة في الخلفية (لكل لا يأخر عملية حفظ التدوينات)" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:806 +msgid "Upgrade WordPress at least to 2.1 to enable background building" +msgstr "يجب تحديث المدونة لإصدارة 2.1 على الأقل لتفعيل العمل في الخلفية" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:813 +msgid "Additional pages" +msgstr "صفحات إضافية" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:816 +msgid "Here you can specify files or URLs which should be included in the sitemap, but do not belong to your Blog/WordPress.
    For example, if your domain is www.foo.com and your blog is located on www.foo.com/blog you might want to include your homepage at www.foo.com" +msgstr "هنا يمكنك تضمين الملفات و الروابط التي يجب أن يتم تضمينها في خريطة الموقع، لكنها لا تتبع ووردبريس .
    على سبيل المثال، إذا كان نطاق موقعك www.foo.com و مدونتك موجودة في www.foo.com/blog أنت قد تريد تضمين الصفحة الرئيسية لموقعك في www.foo.com." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:818 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:997 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1011 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1020 +msgid "Note" +msgstr "تنبيه" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:819 +msgid "If your blog is in a subdirectory and you want to add pages which are NOT in the blog directory or beneath, you MUST place your sitemap file in the root directory (Look at the "Location of your sitemap file" section on this page)!" +msgstr "إذا كانت مدونتك في مجلد فرعي و أردت إضافة صفحات خارج مجلد مدونتك، يجب عليك وضع ملف خريطة موقعك في المجلد الرئيسي لموقعك (انظر فسم "مكان ملف خريطة موقعك" في هذه الصفحة)" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:821 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:860 +msgid "URL to the page" +msgstr "رابط الصفحة" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:822 +msgid "Enter the URL to the page. Examples: http://www.foo.com/index.html or www.foo.com/home " +msgstr "ضع رابط الصفحة ، مثلاً : http://www.foo.com/index.html أو www.foo.com/home ." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:824 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:861 +msgid "Priority" +msgstr "الأفضلية" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:825 +msgid "Choose the priority of the page relative to the other pages. For example, your homepage might have a higher priority than your imprint." +msgstr "إختر أفضلية الصفحة نسبة إلى الصفحات الأخرى ، على سبيل المثال ، صفحتك الرئيسية لربّما يكون لها أفضلية أعلى من سيرتك الذاتية ." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:827 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:863 +msgid "Last Changed" +msgstr "آخر تعديل" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:828 +msgid "Enter the date of the last change as YYYY-MM-DD (2005-12-31 for example) (optional)." +msgstr "ضع تاريخ آخر تعديل كـ YYYY-MM-DD (مثلاً : 2005-12-31) (اختياري) ." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:862 +msgid "Change Frequency" +msgstr "فترة التحديث" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:864 +msgid "#" +msgstr "#" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:869 +msgid "No pages defined." +msgstr "لا يوجد صفحات مضافة ." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:874 +msgid "Add new page" +msgstr "أضف صفحة جديدة" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:879 +msgid "Post Priority" +msgstr "الأفضلية" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3329 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:881 +msgid "Please select how the priority of each post should be calculated:" +msgstr "الرجاء اختيار مدى أولوية كل تدوينة :" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3331 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:883 +msgid "Do not use automatic priority calculation" +msgstr "لا تستخدم حساب الأولوية تلقائيا" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3331 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:883 +msgid "All posts will have the same priority which is defined in "Priorities"" +msgstr "كل المواضيع تحمل نفس الأولوية التي تم تحديدها في "الأولويات"" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:894 +msgid "Location of your sitemap file" +msgstr "مكان ملف خريطة موقعك" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:897 +msgid "Automatic detection" +msgstr "الكشف الآلي" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:901 +msgid "Filename of the sitemap file" +msgstr "اسم ملف خريطة الموقع:" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:904 +msgid "Detected Path" +msgstr "مسار الملف" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:904 +msgid "Detected URL" +msgstr "رابط الملف" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:909 +msgid "Custom location" +msgstr "مسار مخصص" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:913 +msgid "Absolute or relative path to the sitemap file, including name." +msgstr "المسار الكامل لملف خريطة الموقع." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:915 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:924 +msgid "Example" +msgstr "مثال" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:922 +msgid "Complete URL to the sitemap file, including name." +msgstr "الرابط الكامل لملف خريطة الموقع." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:935 +msgid "Sitemap Content" +msgstr "محتوى خريطة الموقع" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:941 +msgid "Include homepage" +msgstr "تضمين الصفحة الرئيسية" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:947 +msgid "Include posts" +msgstr "تضمين التدوينات" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:953 +msgid "Include following pages of multi-page posts (Increases build time and memory usage!)" +msgstr "إدراج الصفحات التابعة للمواضيع متعددة الصفحات (يزيد في مدة إنشاء الخيرطة وكمية الذاكرة المستخدمة)" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:959 +msgid "Include static pages" +msgstr "تضمين الصفحات" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:965 +msgid "Include categories" +msgstr "تضمين التصنيفات" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:971 +msgid "Include archives" +msgstr "تضمين الأرشيف" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:978 +msgid "Include tag pages" +msgstr "تضمين صفحات التاجات" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:985 +msgid "Include author pages" +msgstr "تضمين صفحات الكتاب" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:993 +msgid "Excluded items" +msgstr "استبعاد عناصر" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:995 +msgid "Excluded categories" +msgstr "استبعاد التصنيفات" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:997 +msgid "Using this feature will increase build time and memory usage!" +msgstr "باستخدام هذه الميزة سوف تزيد من وقت الأنشاء واستخدام ذاكرة اكبر!" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1004 +#, php-format +msgid "This feature requires at least WordPress 2.5.1, you are using %s" +msgstr "هذه الخاصية تحتاج لنسخة وردبريس 2.5.1, أنت تستخدم %s" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1007 +msgid "Exclude posts" +msgstr "استبعاد التدوينات" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3206 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1009 +msgid "Exclude the following posts or pages:" +msgstr "أستبعاد التدوينات او المواضيع الأتية:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3206 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1009 +msgid "List of IDs, separated by comma" +msgstr "ضع الأرقام IDs, وأفصل بينهم بكومة انجليزية" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1011 +msgid "Child posts won't be excluded automatically!" +msgstr "المواضيع التابعة لن تستبعد تلقائيا!" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1017 +msgid "Change frequencies" +msgstr "فترة التحديث" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1021 +msgid "Please note that the value of this tag is considered a hint and not a command. Even though search engine crawlers consider this information when making decisions, they may crawl pages marked \"hourly\" less frequently than that, and they may crawl pages marked \"yearly\" more frequently than that. It is also likely that crawlers will periodically crawl pages marked \"never\" so that they can handle unexpected changes to those pages." +msgstr "رجاء لاحظ بأنّ قيمة هذه الخاصية هي تلميح معتبر و ليس إجبارياً . بالرغم من أنّ محركات البحث تقرأ هذه الخاصية عندما تبحث ، هي قد تفحص الصفحات التي أشّرت \"كل ساعة\" أقل كثيرا من ذلك ، وهي قد تفحص الصفحات التي أشّرت \"سنوياً\" أكثر من ذلك . هي أيضا من المحتمل تفحص الصفحات التي أشّرت \"أبداً\" بشكل دوري لكي هم يمكن أن يعالجوا التغييرات الغير المتوقّعة في تلك الصفحات ." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1027 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1084 +msgid "Homepage" +msgstr "الصفحة الرئيسية" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1033 +msgid "Posts" +msgstr "التدوينات" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1039 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1102 +msgid "Static pages" +msgstr "الصفحات" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1045 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1108 +msgid "Categories" +msgstr "التصنيفات" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1051 +msgid "The current archive of this month (Should be the same like your homepage)" +msgstr "أرشيف الشهر الحالي (يفضل أن يكون مثل الصفحة الرئيسية)" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1057 +msgid "Older archives (Changes only if you edit an old post)" +msgstr "الأرشيف السابق (يتغير عندما تحرر تدوينة قديمة فقط)" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1064 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1121 +msgid "Tag pages" +msgstr "صفحات التاجات" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1071 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1128 +msgid "Author pages" +msgstr "صفحات المؤلفين" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1079 +msgid "Priorities" +msgstr "الأفضليات" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1090 +msgid "Posts (If auto calculation is disabled)" +msgstr "التدوينات (إذا كان الحساب الآلي غير مفعل)" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1096 +msgid "Minimum post priority (Even if auto calculation is enabled)" +msgstr "أفضلية التدوينة الدنيا (حتى إذا كان الحساب الآلي مفعل)" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1114 +msgid "Archives" +msgstr "الأرشيف" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1139 +msgid "Update options" +msgstr "تحديث الإعدادات" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1140 +msgid "Reset options" +msgstr "تصفير الإعدادات" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap.php:84 +msgid "XML-Sitemap Generator" +msgstr "صانع خريطة الموقع" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap.php:84 +msgid "XML-Sitemap" +msgstr "خريطة الموقع" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap.php:142 +msgid "Sitemap FAQ" +msgstr "الأسئلة الشائعة عن خريطة الموقع" + +#~ msgid "Manual location" +#~ msgstr "تحديد الرابط يدوياً" +#~ msgid "OR" +#~ msgstr "أو" +#~ msgid "Error" +#~ msgstr "حصل خطأ" +#~ msgid "" +#~ "A new page was added. Click on "Save page changes" to save your " +#~ "changes." +#~ msgstr "" +#~ "تم إضافة صفحة جديدة ، إضغط على زر "حفظ تغييرات الصفحات" لحفظ " +#~ "تغييراتك ." +#~ msgid "" +#~ "The page was deleted. Click on "Save page changes" to save your " +#~ "changes." +#~ msgstr "تم حذف الصفحة ." +#~ msgid "You changes have been cleared." +#~ msgstr "تم إلغاء تغييراتك ." +#~ msgid "Manual rebuild" +#~ msgstr "إنشاء خريطة الموقع يدوياً" +#~ msgid "" +#~ "If you want to build the sitemap without editing a post, click on here!" +#~ msgstr "" +#~ "إذا كنت تريد إنشاء خريطة الموقع بدون تعديل تدوينة ، إضغط على الزر التالي :" +#~ msgid "Rebuild Sitemap" +#~ msgstr "إعادة إنشاء خريطة الموقع" + diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/lang/sitemap-bg_BG.mo Binary file web/wp-content/plugins/google-sitemap-generator/lang/sitemap-bg_BG.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/lang/sitemap-bg_BG.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/google-sitemap-generator/lang/sitemap-bg_BG.po Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,827 @@ +msgid "" +msgstr "" +"Project-Id-Version: sitemap 3.1.1\n" +"POT-Creation-Date: \n" +"PO-Revision-Date: 2009-03-02 13:53+0200\n" +"Last-Translator: Alexander Dichev \n" +"Language-Team: Alexander Dichev \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" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:642 +msgid "Comment Count" +msgstr "Брой Коментари" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:654 +msgid "Uses the number of comments of the post to calculate the priority" +msgstr "Използва броя на коментарите при калкулиране на приоритета на поста" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:714 +msgid "Comment Average" +msgstr "Коментари Средно" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:726 +msgid "Uses the average comment count to calculate the priority" +msgstr "Използва средния брой на коментарите при калкулиране на приоритета" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:789 +msgid "Popularity Contest" +msgstr "Popularity Contest" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:801 +msgid "Uses the activated Popularity Contest Plugin from Alex King. See Settings and Most Popular Posts" +msgstr "Използва активиран Popularity Contest Plugin от Alex King. Виж Настройки и Най-популярните постове." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-core.php:1118 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:1209 +msgid "Always" +msgstr "Винаги" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-core.php:1119 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:1210 +msgid "Hourly" +msgstr "Ежечасно" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-core.php:1120 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:1211 +msgid "Daily" +msgstr "Ежедневно" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-core.php:1121 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:1212 +msgid "Weekly" +msgstr "Ежеседмично" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-core.php:1122 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:1213 +msgid "Monthly" +msgstr "Ежемесечно" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-core.php:1123 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:1214 +msgid "Yearly" +msgstr "Ежегодно" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-core.php:1124 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:1215 +msgid "Never" +msgstr "Никога" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:102 +msgid "Thank you very much for your donation. You help me to continue support and development of this plugin and other free software!" +msgstr "Благодаря Ви много за дарението. Вие ми помагате да продължа развитието и поддръжката на този плъгин и на други безплатни приложения и софтуер." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:102 +msgid "Hide this notice" +msgstr "Скриване на съобщението" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:108 +#, php-format +msgid "Thanks for using this plugin! You've installed this plugin over a month ago. If it works and your are satisfied with the results, isn't it worth at least one dollar? Donations help me to continue support and development of this free software! Sure, no problem!" +msgstr "Благодаря Ви, че използвате този плъгин! Вие сте инсталирали и използвате този плъгин повече от месец. Ако работи добре и сте доволни от резултата, не си ли заслужава поне един долар? Даренията ми помагат да продължа развитието и поддръжката на този безплатен софтуер! Разбира се, няма проблеми! " + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:108 +msgid "No thanks, please don't bug me anymore!" +msgstr "Не благодаря, моля, не ме безпокойте повече!" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:67 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:119 +msgid "Your sitemap is being refreshed at the moment. Depending on your blog size this might take some time!" +msgstr "Вашата карта на сайта се обновява в момента. В зависимост от големината на блога, това би коствало известно време." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:69 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:121 +#, php-format +msgid "Your sitemap will be refreshed in %s seconds. Depending on your blog size this might take some time!" +msgstr "Вашата карта на сайта ще бъде обновена след %s секунди. В зависимост от големината на блога, това би коствало известно време." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:146 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:441 +msgid "XML Sitemap Generator for WordPress" +msgstr "XML Sitemap Генератор за WordPress" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:278 +msgid "Configuration updated" +msgstr "Конфигурацията е обновена" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:279 +msgid "Error while saving options" +msgstr "Грешка при запазване на настройките" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:281 +msgid "Pages saved" +msgstr "Страниците са запаметени" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:282 +msgid "Error while saving pages" +msgstr "Грешка при запаметяване на страниците" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:286 +#, php-format +msgid "Robots.txt file saved" +msgstr "Файла Robots.txt е запазен" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:288 +msgid "Error while saving Robots.txt file" +msgstr "Грешка при запазването на файла robots.txt" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:297 +msgid "The default configuration was restored." +msgstr "Стандартните настройки са възстановени" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:374 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:454 +#, php-format +msgid "There is a new version of %1$s available. Download version %3$s here." +msgstr "Има нова версия на %1$s. Изтеглете версия %3$s тук." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:376 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:456 +#, php-format +msgid "There is a new version of %1$s available. Download version %3$s here automatic upgrade unavailable for this plugin." +msgstr "Има нова версия на %1$s. Изтегли версия %3$s тук невъзможно е автоматично обновяване за това разширение." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:378 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:458 +#, php-format +msgid "There is a new version of %1$s available. Download version %3$s here or upgrade automatically." +msgstr "Има нова версия на %1$s. Изтегли версия %3$s тук илиr обнови автоматично." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:481 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:498 +msgid "open" +msgstr "отвори" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:482 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:499 +msgid "close" +msgstr "затвори" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:483 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:500 +msgid "click-down and drag to move this box" +msgstr "кликнете с мишката върху кутията и провлачете за да я преместите" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:484 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:501 +msgid "click to %toggle% this box" +msgstr "кликнете за да %toggle% кутията" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:485 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:502 +msgid "use the arrow keys to move this box" +msgstr "използвайте бутоните със стрелките за преместване на кутията" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:486 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:503 +msgid ", or press the enter key to %toggle% it" +msgstr ", или натиснете бутона Enter за да го %toggle%" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:521 +msgid "About this Plugin:" +msgstr "За плъгина:" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:522 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap.php:138 +msgid "Plugin Homepage" +msgstr "Страница на плъгина" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:421 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:523 +msgid "Suggest a Feature" +msgstr "Предложи Нова Възможност" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:524 +msgid "Notify List" +msgstr "E-Mail абонамент за обновяванията" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:525 +msgid "Support Forum" +msgstr "Форуми за помощ" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:424 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:526 +msgid "Report a Bug" +msgstr "Докладвай за Бъг" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:528 +msgid "Donate with PayPal" +msgstr "Дарение с PayPal" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:529 +msgid "My Amazon Wish List" +msgstr "Моят списък с желания от Amazon" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:530 +msgid "translator_name" +msgstr "Alexander Dichev" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:530 +msgid "translator_url" +msgstr "http://dichev.com/" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:533 +msgid "Sitemap Resources:" +msgstr "Sitemap Ресурси:" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:534 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:540 +msgid "Webmaster Tools" +msgstr "Webmaster Tools" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:535 +msgid "Webmaster Blog" +msgstr "Webmaster Blog" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:537 +msgid "Site Explorer" +msgstr "Site Explorer" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:538 +msgid "Search Blog" +msgstr "Search Blog" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:541 +msgid "Webmaster Center Blog" +msgstr "Webmaster Center Blog" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:543 +msgid "Sitemaps Protocol" +msgstr "Sitemaps Протокол" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:544 +msgid "Official Sitemaps FAQ" +msgstr "Официални Често Задавани Въпроси" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:545 +msgid "My Sitemaps FAQ" +msgstr "Моите Често Задавани Въпроси" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:548 +msgid "Recent Donations:" +msgstr "Последни Дарения;" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:552 +msgid "List of the donors" +msgstr "Списък на дарителите" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:554 +msgid "Hide this list" +msgstr "Скрийте този списък" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:557 +msgid "Thanks for your support!" +msgstr "Благодаря за помощта!" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:575 +msgid "Status" +msgstr "Статус" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:583 +#, php-format +msgid "The sitemap wasn't built yet. Click here to build it the first time." +msgstr "Все още не е създаден sitemap-файл. От тази връзка генерирайте карта на сайта за първи път." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:589 +msgid "Your sitemap was last built on %date%." +msgstr "Вашият sitemap-файл беше създаден успешно на %date%." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:591 +msgid "There was a problem writing your sitemap file. Make sure the file exists and is writable. Learn moreПовече информация." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:598 +msgid "Your sitemap (zipped) was last built on %date%." +msgstr "Вашият архивиран sitemap-файл беше създаден успешно на %date%." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:600 +msgid "There was a problem writing your zipped sitemap file. Make sure the file exists and is writable. Learn moreПовече информация." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:606 +msgid "Google was successfully notified about changes." +msgstr "Google беше уведомен успешно за промените в блога." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:609 +msgid "It took %time% seconds to notify Google, maybe you want to disable this feature to reduce the building time." +msgstr "Отне %time% секунди за уведомяването на Google ако желаете да намалите времето за генериране можете да деактивирате тази функция." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:612 +#, php-format +msgid "There was a problem while notifying Google. View result" +msgstr "Имаше проблем с уведомяването на Google. Виж резултата" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:618 +msgid "YAHOO was successfully notified about changes." +msgstr "YAHOO беше уведомен успешно за промените в блога." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:621 +msgid "It took %time% seconds to notify YAHOO, maybe you want to disable this feature to reduce the building time." +msgstr "Отне %time% секунди за уведомяването на YAHOO ако желаете да намалите времето за генериране можете да деактивирате тази функция." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:624 +#, php-format +msgid "There was a problem while notifying YAHOO. View result" +msgstr "Имаше проблем с уведомяването на YAHOO. Виж резултата" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:630 +msgid "MSN was successfully notified about changes." +msgstr "MSN беше уведомен успешно за промените в блога." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:633 +msgid "It took %time% seconds to notify MSN.com, maybe you want to disable this feature to reduce the building time." +msgstr "Отне %time% секунди за уведомяването на MSN.com, ако желаете да намалите времето за генериране можете да деактивирате тази функция." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:636 +#, php-format +msgid "There was a problem while notifying MSN.com. View result" +msgstr "Имаше проблем с уведомяването на MSN.com. Виж резултата" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:642 +msgid "Ask.com was successfully notified about changes." +msgstr "Ask.com беше уведомен успешно за промените в блога." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:645 +msgid "It took %time% seconds to notify Ask.com, maybe you want to disable this feature to reduce the building time." +msgstr "Отне %time% секунди за уведомяването на Ask.com ако желаете да намалите времето за генериране можете да деактивирате тази функция." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:648 +#, php-format +msgid "There was a problem while notifying Ask.com. View result" +msgstr "Имаше проблем с уведомяването на Ask.com. Виж резултата" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:656 +msgid "The building process took about %time% seconds to complete and used %memory% MB of memory." +msgstr "Генерирането на sitemap-а отне %time% секунди и беше използвана %memory% MB памет." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:658 +msgid "The building process took about %time% seconds to complete." +msgstr "Процесът на генериране отне %time% секунди." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:662 +msgid "The content of your sitemap didn't change since the last time so the files were not written and no search engine was pinged." +msgstr "Съдържанието на картата на сайта Ви не е променено от последния път, затова файлове не бяха създадени и не бяха ping-нати търсачки." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:586 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:670 +msgid "The building process might still be active! Reload the page in a few seconds and check if something has changed." +msgstr "Възможно е процесът по изграждане все още да не е приключил. Презареди страницата след няколко секунди и провери за промяна." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:673 +msgid "The last run didn't finish! Maybe you can raise the memory or time limit for PHP scripts. Learn more" +msgstr "Последният опит на генериране на карта на сайта приключи неуспешно! Можете да опитате да увеличите максимума използвана памет и лимита за време на изпълнение на PHP-скриптове на Вашия уеб-сървър. Повече информация." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:675 +msgid "The last known memory usage of the script was %memused%MB, the limit of your server is %memlimit%." +msgstr "Последното регистрирано количество използвана от скрипта памет е %memused%MB, лимита за използвана памет от PHP-скриптове, зададен в конфигурацията на Вашия уеб-сървър е %memlimit%MB." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:679 +msgid "The last known execution time of the script was %timeused% seconds, the limit of your server is %timelimit% seconds." +msgstr "Последното регистрирано време за изпълнение на скрипта беше %timeused% секунди, лимита за продължителност на изпълнение на PHP-скриптове зададен в конфигурацията на Вашия уеб-сървър е %timelimit% секунди." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:683 +msgid "The script stopped around post number %lastpost% (+/- 100)" +msgstr "Изпълнението на този скрипт спря около пост номер %lastpost% (+/- 100)." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:686 +#, php-format +msgid "If you changed something on your server or blog, you should rebuild the sitemap manually." +msgstr "Ако сте направили някакви промени по сървъра или блога е необходимо да Регенерирате Sitemap-а ръчно." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:688 +#, php-format +msgid "If you encounter any problems with the build process you can use the debug function to get more information." +msgstr "Ако изпитвате проблеми при създаването на файла можете да активирате Дебъг Функцията за да получите повече информация за грешките." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:695 +msgid "Basic Options" +msgstr "Основни Настройки" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:697 +msgid "Sitemap files:" +msgstr "Sitemap файлове:" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:697 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:712 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:732 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:765 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:782 +msgid "Learn more" +msgstr "Повече информация" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:702 +msgid "Write a normal XML file (your filename)" +msgstr "Генерирай нормален XML файл (име на файла)" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:708 +msgid "Write a gzipped file (your filename + .gz)" +msgstr "Генерирай архивирана версия (име_на_файла + .gz)" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:712 +msgid "Building mode:" +msgstr "Метод на генериране:" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:717 +msgid "Rebuild sitemap if you change the content of your blog" +msgstr "Регенерирай sitemap-а при промяна в съдържанието на блога" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:724 +msgid "Enable manual sitemap building via GET Request" +msgstr "Активиране на ръчно генериране на sitemap-файла чрез изпращане на GET заявка" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:728 +msgid "This will allow you to refresh your sitemap if an external tool wrote into the WordPress database without using the WordPress API. Use the following URL to start the process: %1 Please check the logfile above to see if sitemap was successfully built." +msgstr "Това прави възможно регенериране на sitemap-а ако външен инструмент е внесъл промени в базата данни на WordPress без да изпозва WordPress API. Активирайте процеса от тази връзка: %1. Моля, проверете log-файла по-горе за да разжерете дали sitemap-а е генериран успешно." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:732 +msgid "Update notification:" +msgstr "Уведомяване при обновяване:" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:736 +msgid "Notify Google about updates of your Blog" +msgstr "Уведомяване на Google при обновяване на блога Ви" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:737 +#, php-format +msgid "No registration required, but you can join the Google Webmaster Tools to check crawling statistics." +msgstr "Не е необходима регистрация, но трябва да се включите в Google Webmaster Tools за да проверите статистиката от посещенията на търсачката на сайта ви." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:741 +msgid "Notify MSN Live Search about updates of your Blog" +msgstr "Уведомяване на MSN Live Search при обновяване на блога Ви" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:742 +#, php-format +msgid "No registration required, but you can join the MSN Live Webmaster Tools to check crawling statistics." +msgstr "Не е необходима регистрация, но трябва да се включите в MSN Live Webmaster Tools за да проверите статистиката от посещенията на търсачката на сайта ви." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:746 +msgid "Notify Ask.com about updates of your Blog" +msgstr "Уведомяване на Ask.com за обновявания на блога Ви" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:747 +msgid "No registration required." +msgstr "Не е необходима регистрация." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:751 +msgid "Notify YAHOO about updates of your Blog" +msgstr "Уведомяване на YAHOO за обновявания на блога Ви" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3154 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:752 +msgid "Your Application ID:" +msgstr "Вашето Application ID:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3155 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:753 +#, php-format +msgid "Don't you have such a key? Request one here! %s2" +msgstr "Нямате ли ключ? Заявете си от тук! %s2" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:760 +#, php-format +msgid "Modify or create %s file in blog root which contains the sitemap location." +msgstr "Обновяване или създаване на факл %s в главната директория на блога, която се намира местоположението на картата на сайта." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:763 +msgid "File permissions: " +msgstr "Права върху файла:" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:768 +msgid "OK, robots.txt is writable." +msgstr "OK, robots.txt е разрешен за промяна." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:770 +msgid "Error, robots.txt is not writable." +msgstr "Грешка, robots.txt е заключен за промяна." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:774 +msgid "OK, robots.txt doesn't exist but the directory is writable." +msgstr "OK, robots.txt не съществува, но директорията е разрешена за писане." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:776 +msgid "Error, robots.txt doesn't exist and the directory is not writable" +msgstr "Грешка, robots.txt не съществува и директорията не е разрешена за писане" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:782 +msgid "Advanced options:" +msgstr "Допълнителни настройки:" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:785 +msgid "Limit the number of posts in the sitemap:" +msgstr "Ограничи броя на постовете в sitemap-а:" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:785 +msgid "Newer posts will be included first" +msgstr "Новите постове ще бъдат включени първо" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:788 +msgid "Try to increase the memory limit to:" +msgstr "При възможност увеличи лимита на паметта на:" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:788 +msgid "e.g. \"4M\", \"16M\"" +msgstr "например \"4M\", \"16M\"" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:791 +msgid "Try to increase the execution time limit to:" +msgstr "При възможност увеличи времето за изпълнение на:" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:791 +msgid "in seconds, e.g. \"60\" or \"0\" for unlimited" +msgstr "секунди, например \"60\" или \"0\" без ограничение" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:795 +msgid "Include a XSLT stylesheet:" +msgstr "Добави XSLT Stylesheet:" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:796 +msgid "Full or relative URL to your .xsl file" +msgstr "Абсолютен или относителен URL до Вашия .xsl файл" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:796 +msgid "Use default" +msgstr "Използвай Стандартните" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3152 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:801 +msgid "Enable MySQL standard mode. Use this only if you're getting MySQL errors. (Needs much more memory!)" +msgstr "Активиране на MySQL Standard метод. Използва се само при получаване на MySQL грешки. (Използва доста повече памет!)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3166 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:807 +msgid "Build the sitemap in a background process (You don't have to wait when you save a post)" +msgstr "Генерирай картата на сайта на заден план (Няма да е необходимо да се чака при запазване на пост)" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:814 +msgid "Additional pages" +msgstr "Допълнителни страници" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:817 +msgid "Here you can specify files or URLs which should be included in the sitemap, but do not belong to your Blog/WordPress.
    For example, if your domain is www.foo.com and your blog is located on www.foo.com/blog you might want to include your homepage at www.foo.com" +msgstr "Тук можете да определите файлове или URL-и, които да бъдат добавени в картата на сайта, въпреки, че не са част от блога/WordPress.
    Например, ако домейнът Ви е www.foo.com и блогът Ви се намира на www.foo.com/blog, може да добавите заглавната страница на сайта си http://www.foo.com" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:819 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:998 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1012 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1021 +msgid "Note" +msgstr "Забележка" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:820 +msgid "If your blog is in a subdirectory and you want to add pages which are NOT in the blog directory or beneath, you MUST place your sitemap file in the root directory (Look at the "Location of your sitemap file" section on this page)!" +msgstr "Ако блогът Ви се намира в поддиректория и Вие желаете да включите страници, които НЕ са в директорията на блога, вие ТРЯБВА да локализирате Вашия sitemap-файл в главната директория (Виж секцията "Местонахождение на sitemap-файла")!" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:822 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:861 +msgid "URL to the page" +msgstr "URL на страницата" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:823 +msgid "Enter the URL to the page. Examples: http://www.foo.com/index.html or www.foo.com/home " +msgstr "Въведете URL на страницата. Примери: http://www.foo.com/index.html или www.foo.com/home " + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:825 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:862 +msgid "Priority" +msgstr "Приоритет" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:826 +msgid "Choose the priority of the page relative to the other pages. For example, your homepage might have a higher priority than your imprint." +msgstr "Изберете приоритета на страницата в зависимост от другите страници. Например, Вашата заглавна страница може да има по-висок приоритет от страницата Ви за контакт." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:828 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:864 +msgid "Last Changed" +msgstr "Последна Промяна" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:829 +msgid "Enter the date of the last change as YYYY-MM-DD (2005-12-31 for example) (optional)." +msgstr "Въведете датата на последното обновяване във вида (например 2005-12-31) (незадължително)" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:863 +msgid "Change Frequency" +msgstr "Честота на Обновяване" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:865 +msgid "#" +msgstr "#" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:870 +msgid "No pages defined." +msgstr "Няма дефинирани страници." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:875 +msgid "Add new page" +msgstr "Добавяне на нова страница" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:880 +msgid "Post Priority" +msgstr "Приоритет на Поста" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:882 +msgid "Please select how the priority of each post should be calculated:" +msgstr "Моля, изберете начин на калкулиране на приоритета на постовете" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:884 +msgid "Do not use automatic priority calculation" +msgstr "Не използвай авто-калкулиране на приоритета" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:884 +msgid "All posts will have the same priority which is defined in "Priorities"" +msgstr "Всички постове ще имат еднакъв приоритет, който е дефиниран в "Приоритети"" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:895 +msgid "Location of your sitemap file" +msgstr "Път до sitemap-файла" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:898 +msgid "Automatic detection" +msgstr "Автоматично разпознаване" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:902 +msgid "Filename of the sitemap file" +msgstr "Име на sitemap-файла" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:905 +msgid "Detected Path" +msgstr "Намерен път" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:905 +msgid "Detected URL" +msgstr "Намерен URL" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:910 +msgid "Custom location" +msgstr "Друго местонахождение" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:914 +msgid "Absolute or relative path to the sitemap file, including name." +msgstr "Абсолютен и относителен път до sitemap-файла, включително името." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:916 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:925 +msgid "Example" +msgstr "Пример" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:923 +msgid "Complete URL to the sitemap file, including name." +msgstr "Абсолютен URL до sitemap-файла, включително името." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:936 +msgid "Sitemap Content" +msgstr "Съдържание на картата на сайта" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:942 +msgid "Include homepage" +msgstr "Включи заглавната страница" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:948 +msgid "Include posts" +msgstr "Включи постове" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:911 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:954 +msgid "Include following pages of multi-page posts (<!--nextpage-->)" +msgstr "Включи следните страници от многостранични статии (<!--nextpage-->)" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:960 +msgid "Include static pages" +msgstr "Включи статични страници" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:966 +msgid "Include categories" +msgstr "Включи категории" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:972 +msgid "Include archives" +msgstr "Включи архиви" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:979 +msgid "Include tag pages" +msgstr "Включи страници с тагове" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:986 +msgid "Include author pages" +msgstr "Включи авторски страници" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:994 +msgid "Excluded items" +msgstr "Изключени" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:996 +msgid "Excluded categories" +msgstr "Изключени категории" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:998 +msgid "Using this feature will increase build time and memory usage!" +msgstr "Използването на това ще увеличи времето за създаване и употребата на памет!" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1005 +#, php-format +msgid "This feature requires at least WordPress 2.5, you are using %s" +msgstr "Това изисква най-малко WordPress 2.5, Вие използвате %s" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1008 +msgid "Exclude posts" +msgstr "Изключени постове" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3206 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1010 +msgid "Exclude the following posts or pages:" +msgstr "Не включвай следните постове и/или страници:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3206 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1010 +msgid "List of IDs, separated by comma" +msgstr "Списък на ID-тата, разделени със запетая" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1012 +msgid "Child posts will not automatically be excluded!" +msgstr "Подстраниците ще бъдат автоматично изключени!" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1018 +msgid "Change frequencies" +msgstr "Честота на обновяване" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1022 +msgid "Please note that the value of this tag is considered a hint and not a command. Even though search engine crawlers consider this information when making decisions, they may crawl pages marked \"hourly\" less frequently than that, and they may crawl pages marked \"yearly\" more frequently than that. It is also likely that crawlers will periodically crawl pages marked \"never\" so that they can handle unexpected changes to those pages." +msgstr "Моля, обърнете внимание, че стойността на този таг е само подсказка, а не команда. Дори търсачките да се влияят от тази информация при вземане на решенията си, те може да посещават страници, маркирани с \"hourly\" по-рядко от това на всеки час и страници маркирани с \"yearly\" по-често от един път в годината. Приема се, че търсачките периодично посещават страници, маркирани с \"never\" за да могат да отбележат евентуални неочаквани промени в съдържанието им." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1028 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1086 +msgid "Homepage" +msgstr "Заглавна страница" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1034 +msgid "Posts" +msgstr "Постове" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1040 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1104 +msgid "Static pages" +msgstr "Статични страници" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1046 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1110 +msgid "Categories" +msgstr "Категории" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1052 +msgid "The current archive of this month (Should be the same like your homepage)" +msgstr "Настоящ архив за месеца (Трябва да е същия като на заглавната страница)" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1058 +msgid "Older archives (Changes only if you edit an old post)" +msgstr "Стари архиви (Промяна само при редакция на стар пост)" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1065 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1123 +msgid "Tag pages" +msgstr "Страници на тагове" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1072 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1130 +msgid "Author pages" +msgstr "Авторски страници" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1080 +msgid "Priorities" +msgstr "Приоритети" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1092 +msgid "Posts (If auto calculation is disabled)" +msgstr "Постове (Ако авто-калкулиране е неактивно)" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1098 +msgid "Minimum post priority (Even if auto calculation is enabled)" +msgstr "Минимален приоритет на постовете (Важи и при активирано авто-калкулиране)" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1116 +msgid "Archives" +msgstr "Архив" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1141 +msgid "Update options" +msgstr "Обновяване на настройките" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1142 +msgid "Reset options" +msgstr "Връщане на вградените настройки" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap.php:81 +msgid "XML-Sitemap Generator" +msgstr "XML-Sitemap Генератор" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap.php:81 +msgid "XML-Sitemap" +msgstr "XML-Sitemap" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap.php:139 +msgid "Sitemap FAQ" +msgstr "Често Задавани Въпроси" + diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/lang/sitemap-by_BY.mo Binary file web/wp-content/plugins/google-sitemap-generator/lang/sitemap-by_BY.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/lang/sitemap-by_BY.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/google-sitemap-generator/lang/sitemap-by_BY.po Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,685 @@ +# [Countryname] Language File for sitemap (sitemap-[localname].po) +# Copyright (C) 2005 [name] : [URL] +# This file is distributed under the same license as the WordPress package. +# [name] <[mail-address]>, 2005. +# $Id: sitemap.pot 24948 2007-11-18 16:37:44Z arnee $ +# +msgid "" +msgstr "" +"Project-Id-Version: sitemap\n" +"Report-Msgid-Bugs-To: <[mail-address]>\n" +"POT-Creation-Date: 2005-06-15 00:00+0000\n" +"PO-Revision-Date: 2009-06-07 02:23+0100\n" +"Last-Translator: Arne Brachhold\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language-Team: \n" +"X-Poedit-KeywordsList: _e;__\n" +"X-Poedit-Basepath: .\n" +"X-Poedit-SearchPath-0: C:\\Inetpub\\wwwroot\\wp\\wp-content\\plugins\\sitemap_beta\n" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:846 +msgid "Comment Count" +msgstr "Колькасць каментароў" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:858 +msgid "Uses the number of comments of the post to calculate the priority" +msgstr "Выкарыстае колькасць каментароў да артыкула для вылічэння прыярытэту" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:918 +msgid "Comment Average" +msgstr "Сярэдняя колькасць каментароў" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:930 +msgid "Uses the average comment count to calculate the priority" +msgstr "Выкарыстае сярэдняя колькасць каментароў для вылічэння прыярытэту" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:993 +msgid "Popularity Contest" +msgstr "Папулярнасць дыскусіі" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:1005 +msgid "Uses the activated Popularity Contest Plugin from Alex King. See Settings and Most Popular Posts" +msgstr "Выкарыстайце актываваны Убудова папулярнасці дыскусій ад Alex King. Гл. Налады і Самыя папулярныя запісы" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2415 +msgid "XML-Sitemap Generator" +msgstr "Генератар XML-карты сайта" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2415 +msgid "XML-Sitemap" +msgstr "XML-карта сайта" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2600 +msgid "Thank you very much for your donation. You help me to continue support and development of this plugin and other free software!" +msgstr "Премного дзякую за ахвяраванні. Вы дапамагаеце мне ў продалжении падтрымкі і распрацоўкі гэтай убудовы і іншага вольнага ПА!" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2600 +msgid "Hide this notice" +msgstr "Схаваць гэтую заўвагу" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2657 +#, php-format +msgid "Thanks for using this plugin! You've installed this plugin over a month ago. If it works and your are satisfied with the results, isn't it worth at least one dollar? Donations help me to continue support and development of this free software! Sure, no problem!" +msgstr "Дзякую Вас за выкарыстанне гэтай убудовы! Вы ўсталявалі яго звыш месяца назад. Калі ён працуе і Вы здаволеныя яго вынікамі, вышліце мне хоць бы $1? Ахвяраванні дапамогуць мне ў падтрымцы і распрацоўцы гэтага бясплатнага ПА! Вядома, без праблем!" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2657 +msgid "No thanks, please don't bug me anymore!" +msgstr "Не, дзякуй. Прашу мяне больш не турбаваць!" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2635 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2835 +msgid "XML Sitemap Generator for WordPress" +msgstr "Генератар XML-карты сайта для WordPress" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2740 +msgid "Configuration updated" +msgstr "Канфігурацыя абноўленая" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2741 +msgid "Error while saving options" +msgstr "Памылка пры захаванні параметраў" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2743 +msgid "Pages saved" +msgstr "Старонкі захаваныя" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2744 +msgid "Error while saving pages" +msgstr "Памылка пры захаванні старонак" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2748 +#, php-format +msgid "Robots.txt file saved" +msgstr "Файл Robots.txt захаваны" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2750 +msgid "Error while saving Robots.txt file" +msgstr "Памылка пры захаванні файла Robots.txt" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2758 +msgid "The default configuration was restored." +msgstr "Канфігурацыя па змаўчанні адноўленая." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2851 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2868 +msgid "open" +msgstr "адкрыць" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2852 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2869 +msgid "close" +msgstr "зачыніць" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2853 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2870 +msgid "click-down and drag to move this box" +msgstr "Націсніце кнопку мышы і цягнеце для перамяшчэння гэтага блока" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2854 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2871 +msgid "click to %toggle% this box" +msgstr "Націсніце для %toggle% на гэты блок" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2855 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2872 +msgid "use the arrow keys to move this box" +msgstr "выкарыстайце стрэлкі для перамяшчэння гэтага блока" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2856 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2873 +msgid ", or press the enter key to %toggle% it" +msgstr ", або націсніце копку ўвод (enter) для %toggle% яго" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2884 +msgid "About this Plugin:" +msgstr "Аб гэта ўбудове:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2886 +msgid "Plugin Homepage" +msgstr "Хатняя старонка ўбудовы" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2887 +msgid "Notify List" +msgstr "Спіс напамінку" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2888 +msgid "Support Forum" +msgstr "Форум тэхнічнай падтрымкі" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2889 +msgid "Donate with PayPal" +msgstr "Ахвяраваць праз PayPal" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2890 +msgid "My Amazon Wish List" +msgstr "Мой спіс пажаданняў на Amazon" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2891 +msgid "translator_name" +msgstr "Перавёў Сяргей Рывкин" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2891 +msgid "translator_url" +msgstr "http://ryvkin.ru" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2895 +msgid "Sitemap Resources:" +msgstr "Рэсурсы карыт сайта:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2897 +msgid "Webmaster Tools" +msgstr "Прылады вэб-майстра" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2898 +msgid "Webmaster Blog" +msgstr "Дзённік вэб-майстра" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2900 +msgid "Site Explorer" +msgstr "Прагляд сайта" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2901 +msgid "Search Blog" +msgstr "Шукаць у дзённіку" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2903 +msgid "Sitemaps Protocol" +msgstr "Пратакол выкарыстання карты сайта" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2904 +msgid "Official Sitemaps FAQ" +msgstr "Афіцыйны ЧАВО па картах сайта" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2905 +msgid "My Sitemaps FAQ" +msgstr "Мой ЧАВО па картах сайта" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2910 +msgid "Recent Donations:" +msgstr "Апошнія ахвяраванні:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2914 +msgid "List of the donors" +msgstr "Спіс спонсараў" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2916 +msgid "Hide this list" +msgstr "Схаваць гэты спіс" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2919 +msgid "Thanks for your support!" +msgstr "Дзякуй за Вашу падтрымку!" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2931 +msgid "Status" +msgstr "Статут" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2941 +#, php-format +msgid "The sitemap wasn't built yet. Click here to build it the first time." +msgstr "Карта сайта яшчэ не пабудаваная. Націсніце тут для стварэння яе ўпершыню." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2947 +msgid "Your sitemap was last built on %date%." +msgstr "Ваша карта сайта апошні раз была пабудаваная: %date%." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2949 +msgid "There was a problem writing your sitemap file. Make sure the file exists and is writable. Learn moreПачытаць яшчэ" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2956 +msgid "Your sitemap (zipped) was last built on %date%." +msgstr "Ваша карта сайта (сціснутая) апошні раз была пабудаваная: %date%." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2958 +msgid "There was a problem writing your zipped sitemap file. Make sure the file exists and is writable. Learn moreПачытаць яшчэ" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2964 +msgid "Google was successfully notified about changes." +msgstr "Google быў паспяхова паінфармаваны аб зменах." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2967 +msgid "It took %time% seconds to notify Google, maybe you want to disable this feature to reduce the building time." +msgstr "%time% секунд заняло інфармаванне Google; магчыма, Вас варта адключыць гэтую функцыю, каб знізіць час пабудовы карты." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3011 +#, php-format +msgid "There was a problem while notifying Google. View result" +msgstr "Пры інфармаванні Google адбылася памылка. Паглядзець вынік" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2976 +msgid "YAHOO was successfully notified about changes." +msgstr "YAHOO быў паспяхова паінфармаваны аб зменах." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2979 +msgid "It took %time% seconds to notify YAHOO, maybe you want to disable this feature to reduce the building time." +msgstr "%time% секунд заняло інфармаванне YAHOO; магчыма, Вас варта адключыць гэтую функцыю, каб знізіць час пабудовы карты." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3023 +#, php-format +msgid "There was a problem while notifying YAHOO. View result" +msgstr "Пры інфармаванні YAHOO адбылася памылка. Паглядзець вынік" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2988 +msgid "Ask.com was successfully notified about changes." +msgstr "Ask.com быў паспяхова паінфармаваны аб зменах." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2991 +msgid "It took %time% seconds to notify Ask.com, maybe you want to disable this feature to reduce the building time." +msgstr "%time% секунд заняло інфармаванне Ask.com; магчыма, Вас варта адключыць гэтую функцыю, каб знізіць час пабудовы карты." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3035 +#, php-format +msgid "There was a problem while notifying Ask.com. View result" +msgstr "Пры інфармаванні Ask.com адбылася памылка. Паглядзець вынік" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3002 +msgid "The building process took about %time% seconds to complete and used %memory% MB of memory." +msgstr "Працэс пабудовы заняў прыкладна %time% секунд і выкарыстаў %memory% MB памяці." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3004 +msgid "The building process took about %time% seconds to complete." +msgstr "Працэс пабудовы заняў прыкладна %time% секунд." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3008 +msgid "The content of your sitemap didn't change since the last time so the files were not written and no search engine was pinged." +msgstr "Утрыманне Вашай карты сайта не змянялася за апошні час, таму файлы не запісваліся і пошукавыя сістэмы не інфармаваліся." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3012 +msgid "The last run didn't finish! Maybe you can raise the memory or time limit for PHP scripts. Learn more" +msgstr "Апошні запуск не быў завершаны! Магчыма, Вы перавысілі ліміты памяці або часу выканання. Пачытаць яшчэ" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3014 +msgid "The last known memory usage of the script was %memused%MB, the limit of your server is %memlimit%." +msgstr "Апошні раз скрыпт выкарыстаў %memused%MB памяці, ліміт памяці Вашага сервера складае %memlimit%." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3018 +msgid "The last known execution time of the script was %timeused% seconds, the limit of your server is %timelimit% seconds." +msgstr "Апошні раз скрыпт працаваў %timeused% секунд, абмежаванне часу на Вашым серверы складае %timelimit% секунд." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3022 +msgid "The script stopped around post number %lastpost% (+/- 100)" +msgstr "Скрыпт спыніўся каля артыкула нумар %lastpost% (+/- 100)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3025 +#, php-format +msgid "If you changed something on your server or blog, you should rebuild the sitemap manually." +msgstr "Калі Вы нешта памянялі на Вашым сервре або ў дзённіку, Вам неабходна зноўку пабудаваць карту сайта уручную." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3027 +#, php-format +msgid "If you encounter any problems with the build process you can use the debug function to get more information." +msgstr "Калі Вы сапхнуліся з якія-небудзь праблемамі ў працэсе пабудовы, Вы можаце скарыстацца функцыяй адладкі для атрымання дадатковай інфармацыі." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3040 +msgid "Basic Options" +msgstr "Базавыя параметры" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3044 +msgid "Sitemap files:" +msgstr "Файлы карты сайта:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3044 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3059 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3079 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3104 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3121 +msgid "Learn more" +msgstr "Пачытаць яшчэ" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3049 +msgid "Write a normal XML file (your filename)" +msgstr "Запісаць звычайны XML файл (Ваша імя файла)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3055 +msgid "Write a gzipped file (your filename + .gz)" +msgstr "Запісаць запакаваны XML файл (Ваша імя файла + .gz)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3059 +msgid "Building mode:" +msgstr "Рэжым пабудовы карты:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3064 +msgid "Rebuild sitemap if you change the content of your blog" +msgstr "Пабудуйце зноўку карту сайта, калі Вы змянілі ўтрыманне Вашага дзённіка" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3071 +msgid "Enable manual sitemap building via GET Request" +msgstr "Дазволіць ручную пабудову карты сайта з дапамогай запыту GET" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3075 +msgid "This will allow you to refresh your sitemap if an external tool wrote into the WordPress database without using the WordPress API. Use the following URL to start the process: %1 Please check the logfile above to see if sitemap was successfully built." +msgstr "Гэта дазволіць Вам абнавіць карту сайта, калі знешняя прылада будзе пісаць у базу WordPress? не выкарыстаючы WordPress API. Выкарыстайце наступны URL для выканання працэсу: %1 Паглядзіце пратакол (гл. вышэй) для праверкі, ці пабудаваная карта сайта." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3079 +msgid "Update notification:" +msgstr "Абнавіць апавяшчэнне:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3083 +msgid "Notify Google about updates of your Blog" +msgstr "Апавясціць Google аб зменах у Вашым дзённіку" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3084 +#, php-format +msgid "No registration required, but you can join the Google Webmaster Tools to check crawling statistics." +msgstr "Рэгістрацыя не патрабуецца, але Вы можаце далучыцца да Прыладам вэб-майстра Google для прагляду статыстыкі пошукавых робатаў." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3088 +msgid "Notify Ask.com about updates of your Blog" +msgstr "Апавясціць Asc.com аб зменах у Вашым дзённіку" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3089 +msgid "No registration required." +msgstr "Рэгістрацыя не патрабуецца." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3093 +msgid "Notify YAHOO about updates of your Blog" +msgstr "Апавясціць YAHOO аб зменах у Вашым дзённіку" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3154 +msgid "Your Application ID:" +msgstr "Ваш ідэнтыфікатар прыкладання (Application ID):" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3155 +#, php-format +msgid "Don't you have such a key? Request one here! %s2" +msgstr "У Вас няма такога ключа?? Запытаеце тут! %s2" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3099 +#, php-format +msgid "Modify or create %s file in blog root which contains the sitemap location." +msgstr "Змяніць або стварыць файл %s у дзённіку, які ўтрымоўвае інфармацыю аб размяшчэнні карты сайта." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3102 +msgid "File permissions: " +msgstr "Дазволы на доступ да файлаў: " + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3107 +msgid "OK, robots.txt is writable." +msgstr "OK, robots.txt адчынены на запіс." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3109 +msgid "Error, robots.txt is not writable." +msgstr "Памылка, robots.txt не адчынены на запіс." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3113 +msgid "OK, robots.txt doesn't exist but the directory is writable." +msgstr "OK, robots.txt не існуе, але каталог адчынены на запіс." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3115 +msgid "Error, robots.txt doesn't exist and the directory is not writable" +msgstr "Памылка, robots.txt не існуе, і каталог не адчынены на запіс" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3121 +msgid "Advanced options:" +msgstr "Пашыраныя параметры:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3124 +msgid "Limit the number of posts in the sitemap:" +msgstr "Абмежаваць колькасць артыкулаў у карце сайта:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3124 +msgid "Newer posts will be included first" +msgstr "Навейшыя артыкулы будуць уключаныя першымі" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3127 +msgid "Try to increase the memory limit to:" +msgstr "Паспрабаваць павялічыць ліміт памяці да:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3127 +msgid "e.g. \"4M\", \"16M\"" +msgstr "напрыклад, \"4M\", \"16M\"" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3130 +msgid "Try to increase the execution time limit to:" +msgstr "Паспрабаваць павялічыць абмежаванне часу выканання да:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3130 +msgid "in seconds, e.g. \"60\" or \"0\" for unlimited" +msgstr "у секундах, напрыклад, \"60\" або \"0\" для неабмежаванага часу" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3133 +msgid "Include a XSLT stylesheet:" +msgstr "Уключыць табліцу стыляў XSLT:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3133 +msgid "Use Default" +msgstr "Выкарыстаць значэнне па змаўчанні" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3133 +msgid "Full or relative URL to your .xsl file" +msgstr "Поўны або адносны URL да Вашага файла .xsl" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3152 +msgid "Enable MySQL standard mode. Use this only if you're getting MySQL errors. (Needs much more memory!)" +msgstr "Дазволіць стандартны рэжым MySQL. Выкарыстаць толькі ў выпадку памылак MySQL. (Патрабуе нашмат больш памяці!)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3166 +msgid "Build the sitemap in a background process (You don't have to wait when you save a post)" +msgstr "Будаваць карту сайта ў фонавым працэсе (Вам не трэба чакаць захаванні артыкула)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3206 +msgid "Exclude the following posts or pages:" +msgstr "Выключыць наступныя артыкулы або старонкі:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3206 +msgid "List of IDs, separated by comma" +msgstr "Спіс ідэнтыфікатараў (ID), падзеленых коскамі" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3144 +msgid "Additional pages" +msgstr "Дадатковыя старонкі" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3149 +msgid "Here you can specify files or URLs which should be included in the sitemap, but do not belong to your Blog/WordPress.
    For example, if your domain is www.foo.com and your blog is located on www.foo.com/blog you might want to include your homepage at www.foo.com" +msgstr "Тут Вы можаце паказаць файлы або URL, якія павінны быць уключаныя ў карту сайта, але не прыналежныя Вашаму дзённіку/WordPress.
    Напрыклад,калі Ваш дамен www.foo.com, а Ваш дзённік размешчаны ў www.foo.com/blog, Вам можа спатрэбіцца дадаць хатнюю старонку з www.foo.com" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3151 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3462 +msgid "Note" +msgstr "Заўвага" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3152 +msgid "If your blog is in a subdirectory and you want to add pages which are NOT in the blog directory or beneath, you MUST place your sitemap file in the root directory (Look at the "Location of your sitemap file" section on this page)!" +msgstr "Калі Ваш дзённік размешчаны ў падкаталогу, і Вы жадаеце дадаць старонкі, якія знаходзяцца ВЫШЭЙ у структуры каталогаў, Вам НЕАБХОДНА змясціць карту сайта ў каранёвы каталог (Гл. секцыю "Размяшчэнне файла з картай сайта" на гэтай старонцы)!" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3154 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3300 +msgid "URL to the page" +msgstr "URL старонкі" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3155 +msgid "Enter the URL to the page. Examples: http://www.foo.com/index.html or www.foo.com/home " +msgstr "Увядзіце URL гэтай старонкі. Прыклады: http://www.foo.com/index.html або www.foo.com/home " + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3157 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3301 +msgid "Priority" +msgstr "Прыярытэт" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3158 +msgid "Choose the priority of the page relative to the other pages. For example, your homepage might have a higher priority than your imprint." +msgstr "Вылучыце прыярытэт гэтай старонкі адносна іншых старонак. Напрыклад, Ваша галоўная старонка можа мець больш высокі прыярытэт, чым старонка з інфармацыяй аб сайце." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3160 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3303 +msgid "Last Changed" +msgstr "Апошні раз змянялася" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3161 +msgid "Enter the date of the last change as YYYY-MM-DD (2005-12-31 for example) (optional)." +msgstr "Увядзіце дату апошняй змены ў фармаце YYYY-MM-DD (2005-12-31, напрыклад) (не абавязкова)." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3302 +msgid "Change Frequency" +msgstr "Частата змен" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3304 +msgid "#" +msgstr "№" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3309 +msgid "No pages defined." +msgstr "Няма старонак." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3314 +msgid "Add new page" +msgstr "Дадаць новую старонку" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3325 +msgid "Post Priority" +msgstr "Прыярытэт артыкула" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3329 +msgid "Please select how the priority of each post should be calculated:" +msgstr "Вылучыце, як будзе вылічацца прыярытэт кожнага артыкула:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3331 +msgid "Do not use automatic priority calculation" +msgstr "Не выкарыстаць аўтаматычнае вылічэнне прыярытэту" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3331 +msgid "All posts will have the same priority which is defined in "Priorities"" +msgstr "Усе артыкулы будуць мець аднолькавы прыярытэт, які вызначаны ў "Прыярытэтах"" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3348 +msgid "Location of your sitemap file" +msgstr "Размяшчэнне Вашага файла з картай сайта" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3353 +msgid "Automatic detection" +msgstr "Аўтаматычнае азначэнне" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3357 +msgid "Filename of the sitemap file" +msgstr "Імя файла з картай сайта" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3360 +msgid "Detected Path" +msgstr "Выяўлены шлях" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3360 +msgid "Detected URL" +msgstr "Выяўлены URL" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3365 +msgid "Custom location" +msgstr "Карыстацкае размяшчэнне" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3369 +msgid "Absolute or relative path to the sitemap file, including name." +msgstr "Абсалютны або адносны шлях да файла з картай сайта, уключаючы імя файла." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3371 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3380 +msgid "Example" +msgstr "Прыклад" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3378 +msgid "Complete URL to the sitemap file, including name." +msgstr "Запоўніце URL да файла з картай сайта, уключаючы імя файла." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3397 +msgid "Sitemap Content" +msgstr "Утрыманне карты сайта" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3405 +msgid "Include homepage" +msgstr "Уключыць хатнюю старонку" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3411 +msgid "Include posts" +msgstr "Уключыць артыкулы" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3417 +msgid "Include static pages" +msgstr "Уключыць статычныя старонкі" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3423 +msgid "Include categories" +msgstr "Уключыць катэгорыі" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3429 +msgid "Include archives" +msgstr "Уключыць архівы" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3436 +msgid "Include tag pages" +msgstr "Уключыць старонкі пазанак" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3443 +msgid "Include author pages" +msgstr "Уключыць старонкі аўтараў" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3457 +msgid "Change frequencies" +msgstr "Змяніць частоты" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3463 +msgid "Please note that the value of this tag is considered a hint and not a command. Even though search engine crawlers consider this information when making decisions, they may crawl pages marked \"hourly\" less frequently than that, and they may crawl pages marked \"yearly\" more frequently than that. It is also likely that crawlers will periodically crawl pages marked \"never\" so that they can handle unexpected changes to those pages." +msgstr "Звернеце ўвагу, што значэнне гэтай пазнакі лічыцца рэкамендацыяй і не з'яўляецца камандай. Нават калі пошукавыя робаты бяруць гэтую інфармацыю да ўвагі для прыняцця рашэнняў, яны могуць аглядаць старонкі, пазначаныя \"раз у гадзіну\" радзей, чым запытана, і яны могуць аглядаць старонкі, пазначаныя як \"раз у год\" гушчару, чым запытана. Таксама бывае, што пошукавыя робаты аглядаюць старонкі, пазначаныя як \"ніколі\", адзначаючы не прадугледжаныя змены на гэтых старонках." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3469 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3535 +msgid "Homepage" +msgstr "Галоўная старонка" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3475 +msgid "Posts" +msgstr "Артыкулы" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3481 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3553 +msgid "Static pages" +msgstr "Статычныя старонкі" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3487 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3559 +msgid "Categories" +msgstr "Катэгорыі" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3493 +msgid "The current archive of this month (Should be the same like your homepage)" +msgstr "Бягучы архіў за гэты месяц (Павінен быць тым жа, што і Галоўная старонка)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3499 +msgid "Older archives (Changes only if you edit an old post)" +msgstr "Старыя архівы (Змяняюцца толькі ў выпадку, калі Вы рэдагуеце старыя артыкулы)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3506 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3572 +msgid "Tag pages" +msgstr "Старонкі пазанак" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3513 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3579 +msgid "Author pages" +msgstr "Старонкі аўтараў" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3527 +msgid "Priorities" +msgstr "Прыярытэты" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3541 +msgid "Posts (If auto calculation is disabled)" +msgstr "Артыкулы (Калі аўтаматычнае вылічэнне забароненае)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3547 +msgid "Minimum post priority (Even if auto calculation is enabled)" +msgstr "Мінімальны прыярытэт артыкула (Нават калі аўтаматычнае вылічэнне дазволена)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3565 +msgid "Archives" +msgstr "Архівы" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3590 +msgid "Update options" +msgstr "Абнавіць параметры" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3591 +msgid "Reset options" +msgstr "Вярнуць зыходныя значэнні" + diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/lang/sitemap-cs_CZ.mo Binary file web/wp-content/plugins/google-sitemap-generator/lang/sitemap-cs_CZ.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/lang/sitemap-cs_CZ.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/google-sitemap-generator/lang/sitemap-cs_CZ.po Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,604 @@ +# [Countryname] Language File for sitemap (sitemap-[localname].po) +# Copyright (C) 2005 [name] : [URL] +# This file is distributed under the same license as the WordPress package. +# [name] <[mail-address]>, 2005. +# $Id: sitemap.pot 2502 2005-07-03 20:50:38Z arnee $ +# +msgid "" +msgstr "" +"Project-Id-Version: sitemap\n" +"Report-Msgid-Bugs-To: <[mail-address]>\n" +"POT-Creation-Date: 2005-06-15 00:00+0000\n" +"PO-Revision-Date: 2007-11-21 20:50+0100\n" +"Last-Translator: Peter Kahoun \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language-Team: \n" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:846 +msgid "Comment Count" +msgstr "Počet komentářů" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:858 +msgid "Uses the number of comments of the post to calculate the priority" +msgstr "K vypočítání priority se využívá počet komentářů" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:918 +msgid "Comment Average" +msgstr "Průměrný počet komentářů" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:930 +msgid "Uses the average comment count to calculate the priority" +msgstr "K vypočítání priority se využívá průměrného počtu komentářů" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:993 +msgid "Popularity Contest" +msgstr "Soutěž popularity" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:1005 +msgid "Uses the activated Popularity Contest Plugin from Alex King. See Settings and Most Popular Posts" +msgstr "Využívá se pluginu Soutěž popularity (Popularity contest) od Alexe Kinga. Viz Nastavení a Nejpopulárnější příspěvky" + +msgid "XML-Sitemap Generator" +msgstr "Generátor XML-Sitemapy" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2415 +msgid "XML-Sitemap" +msgstr "XML-Sitemap" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2600 +msgid "Thank you very much for your donation. You help me to continue support and development of this plugin and other free software!" +msgstr "Děkuji vám mockrát za vaše příspěvky. Pomáháte tím pokračovat v podpoře a vývoji tohoto pluginu a dalšího nekomerčního softwaru!" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2600 +msgid "Hide this notice" +msgstr "Skrýt toto oznámení" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2657 +#, php-format +msgid "Thanks for using this plugin! You've installed this plugin over a month ago. If it works and your are satisfied with the results, isn't it worth at least one dollar? Donations help me to continue support and development of this free software! Sure, no problem!" +msgstr "Díky za používání tohoto pluginu! Už je to více než měsíc, co jste ho naistalovali. Pokud funguje k vaší spokojenosti, není hoden alespoň toho jednoho dolaru? Peněžní příspěvky mi pomáhají pokračovat v podpoře a vývoji tohoto nekomerčního softwaru! Ovšem, žádný problém!" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2657 +msgid "No thanks, please don't bug me anymore!" +msgstr "Ne, díky, už mě prosím neotravuj!" + +msgid "XML Sitemap Generator for WordPress" +msgstr "Generátor XML Sitemap" + +msgid "Configuration updated" +msgstr "Nastavení aktualizováno" + +msgid "Error while saving options" +msgstr "Při ukládání nastavení nastala chyba" + +msgid "Pages saved" +msgstr "Stránka uložena" + +msgid "Error while saving pages" +msgstr "Při ukládání stránek nastala chyba" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2748 +#, php-format +msgid "Robots.txt file saved" +msgstr "Soubor robots.txt uložen" + +msgid "Error while saving Robots.txt file" +msgstr "Při ukládání souboru robots.txt nastala chyba" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2758 +msgid "The default configuration was restored." +msgstr "Výchozí nastavení bylo obnoveno." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2851 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2868 +msgid "open" +msgstr "otevřít" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2852 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2869 +msgid "close" +msgstr "zavřít" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2853 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2870 +msgid "click-down and drag to move this box" +msgstr "Podržte tlačítko myši a táhněte tento box dolů" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2854 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2871 +msgid "click to %toggle% this box" +msgstr "klikněte k přepnutí viditelnosti tohoto boxu" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2855 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2872 +msgid "use the arrow keys to move this box" +msgstr "k přesunutí tohoto boxu použijte šipky na klávesnici" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2856 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2873 +msgid ", or press the enter key to %toggle% it" +msgstr ", anebo stiskněte Enter k přepnutí viditelnosti" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2884 +msgid "About this Plugin:" +msgstr "O tomto pluginu:" + +msgid "Plugin Homepage" +msgstr "Domovská stránka pluginu" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2887 +msgid "Notify List" +msgstr "Oznamovatel novinek" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2888 +msgid "Support Forum" +msgstr "Podpora (fórum)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2889 +msgid "Donate with PayPal" +msgstr "Přispějte přes PayPal" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2890 +msgid "My Amazon Wish List" +msgstr "Můj WishList na Amazonu" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2891 +msgid "translator_name" +msgstr "Peter \"Kahi\" Kahoun" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2891 +msgid "translator_url" +msgstr "http://kahi.cz/wordpress" + +msgid "Sitemap Resources:" +msgstr "Zdroje:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2897 +msgid "Webmaster Tools" +msgstr "Webmaster Tools" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2898 +msgid "Webmaster Blog" +msgstr "Webmaster Blog" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2900 +msgid "Site Explorer" +msgstr "Site Explorer" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2901 +msgid "Search Blog" +msgstr "Search Blog" + +msgid "Sitemaps Protocol" +msgstr "Sitemaps protokol" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2904 +msgid "Official Sitemaps FAQ" +msgstr "Oficiální Sitemaps FAQ" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2905 +msgid "My Sitemaps FAQ" +msgstr "Mé Sitemaps FAQ" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2910 +msgid "Recent Donations:" +msgstr "Poslední příspěvky:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2914 +msgid "List of the donors" +msgstr "Seznam dárců" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2916 +msgid "Hide this list" +msgstr "Skrýt seznam" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2919 +msgid "Thanks for your support!" +msgstr "Díky za vaši podporu!" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2931 +msgid "Status" +msgstr "Stav" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2941 +#, php-format +msgid "The sitemap wasn't built yet. Click here to build it the first time." +msgstr "Sitemapa ještě nebyla vytvořena. Klikněte sem pro první vytvoření." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2947 +msgid "Your sitemap was last built on %date%." +msgstr "Vaše sitemapa byla naposledy aktualizována %date%." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2949 +msgid "There was a problem writing your sitemap file. Make sure the file exists and is writable. Learn moreDozvědět se víc" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2956 +msgid "Your sitemap (zipped) was last built on %date%." +msgstr "Vaše zazipovaná sitemapa byla naposledy aktualizována %date%." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2958 +msgid "There was a problem writing your zipped sitemap file. Make sure the file exists and is writable. Learn moreDozvědět se víc" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2964 +msgid "Google was successfully notified about changes." +msgstr "Google byl úspěšně upozorněn na změny." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2967 +msgid "It took %time% seconds to notify Google, maybe you want to disable this feature to reduce the building time." +msgstr "Oznámení Googlu zabralo %time% sekund, možná budete chtít deaktivovat tuto funkci pro snížení potřebného času k vytváření sitemapy." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3011 +#, php-format +msgid "There was a problem while notifying Google. View result" +msgstr "Vyskytl se problém při oznamování změn Googlu. Prohlédnout výsledek" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2976 +msgid "YAHOO was successfully notified about changes." +msgstr "Yahoo byl úspěšně upozorněn na změny." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2979 +msgid "It took %time% seconds to notify YAHOO, maybe you want to disable this feature to reduce the building time." +msgstr "Oznámení Yahoo zabralo %time% sekund, možná budete chtít deaktivovat tuto funkci pro snížení potřebného času k vytváření sitemapy." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3023 +#, php-format +msgid "There was a problem while notifying YAHOO. View result" +msgstr "Vyskytl se problém při oznamování změn Yahoo. Prohlédnout výsledek" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2988 +msgid "Ask.com was successfully notified about changes." +msgstr "Ask.com byl úspěšně upozorněn na změny." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2991 +msgid "It took %time% seconds to notify Ask.com, maybe you want to disable this feature to reduce the building time." +msgstr "Oznámení Ask.com zabralo %time% sekund, možná budete chtít deaktivovat tuto funkci pro snížení potřebného času k vytváření sitemapy." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3035 +#, php-format +msgid "There was a problem while notifying Ask.com. View result" +msgstr "Vyskytl se problém při oznamování změn Ask.com. Prohlédnout výsledek" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3002 +msgid "The building process took about %time% seconds to complete and used %memory% MB of memory." +msgstr "Proces vytváření zabral kolem %time% seconds a spotřeboval %memory% MB paměti." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3004 +msgid "The building process took about %time% seconds to complete." +msgstr "Proces vytváření zabral kolem %time% sekund." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3008 +msgid "The content of your sitemap didn't change since the last time so the files were not written and no search engine was pinged." +msgstr "Obsah vaší sitemapy se nezměnil od posledního vytváření, takže soubory nebyly aktualizovány a vyhledávače nebyly upozorňovány na změny." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3012 +msgid "The last run didn't finish! Maybe you can raise the memory or time limit for PHP scripts. Learn more" +msgstr "Poslední běh neproběhl do konce! Možná byste mohli navýšit limit paměti či maximálního času pro PHP skripty. Dozvědět se víc" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3014 +msgid "The last known memory usage of the script was %memused%MB, the limit of your server is %memlimit%." +msgstr "Poslední známé využití paměti bylo %memused%MB, limit vašeho serveru je %memlimit%." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3018 +msgid "The last known execution time of the script was %timeused% seconds, the limit of your server is %timelimit% seconds." +msgstr "Poslední známý čas trvání skriptu byl %timeused% sekund, limit vašeho serveru je %timelimit% sekund." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3022 +msgid "The script stopped around post number %lastpost% (+/- 100)" +msgstr "Skript byl zastaven kolem příspěvku číslo %lastpost% (+/- 100)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3025 +#, php-format +msgid "If you changed something on your server or blog, you should rebuild the sitemap manually." +msgstr "Pokud bylo něco na vašem serveru nebo blogu změněno, měli byste aktualizovat sitemapu ručně." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3027 +#, php-format +msgid "If you encounter any problems with the build process you can use the debug function to get more information." +msgstr "Pokud zaregistrujete jakékoli problémy při procesu aktualizace sitemapy, k získání více informací můžete použít ladící funkci." + +msgid "Basic Options" +msgstr "Základní možnosti" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3044 +msgid "Sitemap files:" +msgstr "Soubory sitemapy:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3044 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3059 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3079 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3104 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3121 +msgid "Learn more" +msgstr "Dozvědět se víc" + +msgid "Write a normal XML file (your filename)" +msgstr "Ukládat normální XML soubor (jméno vašeho souboru)" + +msgid "Write a gzipped file (your filename + .gz)" +msgstr "Ukládat komprimovaný (gzip) soubor (jméno vašeho souboru + .gz)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3059 +msgid "Building mode:" +msgstr "Mód aktualizace:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3064 +msgid "Rebuild sitemap if you change the content of your blog" +msgstr "Aktualizovat sitemapu při každé změně v obsahu vašeho blogu" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3071 +msgid "Enable manual sitemap building via GET Request" +msgstr "Povolit ruční aktualizaci sitemapy pomocí GET dotazu" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3075 +msgid "This will allow you to refresh your sitemap if an external tool wrote into the WordPress database without using the WordPress API. Use the following URL to start the process: %1 Please check the logfile above to see if sitemap was successfully built." +msgstr "Toto umožní aktualizovat vaši sitemapu, pokud do databáze Wordpressu zapíše data nějaký externí nástroj bez využití WordPress API. Použijte tuto URL ke spuštění procesu: %1. Prosím zkontrolujte log-soubor výše, jestli byla sitemapa aktualizována úspěšně." + +msgid "Update notification:" +msgstr "Oznámení o aktualizaci:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3083 +msgid "Notify Google about updates of your Blog" +msgstr "Oznamovat Googlu změny na vašem blogu" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3084 +#, php-format +msgid "No registration required, but you can join the Google Webmaster Tools to check crawling statistics." +msgstr "Registrace není vyžadována, ale může se připojit k Google Webmaster Tools kvůli kontrole statistik návštěv vyhledávače." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3088 +msgid "Notify Ask.com about updates of your Blog" +msgstr "Oznamovat Ask.com změny na vašem blogu" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3089 +msgid "No registration required." +msgstr "Registrace není vyžadována." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3093 +msgid "Notify YAHOO about updates of your Blog" +msgstr "Oznamovat Yahoo změny na vašem blogu" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3094 +#, php-format +msgid "No registration required, but you can sign up for the YAHOO Site Explorer to view the crawling progress." +msgstr "Registrace není vyžadována, ale můžete se přihlásit do YAHOO Site Explorer kvůli prohlížení postupu návštěv vyhledávače." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3099 +#, php-format +msgid "Modify or create %s file in blog root which contains the sitemap location." +msgstr "Upravit nebo vytvořit %s soubor v kořeni blogu, který obsahuje adresu sitemapy." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3102 +msgid "File permissions: " +msgstr "Oprávnění k souboru:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3107 +msgid "OK, robots.txt is writable." +msgstr "V pořádku, je možné zapisovat do robots.txt." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3109 +msgid "Error, robots.txt is not writable." +msgstr "Chyba, není možné zapisovat do robots.txt." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3113 +msgid "OK, robots.txt doesn't exist but the directory is writable." +msgstr "V pořádku, robots.txt neexistuje, ale zápis do adresáře je povolen." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3115 +msgid "Error, robots.txt doesn't exist and the directory is not writable" +msgstr "Chyba, robots.txt neexistuje a zápis do adresáře není povolen." + +msgid "Advanced options:" +msgstr "Pokročilé možnosti:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3124 +msgid "Limit the number of posts in the sitemap:" +msgstr "Omezit počet příspěvků v sitemapě:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3124 +msgid "Newer posts will be included first" +msgstr "Novější příspěvky budou zahrnuty nejdříve" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3127 +msgid "Try to increase the memory limit to:" +msgstr "Zkuste navýšit limit paměti na:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3127 +msgid "e.g. \"4M\", \"16M\"" +msgstr "např: \"4M\", \"16M\"" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3130 +msgid "Try to increase the execution time limit to:" +msgstr "Zkuste navýšit maximální čas provádění skriptu na:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3130 +msgid "in seconds, e.g. \"60\" or \"0\" for unlimited" +msgstr "v sekundách, např. \"60\" anebo \"0\" pro nekonečno" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3133 +msgid "Include a XSLT stylesheet:" +msgstr "Připojit XSLT stylopis:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3133 +msgid "Use Default" +msgstr "Použít výchozí" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3133 +msgid "Full or relative URL to your .xsl file" +msgstr "Adresa k vašemu .xsl souboru" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3152 +msgid "Enable MySQL standard mode. Use this only if you're getting MySQL errors. (Needs much more memory!)" +msgstr "Povolit standardní mód MySQL. Toto používejte jedině když se zobrazují MySQL chyby - vyžaduje to mnohem víc paměti!" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3166 +msgid "Build the sitemap in a background process (You don't have to wait when you save a post)" +msgstr "Vytvářet sitemapu v pozadí (Tzn. nebudete muset čekat při ukládání příspěvku)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3206 +msgid "Exclude the following posts or pages:" +msgstr "Vyřadit tyto příspěvky či stránky:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3206 +msgid "List of IDs, separated by comma" +msgstr "Seznam ID oddělených čárkou" + +msgid "Additional pages" +msgstr "Stránky navíc" + +msgid "Here you can specify files or URLs which should be included in the sitemap, but do not belong to your Blog/WordPress.
    For example, if your domain is www.foo.com and your blog is located on www.foo.com/blog you might want to include your homepage at www.foo.com" +msgstr "Zde můžete nastavit URL adresy, které mají být zahrnuty do sitemapy, ale nenáleží k blogu/WordPressu.
    Například, pokud vaše doména je www.něco.cz a váš blog se nachází na www.něco.cz/blog, možná byste chtěli zahrnout i www.něco.cz" + +msgid "Note" +msgstr "Poznámka" + +msgid "If your blog is in a subdirectory and you want to add pages which are NOT in the blog directory or beneath, you MUST place your sitemap file in the root directory (Look at the "Location of your sitemap file" section on this page)!" +msgstr "Je-li váš blog v podsložce a chcete-li přidat stránky, které NEJSOU v adresáři blogu (anebo v podadresářích), MUSÍTE umístit vaši sitemapu do kořenové složky (Viz sekce "Umístění vaší sitemapy" na této stránce)!" + +msgid "URL to the page" +msgstr "URL stránky" + +msgid "Enter the URL to the page. Examples: http://www.foo.com/index.html or www.foo.com/home " +msgstr "Vložte URL (adresu) stránky. Příklady: http://www.něco.cz/index.html nebo www.něco.cz/home " + +msgid "Priority" +msgstr "Priorita" + +msgid "Choose the priority of the page relative to the other pages. For example, your homepage might have a higher priority than your imprint." +msgstr "Vyberte prioritu stránky relativně k ostatním stránkám. Například, vaše titulní stránka by měla mít vyšší prioritu než stránka O mně." + +msgid "Last Changed" +msgstr "Naposledy změněno" + +msgid "Enter the date of the last change as YYYY-MM-DD (2005-12-31 for example) (optional)." +msgstr "Vložte datum poslední změny ve formátu RRRR-MM-DD (například 2007-08-12) (nepovinné)." + +msgid "Change Frequency" +msgstr "Nastavit frekvenci" + +msgid "#" +msgstr "#" + +msgid "No pages defined." +msgstr "Nejsou definovány žádné stránky." + +msgid "Add new page" +msgstr "Přidat novou stránku" + +msgid "Post Priority" +msgstr "Priorita příspěvků" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3329 +msgid "Please select how the priority of each post should be calculated:" +msgstr "Vyberte prosím způsob, kterým má být priorita každého z příspěvků vypočítávána." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3331 +msgid "Do not use automatic priority calculation" +msgstr "Nepoužívat automatický výpočet priority" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3331 +msgid "All posts will have the same priority which is defined in "Priorities"" +msgstr "Všechny příspěvky budou mít stejnou prioritu, která je definována v "Prioritách"" + +msgid "Location of your sitemap file" +msgstr "Umístění vaší sitemapy" + +msgid "Automatic detection" +msgstr "Automatická detekce" + +msgid "Filename of the sitemap file" +msgstr "Jméno souboru sitemapy" + +msgid "Detected Path" +msgstr "Zjištěná cesta" + +msgid "Detected URL" +msgstr "Zjištěná URL" + +msgid "Custom location" +msgstr "Vlastní umístění" + +msgid "Absolute or relative path to the sitemap file, including name." +msgstr "Absolutní nebo relativní cesta k sitemapě, včetně jména souboru." + +msgid "Example" +msgstr "Příklad" + +msgid "Complete URL to the sitemap file, including name." +msgstr "Celá URL k sitemapě, včetně jména." + +msgid "Sitemap Content" +msgstr "Obsah sitemapy" + +msgid "Include homepage" +msgstr "Zahrnout titulní stránku" + +msgid "Include posts" +msgstr "Zahrnout příspěvky" + +msgid "Include static pages" +msgstr "Zahrnout statické stránky" + +msgid "Include categories" +msgstr "Zahrnout rubriky" + +msgid "Include archives" +msgstr "Zahrnout archivy" + +msgid "Include tag pages" +msgstr "Zahrnout stránky štítků" + +msgid "Include author pages" +msgstr "Zahrnout stránky autorů" + +msgid "Change frequencies" +msgstr "Nastavení frekvence" + +msgid "Please note that the value of this tag is considered a hint and not a command. Even though search engine crawlers consider this information when making decisions, they may crawl pages marked \"hourly\" less frequently than that, and they may crawl pages marked \"yearly\" more frequently than that. It is also likely that crawlers will periodically crawl pages marked \"never\" so that they can handle unexpected changes to those pages." +msgstr "Berte prosím na vědomí, že hodnota tohoto štítku je jen zvažována \"jako náznak\", není to příkaz. Přestože vyhledávací roboti berou při rozhodování tuto hodnotu na vědomí, přesto mohou navštěvovat stránky označené jako \"každou hodinu\" méně často, a také mohou stránky označené jako \"ročně\" navštěvovat častěji. Rovněž je pravděpodobné, že roboti budou naštěvovat i stránky označené jako \"nikdy\" aby se mohli vypořádat s nečekanými změnami na těchto stránkách." + +msgid "Homepage" +msgstr "Titulní stránka" + +msgid "Posts" +msgstr "Příspěvky" + +msgid "Static pages" +msgstr "Statické stránky" + +msgid "Categories" +msgstr "Rubriky" + +msgid "The current archive of this month (Should be the same like your homepage)" +msgstr "Stávající archiv tohoto měsíce (Měl by být stejný jako vaše titulní stránka)" + +msgid "Older archives (Changes only if you edit an old post)" +msgstr "Starší archivy (Mění se jen když upravíte starý příspěvek)" + +msgid "Tag pages" +msgstr "Stránky štítků" + +msgid "Author pages" +msgstr "Stránky autorů" + +msgid "Priorities" +msgstr "Priority" + +msgid "Posts (If auto calculation is disabled)" +msgstr "Příspěvky (Když je automatický výpočet vypnutý)" + +msgid "Minimum post priority (Even if auto calculation is enabled)" +msgstr "Minimální priorita příspěvku (I když je povolený automatický výpočet)" + +msgid "Archives" +msgstr "Archivy" + +msgid "Update options" +msgstr "Aktualizovat možnosti" + +msgid "Reset options" +msgstr "Vynulovat možnosti" + diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/lang/sitemap-da_DK.mo Binary file web/wp-content/plugins/google-sitemap-generator/lang/sitemap-da_DK.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/lang/sitemap-da_DK.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/google-sitemap-generator/lang/sitemap-da_DK.po Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,594 @@ +# [Countryname] Language File for sitemap (sitemap-[localname].po) +# Copyright (C) 2005 [name] : [URL] +# This file is distributed under the same license as the WordPress package. +# [name] <[mail-address]>, 2005. +# $Id: sitemap.pot 2502 2005-07-03 20:50:38Z arnee $ +# +msgid "" +msgstr "" +"Project-Id-Version: sitemap\n" +"Report-Msgid-Bugs-To: <[mail-address]>\n" +"POT-Creation-Date: 2005-06-15 00:00+0000\n" +"PO-Revision-Date: 2007-11-25 01:16+0100\n" +"Last-Translator: Arne Brachhold \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language-Team: \n" + +msgid "Comment Count" +msgstr "Antal kommentar" + +msgid "Uses the number of comments of the post to calculate the priority" +msgstr "Brug antallet af kommentarer til indlægget til at udregne prioriteten" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:918 +msgid "Comment Average" +msgstr "Kommentar gennemsnit" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:930 +msgid "Uses the average comment count to calculate the priority" +msgstr "Bruger det gennemsnitlige antal kommentarer til at udregne prioriteten" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:993 +msgid "Popularity Contest" +msgstr "Popularitets konkurrence" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:1005 +msgid "Uses the activated Popularity Contest Plugin from Alex King. See Settings and Most Popular Posts" +msgstr "Bruger det aktiveret Popularity Contest Plugin fra Alex King. Se indstillinger og Mest populære indlæg" + +msgid "XML-Sitemap Generator" +msgstr "XML-Sitemap Generator" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2415 +msgid "XML-Sitemap" +msgstr "XML-Sitemap" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2600 +msgid "Thank you very much for your donation. You help me to continue support and development of this plugin and other free software!" +msgstr "Mange tak for din donation. Du hjælper mig med at fortsætte support og udvikling af dette plugin og andet gratis software!" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2600 +msgid "Hide this notice" +msgstr "Skjul denne meddelelse" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2606 +#, php-format +msgid "Thanks for using this plugin! You've installed this plugin over a month ago. If it works and your are satisfied with the results, isn't it worth at least one dollar? Donations help me to continue support and development of this free software! Sure, no problem!" +msgstr "Tak fordi du bruger dette plugin! Du installerede dette plugin over en månede siden. Hvis det virker og du er tilfreds, er det så ikke bare en enkel dollar værd? Donationer hjælper mig med at fortsætte support og udvikling af dette gratis stykke software! Selvfølgelig, ingen problem!" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2606 +msgid "No thanks, please don't bug me anymore!" +msgstr "Nej tak, lad venligst være med at forstyrre mig igen!" + +msgid "XML Sitemap Generator for WordPress" +msgstr "XML-Sitemap Generator til Wordpress" + +msgid "Configuration updated" +msgstr "Indstillingerne blev opdateret" + +msgid "Error while saving options" +msgstr "Der forekom en fejl da indstilingerne skulle gemmes" + +msgid "Pages saved" +msgstr "Sider gemt" + +msgid "Error while saving pages" +msgstr "Der opstod en fejl da siderne skulle gemmes" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2748 +#, php-format +msgid "Robots.txt file saved" +msgstr "Robots.txt er gemt" + +msgid "Error while saving Robots.txt file" +msgstr "Der forekom en fejl da Robots.txt filen skulle gemmes" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2758 +msgid "The default configuration was restored." +msgstr "Standard indstillingerne er gendannet." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2851 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2868 +msgid "open" +msgstr "Åben" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2852 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2869 +msgid "close" +msgstr "Luk" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2853 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2870 +msgid "click-down and drag to move this box" +msgstr "tryk og træk for at flytte denne boks" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2854 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2871 +msgid "click to %toggle% this box" +msgstr "klik for at %toggle% denne boks" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2855 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2872 +msgid "use the arrow keys to move this box" +msgstr "brug piltasterne for at flytte denne boks" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2856 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2873 +msgid ", or press the enter key to %toggle% it" +msgstr ", eller tryk på enter tasten for at %toggle% den" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2884 +msgid "About this Plugin:" +msgstr "Om dette plugin:" + +msgid "Plugin Homepage" +msgstr "Plugin hjemmeside" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2887 +msgid "Notify List" +msgstr "Informer liste" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2888 +msgid "Support Forum" +msgstr "Support forum" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2889 +msgid "Donate with PayPal" +msgstr "Donere via PayPal" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2890 +msgid "My Amazon Wish List" +msgstr "Min Amazon ønskeliste" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2891 +msgid "translator_name" +msgstr "translator_name" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2891 +msgid "translator_url" +msgstr "translator_url" + +msgid "Sitemap Resources:" +msgstr "Sitemap ressourcer:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2897 +msgid "Webmaster Tools" +msgstr "Webmaster Tools" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2898 +msgid "Webmaster Blog" +msgstr "Webmaster Blog" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2900 +msgid "Site Explorer" +msgstr "Site Explorer" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2901 +msgid "Search Blog" +msgstr "Search Blog" + +msgid "Sitemaps Protocol" +msgstr "Sitemap protocol" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2904 +msgid "Official Sitemaps FAQ" +msgstr "Officiel Sitemap FAQ" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2905 +msgid "My Sitemaps FAQ" +msgstr "Dette Sitemaps FAQ" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2910 +msgid "Recent Donations:" +msgstr "Seneste donationer:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2914 +msgid "List of the donors" +msgstr "Liste over donationsgivere" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2916 +msgid "Hide this list" +msgstr "Skjul denne liste" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2919 +msgid "Thanks for your support!" +msgstr "Tak for din support!" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2931 +msgid "Status" +msgstr "Status" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2941 +#, php-format +msgid "The sitemap wasn't built yet. Click here to build it the first time." +msgstr "Dette Sitemap er ikke bygget endnu. Klik her for at bygge det for første gang." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2947 +msgid "Your sitemap was last built on %date%." +msgstr "Dit sitemap blev sidst bygget den %date%." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2949 +msgid "There was a problem writing your sitemap file. Make sure the file exists and is writable. Learn moreLær mere" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2956 +msgid "Your sitemap (zipped) was last built on %date%." +msgstr "Dit sitemap (gzipped) blev bygget sidst den %date%." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2958 +msgid "There was a problem writing your zipped sitemap file. Make sure the file exists and is writable. Learn moreLær mere" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2964 +msgid "Google was successfully notified about changes." +msgstr "Google blev informeret korrekt omkring ændringerne." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2967 +msgid "It took %time% seconds to notify Google, maybe you want to disable this feature to reduce the building time." +msgstr "Det tog %time% sekunder at informerer google, måske skulle du deaktivere denn funktion for at reducerer bygge tiden." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2970 +#, php-format +msgid "There was a problem while notifying Google. View result" +msgstr "Der opstod et problem under kommunikationen med Google. Se resultat" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2976 +msgid "YAHOO was successfully notified about changes." +msgstr "Yahoo blev informeret korrekt omkring ændringerne." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2979 +msgid "It took %time% seconds to notify YAHOO, maybe you want to disable this feature to reduce the building time." +msgstr "Det tog %time% sekunder at informerer Yahoo, måske skulle du deaktivere denn funktion for at reducerer bygge tiden." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2982 +#, php-format +msgid "There was a problem while notifying YAHOO. View result" +msgstr "Der opstod et problem under kommunikationen med YAHOO. Se resultat" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2988 +msgid "Ask.com was successfully notified about changes." +msgstr "Ask.com blev informeret korrekt omkring ændringerne." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2991 +msgid "It took %time% seconds to notify Ask.com, maybe you want to disable this feature to reduce the building time." +msgstr "Det tog %time% sekunder at informerer Ask.com, måske skulle du deaktivere denn funktion for at reducerer bygge tiden." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2994 +#, php-format +msgid "There was a problem while notifying Ask.com. View result" +msgstr "Der opstod et problem under kommunikationen med Ask.com. Se resultat" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3002 +msgid "The building process took about %time% seconds to complete and used %memory% MB of memory." +msgstr "Bygge processen tog omkring %time% sekunder for at fuldføre og bruge %memory% MB hukommelse." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3004 +msgid "The building process took about %time% seconds to complete." +msgstr "Bygge processen tog omkring %time% sekunder for at fuldføre." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3008 +msgid "The content of your sitemap didn't change since the last time so the files were not written and no search engine was pinged." +msgstr "Indholdet af dit sitemap har ikke ændret sig siden sidst. Derfor blev der ikke ikke skrevet til nogle filer og ikke kommunikeret med nogle søgemaskiner." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3012 +msgid "The last run didn't finish! Maybe you can raise the memory or time limit for PHP scripts. Learn more" +msgstr "Sidste forsøg blev ikke færdigt! Måske skal du hæve hukommelses begrænsningen for PHP scripts. Lær mere" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3014 +msgid "The last known memory usage of the script was %memused%MB, the limit of your server is %memlimit%." +msgstr "Det sidst kendte forbrug af hukommelse af dette script var %memused%MB, begrænsningen på din server er %memlimit%." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3018 +msgid "The last known execution time of the script was %timeused% seconds, the limit of your server is %timelimit% seconds." +msgstr "Den sidste kendte eksekverings tid for dette script var %timeused% sekunder, begrænsningen på din server er %timelimit% sekunder." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3022 +msgid "The script stopped around post number %lastpost% (+/- 100)" +msgstr "Scriptet stoppede omkring indlæg nummer %lastpost% (+/-100)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3025 +#, php-format +msgid "If you changed something on your server or blog, you should rebuild the sitemap manually." +msgstr "Hvis du ændre noget på din server eller blog, burde du opdatere dit sitemap manuelt." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3027 +#, php-format +msgid "If you encounter any problems with the build process you can use the debug function to get more information." +msgstr "Hvis du støder på problemer under bygge processen, kan du bruge debug funktionen for at få flere informationer." + +msgid "Basic Options" +msgstr "Basis indstillinger" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3044 +msgid "Sitemap files:" +msgstr "Sitemap filer:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3044 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3059 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3079 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3104 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3121 +msgid "Learn more" +msgstr "Lær mere" + +msgid "Write a normal XML file (your filename)" +msgstr "Lav en normal XML fil (Dit filnavn)" + +msgid "Write a gzipped file (your filename + .gz)" +msgstr "Lav en gzipped fil (Dit filnavn + .gz" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3059 +msgid "Building mode:" +msgstr "Bygge metode:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3064 +msgid "Rebuild sitemap if you change the content of your blog" +msgstr "Opdater dit sitemap hvis der sker ændringer i indholdet på din blog" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3071 +msgid "Enable manual sitemap building via GET Request" +msgstr "Aktiverer manuel bygning af sitemap via GET Request" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3075 +msgid "This will allow you to refresh your sitemap if an external tool wrote into the WordPress database without using the WordPress API. Use the following URL to start the process: %1 Please check the logfile above to see if sitemap was successfully built." +msgstr "Dette vil tillade dig at opdatere dit sitemap hvis et eksternt værktøj skrev til Wordpress databasen uden at bruge Wordpress API'et. Brug følgende URL til at starte processen: %1 Tjek venligst logfilen ovenover, for at se om dit sitemap blev bygget korrekt." + +msgid "Update notification:" +msgstr "Opdaterings meddelelser:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3083 +msgid "Notify Google about updates of your Blog" +msgstr "Informer Google om opdateringer på din blog" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3084 +#, php-format +msgid "No registration required, but you can join the Google Webmaster Tools to check crawling statistics." +msgstr "Registrering er ikke påkrævet, men du kan tilmelde dig Google Webmaster Tools for at tjekke \"crawling\" statistikker." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3088 +msgid "Notify Ask.com about updates of your Blog" +msgstr "Informer Ask.com om opdateringer på din blog" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3089 +msgid "No registration required." +msgstr "Registrering ikke påkrævet." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3093 +msgid "Notify YAHOO about updates of your Blog" +msgstr "Informer Yahoo om opdateringer på din blog" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3094 +#, php-format +msgid "No registration required, but you can sign up for the YAHOO Site Explorer to view the crawling progress." +msgstr "Registrering er ikke påkrævet, men du kan tilmelde dig YAHOO Site Explorer for at tjekke \"crawling\" statistikker." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3099 +#, php-format +msgid "Modify or create %s file in blog root which contains the sitemap location." +msgstr "Ændre eller opret %s i blog \"root\", som indeholder sitemap placeringen." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3102 +msgid "File permissions: " +msgstr "Fil rettigheder: " + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3107 +msgid "OK, robots.txt is writable." +msgstr "OK, robots.txt er skrivbar." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3109 +msgid "Error, robots.txt is not writable." +msgstr "Fejl, robots.txt er ikke skrivbar." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3113 +msgid "OK, robots.txt doesn't exist but the directory is writable." +msgstr "OK, robots.txt eksisterer ikke, men mappen er skrivbar." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3115 +msgid "Error, robots.txt doesn't exist and the directory is not writable" +msgstr "Fejl, robots.txt eksisterer ikke og mappen er ikke skrivbar." + +msgid "Advanced options:" +msgstr "Avanceret indstillinger" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3124 +msgid "Limit the number of posts in the sitemap:" +msgstr "Begræns antallet af indlæg i dit sitemap:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3124 +msgid "Newer posts will be included first" +msgstr "Nyeste indlæg vil blive inkluderet først" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3127 +msgid "Try to increase the memory limit to:" +msgstr "Prøv at forøg hukommelses begrænsningen til:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3127 +msgid "e.g. \"4M\", \"16M\"" +msgstr "f.eks. \"4M\", \"16M\"" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3130 +msgid "Try to increase the execution time limit to:" +msgstr "Prøv at forøg eksekverings tids begrænsningen til:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3130 +msgid "in seconds, e.g. \"60\" or \"0\" for unlimited" +msgstr "i sekunder, f.eks. \"60\" eller \"0\" for ubegrænset" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3133 +msgid "Include a XSLT stylesheet:" +msgstr "Inkluderer et XSLT stylesheet:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3133 +msgid "Use Default" +msgstr "Brug standard" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3133 +msgid "Full or relative URL to your .xsl file" +msgstr "Fuld eller relativ URL til din .xsl fil" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3152 +msgid "Enable MySQL standard mode. Use this only if you're getting MySQL errors. (Needs much more memory!)" +msgstr "Aktiver MySQL standard mode. Brug kun dette hvis du får MySQL fejl. (Bruger meget mere hukommelse!)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3166 +msgid "Build the sitemap in a background process (You don't have to wait when you save a post)" +msgstr "Byg dit sitemap i en baggrundsprocess (Du behøver ikke at vente når du gemmer et indlæg)" + +msgid "Additional pages" +msgstr "Ekstra sider" + +msgid "Here you can specify files or URLs which should be included in the sitemap, but do not belong to your Blog/WordPress.
    For example, if your domain is www.foo.com and your blog is located on www.foo.com/blog you might want to include your homepage at www.foo.com" +msgstr "Her kan du specificere filer og URLs, der skal inkluderes i dit sitemap, som ikke tilhører din side.
    F.eks. hvis dit domæne er www.minside.dk og din side er placeret i en under mappe (www.minside.dk/blog), så vil du måske inkludere www.minside.dk" + +msgid "Note" +msgstr "Note" + +msgid "If your blog is in a subdirectory and you want to add pages which are NOT in the blog directory or beneath, you MUST place your sitemap file in the root directory (Look at the "Location of your sitemap file" section on this page)!" +msgstr "Hvis din blog er i en undermappe og du vil tilføje sider, som IKKE er i blog mappen eller en mappe under, SKAL du placerer din sitemap fil i "root mappen" (Se "Stien til din sitemap fil" sektionen på denne side)." + +msgid "URL to the page" +msgstr "URL til siden" + +msgid "Enter the URL to the page. Examples: http://www.foo.com/index.html or www.foo.com/home " +msgstr "Indtast URL'en til siden. F.eks.: http://www.minside.dk/index.html ellerhttp://www.minside.dk/forside" + +msgid "Priority" +msgstr "Prioritet" + +msgid "Choose the priority of the page relative to the other pages. For example, your homepage might have a higher priority than your imprint." +msgstr "Vælg sidens prioritet i forhold til de andre sider." + +msgid "Last Changed" +msgstr "Ændret sidst" + +msgid "Enter the date of the last change as YYYY-MM-DD (2005-12-31 for example) (optional)." +msgstr "Indtast datoen for den sidste ændret, som YYYY-MM-DD (F.eks. 2005-12-31) (Valgfri)" + +msgid "Change Frequency" +msgstr "Skift frekvens" + +msgid "#" +msgstr "#" + +msgid "No pages defined." +msgstr "Ingen sider defineret" + +msgid "Add new page" +msgstr "Tilføj ny side" + +msgid "Post Priority" +msgstr "Indlægs prioritet" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3329 +msgid "Please select how the priority of each post should be calculated:" +msgstr "Vælg venligst hvordan prioriteten af hver enkelt indlæg skal udregnes:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3331 +msgid "Do not use automatic priority calculation" +msgstr "Brug ikke automatisk prioritets udregning" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3331 +msgid "All posts will have the same priority which is defined in "Priorities"" +msgstr "Alle indlæg vil have den samme prioritet som er defineret under "Prioritet"" + +msgid "Location of your sitemap file" +msgstr "Stien til din sitemap fil" + +msgid "Automatic detection" +msgstr "Find Automatisk " + +msgid "Filename of the sitemap file" +msgstr "Sitemap filnavn" + +msgid "Detected Path" +msgstr "Fundet sti" + +msgid "Detected URL" +msgstr "Fundet URL" + +msgid "Custom location" +msgstr "Brugerdefineret sti" + +msgid "Absolute or relative path to the sitemap file, including name." +msgstr "Absolut eller relativ sti til sitemap filen, inklusiv filnavn." + +msgid "Example" +msgstr "Eksempel" + +msgid "Complete URL to the sitemap file, including name." +msgstr "Fuldstændig URL til sitemap filen, inklusiv filnavn" + +msgid "Sitemap Content" +msgstr "Sitemap indhold" + +msgid "Include homepage" +msgstr "Inkluder hjemmeside" + +msgid "Include posts" +msgstr "Inkluder indlæg" + +msgid "Include static pages" +msgstr "Inkluder statiske sider" + +msgid "Include categories" +msgstr "Inkluder kategorier" + +msgid "Include archives" +msgstr "Inkluder arkiver" + +msgid "Include tag pages" +msgstr "Inkluder tag sider" + +msgid "Include author pages" +msgstr "Inkluder forfatter sider" + +msgid "Change frequencies" +msgstr "Ændre frekvenser" + +msgid "Please note that the value of this tag is considered a hint and not a command. Even though search engine crawlers consider this information when making decisions, they may crawl pages marked \"hourly\" less frequently than that, and they may crawl pages marked \"yearly\" more frequently than that. It is also likely that crawlers will periodically crawl pages marked \"never\" so that they can handle unexpected changes to those pages." +msgstr "Bemærk venligst at værdien af dette \"tag\" anses for at være et hint og ikke en kommando. Selvom søgemaskine crawlers tager denne information i betrægtning, kan de crawle sider markeret \"pr. time\" færre gange og sider markeret \"årlig\" oftere. Det er også sandsynligt at crawlere periodisk vil crawle sider makeret \"aldrig\", så de kan håndtere uforventet ændringer på disse sider." + +msgid "Homepage" +msgstr "Hjemmeside" + +msgid "Posts" +msgstr "Indlæg" + +msgid "Static pages" +msgstr "Statiske sider" + +msgid "Categories" +msgstr "Kategorier" + +msgid "The current archive of this month (Should be the same like your homepage)" +msgstr "Arkivet for denne måned (Burde være den som på din hjemmeside)" + +msgid "Older archives (Changes only if you edit an old post)" +msgstr "Ældre arkiver (Ændre sig kun hvis du redigere et gammelt indlæg" + +msgid "Tag pages" +msgstr "Tag sider" + +msgid "Author pages" +msgstr "Forfatter sider" + +msgid "Priorities" +msgstr "Prioriteter" + +msgid "Posts (If auto calculation is disabled)" +msgstr "Indlæg (Hvis auto-udregn er deaktiveret)" + +msgid "Minimum post priority (Even if auto calculation is enabled)" +msgstr "Minimum indlægs prioritet (Selvom auto-udregn er aktiveret)" + +msgid "Archives" +msgstr "Arkiver" + +msgid "Update options" +msgstr "Opdater indstillinger" + +msgid "Reset options" +msgstr "Nulstil indstillinger" + diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/lang/sitemap-de_DE.mo Binary file web/wp-content/plugins/google-sitemap-generator/lang/sitemap-de_DE.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/lang/sitemap-de_DE.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/google-sitemap-generator/lang/sitemap-de_DE.po Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,917 @@ +msgid "" +msgstr "" +"Project-Id-Version: sitemap\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-11-20 22:53+0100\n" +"PO-Revision-Date: 2009-11-20 22:54+0100\n" +"Last-Translator: Arne Brachhold\n" +"Language-Team: Arne Brachhold \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" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:525 +msgid "Comment Count" +msgstr "Anzahl der Kommentare" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:537 +msgid "Uses the number of comments of the post to calculate the priority" +msgstr "Verwendet die Anzahl der Kommentare um die Priorität der Beiträge zu berechnen" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:597 +msgid "Comment Average" +msgstr "Durchschnittliche Anzahl der Kommentare" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:609 +msgid "Uses the average comment count to calculate the priority" +msgstr "Verwendet die durchschnittliche Anzahl der Kommentare um die Priorität der Beiträge zu berechnen." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:672 +msgid "Popularity Contest" +msgstr "Popularity Contest" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:684 +msgid "Uses the activated Popularity Contest Plugin from Alex King. See Settings and Most Popular Posts" +msgstr "Verwendet das aktivierte Popularity Contest Plugin von Alex King. Siehe Einstellungen und wichtigste Beiträge" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-core.php:1118 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:1084 +msgid "Always" +msgstr "Immer" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-core.php:1119 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:1085 +msgid "Hourly" +msgstr "Stündlich" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-core.php:1120 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:1086 +msgid "Daily" +msgstr "Täglich" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-core.php:1121 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:1087 +msgid "Weekly" +msgstr "Wöchentlich" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-core.php:1122 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:1088 +msgid "Monthly" +msgstr "Monatlich" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-core.php:1123 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:1089 +msgid "Yearly" +msgstr "Jährlich" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-core.php:1124 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:1090 +msgid "Never" +msgstr "Nie" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:107 +msgid "Thank you very much for your donation. You help me to continue support and development of this plugin and other free software!" +msgstr "Vielen Dank für Deine Spende! Du hilfst mir damit diese kostenlose Software zu unterstützen und weiterzuentwickeln!" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:107 +msgid "Hide this notice" +msgstr "Diesen Hinweis verstecken" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:113 +#, php-format +msgid "Thanks for using this plugin! You've installed this plugin over a month ago. If it works and you are satisfied with the results, isn't it worth at least a few dollar? Donations help me to continue support and development of this free software! Sure, no problem!" +msgstr "Danke dass Du dieses Plugin benutzt! Du hast dieses Plugin vor mehr als einem Monat installiert. Wenn es funktioniert und zu mit dem Ergebnis zufrieden bist, ist es nicht mindestens ein paar Euro Wert? Spenden helfen mir diese kostenlose Software zu unterstützen und weiterzuentwickeln! Klar, kein Problem! " + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:113 +msgid "Sure, but I already did!" +msgstr "Klar, hab ich schon gemacht!" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:113 +msgid "No thanks, please don't bug me anymore!" +msgstr "Nein danke, bitte nicht mehr nerven! " + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:120 +#, php-format +msgid "Thanks for using this plugin! You've installed this plugin some time ago. If it works and your are satisfied, why not rate it and recommend it to others? :-)" +msgstr "Danke dass Du dieses Plugin benutzt! Du hast dieses Plugin vor mehr als einem Monat installiert. Wenn es funktioniert und zu mit dem Ergebnis zufrieden bist, würde ich mich freuen wenn Du es bewerten und weiterempfehlen würdest." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:120 +msgid "Don't show this anymore" +msgstr "Diesen Hinweis nicht mehr zeigen" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:67 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:132 +msgid "Your sitemap is being refreshed at the moment. Depending on your blog size this might take some time!" +msgstr "Die Sietemap wird im Moment neu erzeugt. Abhängig von der Anzahl Ihrer Beiträge kann dies einige Sekunden dauern. " + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:69 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:134 +#, php-format +msgid "Your sitemap will be refreshed in %s seconds. Depending on your blog size this might take some time!" +msgstr "Die Sietemap wird in %s Sekunden neu erzeugt. Abhängig von der Anzahl Ihrer Beiträge kann dies einige Sekunden dauern." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:163 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:480 +msgid "XML Sitemap Generator for WordPress" +msgstr "XML Sitemap Generator für WordPress" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:323 +msgid "Configuration updated" +msgstr "Die Konfiguration wurde gespeichert." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:324 +msgid "Error while saving options" +msgstr "Beim Speichern der Seiten ist ein Fehler aufgetreten" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:326 +msgid "Pages saved" +msgstr "Ihre Seiten wurden gespeichert." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:327 +msgid "Error while saving pages" +msgstr "Beim Speichern der Seiten ist ein Fehler aufgetreten" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:334 +msgid "The default configuration was restored." +msgstr "Die Standard Konfiguration wurde wieder hergestellt." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:374 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:496 +#, php-format +msgid "There is a new version of %1$s available. Download version %3$s here." +msgstr "Es gibt eine Version von %1$s. Version %3$s hier downloaden." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:376 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:498 +#, php-format +msgid "There is a new version of %1$s available. Download version %3$s here automatic upgrade unavailable for this plugin." +msgstr "Es gibt eine Version von %1$s. Version %3$s hier downloaden Automatisches Upgraden ist für dieses Plugin nicht möglich." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:378 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:500 +#, php-format +msgid "There is a new version of %1$s available. Download version %3$s here or upgrade automatically." +msgstr "Es gibt eine Version von %1$s. Version %3$s hier downloaden oder automatisch upgraden." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:508 +#, php-format +msgid "Your blog is currently blocking search engines! Visit the privacy settings to change this." +msgstr "Dein Blog blockiert zur Zeit Suchmaschienen! Unter den Eistellungen zur Privatsphäre lässt sich dies ändern." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:529 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:546 +msgid "open" +msgstr "öffnen" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:530 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:547 +msgid "close" +msgstr "schließen" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:531 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:548 +msgid "click-down and drag to move this box" +msgstr "Klicken und ziehen um diese Box zu verschieben" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:532 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:549 +msgid "click to %toggle% this box" +msgstr "Klicken um diese box zu %toggle%" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:533 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:550 +msgid "use the arrow keys to move this box" +msgstr "Benutze die Pfeiltaste um diese box zu verschieben" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:534 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:551 +msgid ", or press the enter key to %toggle% it" +msgstr ", oder drück Enter um sie zu %toggle%" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:580 +msgid "About this Plugin:" +msgstr "Über dieses Plugin:" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:581 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap.php:181 +msgid "Plugin Homepage" +msgstr "Plugin Startseite" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:421 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:582 +msgid "Suggest a Feature" +msgstr "Funktion vorschlagen" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:583 +msgid "Notify List" +msgstr "E-Mail bei Update" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:584 +msgid "Support Forum" +msgstr "Hilfe Forum" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:424 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:585 +msgid "Report a Bug" +msgstr "Fehler berichten" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:587 +msgid "Donate with PayPal" +msgstr "Mit PayPal spenden" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:588 +msgid "My Amazon Wish List" +msgstr "Amazon Wunschliste" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:589 +msgid "translator_name" +msgstr "" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:589 +msgid "translator_url" +msgstr "" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:593 +msgid "Sitemap Resources:" +msgstr "Sitemap Informationen" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:594 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:600 +msgid "Webmaster Tools" +msgstr "Webmaster Tools" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:595 +msgid "Webmaster Blog" +msgstr "Webmaster Blog" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:597 +msgid "Site Explorer" +msgstr "Site Explorer" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:598 +msgid "Search Blog" +msgstr "Search Blog" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:601 +msgid "Webmaster Center Blog" +msgstr "Webmaster Center Blog" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:603 +msgid "Sitemaps Protocol" +msgstr "Sitemaps Protokoll" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:604 +msgid "Official Sitemaps FAQ" +msgstr "Offizielle Sitemaps FAQ" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:605 +msgid "My Sitemaps FAQ" +msgstr "Meine Sitemaps FAQ" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:608 +msgid "Recent Donations:" +msgstr "Aktuelle Spenden:" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:611 +msgid "List of the donors" +msgstr "Liste der Spender" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:613 +msgid "Hide this list" +msgstr "Liste ausblenden" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:616 +msgid "Thanks for your support!" +msgstr "Danke für Deine Unterstützung!" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:638 +msgid "The sitemap wasn't generated yet." +msgstr "Die Sitemap wurde bisher noch nicht erzeugt." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:641 +msgid "Result of the last build process, started on %date%." +msgstr "Ergebnisse der letzten Sitemap Generierung, gestartet am %date%." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:650 +#, php-format +msgid "The sitemap wasn't built yet. Click here to build it the first time." +msgstr "Die Sitemap wurde noch nicht erstellt. Klick hier um sie das erste mal zu erstellen." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:656 +msgid "Your sitemap was last built on %date%." +msgstr "Deine Sitemap wurde zuletzt am %date% erstellt." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:657 +msgid "The last build succeeded, but the file was deleted later or can't be accessed anymore. Did you move your blog to another server or domain?" +msgstr "Die letzte Sitemap wurde erzeugt, jedoch kann sie nicht mehr gelesen werden oder wurde gelöscht. Haben Sie das Blog auf einen anderen Server verschoben?" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:659 +#, fuzzy +msgid "There was a problem writing your sitemap file. Make sure the file exists and is writable. Learn more" +msgstr "Leider gab es ein Problem beim Schreiben der Sitemap. Bitte vergewisser dich dass die Datei exisitert und beschreibbar ist. Mehr infoszipped) was last built on %date%." +msgstr "Deine Sitemap (gezippt) wurde zuletzt am %date% erstellt." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:667 +msgid "The last zipped build succeeded, but the file was deleted later or can't be accessed anymore. Did you move your blog to another server or domain?" +msgstr "Die letzte gezippte Sitemap wurde erzeugt, jedoch kann sie nicht mehr gelesen werden oder wurde gelöscht. Haben Sie das Blog auf einen anderen Server verschoben?" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:669 +#, fuzzy +msgid "There was a problem writing your zipped sitemap file. Make sure the file exists and is writable. Learn more" +msgstr "Leider gab es ein Problem beim Schreiben der gezippten Sitemap. Bitte vergewisser dich dass die Datei exisitert und beschreibbar ist. Mehr infossuccessfully notified about changes." +msgstr "Google wurde erfolgreich über die Änderungen benachrichtigt." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:678 +msgid "It took %time% seconds to notify Google, maybe you want to disable this feature to reduce the building time." +msgstr "Es hat %time% Sekunden gedauert Google zu benachrichtigen. Vielleicht möchtest Du dieses Feature deaktivieren um die Dauer der Sitemap-Generierung zu verkürzen?" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:681 +#, php-format +msgid "There was a problem while notifying Google. View result" +msgstr "Leider gab es beim Versuch Google zu benachrichtigen ein Problem. Ergebnis anzeigen" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:687 +msgid "YAHOO was successfully notified about changes." +msgstr "YAHOO wurde erfolgreich über die Änderungen benachrichtigt." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:690 +msgid "It took %time% seconds to notify YAHOO, maybe you want to disable this feature to reduce the building time." +msgstr "Es hat %time% Sekunden gedauert YAHOO zu benachrichtigen. Vielleicht möchtest Du dieses Feature deaktivieren um die Dauer der Sitemap-Generierung zu verkürzen?" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:693 +#, php-format +msgid "There was a problem while notifying YAHOO. View result" +msgstr "Leider gab es beim Versuch YAHOO zu benachrichtigen ein Problem. Ergebnis anzeigen" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:699 +msgid "Bing was successfully notified about changes." +msgstr "Bing wurde erfolgreich über die Änderungen benachrichtigt." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:702 +msgid "It took %time% seconds to notify Bing, maybe you want to disable this feature to reduce the building time." +msgstr "Es hat %time% Sekunden gedauert Bing zu benachrichtigen. Vielleicht möchtest Du dieses Feature deaktivieren um die Dauer der Sitemap-Generierung zu verkürzen?" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:705 +#, php-format +msgid "There was a problem while notifying Bing. View result" +msgstr "Leider gab es beim Versuch Bing zu benachrichtigen ein Problem. Ergebnis anzeigen" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:711 +msgid "Ask.com was successfully notified about changes." +msgstr "Ask.com wurde erfolgreich über die Änderungen benachrichtigt." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:714 +msgid "It took %time% seconds to notify Ask.com, maybe you want to disable this feature to reduce the building time." +msgstr "Es hat %time% Sekunden gedauert Ask.com zu benachrichtigen. Vielleicht möchtest Du dieses Feature deaktivieren um die Dauer der Sitemap-Generierung zu verkürzen?" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:717 +#, php-format +msgid "There was a problem while notifying Ask.com. View result" +msgstr "Leider gab es beim Versuch Ask.com zu benachrichtigen ein Problem. Ergebnis anzeigen" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:725 +msgid "The building process took about %time% seconds to complete and used %memory% MB of memory." +msgstr "Die Sitemap-Generierung dauerte %time% sekunden und verwendete %memory% MB Speicher." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:727 +msgid "The building process took about %time% seconds to complete." +msgstr "Die Sitemap-Generierung dauerte %time% sekunden." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:731 +msgid "The content of your sitemap didn't change since the last time so the files were not written and no search engine was pinged." +msgstr "Die Inhalte der Sitemap haben sich nicht geändert seit dem letzten mal, daher wurden keine Dateien geschrieben oder Suchmaschinen informiert." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:586 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:739 +msgid "The building process might still be active! Reload the page in a few seconds and check if something has changed." +msgstr "Das Erstellen der Sitemap dauert eventuell noch. Laden Sie diese Seite in ein paar Sekunden neu und prüfen Sie ob sich der Status geändert hat." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:742 +msgid "The last run didn't finish! Maybe you can raise the memory or time limit for PHP scripts. Learn more" +msgstr "Die letzte Generierung der Sitemap wurde nicht abgeschlossen. Eventuell hilft es das Speicherlimit für PHP Skripte zu erhöhen. Mehr Infos" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:744 +msgid "The last known memory usage of the script was %memused%MB, the limit of your server is %memlimit%." +msgstr "Der zuletzt bekannte Speicherverauch lag bei %memused%MB, das Limit für PHP Skripte ist %memlimit%." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:748 +msgid "The last known execution time of the script was %timeused% seconds, the limit of your server is %timelimit% seconds." +msgstr "Die zuletzt bekannte Ausührungszeit lag bei %timeused% Sekunden, das Limit für PHP Skripe ist %timelimit% Sekunden." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:752 +msgid "The script stopped around post number %lastpost% (+/- 100)" +msgstr "Das Script hat bei dem %lastpost% Beitrag abgebrochen. (+/- 100)" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:755 +#, php-format +msgid "If you changed something on your server or blog, you should rebuild the sitemap manually." +msgstr "Falls Du etwas am Server oder am Blog geändert hast, solltest Du die Sitemap von Hand neu erstellen." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:757 +#, php-format +msgid "If you encounter any problems with the build process you can use the debug function to get more information." +msgstr "Falls es beim Generieren der Sitemap Probleme gibt, kannst Du die Debug Funktion verwenden um mehr über die auftretenden Fehler zu erfahren." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:764 +msgid "Basic Options" +msgstr "Allgemeine Einstellungen" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:766 +msgid "Sitemap files:" +msgstr "Sitemap Dateien:" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:766 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:781 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:801 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:834 +msgid "Learn more" +msgstr "Mehr Infos" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:771 +msgid "Write a normal XML file (your filename)" +msgstr "Sitemap als XML Datei erzeugen" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:777 +msgid "Write a gzipped file (your filename + .gz)" +msgstr "Gezippte Sitemap erzeugen (Dateiname + .gz)" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:781 +msgid "Building mode:" +msgstr "Erstellungsmodus:" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:786 +msgid "Rebuild sitemap if you change the content of your blog" +msgstr "Sitemap neu generieren wenn Du den Inhalt Deines Blogs änderst" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:793 +msgid "Enable manual sitemap building via GET Request" +msgstr "Manuelles Generieren der Sitemap über GET Anfrage erlauben" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:797 +#, fuzzy +msgid "This will allow you to refresh your sitemap if an external tool wrote into the WordPress database without using the WordPress API. Use the following URL to start the process: %1 Please check the result box above to see if sitemap was successfully built." +msgstr "Dies erlaubt Dir die Sitemao zu aktualisieren falls ein externes Programm in die WordPress Datenbank geschrieben hat ohne die API zu verwenden. Verwende folgende URL um die Generierung zu starten: %1 Bitte überpüf die Logdatei um zu sehen ob die Generirung erfolgreich war." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:801 +msgid "Update notification:" +msgstr "Benachrichtigung über Änderungen" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:805 +msgid "Notify Google about updates of your Blog" +msgstr "Google über Änderungen benachrichtigen" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:806 +#, php-format +msgid "No registration required, but you can join the Google Webmaster Tools to check crawling statistics." +msgstr "Keine Registrierung erforderlich, aber Du kannst Dich bei den Google Webmaster Tools anmelden um Indexierungs-Statistiken zu Deiner Website zu sehen." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:810 +msgid "Notify Bing (formerly MSN Live Search) about updates of your Blog" +msgstr "Bing (vormals MSN Live Search) über Änderungen benachrichtigen" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:811 +#, php-format +msgid "No registration required, but you can join the Bing Webmaster Tools to check crawling statistics." +msgstr "Keine Registrierung erforderlich, aber Du kannst Dich bei den Bing Webmaster Tools anmelden um Indexierungs-Statistiken zu Deiner Website zu sehen." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:815 +msgid "Notify Ask.com about updates of your Blog" +msgstr "Ask.com über Änderungen benachrichtigen" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:816 +msgid "No registration required." +msgstr "Keine Registrierung erforderlich" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:820 +msgid "Notify YAHOO about updates of your Blog" +msgstr "YAHOO über Änderungen benachrichtigen" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3154 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:821 +msgid "Your Application ID:" +msgstr "Deine Application ID:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3155 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:822 +#, php-format +msgid "Don't you have such a key? Request one here! %s2" +msgstr "Noch keinen Key? Hier beantragen! %s2" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:827 +msgid "Add sitemap URL to the virtual robots.txt file." +msgstr "Die Sitemap zur virtuellen robots hinzufügen." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:831 +msgid "The virtual robots.txt generated by WordPress is used. A real robots.txt file must NOT exist in the blog directory!" +msgstr "Es wird die von WordPress generierte virtuelle robots.txt verwendet. Es dark keine robots.txt Datei im Blog Verzeichnis liegen!" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:834 +msgid "Advanced options:" +msgstr "Erweiterte Einstellungen" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:837 +msgid "Limit the number of posts in the sitemap:" +msgstr "Die Anzahl der Beiträge in der Sitemap beschränken auf:" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:837 +msgid "Newer posts will be included first" +msgstr "Neuere Beiträge kommen zuerst" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:840 +msgid "Try to increase the memory limit to:" +msgstr "Versuchen das Speicherlimit zu erhöhen auf: " + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:840 +msgid "e.g. \"4M\", \"16M\"" +msgstr "z.B. \"4M\", \"16M\"" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:843 +msgid "Try to increase the execution time limit to:" +msgstr "Veruschen das Zeit Limit zu erhöhen auf: " + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:843 +msgid "in seconds, e.g. \"60\" or \"0\" for unlimited" +msgstr "in Sekunden, z.B. \"60\" oder \"0\" for unendlich" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:847 +msgid "Include a XSLT stylesheet:" +msgstr "Ein XSLT Stylesheet einbinden:" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:848 +msgid "Full or relative URL to your .xsl file" +msgstr "Kompletter oder relativer Pfad zur .xsl Datei" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:848 +#, fuzzy +msgid "Use default" +msgstr "Standard verwenden" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3152 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:854 +msgid "Enable MySQL standard mode. Use this only if you're getting MySQL errors. (Needs much more memory!)" +msgstr "MySQL Standard Modus aktivieren. Benutze diesen nur falls MySQL Fehler auftreten. (Benötigt mehr Speicher!)" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:855 +msgid "Upgrade WordPress at least to 2.2 to enable the faster MySQL access" +msgstr "Updatete WordPress auf 2.2 um den schnelleren MySQL Modus zu aktiviren" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3166 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:862 +msgid "Build the sitemap in a background process (You don't have to wait when you save a post)" +msgstr "Die Sitemap in einem Background-Process erstellen (Keine Verzögerung nach dem Speichern von Posts)" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:863 +msgid "Upgrade WordPress at least to 2.1 to enable background building" +msgstr "Updatete WordPress auf 2.1 um das Erstellen im Hintergrund zu aktivieren." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:870 +msgid "Additional pages" +msgstr "Zusätzliche Seiten" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:873 +msgid "Here you can specify files or URLs which should be included in the sitemap, but do not belong to your Blog/WordPress.
    For example, if your domain is www.foo.com and your blog is located on www.foo.com/blog you might want to include your homepage at www.foo.com" +msgstr "Hier können Sie zusätzliche Seiten in Form von URLs angeben, welche mit in Ihre Sitemap aufgenommen werden sollen aber nicht von WordPress erzeugt werden. Falls Sie z.B. Ihre Homepage auf www.beispiel.com haben, Ihr Blog aber unter www.beispiel.com/blog zu erreichen ist, tragen Sie Ihre Homepage als http://www.beispiel.com hier ein." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:875 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1083 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1097 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1106 +msgid "Note" +msgstr "Hinweis" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:876 +msgid "If your blog is in a subdirectory and you want to add pages which are NOT in the blog directory or beneath, you MUST place your sitemap file in the root directory (Look at the "Location of your sitemap file" section on this page)!" +msgstr "Falls Dein Blog in einem Unterverzeichnis liegt und Du Seiten hinzufügen möchtest die nicht in deinem Blogverzeichnis oder einem tieferen Verzeichnis liegen, musst Du seine Seite ins Stammverzeichnis legen. (Schau Dir den Punkt "Pfad zur Sitemap Datei" weiter unten an)!" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:878 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:917 +msgid "URL to the page" +msgstr "URL zur Seite" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:879 +msgid "Enter the URL to the page. Examples: http://www.foo.com/index.html or www.foo.com/home " +msgstr "Geben Sie hier die URL Ihrer Seite an. Beispiele: www.foo.com oder http://www.nic.de/index.html" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:881 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:918 +msgid "Priority" +msgstr "Priorität" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:882 +msgid "Choose the priority of the page relative to the other pages. For example, your homepage might have a higher priority than your imprint." +msgstr "Wählen Sie hier die Priorität der Seite relativ zu den anderen Seiten. Ihre Homepage könnte z.B. eine höhere Priorität besitzen als das Impressum. " + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:884 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:920 +msgid "Last Changed" +msgstr "Letzte Änderung" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:885 +msgid "Enter the date of the last change as YYYY-MM-DD (2005-12-31 for example) (optional)." +msgstr "Tragen Sie hier das Datum der letzten Änderung im Format JJJJ-MM-TT (z.B. 2005-12-31). Dieses Feld ist optional und muss nicht ausgefüllt werden." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:919 +msgid "Change Frequency" +msgstr "Änderungshäufigkeit" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:921 +msgid "#" +msgstr "#" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:926 +msgid "No pages defined." +msgstr "Bisher keine Seiten eingetragen." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:931 +msgid "Add new page" +msgstr "Neue Seite hinzufügen" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:936 +msgid "Post Priority" +msgstr "Priorität der Beiträge" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:938 +msgid "Please select how the priority of each post should be calculated:" +msgstr "Bitte wähle wie die Priorität der einzelnen Beiträge berechnet werden soll." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:940 +msgid "Do not use automatic priority calculation" +msgstr "Keine automatische Prioritätsberechung verwenden" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:940 +msgid "All posts will have the same priority which is defined in "Priorities"" +msgstr "Alle Beiträge haben die selbe Priorität wlche unter "Prioriäten" eingestellt ist." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:951 +msgid "Location of your sitemap file" +msgstr "Pfad der Sitemap Datei" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:954 +msgid "Automatic detection" +msgstr "Automatische Erkennung" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:958 +msgid "Filename of the sitemap file" +msgstr "Dateiname der Sitemap" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:961 +msgid "Detected Path" +msgstr "Erkenater Pfad" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:961 +msgid "Detected URL" +msgstr "Erkannte URL" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:966 +msgid "Custom location" +msgstr "Eigener Pfad" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:970 +msgid "Absolute or relative path to the sitemap file, including name." +msgstr "Absoluter oder relativer Pfad zur Sitemap Datei inkl. Dateinamen." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:972 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:981 +msgid "Example" +msgstr "Beispiel" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:979 +msgid "Complete URL to the sitemap file, including name." +msgstr "Absolute URL zur Sitemap Datei inkl. Dateinamen." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:992 +msgid "Sitemap Content" +msgstr "Inhalt der Sitemap" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:998 +msgid "Include homepage" +msgstr "Startseite" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1004 +msgid "Include posts" +msgstr "Beiträge" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:1013 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1010 +msgid "Include following pages of multi-page posts (Increases build time and memory usage!)" +msgstr "Folgeseiten von Beiträgen (Erhöht Erstelldauer und Speicherverbrauch)" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1016 +msgid "Include static pages" +msgstr "Statische Seiten" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1022 +msgid "Include categories" +msgstr "Kategorien" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1028 +msgid "Include archives" +msgstr "Archive" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1035 +msgid "Include tag pages" +msgstr "Tag Seiten " + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1051 +#, fuzzy, php-format +msgid "Include taxonomy pages for %s" +msgstr "Tag Seiten " + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1061 +msgid "Include author pages" +msgstr "Autoren Seiten" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1065 +msgid "Further options" +msgstr "Weitere Optionen" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1070 +msgid "Include the last modification time." +msgstr "Letztes Änderungsdatum mit einbeziehen" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1072 +msgid "This is highly recommended and helps the search engines to know when your content has changed. This option affects all sitemap entries." +msgstr "Dies ist äußerst empfohel und hilft den Suchmaschienen zu wissen wann Ihr Inhalt geändert wurde. Diese Einstellungen betrifft alle Einträge der Sitemap." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1079 +msgid "Excluded items" +msgstr "Seiten ausschließen" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1081 +msgid "Excluded categories" +msgstr "Kategorien ausschließen" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1083 +msgid "Using this feature will increase build time and memory usage!" +msgstr "Die Verwendung dieser Funktion wird die Erstelldauer sowie den Speicherverbrauch erhöhen!" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1090 +#, php-format +msgid "This feature requires at least WordPress 2.5.1, you are using %s" +msgstr "Dieses Feature benötigt mindestens WordPress 2.5.1, Sie verwenden %s" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1093 +msgid "Exclude posts" +msgstr "Beiträge ausschließen" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3206 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1095 +msgid "Exclude the following posts or pages:" +msgstr "Folgende Beiträge oder Seiten ausschließen:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3206 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1095 +msgid "List of IDs, separated by comma" +msgstr "Liste der IDs, getrennt mit Komma" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1097 +msgid "Child posts won't be excluded automatically!" +msgstr "Unterseiten werden nicht automatisch ausgeschlossen!" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1103 +msgid "Change frequencies" +msgstr "Änderungsfrequenz" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1107 +msgid "Please note that the value of this tag is considered a hint and not a command. Even though search engine crawlers consider this information when making decisions, they may crawl pages marked \"hourly\" less frequently than that, and they may crawl pages marked \"yearly\" more frequently than that. It is also likely that crawlers will periodically crawl pages marked \"never\" so that they can handle unexpected changes to those pages." +msgstr "Bitte beachten Sie dass diese Einstellung nur als Tipp und nicht als Kommando gesehen wird. Suchmaschinen könnten diesen Tipp beachten, müssen sich aber nicht daran halten. Sie können Seiten die als stündlich markiert wurden weniger häufig besuchen und Seiten die als niemals markiert wurden trotzdem überprüfen." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1113 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1170 +msgid "Homepage" +msgstr "Startseite" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1119 +msgid "Posts" +msgstr "Beiträge" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1125 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1188 +msgid "Static pages" +msgstr "Statische Seiten" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1131 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1194 +msgid "Categories" +msgstr "Kategorien" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1137 +msgid "The current archive of this month (Should be the same like your homepage)" +msgstr "Das Archive des aktuellen Monats (Sollte den gleichen Wert haben wie Ihre Startseite)" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1143 +msgid "Older archives (Changes only if you edit an old post)" +msgstr "Archive der vergangenen Monate" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1150 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1207 +msgid "Tag pages" +msgstr "Tag Seiten" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1157 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1214 +msgid "Author pages" +msgstr "Autoren Seiten" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1165 +msgid "Priorities" +msgstr "Prioritäten" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1176 +msgid "Posts (If auto calculation is disabled)" +msgstr "Beiträge (wenn automatische Berechnung deaktiviert wurde)" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1182 +msgid "Minimum post priority (Even if auto calculation is enabled)" +msgstr "Minimale Priorität für Beiträge (auch wenn automatische Berechnung aktiviert wurde)" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1200 +msgid "Archives" +msgstr "Archive" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1225 +msgid "Update options" +msgstr "Änderungen speichern" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1226 +msgid "Reset options" +msgstr "Einstellungen zurücksetzten" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap.php:95 +msgid "XML-Sitemap Generator" +msgstr "XML-Sitemap Generator" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap.php:95 +msgid "XML-Sitemap" +msgstr "XML-Sitemap" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap.php:109 +msgid "Settings" +msgstr "Einstellungen" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap.php:110 +msgid "FAQ" +msgstr "FAQ" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap.php:111 +msgid "Support" +msgstr "Support" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap.php:112 +msgid "Donate" +msgstr "Spenden" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap.php:182 +msgid "Sitemap FAQ" +msgstr "Sitemaps FAQ" + +#~ msgid "Status" +#~ msgstr "Status" +#~ msgid "Robots.txt file saved" +#~ msgstr "Robots.txt Datei abgespeichert" +#~ msgid "Error while saving Robots.txt file" +#~ msgstr "Beim Speichern der robots.txt Datei ist ein Fehler aufgetreten" +#~ msgid "" +#~ "It took %time% seconds to notify MSN.com, maybe you want to disable this " +#~ "feature to reduce the building time." +#~ msgstr "" +#~ "Es hat %time% Sekunden gedauert MSN.com zu benachrichtigen. Vielleicht " +#~ "möchtest Du dieses Feature deaktivieren um die Dauer der Sitemap-" +#~ "Generierung zu verkürzen?" +#~ msgid "" +#~ "There was a problem while notifying MSN.com. View result" +#~ msgstr "" +#~ "Leider gab es beim Versuch MSN.com zu benachrichtigen ein Problem. Ergebnis anzeigen" +#~ msgid "" +#~ "No registration required, but you can join the MSN Live " +#~ "Webmaster Tools to check crawling statistics." +#~ msgstr "" +#~ "Keine Registrierung erforderlich, aber Du kannst Dich bei den MSN Live Webmaster Tools anmelden um Indexierungs-Statistiken zu " +#~ "Deiner Website zu sehen." +#~ msgid "" +#~ "Modify or create %s file in blog root which contains the sitemap location." +#~ msgstr "Die URL deiner Sitemap in die Datei %s im Blogverzeichnis eintragen" +#~ msgid "File permissions: " +#~ msgstr "Datei Berechtigungen:" +#~ msgid "OK, robots.txt is writable." +#~ msgstr "OK, robots.txt ist beschreibbar." +#~ msgid "Error, robots.txt is not writable." +#~ msgstr "Fehler, robots.txt ist nicht beschreibbar." +#~ msgid "OK, robots.txt doesn't exist but the directory is writable." +#~ msgstr "OK, robots.txt Datei exisitert nicht, aber kann angelegt werden." +#~ msgid "Error, robots.txt doesn't exist and the directory is not writable" +#~ msgstr "" +#~ "Fehler, robots.txt Datei exisitert nicht und kann auch nicht angelegt " +#~ "werden." + diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/lang/sitemap-es_ES.mo Binary file web/wp-content/plugins/google-sitemap-generator/lang/sitemap-es_ES.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/lang/sitemap-es_ES.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/google-sitemap-generator/lang/sitemap-es_ES.po Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,1006 @@ +# [Countryname] Language File for sitemap (sitemap-[localname].po) +# Copyright (C) 2005 [name] : [URL] +# This file is distributed under the same license as the WordPress package. +# [name] <[mail-address]>, 2005. +# $Id: sitemap-es_ES.po 176086 2009-11-22 23:43:32Z arnee $ +# +msgid "" +msgstr "" +"Project-Id-Version: Google Sitemap Generator 3.1.8\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-08-24 00:20+0100\n" +"PO-Revision-Date: 2009-11-09 10:26+0100\n" +"Last-Translator: Omi | http://equipajedemano.info \n" +"Language-Team: Omi \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: Spanish\n" +"X-Poedit-Country: Spain\n" +"X-Poedit-SourceCharset: utf-8\n" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:846 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:642 +msgid "Comment Count" +msgstr "Contador de comentarios" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:858 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:654 +msgid "Uses the number of comments of the post to calculate the priority" +msgstr "Utiliza la cantidad de comentarios en un artículo para calcular su prioridad" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:918 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:714 +msgid "Comment Average" +msgstr "Promedio de comentarios" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:930 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:726 +msgid "Uses the average comment count to calculate the priority" +msgstr "Utiliza el promedio de comentarios para calcular la prioridad" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:993 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:789 +msgid "Popularity Contest" +msgstr "Concurso de popularidad" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:1005 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:801 +msgid "Uses the activated Popularity Contest Plugin from Alex King. See Settings and Most Popular Posts" +msgstr "Utilizará el plugin Popularity Contest de Alex King. Revise Configuraciones y Artículos más populares" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:1191 +msgid "Always" +msgstr "Siempre" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:1192 +msgid "Hourly" +msgstr "Cada hora" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:1193 +msgid "Daily" +msgstr "Diariamente" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:1194 +msgid "Weekly" +msgstr "Semanalmente" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:1195 +msgid "Monthly" +msgstr "Mensualmente" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:1196 +msgid "Yearly" +msgstr "Anualmente" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:1197 +msgid "Never" +msgstr "Nunca" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2600 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:97 +msgid "Thank you very much for your donation. You help me to continue support and development of this plugin and other free software!" +msgstr "Muchas gracias por su donación. ¡Su ayuda me permite seguir ofreciendo soporte y desarrollo para este plugin y para otros programas gratuitos!" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2600 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:97 +msgid "Hide this notice" +msgstr "Ocultar esta notificación" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2657 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:103 +#, php-format +msgid "Thanks for using this plugin! You've installed this plugin over a month ago. If it works and your are satisfied with the results, isn't it worth at least one dollar? Donations help me to continue support and development of this free software! Sure, no problem!" +msgstr "¡Gracias por utilizar este plugin! Ha pasado más de un mes desde que lo instaló. Si funciona bien y está contento con los resultados, ¿no merece la pena donar aunque sea un euro? Las donaciones me ayudan a seguir ofreciendo soporte y desarrollo para este software gratuito Claro, ¡sin problemas!" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2657 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:103 +msgid "No thanks, please don't bug me anymore!" +msgstr "No gracias. ¡No me moleste más por favor!" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:67 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:114 +msgid "Your sitemap is being refreshed at the moment. Depending on your blog size this might take some time!" +msgstr "Su sitemap está siendo actualizado en este momento. Dependiendo del tamaño de su blog esto podría llevar algún tiempo." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:69 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:116 +#, php-format +msgid "Your sitemap will be refreshed in %s seconds. Depending on your blog size this might take some time!" +msgstr "Su sitemap se actualizará en %s segundos. Dependiendo del tamaño de su blog esto podría llevar algún tiempo." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:145 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:448 +msgid "XML Sitemap Generator for WordPress" +msgstr "Generador Sitemap en XML para WordPress" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:293 +msgid "Configuration updated" +msgstr "Configuración actualizada" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:294 +msgid "Error while saving options" +msgstr "Error mientras se guardaban las opciones" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:296 +msgid "Pages saved" +msgstr "Páginas guardadas" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:297 +msgid "Error while saving pages" +msgstr "Error mientras se guardaban las páginas" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2758 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:304 +msgid "The default configuration was restored." +msgstr "Se restauró la configuración por defecto." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:374 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:461 +#, php-format +msgid "There is a new version of %1$s available. Download version %3$s here." +msgstr "Hay una nueva versión disponible de %1$s. Descargue la versión %3$s desde aquí." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:376 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:463 +#, php-format +msgid "There is a new version of %1$s available. Download version %3$s here automatic upgrade unavailable for this plugin." +msgstr "Hay una nueva versión disponible de %1$s. Descargue la versión %3$s desde aquí la actualización automática no está disponible para este plugin." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:378 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:465 +#, php-format +msgid "There is a new version of %1$s available. Download version %3$s here or upgrade automatically." +msgstr "Hay una nueva versión disponbile de %1$s. Descargue la versión %3$s desde aquí o actualice automáticamente." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2851 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2868 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:488 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:505 +msgid "open" +msgstr "abrir" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2852 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2869 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:489 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:506 +msgid "close" +msgstr "cerrar" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2853 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2870 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:490 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:507 +msgid "click-down and drag to move this box" +msgstr "pinche y arrastre para mover este cuadro" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2854 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2871 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:491 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:508 +msgid "click to %toggle% this box" +msgstr "pinche para %toggle% este cuadro" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2855 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2872 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:492 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:509 +msgid "use the arrow keys to move this box" +msgstr "utilice las teclas de dirección para mover este cuadro" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2856 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2873 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:493 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:510 +msgid ", or press the enter key to %toggle% it" +msgstr ", o pulse la tecla Enter para %toggle%lo" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2884 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:528 +msgid "About this Plugin:" +msgstr "Acerca de este plugin:" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:529 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap.php:153 +msgid "Plugin Homepage" +msgstr "Web principal del plugin" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:421 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:530 +msgid "Suggest a Feature" +msgstr "Solicitar nuevas características" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2887 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:531 +msgid "Notify List" +msgstr "Lista de notificaciones" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2888 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:532 +msgid "Support Forum" +msgstr "Foro de soporte" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:424 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:533 +msgid "Report a Bug" +msgstr "Comunicar un fallo" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2889 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:535 +msgid "Donate with PayPal" +msgstr "Donar usando PayPal" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2890 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:536 +msgid "My Amazon Wish List" +msgstr "Mi lista de deseos en Amazon" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2891 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:537 +msgid "translator_name" +msgstr "Traducido por: Omi" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2891 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:537 +msgid "translator_url" +msgstr "http://equipajedemano.info" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:540 +msgid "Sitemap Resources:" +msgstr "Recursos sobre sitemap:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2897 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:541 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:547 +msgid "Webmaster Tools" +msgstr "Herramientas para Webmasters" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2898 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:542 +msgid "Webmaster Blog" +msgstr "El blog del Webmaster" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2900 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:544 +msgid "Site Explorer" +msgstr "Explorador de sitios" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2901 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:545 +msgid "Search Blog" +msgstr "Blog del buscador" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3010 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:548 +msgid "Webmaster Center Blog" +msgstr "El blog del Webmaster" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:550 +msgid "Sitemaps Protocol" +msgstr "Protocolo sitemap" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2904 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:551 +msgid "Official Sitemaps FAQ" +msgstr "FAQ oficial de Sitemaps" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2905 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:552 +msgid "My Sitemaps FAQ" +msgstr "Mi FAQ de Sitemaps" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2910 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:555 +msgid "Recent Donations:" +msgstr "Donaciones recientes:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2914 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:559 +msgid "List of the donors" +msgstr "Listado de donantes" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2916 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:561 +msgid "Hide this list" +msgstr "Ocultar esta lista" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2919 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:564 +msgid "Thanks for your support!" +msgstr "¡Gracias por su colaboración!" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:584 +msgid "The sitemap wasn't generated yet." +msgstr "El sitemap todavía no se ha generado." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:587 +msgid "Result of the last build process, started on %date%." +msgstr "Resultados del último proceso de creación (fecha y hora de inicio: %date%)." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2941 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:596 +#, php-format +msgid "The sitemap wasn't built yet. Click here to build it the first time." +msgstr "El sitemap todavía no se ha creado. Pinche aquí para crearlo por primera vez" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2947 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:602 +msgid "Your sitemap was last built on %date%." +msgstr "Su sitemap se creó por última vez el %date%." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:603 +msgid "The last build succeeded, but the file was deleted later or can't be accessed anymore. Did you move your blog to another server or domain?" +msgstr "La última creación se realizó con éxito, pero el archivo ha sido posteriormente borrado o bien no puede accederse a el. ¿Ha movido su blog a otro servidor o dominio?" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:605 +msgid "There was a problem writing your sitemap file. Make sure the file exists and is writable. Learn more" +msgstr "Hubo un problema creando su archivo sitemap. Asegúrese de que el fichero existe y de que dispone de permisos de escritura. Más información" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2956 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:612 +msgid "Your sitemap (zipped) was last built on %date%." +msgstr "Su sitemap (comprimido) se creó por última vez el %date%." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:613 +msgid "The last zipped build succeeded, but the file was deleted later or can't be accessed anymore. Did you move your blog to another server or domain?" +msgstr "La última creación comprimida se realizó con éxito, pero el archivo ha sido posteriormente borrado o bien no puede accederse a el. ¿Ha movido su blog a otro servidor o dominio?" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:615 +msgid "There was a problem writing your zipped sitemap file. Make sure the file exists and is writable. Learn more" +msgstr "Hubo un problema creando su archivo sitemap comprimido. Asegúrese de que el fichero existe y de que dispone de permisos de escritura. Más información" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2964 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:621 +msgid "Google was successfully notified about changes." +msgstr "Google ha sido correctamente notificado sobre los cambios." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2967 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:624 +msgid "It took %time% seconds to notify Google, maybe you want to disable this feature to reduce the building time." +msgstr "Llevó %time% segundos notificar a Google. Quizás quiera desactivar esta característica para reducir el tiempo de creación." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3011 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:627 +#, php-format +msgid "There was a problem while notifying Google. View result" +msgstr "Hubo un problema notificando a Google. Ver resultado" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2976 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:633 +msgid "YAHOO was successfully notified about changes." +msgstr "Yahoo ha sido correctamente notificado sobre los cambios." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2979 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:636 +msgid "It took %time% seconds to notify YAHOO, maybe you want to disable this feature to reduce the building time." +msgstr "Llevó %time% segundos notificar a Yahoo. Quizás quiera desactivar esta característica para reducir el tiempo de creación." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3023 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:639 +#, php-format +msgid "There was a problem while notifying YAHOO. View result" +msgstr "Hubo un problema notificando a Yahoo. Ver resultado" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:645 +msgid "Bing was successfully notified about changes." +msgstr "Bing ha sido correctamente notificado sobre los cambios." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:648 +msgid "It took %time% seconds to notify Bing, maybe you want to disable this feature to reduce the building time." +msgstr "Llevó %time% segundos notificar a Bing. Quizás quiera desactivar esta característica para reducir el tiempo de creación." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:651 +#, php-format +msgid "There was a problem while notifying Bing. View result" +msgstr "Hubo un problema notificando a Bing. Ver resultado" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2988 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:657 +msgid "Ask.com was successfully notified about changes." +msgstr "Ask.com ha sido correctamente notificado sobre los cambios." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2991 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:660 +msgid "It took %time% seconds to notify Ask.com, maybe you want to disable this feature to reduce the building time." +msgstr "Llevó %time% segundos notificar a Ask.com. Quizás quiera desactivar esta característica para reducir el tiempo de creación." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3035 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:663 +#, php-format +msgid "There was a problem while notifying Ask.com. View result" +msgstr "Hubo un problema notificando a Ask.com. Ver resultado" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3002 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:671 +msgid "The building process took about %time% seconds to complete and used %memory% MB of memory." +msgstr "El proceso de creación tardó aproximadamente %time% segundos en completarse y utilizó %memory% MB de memoria." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3004 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:673 +msgid "The building process took about %time% seconds to complete." +msgstr "El proceso de creación tardó aproximadamente %time% segundos en completarse." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3008 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:677 +msgid "The content of your sitemap didn't change since the last time so the files were not written and no search engine was pinged." +msgstr "El contenido de su archivo sitemap no ha cambiado desde la última vez, por lo que no se han creado nuevos ficheros ni se ha notificado a los buscadores." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:586 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:685 +msgid "The building process might still be active! Reload the page in a few seconds and check if something has changed." +msgstr "¡El proceso de construcción todavía podría estar activo! Recargue la página dentro de unos segundos y compruebe si algo ha cambiado." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3012 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:688 +msgid "The last run didn't finish! Maybe you can raise the memory or time limit for PHP scripts. Learn more" +msgstr "¡La última ejecución no logró terminar! Quizás pueda elevar la memoria o el límite de tiempo para los scripts de PHP. Más información" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3014 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:690 +msgid "The last known memory usage of the script was %memused%MB, the limit of your server is %memlimit%." +msgstr "El último uso de memoria por el script fue de %memused%MB; el límite de su servidor es de %memlimit%MB." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3018 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:694 +msgid "The last known execution time of the script was %timeused% seconds, the limit of your server is %timelimit% seconds." +msgstr "El último tiempo de ejecución por el script fue de %timeused% segundos; el límite de su servidor está en %timelimit% segundos." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3022 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:698 +msgid "The script stopped around post number %lastpost% (+/- 100)" +msgstr "El scripts se detuvo sobre el artículo número %lastpost% (+/- 100)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3025 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:701 +#, php-format +msgid "If you changed something on your server or blog, you should rebuild the sitemap manually." +msgstr "Si ha cambiado algo en su servidor o blog debería crear el sitemap manualmente." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3027 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:703 +#, php-format +msgid "If you encounter any problems with the build process you can use the debug function to get more information." +msgstr "Si encuentra algún problema durante el proceso de creación, puede utilizar la función de depuración para obtener más información." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:710 +msgid "Basic Options" +msgstr "Opciones básicas" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3044 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:712 +msgid "Sitemap files:" +msgstr "Archivos sitemap:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3044 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3059 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3079 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3104 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3121 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:712 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:727 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:747 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:780 +msgid "Learn more" +msgstr "Más información" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:717 +msgid "Write a normal XML file (your filename)" +msgstr "Escribir un fichero XML normal (nombre_fichero)" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:723 +msgid "Write a gzipped file (your filename + .gz)" +msgstr "Escribir un fichero comprimido con gzip (nombre_fichero+.gz)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3059 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:727 +msgid "Building mode:" +msgstr "Modo de creación:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3064 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:732 +msgid "Rebuild sitemap if you change the content of your blog" +msgstr "Volver a crear el sitemap si ha cambiado el contenido de su blog" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3071 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:739 +msgid "Enable manual sitemap building via GET Request" +msgstr "Permitir la creación manual del sitemap mediante peticiones GET" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:743 +msgid "This will allow you to refresh your sitemap if an external tool wrote into the WordPress database without using the WordPress API. Use the following URL to start the process: %1 Please check the result box above to see if sitemap was successfully built." +msgstr "Esto le permitirá actualizar su sitemap si utiliza una herramienta externa, que no usa la API de WordPress, para escribir en la base de datos. Utilice la siguiente URL para iniciar el proceso: %1 Por favor, compruebe el resultado en el cuadro de texto superior para observar si el sitemap se ha creado correctamente." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:747 +msgid "Update notification:" +msgstr "Notificación de actualización" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3083 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:751 +msgid "Notify Google about updates of your Blog" +msgstr "Notificar a Google sobre cambios en su blog" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3084 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:752 +#, php-format +msgid "No registration required, but you can join the Google Webmaster Tools to check crawling statistics." +msgstr "No es necesario registrarse, pero puede unirse a las herramientas de Google para webmasters para revisar sus estadísticas." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:756 +msgid "Notify Bing (formerly MSN Live Search) about updates of your Blog" +msgstr "Notificar a Bing (anteriormente MSN Live Search) sobre cambios en su blog" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:757 +#, php-format +msgid "No registration required, but you can join the Bing Webmaster Tools to check crawling statistics." +msgstr "No es necesario registrarse, pero puede unirse a las herramientas de Bing para webmasters para revisar sus estadísticas." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3088 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:761 +msgid "Notify Ask.com about updates of your Blog" +msgstr "Notificar a Ask.com sobre cambios en su blog" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3089 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:762 +msgid "No registration required." +msgstr "No es necesario registrarse." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3093 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:766 +msgid "Notify YAHOO about updates of your Blog" +msgstr "Notificar a Yahoo sobre cambios en su blog" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3154 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:767 +msgid "Your Application ID:" +msgstr "Su Id de aplicación:" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:768 +#, php-format +msgid "Don't you have such a key? Request one here! %s2" +msgstr "¿No tiene esa identificación? Puede solicitar una aquí! %s2" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:773 +msgid "Add sitemap URL to the virtual robots.txt file." +msgstr "Añadir la URL del sitemap al archivo robots.txt virtual" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:777 +msgid "The virtual robots.txt generated by WordPress is used. A real robots.txt file must NOT exist in the blog directory!" +msgstr "Se utiliza el archivo robots.txt virtual generado por WordPress. ¡NO debe existir un fichero real robots.txt dentro del directorio del blog!" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:780 +msgid "Advanced options:" +msgstr "Opciones avanzadas:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3124 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:783 +msgid "Limit the number of posts in the sitemap:" +msgstr "Limitar el número de artículos en el sitemap:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3124 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:783 +msgid "Newer posts will be included first" +msgstr "Los artículos más recientes se incluiran primero" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3127 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:786 +msgid "Try to increase the memory limit to:" +msgstr "Tratar de incrementar el límite de memoria a:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3127 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:786 +msgid "e.g. \"4M\", \"16M\"" +msgstr "ej.: \"4M\", \"16M\"" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3130 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:789 +msgid "Try to increase the execution time limit to:" +msgstr "Tratar de incrementar el límite de tiempo de ejecución a:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3130 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:789 +msgid "in seconds, e.g. \"60\" or \"0\" for unlimited" +msgstr "en segundos, ej.: \"60\" o \"0\" para ilimitado" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3133 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:793 +msgid "Include a XSLT stylesheet:" +msgstr "Incluir una hoja de estilos XSLT" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3133 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:794 +msgid "Full or relative URL to your .xsl file" +msgstr "URL completa o relativa hacia su fichero .xsl" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:794 +msgid "Use default" +msgstr "Utilizar el predeterminado" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3152 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:800 +msgid "Enable MySQL standard mode. Use this only if you're getting MySQL errors. (Needs much more memory!)" +msgstr "Activar el modo estándar de MySQL. Sólo deberá utilizarlo si está padeciendo errores de MySQL (¡necesita mucha memoria!)" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:801 +msgid "Upgrade WordPress at least to 2.2 to enable the faster MySQL access" +msgstr "Actualice, como mínimo, a WordPress 2.2 para activar el acceso rápido a MySQL" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3166 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:808 +msgid "Build the sitemap in a background process (You don't have to wait when you save a post)" +msgstr "Crear el sitemap en segundo plano (así no tendrá que esperar cuando grabe un artículo)" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:809 +msgid "Upgrade WordPress at least to 2.1 to enable background building" +msgstr "Actualice, como mínimo, a WordPress 2.1 para activar la creación en segundo plano" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:816 +msgid "Additional pages" +msgstr "Páginas adicionales" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:819 +msgid "Here you can specify files or URLs which should be included in the sitemap, but do not belong to your Blog/WordPress.
    For example, if your domain is www.foo.com and your blog is located on www.foo.com/blog you might want to include your homepage at www.foo.com" +msgstr "Aquí puede especificar los ficheros o URLs que deben incluirse en el sitemap, pero que no pertenecen a su blog/WordPress.
    Por ejemplo: si su dominio es www.foo.com y su blog está en www.foo.com/blog, quizás quiera incluir su página de inicio de www.foo.com" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:821 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1010 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1024 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1033 +msgid "Note" +msgstr "Nota" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:822 +msgid "If your blog is in a subdirectory and you want to add pages which are NOT in the blog directory or beneath, you MUST place your sitemap file in the root directory (Look at the "Location of your sitemap file" section on this page)!" +msgstr "¡Si su blog está en un subdirectorio y quiere añadir páginas que NO están en el directorio de su blog o por debajo del mismo, DEBE colocar su fichero sitemap en el directorio raíz (Mire la sección \"Localización de su fichero sitemap\" en esta página)!" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:824 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:863 +msgid "URL to the page" +msgstr "URL de la página" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:825 +msgid "Enter the URL to the page. Examples: http://www.foo.com/index.html or www.foo.com/home " +msgstr "URL de la página. Ejemplos: http://www.foo.com/index.html o www.foo.com/home" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:827 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:864 +msgid "Priority" +msgstr "Prioridad" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:828 +msgid "Choose the priority of the page relative to the other pages. For example, your homepage might have a higher priority than your imprint." +msgstr "Escoja la prioridad relativa de la página comparándola con la de las otras páginas. Por ejemplo, su página de inicio debe tener una mayor prioridad que sus datos personales." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:830 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:866 +msgid "Last Changed" +msgstr "Últimos cambios" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:831 +msgid "Enter the date of the last change as YYYY-MM-DD (2005-12-31 for example) (optional)." +msgstr "Introduzca la fecha del último cambio como AAAA-MM-DD (por ejemplo: 2005-12-31) (opcional)." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:865 +msgid "Change Frequency" +msgstr "Frecuencia de cambios" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:867 +msgid "#" +msgstr "#" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:872 +msgid "No pages defined." +msgstr "Ninguna página definida" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:877 +msgid "Add new page" +msgstr "Añadir una nueva página" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:882 +msgid "Post Priority" +msgstr "Prioridad del artículo" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3329 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:884 +msgid "Please select how the priority of each post should be calculated:" +msgstr "Por favor, seleccione como se calculará la prioridad de cada artículo:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3331 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:886 +msgid "Do not use automatic priority calculation" +msgstr "No utilizar el cálculo de prioridad automático" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3331 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:886 +msgid "All posts will have the same priority which is defined in "Priorities"" +msgstr "Todos los artículos tendrán la misma prioridad según se haya definido en "prioridades"" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:897 +msgid "Location of your sitemap file" +msgstr "Localización de su fichero sitemap" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:900 +msgid "Automatic detection" +msgstr "Detección automática" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:904 +msgid "Filename of the sitemap file" +msgstr "Nombre de fichero para el archivo sitemap" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:907 +msgid "Detected Path" +msgstr "Ruta detectada" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:907 +msgid "Detected URL" +msgstr "URL detectada" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:912 +msgid "Custom location" +msgstr "Localización automática" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:916 +msgid "Absolute or relative path to the sitemap file, including name." +msgstr "Ruta absoluta o relativa al fichero sitemap, incluyendo el nombre." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:918 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:927 +msgid "Example" +msgstr "Ejemplo" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:925 +msgid "Complete URL to the sitemap file, including name." +msgstr "URL completa del fichero sitemap, incluyendo el nombre." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:938 +msgid "Sitemap Content" +msgstr "Contenido del sitemap" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:944 +msgid "Include homepage" +msgstr "Incluir página principal" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:950 +msgid "Include posts" +msgstr "Incluir artículos" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:956 +msgid "Include following pages of multi-page posts (Increases build time and memory usage!)" +msgstr "Incluir las páginas subsiguientes de los artículos multipágina (¡aumenta el tiempo de creación y el uso de memoria!)" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:962 +msgid "Include static pages" +msgstr "Incluir páginas estáticas" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:968 +msgid "Include categories" +msgstr "Incluir categorías" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:974 +msgid "Include archives" +msgstr "Incluir archivos" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:981 +msgid "Include tag pages" +msgstr "Incluir páginas de etiquetas" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:988 +msgid "Include author pages" +msgstr "Incluir páginas de autor" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:992 +msgid "Further options" +msgstr "Más opciones" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:997 +msgid "Include the last modification time." +msgstr "Incluir la fecha de última modificación" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:999 +msgid "This is highly recommended and helps the search engines to know when your content has changed. This option affects all sitemap entries." +msgstr "Altamente recomendado, ya que ayuda a los buscadores a saber cuando ha cambiado el contenido. Esta opción afecta a todas las entradas del sitemap." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1006 +msgid "Excluded items" +msgstr "Elementos excluidos" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1008 +msgid "Excluded categories" +msgstr "Categorías excluidas" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1010 +msgid "Using this feature will increase build time and memory usage!" +msgstr "¡Utilizar esta función incrementará el tiempo de creación y el uso de memoria!" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1017 +#, php-format +msgid "This feature requires at least WordPress 2.5.1, you are using %s" +msgstr "Esta característica requiere de, al menos, WordPress 2.5.1. y Vd. está utilizando la versión %s" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1020 +msgid "Exclude posts" +msgstr "Artículos excluidos" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3206 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1022 +msgid "Exclude the following posts or pages:" +msgstr "Excluir los siguientes artículos o páginas:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3206 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1022 +msgid "List of IDs, separated by comma" +msgstr "Indique los ID, separados por coma" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1024 +msgid "Child posts won't be excluded automatically!" +msgstr "¡Los artículos anidados no se excluirán automáticamente!" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1030 +msgid "Change frequencies" +msgstr "Frecuencias de cambio" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1034 +msgid "Please note that the value of this tag is considered a hint and not a command. Even though search engine crawlers consider this information when making decisions, they may crawl pages marked \"hourly\" less frequently than that, and they may crawl pages marked \"yearly\" more frequently than that. It is also likely that crawlers will periodically crawl pages marked \"never\" so that they can handle unexpected changes to those pages." +msgstr "Por favor, tenga en cuenta que el valor de esta etiqueta es considerado como un consejo, no como una orden. Incluso aunque los rastreadores tengan en cuenta esto a la hora de decidir, puede que rastreen páginas marcadas como \"cada hora\" con menos frecuencia que la indicada, y puede que rastreen páginas marcadas como \"anualmente\" con más frecuencia que esta. También podría ocurrir que los rastreadores revisen periódicamente páginas marcadas como \"nunca\" por si ha habido cambios inesperados en dichas páginas." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1040 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1097 +msgid "Homepage" +msgstr "Página principal" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1046 +msgid "Posts" +msgstr "Artículos" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1052 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1115 +msgid "Static pages" +msgstr "Páginas estáticas" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1058 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1121 +msgid "Categories" +msgstr "Categorías" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1064 +msgid "The current archive of this month (Should be the same like your homepage)" +msgstr "El archivo de este mes (Debe ser igual al de su página principal)" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1070 +msgid "Older archives (Changes only if you edit an old post)" +msgstr "Archivos obsoletos (Sólo cambia si edita un artículo antiguo)" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1077 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1134 +msgid "Tag pages" +msgstr "Páginas de etiquetas" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1084 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1141 +msgid "Author pages" +msgstr "Páginas de autor" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1092 +msgid "Priorities" +msgstr "Prioridades" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1103 +msgid "Posts (If auto calculation is disabled)" +msgstr "Artículos (Si el cálculo automático está deshabilitado)" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1109 +msgid "Minimum post priority (Even if auto calculation is enabled)" +msgstr "Prioridad mínima para artículos (Incluso aunque el cálculo automático esté activo)" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1127 +msgid "Archives" +msgstr "Archivos" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1152 +msgid "Update options" +msgstr "Grabar cambios" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1153 +msgid "Reset options" +msgstr "Reestablecer configuración" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap.php:87 +msgid "XML-Sitemap Generator" +msgstr "XML-Sitemap Generator" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2415 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap.php:87 +msgid "XML-Sitemap" +msgstr "Sitemap XML" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap.php:101 +msgid "Settings" +msgstr "Configuraciones" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap.php:102 +msgid "FAQ" +msgstr "FAQ" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap.php:103 +msgid "Support" +msgstr "Soporte" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap.php:104 +msgid "Donate" +msgstr "Dona" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap.php:154 +msgid "Sitemap FAQ" +msgstr "FAQ sitemap" + +#~ msgid "Manual location" +#~ msgstr "Localización manual" +#~ msgid "OR" +#~ msgstr "O" +#~ msgid "Error" +#~ msgstr "Error" +#~ msgid "" +#~ "A new page was added. Click on "Save page changes" to save your " +#~ "changes." +#~ msgstr "" +#~ "Una nueva página fue añadida. Haga click en \"Guardar cambios\" para " +#~ "guardar sus cambios." +#~ msgid "" +#~ "The page was deleted. Click on "Save page changes" to save your " +#~ "changes." +#~ msgstr "" +#~ "La página fue borrada. Haga click en \"Guardar cambios\" para guardar sus " +#~ "cambios." +#~ msgid "You changes have been cleared." +#~ msgstr "Sus cambios se han deshecho." +#~ msgid "Manual rebuild" +#~ msgstr "Reconstrucción manual" +#~ msgid "" +#~ "If you want to build the sitemap without editing a post, click on here!" +#~ msgstr "" +#~ "Si quieres construir el sitemap sin editar ningún artículo, ¡pulse aquí!" +#~ msgid "Rebuild Sitemap" +#~ msgstr "Reconstruir Sitemap" +#~ msgid "Save page changes" +#~ msgstr "Guardar los cambios de la página" +#~ msgid "Undo all page changes" +#~ msgstr "Deshacer todos los cambios de la página" +#~ msgid "Delete marked page" +#~ msgstr "Borrar página marcada" +#~ msgid "" +#~ "Enable automatic priority calculation for posts based on comment count" +#~ msgstr "" +#~ "Activar cálculo automático de prioridades para artículos basándose en el " +#~ "número de comentarios" +#~ msgid "Write debug comments" +#~ msgstr "Escribir comentarios de depuración" +#~ msgid "Auto-Ping Google Sitemaps" +#~ msgstr "Ping automático a Google Sitemaps" +#~ msgid "This option will automatically tell Google about changes." +#~ msgstr "" +#~ "Esta opción indicará automáticamente a Google que ha habido cambios." +#~ msgid "Includings" +#~ msgstr "Inclusiones" +#~ msgid "Informations and support" +#~ msgstr "Información y soporte" +#~ msgid "" +#~ "Check %s for updates and comment there if you have any problems / " +#~ "questions / suggestions." +#~ msgstr "" +#~ "Compruebe %s para actualizaciones, comentarios, problemas, cuestiones y " +#~ "sugerencias." +#~ msgid "URL:" +#~ msgstr "URL:" +#~ msgid "Path:" +#~ msgstr "Ruta:" +#~ msgid "Could not write into %s" +#~ msgstr "No puedo escribir en %s" +#~ msgid "Successfully built sitemap file:" +#~ msgstr "Fichero sitemap correctamente construido:" +#~ msgid "Successfully built gzipped sitemap file:" +#~ msgstr "Fichero sitemap comprimido correctamente construido:" +#~ msgid "Could not ping to Google at %s" +#~ msgstr "No pude hacer ping a Google en %s" +#~ msgid "Successfully pinged Google at %s" +#~ msgstr "Ping a Google realizado correctamente en %s" + diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/lang/sitemap-fi_FI.mo Binary file web/wp-content/plugins/google-sitemap-generator/lang/sitemap-fi_FI.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/lang/sitemap-fi_FI.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/google-sitemap-generator/lang/sitemap-fi_FI.po Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,1005 @@ +msgid "" +msgstr "" +"Project-Id-Version: Sitemaps for WordPress\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2008-12-23 10:32+0800\n" +"PO-Revision-Date: \n" +"Last-Translator: Olli Jarva \n" +"Language-Team: Olli Jarva \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Finnish\n" +"X-Poedit-Country: FINLAND\n" +"X-Poedit-SourceCharset: utf-8\n" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:846 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:642 +msgid "Comment Count" +msgstr "Kommenttien lukumäärä" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:858 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:654 +msgid "Uses the number of comments of the post to calculate the priority" +msgstr "Käytetään kommenttien määrää prioriteetin laskemiseen" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:918 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:714 +msgid "Comment Average" +msgstr "Kommenttien keskiarvo" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:930 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:726 +msgid "Uses the average comment count to calculate the priority" +msgstr "Käytetään keskimääräistä kommenttien määrää prioriteetin laskemiseen" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:993 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:789 +msgid "Popularity Contest" +msgstr "Suosituimmuuskilpailu" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:1005 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:801 +msgid "Uses the activated Popularity Contest Plugin from Alex King. See Settings and Most Popular Posts" +msgstr "Käyttää aktivoitua Popularity Contest Plugin-lisäosaa, jonka on tehnyt Alex King. Katso asetukset ja suosituimmat merkinnät" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-core.php:1118 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:1209 +msgid "Always" +msgstr "Aina" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-core.php:1119 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:1210 +msgid "Hourly" +msgstr "Tunnittain" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-core.php:1120 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:1211 +msgid "Daily" +msgstr "Päivittäin" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-core.php:1121 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:1212 +msgid "Weekly" +msgstr "Viikottain" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-core.php:1122 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:1213 +msgid "Monthly" +msgstr "Kuukausittain" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-core.php:1123 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:1214 +msgid "Yearly" +msgstr "Vuosittain" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-core.php:1124 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:1215 +msgid "Never" +msgstr "Ei ikinä" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2600 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:102 +msgid "Thank you very much for your donation. You help me to continue support and development of this plugin and other free software!" +msgstr "Kiitos lahjoituksesta! Autat tämän lisäosan ja muiden vapaiden ohjelmien tukemisessa ja kehittämisessä!" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2600 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:102 +msgid "Hide this notice" +msgstr "Piilota tämä huomautus" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2657 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:108 +#, php-format +msgid "Thanks for using this plugin! You've installed this plugin over a month ago. If it works and your are satisfied with the results, isn't it worth at least one dollar? Donations help me to continue support and development of this free software! Sure, no problem!" +msgstr "Kiitos lisäosan käyttämisestä! Olet asentanut lisäosan yli kuukausi sitten. Jos se toimii ja olet tyytyväinen tuloksiin, eikö se ole edes yhden dollarin arvoinen? Lahjoitukset auttavat tämän vapaan ohjelman kehittämisessä! Toki, ei ongelmaa!" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2657 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:108 +msgid "No thanks, please don't bug me anymore!" +msgstr "Ei kiitos, älä häiritse minua enää!" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:67 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:119 +msgid "Your sitemap is being refreshed at the moment. Depending on your blog size this might take some time!" +msgstr "Sivustokarttaa päivitetään. Blogin koosta riippuen päivittäminen voi kestää jonkin aikaa." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:69 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:121 +#, php-format +msgid "Your sitemap will be refreshed in %s seconds. Depending on your blog size this might take some time!" +msgstr "Sivustokartta päivitetään %s sekunnin kuluttua. Blogin koosta riippuen päivittäminen voi kestää jonkin aikaa." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2635 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2835 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:146 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:441 +msgid "XML Sitemap Generator for WordPress" +msgstr "XML-sivustokarttojen luontityökalu WordPressiin" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2740 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:278 +msgid "Configuration updated" +msgstr "Asetukset päivitetty" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2741 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:279 +msgid "Error while saving options" +msgstr "Virhe asetusten tallentamisessa" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2743 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:281 +msgid "Pages saved" +msgstr "Sivut tallennettu" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2744 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:282 +msgid "Error while saving pages" +msgstr "Virhe sivujen tallentamisessa" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2748 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:286 +#, php-format +msgid "Robots.txt file saved" +msgstr "Robots.txt tallennettu" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2750 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:288 +msgid "Error while saving Robots.txt file" +msgstr "Virhe robots.txt:n tallentamisessa" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2758 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:297 +msgid "The default configuration was restored." +msgstr "Oletusasetukset on palautettu." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:374 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:454 +#, php-format +msgid "There is a new version of %1$s available. Download version %3$s here." +msgstr "Uusi versio (%1$s) on saatavilla. Lataa versio %3$s." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:376 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:456 +#, php-format +msgid "There is a new version of %1$s available. Download version %3$s here automatic upgrade unavailable for this plugin." +msgstr "Uusi versio (%1$s) on saatavilla. Lataa versio %3$s. Automaattinen päivitys ei ole käytössä tälle lisäosalle." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:378 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:458 +#, php-format +msgid "There is a new version of %1$s available. Download version %3$s here or upgrade automatically." +msgstr "Uusi versio (%1$s) on saatavilla. Lataa versio %3$s tai päivitä automaattisesti." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2851 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2868 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:481 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:498 +msgid "open" +msgstr "avaa" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2852 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2869 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:482 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:499 +msgid "close" +msgstr "sulje" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2853 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2870 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:483 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:500 +msgid "click-down and drag to move this box" +msgstr "liikuta tätä laatikkoa vetämällä ja pudottamalla" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2854 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2871 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:484 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:501 +msgid "click to %toggle% this box" +msgstr "klikkaa %toggle% laatikko" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2855 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2872 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:485 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:502 +msgid "use the arrow keys to move this box" +msgstr "käytä nuolinäppäimiä liikkumiseen" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2856 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2873 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:486 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:503 +msgid ", or press the enter key to %toggle% it" +msgstr "tai paina enter-näppäintä vaihtaaksesi (%toggle%)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2884 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:521 +msgid "About this Plugin:" +msgstr "Tietoja lisäosasta:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2886 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:522 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap.php:138 +msgid "Plugin Homepage" +msgstr "Lisäosan kotisivu" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:421 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:523 +msgid "Suggest a Feature" +msgstr "Ehdota ominaisuutta" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2887 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:524 +msgid "Notify List" +msgstr "Tiedotuslista" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2888 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:525 +msgid "Support Forum" +msgstr "Tukifoorumit" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:424 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:526 +msgid "Report a Bug" +msgstr "Raportoi virhe" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2889 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:528 +msgid "Donate with PayPal" +msgstr "Lahjoita PayPalilla" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2890 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:529 +msgid "My Amazon Wish List" +msgstr "Amazonin toivelista" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2891 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:530 +msgid "translator_name" +msgstr "translator_name" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2891 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:530 +msgid "translator_url" +msgstr "translator_url" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2895 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:533 +msgid "Sitemap Resources:" +msgstr "Sivustokarttaresurssit:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2897 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:534 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:540 +msgid "Webmaster Tools" +msgstr "Ylläpitäjän työkalut" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2898 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:535 +msgid "Webmaster Blog" +msgstr "Ylläpitäjän blogi" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2900 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:537 +msgid "Site Explorer" +msgstr "Sivustoselain" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2901 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:538 +msgid "Search Blog" +msgstr "Hakukoneblogi" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3010 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:541 +msgid "Webmaster Center Blog" +msgstr "Ylläpitäjäkeskuksen blogi" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2903 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:543 +msgid "Sitemaps Protocol" +msgstr "Sivustokartta-protokolla" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2904 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:544 +msgid "Official Sitemaps FAQ" +msgstr "Virallinen sivustokartta-FAQ" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2905 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:545 +msgid "My Sitemaps FAQ" +msgstr "Sivustokartta-FAQ" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2910 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:548 +msgid "Recent Donations:" +msgstr "Äskettäin lahjoittaneet:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2914 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:552 +msgid "List of the donors" +msgstr "Lahjoittajalista" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2916 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:554 +msgid "Hide this list" +msgstr "Piilota tämä lista" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2919 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:557 +msgid "Thanks for your support!" +msgstr "Kiitos tuestasi!" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2931 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:575 +msgid "Status" +msgstr "Tila" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2941 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:583 +#, php-format +msgid "The sitemap wasn't built yet. Click here to build it the first time." +msgstr "Sivustokarttaa ei ole luotu. Luo sivustokartta ensimmäisen kerran." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2947 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:589 +msgid "Your sitemap was last built on %date%." +msgstr "Sivustokartta on päivitetty edellisen kerran %date%." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2949 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:591 +msgid "There was a problem writing your sitemap file. Make sure the file exists and is writable. Learn moreLue lisää" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2956 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:598 +msgid "Your sitemap (zipped) was last built on %date%." +msgstr "Sivustokartta (pakattu) on päivitetty edellisen kerran %date%." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2958 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:600 +msgid "There was a problem writing your zipped sitemap file. Make sure the file exists and is writable. Learn moreLue lisääsuccessfully notified about changes." +msgstr "Googlea tiedotettiin onnistuneesti päivityksistä." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2967 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:609 +msgid "It took %time% seconds to notify Google, maybe you want to disable this feature to reduce the building time." +msgstr "Kesti %time% sekuntia huomauttaa Googlea päivityksistä. Saatat haluta poistaa käytöstä tämän ominaisuuden nopeuttaaksesi sivustokartan luomista." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3011 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:612 +#, php-format +msgid "There was a problem while notifying Google. View result" +msgstr "Virhe Googlen huomauttamisessa. Katso tulokset" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2976 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:618 +msgid "YAHOO was successfully notified about changes." +msgstr "Yahoota tiedotettiin onnistuneesti päivityksistä." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2979 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:621 +msgid "It took %time% seconds to notify YAHOO, maybe you want to disable this feature to reduce the building time." +msgstr "Kesti %time% sekuntia huomauttaa Yahoota päivityksistä. Saatat haluta poistaa käytöstä tämän ominaisuuden nopeuttaaksesi sivustokartan luomista." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3023 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:624 +#, php-format +msgid "There was a problem while notifying YAHOO. View result" +msgstr "Virhe Yahoon huomauttamisessa. Katso tulokset" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3097 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:630 +msgid "MSN was successfully notified about changes." +msgstr "MSN:ää tiedotettiin onnistuneesti päivityksistä." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3100 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:633 +msgid "It took %time% seconds to notify MSN.com, maybe you want to disable this feature to reduce the building time." +msgstr "Kesti %time% sekuntia huomauttaa MSN.comia päivityksistä. Saatat haluta poistaa käytöstä tämän ominaisuuden nopeuttaaksesi sivustokartan luomista." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3103 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:636 +#, php-format +msgid "There was a problem while notifying MSN.com. View result" +msgstr "Virhe MSN.comin huomauttamisessa. Katso tulokset" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2988 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:642 +msgid "Ask.com was successfully notified about changes." +msgstr "Ask.comia tiedotettiin onnistuneesti päivityksistä." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2991 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:645 +msgid "It took %time% seconds to notify Ask.com, maybe you want to disable this feature to reduce the building time." +msgstr "Kesti %time% sekuntia huomauttaa Ask.comia päivityksistä. Saatat haluta poistaa käytöstä tämän ominaisuuden nopeuttaaksesi sivustokartan luomista." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3035 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:648 +#, php-format +msgid "There was a problem while notifying Ask.com. View result" +msgstr "Virhe Ask.comin huomauttamisessa. Katso tulokset" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3002 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:656 +msgid "The building process took about %time% seconds to complete and used %memory% MB of memory." +msgstr "Luominen kesti noin %time% sekuntia ja käytti %memory% MB muistia." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3004 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:658 +msgid "The building process took about %time% seconds to complete." +msgstr "Luominen kesti noin %time% sekuntia." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3008 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:662 +msgid "The content of your sitemap didn't change since the last time so the files were not written and no search engine was pinged." +msgstr "Sivustokartan sisältö ei vaihtunut edellisestä päivityksestä, joten tiedostoja ei kirjoitettu ja hakukoneita ei huomautettu päivityksistä." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:586 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:670 +msgid "The building process might still be active! Reload the page in a few seconds and check if something has changed." +msgstr "Luomisprosessi saattaa olla yhä aktiivinen! Lataa sivu uudelleen muutaman sekunnin kuluttua." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3012 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:673 +msgid "The last run didn't finish! Maybe you can raise the memory or time limit for PHP scripts. Learn more" +msgstr "Edellinen päivitys ei valmistunut! Muisti- tai aikarajoitusten kasvattaminen saattaa auttaa. Lue lisää" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3014 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:675 +msgid "The last known memory usage of the script was %memused%MB, the limit of your server is %memlimit%." +msgstr "Edellinen tunnettu muistin käyttö oli %memused%MB, palvelimen rajoitus on %memlimit%." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3018 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:679 +msgid "The last known execution time of the script was %timeused% seconds, the limit of your server is %timelimit% seconds." +msgstr "Edellinen tunnettu ajoaika oli %timeused% sekuntia, palvelimen rajoitus on %timelimit% sekuntia." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3022 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:683 +msgid "The script stopped around post number %lastpost% (+/- 100)" +msgstr "Ohjelma lopetti merkinnässä numero %lastpost% (+/- 100)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3025 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:686 +#, php-format +msgid "If you changed something on your server or blog, you should rebuild the sitemap manually." +msgstr "Jos jotain on muuttunut palvelimella tai blogissa, saatat haluta luoda sivustokartan uudelleen manuaalisesti." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3027 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:688 +#, php-format +msgid "If you encounter any problems with the build process you can use the debug function to get more information." +msgstr "Jos sivustokartan luomisprosessissa oli ongelmia, voit käyttää virheenetsintätilaa lisätietojen saamiseksi." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3040 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:695 +msgid "Basic Options" +msgstr "Perusasetukset" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3044 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:697 +msgid "Sitemap files:" +msgstr "Sivustokarttatiedostot:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3044 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3059 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3079 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3104 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3121 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:697 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:712 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:732 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:765 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:782 +msgid "Learn more" +msgstr "Lue lisää" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3049 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:702 +msgid "Write a normal XML file (your filename)" +msgstr "Luo normaali XML-tiedosto (tiedostonimi)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3055 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:708 +msgid "Write a gzipped file (your filename + .gz)" +msgstr "Luo pakattu (gzip) tiedosto (tiedostonimi + .gz)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3059 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:712 +msgid "Building mode:" +msgstr "Luomisasetukset:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3064 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:717 +msgid "Rebuild sitemap if you change the content of your blog" +msgstr "Luo sivustokartta uudelleen, jos blogin sisältöä on muutettu" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3071 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:724 +msgid "Enable manual sitemap building via GET Request" +msgstr "Salli manuaalinen sivustokartan luominen GET-pyynnöllä" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3075 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:728 +msgid "This will allow you to refresh your sitemap if an external tool wrote into the WordPress database without using the WordPress API. Use the following URL to start the process: %1 Please check the logfile above to see if sitemap was successfully built." +msgstr "Tämä sallii sivustokartan päivittämisen, jos työkalu kirjoittaa WordPressin tietokantaan käyttämättä WordPressin API:a. Käytä seuraavaa osoitetta päivittämiseen: %1 . Tarkista lokitiedostosta, päivitettiinkö sivustokartta onnistuneesti." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3079 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:732 +msgid "Update notification:" +msgstr "Päivityshuomautukset:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3083 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:736 +msgid "Notify Google about updates of your Blog" +msgstr "Ilmoita Googlelle päivityksistä blogissa" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3084 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:737 +#, php-format +msgid "No registration required, but you can join the Google Webmaster Tools to check crawling statistics." +msgstr "Rekisteröintiä ei vaadita, mutta Googlen verkkoylläpitäjän työkalut kertovat tietoja sivuston indeksoinnista." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3209 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:741 +msgid "Notify MSN Live Search about updates of your Blog" +msgstr "Ilmoita MSN Live Searchille päivityksistä blogissa" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3210 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:742 +#, php-format +msgid "No registration required, but you can join the MSN Live Webmaster Tools to check crawling statistics." +msgstr "Rekisteröintiä ei vaadita, mutta MSN Liven verkkoylläpitäjän työkalut kertovat tietoja sivuston indeksoinnista." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3088 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:746 +msgid "Notify Ask.com about updates of your Blog" +msgstr "Ilmoita Ask.comille päivityksistä blogissa" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3089 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:747 +msgid "No registration required." +msgstr "Rekisteröintiä ei vaadita" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3093 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:751 +msgid "Notify YAHOO about updates of your Blog" +msgstr "Ilmoita Yahoolle päivityksistä blogissa" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3154 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:752 +msgid "Your Application ID:" +msgstr "ID:" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:753 +#, php-format +msgid "Don't you have such a key? Request one here! %s2" +msgstr "Ei avainta? Hae omasi täältä! %s2" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3099 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:760 +#, php-format +msgid "Modify or create %s file in blog root which contains the sitemap location." +msgstr "Muokkaa tai luo tiedosto %s blogin juurihakemistoon" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3102 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:763 +msgid "File permissions: " +msgstr "Tiedoston oikeudet:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3107 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:768 +msgid "OK, robots.txt is writable." +msgstr "OK, robots.txt:hen on kirjoitusoikeudet." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3109 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:770 +msgid "Error, robots.txt is not writable." +msgstr "Virhe: robots.txt-tiedostoon ei voi kirjoittaa." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3113 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:774 +msgid "OK, robots.txt doesn't exist but the directory is writable." +msgstr "Ok, robots.txt:tä ei ole ja kansioon voi kirjoittaa." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3115 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:776 +msgid "Error, robots.txt doesn't exist and the directory is not writable" +msgstr "Virhe: robots.txt:tä ei ole ja kansioon ei voi kirjoittaa" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3121 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:782 +msgid "Advanced options:" +msgstr "Lisäasetukset:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3124 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:785 +msgid "Limit the number of posts in the sitemap:" +msgstr "Rajoita sivustokartan merkintöjen lukumäärää:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3124 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:785 +msgid "Newer posts will be included first" +msgstr "Uusimmat merkinnät listataan ensimmäisinä" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3127 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:788 +msgid "Try to increase the memory limit to:" +msgstr "Yritä lisätä muistirajoitusta:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3127 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:788 +msgid "e.g. \"4M\", \"16M\"" +msgstr "esim. \"4M\", \"16M\"" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3130 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:791 +msgid "Try to increase the execution time limit to:" +msgstr "Yritä lisätä ajoajan rajoitusta:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3130 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:791 +msgid "in seconds, e.g. \"60\" or \"0\" for unlimited" +msgstr "sekunneissa, esim. \"60\" tai \"0\" rajoittamattomaan" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3133 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:795 +msgid "Include a XSLT stylesheet:" +msgstr "Ota mukaan XSLT-tyylitiedosto:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3133 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:796 +msgid "Full or relative URL to your .xsl file" +msgstr "Kokonainen tai suhteellinen .xsl-tiedoston URL" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:796 +msgid "Use default" +msgstr "Käytä oletuksia" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3152 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:801 +msgid "Enable MySQL standard mode. Use this only if you're getting MySQL errors. (Needs much more memory!)" +msgstr "Ota käyttöön MySQL:n standarditila. Käytä tätä vain jos saat MySQL-virheitä (tarvitsee huomattavasti enemmän muistia)." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3166 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:807 +msgid "Build the sitemap in a background process (You don't have to wait when you save a post)" +msgstr "Luo sivustokartta taustaprosessissa (Ei viiveitä merkintöjä luodessa)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3144 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:814 +msgid "Additional pages" +msgstr "Lisäsivut" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3149 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:817 +msgid "Here you can specify files or URLs which should be included in the sitemap, but do not belong to your Blog/WordPress.
    For example, if your domain is www.foo.com and your blog is located on www.foo.com/blog you might want to include your homepage at www.foo.com" +msgstr "Voit määrittää tiedostot tai osoitteet jotka lisätään sivustokarttaan, mutta jotka eivät ole WordPressissä.
    Esimerkiksi jos domain on www.example.com ja blogi on osoitteessa www.example.com/blog, saatat haluta lisätä etusivun www.example.com sivustokarttaan" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3151 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3462 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:819 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:998 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1012 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1021 +msgid "Note" +msgstr "Huom" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3152 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:820 +msgid "If your blog is in a subdirectory and you want to add pages which are NOT in the blog directory or beneath, you MUST place your sitemap file in the root directory (Look at the "Location of your sitemap file" section on this page)!" +msgstr "Jos blogi on alihakemistossa ja haluat lisätä sivuja jotka EIVÄT ole blogin hakemistossa tai alikansioissa, sivustokartta TÄYTYY laittaa juurihakemistoon. Katso "Sivustokartan sijainti"-osiota tällä sivulla." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3154 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3300 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:822 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:861 +msgid "URL to the page" +msgstr "Sivun URL" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3155 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:823 +msgid "Enter the URL to the page. Examples: http://www.foo.com/index.html or www.foo.com/home " +msgstr "Kirjoita sivun osoite. Esimerkiksi http://example.com/index.html tai www.example.com/home" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3157 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3301 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:825 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:862 +msgid "Priority" +msgstr "Prioriteetti" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3158 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:826 +msgid "Choose the priority of the page relative to the other pages. For example, your homepage might have a higher priority than your imprint." +msgstr "Valitse prioriteetti suhteessa muihin sivuihin. Esimerkiksi etusivu voi olla korkeammalla prioriteetilla kuin vanhat arkistosivut." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3160 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3303 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:828 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:864 +msgid "Last Changed" +msgstr "Viimeinen muutos" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3161 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:829 +msgid "Enter the date of the last change as YYYY-MM-DD (2005-12-31 for example) (optional)." +msgstr "Kirjoita edellisen muutoksen päiväys muodossa YYYY-MM-DD (esim. 2009-05-13) (ei pakollinen)." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3302 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:863 +msgid "Change Frequency" +msgstr "Muutostiheys" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3304 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:865 +msgid "#" +msgstr "#" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3309 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:870 +msgid "No pages defined." +msgstr "Ei sivuja määritetty." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3314 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:875 +msgid "Add new page" +msgstr "Lisää uusi sivu" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3325 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:880 +msgid "Post Priority" +msgstr "Merkinnän prioriteetti" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3329 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:882 +msgid "Please select how the priority of each post should be calculated:" +msgstr "Valitse, miten merkintöjen prioriteetti lasketaan:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3331 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:884 +msgid "Do not use automatic priority calculation" +msgstr "Älä käytä automaattista prioriteetin laskemista" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3331 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:884 +msgid "All posts will have the same priority which is defined in "Priorities"" +msgstr "Kaikilla merkinnöillä on prioriteetit-kohdassa määritetty prioriteetti" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3348 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:895 +msgid "Location of your sitemap file" +msgstr "Sivustokartan sijainti" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3353 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:898 +msgid "Automatic detection" +msgstr "Automaattinen tunnistus" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3357 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:902 +msgid "Filename of the sitemap file" +msgstr "Sivustokartan tiedostonimi" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3360 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:905 +msgid "Detected Path" +msgstr "Tunnistettu polku" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3360 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:905 +msgid "Detected URL" +msgstr "Tunnistettu URL" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3365 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:910 +msgid "Custom location" +msgstr "Muokattu sijainti" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3369 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:914 +msgid "Absolute or relative path to the sitemap file, including name." +msgstr "Absoluuttinen tai suhteellinen sivustokartan osoite, myös tiedostonimi." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3371 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3380 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:916 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:925 +msgid "Example" +msgstr "Esimerkki" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3378 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:923 +msgid "Complete URL to the sitemap file, including name." +msgstr "Koko URL sivustokarttatiedostoon, myös nimi." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3397 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:936 +msgid "Sitemap Content" +msgstr "Sivustokartan sisältö" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3405 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:942 +msgid "Include homepage" +msgstr "Ota mukaan etusivu" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3411 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:948 +msgid "Include posts" +msgstr "Ota mukaan merkinnät" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:911 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:954 +msgid "Include following pages of multi-page posts (<!--nextpage-->)" +msgstr "Ota mukaan kaikki sivut monisivuisista merkinnöistä (<!--nextpage-->)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3417 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:960 +msgid "Include static pages" +msgstr "Ota mukaan staattiset sivut" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3423 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:966 +msgid "Include categories" +msgstr "Ota mukaan luokat" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3429 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:972 +msgid "Include archives" +msgstr "Ota mukaan arkistosivut" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3436 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:979 +msgid "Include tag pages" +msgstr "Ota mukaan avainsanasivut" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3443 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:986 +msgid "Include author pages" +msgstr "Ota mukaan tekijäsivut" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:994 +msgid "Excluded items" +msgstr "Jätä huomiotta" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:996 +msgid "Excluded categories" +msgstr "Jätä huomiotta luokkia" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:998 +msgid "Using this feature will increase build time and memory usage!" +msgstr "Tämän ominaisuuden käyttö lisää luomisaikaa ja muistinkäyttöä!" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1005 +#, php-format +msgid "This feature requires at least WordPress 2.5, you are using %s" +msgstr "Ominaisuus vaatii vähintään WordPress 2.5:n, sinulla on %s" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1008 +msgid "Exclude posts" +msgstr "Jätä huomiotta merkintöjä" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3206 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1010 +msgid "Exclude the following posts or pages:" +msgstr "Jätä huomiotta seuraavat merkinnät tai sivut:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3206 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1010 +msgid "List of IDs, separated by comma" +msgstr "Lista ID:istä, pilkulla eroteltuna" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1012 +msgid "Child posts will not automatically be excluded!" +msgstr "Alimerkintöjä ei jätetä automaattisesti huomiotta!" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3457 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1018 +msgid "Change frequencies" +msgstr "Päivitystiheydet" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3463 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1022 +msgid "Please note that the value of this tag is considered a hint and not a command. Even though search engine crawlers consider this information when making decisions, they may crawl pages marked \"hourly\" less frequently than that, and they may crawl pages marked \"yearly\" more frequently than that. It is also likely that crawlers will periodically crawl pages marked \"never\" so that they can handle unexpected changes to those pages." +msgstr "Huomioi että tämä avainsana on vihje, ei komento. Vaikka osa hakukoneista ottaa avainsanan huomioon päätöksiä tehdessä, tunneittain päivittyviksi merkittyjä sivuja saatetaan hakea harvemmin. Vastaavasti vuosittain päivittyviä sivuja haetaan mahdollisesti useammin. Lisäksi osa hakukoneista hakee säännöllisesti sivuja, joiden päivittymistiheydeksi on merkitty \"ei koskaan\", jotta odottamattomat muutokset päivittyvät." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3469 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3535 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1028 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1086 +msgid "Homepage" +msgstr "Etusivu" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3475 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1034 +msgid "Posts" +msgstr "Merkinnät" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3481 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3553 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1040 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1104 +msgid "Static pages" +msgstr "Staattiset sivut" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3487 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3559 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1046 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1110 +msgid "Categories" +msgstr "Kategoriat" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3493 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1052 +msgid "The current archive of this month (Should be the same like your homepage)" +msgstr "Tämän kuun arkistosivu (yleensä blogin etusivu)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3499 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1058 +msgid "Older archives (Changes only if you edit an old post)" +msgstr "Vanhat arkistosivut (vaihtuvat vain kun muokkaat vanhaa merkintää)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3506 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3572 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1065 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1123 +msgid "Tag pages" +msgstr "Avainsanasivut" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3513 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3579 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1072 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1130 +msgid "Author pages" +msgstr "Tekijän sivut" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3527 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1080 +msgid "Priorities" +msgstr "Prioriteetit" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3541 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1092 +msgid "Posts (If auto calculation is disabled)" +msgstr "Merkinnät (jos automaattinen laskenta on poistettu käytöstä)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3547 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1098 +msgid "Minimum post priority (Even if auto calculation is enabled)" +msgstr "Merkintöjen minimiprioriteetti (vaikka automaattinen laskenta olisi käytössä)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3565 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1116 +msgid "Archives" +msgstr "Arkistot" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3590 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1141 +msgid "Update options" +msgstr "Päivitä asetukset" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3591 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1142 +msgid "Reset options" +msgstr "Nollaa asetukset" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2415 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap.php:81 +msgid "XML-Sitemap Generator" +msgstr "XML-sivustokartan luontityökalu" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2415 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap.php:81 +msgid "XML-Sitemap" +msgstr "XML-Sivustokartta" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap.php:139 +msgid "Sitemap FAQ" +msgstr "Sivustokartta-FAQ" + diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/lang/sitemap-fr_FR.mo Binary file web/wp-content/plugins/google-sitemap-generator/lang/sitemap-fr_FR.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/lang/sitemap-fr_FR.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/google-sitemap-generator/lang/sitemap-fr_FR.po Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,896 @@ +# This file is distributed under the same license as the WordPress package. +# [name] <[mail-address]>, 2005. +# $Id: sitemap.pot 2502 2005-07-03 20:50:38Z arnee $ +# +msgid "" +msgstr "" +"Project-Id-Version: sitemap 3.1.2\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-06-08 22:26+0100\n" +"PO-Revision-Date: 2009-06-08 22:29+0100\n" +"Last-Translator: serge rauber \n" +"Language-Team: Serge Rauber \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: French\n" +"X-Poedit-Country: FRANCE\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-KeywordsList: __;_e\n" +"X-Poedit-Basepath: .\n" +"X-Poedit-SearchPath-0: .\n" +"X-Poedit-SearchPath-1: ..\n" + +#: ../sitemap-ui.php:102 +msgid "Thank you very much for your donation. You help me to continue support and development of this plugin and other free software!" +msgstr "Merci beaucoup pour votre don, ça m'aide à continuer de développer ce plugin et d'autres softwares!" + +#: ../sitemap-ui.php:102 +msgid "Hide this notice" +msgstr "Masquer" + +#: ../sitemap-ui.php:108 +#, php-format +msgid "Thanks for using this plugin! You've installed this plugin over a month ago. If it works and your are satisfied with the results, isn't it worth at least one dollar? Donations help me to continue support and development of this free software! Sure, no problem!" +msgstr "Merci d'utiliser ce plugin! Vous l'avez installé il y a un mois. S'il fonctionne bien et que vous en êtes satisfait, est-ce trop de donner un petit dollar?Les dons me permettent de continuer à développer ce plugin libre et gratuit ! Je t'aide, pas de problème!" + +#: ../sitemap-ui.php:108 +msgid "No thanks, please don't bug me anymore!" +msgstr "Non merci, ne plus me le rappeler!" + +#: ../sitemap-ui.php:119 +msgid "Your sitemap is being refreshed at the moment. Depending on your blog size this might take some time!" +msgstr "Mise à jour du sitemap en cours. En fonction de la taille de votre blog, ça peut prendre un certain temps!" + +#: ../sitemap-ui.php:121 +#, php-format +msgid "Your sitemap will be refreshed in %s seconds. Depending on your blog size this might take some time!" +msgstr "La mise à jour du sitemap devrait prendre %s secondes. En fonction de la taille de votre blog, ça peut prendre un certain temps!" + +#: ../sitemap-ui.php:150 +#: ../sitemap-ui.php:453 +msgid "XML Sitemap Generator for WordPress" +msgstr "Générateur de sitemap xml pour WordPress" + +#: ../sitemap-ui.php:298 +msgid "Configuration updated" +msgstr "Configuration mise à jour" + +#: ../sitemap-ui.php:299 +msgid "Error while saving options" +msgstr "Erreur lors de la sauvegarde des options" + +#: ../sitemap-ui.php:301 +msgid "Pages saved" +msgstr "Pages enregistrées" + +#: ../sitemap-ui.php:302 +msgid "Error while saving pages" +msgstr "Erreur durant l'enregistrement des pages" + +#: ../sitemap-ui.php:309 +msgid "The default configuration was restored." +msgstr "Configuration par défaut restaurée." + +#: ../sitemap-ui.php:466 +#, php-format +msgid "There is a new version of %1$s available. Download version %3$s here." +msgstr "Une nouvelle version de %1$s est disponible. Télécharger la version %3$s ici." + +#: ../sitemap-ui.php:468 +#, php-format +msgid "There is a new version of %1$s available. Download version %3$s here automatic upgrade unavailable for this plugin." +msgstr "Une nouvelle version de %1$s est disponible. Télécharger la version %3$s ici.mise à jour automatique non disponible pour ce plugin" + +#: ../sitemap-ui.php:470 +#, php-format +msgid "There is a new version of %1$s available. Download version %3$s here or upgrade automatically." +msgstr "Une nouvelle version de %1$s est disponible. Télécharger la version %3$s ici ou Mettre à jour automatiquement." + +#: ../sitemap-ui.php:493 +#: ../sitemap-ui.php:510 +msgid "open" +msgstr "ouvrir" + +#: ../sitemap-ui.php:494 +#: ../sitemap-ui.php:511 +msgid "close" +msgstr "fermer" + +#: ../sitemap-ui.php:495 +#: ../sitemap-ui.php:512 +msgid "click-down and drag to move this box" +msgstr "Faites un glisser/déposer pour déplacer cette boite." + +#: ../sitemap-ui.php:496 +#: ../sitemap-ui.php:513 +msgid "click to %toggle% this box" +msgstr "Cliquez pour %inverser% cette case" + +#: ../sitemap-ui.php:497 +#: ../sitemap-ui.php:514 +msgid "use the arrow keys to move this box" +msgstr "Utilisez les touches fléchées pour déplacer cette boite" + +#: ../sitemap-ui.php:498 +#: ../sitemap-ui.php:515 +msgid ", or press the enter key to %toggle% it" +msgstr ", ou appuyez sur la touche Entrée pour l'%inverser%." + +#: ../sitemap-ui.php:533 +msgid "About this Plugin:" +msgstr "A propos" + +#: ../sitemap-ui.php:534 +msgid "Plugin Homepage" +msgstr "Page du plugin" + +#: ../sitemap-ui.php:535 +msgid "Suggest a Feature" +msgstr "Suggestion" + +#: ../sitemap-ui.php:536 +msgid "Notify List" +msgstr "S'abonner" + +#: ../sitemap-ui.php:537 +msgid "Support Forum" +msgstr "Forum" + +#: ../sitemap-ui.php:538 +msgid "Report a Bug" +msgstr "Signaler un bug" + +#: ../sitemap-ui.php:540 +msgid "Donate with PayPal" +msgstr "Don PayPal" + +#: ../sitemap-ui.php:541 +msgid "My Amazon Wish List" +msgstr "Ma liste Amazon" + +#: ../sitemap-ui.php:542 +msgid "translator_name" +msgstr "Traduit par Serge" + +#: ../sitemap-ui.php:542 +msgid "translator_url" +msgstr "http://wp.kalyxstudio.com" + +#: ../sitemap-ui.php:545 +msgid "Sitemap Resources:" +msgstr "Ressources" + +#: ../sitemap-ui.php:546 +#: ../sitemap-ui.php:552 +msgid "Webmaster Tools" +msgstr "Webmaster Tools" + +#: ../sitemap-ui.php:547 +msgid "Webmaster Blog" +msgstr "Webmaster Blog" + +#: ../sitemap-ui.php:549 +msgid "Site Explorer" +msgstr "Site Explorer" + +#: ../sitemap-ui.php:550 +msgid "Search Blog" +msgstr "Search Blog" + +#: ../sitemap-ui.php:553 +msgid "Webmaster Center Blog" +msgstr "Webmaster Center Blog" + +#: ../sitemap-ui.php:555 +msgid "Sitemaps Protocol" +msgstr "Sitemaps Protocol" + +#: ../sitemap-ui.php:556 +msgid "Official Sitemaps FAQ" +msgstr "Official Sitemaps FAQ" + +#: ../sitemap-ui.php:557 +msgid "My Sitemaps FAQ" +msgstr "Ma FAQ" + +#: ../sitemap-ui.php:560 +msgid "Recent Donations:" +msgstr "Dons récents:" + +#: ../sitemap-ui.php:564 +msgid "List of the donors" +msgstr "Liste des donateurs" + +#: ../sitemap-ui.php:566 +msgid "Hide this list" +msgstr "Masquer" + +#: ../sitemap-ui.php:569 +msgid "Thanks for your support!" +msgstr "Merci de votre aide!" + +#: ../sitemap-ui.php:587 +msgid "Status" +msgstr "Statuts" + +#: ../sitemap-ui.php:595 +#, php-format +msgid "The sitemap wasn't built yet. Click here to build it the first time." +msgstr "Cliquez ici pour générer votre premier sitemap." + +#: ../sitemap-ui.php:601 +msgid "Your sitemap was last built on %date%." +msgstr "Dernier sitemap généré le %date%." + +#: ../sitemap-ui.php:603 +msgid "There was a problem writing your sitemap file. Make sure the file exists and is writable. Learn moreen savoir pluszipped) was last built on %date%." +msgstr "Dernier sitemap (zip) généré le %date%." + +#: ../sitemap-ui.php:612 +msgid "There was a problem writing your zipped sitemap file. Make sure the file exists and is writable. Learn moreen savoir plussuccessfully notified about changes." +msgstr "Google a été informé des changements." + +#: ../sitemap-ui.php:621 +msgid "It took %time% seconds to notify Google, maybe you want to disable this feature to reduce the building time." +msgstr "Il a fallu %time% secondes pour informer Google, vous pouvez désactivez cette fonction pour réduire la durée du processus." + +#: ../sitemap-ui.php:624 +#, php-format +msgid "There was a problem while notifying Google. View result" +msgstr "Problème pour informer Google.Voir le résultat" + +#: ../sitemap-ui.php:630 +msgid "YAHOO was successfully notified about changes." +msgstr "Yahoo a été informé des changements." + +#: ../sitemap-ui.php:633 +msgid "It took %time% seconds to notify YAHOO, maybe you want to disable this feature to reduce the building time." +msgstr "Il a fallu %time% secondes pour informer Yahoo, vous pouvez désactivez cette fonction pour réduire la durée du processus." + +#: ../sitemap-ui.php:636 +#, php-format +msgid "There was a problem while notifying YAHOO. View result" +msgstr "Problème pour informer Yahoo.Voir le résultat" + +#: ../sitemap-ui.php:642 +msgid "Bing was successfully notified about changes." +msgstr "Bing a été informé des changements." + +#: ../sitemap-ui.php:645 +msgid "It took %time% seconds to notify Bing, maybe you want to disable this feature to reduce the building time." +msgstr "Il a fallu %time% secondes pour informer Bing, vous pouvez désactivez cette fonction pour réduire la durée du processus." + +#: ../sitemap-ui.php:648 +#, php-format +msgid "There was a problem while notifying Bing. View result" +msgstr "Problème pour informer Bing.Voir le résultat" + +#: ../sitemap-ui.php:654 +msgid "Ask.com was successfully notified about changes." +msgstr "Ask.com a été informé des changements." + +#: ../sitemap-ui.php:657 +msgid "It took %time% seconds to notify Ask.com, maybe you want to disable this feature to reduce the building time." +msgstr "Il a fallu %time% secondes pour informer Ask.com, vous pouvez désactivez cette fonction pour réduire la durée du processus." + +#: ../sitemap-ui.php:660 +#, php-format +msgid "There was a problem while notifying Ask.com. View result" +msgstr "Problème pour informer Ask.com.Voir le résultat" + +#: ../sitemap-ui.php:668 +msgid "The building process took about %time% seconds to complete and used %memory% MB of memory." +msgstr "Le processus a mis environ %time% secondes et utilisé %memory% MB de mémoire." + +#: ../sitemap-ui.php:670 +msgid "The building process took about %time% seconds to complete." +msgstr "Le processus a mis environ %time% secondes." + +#: ../sitemap-ui.php:674 +msgid "The content of your sitemap didn't change since the last time so the files were not written and no search engine was pinged." +msgstr "Le contenu de votre sitemap n'a pas changé depuis la dernière fois. Les fichiers n'ont pas été modifié, et les moteurs de recherche n'ont pas été informé." + +#: ../sitemap-ui.php:682 +msgid "The building process might still be active! Reload the page in a few seconds and check if something has changed." +msgstr "Le processus est encore en cours! Rechargez la page dans quelques secondes et vérifiez si quelque chose a changé." + +#: ../sitemap-ui.php:685 +msgid "The last run didn't finish! Maybe you can raise the memory or time limit for PHP scripts. Learn more" +msgstr "Le dernier processus a échoué! Essayez d'augmenter le mémoire alouée ou la durée limite des scripts PHP En savoir plus" + +#: ../sitemap-ui.php:687 +msgid "The last known memory usage of the script was %memused%MB, the limit of your server is %memlimit%." +msgstr "Mémoire utilisée la dernière fois : %memused%MB (limite du serveur : %memlimit%)" + +#: ../sitemap-ui.php:691 +msgid "The last known execution time of the script was %timeused% seconds, the limit of your server is %timelimit% seconds." +msgstr "Temps d'éxécution la dernière fois : %timeused% secondes (limite du serveur : %timelimit%)" + +#: ../sitemap-ui.php:695 +msgid "The script stopped around post number %lastpost% (+/- 100)" +msgstr "Le script s'est arrêté vers l'article numéro %lastpost% (+/- 100)" + +#: ../sitemap-ui.php:698 +#, php-format +msgid "If you changed something on your server or blog, you should rebuild the sitemap manually." +msgstr "Si vous changez quelquechose sur votre serveur ou sur votre blog, vous devez reconstruire le sitemap manuellement." + +#: ../sitemap-ui.php:700 +#, php-format +msgid "If you encounter any problems with the build process you can use the debug function to get more information." +msgstr "Si vous rencontrez un problème vous pouvez utiliser la fonction de débugage pour avoir plus d'infos." + +#: ../sitemap-ui.php:707 +msgid "Basic Options" +msgstr "Options de base" + +#: ../sitemap-ui.php:709 +msgid "Sitemap files:" +msgstr "Type de fichiers:" + +#: ../sitemap-ui.php:709 +#: ../sitemap-ui.php:724 +#: ../sitemap-ui.php:744 +#: ../sitemap-ui.php:777 +msgid "Learn more" +msgstr "En savoir plus" + +#: ../sitemap-ui.php:714 +msgid "Write a normal XML file (your filename)" +msgstr "Ecrire un fichier XML normal (nom de fichier)" + +#: ../sitemap-ui.php:720 +msgid "Write a gzipped file (your filename + .gz)" +msgstr "Ecrire un fichier gzippé (votre nom de fichier + .gz)" + +#: ../sitemap-ui.php:724 +msgid "Building mode:" +msgstr "Mode de construction:" + +#: ../sitemap-ui.php:729 +msgid "Rebuild sitemap if you change the content of your blog" +msgstr "Générer le sitemap lorsque le contenu du blog change" + +#: ../sitemap-ui.php:736 +msgid "Enable manual sitemap building via GET Request" +msgstr "Activer la génération manuel du sitemap par requête GET" + +#: ../sitemap-ui.php:740 +msgid "This will allow you to refresh your sitemap if an external tool wrote into the WordPress database without using the WordPress API. Use the following URL to start the process: %1 Please check the logfile above to see if sitemap was successfully built." +msgstr "Ceci vous permet de mettre à jour votre sitemap si vous utilisez un outil externe de publication. Utilisez l'adresse suivante pour lancer le processus %1. Vérifiez dans le fichier log que le processus a bien fonctionné." + +#: ../sitemap-ui.php:744 +msgid "Update notification:" +msgstr "Notifications:" + +#: ../sitemap-ui.php:748 +msgid "Notify Google about updates of your Blog" +msgstr "Informer Google des mises à jour du blog" + +#: ../sitemap-ui.php:749 +#, php-format +msgid "No registration required, but you can join the Google Webmaster Tools to check crawling statistics." +msgstr "Pas d'inscription nécessaire, mais vous pouvez vous inscrire sur Google Webmaster Tools pour connaître les statistiques de passage de google" + +#: ../sitemap-ui.php:753 +msgid "Notify Bing (formerly MSN Live Search) about updates of your Blog" +msgstr "Informer Biig des mises à jour du blog" + +#: ../sitemap-ui.php:754 +#, php-format +msgid "No registration required, but you can join the Bing Webmaster Tools to check crawling statistics." +msgstr "Pas d'inscription nécessaire, mais vous pouvez vous inscrire sur bing Webmaster Tools pour connaître les statistiques de passage de Bing" + +#: ../sitemap-ui.php:758 +msgid "Notify Ask.com about updates of your Blog" +msgstr "Informer Ask.com des mises à jour du blog" + +#: ../sitemap-ui.php:759 +msgid "No registration required." +msgstr "Inscription non requise." + +#: ../sitemap-ui.php:763 +msgid "Notify YAHOO about updates of your Blog" +msgstr "Informer Yahoo des mises à jour du blog" + +#: ../sitemap-ui.php:764 +msgid "Your Application ID:" +msgstr "Yahoo ID:" + +#: ../sitemap-ui.php:765 +#, php-format +msgid "Don't you have such a key? Request one here! %s2" +msgstr "Vous n'avez pas de clé Yahoo ?Demandez en une ici! %s2" + +#: ../sitemap-ui.php:770 +msgid "Add sitemap URL to the virtual robots.txt file." +msgstr "Ajouter l'URL du sitemap au fichier virtuel robots.txt" + +#: ../sitemap-ui.php:774 +msgid "The virtual robots.txt generated by WordPress is used. A real robots.txt file must NOT exist in the blog directory!" +msgstr "Le fichier virtuel robots.txt de WordPress est utilisé. Il NE DOIT PAS y avoir de vrai fichier robots.txt dans le répertoire du blog!" + +#: ../sitemap-ui.php:777 +msgid "Advanced options:" +msgstr "Options avancées:" + +#: ../sitemap-ui.php:780 +msgid "Limit the number of posts in the sitemap:" +msgstr "Limiter le nombre d'articles dans le sitemap:" + +#: ../sitemap-ui.php:780 +msgid "Newer posts will be included first" +msgstr "Les nouveaux articles seront ajoutés au début" + +#: ../sitemap-ui.php:783 +msgid "Try to increase the memory limit to:" +msgstr "Essayer d'augmenter la quantité de mémoire alouée:" + +#: ../sitemap-ui.php:783 +msgid "e.g. \"4M\", \"16M\"" +msgstr "ex: \"4M\", \"16M\"" + +#: ../sitemap-ui.php:786 +msgid "Try to increase the execution time limit to:" +msgstr "Essayer d'augmenter la durée limite d'éxécution du script : " + +#: ../sitemap-ui.php:786 +msgid "in seconds, e.g. \"60\" or \"0\" for unlimited" +msgstr "en secondes, ex: \"60\" ou \"0\" pour illimité" + +#: ../sitemap-ui.php:790 +msgid "Include a XSLT stylesheet:" +msgstr "Feuille de style XSLT:" + +#: ../sitemap-ui.php:791 +msgid "Full or relative URL to your .xsl file" +msgstr "Adresse complète ou relative du fichier .xsl" + +#: ../sitemap-ui.php:791 +msgid "Use default" +msgstr "par défaut" + +#: ../sitemap-ui.php:797 +msgid "Enable MySQL standard mode. Use this only if you're getting MySQL errors. (Needs much more memory!)" +msgstr "Active le mode MySQL standard. A n'utiliser que si vous avez des erreurs MySQL. (utilise plus de mémoire!)" + +#: ../sitemap-ui.php:798 +msgid "Upgrade WordPress at least to 2.2 to enable the faster MySQL access" +msgstr "Passez au moins à la version 2.2 de WordPress pour activer l'accès MySQL rapide" + +#: ../sitemap-ui.php:805 +msgid "Build the sitemap in a background process (You don't have to wait when you save a post)" +msgstr "Générer le sitemap en arrière-plan (pas d'attente lors de la sauvegarde d'un article)" + +#: ../sitemap-ui.php:806 +msgid "Upgrade WordPress at least to 2.1 to enable background building" +msgstr "Passez au moins à la version 2.1 pour utiliser la tâche de fond." + +#: ../sitemap-ui.php:813 +msgid "Additional pages" +msgstr "Pages supplémentaires" + +#: ../sitemap-ui.php:816 +msgid "Here you can specify files or URLs which should be included in the sitemap, but do not belong to your Blog/WordPress.
    For example, if your domain is www.foo.com and your blog is located on www.foo.com/blog you might want to include your homepage at www.foo.com" +msgstr "Vous pouvez préciser ici des adresses à inclure dans le sitemap, qui n'appartiennent pas à votre Blog/WordPress.
    Par exemple, si votre domaine est www.truc.com et que votre blog est situé sur www.truc.com/blog, vous pouvez choisir d'inclure la page d'accueil www.truc.com" + +#: ../sitemap-ui.php:818 +#: ../sitemap-ui.php:997 +#: ../sitemap-ui.php:1011 +#: ../sitemap-ui.php:1020 +msgid "Note" +msgstr "Remarque" + +#: ../sitemap-ui.php:819 +msgid "If your blog is in a subdirectory and you want to add pages which are NOT in the blog directory or beneath, you MUST place your sitemap file in the root directory (Look at the "Location of your sitemap file" section on this page)!" +msgstr "Si votre weblog est dans un sous-repertoire et que vous voulez ajouter des pages qui ne sont PAS situées dans le répertoire du blog ou un répertoire en dessous, vous DEVEZ placer votre fichier sitemap dans le répertoire racine (voir la section "Emplacement de votre fichier sitemap" de cette page)!" + +#: ../sitemap-ui.php:821 +#: ../sitemap-ui.php:860 +msgid "URL to the page" +msgstr "URL de la page" + +#: ../sitemap-ui.php:822 +msgid "Enter the URL to the page. Examples: http://www.foo.com/index.html or www.foo.com/home " +msgstr "Indiquez l'URL de la page. Examples: http://www.foo.com/index.html ou www.foo.com/home " + +#: ../sitemap-ui.php:824 +#: ../sitemap-ui.php:861 +msgid "Priority" +msgstr "Priorité" + +#: ../sitemap-ui.php:825 +msgid "Choose the priority of the page relative to the other pages. For example, your homepage might have a higher priority than your imprint." +msgstr "Définissez la priorité de la page par rapport aux autres pages. Par exemple, votre page d'accueil peut avoir une priorité supérieure à celle des autres pages." + +#: ../sitemap-ui.php:827 +#: ../sitemap-ui.php:863 +msgid "Last Changed" +msgstr "Dernière modification" + +#: ../sitemap-ui.php:828 +msgid "Enter the date of the last change as YYYY-MM-DD (2005-12-31 for example) (optional)." +msgstr "Entrez la date de dernière modification au format AAAA-MM-JJ (2005-12-31 par exemple) (facultatif)." + +#: ../sitemap-ui.php:862 +msgid "Change Frequency" +msgstr "Modifier la fréquence" + +#: ../sitemap-ui.php:864 +msgid "#" +msgstr "#" + +#: ../sitemap-ui.php:869 +msgid "No pages defined." +msgstr "Aucune page définie." + +#: ../sitemap-ui.php:874 +msgid "Add new page" +msgstr "Ajouter une nouvelle page" + +#: ../sitemap-ui.php:879 +msgid "Post Priority" +msgstr "Priorité de l'article" + +#: ../sitemap-ui.php:881 +msgid "Please select how the priority of each post should be calculated:" +msgstr "Choisissez comment la priorité de l'article est calculée:" + +#: ../sitemap-ui.php:883 +msgid "Do not use automatic priority calculation" +msgstr "ne pas faire de calcul automatique" + +#: ../sitemap-ui.php:883 +msgid "All posts will have the same priority which is defined in "Priorities"" +msgstr "Tous les articles auront la même priorité" + +#: ../sitemap-ui.php:894 +msgid "Location of your sitemap file" +msgstr "Emplacement de votre fichier sitemap" + +#: ../sitemap-ui.php:897 +msgid "Automatic detection" +msgstr "Détection automatique" + +#: ../sitemap-ui.php:901 +msgid "Filename of the sitemap file" +msgstr "Nom du fichier sitemap" + +#: ../sitemap-ui.php:904 +msgid "Detected Path" +msgstr "Répertoire détecté" + +#: ../sitemap-ui.php:904 +msgid "Detected URL" +msgstr "URL détecté" + +#: ../sitemap-ui.php:909 +msgid "Custom location" +msgstr "Personnalisée" + +#: ../sitemap-ui.php:913 +msgid "Absolute or relative path to the sitemap file, including name." +msgstr "Chemin absolu ou relatif vers le fichier sitemap, nom inclus." + +#: ../sitemap-ui.php:915 +#: ../sitemap-ui.php:924 +msgid "Example" +msgstr "Exemple" + +#: ../sitemap-ui.php:922 +msgid "Complete URL to the sitemap file, including name." +msgstr "URL complet du fichier sitemap, nom inclus." + +#: ../sitemap-ui.php:935 +msgid "Sitemap Content" +msgstr "Contenu du sitemap" + +#: ../sitemap-ui.php:941 +msgid "Include homepage" +msgstr "Inclure la page d'accueil" + +#: ../sitemap-ui.php:947 +msgid "Include posts" +msgstr "Inclure les articles" + +#: ../sitemap-ui.php:953 +msgid "Include following pages of multi-page posts (Increases build time and memory usage!)" +msgstr "Inclure les pages suivantes d'article multi-page (augmente la durée du processus et l'usage de la mémoire)" + +#: ../sitemap-ui.php:959 +msgid "Include static pages" +msgstr "Inclure les pages statiques" + +#: ../sitemap-ui.php:965 +msgid "Include categories" +msgstr "Inclure les catégories" + +#: ../sitemap-ui.php:971 +msgid "Include archives" +msgstr "Inclure les archives" + +#: ../sitemap-ui.php:978 +msgid "Include tag pages" +msgstr "Inclure les pages tags" + +#: ../sitemap-ui.php:985 +msgid "Include author pages" +msgstr "Inclure les pages Auteur" + +#: ../sitemap-ui.php:993 +msgid "Excluded items" +msgstr "Données à exclure" + +#: ../sitemap-ui.php:995 +msgid "Excluded categories" +msgstr "Catégories exclues" + +#: ../sitemap-ui.php:997 +msgid "Using this feature will increase build time and memory usage!" +msgstr "L'utilisation de cette fonction augmente la durée et la mémoire utilisée!" + +#: ../sitemap-ui.php:1004 +#, php-format +msgid "This feature requires at least WordPress 2.5.1, you are using %s" +msgstr "Cette fonction requiert au moins WordPress 2.5.1, vous utilisez %s" + +#: ../sitemap-ui.php:1007 +msgid "Exclude posts" +msgstr "EXclure des articles" + +#: ../sitemap-ui.php:1009 +msgid "Exclude the following posts or pages:" +msgstr "Exclure les articles ou pages suivants:" + +#: ../sitemap-ui.php:1009 +msgid "List of IDs, separated by comma" +msgstr "liste d'ID, séparés par une virgule" + +#: ../sitemap-ui.php:1011 +msgid "Child posts won't be excluded automatically!" +msgstr "Les sous-pages ne seront pas automatiquement exclus!" + +#: ../sitemap-ui.php:1017 +msgid "Change frequencies" +msgstr "Modifier les fréquences" + +#: ../sitemap-ui.php:1021 +msgid "Please note that the value of this tag is considered a hint and not a command. Even though search engine crawlers consider this information when making decisions, they may crawl pages marked \"hourly\" less frequently than that, and they may crawl pages marked \"yearly\" more frequently than that. It is also likely that crawlers will periodically crawl pages marked \"never\" so that they can handle unexpected changes to those pages." +msgstr "Veuillez noter que la valeur de ce champ est considérée comme un indice et non une commande. Même si les robots de moteurs de recherche prennent en compte cette information, il peuvent parcourir les pages marquées "toutes les heures" moins fréquemment que cela, et peuvent parcourir les pages marquées "une fois par an" plus fréquemment que cela. Il est aussi probable que les robots parcourent de façon périodique les pages marquées "jamais" afin de prendre en compte les modifications inattendues de ces pages." + +#: ../sitemap-ui.php:1027 +#: ../sitemap-ui.php:1084 +msgid "Homepage" +msgstr "Page d'accueil" + +#: ../sitemap-ui.php:1033 +msgid "Posts" +msgstr "Articles" + +#: ../sitemap-ui.php:1039 +#: ../sitemap-ui.php:1102 +msgid "Static pages" +msgstr "Pages statiques" + +#: ../sitemap-ui.php:1045 +#: ../sitemap-ui.php:1108 +msgid "Categories" +msgstr "Catégories" + +#: ../sitemap-ui.php:1051 +msgid "The current archive of this month (Should be the same like your homepage)" +msgstr "L'archive du mois en cours (devrait correspondre à votre page d'accueil)" + +#: ../sitemap-ui.php:1057 +msgid "Older archives (Changes only if you edit an old post)" +msgstr "Archives antérieures (ne change que lorsque vous modifier un ancien article)" + +#: ../sitemap-ui.php:1064 +#: ../sitemap-ui.php:1121 +msgid "Tag pages" +msgstr "Pages Tag" + +#: ../sitemap-ui.php:1071 +#: ../sitemap-ui.php:1128 +msgid "Author pages" +msgstr "Pages Auteur" + +#: ../sitemap-ui.php:1079 +msgid "Priorities" +msgstr "Priorités" + +#: ../sitemap-ui.php:1090 +msgid "Posts (If auto calculation is disabled)" +msgstr "Articles (si le calcul automatique est désactivé)" + +#: ../sitemap-ui.php:1096 +msgid "Minimum post priority (Even if auto calculation is enabled)" +msgstr "Priorité minimum des articles (Même si le calcul automatique est activé)" + +#: ../sitemap-ui.php:1114 +msgid "Archives" +msgstr "Archives" + +#: ../sitemap-ui.php:1139 +msgid "Update options" +msgstr "Enregistrer les changements" + +#: ../sitemap-ui.php:1140 +msgid "Reset options" +msgstr "Réinitialiser les options" + +#: ../sitemap-core.php:642 +msgid "Comment Count" +msgstr "Nombre de commentaires" + +#: ../sitemap-core.php:654 +msgid "Uses the number of comments of the post to calculate the priority" +msgstr "Utilise le nombre de commentaires pour calculer la priorité" + +#: ../sitemap-core.php:714 +msgid "Comment Average" +msgstr "Moyenne des commentaires" + +#: ../sitemap-core.php:726 +msgid "Uses the average comment count to calculate the priority" +msgstr "Utilise la moyenne des commentaires pour calculer la priorité" + +#: ../sitemap-core.php:789 +msgid "Popularity Contest" +msgstr "Popularity Contest" + +#: ../sitemap-core.php:801 +msgid "Uses the activated Popularity Contest Plugin from Alex King. See Settings and Most Popular Posts" +msgstr "Utiliser le plugin Popularity Contest d'Alex King. Voir Réglages et Articles les plus populaires" + +#: ../sitemap-core.php:1187 +msgid "Always" +msgstr "Toujours" + +#: ../sitemap-core.php:1188 +msgid "Hourly" +msgstr "Une fois par heure" + +#: ../sitemap-core.php:1189 +msgid "Daily" +msgstr "Une fois par jour" + +#: ../sitemap-core.php:1190 +msgid "Weekly" +msgstr "une fois par semaine" + +#: ../sitemap-core.php:1191 +msgid "Monthly" +msgstr "une fois par mois" + +#: ../sitemap-core.php:1192 +msgid "Yearly" +msgstr "une fois par an" + +#: ../sitemap-core.php:1193 +msgid "Never" +msgstr "Jamais" + +#~ msgid "" +#~ "It took %time% seconds to notify MSN.com, maybe you want to disable this " +#~ "feature to reduce the building time." +#~ msgstr "" +#~ "Il a fallu %time% secondes pour informer MSN, vous pouvez désactivez " +#~ "cette fonction pour réduire la durée du processus." +#~ msgid "" +#~ "There was a problem while notifying MSN.com. View result" +#~ msgstr "Problème pour informer MSN.Voir le résultat" +#~ msgid "" +#~ "No registration required, but you can join the MSN Live " +#~ "Webmaster Tools to check crawling statistics." +#~ msgstr "" +#~ "Pas d'inscription nécessaire, mais vous pouvez vous inscrire sur MSN Live Webmaster Tools pour connaître les statistiques de " +#~ "passage de google" +#~ msgid "XML-Sitemap Generator" +#~ msgstr "XML-Sitemap Generator" +#~ msgid "XML-Sitemap" +#~ msgstr "XML-Sitemap" +#~ msgid "Sitemap FAQ" +#~ msgstr "Ma FAQ" +#~ msgid "Robots.txt file saved" +#~ msgstr "Robots.txt sauvegardé" +#~ msgid "Error while saving Robots.txt file" +#~ msgstr "Erreur lors de l'enregistrement du fichier robots.txt" +#~ msgid "" +#~ "Modify or create %s file in blog root which contains the sitemap location." +#~ msgstr "" +#~ "Modifier ou créer le fichier %s à la racine du blog qui contient " +#~ "l'adresse du sitemap" +#~ msgid "File permissions: " +#~ msgstr "Permission :" +#~ msgid "OK, robots.txt is writable." +#~ msgstr "OK, robots.txt est en écriture" +#~ msgid "Error, robots.txt is not writable." +#~ msgstr "Erreur, robots.txt n'est pas en écriture" +#~ msgid "OK, robots.txt doesn't exist but the directory is writable." +#~ msgstr "OK, robots.txt n'existe pas mais peut être créé" +#~ msgid "Error, robots.txt doesn't exist and the directory is not writable" +#~ msgstr "Erreur, robots.txt n'existe pas et ne peut être créé." +#~ msgid "Manual location" +#~ msgstr "Emplacement manuel" +#~ msgid "OR" +#~ msgstr "OU" +#~ msgid "Error" +#~ msgstr "Erreur" +#~ msgid "" +#~ "A new page was added. Click on "Save page changes" to save your " +#~ "changes." +#~ msgstr "" +#~ "Une nouvelle page a été ajoutée. Cliquez sur "Enregistrer les " +#~ "modifications" pour enregistrer vos modifications" +#~ msgid "" +#~ "The page was deleted. Click on "Save page changes" to save your " +#~ "changes." +#~ msgstr "" +#~ "La page a été effacée. Cliquez sur "Entregistrer les " +#~ "modifications" pour enregistrer vos modifications." +#~ msgid "You changes have been cleared." +#~ msgstr "Vos modifications ont été remises à zero." +#~ msgid "Manual rebuild" +#~ msgstr "Reconstruction manuelle" +#~ msgid "" +#~ "If you want to build the sitemap without editing a post, click on here!" +#~ msgstr "" +#~ "Si vous voulez construire le fichier sitemap sans modifier un article, " +#~ "cliquez ici!" +#~ msgid "Rebuild Sitemap" +#~ msgstr "Reconstruire le fichier Sitemap" +#~ msgid "Save page changes" +#~ msgstr "Enregistrer les modifications de page" +#~ msgid "Undo all page changes" +#~ msgstr "Annuler toutes les modifications de page" +#~ msgid "Delete marked page" +#~ msgstr "Effacer la page marquée" +#~ msgid "" +#~ "Enable automatic priority calculation for posts based on comment count" +#~ msgstr "" +#~ "Autoriser le calcul de priorité automatique pour les articles en fonction " +#~ "du nombre de commentaires" +#~ msgid "Write debug comments" +#~ msgstr "Ecrire des commentaires de debug" +#~ msgid "Auto-Ping Google Sitemaps" +#~ msgstr "Effectuer un ping automatique de Google Sitemaps" +#~ msgid "This option will automatically tell Google about changes." +#~ msgstr "" +#~ "Cette option préviendra automatiquement Google lors de modifications." +#~ msgid "Includings" +#~ msgstr "Inclusions" +#~ msgid "Informations and support" +#~ msgstr "Informations et support" +#~ msgid "" +#~ "Check %s for updates and comment there if you have any problems / " +#~ "questions / suggestions." +#~ msgstr "" +#~ "Allez sur %s pour les mises à jour et pour poster un commentaire en cas " +#~ "de probleme / question / suggestion." +#~ msgid "URL:" +#~ msgstr "URL:" +#~ msgid "Path:" +#~ msgstr "Chemin:" +#~ msgid "Could not write into %s" +#~ msgstr "Impossible d'écrire dans %s" +#~ msgid "Successfully built sitemap file:" +#~ msgstr "Sitemap généré avec succès:" +#~ msgid "Successfully built gzipped sitemap file:" +#~ msgstr "Sitemap gzippé généré avec succès:" +#~ msgid "Could not ping to Google at %s" +#~ msgstr "Ping de Google impossible à %s" +#~ msgid "Successfully pinged Google at %s" +#~ msgstr "Ping de Google réussi à %s" + diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/lang/sitemap-hu_HU.mo Binary file web/wp-content/plugins/google-sitemap-generator/lang/sitemap-hu_HU.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/lang/sitemap-hu_HU.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/google-sitemap-generator/lang/sitemap-hu_HU.po Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,596 @@ +# [Countryname] Language File for sitemap (sitemap-[localname].po) +# Copyright (C) 2005 [name] : [URL] +# This file is distributed under the same license as the WordPress package. +# [name] <[mail-address]>, 2005. +# $Id: sitemap.pot 2502 2005-07-03 20:50:38Z arnee $ +# +msgid "" +msgstr "" +"Project-Id-Version: sitemap\n" +"Report-Msgid-Bugs-To: <[mail-address]>\n" +"POT-Creation-Date: 2005-06-15 00:00+0000\n" +"PO-Revision-Date: 2007-11-05 23:44+0100\n" +"Last-Translator: Cenzi \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language-Team: \n" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:846 +msgid "Comment Count" +msgstr "Kommentek számolása" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:858 +msgid "Uses the number of comments of the post to calculate the priority" +msgstr "Kommentek számának felhasználása a fontosság kiszámításához" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:918 +msgid "Comment Average" +msgstr "Kommentek" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:930 +msgid "Uses the average comment count to calculate the priority" +msgstr "Kommentek számolása, hogy a fontosságot megállapíthassa" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:993 +msgid "Popularity Contest" +msgstr "Gyakori tartalom" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:1005 +msgid "Uses the activated Popularity Contest Plugin from Alex King. See Settings and Most Popular Posts" +msgstr "Uses the activated Popularity Contest Plugin from Alex King. See Settings and Most Popular Posts" + +msgid "XML-Sitemap Generator" +msgstr "Oldaltérkép generátor" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2415 +msgid "XML-Sitemap" +msgstr "XML-Oldaltérkép" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2600 +msgid "Thank you very much for your donation. You help me to continue support and development of this plugin and other free software!" +msgstr "Köszönjük a támogatást. Segíthez a plugin fejlesztésében, hogy mindez ingyenes maradhasson!" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2600 +msgid "Hide this notice" +msgstr "Tanács elrejtése" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2657 +#, php-format +msgid "Thanks for using this plugin! You've installed this plugin over a month ago. If it works and your are satisfied with the results, isn't it worth at least one dollar? Donations help me to continue support and development of this free software! Sure, no problem!" +msgstr "Köszönjük, hogy ezt a plugint használja! Kb. egy hónapja telepítette a plugint. Ha jól működik, és elégedett az eredményekkel, akkor nem adományozna a fejlesztéshez egy keveset? Adományok segíthetnek a fejleszésekben, hogy ez a plugin ingyenes maradhasson! Persze, nem probléma!" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2657 +msgid "No thanks, please don't bug me anymore!" +msgstr "Köszönöm, nem. Ne jelenjen meg többet." + +msgid "XML Sitemap Generator for WordPress" +msgstr "Oldaltérkép generátor WordPresshez" + +msgid "Configuration updated" +msgstr "Beállítások frissítve!" + +msgid "Error while saving options" +msgstr "Hiba az oldalak mentésekor" + +msgid "Pages saved" +msgstr "Oldalak mentve" + +msgid "Error while saving pages" +msgstr "Hiba az oldalak mentésekor" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2748 +#, php-format +msgid "Robots.txt file saved" +msgstr "Robots.txt fájl elmentve" + +msgid "Error while saving Robots.txt file" +msgstr "Hiba aa Robots.txt fájl mentésekor" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2758 +msgid "The default configuration was restored." +msgstr "Alap beállítás visszaállítva." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2851 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2868 +msgid "open" +msgstr "megnyit" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2852 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2869 +msgid "close" +msgstr "bezár" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2853 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2870 +msgid "click-down and drag to move this box" +msgstr "kattintson rá, és ragadja meg ezt a dobozt" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2854 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2871 +msgid "click to %toggle% this box" +msgstr "kattintson, hogy %toggle% ezt a dobozt" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2855 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2872 +msgid "use the arrow keys to move this box" +msgstr "használja a mozgatáshoz a jobbra, balra, fel és le billentyűket" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2856 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2873 +msgid ", or press the enter key to %toggle% it" +msgstr ", vagy nyomja meg az enter gombot az %toggle% -hez." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2884 +msgid "About this Plugin:" +msgstr "Pluginról:" + +msgid "Plugin Homepage" +msgstr "Plugin főoldal" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2887 +msgid "Notify List" +msgstr "Értesítések" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2888 +msgid "Support Forum" +msgstr "Fórum" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2889 +msgid "Donate with PayPal" +msgstr "Adományozás (PayPal)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2890 +msgid "My Amazon Wish List" +msgstr "My Amazon kívánságlista" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2891 +msgid "translator_name" +msgstr "Cenzi" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2891 +msgid "translator_url" +msgstr "http://blog.cenzi.hu" + +msgid "Sitemap Resources:" +msgstr "Oldaltérkép eredmények:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2897 +msgid "Webmaster Tools" +msgstr "Webmaster Tools" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2898 +msgid "Webmaster Blog" +msgstr "Webmaster Blog" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2900 +msgid "Site Explorer" +msgstr "Oldal böngészése" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2901 +msgid "Search Blog" +msgstr "Kereső blog" + +msgid "Sitemaps Protocol" +msgstr "Oldaltérkép protokol" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2904 +msgid "Official Sitemaps FAQ" +msgstr "Hivatalos oldaltérképek GYIK" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2905 +msgid "My Sitemaps FAQ" +msgstr "Oldaltérképek GYIK" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2910 +msgid "Recent Donations:" +msgstr "Adományok:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2914 +msgid "List of the donors" +msgstr "Adományozók listája" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2916 +msgid "Hide this list" +msgstr "Lista elrejtése" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2919 +msgid "Thanks for your support!" +msgstr "Köszönjük a támogatást!" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2931 +msgid "Status" +msgstr "Állapot" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2941 +#, php-format +msgid "The sitemap wasn't built yet. Click here to build it the first time." +msgstr "Az oldaltérkép még nem készült el. Kattints ide az elkészítéséhez." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2947 +msgid "Your sitemap was last built on %date%." +msgstr "Az oldaltérkép legutóbbi felépítése: %date%." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2949 +msgid "There was a problem writing your sitemap file. Make sure the file exists and is writable. Learn moreTovábbzipped) was last built on %date%." +msgstr "Az oldaltérképed (tömörésének) ideje: %date%." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2958 +msgid "There was a problem writing your zipped sitemap file. Make sure the file exists and is writable. Learn moreTovábbsuccessfully notified about changes." +msgstr "Google sikeresen értesítve lett a változásokról." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2967 +msgid "It took %time% seconds to notify Google, maybe you want to disable this feature to reduce the building time." +msgstr "%time% másodpercbe telt a Google értesítése, de kikapcsolható ez a funkció." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3011 +#, php-format +msgid "There was a problem while notifying Google. View result" +msgstr "Probléma merült fel a Google értesítésénél. Eredmény megtekintése" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2976 +msgid "YAHOO was successfully notified about changes." +msgstr "YAHOO sikeresen értesítve lett a változásokról." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2979 +msgid "It took %time% seconds to notify YAHOO, maybe you want to disable this feature to reduce the building time." +msgstr "%time% másodpercbe telt a YAHOO értesítése, de kikapcsolható ez a funkció." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3023 +#, php-format +msgid "There was a problem while notifying YAHOO. View result" +msgstr "Probléma merült fel a YAHOO értesítésénél. Eredmény megtekintése" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2988 +msgid "Ask.com was successfully notified about changes." +msgstr "Ask.com sikeresen értesítve lett a változásokról." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2991 +msgid "It took %time% seconds to notify Ask.com, maybe you want to disable this feature to reduce the building time." +msgstr "%time% másodpercbe telt a Ask.com értesítése, de kikapcsolható ez a funkció." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3035 +#, php-format +msgid "There was a problem while notifying Ask.com. View result" +msgstr "Probléma merült fel a Ask.com értesítésénél. Eredmény megtekintése" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3002 +msgid "The building process took about %time% seconds to complete and used %memory% MB of memory." +msgstr "Felépítési folyamat kb. %time% másodperc ami %memory% MB memóriát használ fel." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3004 +msgid "The building process took about %time% seconds to complete." +msgstr "Felépítési folyamat kb. %time% másodperc." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3008 +msgid "The content of your sitemap didn't change since the last time so the files were not written and no search engine was pinged." +msgstr "Az oldaltérkép tartalma nem változott, ezért nem lesznek a keresők megpingelve." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3012 +msgid "The last run didn't finish! Maybe you can raise the memory or time limit for PHP scripts. Learn more" +msgstr "Nem sikerült! Talán kevés a memória. Tovább" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3014 +msgid "The last known memory usage of the script was %memused%MB, the limit of your server is %memlimit%." +msgstr "Az utolsó memóriahasználat %memused%MB volt, a memórialimit: %memlimit%." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3018 +msgid "The last known execution time of the script was %timeused% seconds, the limit of your server is %timelimit% seconds." +msgstr "Az utolsó script használat %timeused% másodperc, a szervered limite: %timelimit% másodperc." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3022 +msgid "The script stopped around post number %lastpost% (+/- 100)" +msgstr "A script megállt megközelítőleg a következő bejegyzési számnál: %lastpost% (+/- 100)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3025 +#, php-format +msgid "If you changed something on your server or blog, you should rebuild the sitemap manually." +msgstr "Ha valamilyen változás történik a blogodon vagy szervereden, akkor ajánlatos az oldaltérkép újraépítése kézzel." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3027 +#, php-format +msgid "If you encounter any problems with the build process you can use the debug function to get more information." +msgstr "Ha felmerül valamilyen probléma a felépítési folyamat során, akkor futtasd le a debug funkciót a további információért." + +msgid "Basic Options" +msgstr "Alap beállítások" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3044 +msgid "Sitemap files:" +msgstr "Oldaltérkép fájlok:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3044 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3059 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3079 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3104 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3121 +msgid "Learn more" +msgstr "Tovább" + +msgid "Write a normal XML file (your filename)" +msgstr "Normál XML fájl írása (fájlnév)" + +msgid "Write a gzipped file (your filename + .gz)" +msgstr "Gzippelt fájl írása (fájlév + .gz)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3059 +msgid "Building mode:" +msgstr "Felépítési mód:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3064 +msgid "Rebuild sitemap if you change the content of your blog" +msgstr "Oldaltérkép újraépítése, ha a blogod tartalma megváltozott" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3071 +msgid "Enable manual sitemap building via GET Request" +msgstr "Kézi oldaltérkép engedélyezése a GET Request segítségével" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3075 +msgid "This will allow you to refresh your sitemap if an external tool wrote into the WordPress database without using the WordPress API. Use the following URL to start the process: %1 Please check the logfile above to see if sitemap was successfully built." +msgstr "Ez engedélyezni fogja az oldaltérkép frissülését a WordPress adatbázisban. Használd a következő címet a folyamat elindításához: %1 Ellenőrizd a naplózó fájlt, hogy a folyamat befejeződött-e." + +msgid "Update notification:" +msgstr "Frissítési értesítések" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3083 +msgid "Notify Google about updates of your Blog" +msgstr "Google értesítése a blogod frissülésekor" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3084 +#, php-format +msgid "No registration required, but you can join the Google Webmaster Tools to check crawling statistics." +msgstr "Nincs szükség a regisztráláshoz, de csatlakozhatsz a Google Webmaster Tools programhoz, hogy ellenőrizhesd a robotok statisztikáját." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3088 +msgid "Notify Ask.com about updates of your Blog" +msgstr "Ask.com értesítése a blogod frissítésekor" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3089 +msgid "No registration required." +msgstr "Nincs szükség a regisztrációhoz." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3093 +msgid "Notify YAHOO about updates of your Blog" +msgstr "YAHOO értesítése a blogod frissítésekor" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3094 +#, php-format +msgid "No registration required, but you can sign up for the YAHOO Site Explorer to view the crawling progress." +msgstr "Nincs szükség a regisztráláshoz, de csatlakozhatsz a YAHOO Site Explorer programhoz, hogy ellenőrizhesd a robotok statisztikáját." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3099 +#, php-format +msgid "Modify or create %s file in blog root which contains the sitemap location." +msgstr "%s fájl elkészítése vagy módosítása." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3102 +msgid "File permissions: " +msgstr "Fájl engedélyek:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3107 +msgid "OK, robots.txt is writable." +msgstr "OK, robots.txt írható." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3109 +msgid "Error, robots.txt is not writable." +msgstr "Hiba, robots.txt nem írható." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3113 +msgid "OK, robots.txt doesn't exist but the directory is writable." +msgstr "OK, robots.txt nem létezik, de a könyvtár írható." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3115 +msgid "Error, robots.txt doesn't exist and the directory is not writable" +msgstr "Hiba, robots.txt nem létezik és a könyvtár nem írható." + +msgid "Advanced options:" +msgstr "Haladó beállítások:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3124 +msgid "Limit the number of posts in the sitemap:" +msgstr "Bejegyzések számának limitálása az oldaltérképben:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3124 +msgid "Newer posts will be included first" +msgstr "Újabb bejegyzések előre kerülnek" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3127 +msgid "Try to increase the memory limit to:" +msgstr "Próbáld meg a memória limit emelését:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3127 +msgid "e.g. \"4M\", \"16M\"" +msgstr "pl. \"4M\", \"16M\"" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3130 +msgid "Try to increase the execution time limit to:" +msgstr "Próbáld meg a végrehajtási idő emelését:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3130 +msgid "in seconds, e.g. \"60\" or \"0\" for unlimited" +msgstr "másodpercekben pl. \"60\" vagy \"0\" a korlátlanért" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3133 +msgid "Include a XSLT stylesheet:" +msgstr "XSLT stíluslap mellékelése:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3133 +msgid "Use Default" +msgstr "Alapbeállítás használata" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3133 +msgid "Full or relative URL to your .xsl file" +msgstr "Teljes vagy relatív URL elérése a .xsl fájlhoz" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3152 +msgid "Enable MySQL standard mode. Use this only if you're getting MySQL errors. (Needs much more memory!)" +msgstr "Alap MySQL mód engedélyezése. Ezt csak akkor használd, ha MySQL hibákat tapasztalsz. (Sokkal több memóriára lesz szükség!)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3166 +msgid "Build the sitemap in a background process (You don't have to wait when you save a post)" +msgstr "Háttérfolyamatként építse fel az oldaltérképet (Nem kell várni, amíg a bejegyzést elmented)" + +msgid "Additional pages" +msgstr "Oldalak" + +msgid "Here you can specify files or URLs which should be included in the sitemap, but do not belong to your Blog/WordPress.
    For example, if your domain is www.foo.com and your blog is located on www.foo.com/blog you might want to include your homepage at www.foo.com" +msgstr "Be tudod állítani azokat a fájlokat, amelyek nem tartoznak a blogodhoz.
    Például, ha a domainod www.akarmi.hu és a blogod a www.akarmi.hu/blog címen van, beleteheted a www.akarmi.hu címet is az oldaltérképbe." + +msgid "Note" +msgstr "Megjegyzés" + +msgid "If your blog is in a subdirectory and you want to add pages which are NOT in the blog directory or beneath, you MUST place your sitemap file in the root directory (Look at the "Location of your sitemap file" section on this page)!" +msgstr "Ha a blogod egy alkönyvtárban van és olyan oldalakat szeretnél felvenni, amelyek nincsennek a blog könyvtárában, akkor a gyökér könyvtárban kell elhelyeznek az oldaltérképet." + +msgid "URL to the page" +msgstr "Oldal URL-je" + +msgid "Enter the URL to the page. Examples: http://www.foo.com/index.html or www.foo.com/home " +msgstr "Írd be az oldal URL-jét. Például: http://www.akarmi.hu/index.html vagy www.akarmi.hu/home" + +msgid "Priority" +msgstr "Fontosság" + +msgid "Choose the priority of the page relative to the other pages. For example, your homepage might have a higher priority than your imprint." +msgstr "Válaszd ki az oldalak fontosságát. Például, a kezdőlapod lehet, hogy fontosabb, mint az aloldalak." + +msgid "Last Changed" +msgstr "Utolsó módosítás" + +msgid "Enter the date of the last change as YYYY-MM-DD (2005-12-31 for example) (optional)." +msgstr "Írd be az utolsó módosítást YYYY-MM-DD (példaként: 2007-08-12) (ajánlott)." + +msgid "Change Frequency" +msgstr "Változások gyakorisága" + +msgid "#" +msgstr "#" + +msgid "No pages defined." +msgstr "Nincs oldal beállítva." + +msgid "Add new page" +msgstr "Új oldal felvétele" + +msgid "Post Priority" +msgstr "Bejegyzés fontossága" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3329 +msgid "Please select how the priority of each post should be calculated:" +msgstr "Válaszd ki, hogyan működjön a fontosság kalkulálása" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3331 +msgid "Do not use automatic priority calculation" +msgstr "Ne használja az automatikus fontosság kalkulálását" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3331 +msgid "All posts will have the same priority which is defined in "Priorities"" +msgstr "Minden bejegyzés azonos fontosságú ami a "Fontosságok" alatt lett beállítva" + +msgid "Location of your sitemap file" +msgstr "Oldaltérkép fájl elérése" + +msgid "Automatic detection" +msgstr "Automatikus megállapítás" + +msgid "Filename of the sitemap file" +msgstr "Oldaltérkép fájl neve" + +msgid "Detected Path" +msgstr "Elérés" + +msgid "Detected URL" +msgstr "URL megállapítása" + +msgid "Custom location" +msgstr "Egyéni elérés" + +msgid "Absolute or relative path to the sitemap file, including name." +msgstr "Abszolút vagy relatív elérése az oldaltérkép fájlnak (fájl-névvel együtt)." + +msgid "Example" +msgstr "Példa" + +msgid "Complete URL to the sitemap file, including name." +msgstr "Teljes URL-je az oldaltérkép fájlnak (fájl-névvel együtt)." + +msgid "Sitemap Content" +msgstr "Oldaltérkép tartalma" + +msgid "Include homepage" +msgstr "Főoldal mellékelése" + +msgid "Include posts" +msgstr "Bejegyzések mellékelése" + +msgid "Include static pages" +msgstr "Statikus oldalak mellékelése" + +msgid "Include categories" +msgstr "Kategóriák mellékelése" + +msgid "Include archives" +msgstr "Arhívumok mellékelése" + +msgid "Include tag pages" +msgstr "Címkék oldalak melléklése" + +msgid "Include author pages" +msgstr "Szerző oldalak melléklése" + +msgid "Change frequencies" +msgstr "Változások gyakorisága" + +msgid "Please note that the value of this tag is considered a hint and not a command. Even though search engine crawlers consider this information when making decisions, they may crawl pages marked \"hourly\" less frequently than that, and they may crawl pages marked \"yearly\" more frequently than that. It is also likely that crawlers will periodically crawl pages marked \"never\" so that they can handle unexpected changes to those pages." +msgstr "Please note that the value of this tag is considered a hint and not a command. Even though search engine crawlers consider this information when making decisions, they may crawl pages marked \"hourly\" less frequently than that, and they may crawl pages marked \"yearly\" more frequently than that. It is also likely that crawlers will periodically crawl pages marked \"never\" so that they can handle unexpected changes to those pages." + +msgid "Homepage" +msgstr "Főoldal" + +msgid "Posts" +msgstr "Bejegyzések" + +msgid "Static pages" +msgstr "Statikus oldal" + +msgid "Categories" +msgstr "Kategóriák" + +msgid "The current archive of this month (Should be the same like your homepage)" +msgstr "Jelenlegi hónap arhívuma (Megegyezik az oldaladéval)" + +msgid "Older archives (Changes only if you edit an old post)" +msgstr "Régi archívumok (Ha egy régi bejegyzést módosítottál)" + +msgid "Tag pages" +msgstr "Címkék oldalak" + +msgid "Author pages" +msgstr "Szerző oldalak" + +msgid "Priorities" +msgstr "Fontosságok" + +msgid "Posts (If auto calculation is disabled)" +msgstr "Bejegyzések (Ha az automatikus kalkulálás ki van kapcsolva)" + +msgid "Minimum post priority (Even if auto calculation is enabled)" +msgstr "Minimum bejegyzések fontossága (Ha az automatikus kalkulálás engedélyezve van)" + +msgid "Archives" +msgstr "Archívumok" + +msgid "Update options" +msgstr "Beállítások frissítése" + +msgid "Reset options" +msgstr "Beállítások visszaállítása" + diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/lang/sitemap-it_IT.mo Binary file web/wp-content/plugins/google-sitemap-generator/lang/sitemap-it_IT.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/lang/sitemap-it_IT.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/google-sitemap-generator/lang/sitemap-it_IT.po Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,938 @@ +msgid "" +msgstr "" +"Project-Id-Version: Google Sitemap Generator in italiano\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-08-24 00:20+0100\n" +"PO-Revision-Date: 2009-08-24 19:14+0100\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" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:846 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:642 +msgid "Comment Count" +msgstr "Numero dei commenti" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:858 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:654 +msgid "Uses the number of comments of the post to calculate the priority" +msgstr "Utilizza per calcolare la priorità il numero dei commenti all'articolo" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:918 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:714 +msgid "Comment Average" +msgstr "Media dei commenti" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:930 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:726 +msgid "Uses the average comment count to calculate the priority" +msgstr "Utilizza per calcolare la priorità la media dei commenti" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:993 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:789 +msgid "Popularity Contest" +msgstr "Popularity Contest" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:1005 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:801 +msgid "Uses the activated Popularity Contest Plugin from Alex King. See Settings and Most Popular Posts" +msgstr "Utilizza il plugin attivato a nomePopularity Contest di Alex King. Vai sotto Impostazioni quindi Most Popular Posts" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:1191 +msgid "Always" +msgstr "sempre" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:1192 +msgid "Hourly" +msgstr "ogni ora" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:1193 +msgid "Daily" +msgstr "ogni giorno" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:1194 +msgid "Weekly" +msgstr "settimanalmente" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:1195 +msgid "Monthly" +msgstr "mensilmente" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:1196 +msgid "Yearly" +msgstr "annualmente" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:1197 +msgid "Never" +msgstr "mai" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2600 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:97 +msgid "Thank you very much for your donation. You help me to continue support and development of this plugin and other free software!" +msgstr "Grazie per la tua donazione. Mi hai aiutato nel proseguire lo sviluppo ed il supporto per questo plugin e per dell'altro software gratuito!" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2600 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:97 +msgid "Hide this notice" +msgstr "Nascondi questo annuncio" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2657 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:103 +#, php-format +msgid "Thanks for using this plugin! You've installed this plugin over a month ago. If it works and your are satisfied with the results, isn't it worth at least one dollar? Donations help me to continue support and development of this free software! Sure, no problem!" +msgstr "Grazie per l'utilizzo di questo plugin! Tu hai installato questo plugin più di un mese fa. Qualora funzionasse correttamente e tu fossi soddisfatto per i risultati, perché non donarmi un dollaro? Le donazioni mi aiuteranno nel proseguire lo sviluppo ed il supporto per questo plugin gratuito! Ecco la mia offerta!" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2657 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:103 +msgid "No thanks, please don't bug me anymore!" +msgstr "No grazie. Non scocciarmi più!" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:67 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:114 +msgid "Your sitemap is being refreshed at the moment. Depending on your blog size this might take some time!" +msgstr "La tua sitemap sta per essere rigenerata. In relazione alla dimensione del tuo blog potrebbe occorrere un po' di tempo!" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:69 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:116 +#, php-format +msgid "Your sitemap will be refreshed in %s seconds. Depending on your blog size this might take some time!" +msgstr "La tua sitemap verrà rigenerata in %s secondi. In relazione alla dimensione del tuo blog potrebbe occorrere un po' di tempo!" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:145 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:448 +msgid "XML Sitemap Generator for WordPress" +msgstr "XML Sitemap Generator per WordPress" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:293 +msgid "Configuration updated" +msgstr "Configurazione aggiornata" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:294 +msgid "Error while saving options" +msgstr "Errore durante il savataggio delle opzioni" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:296 +msgid "Pages saved" +msgstr "Pagine salvate" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:297 +msgid "Error while saving pages" +msgstr "Errore durante il salvataggio delle pagine" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2758 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:304 +msgid "The default configuration was restored." +msgstr "La configurazione predefinita é stata ripristinata." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:374 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:461 +#, php-format +msgid "There is a new version of %1$s available. Download version %3$s here." +msgstr "E' disponibile una nuova versione di %1$s. Scarica qui la versione %3$s." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:376 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:463 +#, php-format +msgid "There is a new version of %1$s available. Download version %3$s here automatic upgrade unavailable for this plugin." +msgstr "E' disponibile una nuova versione di %1$s. Scarica qui la versione %3$s l'aggiornamento automatico non é disponibile per questo plugin." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:378 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:465 +#, php-format +msgid "There is a new version of %1$s available. Download version %3$s here or upgrade automatically." +msgstr "E' disponibile una nuova versione di %1$s. Scarica qui la versione %3$s oppure aggiorna in automatico." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2851 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2868 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:488 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:505 +msgid "open" +msgstr "apri" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2852 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2869 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:489 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:506 +msgid "close" +msgstr "chiudi" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2853 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2870 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:490 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:507 +msgid "click-down and drag to move this box" +msgstr "clicca verso il basso e trascina per spostare questo riquadro" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2854 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2871 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:491 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:508 +msgid "click to %toggle% this box" +msgstr "clicca per %toggle% questo riquadro" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2855 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2872 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:492 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:509 +msgid "use the arrow keys to move this box" +msgstr "udsa il tasto freccia per spostare questo riquadro" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2856 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2873 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:493 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:510 +msgid ", or press the enter key to %toggle% it" +msgstr ", oppure premi il tasto Invio per %toggle%" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2884 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:528 +msgid "About this Plugin:" +msgstr "Info plugin:" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:529 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap.php:153 +msgid "Plugin Homepage" +msgstr "Plugin Homepage" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:421 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:530 +msgid "Suggest a Feature" +msgstr "Suggerimenti" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2887 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:531 +msgid "Notify List" +msgstr "Lista notifiche" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2888 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:532 +msgid "Support Forum" +msgstr "Forum di supporto" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:424 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:533 +msgid "Report a Bug" +msgstr "Segnala un errore" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2889 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:535 +msgid "Donate with PayPal" +msgstr "Dona con PayPal" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2890 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:536 +msgid "My Amazon Wish List" +msgstr "La mia Amazon Wish List" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2891 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:537 +msgid "translator_name" +msgstr "Gianni Diurno" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2891 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:537 +msgid "translator_url" +msgstr "http://gidibao.net/" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:540 +msgid "Sitemap Resources:" +msgstr "Risorse Sitemap:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2897 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:541 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:547 +msgid "Webmaster Tools" +msgstr "Webmaster Tools" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2898 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:542 +msgid "Webmaster Blog" +msgstr "Webmaster Blog" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2900 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:544 +msgid "Site Explorer" +msgstr "Site Explorer" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2901 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:545 +msgid "Search Blog" +msgstr "Search Blog" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3010 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:548 +msgid "Webmaster Center Blog" +msgstr "Webmaster Center Blog" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:550 +msgid "Sitemaps Protocol" +msgstr "Protocollo Sitemap" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2904 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:551 +msgid "Official Sitemaps FAQ" +msgstr "FAQ ufficiale Sitemap" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2905 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:552 +msgid "My Sitemaps FAQ" +msgstr "La mia Sitemaps FAQ" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2910 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:555 +msgid "Recent Donations:" +msgstr "Contributi recenti:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2914 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:559 +msgid "List of the donors" +msgstr "Lista dei donatori" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2916 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:561 +msgid "Hide this list" +msgstr "Nascondi questa lista" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2919 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:564 +msgid "Thanks for your support!" +msgstr "Grazie per il tuo supporto!" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:584 +msgid "The sitemap wasn't generated yet." +msgstr "La sitemap non é stata ancora generata." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:587 +msgid "Result of the last build process, started on %date%." +msgstr "Risultato dell'ultimo processo di generazione, avviato il %date%." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2941 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:596 +#, php-format +msgid "The sitemap wasn't built yet. Click here to build it the first time." +msgstr "La sitemap non é stata ancora generatat. Clicca qui per costruirla la prima volta." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2947 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:602 +msgid "Your sitemap was last built on %date%." +msgstr "La tua sitemap é stata generata il %date%." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:603 +msgid "The last build succeeded, but the file was deleted later or can't be accessed anymore. Did you move your blog to another server or domain?" +msgstr "La generazione é avvenuta con successo ma pare che il file é stato cancellato oppure non sia più accessibile. Hai forse spostato il tuo blog su di un altro server oppure hai cambiato il dominio?" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2949 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:605 +msgid "There was a problem writing your sitemap file. Make sure the file exists and is writable. Learn more" +msgstr "Si é verificato un problema durante la scrittura del file sitemap. Assicurati che il file esista e sia scrivibile. Info" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2956 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:612 +msgid "Your sitemap (zipped) was last built on %date%." +msgstr "La tua sitemap (archivio .zip) é stata generata il %date%." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:613 +msgid "The last zipped build succeeded, but the file was deleted later or can't be accessed anymore. Did you move your blog to another server or domain?" +msgstr "La creazione del file .zip é avvenuta con successo ma pare che il file é stato cancellato oppure non sia più accessibile. Hai forse spostato il tuo blog su di un altro server oppure hai cambiato il dominio?" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2958 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:615 +msgid "There was a problem writing your zipped sitemap file. Make sure the file exists and is writable. Learn more" +msgstr "Si é verificato un problema durante la scrittura del file .zip della sitemap. Assicurati che il file esista e sia scrivibile . Info" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2964 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:621 +msgid "Google was successfully notified about changes." +msgstr "Google ha ricevuto con successo la notifica dei cambiamenti." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2967 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:624 +msgid "It took %time% seconds to notify Google, maybe you want to disable this feature to reduce the building time." +msgstr "Sono stati necessari %time% secondi per la notifica a Google, meglio disattivare questa funzione in modo tale da poter ridurre i tempi di generazione." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3011 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:627 +#, php-format +msgid "There was a problem while notifying Google. View result" +msgstr "Si é verificato un errore durante la notifica a Google. Vedi risultato" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2976 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:633 +msgid "YAHOO was successfully notified about changes." +msgstr "YAHOO ha ricevuto con successo la notifica dei cambiamenti." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2979 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:636 +msgid "It took %time% seconds to notify YAHOO, maybe you want to disable this feature to reduce the building time." +msgstr "Sono stati necessari %time% secondi per la notifica a YAHOO, meglio disattivare questa funzione in modo tale da poter ridurre i tempi di generazione." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3023 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:639 +#, php-format +msgid "There was a problem while notifying YAHOO. View result" +msgstr "Si é verificato un errore durante la notifica a YAHOO. Vedi risultato" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3097 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:645 +msgid "Bing was successfully notified about changes." +msgstr "Bing ha ricevuto con successo la notifica dei cambiamenti." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2967 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:648 +msgid "It took %time% seconds to notify Bing, maybe you want to disable this feature to reduce the building time." +msgstr "Sono stati necessari %time% secondi per la notifica a Bing, meglio disattivare questa funzione in modo tale da poter ridurre i tempi di generazione." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3011 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:651 +#, php-format +msgid "There was a problem while notifying Bing. View result" +msgstr "Si é verificato un errore durante la notifica a Bing. Vedi risultato" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2988 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:657 +msgid "Ask.com was successfully notified about changes." +msgstr "Ask.com ha ricevuto con successo la notifica dei cambiamenti." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2991 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:660 +msgid "It took %time% seconds to notify Ask.com, maybe you want to disable this feature to reduce the building time." +msgstr "Sono stati necessari %time% secondi per la notifica a Ask.com, meglio disattivare questa funzione in modo tale da poter ridurre i tempi di generazione." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3035 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:663 +#, php-format +msgid "There was a problem while notifying Ask.com. View result" +msgstr "Si é verificato un errore durante la notifica a Ask.com. Vedi risultato" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3002 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:671 +msgid "The building process took about %time% seconds to complete and used %memory% MB of memory." +msgstr "Sono stati necessari circa %time% secondi per completare il processo di costruzione e sono stati utilizzati %memory% MB di memoria." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3004 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:673 +msgid "The building process took about %time% seconds to complete." +msgstr "Sono stati necessari circa %time% secondi per completare il processo." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3008 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:677 +msgid "The content of your sitemap didn't change since the last time so the files were not written and no search engine was pinged." +msgstr "Il contenuto della tua sitemap non cambierà sino all'ultimo momento in modo tale che i file non scritti e nessun motore di ricerca ricevano il ping." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:586 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:685 +msgid "The building process might still be active! Reload the page in a few seconds and check if something has changed." +msgstr "La procedura di costruzione é ancora in atto! Ricarica tra alcuni secondi la pagina e verifica quindi se qualcosa fosse cambiato." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3012 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:688 +msgid "The last run didn't finish! Maybe you can raise the memory or time limit for PHP scripts. Learn more" +msgstr "L'ultima operazione non é ancora conclusa! Forse é necessario che tu aumenti la memoria oppure il limite di tempo per gli scripts PHP. Info" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3014 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:690 +msgid "The last known memory usage of the script was %memused%MB, the limit of your server is %memlimit%." +msgstr "L'ultimo utilizzo di memoria conosciuto per lo script é %memused%MB, il limite del tuo server é %memlimit%." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3018 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:694 +msgid "The last known execution time of the script was %timeused% seconds, the limit of your server is %timelimit% seconds." +msgstr "L'ultimo tempo di esecuzione dello script é stato di %timeused% secondi, il limite del tuo server é di %timelimit% secondi." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3022 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:698 +msgid "The script stopped around post number %lastpost% (+/- 100)" +msgstr "Lo script si é fermato intorno al post numero %lastpost% (+/- 100)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3025 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:701 +#, php-format +msgid "If you changed something on your server or blog, you should rebuild the sitemap manually." +msgstr "Qualora avessi modificato qualcosa nel tuo blog o server dovrai rigenerare la sitemap manualmente." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3027 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:703 +#, php-format +msgid "If you encounter any problems with the build process you can use the debug function to get more information." +msgstr "Nel caso in cui rilevassi un qualche problema durante il processo di generazione, utilizza la funzione debug per ottenere maggiori informazioni." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:710 +msgid "Basic Options" +msgstr "Opzioni di Base" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3044 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:712 +msgid "Sitemap files:" +msgstr "File Sitemap:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3044 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3059 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3079 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3104 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3121 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:712 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:727 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:747 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:780 +msgid "Learn more" +msgstr "altre info" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:717 +msgid "Write a normal XML file (your filename)" +msgstr "Scrivi un normale file XML (nome del file)" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:723 +msgid "Write a gzipped file (your filename + .gz)" +msgstr "Scrivi un file gzip (il nome del file + .gz)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3059 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:727 +msgid "Building mode:" +msgstr "Modalità generazione:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3064 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:732 +msgid "Rebuild sitemap if you change the content of your blog" +msgstr "Rigenera la sitemap quando cambi il contenuto del tuo blog" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3071 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:739 +msgid "Enable manual sitemap building via GET Request" +msgstr "Abilita la generazione manuale della sitemap via GET Request" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3075 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:743 +msgid "This will allow you to refresh your sitemap if an external tool wrote into the WordPress database without using the WordPress API. Use the following URL to start the process: %1 Please check the result box above to see if sitemap was successfully built." +msgstr "Questa operazione ti permetterà di rigenerare la sitemap qualora uno strumento esterno abbia operato una scrittura nel database di WordPress senza l'utilizzo della WordPress API. Utilizza l'URL a seguire per avviare il processo: %1 Verifica nel registro qui sopra se la generazione della sitemap é avvenuta con successo." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:747 +msgid "Update notification:" +msgstr "Notifica aggiornamenti:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3083 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:751 +msgid "Notify Google about updates of your Blog" +msgstr "Segnala a Google gli aggiornamenti del tuo blog" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3084 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:752 +#, php-format +msgid "No registration required, but you can join the Google Webmaster Tools to check crawling statistics." +msgstr "Non é richiesta alcuna registrazione, vedi Google Webmaster Tools per le relative informazioni." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3209 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:756 +msgid "Notify Bing (formerly MSN Live Search) about updates of your Blog" +msgstr "Segnala a Bing (ex MSN Live Search) gli aggiornamenti del tuo blog" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3084 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:757 +#, php-format +msgid "No registration required, but you can join the Bing Webmaster Tools to check crawling statistics." +msgstr "Non é richiesta alcuna registrazione, vai alla pagina Bing Webmaster Tools per verificare le statistiche." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3088 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:761 +msgid "Notify Ask.com about updates of your Blog" +msgstr "Segnala ad Ask.com gli aggiornamenti del tuo blog" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3089 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:762 +msgid "No registration required." +msgstr "Nessuna registrazione necessaria." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3093 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:766 +msgid "Notify YAHOO about updates of your Blog" +msgstr "Segnala a YAHOO gli aggiornamenti del tuo blog" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3154 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:767 +msgid "Your Application ID:" +msgstr "La tua ID applicazione:" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:768 +#, php-format +msgid "Don't you have such a key? Request one here! %s2" +msgstr "Non hai una chiave? Richiedine qui una! %s2" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:773 +msgid "Add sitemap URL to the virtual robots.txt file." +msgstr "Aggiungi l'URL della sitemap al file virtuale robot.txt " + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:777 +msgid "The virtual robots.txt generated by WordPress is used. A real robots.txt file must NOT exist in the blog directory!" +msgstr "Verrà utilizzato il robots.txt virtuale generato da WordPress. Un file robots.txt reale NON deve esistere nella cartella del blog!" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:780 +msgid "Advanced options:" +msgstr "Opzioni avanzate:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3124 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:783 +msgid "Limit the number of posts in the sitemap:" +msgstr "Numero limite di articoli presenti nella sitemap:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3124 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:783 +msgid "Newer posts will be included first" +msgstr "gli articoli più recenti verranno inclusi per primi" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3127 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:786 +msgid "Try to increase the memory limit to:" +msgstr "Prova ad aumentare il limite di memoria a:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3127 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:786 +msgid "e.g. \"4M\", \"16M\"" +msgstr "es. \"4M\", \"16M\"" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3130 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:789 +msgid "Try to increase the execution time limit to:" +msgstr "Prova ad aumentare il limite del tempo di esecuzione a:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3130 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:789 +msgid "in seconds, e.g. \"60\" or \"0\" for unlimited" +msgstr "in secondi, es. \"60\" o \"0\" per nessun limite" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3133 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:793 +msgid "Include a XSLT stylesheet:" +msgstr "Includi un foglio di stile XSLT: " + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3133 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:794 +msgid "Full or relative URL to your .xsl file" +msgstr "URL al tuo file .xsl " + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:794 +msgid "Use default" +msgstr "Utilizza predefinito" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3152 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:800 +msgid "Enable MySQL standard mode. Use this only if you're getting MySQL errors. (Needs much more memory!)" +msgstr "Abilita la modalità MySQL standard. Solo in caso di errori MySQL. (ampio utilizzo della memoria!)" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:801 +msgid "Upgrade WordPress at least to 2.2 to enable the faster MySQL access" +msgstr "Aggiorna almeno a WordPress 2.2 per attivare un accesso MySQL più veloce" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3166 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:808 +msgid "Build the sitemap in a background process (You don't have to wait when you save a post)" +msgstr "Costruisci la sitemap con una procedura in background (nessuna attesa durante il salvataggio di un articolo)" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:809 +msgid "Upgrade WordPress at least to 2.1 to enable background building" +msgstr "Aggiorna almeno a WordPress 2.1 per attivare la generazione in background" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:816 +msgid "Additional pages" +msgstr "Pagine aggiuntive" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:819 +msgid "Here you can specify files or URLs which should be included in the sitemap, but do not belong to your Blog/WordPress.
    For example, if your domain is www.foo.com and your blog is located on www.foo.com/blog you might want to include your homepage at www.foo.com" +msgstr "Qui è possibile specificare file o URL che dovranno venir incluse nella sitemap ma che non appartengono al vostro Blog/WordPress.
    Ad esempio, se il vostro dominio è www.foo.com ed il vostro blog è posizionato in www.foo.com/blog potreste voler includere la vostra homepage in www.foo.com" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:821 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1010 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1024 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1033 +msgid "Note" +msgstr "Nota" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:822 +msgid "If your blog is in a subdirectory and you want to add pages which are NOT in the blog directory or beneath, you MUST place your sitemap file in the root directory (Look at the "Location of your sitemap file" section on this page)!" +msgstr "Se il tuo blog fosse allocato in una sottodirectory e desiderassi aggiungere delle pagine che NON si trovano nella directory del blog o sotto di essa, DOVRAI posizionare il tuo file di sitemap nella directory radice (vedi la sezione "Posizione del file di sitemap" su questa pagina)!" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:824 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:863 +msgid "URL to the page" +msgstr "URL della pagina" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:825 +msgid "Enter the URL to the page. Examples: http://www.foo.com/index.html or www.foo.com/home " +msgstr "inserire la URL della pagina. Ad esempio: http://www.foo.com/index.html oppure www.foo.com/home " + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:827 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:864 +msgid "Priority" +msgstr "Priorità" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:828 +msgid "Choose the priority of the page relative to the other pages. For example, your homepage might have a higher priority than your imprint." +msgstr "scegli la priorità di questa pagina in relazione alle altre. Ad esempio, la tua homepage dovrebbe avere una priorità maggiore rispetto alle altre pagine." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:830 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:866 +msgid "Last Changed" +msgstr "Ultima modifica" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:831 +msgid "Enter the date of the last change as YYYY-MM-DD (2005-12-31 for example) (optional)." +msgstr "Inserisci la data dell'ultima modifica nel formato YYYY-MM-DD (ad esempio 2005-12-31) (opzionale)" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:865 +msgid "Change Frequency" +msgstr "Cambia frequenza" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:867 +msgid "#" +msgstr "#" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:872 +msgid "No pages defined." +msgstr "Nessuna pagina definita" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:877 +msgid "Add new page" +msgstr "Aggiungi nuova pagina" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:882 +msgid "Post Priority" +msgstr "Priorità articolo" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3329 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:884 +msgid "Please select how the priority of each post should be calculated:" +msgstr "Seleziona come deve essere calcolata la priorità per ogni articolo:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3331 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:886 +msgid "Do not use automatic priority calculation" +msgstr "Non utilizzare il calcolo automatico della priorità" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3331 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:886 +msgid "All posts will have the same priority which is defined in "Priorities"" +msgstr "Tutti gli articoli hanno la stessa priorità definita in "Prioritià"" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:897 +msgid "Location of your sitemap file" +msgstr "Posizione del file di sitemap" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:900 +msgid "Automatic detection" +msgstr "Rilevazione automatica" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:904 +msgid "Filename of the sitemap file" +msgstr "Nome del file di sitemap" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:907 +msgid "Detected Path" +msgstr "Percorso determinato" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:907 +msgid "Detected URL" +msgstr "URL determinata" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:912 +msgid "Custom location" +msgstr "Località personalizzata" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:916 +msgid "Absolute or relative path to the sitemap file, including name." +msgstr "Percorso" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:918 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:927 +msgid "Example" +msgstr "Esempio" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:925 +msgid "Complete URL to the sitemap file, including name." +msgstr "URL completa al file di sitemap, compreso il nome del file" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:938 +msgid "Sitemap Content" +msgstr "Contenuto sitemap" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:944 +msgid "Include homepage" +msgstr "Includi homepage" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:950 +msgid "Include posts" +msgstr "Includi articoli" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:911 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:956 +msgid "Include following pages of multi-page posts (Increases build time and memory usage!)" +msgstr "Includi le seguenti pagine di articoli pagina-multipla (incrementa il tempo di generazione e l'utilizzo di memoria!)" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:962 +msgid "Include static pages" +msgstr "Includi pagine statiche" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:968 +msgid "Include categories" +msgstr "Includi categorie" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:974 +msgid "Include archives" +msgstr "Includi gli archivi" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:981 +msgid "Include tag pages" +msgstr "Includi pagine tag" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:988 +msgid "Include author pages" +msgstr "Includi pagine autore" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:992 +msgid "Further options" +msgstr "Opzioni aggiuntive" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:997 +msgid "Include the last modification time." +msgstr "Includi ora dell'ultima modifica." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:999 +msgid "This is highly recommended and helps the search engines to know when your content has changed. This option affects all sitemap entries." +msgstr "Questa operazione é altamente raccomandata poiché aiuta i motori di ricerca a conoscere quando sono stati modificati i contenuti. Questa opzione avrà influenza su tutti i contenuti della sitemap." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1006 +msgid "Excluded items" +msgstr "Escludi elementi" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1008 +msgid "Excluded categories" +msgstr "Categorie escluse" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1010 +msgid "Using this feature will increase build time and memory usage!" +msgstr "l'utilizzo di questa funzione aumenterà il tempo di generazione e l'utilizzo di memoria!" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1017 +#, php-format +msgid "This feature requires at least WordPress 2.5.1, you are using %s" +msgstr "Questa funzione richiede come minimo WordPress 2.5.1, tu stai usando %s" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1020 +msgid "Exclude posts" +msgstr "Escludi articoli" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3206 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1022 +msgid "Exclude the following posts or pages:" +msgstr "Escludi i seguenti articoli o pagine:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3206 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1022 +msgid "List of IDs, separated by comma" +msgstr "separa tra loro con una virgola i vari ID" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1024 +msgid "Child posts won't be excluded automatically!" +msgstr "gli articoli child non saranno automaticamente esclusi!" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1030 +msgid "Change frequencies" +msgstr "Modifica frequenze" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1034 +msgid "Please note that the value of this tag is considered a hint and not a command. Even though search engine crawlers consider this information when making decisions, they may crawl pages marked \"hourly\" less frequently than that, and they may crawl pages marked \"yearly\" more frequently than that. It is also likely that crawlers will periodically crawl pages marked \"never\" so that they can handle unexpected changes to those pages." +msgstr "Si noti che il valore di questo tag è da considerarsi un suggerimento e non un comando. Anch se i motori di ricerca prendono in considerazione questa informazione quando decidono cosa indicizzare, potrebbero comunque indicizzare le pagine marcate \"ogni ora\" meno frequentemente così come potrebbero analizzare le pagine marcate come \"annualmente\" più frequentemente. È anche probabile che i moori analizzino periodicamente anche le pagine marcate con \"mai\" per gestire eventuali modifiche inaspettate in queste pagine." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1040 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1097 +msgid "Homepage" +msgstr "Homepage" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1046 +msgid "Posts" +msgstr "Articoli" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1052 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1115 +msgid "Static pages" +msgstr "Pagine statiche" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1058 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1121 +msgid "Categories" +msgstr "Categorie" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1064 +msgid "The current archive of this month (Should be the same like your homepage)" +msgstr "Archivo del mese corrente (dovrebbe avere lo stesso valore della homepage)" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1070 +msgid "Older archives (Changes only if you edit an old post)" +msgstr "Archivi precedenti (cambia solo se modificato un vecchio articolo)" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1077 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1134 +msgid "Tag pages" +msgstr "Pagine tag" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1084 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1141 +msgid "Author pages" +msgstr "Pagine autore" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1092 +msgid "Priorities" +msgstr "Priorità" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1103 +msgid "Posts (If auto calculation is disabled)" +msgstr "Articoli (se disabilitato il calcolo automatico)" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1109 +msgid "Minimum post priority (Even if auto calculation is enabled)" +msgstr "Priorità minima degli articoli (anche se fosse stato abilitato il calcolo automatico)" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1127 +msgid "Archives" +msgstr "Archivi" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1152 +msgid "Update options" +msgstr "Aggiorna le opzioni" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1153 +msgid "Reset options" +msgstr "Ripristina le opzioni" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap.php:87 +msgid "XML-Sitemap Generator" +msgstr "XML-Sitemap Generator" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2415 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap.php:87 +msgid "XML-Sitemap" +msgstr "XML-Sitemap" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap.php:101 +msgid "Settings" +msgstr "Impostazioni" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap.php:102 +msgid "FAQ" +msgstr "FAQ" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2888 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap.php:103 +msgid "Support" +msgstr "Supporto" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap.php:104 +msgid "Donate" +msgstr "Donazione" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap.php:154 +msgid "Sitemap FAQ" +msgstr "Sitemap FAQ" + diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/lang/sitemap-ja.mo Binary file web/wp-content/plugins/google-sitemap-generator/lang/sitemap-ja.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/lang/sitemap-ja.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/google-sitemap-generator/lang/sitemap-ja.po Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,968 @@ +# Japanese Language File for sitemap (sitemap-ja.po) +# Copyright (C) 2005 hiromasa : http://hiromasa.zone.ne.jp/ +# Copyright (C) 2009 Naoko McCracken : http://detlog.org/ +# This file is distributed under the same license as the WordPress package. +# hiromasa , 2005. +# Naoko McCracken , 2009 +msgid "" +msgstr "" +"Project-Id-Version: Google Sitemaps 3.1.4\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-06-07 01:15+0100\n" +"PO-Revision-Date: 2009-07-02 23:37-0500\n" +"Last-Translator: Naoko McCracken \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-KeywordsList: _e;__\n" +"X-Poedit-Basepath: .\n" +"X-Poedit-Language: Japanese\n" +"X-Poedit-Country: JAPAN\n" +"X-Poedit-SourceCharset: utf-8\n" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:846 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:642 +msgid "Comment Count" +msgstr "コメント数" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:858 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:654 +msgid "Uses the number of comments of the post to calculate the priority" +msgstr "コメント数から投稿の優先順位を計算する" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:918 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:714 +msgid "Comment Average" +msgstr "平均コメント数" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:930 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:726 +msgid "Uses the average comment count to calculate the priority" +msgstr "平均コメント数を使って優先順位を計算する" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:993 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:789 +msgid "Popularity Contest" +msgstr "Popularity Contest (人気コンテスト)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:1005 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:801 +msgid "Uses the activated Popularity Contest Plugin from Alex King. See Settings and Most Popular Posts" +msgstr "有効化済みの、Alex King によるPopularity Contest (人気コンテスト) プラグインを使用します。設定人気の投稿をご覧ください。" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:1187 +msgid "Always" +msgstr "常時" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:1188 +msgid "Hourly" +msgstr "毎時" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:1189 +msgid "Daily" +msgstr "毎日" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:1190 +msgid "Weekly" +msgstr "毎週" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:1191 +msgid "Monthly" +msgstr "毎月" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:1192 +msgid "Yearly" +msgstr "毎年" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:1193 +msgid "Never" +msgstr "更新なし" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2600 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:102 +msgid "Thank you very much for your donation. You help me to continue support and development of this plugin and other free software!" +msgstr "寄付をありがとうございます。あなたの協力により、このプラグインやその他の無料ソフトのサポートや開発を続けることができます !" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2600 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:102 +msgid "Hide this notice" +msgstr "この通知を隠す" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2657 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:108 +#, php-format +msgid "Thanks for using this plugin! You've installed this plugin over a month ago. If it works and your are satisfied with the results, isn't it worth at least one dollar? Donations help me to continue support and development of this free software! Sure, no problem!" +msgstr "このプラグインを使ってくれてありがとうございます ! 1ヶ月以上前にインストールしてくれたようですね。もしうまく動作していて、結果に満足しているなら、1ドルの価値はありませんか ? あなたの寄付が、この無料のソフトウェアのサポートと開発を続ける支援になります。もちろん !" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2657 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:108 +msgid "No thanks, please don't bug me anymore!" +msgstr "結構です。もううるさく言わないでください !" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:67 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:119 +msgid "Your sitemap is being refreshed at the moment. Depending on your blog size this might take some time!" +msgstr "サイトマップを更新しています。ブログのサイズによってはしばらく時間がかかるでしょう。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:69 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:121 +#, php-format +msgid "Your sitemap will be refreshed in %s seconds. Depending on your blog size this might take some time!" +msgstr "%s秒後にサイトマップを更新します。ブログのサイズによってはしばらく時間がかかるでしょう。" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:146 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:453 +msgid "XML Sitemap Generator for WordPress" +msgstr "XML Sitemap Generator for WordPress" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:298 +msgid "Configuration updated" +msgstr "設定を更新しました。" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:299 +msgid "Error while saving options" +msgstr "設定の保存中にエラーが発生しました。" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:301 +msgid "Pages saved" +msgstr "追加ページの設定を保存しました。" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:302 +msgid "Error while saving pages" +msgstr "追加ページの設定の保存中にエラーが発生しました。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2758 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:309 +msgid "The default configuration was restored." +msgstr "初期設定に戻しました。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:374 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:466 +#, php-format +msgid "There is a new version of %1$s available. Download version %3$s here." +msgstr "新しいバージョンの %1$s があります。バージョン %3$s をダウンロード" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:376 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:468 +#, php-format +msgid "There is a new version of %1$s available. Download version %3$s here automatic upgrade unavailable for this plugin." +msgstr "新しいバージョンの %1$s があります。バージョン %3$s をダウンロードこのプラグインでは自動アップグレードは使えません。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:378 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:470 +#, php-format +msgid "There is a new version of %1$s available. Download version %3$s here or upgrade automatically." +msgstr "新しいバージョンの %1$s があります。バージョン %3$s をダウンロードするか、自動アップグレードを行ってください。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2851 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2868 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:493 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:510 +msgid "open" +msgstr "開く" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2852 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2869 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:494 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:511 +msgid "close" +msgstr "閉じる" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2853 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2870 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:495 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:512 +msgid "click-down and drag to move this box" +msgstr "クリック&ドラッグでこのボックスを移動" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2854 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2871 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:496 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:513 +msgid "click to %toggle% this box" +msgstr "クリックしてこのボックスを %toggle%" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2855 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2872 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:497 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:514 +msgid "use the arrow keys to move this box" +msgstr "矢印を使ってこのボックスを移動" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2856 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2873 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:498 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:515 +msgid ", or press the enter key to %toggle% it" +msgstr "または Enter キーを押して%toggle% " + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2884 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:533 +msgid "About this Plugin:" +msgstr "このプラグインについて:" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:534 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap.php:141 +msgid "Plugin Homepage" +msgstr "プラグインのホームページ" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:421 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:535 +msgid "Suggest a Feature" +msgstr "機能を提案" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2887 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:536 +msgid "Notify List" +msgstr "通知一覧" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2888 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:537 +msgid "Support Forum" +msgstr "サポートフォーラム" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:424 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:538 +msgid "Report a Bug" +msgstr "バグを報告" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2889 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:540 +msgid "Donate with PayPal" +msgstr "PayPal で寄付" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2890 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:541 +msgid "My Amazon Wish List" +msgstr "Amazon ほしい物リスト" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2891 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:542 +msgid "translator_name" +msgstr "translator_name" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2891 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:542 +msgid "translator_url" +msgstr "translator_url" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2897 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:545 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:546 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:552 +msgid "Webmaster Tools" +msgstr "ウェブマスターツール" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2898 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:547 +msgid "Webmaster Blog" +msgstr "Webmaster Blog" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2900 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:549 +msgid "Site Explorer" +msgstr "サイトエクスプローラー" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2901 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:550 +msgid "Search Blog" +msgstr "ブログ検索" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3010 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:553 +msgid "Webmaster Center Blog" +msgstr "Webmaster Center Blog" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:555 +msgid "Sitemaps Protocol" +msgstr "サイトマッププロトコル" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2904 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:556 +msgid "Official Sitemaps FAQ" +msgstr "Sitemaps プラグイン公式 FAQ" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2905 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:557 +msgid "My Sitemaps FAQ" +msgstr "Sitemaps プラグイン FAQ" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2910 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:560 +msgid "Recent Donations:" +msgstr "最近の寄付:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2914 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:564 +msgid "List of the donors" +msgstr "寄付者一覧" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2916 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:566 +msgid "Hide this list" +msgstr "一覧を隠す" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2919 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:569 +msgid "Thanks for your support!" +msgstr "サポートありがとうございます !" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2931 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:587 +msgid "Status" +msgstr "現在の状態" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2941 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:595 +#, php-format +msgid "The sitemap wasn't built yet. Click here to build it the first time." +msgstr "サイトマップはまだ構築されていません。こちらをクリックしてまず構築してください。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2947 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:601 +msgid "Your sitemap was last built on %date%." +msgstr "あなたのサイトマップが最後に構築されたのは%date%です。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2949 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:603 +msgid "There was a problem writing your sitemap file. Make sure the file exists and is writable. Learn moreさらに詳しくzipped) was last built on %date%." +msgstr "サイトマップ (Zip 圧縮) が最後に構築されたのは%date%です。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2958 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:612 +msgid "There was a problem writing your zipped sitemap file. Make sure the file exists and is writable. Learn moreさらに詳しくsuccessfully notified about changes." +msgstr "Google に更新を通知しました。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2967 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:621 +msgid "It took %time% seconds to notify Google, maybe you want to disable this feature to reduce the building time." +msgstr "Google への通知に%time%秒かかりました。構築時間を短縮するため、この機能を無効にした方が良いかもしれません。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3011 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:624 +#, php-format +msgid "There was a problem while notifying Google. View result" +msgstr "Google への通知中に問題が発生しました。結果を表示" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2976 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:630 +msgid "YAHOO was successfully notified about changes." +msgstr "Yahoo! に更新を通知しました。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2979 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:633 +msgid "It took %time% seconds to notify YAHOO, maybe you want to disable this feature to reduce the building time." +msgstr "Yahoo! への通知に%time%秒かかりました。構築時間を短縮するため、この機能を無効にした方が良いかもしれません。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3023 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:636 +#, php-format +msgid "There was a problem while notifying YAHOO. View result" +msgstr "Yahoo! への通知中に問題が発生しました。結果を表示" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:642 +msgid "Bing was successfully notified about changes." +msgstr "Bing に更新を通知しました。" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:645 +msgid "It took %time% seconds to notify Bing, maybe you want to disable this feature to reduce the building time." +msgstr "Bing への通知に%time%秒かかりました。構築時間を短縮するため、この機能を無効にした方が良いかもしれません。" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:648 +#, php-format +msgid "There was a problem while notifying Bing. View result" +msgstr "Bing への通知中に問題が発生しました。結果を表示" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2988 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:654 +msgid "Ask.com was successfully notified about changes." +msgstr "Ask.com に更新を通知しました。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2991 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:657 +msgid "It took %time% seconds to notify Ask.com, maybe you want to disable this feature to reduce the building time." +msgstr "Ask.com への通知に%time%秒かかりました。構築時間を短縮するため、この機能を無効にした方が良いかもしれません。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3035 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:660 +#, php-format +msgid "There was a problem while notifying Ask.com. View result" +msgstr "Ask.com への通知中に問題が発生しました。結果を表示" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3002 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:668 +msgid "The building process took about %time% seconds to complete and used %memory% MB of memory." +msgstr "構築処理に約%time%秒かかり、%memory% MB のメモリを使用しました。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3004 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:670 +msgid "The building process took about %time% seconds to complete." +msgstr "構築処理に約%time%秒かかりました。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3008 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:674 +msgid "The content of your sitemap didn't change since the last time so the files were not written and no search engine was pinged." +msgstr "サイトマップのコンテンツは前回から変更がありませんので、ファイルは更新されず、検索エンジンに通知は送信されていません。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:586 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:682 +msgid "The building process might still be active! Reload the page in a few seconds and check if something has changed." +msgstr "構築処理はまだ終了していないかもしれません。数秒待ったあとにこのページを再読み込みし、何か変更がないか確認してみてください。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3012 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:685 +msgid "The last run didn't finish! Maybe you can raise the memory or time limit for PHP scripts. Learn more" +msgstr "前回の作業実行が完了していません。PHP スクリプトのメモリーの最大値を上げてみると良いかもしれません。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3014 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:687 +msgid "The last known memory usage of the script was %memused%MB, the limit of your server is %memlimit%." +msgstr "このスクリプトの最後のメモリ利用値は%timeused%MBでした。あなたのサーバーの制限値は%memlimit%です。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3018 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:691 +msgid "The last known execution time of the script was %timeused% seconds, the limit of your server is %timelimit% seconds." +msgstr "このスクリプトの最後の既知実行時間は%timeused%秒でした。あなたのサーバーの実行時間最大値は%timelimit%秒です。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3022 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:695 +msgid "The script stopped around post number %lastpost% (+/- 100)" +msgstr "投稿 ID %lastpost% (誤差 +/- 100) のあたりでスクリプトが停止しました。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3025 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:698 +#, php-format +msgid "If you changed something on your server or blog, you should rebuild the sitemap manually." +msgstr "サーバーまたはブログ上で何か変更をした場合は、手動でサイトマップを最構築するべきです。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3027 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:700 +#, php-format +msgid "If you encounter any problems with the build process you can use the debug function to get more information." +msgstr "もし構築処理の間に何か問題が発生したら、デバッグ機能を使ってさらに多くの情報を得ることができます。" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:707 +msgid "Basic Options" +msgstr "基本的な設定" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3044 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:709 +msgid "Sitemap files:" +msgstr "サイトマップファイル:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3044 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3059 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3079 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3104 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3121 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:709 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:724 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:744 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:777 +msgid "Learn more" +msgstr "さらに詳しく" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:714 +msgid "Write a normal XML file (your filename)" +msgstr "標準の XML ファイルを出力する (filename)" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:720 +msgid "Write a gzipped file (your filename + .gz)" +msgstr "gz 圧縮されたファイルを出力する (filename + .gz)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3059 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:724 +msgid "Building mode:" +msgstr "構築モード:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3064 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:729 +msgid "Rebuild sitemap if you change the content of your blog" +msgstr "ブログのコンテンツを変更したらサイトマップを再構築する" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3071 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:736 +msgid "Enable manual sitemap building via GET Request" +msgstr "GET リクエストによる手動のサイトマップ作成を許可する" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3075 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:740 +msgid "This will allow you to refresh your sitemap if an external tool wrote into the WordPress database without using the WordPress API. Use the following URL to start the process: %1 Please check the logfile above to see if sitemap was successfully built." +msgstr "WordPress API を使わない外部ツールが WordPress データベースに書き込みをした場合にサイトマップを更新することができます。処理を行うには、以下の URL をクリックしてください: %1 サイトマップの構築が成功したかどうか知るには、上記のログファイルを確認してください。" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:744 +msgid "Update notification:" +msgstr "通知を更新:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3083 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:748 +msgid "Notify Google about updates of your Blog" +msgstr "Google にブログの更新を通知" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3084 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:749 +#, php-format +msgid "No registration required, but you can join the Google Webmaster Tools to check crawling statistics." +msgstr "登録は必要ありませんが、Google ウェブマスターツール でクロール関連の統計を見ることができます。" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:753 +msgid "Notify Bing (formerly MSN Live Search) about updates of your Blog" +msgstr "Bing (旧名 MSN Live サーチ) にブログの更新を通知" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:754 +#, php-format +msgid "No registration required, but you can join the Bing Webmaster Tools to check crawling statistics." +msgstr "登録は必要ありませんが、Bing ウェブマスターツール でクロール関連の統計を見ることができます。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3088 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:758 +msgid "Notify Ask.com about updates of your Blog" +msgstr "Ask.com にブログの更新を通知" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3089 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:759 +msgid "No registration required." +msgstr "登録は必要ありません。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3093 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:763 +msgid "Notify YAHOO about updates of your Blog" +msgstr "Yahoo! にブログの更新を通知" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3154 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:764 +msgid "Your Application ID:" +msgstr "アプリケーション ID:" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:765 +#, php-format +msgid "Don't you have such a key? Request one here! %s2" +msgstr "キーを持っていませんか ? こちらでリクエストしてください ! %s2" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:770 +msgid "Add sitemap URL to the virtual robots.txt file." +msgstr "サイトマップの URL を仮想 robots.txt ファイルに追加" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:774 +msgid "The virtual robots.txt generated by WordPress is used. A real robots.txt file must NOT exist in the blog directory!" +msgstr "WordPress が生成した仮想 robots.txt ファイルを使用しています。実際の robots.txt ファイルをブログディレクトリに置かないでください。" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:777 +msgid "Advanced options:" +msgstr "高度な設定:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3124 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:780 +msgid "Limit the number of posts in the sitemap:" +msgstr "サイトマップ内の投稿数を制限:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3124 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:780 +msgid "Newer posts will be included first" +msgstr "新しい投稿を最初に含める" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3127 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:783 +msgid "Try to increase the memory limit to:" +msgstr "メモリの最大値を以下に増加:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3127 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:783 +msgid "e.g. \"4M\", \"16M\"" +msgstr "例: \"4M\"、\"16M\"" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3130 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:786 +msgid "Try to increase the execution time limit to:" +msgstr "実行時間制限を以下に増加:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3130 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:786 +msgid "in seconds, e.g. \"60\" or \"0\" for unlimited" +msgstr "秒で指定(例: \"60\" など、または無制限の場合は \"0\")" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3133 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:790 +msgid "Include a XSLT stylesheet:" +msgstr "XSLT スタイルシートを含める:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3133 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:791 +msgid "Full or relative URL to your .xsl file" +msgstr ".xsl ファイルへの絶対または相対パス" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:791 +msgid "Use default" +msgstr "デフォルト設定を使用" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3152 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:797 +msgid "Enable MySQL standard mode. Use this only if you're getting MySQL errors. (Needs much more memory!)" +msgstr "MySQL スタンダードモードを有効化する。MySQL エラーが発生しているときのみ使用してください (より大量のメモリーが必要になります !) 。" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:798 +msgid "Upgrade WordPress at least to 2.2 to enable the faster MySQL access" +msgstr "MySQL への高速なアクセスを有効にするため、WordPress をバージョン 2.2 以上にアップグレード" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3166 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:805 +msgid "Build the sitemap in a background process (You don't have to wait when you save a post)" +msgstr "サイトマップをバックグラウンド処理で構築する (投稿を保存する際に待つ必要がありません)" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:806 +msgid "Upgrade WordPress at least to 2.1 to enable background building" +msgstr "バックグラウンドでの構築を有効にするため、WordPress をバージョン 2.1 以上にアップグレード" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:813 +msgid "Additional pages" +msgstr "追加ページの設定" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:816 +msgid "Here you can specify files or URLs which should be included in the sitemap, but do not belong to your Blog/WordPress.
    For example, if your domain is www.foo.com and your blog is located on www.foo.com/blog you might want to include your homepage at www.foo.com" +msgstr "WordPress ブログの URL 以外でサイトマップに含める URL を指定できます
    例えばドメインが www.foo.com でブログの URL が www.foo.com/blog の場合、www.foo.com を指定してサイトマップに含めることが可能です。" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:818 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:997 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1011 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1020 +msgid "Note" +msgstr "メモ" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:819 +msgid "If your blog is in a subdirectory and you want to add pages which are NOT in the blog directory or beneath, you MUST place your sitemap file in the root directory (Look at the "Location of your sitemap file" section on this page)!" +msgstr "もしこのブログがサブディレクトリに配置されていて、ブログディレクトリ以外のページをサイトマップに含めたいときは、サイトマップファイルを必ずルートディレクトリに配置しなくてはなりません (このページの "サイトマップファイルの場所" 設定を確認して下さい) 。" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:821 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:860 +msgid "URL to the page" +msgstr "ページの URL" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:822 +msgid "Enter the URL to the page. Examples: http://www.foo.com/index.html or www.foo.com/home " +msgstr "ページの URL を入力して下さい。 例: http://www.foo.com/index.html や www.foo.com/home " + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:824 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:861 +msgid "Priority" +msgstr "優先順位の設定 (priority)" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:825 +msgid "Choose the priority of the page relative to the other pages. For example, your homepage might have a higher priority than your imprint." +msgstr "他のページに対し、相対的な優先順位を選んでください。 例えば、ホームページの優先順位を他のページより高くできます。" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:827 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:863 +msgid "Last Changed" +msgstr "最終更新日" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:828 +msgid "Enter the date of the last change as YYYY-MM-DD (2005-12-31 for example) (optional)." +msgstr "最終更新日を YYYY-MM-DD 形式で入力して下さい。" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:862 +msgid "Change Frequency" +msgstr "更新頻度の設定 (changefreq)" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:864 +msgid "#" +msgstr "#" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:869 +msgid "No pages defined." +msgstr "追加ページは定義されていません。" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:874 +msgid "Add new page" +msgstr "新しいページの追加" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:879 +msgid "Post Priority" +msgstr "投稿の優先順位" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3329 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:881 +msgid "Please select how the priority of each post should be calculated:" +msgstr "投稿の優先順位の計算方法を選択してください:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3331 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:883 +msgid "Do not use automatic priority calculation" +msgstr "優先順位を自動的に計算しない" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3331 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:883 +msgid "All posts will have the same priority which is defined in "Priorities"" +msgstr "すべての投稿が "優先順位" で定義されたのと同じ優先度を持つようになります。" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:894 +msgid "Location of your sitemap file" +msgstr "サイトマップファイルの場所" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:897 +msgid "Automatic detection" +msgstr "自動検出" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:901 +msgid "Filename of the sitemap file" +msgstr "サイトマップファイル名" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:904 +msgid "Detected Path" +msgstr "パスの直接設定" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:904 +msgid "Detected URL" +msgstr "検出された URL" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:909 +msgid "Custom location" +msgstr "手動配置" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:913 +msgid "Absolute or relative path to the sitemap file, including name." +msgstr "ファイル名を含むサイトマップファイルへの相対もしくは絶対パス" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:915 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:924 +msgid "Example" +msgstr "例" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:922 +msgid "Complete URL to the sitemap file, including name." +msgstr "ファイル名を含む Sitemap ファイルへの完全な URL" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:935 +msgid "Sitemap Content" +msgstr "Sitemap コンテンツ" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:941 +msgid "Include homepage" +msgstr "ホームページ" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:947 +msgid "Include posts" +msgstr "投稿 (個別記事) を含める" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:953 +msgid "Include following pages of multi-page posts (Increases build time and memory usage!)" +msgstr "複数ページにわたる投稿の全ページを含める (構築時間とメモリー使用量が増加します)" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:959 +msgid "Include static pages" +msgstr "固定ページを含める" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:965 +msgid "Include categories" +msgstr "カテゴリーページを含める" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:971 +msgid "Include archives" +msgstr "アーカイブページを含める" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:978 +msgid "Include tag pages" +msgstr "タグページを含める" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:985 +msgid "Include author pages" +msgstr "投稿者ページを含める" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:993 +msgid "Excluded items" +msgstr "含めない項目" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:995 +msgid "Excluded categories" +msgstr "含めないカテゴリー" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:997 +msgid "Using this feature will increase build time and memory usage!" +msgstr "この機能を使用すると、構築時間および使用メモリが増加します。" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1004 +#, php-format +msgid "This feature requires at least WordPress 2.5.1, you are using %s" +msgstr "お使いの WordPress のバージョンは %s です。この機能には 2.5.1 以降へのアップグレードが必要です。" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1007 +msgid "Exclude posts" +msgstr "投稿 (個別記事) を含めない" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3206 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1009 +msgid "Exclude the following posts or pages:" +msgstr "以下の投稿または固定ページを含めない:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3206 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1009 +msgid "List of IDs, separated by comma" +msgstr "カンマ区切りの ID 一覧" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1011 +msgid "Child posts won't be excluded automatically!" +msgstr "子カテゴリーは自動的に除外されません。" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1017 +msgid "Change frequencies" +msgstr "更新頻度の設定 (changefreq)" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1021 +msgid "Please note that the value of this tag is considered a hint and not a command. Even though search engine crawlers consider this information when making decisions, they may crawl pages marked \"hourly\" less frequently than that, and they may crawl pages marked \"yearly\" more frequently than that. It is also likely that crawlers will periodically crawl pages marked \"never\" so that they can handle unexpected changes to those pages." +msgstr "このタグの値は絶対的な命令ではなくヒントとみなされます。検索エンジンのクローラはこの設定を考慮に入れますが、\"1時間おき\" の設定にしてもその頻度でクロールしないかもしれないし、\"年に1度\" の設定にしてもより頻繁にクロールされるかもしれません。また \"更新なし\" に設定されたページも、予想外の変更に対応するため、おそらく定期的にクロールが行われるでしょう。" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1027 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1084 +msgid "Homepage" +msgstr "ホームページ" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1033 +msgid "Posts" +msgstr "投稿 (個別記事) " + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1039 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1102 +msgid "Static pages" +msgstr "固定ページ" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1045 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1108 +msgid "Categories" +msgstr "カテゴリー別" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1051 +msgid "The current archive of this month (Should be the same like your homepage)" +msgstr "今月のアーカイブ (たいていは\"ホームページ\"と同じでしょう)" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1057 +msgid "Older archives (Changes only if you edit an old post)" +msgstr "古いアーカイブ (古い投稿を編集したときにのみ変更されます)" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1064 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1121 +msgid "Tag pages" +msgstr "タグページ" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1071 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1128 +msgid "Author pages" +msgstr "投稿者ページ" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1079 +msgid "Priorities" +msgstr "優先順位の設定 (priority)" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1090 +msgid "Posts (If auto calculation is disabled)" +msgstr "投稿 (個別記事) (\"基本的な設定\"で自動計算に設定していない場合に有効)" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1096 +msgid "Minimum post priority (Even if auto calculation is enabled)" +msgstr "投稿優先度の最小値 (\"基本的な設定\"で自動計算に設定している場合に有効)" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1114 +msgid "Archives" +msgstr "アーカイブ別" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1139 +msgid "Update options" +msgstr "設定を更新 »" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1140 +msgid "Reset options" +msgstr "設定をリセット" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap.php:84 +msgid "XML-Sitemap Generator" +msgstr "XML-Sitemap Generator" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2415 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap.php:84 +msgid "XML-Sitemap" +msgstr "XML-Sitemap" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap.php:142 +msgid "Sitemap FAQ" +msgstr "Sitemap プラグイン FAQ" + +#~ msgid "Manual location" +#~ msgstr "手動配置" +#~ msgid "OR" +#~ msgstr "もしくは" +#~ msgid "Error" +#~ msgstr "エラーです。" +#~ msgid "" +#~ "A new page was added. Click on "Save page changes" to save your " +#~ "changes." +#~ msgstr "" +#~ "新しい追加ページ(の設定欄)が加わりました。 (ページの情報を入力後)" +#~ ""変更の保存" を押下して設定を保存して下さい。" +#~ msgid "" +#~ "The page was deleted. Click on "Save page changes" to save your " +#~ "changes." +#~ msgstr "" +#~ "指定された追加ページ(の設定欄)を削除しました。 "変更の保存" を" +#~ "押下して設定を保存して下さい。" +#~ msgid "You changes have been cleared." +#~ msgstr "変更は既に削除されています。" +#~ msgid "Manual rebuild" +#~ msgstr "手動による Sitemap ファイルの再構築" +#~ msgid "" +#~ "If you want to build the sitemap without editing a post, click on here!" +#~ msgstr "" +#~ "もし投稿の編集なしに Sitemap ファイルを再構築したい場合はこのボタンを押下" +#~ "してください!" +#~ msgid "Rebuild Sitemap" +#~ msgstr "Sitemap の再構築" +#~ msgid "Save page changes" +#~ msgstr "変更の保存" +#~ msgid "Undo all page changes" +#~ msgstr "ページの変更を元に戻す" +#~ msgid "Delete marked page" +#~ msgstr "マークされたページの削除" +#~ msgid "" +#~ "Enable automatic priority calculation for posts based on comment count" +#~ msgstr "" +#~ "投稿に対するコメント数で、投稿(各エントリ)の優先順位(priority)を自動計算" +#~ "する機能を有効にする" +#~ msgid "Write debug comments" +#~ msgstr "デバッグ用コメント出力を行う" +#~ msgid "Auto-Ping Google Sitemaps" +#~ msgstr "Google Sitemap に更新 ping を送る" +#~ msgid "This option will automatically tell Google about changes." +#~ msgstr "このオプションは、変更を Google に自動的に通知します。" +#~ msgid "Includings" +#~ msgstr "Sitemap に含める 項目の設定" +#~ msgid "Informations and support" +#~ msgstr "情報とサポート" +#~ msgid "" +#~ "Check %s for updates and comment there if you have any problems / " +#~ "questions / suggestions." +#~ msgstr "" +#~ "もし、問題や疑問、提案があれば %s のアップデート情報やコメントを確認して下" +#~ "さい。" +#~ msgid "URL:" +#~ msgstr "URL:" +#~ msgid "Path:" +#~ msgstr "Path:" +#~ msgid "Could not write into %s" +#~ msgstr "%s に書き込むことができません。" +#~ msgid "Successfully built sitemap file:" +#~ msgstr "構築に成功した Sitemap ファイル:" +#~ msgid "Successfully built gzipped sitemap file:" +#~ msgstr "構築に成功した gz 圧縮された Sitemap ファイル:" +#~ msgid "Could not ping to Google at %s" +#~ msgstr "Google への更新 ping の送信ができませんでした。 %s" +#~ msgid "Successfully pinged Google at %s" +#~ msgstr "Google への更新 ping の送信が成功しました。 %s" + diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/lang/sitemap-ja_EUC.mo Binary file web/wp-content/plugins/google-sitemap-generator/lang/sitemap-ja_EUC.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/lang/sitemap-ja_EUC.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/google-sitemap-generator/lang/sitemap-ja_EUC.po Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,322 @@ +# Japanese Language File for sitemap (sitemap-ja_JP.UTF-8.po) +# Copyright (C) 2005 hiromasa : http://hiromasa.zone.ne.jp/ +# This file is distributed under the same license as the WordPress package. +# hiromasa , 2005. +# +msgid "" +msgstr "" +"Project-Id-Version: sitemap\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2005-06-09 02:00+0900\n" +"PO-Revision-Date: 2005-07-03 23:17+0900\n" +"Last-Translator: hiromasa \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=EUC-JP\n" +"Content-Transfer-Encoding: 8bit\n" +"Language-Team: \n" + +#: sitemap.php:375 +msgid "always" +msgstr "Ĥ" + +msgid "hourly" +msgstr "" + +msgid "daily" +msgstr "" + +msgid "weekly" +msgstr "轵" + +msgid "monthly" +msgstr "" + +msgid "yearly" +msgstr "ǯ" + +msgid "never" +msgstr "ʤ" + +msgid "Detected Path" +msgstr "ѥľ" + +msgid "Example" +msgstr "" + +msgid "Absolute or relative path to the sitemap file, including name." +msgstr "ե̾ޤ Sitemap եؤФ⤷Хѥ" + +msgid "Complete URL to the sitemap file, including name." +msgstr "ե̾ޤ Sitemap եؤδ URL" + +msgid "Automatic location" +msgstr "ư" + +msgid "Manual location" +msgstr "ư" + +msgid "OR" +msgstr "⤷" + +msgid "Location of your sitemap file" +msgstr "Sitemap եξ" + +msgid "If your blog is in a subdirectory and you want to add pages which are NOT in the blog directory or beneath, you MUST place your sitemap file in the root directory (Look at the "Location of your sitemap file" section on this page)!" +msgstr "⤷ʤΥ֥֥ǥ쥯ȥ֤Ƥˡ֥ǥ쥯ȥʳΥڡ Sitemap ˴ޤ᤿ȤϡSitemap ե롼ȥǥ쥯ȥ֤٤ǤʤΥڡ "Sitemap եξ" ǧƲ" + +#: sitemap.php:512 +msgid "Configuration updated" +msgstr "򹹿ޤ" + +#: sitemap.php:513 +msgid "Error" +msgstr "顼Ǥ" + +#: sitemap.php:521 +msgid "A new page was added. Click on "Save page changes" to save your changes." +msgstr "ɲåڡʤˤäޤ ʥڡξϸ"ѹ¸" 򲡲¸Ʋ" + +#: sitemap.php:527 +msgid "Pages saved" +msgstr "ɲåڡ¸ޤ" + +#: sitemap.php:528 +msgid "Error while saving pages" +msgstr "ɲåڡ¸˥顼ȯޤ" + +#: sitemap.php:539 +msgid "The page was deleted. Click on "Save page changes" to save your changes." +msgstr "ꤵ줿ɲåڡʤˤޤ "ѹ¸" 򲡲¸Ʋ" + +#: sitemap.php:542 +msgid "You changes have been cleared." +msgstr "ѹϴ˺Ƥޤ" + +#: sitemap.php:555 +msgid "Sitemap Generator" +msgstr "Sitemap Generator" + +#: sitemap.php:558 +msgid "Manual rebuild" +msgstr "ưˤ Sitemap եκƹ" + +#: sitemap.php:559 +msgid "If you want to build the sitemap without editing a post, click on here!" +msgstr "⤷ƤԽʤ Sitemap եƹۤϤΥܥ򲡲Ƥ!" + +#: sitemap.php:560 +msgid "Rebuild Sitemap" +msgstr "Sitemap κƹ" + +#: sitemap.php:564 +msgid "Additional pages" +msgstr "ɲåڡ" + +#: sitemap.php:566 +msgid "Here you can specify files or URLs which should be included in the sitemap, but do not belong to your Blog/WordPress.
    For example, if your domain is www.foo.com and your blog is located on www.foo.com/blog you might want to include your homepage at www.foo.com" +msgstr "ǡSitemap ˴ޤޤ٤Ǥ URL ꤹ뤳ȤǤޤ ǻꤹ URL WordPress/Blog °ƤϤޤ
    㤨Хɥᥤ www.foo.com ǥ֥ www.foo.com/blog ä硢ʤ www.foo.com Sitemap ˴ޤߤȻפ⤷ޤ󡣡: ιܤ WordPress ʳ URL ꤷץ饰ǽϤ Sitemap ˴ޤ뤳ȤǤޤ" + +#: sitemap.php:568 +msgid "URL to the page" +msgstr "ΥڡURL" + +#: sitemap.php:569 +msgid "Enter the URL to the page. Examples: http://www.foo.com/index.html or www.foo.com/home " +msgstr "ΥڡURL ϤƲ : http://www.foo.com/index.html www.foo.com/home " + +#: sitemap.php:571 +msgid "Priority" +msgstr "ͥ(priority)" + +#: sitemap.php:572 +msgid "Choose the priority of the page relative to the other pages. For example, your homepage might have a higher priority than your imprint." +msgstr "¾Υڡ㤷ڡͥ(priority)Ǥ 㤨СʤΥۡڡϡõΥڡ⤤ͥ٤뤫⤷ޤ" + +#: sitemap.php:574 +msgid "Last Changed" +msgstr "ǽ" + +#: sitemap.php:575 +msgid "Enter the date of the last change as YYYY-MM-DD (2005-12-31 for example) (optional)." +msgstr "ǽ YYYY-MM-DD ϤƲ" + +#: sitemap.php:583 +msgid "Change Frequency" +msgstr "(changefreq)" + +#: sitemap.php:585 +msgid "#" +msgstr "#" + +#: sitemap.php:609 +msgid "No pages defined." +msgstr "ɲåڡƤޤ" + +#: sitemap.php:616 +msgid "Add new page" +msgstr "ڡɲ" + +#: sitemap.php:617 +msgid "Save page changes" +msgstr "ѹ¸" + +#: sitemap.php:618 +msgid "Undo all page changes" +msgstr "ڡѹ򸵤᤹" + +#: sitemap.php:621 +msgid "Delete marked page" +msgstr "ޡ줿ڡκ" + +#: sitemap.php:627 +msgid "Basic Options" +msgstr "Ū" + +#: sitemap.php:632 +msgid "Enable automatic priority calculation for posts based on comment count" +msgstr "ƤФ륳ȿǡơʳƥȥˤͥ(priority)ư׻뵡ǽͭˤ" + +#: sitemap.php:638 +msgid "Write debug comments" +msgstr "ǥХåѥȽϤԤ" + +#: sitemap.php:643 +msgid "Filename of the sitemap file" +msgstr "Sitemap Υե̾" + +#: sitemap.php:650 +msgid "Write a normal XML file (your filename)" +msgstr "ɸ XML եϤ (filename)" + +#: sitemap.php:652 +msgid "Detected URL" +msgstr "Detected URL" + +#: sitemap.php:657 +msgid "Write a gzipped file (your filename + .gz)" +msgstr "gz ̤줿եϤ (filename + .gz)" + +#: sitemap.php:664 +msgid "Auto-Ping Google Sitemaps" +msgstr "Google Sitemap ˹ ping " + +#: sitemap.php:665 +msgid "This option will automatically tell Google about changes." +msgstr "Υץϡѹ Google ˼ưŪΤޤ" + +#: sitemap.php:672 +msgid "Includings" +msgstr "Sitemap ˴ޤ ܤ" + +#: sitemap.php:677 +msgid "Include homepage" +msgstr "ۡڡ" + +#: sitemap.php:683 +msgid "Include posts" +msgstr "ơʳƥȥ" + +#: sitemap.php:689 +msgid "Include static pages" +msgstr "Ūʥڡ" + +#: sitemap.php:695 +msgid "Include categories" +msgstr "ƥ" + +#: sitemap.php:701 +msgid "Include archives" +msgstr "" + +#: sitemap.php:708 +msgid "Change frequencies" +msgstr "(changefreq)" + +#: sitemap.php:709 +msgid "Note" +msgstr "" + +#: sitemap.php:710 +msgid "Please note that the value of this tag is considered a hint and not a command. Even though search engine crawlers consider this information when making decisions, they may crawl pages marked \"hourly\" less frequently than that, and they may crawl pages marked \"yearly\" more frequently than that. It is also likely that crawlers will periodically crawl pages marked \"never\" so that they can handle unexpected changes to those pages." +msgstr "Υͤ̿ǤϤʤҥȤȹͤޤ󥸥ΥϤθޤ\"1֤\" ˤƤ⤽٤ǥ뤷ʤ⤷ʤ\"ǯ٤\" ˤƤ⤽ˤ˥뤵뤫⤷ޤ󡣤ޤ \"ʤ\" ꤵ줿ڡ⡢פʤѲ򤳤Υڡ뤿ˡ餯Ū˥뤹Ǥ礦" + +#: sitemap.php:715 +msgid "Homepage" +msgstr "ۡڡ" + +#: sitemap.php:721 +msgid "Posts" +msgstr "ơʳƥȥ" + +#: sitemap.php:727 +msgid "Static pages" +msgstr "Ūʥڡ" + +#: sitemap.php:733 +msgid "Categories" +msgstr "ƥ" + +#: sitemap.php:739 +msgid "The current archive of this month (Should be the same like your homepage)" +msgstr "Υ (\"ۡڡ\" Ʊˤ٤Ǥ)" + +#: sitemap.php:745 +msgid "Older archives (Changes only if you edit an old post)" +msgstr "Ť (ŤƤԽȤѹƤ)" + +#: sitemap.php:752 +msgid "Priorities" +msgstr "ͥ(priority)" + +#: sitemap.php:763 +msgid "Posts (If auto calculation is disabled)" +msgstr "ơʳƥȥ (\"Ū\"Ǽư׻ꤷƤʤͭ)" + +#: sitemap.php:769 +msgid "Minimum post priority (Even if auto calculation is enabled)" +msgstr "ơʳƥȥˤκǾ (\"Ū\"Ǽư׻ꤷƤͭ)" + +#: sitemap.php:787 +msgid "Archives" +msgstr "" + +#: sitemap.php:793 +msgid "Informations and support" +msgstr "ȥݡ" + +#: sitemap.php:794 +msgid "Check %s for updates and comment there if you have any problems / questions / suggestions." +msgstr "⤷䵿䡢Ƥ %s ΥåץǡȾ䥳ȤǧƲ" + +#: sitemap.php:797 +msgid "Update options" +msgstr "򹹿 »" + +#: sitemap.php:1033 +msgid "URL:" +msgstr "URL:" + +#: sitemap.php:1034 +msgid "Path:" +msgstr "Path:" + +#: sitemap.php:1037 +msgid "Could not write into %s" +msgstr "%s ˽񤭹ळȤǤޤ" + +#: sitemap.php:1048 +msgid "Successfully built sitemap file:" +msgstr "ۤ Sitemap ե:" + +#: sitemap.php:1048 +msgid "Successfully built gzipped sitemap file:" +msgstr "ۤ gz ̤줿 Sitemap ե:" + +#: sitemap.php:1062 +msgid "Could not ping to Google at %s" +msgstr "Google ؤι ping ǤޤǤ %s" + +#: sitemap.php:1064 +msgid "Successfully pinged Google at %s" +msgstr "Google ؤι ping ޤ %s" + diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/lang/sitemap-ja_SJIS.mo Binary file web/wp-content/plugins/google-sitemap-generator/lang/sitemap-ja_SJIS.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/lang/sitemap-ja_SJIS.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/google-sitemap-generator/lang/sitemap-ja_SJIS.po Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,322 @@ +# Japanese Language File for sitemap (sitemap-ja_JP.UTF-8.po) +# Copyright (C) 2005 hiromasa : http://hiromasa.zone.ne.jp/ +# This file is distributed under the same license as the WordPress package. +# hiromasa , 2005. +# +msgid "" +msgstr "" +"Project-Id-Version: sitemap\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2005-06-09 02:00+0900\n" +"PO-Revision-Date: 2005-07-03 23:17+0900\n" +"Last-Translator: hiromasa \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=Shift_JIS\n" +"Content-Transfer-Encoding: 8bit\n" +"Language-Team: \n" + +#: sitemap.php:375 +msgid "always" +msgstr "‚" + +msgid "hourly" +msgstr "" + +msgid "daily" +msgstr "" + +msgid "weekly" +msgstr "T" + +msgid "monthly" +msgstr "" + +msgid "yearly" +msgstr "N" + +msgid "never" +msgstr "XVȂ" + +msgid "Detected Path" +msgstr "pX̒ڐݒ" + +msgid "Example" +msgstr "" + +msgid "Absolute or relative path to the sitemap file, including name." +msgstr "t@C܂ Sitemap t@Cւ̑΂͐΃pX" + +msgid "Complete URL to the sitemap file, including name." +msgstr "t@C܂ Sitemap t@Cւ̊S URL" + +msgid "Automatic location" +msgstr "zu" + +msgid "Manual location" +msgstr "蓮zu" + +msgid "OR" +msgstr "" + +msgid "Location of your sitemap file" +msgstr "Sitemap t@C̏ꏊ" + +msgid "If your blog is in a subdirectory and you want to add pages which are NOT in the blog directory or beneath, you MUST place your sitemap file in the root directory (Look at the "Location of your sitemap file" section on this page)!" +msgstr "Ȃ̃uOTufBNgɔzuĂꍇɁAuOfBNgȊÕy[W Sitemap Ɋ܂߂Ƃ́ASitemap t@C[gfBNgɔzuׂłBĩy[W "Sitemap t@C̏ꏊ" ݒmFĉj" + +#: sitemap.php:512 +msgid "Configuration updated" +msgstr "ݒXV܂B" + +#: sitemap.php:513 +msgid "Error" +msgstr "G[łB" + +#: sitemap.php:521 +msgid "A new page was added. Click on "Save page changes" to save your changes." +msgstr "Vljy[Wi̐ݒ藓j܂B iy[W̏͌j"ύX̕ۑ" ĐݒۑĉB" + +#: sitemap.php:527 +msgid "Pages saved" +msgstr "ljy[W̐ݒۑ܂B" + +#: sitemap.php:528 +msgid "Error while saving pages" +msgstr "ljy[W̐ݒ̕ۑɃG[܂B" + +#: sitemap.php:539 +msgid "The page was deleted. Click on "Save page changes" to save your changes." +msgstr "w肳ꂽljy[Wi̐ݒ藓j폜܂B "ύX̕ۑ" ĐݒۑĉB" + +#: sitemap.php:542 +msgid "You changes have been cleared." +msgstr "ύX͊ɍ폜Ă܂B" + +#: sitemap.php:555 +msgid "Sitemap Generator" +msgstr "Sitemap Generator" + +#: sitemap.php:558 +msgid "Manual rebuild" +msgstr "蓮ɂ Sitemap t@C̍č\z" + +#: sitemap.php:559 +msgid "If you want to build the sitemap without editing a post, click on here!" +msgstr "e̕ҏWȂ Sitemap t@Cč\zꍇ͂̃{^Ă!" + +#: sitemap.php:560 +msgid "Rebuild Sitemap" +msgstr "Sitemap ̍č\z" + +#: sitemap.php:564 +msgid "Additional pages" +msgstr "ljy[W̐ݒ" + +#: sitemap.php:566 +msgid "Here you can specify files or URLs which should be included in the sitemap, but do not belong to your Blog/WordPress.
    For example, if your domain is www.foo.com and your blog is located on www.foo.com/blog you might want to include your homepage at www.foo.com" +msgstr "ŁASitemap Ɋ܂܂ׂł URL w肷邱Ƃł܂B AŎw肷 URL WordPress/Blog ɑĂ͂܂B
    Ⴆ΃hC www.foo.com ŃuO www.foo.com/blog ꍇAȂ www.foo.com Sitemap Ɋ܂݂Ǝv܂Bi: ̍ڂ WordPress ȊO URL w肵AvOCŏo͂ Sitemap Ɋ܂߂邱Ƃł܂j" + +#: sitemap.php:568 +msgid "URL to the page" +msgstr "̃y[WURL" + +#: sitemap.php:569 +msgid "Enter the URL to the page. Examples: http://www.foo.com/index.html or www.foo.com/home " +msgstr "̃y[WURL ͂ĉB : http://www.foo.com/index.html www.foo.com/home " + +#: sitemap.php:571 +msgid "Priority" +msgstr "D揇(priority)̐ݒ" + +#: sitemap.php:572 +msgid "Choose the priority of the page relative to the other pages. For example, your homepage might have a higher priority than your imprint." +msgstr "̃y[WɔႵy[W̗D揇(priority)IłB Ⴆ΁AȂ̃z[y[ẂAL̃y[W荂Dx邩܂B" + +#: sitemap.php:574 +msgid "Last Changed" +msgstr "ŏIXV" + +#: sitemap.php:575 +msgid "Enter the date of the last change as YYYY-MM-DD (2005-12-31 for example) (optional)." +msgstr "ŏIXV YYYY-MM-DD `œ͂ĉB" + +#: sitemap.php:583 +msgid "Change Frequency" +msgstr "XVpx(changefreq)̐ݒ" + +#: sitemap.php:585 +msgid "#" +msgstr "#" + +#: sitemap.php:609 +msgid "No pages defined." +msgstr "ljy[W͒`Ă܂B" + +#: sitemap.php:616 +msgid "Add new page" +msgstr "Vy[W̒lj" + +#: sitemap.php:617 +msgid "Save page changes" +msgstr "ύX̕ۑ" + +#: sitemap.php:618 +msgid "Undo all page changes" +msgstr "y[W̕ύXɖ߂" + +#: sitemap.php:621 +msgid "Delete marked page" +msgstr "}[Nꂽy[W̍폜" + +#: sitemap.php:627 +msgid "Basic Options" +msgstr "{IȐݒ" + +#: sitemap.php:632 +msgid "Enable automatic priority calculation for posts based on comment count" +msgstr "eɑ΂RgŁAeieGgj̗D揇(priority)vZ@\Lɂ" + +#: sitemap.php:638 +msgid "Write debug comments" +msgstr "fobOpRgo͂s" + +#: sitemap.php:643 +msgid "Filename of the sitemap file" +msgstr "Sitemap ̃t@C" + +#: sitemap.php:650 +msgid "Write a normal XML file (your filename)" +msgstr "W XML t@Co͂ (filename)" + +#: sitemap.php:652 +msgid "Detected URL" +msgstr "Detected URL" + +#: sitemap.php:657 +msgid "Write a gzipped file (your filename + .gz)" +msgstr "gz kꂽt@Co͂ (filename + .gz)" + +#: sitemap.php:664 +msgid "Auto-Ping Google Sitemaps" +msgstr "Google Sitemap ɍXV ping 𑗂" + +#: sitemap.php:665 +msgid "This option will automatically tell Google about changes." +msgstr "̃IvV́AύX Google ɎIɒʒm܂B" + +#: sitemap.php:672 +msgid "Includings" +msgstr "Sitemap Ɋ܂߂ ڂ̐ݒ" + +#: sitemap.php:677 +msgid "Include homepage" +msgstr "z[y[W" + +#: sitemap.php:683 +msgid "Include posts" +msgstr "eieGgj" + +#: sitemap.php:689 +msgid "Include static pages" +msgstr "ÓIȃy[W" + +#: sitemap.php:695 +msgid "Include categories" +msgstr "JeS" + +#: sitemap.php:701 +msgid "Include archives" +msgstr "A[JCu" + +#: sitemap.php:708 +msgid "Change frequencies" +msgstr "XVpx(changefreq)̐ݒ" + +#: sitemap.php:709 +msgid "Note" +msgstr "" + +#: sitemap.php:710 +msgid "Please note that the value of this tag is considered a hint and not a command. Even though search engine crawlers consider this information when making decisions, they may crawl pages marked \"hourly\" less frequently than that, and they may crawl pages marked \"yearly\" more frequently than that. It is also likely that crawlers will periodically crawl pages marked \"never\" so that they can handle unexpected changes to those pages." +msgstr "̃^O̒l͖߂ł͂Ȃqgƍl܂BT[`GW̃N[͂̐ݒlɓ܂A\"1Ԃ\" ̐ݒɂĂ̕pxŃN[ȂȂA\"Nx\" ݒɂĂpɂɃN[邩܂B܂ \"XVȂ\" ɐݒ肳ꂽy[WAvȂω̃y[W瓾邽߂ɁA炭N[͒IɃN[ł傤B" + +#: sitemap.php:715 +msgid "Homepage" +msgstr "z[y[W" + +#: sitemap.php:721 +msgid "Posts" +msgstr "eieGgj" + +#: sitemap.php:727 +msgid "Static pages" +msgstr "ÓIȃy[W" + +#: sitemap.php:733 +msgid "Categories" +msgstr "JeS" + +#: sitemap.php:739 +msgid "The current archive of this month (Should be the same like your homepage)" +msgstr "̃A[JCu (\"z[y[W\" ̐ݒƓɂׂł)" + +#: sitemap.php:745 +msgid "Older archives (Changes only if you edit an old post)" +msgstr "ÂA[JCu (ÂeҏWƂύXĂ)" + +#: sitemap.php:752 +msgid "Priorities" +msgstr "D揇(priority)̐ݒ" + +#: sitemap.php:763 +msgid "Posts (If auto calculation is disabled)" +msgstr "eieGgj (\"{IȐݒ\"ŎvZɐݒ肵ĂȂꍇɗL)" + +#: sitemap.php:769 +msgid "Minimum post priority (Even if auto calculation is enabled)" +msgstr "eieGgj̍ŏl (\"{IȐݒ\"ŎvZɐݒ肵ĂꍇɗL)" + +#: sitemap.php:787 +msgid "Archives" +msgstr "A[JCu" + +#: sitemap.php:793 +msgid "Informations and support" +msgstr "ƃT|[g" + +#: sitemap.php:794 +msgid "Check %s for updates and comment there if you have any problems / questions / suggestions." +msgstr "A^AĂ %s ̃Abvf[gRgmFĉB" + +#: sitemap.php:797 +msgid "Update options" +msgstr "ݒXV »" + +#: sitemap.php:1033 +msgid "URL:" +msgstr "URL:" + +#: sitemap.php:1034 +msgid "Path:" +msgstr "Path:" + +#: sitemap.php:1037 +msgid "Could not write into %s" +msgstr "%s ɏނƂł܂B" + +#: sitemap.php:1048 +msgid "Successfully built sitemap file:" +msgstr "\zɐ Sitemap t@C:" + +#: sitemap.php:1048 +msgid "Successfully built gzipped sitemap file:" +msgstr "\zɐ gz kꂽ Sitemap t@C:" + +#: sitemap.php:1062 +msgid "Could not ping to Google at %s" +msgstr "Google ւ̍XV ping ̑Mł܂łB %s" + +#: sitemap.php:1064 +msgid "Successfully pinged Google at %s" +msgstr "Google ւ̍XV ping ̑M܂B %s" + diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/lang/sitemap-ja_UTF.mo Binary file web/wp-content/plugins/google-sitemap-generator/lang/sitemap-ja_UTF.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/lang/sitemap-ja_UTF.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/google-sitemap-generator/lang/sitemap-ja_UTF.po Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,322 @@ +# Japanese Language File for sitemap (sitemap-ja_JP.UTF-8.po) +# Copyright (C) 2005 hiromasa : http://hiromasa.zone.ne.jp/ +# This file is distributed under the same license as the WordPress package. +# hiromasa , 2005. +# +msgid "" +msgstr "" +"Project-Id-Version: sitemap\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2005-06-09 02:00+0900\n" +"PO-Revision-Date: 2005-07-03 23:17+0900\n" +"Last-Translator: hiromasa \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language-Team: \n" + +#: sitemap.php:375 +msgid "always" +msgstr "いつも" + +msgid "hourly" +msgstr "毎時" + +msgid "daily" +msgstr "毎日" + +msgid "weekly" +msgstr "毎週" + +msgid "monthly" +msgstr "毎月" + +msgid "yearly" +msgstr "毎年" + +msgid "never" +msgstr "更新されない" + +msgid "Detected Path" +msgstr "パスの直接設定" + +msgid "Example" +msgstr "例" + +msgid "Absolute or relative path to the sitemap file, including name." +msgstr "ファイル名を含む Sitemap ファイルへの相対もしくは絶対パス" + +msgid "Complete URL to the sitemap file, including name." +msgstr "ファイル名を含む Sitemap ファイルへの完全な URL" + +msgid "Automatic location" +msgstr "自動配置" + +msgid "Manual location" +msgstr "手動配置" + +msgid "OR" +msgstr "もしくは" + +msgid "Location of your sitemap file" +msgstr "Sitemap ファイルの場所" + +msgid "If your blog is in a subdirectory and you want to add pages which are NOT in the blog directory or beneath, you MUST place your sitemap file in the root directory (Look at the "Location of your sitemap file" section on this page)!" +msgstr "もしあなたのブログがサブディレクトリに配置されている場合に、ブログディレクトリ以外のページを Sitemap に含めたいときは、Sitemap ファイルをルートディレクトリに配置すべきです。(このページの "Sitemap ファイルの場所" 設定を確認して下さい)" + +#: sitemap.php:512 +msgid "Configuration updated" +msgstr "設定を更新しました。" + +#: sitemap.php:513 +msgid "Error" +msgstr "エラーです。" + +#: sitemap.php:521 +msgid "A new page was added. Click on "Save page changes" to save your changes." +msgstr "新しい追加ページ(の設定欄)が加わりました。 (ページの情報を入力後)"変更の保存" を押下して設定を保存して下さい。" + +#: sitemap.php:527 +msgid "Pages saved" +msgstr "追加ページの設定を保存しました。" + +#: sitemap.php:528 +msgid "Error while saving pages" +msgstr "追加ページの設定の保存中にエラーが発生しました。" + +#: sitemap.php:539 +msgid "The page was deleted. Click on "Save page changes" to save your changes." +msgstr "指定された追加ページ(の設定欄)を削除しました。 "変更の保存" を押下して設定を保存して下さい。" + +#: sitemap.php:542 +msgid "You changes have been cleared." +msgstr "変更は既に削除されています。" + +#: sitemap.php:555 +msgid "Sitemap Generator" +msgstr "Sitemap Generator" + +#: sitemap.php:558 +msgid "Manual rebuild" +msgstr "手動による Sitemap ファイルの再構築" + +#: sitemap.php:559 +msgid "If you want to build the sitemap without editing a post, click on here!" +msgstr "もし投稿の編集なしに Sitemap ファイルを再構築したい場合はこのボタンを押下してください!" + +#: sitemap.php:560 +msgid "Rebuild Sitemap" +msgstr "Sitemap の再構築" + +#: sitemap.php:564 +msgid "Additional pages" +msgstr "追加ページの設定" + +#: sitemap.php:566 +msgid "Here you can specify files or URLs which should be included in the sitemap, but do not belong to your Blog/WordPress.
    For example, if your domain is www.foo.com and your blog is located on www.foo.com/blog you might want to include your homepage at www.foo.com" +msgstr "ここで、Sitemap に含まれるべきである URL を指定することができます。 しかし、ここで指定する URL は WordPress/Blog に属してはいけません。
    例えばドメインが www.foo.com でブログが www.foo.com/blog だった場合、あなたは www.foo.com を Sitemap に含みたいと思うかもしれません。(訳注: この項目で WordPress 以外の URL を指定し、プラグインで出力する Sitemap に含めることができます)" + +#: sitemap.php:568 +msgid "URL to the page" +msgstr "そのページのURL" + +#: sitemap.php:569 +msgid "Enter the URL to the page. Examples: http://www.foo.com/index.html or www.foo.com/home " +msgstr "そのページのURL を入力して下さい。 例: http://www.foo.com/index.html や www.foo.com/home " + +#: sitemap.php:571 +msgid "Priority" +msgstr "優先順位(priority)の設定" + +#: sitemap.php:572 +msgid "Choose the priority of the page relative to the other pages. For example, your homepage might have a higher priority than your imprint." +msgstr "他のページに比例したページの優先順位(priority)を選んでください。 例えば、あなたのホームページは、銘記のページより高い優先度があるかもしれません。" + +#: sitemap.php:574 +msgid "Last Changed" +msgstr "最終更新日" + +#: sitemap.php:575 +msgid "Enter the date of the last change as YYYY-MM-DD (2005-12-31 for example) (optional)." +msgstr "最終更新日を YYYY-MM-DD 形式で入力して下さい。" + +#: sitemap.php:583 +msgid "Change Frequency" +msgstr "更新頻度(changefreq)の設定" + +#: sitemap.php:585 +msgid "#" +msgstr "#" + +#: sitemap.php:609 +msgid "No pages defined." +msgstr "追加ページは定義されていません。" + +#: sitemap.php:616 +msgid "Add new page" +msgstr "新しいページの追加" + +#: sitemap.php:617 +msgid "Save page changes" +msgstr "変更の保存" + +#: sitemap.php:618 +msgid "Undo all page changes" +msgstr "ページの変更を元に戻す" + +#: sitemap.php:621 +msgid "Delete marked page" +msgstr "マークされたページの削除" + +#: sitemap.php:627 +msgid "Basic Options" +msgstr "基本的な設定" + +#: sitemap.php:632 +msgid "Enable automatic priority calculation for posts based on comment count" +msgstr "投稿に対するコメント数で、投稿(各エントリ)の優先順位(priority)を自動計算する機能を有効にする" + +#: sitemap.php:638 +msgid "Write debug comments" +msgstr "デバッグ用コメント出力を行う" + +#: sitemap.php:643 +msgid "Filename of the sitemap file" +msgstr "Sitemap のファイル名" + +#: sitemap.php:650 +msgid "Write a normal XML file (your filename)" +msgstr "標準の XML ファイルを出力する (filename)" + +#: sitemap.php:652 +msgid "Detected URL" +msgstr "Detected URL" + +#: sitemap.php:657 +msgid "Write a gzipped file (your filename + .gz)" +msgstr "gz 圧縮されたファイルを出力する (filename + .gz)" + +#: sitemap.php:664 +msgid "Auto-Ping Google Sitemaps" +msgstr "Google Sitemap に更新 ping を送る" + +#: sitemap.php:665 +msgid "This option will automatically tell Google about changes." +msgstr "このオプションは、変更を Google に自動的に通知します。" + +#: sitemap.php:672 +msgid "Includings" +msgstr "Sitemap に含める 項目の設定" + +#: sitemap.php:677 +msgid "Include homepage" +msgstr "ホームページ" + +#: sitemap.php:683 +msgid "Include posts" +msgstr "投稿(各エントリ)" + +#: sitemap.php:689 +msgid "Include static pages" +msgstr "静的なページ" + +#: sitemap.php:695 +msgid "Include categories" +msgstr "カテゴリ別" + +#: sitemap.php:701 +msgid "Include archives" +msgstr "アーカイブ別" + +#: sitemap.php:708 +msgid "Change frequencies" +msgstr "更新頻度(changefreq)の設定" + +#: sitemap.php:709 +msgid "Note" +msgstr "メモ" + +#: sitemap.php:710 +msgid "Please note that the value of this tag is considered a hint and not a command. Even though search engine crawlers consider this information when making decisions, they may crawl pages marked \"hourly\" less frequently than that, and they may crawl pages marked \"yearly\" more frequently than that. It is also likely that crawlers will periodically crawl pages marked \"never\" so that they can handle unexpected changes to those pages." +msgstr "このタグの値は命令ではなくヒントだと考えられます。サーチエンジンのクローラはこの設定を考慮に入れますが、\"1時間おき\" の設定にしてもその頻度でクロールしないかもしれないし、\"年一度の\" 設定にしてもそれより頻繁にクロールされるかもしれません。また \"更新されない\" に設定されたページも、思いがけない変化をこれらのページから得るために、おそらくクローラは定期的にクロールするでしょう。" + +#: sitemap.php:715 +msgid "Homepage" +msgstr "ホームページ" + +#: sitemap.php:721 +msgid "Posts" +msgstr "投稿(各エントリ)" + +#: sitemap.php:727 +msgid "Static pages" +msgstr "静的なページ" + +#: sitemap.php:733 +msgid "Categories" +msgstr "カテゴリ別" + +#: sitemap.php:739 +msgid "The current archive of this month (Should be the same like your homepage)" +msgstr "当月のアーカイブ (\"ホームページ\" の設定と同じにすべきです)" + +#: sitemap.php:745 +msgid "Older archives (Changes only if you edit an old post)" +msgstr "古いアーカイブ (古い投稿を編集したときだけ変更してください)" + +#: sitemap.php:752 +msgid "Priorities" +msgstr "優先順位(priority)の設定" + +#: sitemap.php:763 +msgid "Posts (If auto calculation is disabled)" +msgstr "投稿(各エントリ) (\"基本的な設定\"で自動計算に設定していない場合に有効)" + +#: sitemap.php:769 +msgid "Minimum post priority (Even if auto calculation is enabled)" +msgstr "投稿(各エントリ)の最小値 (\"基本的な設定\"で自動計算に設定している場合に有効)" + +#: sitemap.php:787 +msgid "Archives" +msgstr "アーカイブ別" + +#: sitemap.php:793 +msgid "Informations and support" +msgstr "情報とサポート" + +#: sitemap.php:794 +msgid "Check %s for updates and comment there if you have any problems / questions / suggestions." +msgstr "もし、問題や疑問、提案があれば %s のアップデート情報やコメントを確認して下さい。" + +#: sitemap.php:797 +msgid "Update options" +msgstr "設定を更新 »" + +#: sitemap.php:1033 +msgid "URL:" +msgstr "URL:" + +#: sitemap.php:1034 +msgid "Path:" +msgstr "Path:" + +#: sitemap.php:1037 +msgid "Could not write into %s" +msgstr "%s に書き込むことができません。" + +#: sitemap.php:1048 +msgid "Successfully built sitemap file:" +msgstr "構築に成功した Sitemap ファイル:" + +#: sitemap.php:1048 +msgid "Successfully built gzipped sitemap file:" +msgstr "構築に成功した gz 圧縮された Sitemap ファイル:" + +#: sitemap.php:1062 +msgid "Could not ping to Google at %s" +msgstr "Google への更新 ping の送信ができませんでした。 %s" + +#: sitemap.php:1064 +msgid "Successfully pinged Google at %s" +msgstr "Google への更新 ping の送信が成功しました。 %s" + diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/lang/sitemap-ko_KR.mo Binary file web/wp-content/plugins/google-sitemap-generator/lang/sitemap-ko_KR.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/lang/sitemap-ko_KR.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/google-sitemap-generator/lang/sitemap-ko_KR.po Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,703 @@ +msgid "" +msgstr "" +"Project-Id-Version: \n" +"POT-Creation-Date: \n" +"PO-Revision-Date: 2008-04-15 13:17+0900\n" +"Last-Translator: 김승엽 \n" +"Language-Team: Wordpress Korea \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Korean\n" +"X-Poedit-Country: KOREA, REPUBLIC OF\n" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:846 +msgid "Comment Count" +msgstr "코멘트 갯수" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:858 +msgid "Uses the number of comments of the post to calculate the priority" +msgstr "포스트의 코멘트 갯수를 이용해 우선순위를 계산합니다." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:918 +msgid "Comment Average" +msgstr "코멘트 평균" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:930 +msgid "Uses the average comment count to calculate the priority" +msgstr "코멘트의 평균 갯수를 이용해 우선순위를 계산합니다." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:993 +msgid "Popularity Contest" +msgstr "Popularity Contest" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:1005 +msgid "Uses the activated Popularity Contest Plugin from Alex King. See Settings and Most Popular Posts" +msgstr "활성화 된Alex KingPopularity Contest Plugin을 이용합니다. 설정Most Popular Posts를 확인하십시오." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2415 +msgid "XML-Sitemap Generator" +msgstr "XML-사이트 맵 생성기" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2415 +msgid "XML-Sitemap" +msgstr "XML-사이트 맵" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2600 +msgid "Thank you very much for your donation. You help me to continue support and development of this plugin and other free software!" +msgstr "기부에 정말 감사드립니다. 제가 이 플러그인이나 다른 무료 프로그램을 계속 작성하고 지원할 수 있도록 도와주십시오!" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2600 +msgid "Hide this notice" +msgstr "이 주의사항 숨기기." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2657 +#, php-format +msgid "Thanks for using this plugin! You've installed this plugin over a month ago. If it works and your are satisfied with the results, isn't it worth at least one dollar? Donations help me to continue support and development of this free software! Sure, no problem!" +msgstr "이 플러그인을 사용해 주셔서 감사합니다! 당신이 이 플러그인을 사용한 지 한달이 되었습니다. 만약 이 플러그인의 작동과 결과가 만족스러웠고 1달러 이상의 가치가 있다고 생각하십니까? 기부로 제가 이 무료 소프트웨어의 개발과 지원을 계속하도록 도움을 주십시오! 네, 문제없습니다!" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2657 +msgid "No thanks, please don't bug me anymore!" +msgstr "사양합니다, 더 이상 귀찮게 하지 말아주십시오." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2635 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2835 +msgid "XML Sitemap Generator for WordPress" +msgstr "워드프레스 용 XML 사이트 맵 생성기" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2740 +msgid "Configuration updated" +msgstr "설정이 업데이트 되었습니다" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2741 +msgid "Error while saving options" +msgstr "옵션을 저장하는 중에 에러가 발생했습니다" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2743 +msgid "Pages saved" +msgstr "페이지가 저장되었습니다" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2744 +msgid "Error while saving pages" +msgstr "페이지를 저장하는 중에 에러가 발생했습니다" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2748 +#, php-format +msgid "Robots.txt file saved" +msgstr "Robots.txt 파일이 저장되었습니다" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2750 +msgid "Error while saving Robots.txt file" +msgstr "Robots.txt 파일을 저장하는 중에 에러가 발생했습니다" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2758 +msgid "The default configuration was restored." +msgstr "기본 설정이 복원되었습니다." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2851 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2868 +msgid "open" +msgstr "열기" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2852 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2869 +msgid "close" +msgstr "닫기" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2853 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2870 +msgid "click-down and drag to move this box" +msgstr "이 상자를 움직이려면 클릭하고 드래그 하십시오" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2854 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2871 +msgid "click to %toggle% this box" +msgstr "클릭하면 이 상자를 %toggle%" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2855 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2872 +msgid "use the arrow keys to move this box" +msgstr "방향키를 사용해서 이 상자를 이동" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2856 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2873 +msgid ", or press the enter key to %toggle% it" +msgstr ", 또는 엔터키를 눌러 %toggle%" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2884 +msgid "About this Plugin:" +msgstr "이 플러그인 대해:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2886 +msgid "Plugin Homepage" +msgstr "플러그인 홈페이지" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2887 +msgid "Notify List" +msgstr "메일 통지 리스트" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2888 +msgid "Support Forum" +msgstr "서포트 포럼" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2889 +msgid "Donate with PayPal" +msgstr "PayPal 기부" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2890 +msgid "My Amazon Wish List" +msgstr "내 Amazon 위시 리스트" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2891 +msgid "translator_name" +msgstr "번역자 김승엽" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2891 +msgid "translator_url" +msgstr "http://unfusion.kunsan.ac.kr/word" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2895 +msgid "Sitemap Resources:" +msgstr "사이트맵 Resources:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2897 +msgid "Webmaster Tools" +msgstr "웹마스터 도구" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2898 +msgid "Webmaster Blog" +msgstr "웹마스터 블로그" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2900 +msgid "Site Explorer" +msgstr "사이트 익스플로러" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2901 +msgid "Search Blog" +msgstr "블로그 검색" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2898 +msgid "Webmaster Center Blog" +msgstr "웹마스터 센터 블로그" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2903 +msgid "Sitemaps Protocol" +msgstr "사이트 맵 프로토콜" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2904 +msgid "Official Sitemaps FAQ" +msgstr "사이트 맵 FAQ" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2905 +msgid "My Sitemaps FAQ" +msgstr "사이트 맵 생성기 FAQ" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2910 +msgid "Recent Donations:" +msgstr "최근 기부:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2914 +msgid "List of the donors" +msgstr "기부자 목록" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2916 +msgid "Hide this list" +msgstr "목록 숨기기" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2919 +msgid "Thanks for your support!" +msgstr "당신의 지원에 감사드립니다!" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2931 +msgid "Status" +msgstr "상태" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2941 +#, php-format +msgid "The sitemap wasn't built yet. Click here to build it the first time." +msgstr "사이트 맵이 아직 만들어지지 않았습니다. 여기를 클릭하면 처음으로 사이트 맵을 생성합니다." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2947 +msgid "Your sitemap was last built on %date%." +msgstr "당신의 사이트 맵%date%에 마지막으로 생성되었습니다." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2949 +msgid "There was a problem writing your sitemap file. Make sure the file exists and is writable. Learn more정보 더 보기" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2956 +msgid "Your sitemap (zipped) was last built on %date%." +msgstr "당신의 사이트 맵(압축됨)은 %date%에 마지막으로 생성되었습니다." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2958 +msgid "There was a problem writing your zipped sitemap file. Make sure the file exists and is writable. Learn more정보 더 보기" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2964 +msgid "Google was successfully notified about changes." +msgstr "Google에 변경사항을 성공적으로 통보하였습니다." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2967 +msgid "It took %time% seconds to notify Google, maybe you want to disable this feature to reduce the building time." +msgstr "Google에 통보하는데 %time% 초가 걸렸습니다. 만약 이 기능을 사용하지 않으면 사이트 맵 작성시간을 줄일 수 있습니다." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3011 +#, php-format +msgid "There was a problem while notifying Google. View result" +msgstr "Google에 통보하는 동안 문제가 발생했습니다. 결과 보기" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2976 +msgid "YAHOO was successfully notified about changes." +msgstr "YAHOO에 변경사항을 성공적으로 통보하였습니다." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2979 +msgid "It took %time% seconds to notify YAHOO, maybe you want to disable this feature to reduce the building time." +msgstr "YAHOO에 통보하는데 %time% 초가 걸렸습니다. 만약 이 기능을 사용하지 않으면 사이트 맵 작성시간을 줄일 수 있습니다." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3023 +#, php-format +msgid "There was a problem while notifying YAHOO. View result" +msgstr "YAHOO에 통보하는 동안 문제가 발생했습니다. 결과 보기" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2976 +msgid "MSN was successfully notified about changes." +msgstr "MSN에 변경사항을 성공적으로 통보하였습니다." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2991 +msgid "It took %time% seconds to notify MSN.com, maybe you want to disable this feature to reduce the building time." +msgstr "MSN.com에 통보하는데 %time% 초가 걸렸습니다. 만약 이 기능을 사용하지 않으면 사이트 맵 작성시간을 줄일 수 있습니다." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3035 +#, php-format +msgid "There was a problem while notifying MSN.com. View result" +msgstr "MSN.com에 통보하는 동안 문제가 발생했습니다. 결과 보기" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2988 +msgid "Ask.com was successfully notified about changes." +msgstr "Ask.com에 변경사항을 성공적으로 통보하였습니다." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2991 +msgid "It took %time% seconds to notify Ask.com, maybe you want to disable this feature to reduce the building time." +msgstr "Ask.com에 통보하는데 %time% 초가 걸렸습니다. 만약 이 기능을 사용하지 않으면 사이트 맵 작성시간을 줄일 수 있습니다." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3035 +#, php-format +msgid "There was a problem while notifying Ask.com. View result" +msgstr "Ask.com에 통보하는 동안 문제가 발생했습니다. 결과 보기" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3002 +msgid "The building process took about %time% seconds to complete and used %memory% MB of memory." +msgstr "작성 과정을 완료하는데 약 %time% 초가 걸렸고, %memory% MB 의 메모리가 사용 되었습니다." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3004 +msgid "The building process took about %time% seconds to complete." +msgstr "작성 과정을 완료하는데 %time% 초가 걸렸습니다. " + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3008 +msgid "The content of your sitemap didn't change since the last time so the files were not written and no search engine was pinged." +msgstr "The content of your sitemap didn't change since the last time so the files were not written and no search engine was pinged." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3012 +msgid "The last run didn't finish! Maybe you can raise the memory or time limit for PHP scripts. Learn more" +msgstr "마지막 실행이 완료되지 않았습니다! PHP 스크립트의 시간제한이나 메모리 한계를 올려 보시기 바랍니다. 정보 더 보기" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3014 +msgid "The last known memory usage of the script was %memused%MB, the limit of your server is %memlimit%." +msgstr "최근에 스크립트가 사용한 메모리는 %memused%MB 이며, 서버의 메모리 한계는 %memlimit%입니다." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3018 +msgid "The last known execution time of the script was %timeused% seconds, the limit of your server is %timelimit% seconds." +msgstr "최근에 스트립트가 실행하면서 걸린 시간은 %timeused%초 이고, 서버의 제한시간은 %timelimit%초 입니다." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3022 +msgid "The script stopped around post number %lastpost% (+/- 100)" +msgstr "스크립트가 포스트 넘버 %lastpost% (+/- 100) 부근에서 멈추었습니다" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3025 +#, php-format +msgid "If you changed something on your server or blog, you should rebuild the sitemap manually." +msgstr "만약 서버 또는 블로그에 변경사항이 있다면 수동으로 사이트 맵을 재작성해야 합니다." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3027 +#, php-format +msgid "If you encounter any problems with the build process you can use the debug function to get more information." +msgstr "만약 작성 과정에 어떠한 문제가 발생한다면 디버그 기능을 이용하여 더 많은 정보를 얻을 수 있습니다." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3040 +msgid "Basic Options" +msgstr "기본 옵션" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3044 +msgid "Sitemap files:" +msgstr "사이트 맵 파일:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3044 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3059 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3079 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3104 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3121 +msgid "Learn more" +msgstr "정보 더 보기" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3049 +msgid "Write a normal XML file (your filename)" +msgstr "표준 XML 파일 작성 ( 사용자 파일이름 )" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3055 +msgid "Write a gzipped file (your filename + .gz)" +msgstr "압축 파일 작성 ( 사용자 파일이름 + .gz)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3059 +msgid "Building mode:" +msgstr "작성 모드:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3064 +msgid "Rebuild sitemap if you change the content of your blog" +msgstr "블로그의 내용이 변경되었을 때 사이트 맵을 재작성함" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3071 +msgid "Enable manual sitemap building via GET Request" +msgstr "GET Request를 통해 수동 사이트 맵 작성이 가능토록 함" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3075 +msgid "This will allow you to refresh your sitemap if an external tool wrote into the WordPress database without using the WordPress API. Use the following URL to start the process: %1 Please check the logfile above to see if sitemap was successfully built." +msgstr "이 항목은 워드프레스 API를 사용하지 않고 워드프레스 데이타 베이스에 내용을 작성하는 외부 프로그램이 있을 때 사이트 맵을 재생성할 수 있도록 해줍니다. 다음의 링크를 따라 가면 처리과정을 시작할 수 있습니다.: %1 사이트 맵을 성공적으로 작성했는지 확인하려면 위의 로그파일을 확인하시기 바랍니다." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3079 +msgid "Update notification:" +msgstr "업데이트 통지:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3083 +msgid "Notify Google about updates of your Blog" +msgstr "블로그의 업데이트를 Google에 통보" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3084 +#, php-format +msgid "No registration required, but you can join the Google Webmaster Tools to check crawling statistics." +msgstr "등록이 필요하진 않지만, 구글 웹마스터 툴 에 가입하면 수집 통계를 확인할 수 있습니다." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3083 +msgid "Notify MSN Live Search about updates of your Blog" +msgstr "블로그의 업데이트를 MSN Live에 통보" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3084 +#, php-format +msgid "No registration required, but you can join the MSN Live Webmaster Tools to check crawling statistics." +msgstr "등록이 필요하진 않지만, MSN Live 웹마스터 툴 에 가입하면 수집 통계를 확인할 수 있습니다." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3088 +msgid "Notify Ask.com about updates of your Blog" +msgstr "블로그의 업데이트를 Ask.com에 통보" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3089 +msgid "No registration required." +msgstr "등록 필요 없음." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3093 +msgid "Notify YAHOO about updates of your Blog" +msgstr "블로그의 업데이트를 YAHOO에 통보" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3154 +msgid "Your Application ID:" +msgstr "당신의 Application ID:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3155 +#, php-format +msgid "Don't you have such a key? Request one here! %s2" +msgstr "Key를 가지고 있지 않나요? 여기서 신청하세요! %s2" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3099 +#, php-format +msgid "Modify or create %s file in blog root which contains the sitemap location." +msgstr "사이트 맵 위치를 포함하고 있는 블로그 루트의 %s 파일을 생성 또는 변경합니다." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3102 +msgid "File permissions: " +msgstr "파일 권한:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3107 +msgid "OK, robots.txt is writable." +msgstr "OK, robox.txt가 쓰기 가능한 상태입니다." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3109 +msgid "Error, robots.txt is not writable." +msgstr "Error, robots.txt가 쓰기 불가능한 상태입니다." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3113 +msgid "OK, robots.txt doesn't exist but the directory is writable." +msgstr "OK, robots.txt 파일은 존재하지 않지만 디렉토리가 쓰기 가능한 상태입니다." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3115 +msgid "Error, robots.txt doesn't exist and the directory is not writable" +msgstr "Error, robots.txt 가 존재하지 않으며 디렉토리도 쓰기 불가능한 상태입니다." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3121 +msgid "Advanced options:" +msgstr "고급 옵션:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3124 +msgid "Limit the number of posts in the sitemap:" +msgstr "사이트 맵에 포함될 포스트의 갯수를 제한함:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3124 +msgid "Newer posts will be included first" +msgstr "최근 포스트가 먼저 포함됩니다." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3127 +msgid "Try to increase the memory limit to:" +msgstr "메모리 한계를 증가시킴:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3127 +msgid "e.g. \"4M\", \"16M\"" +msgstr "예. \"4M\", \"16M\"" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3130 +msgid "Try to increase the execution time limit to:" +msgstr "실행 시간 제한을 증가시키도록함:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3130 +msgid "in seconds, e.g. \"60\" or \"0\" for unlimited" +msgstr "초 단위로 기입, 예.\"60\" 또는 \"0\" (제한 없음)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3133 +msgid "Include a XSLT stylesheet:" +msgstr "XSLT 스타일시트를 포함:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3133 +msgid "Use Default" +msgstr "기본설정 사용" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3133 +msgid "Full or relative URL to your .xsl file" +msgstr ".xsl 파일의 전체 또는 상대 주소" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3152 +msgid "Enable MySQL standard mode. Use this only if you're getting MySQL errors. (Needs much more memory!)" +msgstr "MySQL 스탠다드 모드를 가능하게 함. MySQL 에러가 발생할 때만 사용하십시오. (더 많은 메모리가 필요함!)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3166 +msgid "Build the sitemap in a background process (You don't have to wait when you save a post)" +msgstr "백그라운드 작업으로 사이트 맵을 생성 (포스트를 저장할 때 기다리지 않아도 됩니다.)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3206 +msgid "Exclude the following posts or pages:" +msgstr "다음의 포스트나 페이지를 제외:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3206 +msgid "List of IDs, separated by comma" +msgstr "콤마로 구분된 ID 리스트" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3144 +msgid "Additional pages" +msgstr "페이지 추가" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3149 +msgid "Here you can specify files or URLs which should be included in the sitemap, but do not belong to your Blog/WordPress.
    For example, if your domain is www.foo.com and your blog is located on www.foo.com/blog you might want to include your homepage at www.foo.com" +msgstr "여기서 특정 파일이나 URL을 사이트 맵에 추가할 수 있지만 Blog/WordPress에 속해 있는 것은 추가 할 수 없습니다.
    예를 들어, 도메인이 www.foo.com이고 블로그의 위치가 www.foo.com/blog 라면 www.foo.com을 홈페이지로 추가할 수 있습니다." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3151 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3462 +msgid "Note" +msgstr "주의" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3152 +msgid "If your blog is in a subdirectory and you want to add pages which are NOT in the blog directory or beneath, you MUST place your sitemap file in the root directory (Look at the "Location of your sitemap file" section on this page)!" +msgstr "블로그가 서브 디렉토리에 위치하는데 새 페이지를 추가하길 원한다면 사이트 맵 파일이 블로그 디렉토리나 그 아래에 있으면 안되고 root 디렉토리에 있어야 합니다. (이 페이지의 "사이트 맵 파일의 위치" 부분을 보십시오.)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3154 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3300 +msgid "URL to the page" +msgstr "페이지의 주소" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3155 +msgid "Enter the URL to the page. Examples: http://www.foo.com/index.html or www.foo.com/home " +msgstr "페이지의 주소를 입력하십시오.예:http://www.foo.com/index.html or www.foo.com/home" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3157 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3301 +msgid "Priority" +msgstr "우선순위" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3158 +msgid "Choose the priority of the page relative to the other pages. For example, your homepage might have a higher priority than your imprint." +msgstr "다른 페이지에 비교하여 페이지의 우선 순위를 선택하십시오. 예를 들어 홈페이지는 다른 것에 비해 높은 우선 순위를 가져야 합니다." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3160 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3303 +msgid "Last Changed" +msgstr "마지막 변경" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3161 +msgid "Enter the date of the last change as YYYY-MM-DD (2005-12-31 for example) (optional)." +msgstr "최근 변경된 날짜를 YYYY-MM-DD (예 : 2005-12-31 ) 형식으로 입력하십시오 ( 선택사항 )" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3302 +msgid "Change Frequency" +msgstr "변경 빈도" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3304 +msgid "#" +msgstr "#" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3309 +msgid "No pages defined." +msgstr "페이지가 지정되지 않았습니다." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3314 +msgid "Add new page" +msgstr "새 페이지 추가" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3325 +msgid "Post Priority" +msgstr "포스트 우선순위" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3329 +msgid "Please select how the priority of each post should be calculated:" +msgstr "각 포스트의 우선순위를 어떻게 계산할 것인지 선택해 주십시오:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3331 +msgid "Do not use automatic priority calculation" +msgstr "자동 우선순위 계산을 사용하지 않음" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3331 +msgid "All posts will have the same priority which is defined in "Priorities"" +msgstr "모든 포스트가 "우선권"에서 설정된 우선순위를 같게 됩니다." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3348 +msgid "Location of your sitemap file" +msgstr "사이트 맵 파일의 위치" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3353 +msgid "Automatic detection" +msgstr "자동 탐지" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3357 +msgid "Filename of the sitemap file" +msgstr "사이트 맵 파일의 이름" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3360 +msgid "Detected Path" +msgstr "탐지된 경로" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3360 +msgid "Detected URL" +msgstr "탐지된 주소" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3365 +msgid "Custom location" +msgstr "커스텀 로케이션" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3369 +msgid "Absolute or relative path to the sitemap file, including name." +msgstr "파일이름을 포함한 사이트 맵 파일의 절대 또는 상대 경로" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3371 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3380 +msgid "Example" +msgstr "예제" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3378 +msgid "Complete URL to the sitemap file, including name." +msgstr "파일이름을 포함한 사이트 맵 파일의 완전한 주소." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3397 +msgid "Sitemap Content" +msgstr "사이트 맵 내용" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3405 +msgid "Include homepage" +msgstr "홈페이지 추가" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3411 +msgid "Include posts" +msgstr "포스트 추가" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3417 +msgid "Include static pages" +msgstr "정적 페이지 추가" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3423 +msgid "Include categories" +msgstr "카테고리 추가" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3429 +msgid "Include archives" +msgstr "아카이브 추가" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3436 +msgid "Include tag pages" +msgstr "태크 페이지 추가" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3443 +msgid "Include author pages" +msgstr "작성자 페이지 추가" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3457 +msgid "Change frequencies" +msgstr "수집 빈도 변경" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3463 +msgid "Please note that the value of this tag is considered a hint and not a command. Even though search engine crawlers consider this information when making decisions, they may crawl pages marked \"hourly\" less frequently than that, and they may crawl pages marked \"yearly\" more frequently than that. It is also likely that crawlers will periodically crawl pages marked \"never\" so that they can handle unexpected changes to those pages." +msgstr "각 태그에 있는 수치들은 고려할 수 있는 사항일 뿐 절대적인 명령은 아닙니다. 서치 엔진의 Crawler가 아래의 정보를 수집 결정을 내릴 때 고려한다고 해도 \"매시간\" 으로 된 페이지를 더 긴 주기로 수집할 수도 있고 \"매년\" 으로 된 페이지를 더 짧은 주기로 수집할 수도 있습니다. 이것은 \"하지않음\"으로 된 페이지도 마찬가지로 주기적 수집을 할 수도 있어서 그러한 페이지에 발생한 변화를 예기치 않게 수집할 수도 있습니다." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3469 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3535 +msgid "Homepage" +msgstr "홈페이지" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3475 +msgid "Posts" +msgstr "포스트들" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3481 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3553 +msgid "Static pages" +msgstr "정적 페이지들" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3487 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3559 +msgid "Categories" +msgstr "카테고리들" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3493 +msgid "The current archive of this month (Should be the same like your homepage)" +msgstr "이번 달의 아카이브 ( 홈페이지와 같아야 합니다.)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3499 +msgid "Older archives (Changes only if you edit an old post)" +msgstr "오래된 아카이브 ( 예전 포스트를 수정했을 때만 변경 하십시오.)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3506 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3572 +msgid "Tag pages" +msgstr "태그 페이지들" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3513 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3579 +msgid "Author pages" +msgstr "작성자 페이지들" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3527 +msgid "Priorities" +msgstr "우선권" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3541 +msgid "Posts (If auto calculation is disabled)" +msgstr "포스트 ( 만약 자동 계산이 중지 되었을 경우 )" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3547 +msgid "Minimum post priority (Even if auto calculation is enabled)" +msgstr "최소 포스트 우선권 (만약 자동 계산이 활성화 되어있을 때도)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3565 +msgid "Archives" +msgstr "아카이브" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3590 +msgid "Update options" +msgstr "옵션 업데이트" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3591 +msgid "Reset options" +msgstr "옵션 초기화" + diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/lang/sitemap-nl_NL.mo Binary file web/wp-content/plugins/google-sitemap-generator/lang/sitemap-nl_NL.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/lang/sitemap-nl_NL.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/google-sitemap-generator/lang/sitemap-nl_NL.po Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,505 @@ +msgid "" +msgstr "" +"Project-Id-Version: sitemap\n" +"POT-Creation-Date: \n" +"PO-Revision-Date: 2008-03-15 10:27+0100\n" +"Last-Translator: forkless \n" +"Language-Team: Arne Brachhold \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" + +msgid "Comment Count" +msgstr "Aantal Reacties" + +msgid "Uses the number of comments of the post to calculate the priority" +msgstr "Gebruikt het aantal reacties van het bericht om de prioriteit te berekenen" + +msgid "Comment Average" +msgstr "Reactie Gemiddelde" + +msgid "Uses the average comment count to calculate the priority" +msgstr "Gebruik het reactie gemiddelde om de prioriteit te berekenen" + +msgid "Popularity Contest" +msgstr "Popularity Contest" + +msgid "Uses the activated Popularity Contest Plugin from Alex King. See Settings and Most Popular Posts" +msgstr "Gebruikt het geactiveerde Popularity Contest Plugin van Alex King. Zie instellingen en meest populaire berichten" + +msgid "XML-Sitemap Generator" +msgstr "XML-Sitemap Generator" + +msgid "XML-Sitemap" +msgstr "XML-Sitemap" + +msgid "Thank you very much for your donation. You help me to continue support and development of this plugin and other free software!" +msgstr "Hartelijke dank voor je donatie! Je helpt hierbij deze gratis plugin te ondersteunen en verder te ontwikkelen!" + +msgid "Hide this notice" +msgstr "Deze melding verbergen" + +msgid "Thanks for using this plugin! You've installed this plugin over a month ago. If it works and your are satisfied with the results, isn't it worth at least one dollar? Donations help me to continue support and development of this free software! Sure, no problem!" +msgstr "Bedankt voor het gebruiken van deze plugin! Je hebt deze plugin meer dan een maand geleden geinstalleerd. Wanneer het naar behoren werkt en je met het resultaat tevreden bent is het dan niet minsten één dollar waard? Donaties helpen mij deze diese gratis software te ondersteunen en verder te ontwikkelen! Natuurlijk, geen probleem! " + +msgid "No thanks, please don't bug me anymore!" +msgstr "Nee dankjewel, val me hier niet meer mee lastig! " + +msgid "XML Sitemap Generator for WordPress" +msgstr "XML Sitemap Generator voor WordPress" + +msgid "Configuration updated" +msgstr "De instellingen zijn opgeslagen" + +msgid "Error while saving options" +msgstr "Bij het opslaan van de instellingen is een fout opgetreden." + +msgid "Pages saved" +msgstr "Pagina's opgeslagen" + +msgid "Error while saving pages" +msgstr "Bij het opslaan van de pagina's is een fout opgetreden" + +msgid "Robots.txt file saved" +msgstr "Robots.txt bestand opgeslagen" + +msgid "Error while saving Robots.txt file" +msgstr "Er is een fout opgetreden tijdens het opslaan van robots.txt" + +msgid "The default configuration was restored." +msgstr "De standaard instellingen zijn weer hersteld." + +msgid "open" +msgstr "openen" + +msgid "close" +msgstr "sluiten" + +msgid "click-down and drag to move this box" +msgstr "Klik en sleep om dit venster te verplaatsen" + +msgid "click to %toggle% this box" +msgstr "Klik om dit venster te %toggle%" + +msgid "use the arrow keys to move this box" +msgstr "gebruik de cursor toetsen om dit venster te verplaatsen" + +msgid ", or press the enter key to %toggle% it" +msgstr ", of druk op de enter toets om het te %toggle%" + +msgid "About this Plugin:" +msgstr "Over deze plugin:" + +msgid "Plugin Homepage" +msgstr "Plugin homepage" + +msgid "Notify List" +msgstr "E-Mail wanneer er een update is" + +msgid "Support Forum" +msgstr "Support Forum" + +msgid "Donate with PayPal" +msgstr "Met PayPal doneren" + +msgid "My Amazon Wish List" +msgstr "Amazon wensenlijst" + +msgid "translator_name" +msgstr "Mark Peters" + +msgid "translator_url" +msgstr "http://www.zinloosverteld.nl" + +msgid "Sitemap Resources:" +msgstr "Sitemap informatie:" + +msgid "Webmaster Tools" +msgstr "Webmaster Tools" + +msgid "Webmaster Blog" +msgstr "Webmaster Blog" + +msgid "Site Explorer" +msgstr "Site Explorer" + +msgid "Search Blog" +msgstr "Doorzoek Blog" + +msgid "Webmaster Center Blog" +msgstr "Webmaster Center Blog" + +msgid "Sitemaps Protocol" +msgstr "Sitemaps Protocol" + +msgid "Official Sitemaps FAQ" +msgstr "Officiële Sitemaps FAQ" + +msgid "My Sitemaps FAQ" +msgstr "Mijn Sitemaps FAQ" + +msgid "Recent Donations:" +msgstr "Recente Donaties:" + +msgid "List of the donors" +msgstr "Lijst van donateurs" + +msgid "Hide this list" +msgstr "Lijst verbergen" + +msgid "Thanks for your support!" +msgstr "Bedankt voor je support!" + +msgid "Status" +msgstr "Status" + +msgid "The sitemap wasn't built yet. Click here to build it the first time." +msgstr "De sitemap is nog niet gegenereerd. Klik hier om deze voor de eerste keer aan te maken." + +msgid "Your sitemap was last built on %date%." +msgstr "Jouw Sitemap werd voor het laatst op %date% gegenereerd." + +msgid "There was a problem writing your sitemap file. Make sure the file exists and is writable. Learn moreMeer informatiezipped) was last built on %date%." +msgstr "Jouw (gezipt) sitemap werd voor het laatst op %date% gegenereerd." + +msgid "There was a problem writing your zipped sitemap file. Make sure the file exists and is writable. Learn moreMeer informatiesuccessfully notified about changes." +msgstr "Google is succesvol op de hoogte gesteld van de veranderingen." + +msgid "It took %time% seconds to notify Google, maybe you want to disable this feature to reduce the building time." +msgstr "Het duurde %time% seconden om Google op de hoogte te stellen. Misschien wil je deze optie deactiveren om de doorlooptijd van de sitemap generatie te verkorten?" + +msgid "There was a problem while notifying Google. View result" +msgstr "Er was een probleem bij het informeren van Google. Resultaat weergeven" + +msgid "YAHOO was successfully notified about changes." +msgstr "Yahoo is succesvol op de hoogte gesteld van de veranderingen." + +msgid "It took %time% seconds to notify YAHOO, maybe you want to disable this feature to reduce the building time." +msgstr "Het duurde %time% seconden om Yahoo op de hoogte te stellen. Misschien wil je deze optie deactiveren om de doorlooptijd van de sitemap generatie te verkorten?" + +msgid "There was a problem while notifying YAHOO. View result" +msgstr "Er was een probleem bij het informeren van Yahoo. Resultaat weergeven" + +msgid "MSN was successfully notified about changes." +msgstr "MSN.com is succesvol op de hoogte gesteld van de veranderingen." + +msgid "It took %time% seconds to notify MSN.com, maybe you want to disable this feature to reduce the building time." +msgstr "Het duurde %time% seconden om MSN.com op de hoogte te stellen. Misschien wil je deze optie deactiveren om de doorlooptijd van de sitemap generatie te verkorten?" + +msgid "There was a problem while notifying MSN.com. View result" +msgstr "Er was een probleem bij het informeren van MSN.com. Resultaat weergeven" + +msgid "Ask.com was successfully notified about changes." +msgstr "Ask.com is succesvol op de hoogte gesteld van de veranderingen." + +msgid "It took %time% seconds to notify Ask.com, maybe you want to disable this feature to reduce the building time." +msgstr "Het duurde %time% seconden om Ask.com op de hoogte te stellen. Misschien wil je deze optie deactiveren om de doorlooptijd van de sitemap generatie te verkorten?" + +msgid "There was a problem while notifying Ask.com. View result" +msgstr "Er was een probleem bij het informeren van Ask.com. Resultaat weergeven" + +msgid "The building process took about %time% seconds to complete and used %memory% MB of memory." +msgstr "Het sitemap genereren duurde %time% seconden en gebruikte %memory%MB geheugen." + +msgid "The building process took about %time% seconds to complete." +msgstr "Het sitemap genereren duurde %time% seconden." + +msgid "The content of your sitemap didn't change since the last time so the files were not written and no search engine was pinged." +msgstr "De inhoud van de sitemap heeft zich niet gewijzigd sinds de laatste keer, als gevolgd zijn er geen bestanden weggeschreven en zijn de zoekmachines niet op de hoogte gesteld." + +msgid "The last run didn't finish! Maybe you can raise the memory or time limit for PHP scripts. Learn more" +msgstr "De laatste generatie van de sitemap is niet afgesloten! Het kan helpen de geheugenlimiet voor PHP scripts te verhogen. Meer informatie" + +msgid "The last known memory usage of the script was %memused%MB, the limit of your server is %memlimit%." +msgstr "Het laatst bekende geheugengebruik van het script lag op %memused%MB, het limiet voor PHP scripts op deze server is %memlimit%." + +msgid "The last known execution time of the script was %timeused% seconds, the limit of your server is %timelimit% seconds." +msgstr "De laatst bekende doorlooptijd lag op %timeused% seconden, het limiet voor PHP scripts voor deze server is %timelimit% seconden." + +msgid "The script stopped around post number %lastpost% (+/- 100)" +msgstr "Het script is ongeveer gestopt bij bericht nummer %lastpost% (+/- 100)" + +msgid "If you changed something on your server or blog, you should rebuild the sitemap manually." +msgstr "Wanneer er iets gewijzigd is op de server of aan het Blog, dan kan men de sitemap met de hand opnieuw genereren." + +msgid "If you encounter any problems with the build process you can use the debug function to get more information." +msgstr "Indien er bij het genereren van de sitemap problemen zijn kan men de Debug Functie gebruiken om meer informatie over de opgetreden fout te achterhalen." + +msgid "Basic Options" +msgstr "Basisinstellingen" + +msgid "Sitemap files:" +msgstr "Sitemap bestanden:" + +msgid "Learn more" +msgstr "Meer informatie" + +msgid "Write a normal XML file (your filename)" +msgstr "Sitemap als XML bestand aanmaken (bestandsnaam)" + +msgid "Write a gzipped file (your filename + .gz)" +msgstr "Gezipte sitemap aanmaken (bestandsnaam + .gz)" + +msgid "Building mode:" +msgstr "Generatie mode::" + +msgid "Rebuild sitemap if you change the content of your blog" +msgstr "Sitemap opnieuw genereren wanneer je de inhoud van je Blog wijzigt" + +msgid "Enable manual sitemap building via GET Request" +msgstr "Handmatig genereren van de sitemap via GET aanvragen toestaan" + +msgid "This will allow you to refresh your sitemap if an external tool wrote into the WordPress database without using the WordPress API. Use the following URL to start the process: %1 Please check the logfile above to see if sitemap was successfully built." +msgstr "Hiermee kun je je sitemap opnieuw genereren indien een externe tool in de database van WordPress geschreven heeft zonder gebruik te maken van de API. Gebruik de volgende URL om het process te starten: %1 Controleer het logbestand hierboven om te kijken of de sitemap succesvol is gegenereerd." + +msgid "Update notification:" +msgstr "Wijzigings notificatie:" + +msgid "Notify Google about updates of your Blog" +msgstr "Google YAHOO op de hoogte stellen van de Blog wijzigingen" + +msgid "No registration required, but you can join the Google Webmaster Tools to check crawling statistics." +msgstr "Registratie niet noodzakelijk, maar je kunt je optioneel aanmelden bij de Google Webmaster Tools om de indexeringsstatistieken van de site te bekijken." + +msgid "Notify MSN Live Search about updates of your Blog" +msgstr "MSN Live Search op de hoogte stellen van de Blog wijzigingen" + +msgid "No registration required, but you can join the MSN Live Webmaster Tools to check crawling statistics." +msgstr "Registratie niet noodzakelijk, maar je kunt je optioneel aanmelden bij de MSN Live Webmaster Tools om de indexeringsstatistieken van de site te bekijken." + +msgid "Notify Ask.com about updates of your Blog" +msgstr "Ask.com YAHOO op de hoogte stellen van de Blog wijzigingen" + +msgid "No registration required." +msgstr "Geen registratie noodzakelijk" + +msgid "Notify YAHOO about updates of your Blog" +msgstr "YAHOO op de hoogte stellen van de Blog wijzigingen" + +msgid "Your Application ID:" +msgstr "Jouw Application ID:" + +msgid "Don't you have such a key? Request one here! %s2" +msgstr "Nog geen key? Hier aanvragen! %s2" + +msgid "Modify or create %s file in blog root which contains the sitemap location." +msgstr "Maak of wijzig het %s bestand in de root directory van je Blog." + +msgid "File permissions: " +msgstr "Bestands permissies:" + +msgid "OK, robots.txt is writable." +msgstr "OK, robots.txt kan weggeschreven worden." + +msgid "Error, robots.txt is not writable." +msgstr "Error, robots.txt kan niet weggeschreven worden." + +msgid "OK, robots.txt doesn't exist but the directory is writable." +msgstr "OK, robots.txt bestaat nog niet, maar de directory kan beschreven worden." + +msgid "Error, robots.txt doesn't exist and the directory is not writable" +msgstr "Error, robots.txt bestaat niet en de directory is niet beschrijfbaar" + +msgid "Advanced options:" +msgstr "Uitgebreide instellingen" + +msgid "Limit the number of posts in the sitemap:" +msgstr "Het aantal berichten in de sitemap limiteren:" + +msgid "Newer posts will be included first" +msgstr "Nieuwe berichten worden het eerst opgenomen" + +msgid "Try to increase the memory limit to:" +msgstr "Probeer de geheugenlimiet te verhogen naar: " + +msgid "e.g. \"4M\", \"16M\"" +msgstr "bijv. \"4M\", \"16M\"" + +msgid "Try to increase the execution time limit to:" +msgstr "Probeer de tijdslimiet van de generatie aan te passen naar:" + +msgid "in seconds, e.g. \"60\" or \"0\" for unlimited" +msgstr "in seconden, bijv. \"60\" of \"0\" voor geen limiet" + +msgid "Include a XSLT stylesheet:" +msgstr "XSLT stylesheet toevoegen:" + +msgid "Use Default" +msgstr "Gebruik de standaard" + +msgid "Full or relative URL to your .xsl file" +msgstr "Volledige of relatieve pad naar het .xsl bestand" + +msgid "Enable MySQL standard mode. Use this only if you're getting MySQL errors. (Needs much more memory!)" +msgstr "MySQL standaard mode activeren. Gebruik deze optie indien MYSQL fouten optreden (gebruikt meer geheugen!)" + +msgid "Build the sitemap in a background process (You don't have to wait when you save a post)" +msgstr "Genereer de sitemap in de achtergrond (Hierdoor is er geen wachttijd wanneer er een bericht wordt geplaatst)" + +msgid "Exclude the following posts or pages:" +msgstr "Volgende berichten of pagina's uitsluiten:" + +msgid "List of IDs, separated by comma" +msgstr "Lijst van de IDs, gescheiden door komma" + +msgid "Additional pages" +msgstr "Addtionele pagina's" + +msgid "Here you can specify files or URLs which should be included in the sitemap, but do not belong to your Blog/WordPress.
    For example, if your domain is www.foo.com and your blog is located on www.foo.com/blog you might want to include your homepage at www.foo.com" +msgstr "Hier kunnen de bestanden of URLHier können Sie zusätzliche Seiten in Form von URLs angeben, welche mit in Ihre Sitemap aufgenommen werden sollen aber nicht von WordPress erzeugt werden. Falls Sie z.B. Ihre Homepage auf www.beispiel.com haben, Ihr Blog aber unter www.beispiel.com/blog zu erreichen ist, tragen Sie Ihre Homepage als http://www.beispiel.com hier ein." + +msgid "Note" +msgstr "Notitie" + +msgid "If your blog is in a subdirectory and you want to add pages which are NOT in the blog directory or beneath, you MUST place your sitemap file in the root directory (Look at the "Location of your sitemap file" section on this page)!" +msgstr "Indien het Blog in een subdirectory staat en je wilt pagina's toevoegen die NIET in de Blog of onderliggende directories liggen, dan MOET je je sitemap bestand in de root direcotry van de webserver plaatsten. (Kijk naar de "Locatie van het sitemap bestand" sectiew op deze pagina)!" + +msgid "URL to the page" +msgstr "URL naar de pagina" + +msgid "Enter the URL to the page. Examples: http://www.foo.com/index.html or www.foo.com/home " +msgstr "Vul hier de URL naar de pagina in. Voorbeeld: http://www.zinloosverteld.nl of http://www.zinloosverteld.nl/blog" + +msgid "Priority" +msgstr "Prioriteit" + +msgid "Choose the priority of the page relative to the other pages. For example, your homepage might have a higher priority than your imprint." +msgstr "Kies hier de prioriteit van de pagina relatief ten opzichte van andere pagina's. Bijvoorbeeld, de homepage heeft een hogere prioriteit dan een colofon pagina." + +msgid "Last Changed" +msgstr "Laatste wijziging" + +msgid "Enter the date of the last change as YYYY-MM-DD (2005-12-31 for example) (optional)." +msgstr "Voer hier de laatste wijziging in in het formaat JJJJ-MM-DD (bijv. 2005-12-31). Dit veld is optioneel en hoeft niet ingevuld te worden." + +msgid "Change Frequency" +msgstr "Wijzigingsfrequentie" + +msgid "#" +msgstr "#" + +msgid "No pages defined." +msgstr "Er zijn geen pagina's gedefiniëerd." + +msgid "Add new page" +msgstr "Nieuwe pagina toevoegen" + +msgid "Post Priority" +msgstr "Bericht prioriteit" + +msgid "Please select how the priority of each post should be calculated:" +msgstr "Kies hier de berekeningsmethode voor de prioriteit van de berichten." + +msgid "Do not use automatic priority calculation" +msgstr "Geen automatische prioriteitsberekening gebruiken" + +msgid "All posts will have the same priority which is defined in "Priorities"" +msgstr "Alle berichten hebben dezelfde prioriteit die onder "Prioriteiten" is ingesteld." + +msgid "Location of your sitemap file" +msgstr "Locatie van het sitemap bestand" + +msgid "Automatic detection" +msgstr "Automatische herkenning" + +msgid "Filename of the sitemap file" +msgstr "Bestandsnaam van de sitemap" + +msgid "Detected Path" +msgstr "Herkend pad" + +msgid "Detected URL" +msgstr "Herkende URL" + +msgid "Custom location" +msgstr "Handmatig ingesteld pad" + +msgid "Absolute or relative path to the sitemap file, including name." +msgstr "Absoluut of relatief pad naar het sitemap bestand inclusief bestandsnaam." + +msgid "Example" +msgstr "Voorbeeld" + +msgid "Complete URL to the sitemap file, including name." +msgstr "Absolute URL naar het sitemap bestand inclusief de bestandsnaam." + +msgid "Sitemap Content" +msgstr "Sitemap inhoud" + +msgid "Include homepage" +msgstr "Bevat homepage" + +msgid "Include posts" +msgstr "Bevat berichten" + +msgid "Include static pages" +msgstr "Bevat statische pagina's" + +msgid "Include categories" +msgstr "Bevat categorieën" + +msgid "Include archives" +msgstr "Bevat archieven" + +msgid "Include tag pages" +msgstr "Bevag tag pagina's" + +msgid "Include author pages" +msgstr "Bevat auteur pagina's" + +msgid "Change frequencies" +msgstr "Wijzigingsfrequentie" + +msgid "Please note that the value of this tag is considered a hint and not a command. Even though search engine crawlers consider this information when making decisions, they may crawl pages marked \"hourly\" less frequently than that, and they may crawl pages marked \"yearly\" more frequently than that. It is also likely that crawlers will periodically crawl pages marked \"never\" so that they can handle unexpected changes to those pages." +msgstr "Let er op dat de waarde van deze tag als tip gezien wordt en niet als commando. Zoekmachines kunnen deze tip oppakken, echter hoeven zij zich er niet aan te houden. Ze kunnen pagina's per \"Hourly\" gemarkeerd minder bezoeken. En pagina's gemarkeerd \"Yearly\" kunnen frequentere controles krijgen. Ook pagina's gemarkeerd \"Never\" kunnen worden bezocht om zo onverwachte veranderingen op te pakken." + +msgid "Homepage" +msgstr "Homepage" + +msgid "Posts" +msgstr "Berichten" + +msgid "Static pages" +msgstr "Statische pagina's" + +msgid "Categories" +msgstr "Categorieën" + +msgid "The current archive of this month (Should be the same like your homepage)" +msgstr "Het archief van de huidige maand (Zou hetzelfde moeten zijn als de homepage)" + +msgid "Older archives (Changes only if you edit an old post)" +msgstr "Archieven van voorgaande maanden" + +msgid "Tag pages" +msgstr "Tag pagina's" + +msgid "Author pages" +msgstr "Auteur pagina's" + +msgid "Priorities" +msgstr "Prioriteiten" + +msgid "Posts (If auto calculation is disabled)" +msgstr "Berichten (Wanneer automatische berekening is geactiveerd)" + +msgid "Minimum post priority (Even if auto calculation is enabled)" +msgstr "Minimale prioriteit voor berichten (ook wanneer de automatische berekening is geactiveerd)" + +msgid "Archives" +msgstr "Archieven" + +msgid "Update options" +msgstr "Instellingen opslaan" + +msgid "Reset options" +msgstr "Instellingen herstellen" + diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/lang/sitemap-pl_PL.mo Binary file web/wp-content/plugins/google-sitemap-generator/lang/sitemap-pl_PL.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/lang/sitemap-pl_PL.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/google-sitemap-generator/lang/sitemap-pl_PL.po Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,640 @@ +# Polish Language File for Google XML Sitemaps - sitemap-pl_PL.po) +# Copyright (C) 2007 Kuba Zwolinski : http://kubazwolinski.com +# This file is distributed under the same license as the WordPress package. +# kuba , 2007. +# $Id: sitemap-pl_PL.po 2504 2007-10-03 09:19:18Z +# +msgid "" +msgstr "" +"Project-Id-Version: Google Sitemap Generator PL\n" +"Report-Msgid-Bugs-To: <[mail-address]>\n" +"POT-Creation-Date: 2005-06-15 00:00+0000\n" +"PO-Revision-Date: 2007-12-30 12:52+0100\n" +"Last-Translator: Kuba Zwolinski \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language-Team: SnowDog \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" +"Plural-Forms: nplurals=3; plural=n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:846 +msgid "Comment Count" +msgstr "Liczba komentarzy" + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:858 +msgid "Uses the number of comments of the post to calculate the priority" +msgstr "Używa liczbę komentarzy do obliczania priorytetu wpisu" + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:918 +msgid "Comment Average" +msgstr "Średnia komentarzy" + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:930 +msgid "Uses the average comment count to calculate the priority" +msgstr "Używa średnią liczbę komentarzy do obliczania priorytetu wpisu" + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:993 +msgid "Popularity Contest" +msgstr "Konkurs popularności" + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:1005 +msgid "Uses the activated Popularity Contest Plugin from Alex King. See Settings and Most Popular Posts" +msgstr "Używa włączonej wtyczki Popularity Contest od Alex King. Zobaczustawienia i najbardziej popularne wpisy" + +msgid "XML-Sitemap Generator" +msgstr "Generator XML-Sitemap" + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:2397 +msgid "XML-Sitemap" +msgstr "XML-Sitemap" + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:2582 +msgid "Thank you very much for your donation. You help me to continue support and development of this plugin and other free software!" +msgstr "Wielkie dzięki za wsparcie. Pomagasz mi rozwijać tę wtyczkę oraz inne darmowe oprogramowanie!" + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:2582 +msgid "Hide this notice" +msgstr "Ukryj tę informację" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2606 +#, php-format +msgid "Thanks for using this plugin! You've installed this plugin over a month ago. If it works and your are satisfied with the results, isn't it worth at least one dollar? Donations help me to continue support and development of this free software! Sure, no problem!" +msgstr "Dzięki za używanie tej wtyczki! Wtyczka została zainstalowana ponad miesiąc temu. Jeśli działa dobrze i rezultaty sa zgodne z Twoimi oczekiwaniami, czy nie jest to wart paru złotych? Dotacje pomagają mi kontynuowac rozwój wtyczki oraz zapewnić pomoc techniczną użytkownikom tego darmowego programu! Jasne, bardzo chętnie!" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2606 +msgid "No thanks, please don't bug me anymore!" +msgstr "Nie, dzięki. I nie zawracaj mi więcej tym głowy!" + +msgid "XML Sitemap Generator for WordPress" +msgstr "Generator XML-Sitemap" + +msgid "Configuration updated" +msgstr "Konfiguracja zaktualizowana" + +msgid "Error while saving options" +msgstr "Wystąpił błąd podczas zapisywania opcji" + +msgid "Pages saved" +msgstr "Strony zostały zapisane" + +msgid "Error while saving pages" +msgstr "Wystąpił błąd podczas zapisywania stron." + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:2711 +#, php-format +msgid "Robots.txt file saved" +msgstr "Plik Robots.txt został zapisany" + +msgid "Error while saving Robots.txt file" +msgstr "Wystąpił błąd podczas zapisu pliku Robots.txt" + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:2721 +msgid "The default configuration was restored." +msgstr "Domyślna konfiguracja została przywrócona." + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:2814 +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:2831 +msgid "open" +msgstr "otworzyć" + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:2815 +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:2832 +msgid "close" +msgstr "zamknąć" + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:2816 +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:2833 +msgid "click-down and drag to move this box" +msgstr "wciśnik klawisz i przeciągnij żeby przesunąć" + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:2817 +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:2834 +msgid "click to %toggle% this box" +msgstr "kliknij aby %toggle% to pole" + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:2818 +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:2835 +msgid "use the arrow keys to move this box" +msgstr "użyj kursorów aby przesunąć ten blok" + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:2819 +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:2836 +msgid ", or press the enter key to %toggle% it" +msgstr ", lub wciśnij enter aby %toggle%" + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:2847 +msgid "About this Plugin:" +msgstr "O wtyczce:" + +msgid "Plugin Homepage" +msgstr "Strona główna wtyczki" + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:2850 +msgid "Notify List" +msgstr "Lista zmian wtyczki" + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:2851 +msgid "Support Forum" +msgstr "Forum pomocy" + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:2852 +msgid "Donate with PayPal" +msgstr "Wspomóż nas przez PayPal" + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:2853 +msgid "My Amazon Wish List" +msgstr "Lista życzeń Amazon" + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:2854 +msgid "translator_name" +msgstr "Strona tłumaczenia" + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:2854 +msgid "translator_url" +msgstr "http://kubazwolinski.com/wordpress/tlumaczenie-wtyczki-google-xml-sitemaps/" + +msgid "Sitemap Resources:" +msgstr "O mapie strony:" + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:2860 +msgid "Webmaster Tools" +msgstr "Webmaster Tools" + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:2861 +msgid "Webmaster Blog" +msgstr "Webmaster Blog" + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:2863 +msgid "Site Explorer" +msgstr "Site Explorer" + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:2864 +msgid "Search Blog" +msgstr "Search Blog" + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:2861 +msgid "Webmaster Center Blog" +msgstr "Webmaster Center Blog" + +msgid "Sitemaps Protocol" +msgstr "Sitemaps Protocol" + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:2867 +msgid "Official Sitemaps FAQ" +msgstr "Official Sitemaps FAQ" + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:2868 +msgid "My Sitemaps FAQ" +msgstr "FAQ wtyczki" + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:2873 +msgid "Recent Donations:" +msgstr "Ostatnie dotacje:" + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:2877 +msgid "List of the donors" +msgstr "Lista darczyńców" + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:2879 +msgid "Hide this list" +msgstr "Ukryj tę listę" + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:2882 +msgid "Thanks for your support!" +msgstr "Dzięki za wsparcie!" + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:2894 +msgid "Status" +msgstr "Status" + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:2904 +#, php-format +msgid "The sitemap wasn't built yet. Click here to build it the first time." +msgstr "Mapa strony nie została jeszcze zbudowana. Kliknij tutaj, aby ją zbudować po raz pierwszy." + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:2910 +msgid "Your sitemap was last built on %date%." +msgstr "Ostatnia modyfikacja twojej mapy strony: %date%." + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:2912 +msgid "There was a problem writing your sitemap file. Make sure the file exists and is writable. Learn moreDowiedz się więcejzipped) was last built on %date%." +msgstr "Ostatnia modyfikacja twojej spakowanej mapy strony: %date%." + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:2921 +msgid "There was a problem writing your zipped sitemap file. Make sure the file exists and is writable. Learn moreDowiedz się więcejsuccessfully notified about changes." +msgstr "Google został pomyślnie powiadomiony o zmianach." + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:2930 +msgid "It took %time% seconds to notify Google, maybe you want to disable this feature to reduce the building time." +msgstr "Powiadomienie Google zajęło %time% sekund, możesz wyłączyć tę opcję, aby zredukować czas publikacji." + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:2933 +#, php-format +msgid "There was a problem while notifying Google. View result" +msgstr "Wystąpił problem z powiadomieniem Google. Obejrzyj rezultat" + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:2939 +msgid "YAHOO was successfully notified about changes." +msgstr "YAHOO został pomyślnie powiadomiony o zmianach." + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:2942 +msgid "It took %time% seconds to notify YAHOO, maybe you want to disable this feature to reduce the building time." +msgstr "Powiadomienie YAHOO zajęło %time% sekund, możesz wyłączyć tę opcję, aby zredukować czas publikacji." + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:2945 +#, php-format +msgid "There was a problem while notifying YAHOO. View result" +msgstr "Wystąpił problem z powiadomieniem YAHOO. Obejrzyj rezultat" + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:2939 +msgid "MSN was successfully notified about changes." +msgstr "MSN został pomyślnie powiadomiony o zmianach." + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:2954 +msgid "It took %time% seconds to notify MSN.com, maybe you want to disable this feature to reduce the building time." +msgstr "Powiadomienie MSN.com zajęło %time% sekund, możesz wyłączyć tę opcję, aby zredukować czas publikacji." + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:2957 +#, php-format +msgid "There was a problem while notifying MSN.com. View result" +msgstr "Wystąpił problem z powiadomieniem MSN.com. Obejrzyj rezultat" + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:2951 +msgid "Ask.com was successfully notified about changes." +msgstr "Ask.com został pomyślnie powiadomiony o zmianach." + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:2954 +msgid "It took %time% seconds to notify Ask.com, maybe you want to disable this feature to reduce the building time." +msgstr "Powiadomienie Ask.com zajęło %time% sekund, możesz wyłączyć tę opcję, aby zredukować czas publikacji." + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:2957 +#, php-format +msgid "There was a problem while notifying Ask.com. View result" +msgstr "Wystąpił problem z powiadomieniem Ask.com. Obejrzyj rezultat" + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:2965 +msgid "The building process took about %time% seconds to complete and used %memory% MB of memory." +msgstr "Proces budowy mapy zajął %time% sek. i wykorzystał %memory% MB pamięci." + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:2967 +msgid "The building process took about %time% seconds to complete." +msgstr "Proces budowy mapy zajął %time% sek." + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:2971 +msgid "The content of your sitemap didn't change since the last time so the files were not written and no search engine was pinged." +msgstr "Zawartość twojej mapy nie zmieniła się /strong> od ostatniego razu, więc pliki nie zostały nadpisane i żadna wyszukiwarka nie została powiadomiona." + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:2975 +msgid "The last run didn't finish! Maybe you can raise the memory or time limit for PHP scripts. Learn more" +msgstr "Ostatnia operacja nie została zakończona! Może należy zwiększyć limit pamieci lub czasu wykonywania dla skryptów PHP. Dowiedz się więcej" + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:2977 +msgid "The last known memory usage of the script was %memused%MB, the limit of your server is %memlimit%." +msgstr "Ostatnie znane zużycie pamięci wyniosło %memused%MB, limit twojego serwera to %memlimit%." + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:2981 +msgid "The last known execution time of the script was %timeused% seconds, the limit of your server is %timelimit% seconds." +msgstr "Ostatni znany czas wykonywania skryptu wyniósł %timeused% sek., limit twojego serwera wynosi %timelimit% sek." + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:2985 +msgid "The script stopped around post number %lastpost% (+/- 100)" +msgstr "Skrypt przerwał wykonywanie w okolicach wpisu nr %lastpost% (+/- 100)" + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:2988 +#, php-format +msgid "If you changed something on your server or blog, you should rebuild the sitemap manually." +msgstr "Jeśli na blogu coś zostało zmienione, należy przebudować mapę ręcznie." + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:2990 +#, php-format +msgid "If you encounter any problems with the build process you can use the debug function to get more information." +msgstr "Jeśli napotkasz jakiś problem podczas procesu budowy mapy, możesz użyć funkcji debugowania aby uzyskać więcej informacji." + +msgid "Basic Options" +msgstr "Opcje podstawowe" + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:3007 +msgid "Sitemap files:" +msgstr "Pliki mapy strony:" + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:3007 +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:3022 +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:3042 +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:3067 +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:3084 +msgid "Learn more" +msgstr "Dowiedz się więcej" + +msgid "Write a normal XML file (your filename)" +msgstr "Zapisz normalny plik XML (własna nazwa)" + +msgid "Write a gzipped file (your filename + .gz)" +msgstr "Zapisz plik gzip (własna nazwa + .gz)" + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:3022 +msgid "Building mode:" +msgstr "Tryb budowy:" + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:3027 +msgid "Rebuild sitemap if you change the content of your blog" +msgstr "Przebudowuj mapę przy zmianie zawartości bloga" + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:3034 +msgid "Enable manual sitemap building via GET Request" +msgstr "Włącz manualne przebudowywanie mapy przez polecenie GET" + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:3038 +msgid "This will allow you to refresh your sitemap if an external tool wrote into the WordPress database without using the WordPress API. Use the following URL to start the process: %1 Please check the logfile above to see if sitemap was successfully built." +msgstr "Ta opcja pozwoli na odświeżenie mapy strony jeśli jakieś zewnętrzne narzędzie dokona zapisu w bazie danych WordPress z pominięciem WordPress API. Użyj następującego adresu w celu rozpoczęcia procesu: %1 Sprawdź plik logu powyżej, aby sprawdzić czy mapa została odpowiednio przebudowana." + +msgid "Update notification:" +msgstr "Powiadomienia o aktualizacjach:" + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:3046 +msgid "Notify Google about updates of your Blog" +msgstr "Powiadamiaj Google o aktualizacjach twojego bloga" + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:3047 +#, php-format +msgid "No registration required, but you can join the Google Webmaster Tools to check crawling statistics." +msgstr "Rejestracja nie jest wymagana, ale możesz sprawdzić Google Webmaster Tools aby kontrolować statystyki indeksowania." + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:3046 +msgid "Notify MSN Live Search about updates of your Blog" +msgstr "Powiadamiaj MSN Live Search o aktualizacjach twojego bloga" + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:3047 +#, php-format +msgid "No registration required, but you can join the MSN Live Webmaster Tools to check crawling statistics." +msgstr "Rejestracja nie jest wymagana, ale możesz sprawdzić MSN Live Webmaster Tools aby kontrolować statystyki indeksowania." + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:3051 +msgid "Notify Ask.com about updates of your Blog" +msgstr "Powiadamiaj Ask.com o aktualizacjach twojego bloga" + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:3052 +msgid "No registration required." +msgstr "Rejestracja nie jest konieczna" + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:3056 +msgid "Notify YAHOO about updates of your Blog" +msgstr "Powiadamiaj YAHOO o aktualizacjach twojego bloga" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3154 +msgid "Your Application ID:" +msgstr "ID aplikacji:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3155 +#, php-format +msgid "Don't you have such a key? Request one here! %s2" +msgstr "Nie masz takiego klucza? Zamów go tutaj! %s2" + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:3062 +#, php-format +msgid "Modify or create %s file in blog root which contains the sitemap location." +msgstr "Modyfikuj lub utwórz plik %s w katalogu strony gdzie znajduje się mapa strony." + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:3065 +msgid "File permissions: " +msgstr "Status pliku: " + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:3070 +msgid "OK, robots.txt is writable." +msgstr "OK, plik robots.txt ma prawa do zapisu." + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:3072 +msgid "Error, robots.txt is not writable." +msgstr "Błąd, plik robots.txt nie ma praw do zapisu." + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:3076 +msgid "OK, robots.txt doesn't exist but the directory is writable." +msgstr "OK, plik robots.txt nie istnieje, ale katalog ma prawa do zapisu przez serwer." + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:3078 +msgid "Error, robots.txt doesn't exist and the directory is not writable" +msgstr "Błąd, plik robots.txt nie istnieje i katalog nie ma prawa do zapisu przez serwer" + +msgid "Advanced options:" +msgstr "Zaawansowane opcje:" + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:3087 +msgid "Limit the number of posts in the sitemap:" +msgstr "Limituj ilość wpisów w mapie:" + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:3087 +msgid "Newer posts will be included first" +msgstr "Nowsze wpisy będą załączone jako pierwsze" + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:3090 +msgid "Try to increase the memory limit to:" +msgstr "Spróbuj zwiększyć limit pamięci do:" + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:3090 +msgid "e.g. \"4M\", \"16M\"" +msgstr "np. \"4M\", \"16M\"" + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:3093 +msgid "Try to increase the execution time limit to:" +msgstr "Spróbuj zwiększyć limit czasu wykonywania do:" + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:3093 +msgid "in seconds, e.g. \"60\" or \"0\" for unlimited" +msgstr "w sekundach, np. \"60\" lub \"0\" dla nieograniczonego" + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:3096 +msgid "Include a XSLT stylesheet:" +msgstr "Załącz arkusz stylu XSLT: " + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:3096 +msgid "Use Default" +msgstr "Użyj wartości domyślnych" + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:3096 +msgid "Full or relative URL to your .xsl file" +msgstr "Absolutna lub relatywna ścieżka to twojego plik .xsl " + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3152 +msgid "Enable MySQL standard mode. Use this only if you're getting MySQL errors. (Needs much more memory!)" +msgstr "Włącz standardowy tryb MySQL. Użyj tego tylko w przypadku występowania błędów MySQL (zużywa duzo więcej pamięci!)." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3166 +msgid "Build the sitemap in a background process (You don't have to wait when you save a post)" +msgstr "Buduj mapę strony w tle (nie musisz czekać kiedy zapisujesz swój wpis)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3206 +msgid "Exclude the following posts or pages:" +msgstr "Wyłącz następujące wpisy lub strony:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3206 +msgid "List of IDs, separated by comma" +msgstr "Lista ID, oddzielonych przecinkami" + +msgid "Additional pages" +msgstr "Dodatkowe strony" + +msgid "Here you can specify files or URLs which should be included in the sitemap, but do not belong to your Blog/WordPress.
    For example, if your domain is www.foo.com and your blog is located on www.foo.com/blog you might want to include your homepage at www.foo.com" +msgstr "Tutaj możesz podąć pliki lub adresy URL, które powinny znaleźć się w twojej mapie strony, chociaż nie należą do blogu/WordPress'a.
    Na przykład, jeśli twoja domena to www.foo.com i twój blog znajduje się na www.foo.com/blog, możesz chcieć umieścić także stronę główną (czyli www.foo.com)" + +msgid "Note" +msgstr "Notatka" + +msgid "If your blog is in a subdirectory and you want to add pages which are NOT in the blog directory or beneath, you MUST place your sitemap file in the root directory (Look at the "Location of your sitemap file" section on this page)!" +msgstr "Jeśli twój blog znajduje się w podkatalogu i chcesz dodać strony które NIE znajdują się katalogu blogu lub jego subkatalogu, MUSISZ umieścić swoją mapę strony w katalogu głównym (zobacz sekcję " Lokalizacja twojej mapy strony" na tej stronie)!" + +msgid "URL to the page" +msgstr "URL strony" + +msgid "Enter the URL to the page. Examples: http://www.foo.com/index.html or www.foo.com/home " +msgstr "Wpisz adres URL strony. Przykłady: http://www.foo.com/index.html lub www.foo.com/home " + +msgid "Priority" +msgstr "Priorytet" + +msgid "Choose the priority of the page relative to the other pages. For example, your homepage might have a higher priority than your imprint." +msgstr "Wybierz priorytet strony w odniesieniu do innych stron. Na przykład, strona główna może mieć wyższy priorytet niż informacje o tobie." + +msgid "Last Changed" +msgstr "Ostatnio zmieniony" + +msgid "Enter the date of the last change as YYYY-MM-DD (2005-12-31 for example) (optional)." +msgstr "Wpisz datę ostatniej zmiany jako YYYY-MM-DD (na przykład: 2005-12-31) (opcja)." + +msgid "Change Frequency" +msgstr "Zmień częstotliwość" + +msgid "#" +msgstr "#" + +msgid "No pages defined." +msgstr "Brak zdefiniowanych stron" + +msgid "Add new page" +msgstr "Dodaj nową stronę" + +msgid "Post Priority" +msgstr "Priorytet wpisu" + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:3292 +msgid "Please select how the priority of each post should be calculated:" +msgstr "Wybierz sposób obliczania priorytetu poszczególnych wpisów:" + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:3294 +msgid "Do not use automatic priority calculation" +msgstr "Nie używaj automatycznego obliczania priorytetu" + +# F:\apache\htdocs\wordpress2-3\wp-content\plugins\google-sitemap-generator/sitemap.php:3294 +msgid "All posts will have the same priority which is defined in "Priorities"" +msgstr "Wszystkie wpisy mają ten sam priorytet, który jest zdefiniowany "Priorytety"" + +msgid "Location of your sitemap file" +msgstr "Lokalizacja twojego pliku mapy strony" + +msgid "Automatic detection" +msgstr "Automatycznw wykrywanie" + +msgid "Filename of the sitemap file" +msgstr "Nazwa pliku mapy strony" + +msgid "Detected Path" +msgstr "Wykryta ścieżka" + +msgid "Detected URL" +msgstr "Wykryty URL" + +msgid "Custom location" +msgstr "Własna lokalizacja" + +msgid "Absolute or relative path to the sitemap file, including name." +msgstr "Absolutna ścieżka do pliku mapy strony, zawierający nazwę. " + +msgid "Example" +msgstr "Przykład" + +msgid "Complete URL to the sitemap file, including name." +msgstr "Pełen adres URL to pliku mapy strony, zawierający nazwę." + +msgid "Sitemap Content" +msgstr "Zawartość mapy strony" + +msgid "Include homepage" +msgstr "Zawiera stronę główną" + +msgid "Include posts" +msgstr "Zawiera wpisy" + +msgid "Include static pages" +msgstr "Zawiera statyczne strony" + +msgid "Include categories" +msgstr "Zawiera kategorie" + +msgid "Include archives" +msgstr "Zawiera archiwa" + +msgid "Include tag pages" +msgstr "Zawiera strony tagów" + +msgid "Include author pages" +msgstr "Zawiera strony autorów" + +msgid "Change frequencies" +msgstr "Zmień częstotliwość" + +msgid "Please note that the value of this tag is considered a hint and not a command. Even though search engine crawlers consider this information when making decisions, they may crawl pages marked \"hourly\" less frequently than that, and they may crawl pages marked \"yearly\" more frequently than that. It is also likely that crawlers will periodically crawl pages marked \"never\" so that they can handle unexpected changes to those pages." +msgstr "Proszę wziąść pod uwagę, że zawartość tego znacznika jest wskazówką, a nie poleceniem. Nawet jeśli wyszukiwarki biorą tą informację pod uwagę podczas podejmowania decyzji, to mogą one przeglądać strony zaznaczone jako \"co godzinę\" rzadziej. Jest również prawdopodobne, że strony oznaczone jako \"co rok\" będą przeglądane częściej. Również jest możliwe, że mimo oznaczenia \"nigdy\", wyszukiwarki mogą takie strony czasem przeglądać i wychwytywać nieoczekiwanie zmiany na tych stronach." + +msgid "Homepage" +msgstr "Strona główna" + +msgid "Posts" +msgstr "Wpisy" + +msgid "Static pages" +msgstr "Statyczne strony" + +msgid "Categories" +msgstr "Kategorie" + +msgid "The current archive of this month (Should be the same like your homepage)" +msgstr "Aktualne archiwum tego miesiąca (powinno mieć taką samą częstotliwość jak strona główna)" + +msgid "Older archives (Changes only if you edit an old post)" +msgstr "Starsz archiwa (zmień tylko jeśli edytujesz stare wpisy)" + +msgid "Tag pages" +msgstr "Strony tagów" + +msgid "Author pages" +msgstr "Strony autorów" + +msgid "Priorities" +msgstr "Priorytety" + +msgid "Posts (If auto calculation is disabled)" +msgstr "Wpisy (jeśli automatyczne przeliczanie jest wyłączone)" + +msgid "Minimum post priority (Even if auto calculation is enabled)" +msgstr "Minimalny priorytet wpisu (nawet jeśli automatyczne przeliczanie jest włączone)" + +msgid "Archives" +msgstr "Archiwa" + +msgid "Update options" +msgstr "Zaktualizuj opcje" + +msgid "Reset options" +msgstr "Reset opcji" + diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/lang/sitemap-pt_BR.mo Binary file web/wp-content/plugins/google-sitemap-generator/lang/sitemap-pt_BR.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/lang/sitemap-pt_BR.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/google-sitemap-generator/lang/sitemap-pt_BR.po Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,327 @@ +# [Countryname] Language File for sitemap (sitemap-[localname].po) +# Copyright (C) 2005 [name] : [URL] +# This file is distributed under the same license as the WordPress package. +# [name] <[mail-address]>, 2005. +# $Id: sitemap-es_ES.po 2504 2005-07-03 22:19:18Z arnee $ +# +msgid "" +msgstr "" +"Project-Id-Version: sitemap\n" +"Report-Msgid-Bugs-To: <[mail-address]>\n" +"POT-Creation-Date: 2005-06-15 00:00+0000\n" +"PO-Revision-Date: 2006-11-24 18:57-0300\n" +"Last-Translator: Rafael Lima \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language-Team: Pedro Polonia \n" +"X-Poedit-Language: Portuguese\n" +"X-Poedit-Country: PORTUGAL\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-Bookmarks: -1,59,-1,-1,-1,71,-1,-1,-1,-1\n" + +#: sitemap.php:375 +msgid "always" +msgstr "sempre" + +msgid "hourly" +msgstr "a cada hora" + +msgid "daily" +msgstr "diariamente" + +msgid "weekly" +msgstr "semanalmente" + +msgid "monthly" +msgstr "mensalmente" + +msgid "yearly" +msgstr "anualmente" + +msgid "never" +msgstr "nunca" + +msgid "Detected Path" +msgstr "Caminho detectado" + +msgid "Example" +msgstr "Exemplo" + +msgid "Absolute or relative path to the sitemap file, including name." +msgstr "Caminho absoluto ou relativo para o arquivo sitemap, incluindo o nome." + +msgid "Complete URL to the sitemap file, including name." +msgstr "URL completo para o arquivo sitemap, incluindo o nome." + +msgid "Automatic location" +msgstr "Localização automática" + +msgid "Manual location" +msgstr "Localização manual" + +msgid "OR" +msgstr "OU" + +msgid "Location of your sitemap file" +msgstr "Localização do arquivo sitemap" + +msgid "If your blog is in a subdirectory and you want to add pages which are NOT in the blog directory or beneath, you MUST place your sitemap file in the root directory (Look at the "Location of your sitemap file" section on this page)!" +msgstr "Se o seu blog está numa pasta e quer adicionar paginas que NÃO estão na pasta do seu blog ou em sub-pastas, DEVE colocar o seu arquivo sitemap na raiz dos directórios (Olhe na secção \"Localização do seu arquivo sitemap\" nesta página)! " + +#: sitemap.php:512 +msgid "Configuration updated" +msgstr "Configuração actualizada" + +#: sitemap.php:513 +msgid "Error" +msgstr "Erro" + +#: sitemap.php:521 +msgid "A new page was added. Click on "Save page changes" to save your changes." +msgstr "Uma nova página foi adicionada. Seleccione em \"Gravar alterações\" para guardar as alterações. " + +#: sitemap.php:527 +msgid "Pages saved" +msgstr "Páginas guardadas" + +#: sitemap.php:528 +msgid "Error while saving pages" +msgstr "Erro durante a gravação das páginas " + +#: sitemap.php:539 +msgid "The page was deleted. Click on "Save page changes" to save your changes." +msgstr "A página foi eliminada. Seleccione em \"Gravar alterações\" para guardar as alterações. " + +#: sitemap.php:542 +msgid "You changes have been cleared." +msgstr "As suas alterações foram anuladas." + +#: sitemap.php:555 +msgid "Sitemap Generator" +msgstr "Gerador Sitemap" + +#: sitemap.php:558 +msgid "Manual rebuild" +msgstr "Reconstrução manual" + +#: sitemap.php:559 +msgid "If you want to build the sitemap without editing a post, click on here!" +msgstr "Se deseja construir o sitemap sem editar nenhum artigo, clique aqui!" + +#: sitemap.php:560 +msgid "Rebuild Sitemap" +msgstr "Reconstruir Sitemap" + +#: sitemap.php:564 +msgid "Additional pages" +msgstr "Páginas adicionais" + +#: sitemap.php:566 +msgid "Here you can specify files or URLs which should be included in the sitemap, but do not belong to your Blog/WordPress.
    For example, if your domain is www.foo.com and your blog is located on www.foo.com/blog you might want to include your homepage at www.foo.com" +msgstr "Aqui pode especificar os arquivos ou URLs que devem ser incluídas no sitemap mas que não pertencem ao seu blog/WordPress.
    Por exemplo: se o teu domínio é www.foo.com e o teu blog está localizado em www.foo.com/blog, deve querer incluir a sua página inicial em www.foo.com " + +#: sitemap.php:568 +msgid "URL to the page" +msgstr "URL da página" + +#: sitemap.php:569 +msgid "Enter the URL to the page. Examples: http://www.foo.com/index.html or www.foo.com/home " +msgstr "URL da página. Exemplos: http://www.foo.com/index.html ou www.foo.com/home" + +#: sitemap.php:571 +msgid "Priority" +msgstr "Prioridade" + +#: sitemap.php:572 +msgid "Choose the priority of the page relative to the other pages. For example, your homepage might have a higher priority than your imprint." +msgstr "Escolha a prioridade relativa da página relativa a outras páginas. Por exemplo, a sua página inicial deve ter uma maior prioridade que os seus dados pessoais." + +#: sitemap.php:574 +msgid "Last Changed" +msgstr "Última Alteração" + +#: sitemap.php:575 +msgid "Enter the date of the last change as YYYY-MM-DD (2005-12-31 for example) (optional)." +msgstr "Entre a data da última alteração como AAAA-MM-DD (por exemplo: 2005-12-31) (opcional). " + +#: sitemap.php:583 +msgid "Change Frequency" +msgstr "Frequência das Alterações " + +#: sitemap.php:585 +msgid "#" +msgstr "#" + +#: sitemap.php:609 +msgid "No pages defined." +msgstr "Nenhuma página definida" + +#: sitemap.php:616 +msgid "Add new page" +msgstr "Adicionar nova página " + +#: sitemap.php:617: +msgid "Save page changes" +msgstr "Guardar as alterações da página" + +#: sitemap.php:618: +msgid "Undo all page changes" +msgstr "Desfazer todas as alterações da página" + +#: sitemap.php:621: +msgid "Delete marked page" +msgstr "Apagar a página marcada" + +#: sitemap.php:627 +msgid "Basic Options" +msgstr "Opções Básicas" + +#: sitemap.php:632 +msgid "Enable automatic priority calculation for posts based on comment count" +msgstr "Activar o cálculo automático de prioridades para artigos baseado no número de comentários. " + +#: sitemap.php:638 +msgid "Write debug comments" +msgstr "Escrever comentários de depuração (debug) " + +#: sitemap.php:643 +msgid "Filename of the sitemap file" +msgstr "Nome do arquivo sitemap" + +#: sitemap.php:650 +msgid "Write a normal XML file (your filename)" +msgstr "Escrever um arquivo XML normal (nome do arquivo)" + +#: sitemap.php:652 +msgid "Detected URL" +msgstr "URL detectada" + +#: sitemap.php:657 +msgid "Write a gzipped file (your filename + .gz)" +msgstr "Gravar um arquivo comprimido com gzip (nome_arquivo +.gz)" + +#: sitemap.php:664 +msgid "Auto-Ping Google Sitemaps" +msgstr "Ping automático a Google Sitemaps" + +#: sitemap.php:665 +msgid "This option will automatically tell Google about changes." +msgstr "Esta opção indicará automaticamente as alterações ao Google." + +#: sitemap.php:672 +msgid "Includings" +msgstr "Inclusões" + +#: sitemap.php:677 +msgid "Include homepage" +msgstr "Incluir página principal" + +#: sitemap.php:683 +msgid "Include posts" +msgstr "Incluir artigos" + +#: sitemap.php:689 +msgid "Include static pages" +msgstr "Incluir páginas estáticas" + +#: sitemap.php:695 +msgid "Include categories" +msgstr "Incluir categorías" + +#: sitemap.php:701 +msgid "Include archives" +msgstr "Incluir arquivos" + +#: sitemap.php:708 +msgid "Change frequencies" +msgstr "Frequência das mudanças " + +#: sitemap.php:709 +msgid "Note" +msgstr "Nota" + +#: sitemap.php:710 +msgid "Please note that the value of this tag is considered a hint and not a command. Even though search engine crawlers consider this information when making decisions, they may crawl pages marked \"hourly\" less frequently than that, and they may crawl pages marked \"yearly\" more frequently than that. It is also likely that crawlers will periodically crawl pages marked \"never\" so that they can handle unexpected changes to those pages." +msgstr "Por favor, considere que o valor desta etiqueta é um conselho e não um comando. Mesmo quando alguns agentes de pesquisa (search engine crawlers) consideram esta informação para tomar decisões, eles podem verificar as páginas marcadas como \"a cada hora\" com menor frequência, e visitar varias vezes por ano, as páginas marcadas com \"anualmente\".É igualmente possível que sejam verificadas páginas marcadas com \"nunca\" para gerir possíveis mudanças inesperadas nas mesmas." + +#: sitemap.php:715 +msgid "Homepage" +msgstr "Página principal" + +#: sitemap.php:721 +msgid "Posts" +msgstr "Artigos" + +#: sitemap.php:727 +msgid "Static pages" +msgstr "Páginas estáticas" + +#: sitemap.php:733 +msgid "Categories" +msgstr "Categorias" + +#: sitemap.php:739 +msgid "The current archive of this month (Should be the same like your homepage)" +msgstr "Arquivo deste mês (Deve ser igual ao da sua pagina principal)" + +#: sitemap.php:745 +msgid "Older archives (Changes only if you edit an old post)" +msgstr "Arquivos antigos (Alterar só se editou um artigo antigo)" + +#: sitemap.php:752 +msgid "Priorities" +msgstr "Prioridades" + +#: sitemap.php:763 +msgid "Posts (If auto calculation is disabled)" +msgstr "Artigos (Se o calculo automático está inativo) " + +#: sitemap.php:769 +msgid "Minimum post priority (Even if auto calculation is enabled)" +msgstr "Prioridade mínima para artigos (Mesmo quando o cálculo automático está ativo) " + +#: sitemap.php:787 +msgid "Archives" +msgstr "Arquivos" + +#: sitemap.php:793 +msgid "Informations and support" +msgstr "Informação e suporte" + +#: sitemap.php:794 +msgid "Check %s for updates and comment there if you have any problems / questions / suggestions." +msgstr "Consulte %s para atualizações e comentários se tiver algum problema, questão ou sugestão." + +#: sitemap.php:797 +msgid "Update options" +msgstr "Atualizar opções" + +#: sitemap.php:1033 +msgid "URL:" +msgstr "URL:" + +#: sitemap.php:1034 +msgid "Path:" +msgstr "Caminho:" + +#: sitemap.php:1037 +msgid "Could not write into %s" +msgstr "Não foi possivel escrever em %s" + +#: sitemap.php:1048 +msgid "Successfully built sitemap file:" +msgstr "Arquivo sitemap criado com sucesso:" + +#: sitemap.php:1048 +msgid "Successfully built gzipped sitemap file:" +msgstr "Arquivo sitemap comprimido criado com sucesso:" + +#: sitemap.php:1062 +msgid "Could not ping to Google at %s" +msgstr "Não foi possível realizar ping no Google em %s" + +#: sitemap.php:1064 +msgid "Successfully pinged Google at %s" +msgstr "Ping a Google realizado com sucesso em %s" + diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/lang/sitemap-ru_RU.mo Binary file web/wp-content/plugins/google-sitemap-generator/lang/sitemap-ru_RU.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/lang/sitemap-ru_RU.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/google-sitemap-generator/lang/sitemap-ru_RU.po Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,685 @@ +# [Countryname] Language File for sitemap (sitemap-[localname].po) +# Copyright (C) 2005 [name] : [URL] +# This file is distributed under the same license as the WordPress package. +# [name] <[mail-address]>, 2005. +# $Id: sitemap.pot 24948 2007-11-18 16:37:44Z arnee $ +# +msgid "" +msgstr "" +"Project-Id-Version: sitemap\n" +"Report-Msgid-Bugs-To: <[mail-address]>\n" +"POT-Creation-Date: 2005-06-15 00:00+0000\n" +"PO-Revision-Date: 2007-11-27 12:24+0300\n" +"Last-Translator: Sergey Ryvkin \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Language-Team: \n" +"X-Poedit-KeywordsList: _e;__\n" +"X-Poedit-Basepath: .\n" +"X-Poedit-SearchPath-0: C:\\Inetpub\\wwwroot\\wp\\wp-content\\plugins\\sitemap_beta\n" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:846 +msgid "Comment Count" +msgstr "Количество комментариев" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:858 +msgid "Uses the number of comments of the post to calculate the priority" +msgstr "Использует количество комментариев к статье для вычисления приоритета" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:918 +msgid "Comment Average" +msgstr "Среднее количество комментариев" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:930 +msgid "Uses the average comment count to calculate the priority" +msgstr "Использует среднее количество комментариев для вычисления приоритета" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:993 +msgid "Popularity Contest" +msgstr "Популярность дискуссии" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:1005 +msgid "Uses the activated Popularity Contest Plugin from Alex King. See Settings and Most Popular Posts" +msgstr "Используйте активированный Плагин популярности дискуссий от Alex King. См. Настройки и Самые популярные записи" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2415 +msgid "XML-Sitemap Generator" +msgstr "Генератор XML-карты сайта" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2415 +msgid "XML-Sitemap" +msgstr "XML-карта сайта" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2600 +msgid "Thank you very much for your donation. You help me to continue support and development of this plugin and other free software!" +msgstr "Премного благодарю за пожертвования. Вы помогаете мне в продалжении поддержки и разработки этого плагина и другого свободного ПО!" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2600 +msgid "Hide this notice" +msgstr "Скрыть это замечание" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2657 +#, php-format +msgid "Thanks for using this plugin! You've installed this plugin over a month ago. If it works and your are satisfied with the results, isn't it worth at least one dollar? Donations help me to continue support and development of this free software! Sure, no problem!" +msgstr "Благодарю Вас за использование этого плагина! Вы установили его свыше месяца назад. Если он работает и Вы удовлетворены его результатами, вышлите мне хотя бы $1? Пожертвования помогут мне в поддержке и разработке этого бесплатного ПО! Конечно, без проблем!" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2657 +msgid "No thanks, please don't bug me anymore!" +msgstr "Нет, спасибо. Прошу меня больше не беспокоить!" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2635 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2835 +msgid "XML Sitemap Generator for WordPress" +msgstr "Генератор XML-карты сайта для WordPress" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2740 +msgid "Configuration updated" +msgstr "Конфигурация обновлена" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2741 +msgid "Error while saving options" +msgstr "Ошибка при сохранении параметров" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2743 +msgid "Pages saved" +msgstr "Страницы сохранены" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2744 +msgid "Error while saving pages" +msgstr "Ошибка при сохранении страниц" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2748 +#, php-format +msgid "Robots.txt file saved" +msgstr "Файл Robots.txt сохранен" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2750 +msgid "Error while saving Robots.txt file" +msgstr "Ошибка при сохранении файла Robots.txt" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2758 +msgid "The default configuration was restored." +msgstr "Конфигурация по умолчанию восстановлена." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2851 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2868 +msgid "open" +msgstr "открыть" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2852 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2869 +msgid "close" +msgstr "закрыть" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2853 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2870 +msgid "click-down and drag to move this box" +msgstr "Нажмите кнопку мыши и тащите для перемещения этого блока" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2854 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2871 +msgid "click to %toggle% this box" +msgstr "Нажмите для %toggle% на этот блок" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2855 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2872 +msgid "use the arrow keys to move this box" +msgstr "используйте стрелки для перемещения этого блока" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2856 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2873 +msgid ", or press the enter key to %toggle% it" +msgstr ", или нажмите копку ввод (enter) для %toggle% его" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2884 +msgid "About this Plugin:" +msgstr "Об это плагине:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2886 +msgid "Plugin Homepage" +msgstr "Домашняя страница плагина" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2887 +msgid "Notify List" +msgstr "Список напоминания" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2888 +msgid "Support Forum" +msgstr "Форум технической поддержки" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2889 +msgid "Donate with PayPal" +msgstr "Пожертвовать через PayPal" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2890 +msgid "My Amazon Wish List" +msgstr "Мой список пожеланий на Amazon" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2891 +msgid "translator_name" +msgstr "Перевёл Сергей Рывкин" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2891 +msgid "translator_url" +msgstr "http://ryvkin.ru" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2895 +msgid "Sitemap Resources:" +msgstr "Ресурсы карыт сайта:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2897 +msgid "Webmaster Tools" +msgstr "Инструменты веб-мастера" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2898 +msgid "Webmaster Blog" +msgstr "Дневник веб-мастера" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2900 +msgid "Site Explorer" +msgstr "Просмотр сайта" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2901 +msgid "Search Blog" +msgstr "Искать в дневнике" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2903 +msgid "Sitemaps Protocol" +msgstr "Протокол использования карты сайта" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2904 +msgid "Official Sitemaps FAQ" +msgstr "Официальный ЧАВО по картам сайта" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2905 +msgid "My Sitemaps FAQ" +msgstr "Мой ЧАВО по картам сайта" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2910 +msgid "Recent Donations:" +msgstr "Последние пожертвования:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2914 +msgid "List of the donors" +msgstr "Список спонсоров" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2916 +msgid "Hide this list" +msgstr "Скрыть этот список" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2919 +msgid "Thanks for your support!" +msgstr "Спасибо за Вашу поддержку!" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2931 +msgid "Status" +msgstr "Статус" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2941 +#, php-format +msgid "The sitemap wasn't built yet. Click here to build it the first time." +msgstr "Карта сайта ещё не построена. Нажмите здесь для создания её впервые." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2947 +msgid "Your sitemap was last built on %date%." +msgstr "Ваша карта сайта последний раз была построена: %date%." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2949 +msgid "There was a problem writing your sitemap file. Make sure the file exists and is writable. Learn moreПочитать ещё" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2956 +msgid "Your sitemap (zipped) was last built on %date%." +msgstr "Ваша карта сайта (сжатая) последний раз была построена: %date%." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2958 +msgid "There was a problem writing your zipped sitemap file. Make sure the file exists and is writable. Learn moreПочитать ещё" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2964 +msgid "Google was successfully notified about changes." +msgstr "Google был успешно проинформирован об изменениях." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2967 +msgid "It took %time% seconds to notify Google, maybe you want to disable this feature to reduce the building time." +msgstr "%time% секунд заняло информирование Google; возможно, Вас стоит отключить эту функцию, чтобы снизить время построения карты." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3011 +#, php-format +msgid "There was a problem while notifying Google. View result" +msgstr "При информировании Google произошла ошибка. Посмотреть результат" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2976 +msgid "YAHOO was successfully notified about changes." +msgstr "YAHOO был успешно проинформирован об изменениях." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2979 +msgid "It took %time% seconds to notify YAHOO, maybe you want to disable this feature to reduce the building time." +msgstr "%time% секунд заняло информирование YAHOO; возможно, Вас стоит отключить эту функцию, чтобы снизить время построения карты." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3023 +#, php-format +msgid "There was a problem while notifying YAHOO. View result" +msgstr "При информировании YAHOO произошла ошибка. Посмотреть результат" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2988 +msgid "Ask.com was successfully notified about changes." +msgstr "Ask.com был успешно проинформирован об изменениях." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2991 +msgid "It took %time% seconds to notify Ask.com, maybe you want to disable this feature to reduce the building time." +msgstr "%time% секунд заняло информирование Ask.com; возможно, Вас стоит отключить эту функцию, чтобы снизить время построения карты." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3035 +#, php-format +msgid "There was a problem while notifying Ask.com. View result" +msgstr "При информировании Ask.com произошла ошибка. Посмотреть результат" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3002 +msgid "The building process took about %time% seconds to complete and used %memory% MB of memory." +msgstr "Процесс построения занял примерно %time% секунд и использовал %memory% MB памяти." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3004 +msgid "The building process took about %time% seconds to complete." +msgstr "Процесс построения занял примерно %time% секунд." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3008 +msgid "The content of your sitemap didn't change since the last time so the files were not written and no search engine was pinged." +msgstr "Содержание Вашей карты сайта не изменялось за последнее время, поэтому файлы не записывались и поисковые системы не информировались." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3012 +msgid "The last run didn't finish! Maybe you can raise the memory or time limit for PHP scripts. Learn more" +msgstr "Последний запуск не был завершен! Возможно, Вы превысили лимиты памяти или времени исполнения. Почитать ещё" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3014 +msgid "The last known memory usage of the script was %memused%MB, the limit of your server is %memlimit%." +msgstr "Последний раз скрипт использовал %memused%MB памяти, лимит памяти Вашего сервера составляет %memlimit%." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3018 +msgid "The last known execution time of the script was %timeused% seconds, the limit of your server is %timelimit% seconds." +msgstr "Последний раз скрипт работал %timeused% секунд, ограничение времени на Вашем сервере составляет %timelimit% секунд." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3022 +msgid "The script stopped around post number %lastpost% (+/- 100)" +msgstr "Скрипт остановился около статьи номер %lastpost% (+/- 100)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3025 +#, php-format +msgid "If you changed something on your server or blog, you should rebuild the sitemap manually." +msgstr "Если Вы что-то поменяли на Вашем сервре или в дневнике, Вам необходимо заново построить карту сайта вручную." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3027 +#, php-format +msgid "If you encounter any problems with the build process you can use the debug function to get more information." +msgstr "Если Вы столкнулись с какими-либо проблемами в процессе построения, Вы можете воспользоваться функцией отладки для получения дополнительной информации." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3040 +msgid "Basic Options" +msgstr "Базовые параметры" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3044 +msgid "Sitemap files:" +msgstr "Файлы карты сайта:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3044 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3059 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3079 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3104 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3121 +msgid "Learn more" +msgstr "Почитать ещё" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3049 +msgid "Write a normal XML file (your filename)" +msgstr "Записать обычный XML файл (Ваше имя файла)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3055 +msgid "Write a gzipped file (your filename + .gz)" +msgstr "Записать запакованный XML файл (Ваше имя файла + .gz)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3059 +msgid "Building mode:" +msgstr "Режим построения карты:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3064 +msgid "Rebuild sitemap if you change the content of your blog" +msgstr "Постройте заново карту сайта, если Вы изменили содержание Вашего дневника" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3071 +msgid "Enable manual sitemap building via GET Request" +msgstr "Разрешить ручное построение карты сайта с помощью запроса GET" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3075 +msgid "This will allow you to refresh your sitemap if an external tool wrote into the WordPress database without using the WordPress API. Use the following URL to start the process: %1 Please check the logfile above to see if sitemap was successfully built." +msgstr "Это разрешит Вам обновить карту сайта, если внешний инструмент будет писать в базу WordPress? не используя WordPress API. Используйте следующий URL для выполнения процесса: %1 Посмотрите протокол (см. выше) для проверки, построена ли карта сайта." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3079 +msgid "Update notification:" +msgstr "Обновить уведомление:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3083 +msgid "Notify Google about updates of your Blog" +msgstr "Уведомить Google об изменениях в Вашем дневнике" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3084 +#, php-format +msgid "No registration required, but you can join the Google Webmaster Tools to check crawling statistics." +msgstr "Регистрация не требуется, но Вы можете присоединиться к Инструментам веб-мастера Google для просмотра статистики поисковых роботов." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3088 +msgid "Notify Ask.com about updates of your Blog" +msgstr "Уведомить Asc.com об изменениях в Вашем дневнике" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3089 +msgid "No registration required." +msgstr "Регистрация не требуется." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3093 +msgid "Notify YAHOO about updates of your Blog" +msgstr "Уведомить YAHOO об изменениях в Вашем дневнике" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3154 +msgid "Your Application ID:" +msgstr "Ваш идентификатор приложения (Application ID):" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3155 +#, php-format +msgid "Don't you have such a key? Request one here! %s2" +msgstr "У Вас нет такого ключа?? Запросите здесь! %s2" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3099 +#, php-format +msgid "Modify or create %s file in blog root which contains the sitemap location." +msgstr "Изменить или создать файл %s в дневнике, который содержит информацию о расположении карты сайта." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3102 +msgid "File permissions: " +msgstr "Разрешения на доступ к файлам: " + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3107 +msgid "OK, robots.txt is writable." +msgstr "OK, robots.txt открыт на запись." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3109 +msgid "Error, robots.txt is not writable." +msgstr "Ошибка, robots.txt не открыт на запись." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3113 +msgid "OK, robots.txt doesn't exist but the directory is writable." +msgstr "OK, robots.txt не существует, но каталог открыт на запись." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3115 +msgid "Error, robots.txt doesn't exist and the directory is not writable" +msgstr "Ошибка, robots.txt не существует, и каталог не открыт на запись" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3121 +msgid "Advanced options:" +msgstr "Расширенные параметры:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3124 +msgid "Limit the number of posts in the sitemap:" +msgstr "Ограничить количество статей в карте сайта:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3124 +msgid "Newer posts will be included first" +msgstr "Более новые статьи будут включены первыми" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3127 +msgid "Try to increase the memory limit to:" +msgstr "Попытаться увеличить лимит памяти до:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3127 +msgid "e.g. \"4M\", \"16M\"" +msgstr "например, \"4M\", \"16M\"" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3130 +msgid "Try to increase the execution time limit to:" +msgstr "Попытаться увеличить ограничение времени исполнения до:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3130 +msgid "in seconds, e.g. \"60\" or \"0\" for unlimited" +msgstr "в секундах, например, \"60\" или \"0\" для неограниченного времени" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3133 +msgid "Include a XSLT stylesheet:" +msgstr "Включить таблицу стилей XSLT:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3133 +msgid "Use Default" +msgstr "Использовать значение по умолчанию" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3133 +msgid "Full or relative URL to your .xsl file" +msgstr "Полный или относительный URL к Вашему файлу .xsl" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3152 +msgid "Enable MySQL standard mode. Use this only if you're getting MySQL errors. (Needs much more memory!)" +msgstr "Разрешить стандартный режим MySQL. Использовать только в случае ошибок MySQL. (Требует намного больше памяти!)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3166 +msgid "Build the sitemap in a background process (You don't have to wait when you save a post)" +msgstr "Строить карту сайта в фоновом процессе (Вам не надо ждать сохранения статьи)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3206 +msgid "Exclude the following posts or pages:" +msgstr "Исключить следующие статьи или страницы:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3206 +msgid "List of IDs, separated by comma" +msgstr "Список идентификаторов (ID), разделенных запятыми" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3144 +msgid "Additional pages" +msgstr "Дополнительные страницы" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3149 +msgid "Here you can specify files or URLs which should be included in the sitemap, but do not belong to your Blog/WordPress.
    For example, if your domain is www.foo.com and your blog is located on www.foo.com/blog you might want to include your homepage at www.foo.com" +msgstr "Здесь Вы можете указать файлы или URL, которые должны быть включены в карту сайта, но не принадлежащие Вашему дневнику/WordPress.
    Например,если Ваш домен www.foo.com, а Ваш дневник расположен в www.foo.com/blog, Вам может понадобиться добавить домашнюю страницу из www.foo.com" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3151 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3462 +msgid "Note" +msgstr "Замечание" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3152 +msgid "If your blog is in a subdirectory and you want to add pages which are NOT in the blog directory or beneath, you MUST place your sitemap file in the root directory (Look at the "Location of your sitemap file" section on this page)!" +msgstr "Если Ваш дневник расположен в подкаталоге, и Вы хотите добавить страницы, которые находятся ВЫШЕ в структуре каталогов, Вам НЕОБХОДИМО поместить карту сайта в корневой каталог (См. секцию "Размещение файла с картой сайта" на этой странице)!" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3154 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3300 +msgid "URL to the page" +msgstr "URL страницы" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3155 +msgid "Enter the URL to the page. Examples: http://www.foo.com/index.html or www.foo.com/home " +msgstr "Введите URL этой страницы. Примеры: http://www.foo.com/index.html или www.foo.com/home " + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3157 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3301 +msgid "Priority" +msgstr "Приоритет" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3158 +msgid "Choose the priority of the page relative to the other pages. For example, your homepage might have a higher priority than your imprint." +msgstr "Выберите приоритет этой страницы относительно других страниц. Например, Ваша главная страница может иметь более высокий приоритет, чем страница с информацией о сайте." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3160 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3303 +msgid "Last Changed" +msgstr "Последний раз изменялась" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3161 +msgid "Enter the date of the last change as YYYY-MM-DD (2005-12-31 for example) (optional)." +msgstr "Введите дату последнего изменения в формате YYYY-MM-DD (2005-12-31, например) (не обязательно)." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3302 +msgid "Change Frequency" +msgstr "Частота изменений" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3304 +msgid "#" +msgstr "№" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3309 +msgid "No pages defined." +msgstr "Нет страниц." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3314 +msgid "Add new page" +msgstr "Добавить новую страницу" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3325 +msgid "Post Priority" +msgstr "Приоритет статьи" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3329 +msgid "Please select how the priority of each post should be calculated:" +msgstr "Выберите, как будет вычисляться приоритет каждой статьи:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3331 +msgid "Do not use automatic priority calculation" +msgstr "Не использовать автоматическое вычисление приоритета" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3331 +msgid "All posts will have the same priority which is defined in "Priorities"" +msgstr "Все статьи будут иметь одинаковый приоритет, который определен в "Приоритетах"" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3348 +msgid "Location of your sitemap file" +msgstr "Расположение Вашего файла с картой сайта" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3353 +msgid "Automatic detection" +msgstr "Автоматическое определение" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3357 +msgid "Filename of the sitemap file" +msgstr "Имя файла с картой сайта" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3360 +msgid "Detected Path" +msgstr "Обнаруженный путь" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3360 +msgid "Detected URL" +msgstr "Обнаруженный URL" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3365 +msgid "Custom location" +msgstr "Пользовательское расположение" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3369 +msgid "Absolute or relative path to the sitemap file, including name." +msgstr "Абсолютный или относительный путь к файлу с картой сайта, включая имя файла." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3371 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3380 +msgid "Example" +msgstr "Пример" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3378 +msgid "Complete URL to the sitemap file, including name." +msgstr "Заполните URL к файлу с картой сайта, включая имя файла." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3397 +msgid "Sitemap Content" +msgstr "Содержание карты сайта" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3405 +msgid "Include homepage" +msgstr "Включить домашнюю страницу" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3411 +msgid "Include posts" +msgstr "Включить статьи" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3417 +msgid "Include static pages" +msgstr "Включить статические страницы" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3423 +msgid "Include categories" +msgstr "Включить категории" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3429 +msgid "Include archives" +msgstr "Включить архивы" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3436 +msgid "Include tag pages" +msgstr "Включить страницы меток" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3443 +msgid "Include author pages" +msgstr "Включить страницы авторов" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3457 +msgid "Change frequencies" +msgstr "Изменить частоты" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3463 +msgid "Please note that the value of this tag is considered a hint and not a command. Even though search engine crawlers consider this information when making decisions, they may crawl pages marked \"hourly\" less frequently than that, and they may crawl pages marked \"yearly\" more frequently than that. It is also likely that crawlers will periodically crawl pages marked \"never\" so that they can handle unexpected changes to those pages." +msgstr "Обратите внимание, что значение этой метки считается рекомендацией и не является командой. Даже когда поисковые роботы берут эту информацию к сведению для принятия решений, они могут осматривать страницы, помеченные \"раз в час\" реже, чем запрошено, и они могут осматривать страницы, помеченные как \"раз в год\" чаще, чем запрошено. Также бывает, что поисковые роботы осматривают страницы, помеченные как \"никогда\", отмечая не предусмотренные изменения на этих страницах." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3469 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3535 +msgid "Homepage" +msgstr "Главная страница" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3475 +msgid "Posts" +msgstr "Статьи" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3481 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3553 +msgid "Static pages" +msgstr "Статичные страницы" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3487 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3559 +msgid "Categories" +msgstr "Категории" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3493 +msgid "The current archive of this month (Should be the same like your homepage)" +msgstr "Текущий архив за этот месяц (Должен быть тем же, что и Главная страница)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3499 +msgid "Older archives (Changes only if you edit an old post)" +msgstr "Старые архивы (Изменяются только в случае, если Вы редактируете старые статьи)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3506 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3572 +msgid "Tag pages" +msgstr "Страницы меток" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3513 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3579 +msgid "Author pages" +msgstr "Страницы авторов" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3527 +msgid "Priorities" +msgstr "Приоритеты" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3541 +msgid "Posts (If auto calculation is disabled)" +msgstr "Статьи (Если автоматическое вычисление запрещено)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3547 +msgid "Minimum post priority (Even if auto calculation is enabled)" +msgstr "Минимальный приоритет статьи (Даже если автоматическое вычисление разрешено)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3565 +msgid "Archives" +msgstr "Архивы" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3590 +msgid "Update options" +msgstr "Обновить параметры" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3591 +msgid "Reset options" +msgstr "Вернуть исходные значения" + diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/lang/sitemap-sl_SI.mo Binary file web/wp-content/plugins/google-sitemap-generator/lang/sitemap-sl_SI.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/lang/sitemap-sl_SI.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/google-sitemap-generator/lang/sitemap-sl_SI.po Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,325 @@ +msgid "" +msgstr "" +"Project-Id-Version: sitemap-sl_SI\n" +"POT-Creation-Date: \n" +"PO-Revision-Date: 2006-11-13 09:33+0100\n" +"Last-Translator: m2-j \n" +"Language-Team: Milan Jungic \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Slovenian\n" +"X-Poedit-Country: SLOVENIA\n" + +#: sitemap.php:375 +msgid "always" +msgstr "vedno" + +msgid "hourly" +msgstr "vsako uro" + +msgid "daily" +msgstr "dnevno" + +msgid "weekly" +msgstr "tedensko" + +msgid "monthly" +msgstr "mesečno" + +msgid "yearly" +msgstr "letno" + +msgid "never" +msgstr "nikoli" + +msgid "Detected Path" +msgstr "Zaznana pot:" + +msgid "Example" +msgstr "Primer" + +msgid "Absolute or relative path to the sitemap file, including name." +msgstr "Absolutna ali relativna pot do datoteke načrta strani (vključno z imenom datoteke)" + +msgid "Complete URL to the sitemap file, including name." +msgstr "URL naslov datoteke načrta strani (vključno z imenom datoteke)." + +msgid "Automatic location" +msgstr "Samodejno lociranje" + +msgid "Manual location" +msgstr "Ročno lociranje" + +msgid "OR" +msgstr "ALI" + +msgid "Location of your sitemap file" +msgstr "Ime datoteke načrta strani" + +msgid "If your blog is in a subdirectory and you want to add pages which are NOT in the blog directory or beneath, you MUST place your sitemap file in the root directory (Look at the "Location of your sitemap file" section on this page)!" +msgstr "Če je vaš blog v podimeniku in želite v načrt strani dodatki datoteke, ki se nahajajo izven tega podimenika, morate datoteko načrta strani shraniti v korenski imenik, ki se nahaja nad vsemi imeniki katere želite v načrt strani vključiti (glejte sekcijo "Ime datoteke načrta strani" na tej strani)!" + +#: sitemap.php:512 +msgid "Configuration updated" +msgstr "Nastavitve so posodobljene" + +#: sitemap.php:513 +msgid "Error" +msgstr "Napaka" + +#: sitemap.php:521 +msgid "A new page was added. Click on "Save page changes" to save your changes." +msgstr "Nova stran je dodana. Za uveljavitev sprememb, izberite "Shrani stran"." + +#: sitemap.php:527 +msgid "Pages saved" +msgstr "Strani so shranjene." + +#: sitemap.php:528 +msgid "Error while saving pages" +msgstr "Napaka pri shranjevanju strani" + +#: sitemap.php:539 +msgid "The page was deleted. Click on "Save page changes" to save your changes." +msgstr "Stran je izbrisana. Za uveljavitev sprememb, izberite "Shrani stran"." + +#: sitemap.php:542 +msgid "You changes have been cleared." +msgstr "Spremembe so razveljavljene." + +#: sitemap.php:555 +msgid "Sitemap Generator" +msgstr "Generator načrta strani" + +#: sitemap.php:558 +msgid "Manual rebuild" +msgstr "Ročno" + +#: sitemap.php:559 +msgid "If you want to build the sitemap without editing a post, click on here!" +msgstr "Izberite to možnost, če želite takoj ustvariti načrt strani." + +#: sitemap.php:560 +msgid "Rebuild Sitemap" +msgstr "Ustvari načrt strani" + +#: sitemap.php:564 +msgid "Additional pages" +msgstr "Dodatne strani" + +#: sitemap.php:566 +msgid "Here you can specify files or URLs which should be included in the sitemap, but do not belong to your Blog/WordPress.
    For example, if your domain is www.foo.com and your blog is located on www.foo.com/blog you might want to include your homepage at www.foo.com" +msgstr "Tukaj lahko navedete datoteke in URL naslove, ki niso del vaše Wordpress namestitve, želite jih pa vključiti v načrt strani.
    Primer: Vaša domena je www.foo.com, blog se nahaja na naslovu www.foo.com/blog, medtem, ko vi v načrt strani želite vključiti tudi naslov www.foo.com s pripadajočo vsebino." + +#: sitemap.php:568 +msgid "URL to the page" +msgstr "URL naslov strani" + +#: sitemap.php:569 +msgid "Enter the URL to the page. Examples: http://www.foo.com/index.html or www.foo.com/home " +msgstr "Vnestite URL naslov strani. Primer: www.foo.com ali www.foo.com/home" + +#: sitemap.php:571 +msgid "Priority" +msgstr "Prioriteta" + +#: sitemap.php:572 +msgid "Choose the priority of the page relative to the other pages. For example, your homepage might have a higher priority than your imprint." +msgstr "Izberi prioriteto strani, glede na ostale strani. Npr. za vašo domačo stran www.foo.com želite morda višjo prioriteto kot za vaš blog www.foo.com/blog? " + +#: sitemap.php:574 +msgid "Last Changed" +msgstr "Zadnjič spremenjeno" + +#: sitemap.php:575 +msgid "Enter the date of the last change as YYYY-MM-DD (2005-12-31 for example) (optional)." +msgstr "Vnesite datum zadnje spremembe JJJJ-MM-TT (oblika: 2005-12-31). (opcija)" + +#: sitemap.php:583 +msgid "Change Frequency" +msgstr "Spremeni frekvenco" + +#: sitemap.php:585 +msgid "#" +msgstr "#" + +#: sitemap.php:609 +msgid "No pages defined." +msgstr "Nobena stran ni bila še definirana." + +#: sitemap.php:616 +msgid "Add new page" +msgstr "Dodaj novo stran" + +# sitemap.php:617: +#: sitemap.php:617 +msgid "Save page changes" +msgstr "Shrani spremembe" + +# sitemap.php:618: +#: sitemap.php:618 +msgid "Undo all page changes" +msgstr "Razveljavi spremembe" + +# sitemap.php:621: +#: sitemap.php:621 +msgid "Delete marked page" +msgstr "Izbriši izbrane strani" + +#: sitemap.php:627 +msgid "Basic Options" +msgstr "Osnovne nastavitve" + +#: sitemap.php:632 +msgid "Enable automatic priority calculation for posts based on comment count" +msgstr "Določi prioriteto objav glede na število komentarjev pod posameznimi objavami" + +#: sitemap.php:638 +msgid "Write debug comments" +msgstr "Zapiši komentarje za iskanje in odpravljanje napak" + +#: sitemap.php:643 +msgid "Filename of the sitemap file" +msgstr "Ime datoteke načrta strani" + +#: sitemap.php:650 +msgid "Write a normal XML file (your filename)" +msgstr "Shrani načrt strani kot standardno XML datoteko" + +#: sitemap.php:652 +msgid "Detected URL" +msgstr "Zaznan URL naslov" + +#: sitemap.php:657 +msgid "Write a gzipped file (your filename + .gz)" +msgstr "Shrani kot stisnjeno (gzip) datoteko (ime datoteke + .gz)" + +#: sitemap.php:664 +msgid "Auto-Ping Google Sitemaps" +msgstr "Samodejno obvesti Google o spremembah (ping)" + +#: sitemap.php:665 +msgid "This option will automatically tell Google about changes." +msgstr "Če izberete to možnost, bodo morebitne spremembe v načrtu strani samodejno posredovane Googlu." + +#: sitemap.php:672 +msgid "Includings" +msgstr "Vsebina" + +#: sitemap.php:677 +msgid "Include homepage" +msgstr "Vključi osnovno (prvo) stran" + +#: sitemap.php:683 +msgid "Include posts" +msgstr "Vključi objave" + +#: sitemap.php:689 +msgid "Include static pages" +msgstr "Vključi statične strani" + +#: sitemap.php:695 +msgid "Include categories" +msgstr "Vključi kategorije" + +#: sitemap.php:701 +msgid "Include archives" +msgstr "Vključi zgodovino (arhivi)" + +#: sitemap.php:708 +msgid "Change frequencies" +msgstr "Spremeni frekvenco" + +#: sitemap.php:709 +msgid "Note" +msgstr "Opomba" + +#: sitemap.php:710 +msgid "Please note that the value of this tag is considered a hint and not a command. Even though search engine crawlers consider this information when making decisions, they may crawl pages marked \"hourly\" less frequently than that, and they may crawl pages marked \"yearly\" more frequently than that. It is also likely that crawlers will periodically crawl pages marked \"never\" so that they can handle unexpected changes to those pages." +msgstr "Ta nastavitev je zgolj predlagana. Čeprav spletni iskalniki nastavljeno frekvenco upoštevajo, se zna zgoditi, da bodo strani nastavljene na urno osveževanje pregledovali redkeje, kot strani nastavljene na letno osveževanje. Ravno tako se zna zgoditi, da bodo iskalniki pregledovali strani, katerim ste nastavili, da se ne osvežujejo." + +#: sitemap.php:715 +msgid "Homepage" +msgstr "Osnovna stran" + +#: sitemap.php:721 +msgid "Posts" +msgstr "Objave" + +#: sitemap.php:727 +msgid "Static pages" +msgstr "Statične strani" + +#: sitemap.php:733 +msgid "Categories" +msgstr "Kategorije" + +#: sitemap.php:739 +msgid "The current archive of this month (Should be the same like your homepage)" +msgstr "Aktualni arhiv tega meseca (enako kot za osnovno stran)" + +#: sitemap.php:745 +msgid "Older archives (Changes only if you edit an old post)" +msgstr "Starejši arhivi" + +#: sitemap.php:752 +msgid "Priorities" +msgstr "Prioritete" + +#: sitemap.php:763 +msgid "Posts (If auto calculation is disabled)" +msgstr "Število objav (v primeru, ko je samodejno seštevanje onemogočeno)" + +#: sitemap.php:769 +msgid "Minimum post priority (Even if auto calculation is enabled)" +msgstr "Najmanjša prioriteta za objave (tudi, ko je izbrana možnost samodejnega izračunavanja prioritet)" + +#: sitemap.php:787 +msgid "Archives" +msgstr "Arhivi" + +#: sitemap.php:793 +msgid "Informations and support" +msgstr "Informacije in podpora" + +#: sitemap.php:794 +msgid "Check %s for updates and comment there if you have any problems / questions / suggestions." +msgstr "Popravke in pomoč za vtičnik boste našli na %s." + +#: sitemap.php:797 +msgid "Update options" +msgstr "Shrani nastavitve" + +#: sitemap.php:1033 +msgid "URL:" +msgstr "URL:" + +#: sitemap.php:1034 +msgid "Path:" +msgstr "Pot:" + +# msgid "URL:" +# msgstr "" +# msgid "Path:" +# msgstr "" +#: sitemap.php:1037 +msgid "Could not write into %s" +msgstr "Napaka pri shranjevanju datoteke "%s"." + +#: sitemap.php:1048 +msgid "Successfully built sitemap file:" +msgstr "Načrt strani je bil uspešno zapisan:" + +#: sitemap.php:1048 +msgid "Successfully built gzipped sitemap file:" +msgstr "Načrt strani je bil uspešno zapisan v stisnjeno (gzip) datoteko:" + +#: sitemap.php:1062 +msgid "Could not ping to Google at %s" +msgstr "Napaka pri obveščanju Googla o spremembah (%s)" + +#: sitemap.php:1064 +msgid "Successfully pinged Google at %s" +msgstr "Google je uspešno obveščen o spremembah (%s)" + diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/lang/sitemap-sv_SE.mo Binary file web/wp-content/plugins/google-sitemap-generator/lang/sitemap-sv_SE.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/lang/sitemap-sv_SE.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/google-sitemap-generator/lang/sitemap-sv_SE.po Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,322 @@ +msgid "" +msgstr "" +"Project-Id-Version: Google Sitemap Generator Swedish Translation 1.0\n" +"POT-Creation-Date: \n" +"PO-Revision-Date: 2008-01-08 12:16+0100\n" +"Last-Translator: Markus \n" +"Language-Team: Tobias Bergius \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=iso-8859-1\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Swedish\n" +"X-Poedit-Country: SWEDEN\n" +"X-Poedit-SourceCharset: iso-8859-1\n" + +#: sitemap.php:375 +msgid "always" +msgstr "alltid" + +msgid "hourly" +msgstr "varje timme" + +msgid "daily" +msgstr "dagligen" + +msgid "weekly" +msgstr "varje vecka" + +msgid "monthly" +msgstr "månatligen" + +msgid "yearly" +msgstr "Årligen" + +msgid "never" +msgstr "aldrig" + +msgid "Detected Path" +msgstr "Funnen sökväg" + +msgid "Example" +msgstr "Exempel" + +msgid "Absolute or relative path to the sitemap file, including name." +msgstr "Absolut eller relativ sökväg till sajtkartan, inklusive namn." + +msgid "Complete URL to the sitemap file, including name." +msgstr "Komplett URL till sajtkartan, inklusive namn." + +msgid "Automatic location" +msgstr "Automatisk sökväg" + +msgid "Manual location" +msgstr "Manuell sökväg" + +msgid "OR" +msgstr "eller" + +msgid "Location of your sitemap file" +msgstr "Sökväg till din sajtkarta" + +msgid "If your blog is in a subdirectory and you want to add pages which are NOT in the blog directory or beneath, you MUST place your sitemap file in the root directory (Look at the "Location of your sitemap file" section on this page)!" +msgstr "Om din blogg är i en underkatalog och du vill lägga till sidor som inte är i blogg-katalogen, eller under, måste du placera din sajtkarta i root-katalogen (se "Sökväg till din sajtkarta" på den här sidan)!" + +#: sitemap.php:512 +msgid "Configuration updated" +msgstr "Konfiguration uppdaterad" + +#: sitemap.php:513 +msgid "Error" +msgstr "Fel" + +#: sitemap.php:521 +msgid "A new page was added. Click on "Save page changes" to save your changes." +msgstr "En ny sida tillagd. Klicka på "Spara ändringar" för att spara." + +#: sitemap.php:527 +msgid "Pages saved" +msgstr "Sidor sparade" + +#: sitemap.php:528 +msgid "Error while saving pages" +msgstr "Fel vid sparande av sida" + +#: sitemap.php:539 +msgid "The page was deleted. Click on "Save page changes" to save your changes." +msgstr "Sidan borttagen. Klicka på "Spara ändringar" för att spara." + +#: sitemap.php:542 +msgid "You changes have been cleared." +msgstr "Dina ändringar har rensats." + +#: sitemap.php:555 +msgid "Sitemap Generator" +msgstr "Sitemap Generator" + +#: sitemap.php:558 +msgid "Manual rebuild" +msgstr "Manuell återskapning" + +#: sitemap.php:559 +msgid "If you want to build the sitemap without editing a post, click on here!" +msgstr "Om du vill skapa sajtkartan utan att redigera en artikel, klicka här!" + +#: sitemap.php:560 +msgid "Rebuild Sitemap" +msgstr "Återskapa sajtkarta" + +#: sitemap.php:564 +msgid "Additional pages" +msgstr "Ytterligare sidor" + +#: sitemap.php:566 +msgid "Here you can specify files or URLs which should be included in the sitemap, but do not belong to your Blog/WordPress.
    For example, if your domain is www.foo.com and your blog is located on www.foo.com/blog you might want to include your homepage at www.foo.com" +msgstr "Här kan du lägga till URL:er i sajtkartan, som inte tillhör Wordpress.
    Till exempel, om din domän är www.foo.com och din blogg finns på www.foo.com/blogg, vill du nog lägga till din startsida på www.foo.com." + +#: sitemap.php:568 +msgid "URL to the page" +msgstr "URL till sidan" + +#: sitemap.php:569 +msgid "Enter the URL to the page. Examples: http://www.foo.com/index.html or www.foo.com/home " +msgstr "Ange URL till sidan. Exempel: http://www.foo.com/index.html eller www.foo.com/home" + +#: sitemap.php:571 +msgid "Priority" +msgstr "Prioritet" + +#: sitemap.php:572 +msgid "Choose the priority of the page relative to the other pages. For example, your homepage might have a higher priority than your imprint." +msgstr "Välj prioritet relativt till de andra sidorna. Till exempel, din startsida kanske bör ha högre prioritet än dina undersidor." + +#: sitemap.php:574 +msgid "Last Changed" +msgstr "Senast ändrad" + +#: sitemap.php:575 +msgid "Enter the date of the last change as YYYY-MM-DD (2005-12-31 for example) (optional)." +msgstr "Ändra datum för senaste ändringar enligt ÅÅÅÅ-MM-DD (2005-12-31 t.ex.) (valfritt)." + +#: sitemap.php:583 +msgid "Change Frequency" +msgstr "Ändra frekvens" + +#: sitemap.php:585 +msgid "#" +msgstr "#" + +#: sitemap.php:609 +msgid "No pages defined." +msgstr "Inga sidor tillagda." + +#: sitemap.php:616 +msgid "Add new page" +msgstr "Lägg till sida" + +# sitemap.php:617: +#: sitemap.php:617 +msgid "Save page changes" +msgstr "Spara ändringar" + +# sitemap.php:618: +#: sitemap.php:618 +msgid "Undo all page changes" +msgstr "Ångra alla ändringar" + +# sitemap.php:621: +#: sitemap.php:621 +msgid "Delete marked page" +msgstr "Ta bort markerad sida" + +#: sitemap.php:627 +msgid "Basic Options" +msgstr "Generella ändringar" + +#: sitemap.php:632 +msgid "Enable automatic priority calculation for posts based on comment count" +msgstr "Aktivera automatisk prioritering för artiklar, baserat på antal kommentarer" + +#: sitemap.php:638 +msgid "Write debug comments" +msgstr "Skriv debuggkommentarer" + +#: sitemap.php:643 +msgid "Filename of the sitemap file" +msgstr "Filnamn på sajtkartan" + +#: sitemap.php:650 +msgid "Write a normal XML file (your filename)" +msgstr "Skapa en vanlig XML-fil (ditt filnamn)" + +#: sitemap.php:652 +msgid "Detected URL" +msgstr "Funnen URL" + +#: sitemap.php:657 +msgid "Write a gzipped file (your filename + .gz)" +msgstr "Skapa en gzippad fil (filnamn + .gz)" + +#: sitemap.php:664 +msgid "Auto-Ping Google Sitemaps" +msgstr "Auto-pinga Google Sitemaps" + +#: sitemap.php:665 +msgid "This option will automatically tell Google about changes." +msgstr "Det här gör att Google automatiskt notifieras om uppdateringar" + +#: sitemap.php:672 +msgid "Includings" +msgstr "Inkluderingar" + +#: sitemap.php:677 +msgid "Include homepage" +msgstr "Inkludera startsida" + +#: sitemap.php:683 +msgid "Include posts" +msgstr "Inkludera artiklar" + +#: sitemap.php:689 +msgid "Include static pages" +msgstr "Inkludera statiska sidor" + +#: sitemap.php:695 +msgid "Include categories" +msgstr "Inkludera kategorier" + +#: sitemap.php:701 +msgid "Include archives" +msgstr "Inkluder arkiv" + +#: sitemap.php:708 +msgid "Change frequencies" +msgstr "Ändra frekvenser" + +#: sitemap.php:709 +msgid "Note" +msgstr "Observera" + +#: sitemap.php:710 +msgid "Please note that the value of this tag is considered a hint and not a command. Even though search engine crawlers consider this information when making decisions, they may crawl pages marked \"hourly\" less frequently than that, and they may crawl pages marked \"yearly\" more frequently than that. It is also likely that crawlers will periodically crawl pages marked \"never\" so that they can handle unexpected changes to those pages." +msgstr "Den här inställningen ska ses som en ledtråd och inte ett kommando. Även om sökmotorerna lägger märke till den här informationen, så kan de indexera sidor markerade \"per timme\" mer sällan än det. Och dom kan indexera sidor markerade \"årligen\" oftare än så. Det är också vanligt att sökmotorer regelbundet kontrollerar sidor markerade \"aldrig\", så att de kan hantera oväntade händelser." + +#: sitemap.php:715 +msgid "Homepage" +msgstr "Startsida" + +#: sitemap.php:721 +msgid "Posts" +msgstr "Artiklar" + +#: sitemap.php:727 +msgid "Static pages" +msgstr "Statiska sidor" + +#: sitemap.php:733 +msgid "Categories" +msgstr "Kategorier" + +#: sitemap.php:739 +msgid "The current archive of this month (Should be the same like your homepage)" +msgstr "Aktuellt arkiv för denna månad (borde vara samma som din startsida)" + +#: sitemap.php:745 +msgid "Older archives (Changes only if you edit an old post)" +msgstr "Äldre arkiv (ändras bara om du ändrar en äldre artikel)" + +#: sitemap.php:752 +msgid "Priorities" +msgstr "Prioriteringar" + +#: sitemap.php:763 +msgid "Posts (If auto calculation is disabled)" +msgstr "Artiklar (om autoprioritering är avaktiverat)" + +#: sitemap.php:769 +msgid "Minimum post priority (Even if auto calculation is enabled)" +msgstr "Minsta artikeprioritet (även om autoprioritering är aktiverat)" + +#: sitemap.php:787 +msgid "Archives" +msgstr "Arkiv" + +#: sitemap.php:793 +msgid "Informations and support" +msgstr "Information och support" + +#: sitemap.php:794 +msgid "Check %s for updates and comment there if you have any problems / questions / suggestions." +msgstr "Kontrollera %s efter uppdateringar och kommentera om du har några problem, frågor eller förslag." + +#: sitemap.php:797 +msgid "Update options" +msgstr "Uppdatera inställningar" + +#: sitemap.php:1033 +msgid "URL:" +msgstr "URL:" + +#: sitemap.php:1034 +msgid "Path:" +msgstr "Sökvg:" + +#: sitemap.php:1037 +msgid "Could not write into %s" +msgstr "Kan inte skriva till %s" + +#: sitemap.php:1048 +msgid "Successfully built sitemap file:" +msgstr "Sajtkarta skapad:" + +#: sitemap.php:1048 +msgid "Successfully built gzipped sitemap file:" +msgstr "Gzippad sajtkarta skapad:" + +#: sitemap.php:1062 +msgid "Could not ping to Google at %s" +msgstr "Kan inte pinga Google på %s" + +#: sitemap.php:1064 +msgid "Successfully pinged Google at %s" +msgstr "Google pingad på %s" + diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/lang/sitemap-tr_TR.mo Binary file web/wp-content/plugins/google-sitemap-generator/lang/sitemap-tr_TR.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/lang/sitemap-tr_TR.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/google-sitemap-generator/lang/sitemap-tr_TR.po Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,913 @@ +msgid "" +msgstr "" +"Project-Id-Version: sitemap\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-06-07 01:15+0100\n" +"PO-Revision-Date: 2009-06-08 17:31+0200\n" +"Last-Translator: Baris Unver \n" +"Language-Team: Stefano Aglietti \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" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:846 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:642 +msgid "Comment Count" +msgstr "Yorum Sayımı" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:858 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:654 +msgid "Uses the number of comments of the post to calculate the priority" +msgstr "Önceliği belirlemek için yazıya yapılmış yorum sayısını kullan" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:918 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:714 +msgid "Comment Average" +msgstr "Yorum Ortalaması" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:930 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:726 +msgid "Uses the average comment count to calculate the priority" +msgstr "Önceliği hesaplamak için yazıların ortalama yorum sayısını kullanır" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:993 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:789 +msgid "Popularity Contest" +msgstr "Popularity Contest" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:1005 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:801 +msgid "Uses the activated Popularity Contest Plugin from Alex King. See Settings and Most Popular Posts" +msgstr "Alex King tarafından yaratılmış Popularity Contest Eklentisi ile uyumlu olarak çalışır, öncelikleri Popularity Contest'in raporlarına göre hesaplar. Ayarlar için buraya, en popüler yazılar içinse buraya tıklayın." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-core.php:1118 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:1187 +msgid "Always" +msgstr "Her zaman" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-core.php:1119 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:1188 +msgid "Hourly" +msgstr "Saatte bir" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-core.php:1120 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:1189 +msgid "Daily" +msgstr "Günde bir" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-core.php:1121 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:1190 +msgid "Weekly" +msgstr "Haftada bir" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-core.php:1122 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:1191 +msgid "Monthly" +msgstr "Ayda bir" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-core.php:1123 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:1192 +msgid "Yearly" +msgstr "Yılda bir" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-core.php:1124 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:1193 +msgid "Never" +msgstr "Hiçbir zaman" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2600 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:102 +msgid "Thank you very much for your donation. You help me to continue support and development of this plugin and other free software!" +msgstr "Bağışınız için çok teşekkürler. Bu eklenti üzerinde çalışmam ve destek sunabilmem için yardım sağlamış oldunuz!" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2600 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:102 +msgid "Hide this notice" +msgstr "Bu bildiriyi sakla" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2606 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:108 +#, php-format +msgid "Thanks for using this plugin! You've installed this plugin over a month ago. If it works and your are satisfied with the results, isn't it worth at least one dollar? Donations help me to continue support and development of this free software! Sure, no problem!" +msgstr "" +"Bu eklentiyi kullandığınız için teşekkürler! Bu eklentiyi bir aydan daha uzun süredir kullanıyorsunuz. Eğer eklenti sizin işinize yaradıysa ve sevdiyseniz, sizce bu en azından bir dolar etmez mi? Yapılan bağışlar, bu ücretsiz eklentiyi geliştirmeye devam etmemi ve eklenti hakkında destek sunmamı sağlıyor!\n" +"Tabii canım, ne demek!" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2606 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:108 +msgid "No thanks, please don't bug me anymore!" +msgstr "Yok teşekkürler, lütfen beni bir daha rahatsız etme!" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:67 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:119 +msgid "Your sitemap is being refreshed at the moment. Depending on your blog size this might take some time!" +msgstr "Site haritanız şu anda yenileniyor. Blog'unuzun büyüklüğüne göre bu işlem biraz zaman alabilir!" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:69 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:121 +#, php-format +msgid "Your sitemap will be refreshed in %s seconds. Depending on your blog size this might take some time!" +msgstr "Site haritanız %s saniye içinde yenilenecek. Blog'unuzun büyüklüğüne göre bu işlem biraz zaman alabilir!" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:146 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:453 +msgid "XML Sitemap Generator for WordPress" +msgstr "Wordpress için XML Site Haritası Oluşturucusu" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:298 +msgid "Configuration updated" +msgstr "Ayarlar kaydedildi" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:299 +msgid "Error while saving options" +msgstr "Seçenekler kaydedilirken hata oluştu" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:301 +msgid "Pages saved" +msgstr "Sayfalar kaydedildi" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:302 +msgid "Error while saving pages" +msgstr "Sayfalar kaydedilirken hata oluştu" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2758 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:309 +msgid "The default configuration was restored." +msgstr "Varsayılan seçenekler yüklendi" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:374 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:466 +#, php-format +msgid "There is a new version of %1$s available. Download version %3$s here." +msgstr "%1$s eklentisinin yeni bir sürümü var. %3$s sürümünü buradan indirin." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:376 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:468 +#, php-format +msgid "There is a new version of %1$s available. Download version %3$s here automatic upgrade unavailable for this plugin." +msgstr "%1$s eklentisinin yeni bir sürümü var. %3$s sürümünü buradan indirin. bu eklenti için otomatik güncelleme mümkün değil." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:378 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:470 +#, php-format +msgid "There is a new version of %1$s available. Download version %3$s here or upgrade automatically." +msgstr "%1$s eklentisinin yeni bir sürümü var. %3$s sürümünü buradan indirin. veya otomatik güncelleyin." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2851 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2868 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:493 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:510 +msgid "open" +msgstr "açmak" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2852 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2869 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:494 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:511 +msgid "close" +msgstr "kapamak" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2853 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2870 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:495 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:512 +msgid "click-down and drag to move this box" +msgstr "kutuyu taşımak için tıklayıp sürükleyin" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2854 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2871 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:496 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:513 +msgid "click to %toggle% this box" +msgstr "kutuyu %toggle% için tıklayın" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2855 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2872 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:497 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:514 +msgid "use the arrow keys to move this box" +msgstr "bu kutuyu taşımak için yön tuşlarını kullanın" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2856 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2873 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:498 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:515 +msgid ", or press the enter key to %toggle% it" +msgstr "%toggle% için , veya enter tuşuna basın" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2884 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:533 +msgid "About this Plugin:" +msgstr "Bu Eklenti Hakkında:" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:534 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap.php:141 +msgid "Plugin Homepage" +msgstr "Eklenti Anasayfası" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:421 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:535 +msgid "Suggest a Feature" +msgstr "Bir Özellik Öner" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2887 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:536 +msgid "Notify List" +msgstr "Bildiri listesi" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2888 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:537 +msgid "Support Forum" +msgstr "Destek Forumu" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:424 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:538 +msgid "Report a Bug" +msgstr "Bir Hata Raporla" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2889 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:540 +msgid "Donate with PayPal" +msgstr "PayPal ile Bağış Yap" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2890 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:541 +msgid "My Amazon Wish List" +msgstr "Amazon Wish List'im" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2891 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:542 +msgid "translator_name" +msgstr "Eklenti Çevirmeni: Barış Ünver" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2891 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:542 +msgid "translator_url" +msgstr "http://beyn.org" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:545 +msgid "Sitemap Resources:" +msgstr "Site Haritası Kaynakları:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2897 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:546 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:552 +msgid "Webmaster Tools" +msgstr "Webmaster Araçları" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2898 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:547 +msgid "Webmaster Blog" +msgstr "Webmaster Blog'u" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2900 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:549 +msgid "Site Explorer" +msgstr "Site Explorer" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2901 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:550 +msgid "Search Blog" +msgstr "Search Blog" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2898 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:553 +msgid "Webmaster Center Blog" +msgstr "Webmaster Merkezi Blog'u" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:555 +msgid "Sitemaps Protocol" +msgstr "Site Haritası Protokolü" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2904 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:556 +msgid "Official Sitemaps FAQ" +msgstr "Resmi Sitemap SSS'si" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2905 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:557 +msgid "My Sitemaps FAQ" +msgstr "Bu Eklentinin SSS'si" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2910 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:560 +msgid "Recent Donations:" +msgstr "Son Bağışlar:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2914 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:564 +msgid "List of the donors" +msgstr "Bağış Yapanların Listesi:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2916 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:566 +msgid "Hide this list" +msgstr "Bu listeyi sakla" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2919 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:569 +msgid "Thanks for your support!" +msgstr "Desteğiniz için teşekkürler!" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2931 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:587 +msgid "Status" +msgstr "Durum" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2941 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:595 +#, php-format +msgid "The sitemap wasn't built yet. Click here to build it the first time." +msgstr "Site haritanız henüz oluşturulmamış. Oluşturmak için buraya tıklayın." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2947 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:601 +msgid "Your sitemap was last built on %date%." +msgstr "Site haritanız en son %date% tarihinde oluşturulmuş." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2949 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:603 +msgid "There was a problem writing your sitemap file. Make sure the file exists and is writable. Learn moreDaha fazla" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2956 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:610 +msgid "Your sitemap (zipped) was last built on %date%." +msgstr "Sıkıştırılmış site haritanız" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2958 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:612 +msgid "There was a problem writing your zipped sitemap file. Make sure the file exists and is writable. Learn moreDaha fazla" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2964 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:618 +msgid "Google was successfully notified about changes." +msgstr "Google başarıyla bilgilendirildi." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2967 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:621 +msgid "It took %time% seconds to notify Google, maybe you want to disable this feature to reduce the building time." +msgstr "Google'ın bilgilendirilmesi %time% saniye sürdü, kurulum süresini düşürmek için bu seçeneği kaldırabilirsiniz" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2970 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:624 +#, php-format +msgid "There was a problem while notifying Google. View result" +msgstr "Google bilgilendirilirken hata oluştu. Hatayı göster" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2976 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:630 +msgid "YAHOO was successfully notified about changes." +msgstr "Yahoo! başarıyla bilgilendirildi." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2979 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:633 +msgid "It took %time% seconds to notify YAHOO, maybe you want to disable this feature to reduce the building time." +msgstr "Yahoo!'nun bilgilendirilmesi %time% saniye sürdü, kurulum süresini düşürmek için bu seçeneği kaldırabilirsiniz" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2982 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:636 +#, php-format +msgid "There was a problem while notifying YAHOO. View result" +msgstr "Yahoo! bilgilendirilirken hata oluştu. Hatayı göster" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2976 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:642 +msgid "Bing was successfully notified about changes." +msgstr "Bing başarıyla bilgilendirildi." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2967 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:645 +msgid "It took %time% seconds to notify Bing, maybe you want to disable this feature to reduce the building time." +msgstr "Bing'in bilgilendirilmesi %time% saniye sürdü, kurulum süresini düşürmek için bu seçeneği kaldırabilirsiniz" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2970 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:648 +#, php-format +msgid "There was a problem while notifying Bing. View result" +msgstr "Bing bilgilendirilirken hata oluştu. Hatayı göster" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2988 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:654 +msgid "Ask.com was successfully notified about changes." +msgstr "Ask.com başarıyla bilgilendirildi." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2991 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:657 +msgid "It took %time% seconds to notify Ask.com, maybe you want to disable this feature to reduce the building time." +msgstr "Ask.com'un bilgilendirilmesi %time% saniye sürdü, kurulum süresini düşürmek için bu seçeneği kaldırabilirsiniz" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2994 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:660 +#, php-format +msgid "There was a problem while notifying Ask.com. View result" +msgstr "Ask.com bilgilendirilirken hata oluştu. Hatayı göster" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3002 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:668 +msgid "The building process took about %time% seconds to complete and used %memory% MB of memory." +msgstr "Kurulum toplam %time% saniye sürdü ve %memory% MB bellek kullandı." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3004 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:670 +msgid "The building process took about %time% seconds to complete." +msgstr "Kurulum toplam %time% saniye sürdü." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3008 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:674 +msgid "The content of your sitemap didn't change since the last time so the files were not written and no search engine was pinged." +msgstr "Site haritanızın içeriği önceki güncellemeyle aynı olduğundan dolayı herhangi bir güncelleme yapılmadı ve herhangi bir arama motoru ping'lenmedi." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:586 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:682 +msgid "The building process might still be active! Reload the page in a few seconds and check if something has changed." +msgstr "Kurulum işlemi hala aktif olabilir! Bu sayfayı birkaç saniye sonra yenileyip bir şeyin değişip değişmediğini kontrol edin." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3012 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:685 +msgid "The last run didn't finish! Maybe you can raise the memory or time limit for PHP scripts. Learn more" +msgstr "Son güncelleme daha bitmedi! Kullanılan bellek miktarını yükseltebilir veya kurulum süresini uzatabilirsiniz. Daha fazla" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3014 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:687 +msgid "The last known memory usage of the script was %memused%MB, the limit of your server is %memlimit%." +msgstr "Betiğin son bilinen bellek kullanımı %memused%MB oldu, sunucunuzun sağladığı bellek sınırı ise %memlimit%." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3018 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:691 +msgid "The last known execution time of the script was %timeused% seconds, the limit of your server is %timelimit% seconds." +msgstr "Betiğin son çalıştırılması %timeused% saniye sürdü, sunucunuzun sağladığı süre sınırı ise %timelimit% saniye." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3022 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:695 +msgid "The script stopped around post number %lastpost% (+/- 100)" +msgstr "Betik, %lastpost% numaralı yazı civarında (+/- 100) durdu." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3025 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:698 +#, php-format +msgid "If you changed something on your server or blog, you should rebuild the sitemap manually." +msgstr "Eğer sunucunuzda veya blog'unuzda bir değişiklik yaptıysanız, site haritanızı güncellemek isteyebilirsiniz." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3027 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:700 +#, php-format +msgid "If you encounter any problems with the build process you can use the debug function to get more information." +msgstr "Eğer bir sorunla (veya sorunlarla) karşılaşırsanız, hata ayıklama kipini kullanıp sorun(lar) hakkında bilgi sahibi olabilirsiniz." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:707 +msgid "Basic Options" +msgstr "Temel Ayarlar" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3044 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:709 +msgid "Sitemap files:" +msgstr "Site haritası dosyaları:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3044 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3059 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3079 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3104 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3121 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:709 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:724 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:744 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:777 +msgid "Learn more" +msgstr "Daha fazla" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:714 +msgid "Write a normal XML file (your filename)" +msgstr "Normal bir XML dosyası oluştur (dosya isminiz.xml)" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:720 +msgid "Write a gzipped file (your filename + .gz)" +msgstr "Gzip ile sıkıştırılmış bir dosya oluştur (dosya isminiz.xml.gz)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3059 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:724 +msgid "Building mode:" +msgstr "Kurma kipi" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3064 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:729 +msgid "Rebuild sitemap if you change the content of your blog" +msgstr "Blog'un içeriği değiştiğinde site haritasını güncelle" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3071 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:736 +msgid "Enable manual sitemap building via GET Request" +msgstr "GET talebiyle site haritasının elle kurulumunu etkinleştir" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3075 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:740 +msgid "This will allow you to refresh your sitemap if an external tool wrote into the WordPress database without using the WordPress API. Use the following URL to start the process: %1 Please check the logfile above to see if sitemap was successfully built." +msgstr "" +"Eğer blog'unuzu güncellemek için Wordpress API'sini kullanmayan üçüncü parti bir yazılım kullanıyorsanız bu araç işinize yarayacaktır. Başlatmak için aşağıdaki bağlantıyı kullanın:\n" +"%1\n" +"Lütfen site haritasının başarıyla kurulup kurulmadığını kontrol etmek için raporlara bakınız." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:744 +msgid "Update notification:" +msgstr "Güncelleme bildirisi:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3083 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:748 +msgid "Notify Google about updates of your Blog" +msgstr "Blog'unuzun güncellenimini Google'a bildir" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3084 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:749 +#, php-format +msgid "No registration required, but you can join the Google Webmaster Tools to check crawling statistics." +msgstr "Kayıt gerektirmez, ama Google Webmaster Tools'a katılarak crawl istatistiklerini görebilirsiniz." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3083 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:753 +msgid "Notify Bing (formerly MSN Live Search) about updates of your Blog" +msgstr "Blog'unuzun güncellenişini Bing'e bildir" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3084 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:754 +#, php-format +msgid "No registration required, but you can join the Bing Webmaster Tools to check crawling statistics." +msgstr "Kayıt gerektirmez, ama Bing Webmaster Tools'a katılarak taranma istatistiklerini görebilirsiniz." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3088 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:758 +msgid "Notify Ask.com about updates of your Blog" +msgstr "Blog'unuzun güncellenimini Ask.com'a bildir" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3089 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:759 +msgid "No registration required." +msgstr "Kayıt gerektirmez." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3093 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:763 +msgid "Notify YAHOO about updates of your Blog" +msgstr "Blog'unuzun güncellenimini Yahoo!'ya bildir" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3154 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:764 +msgid "Your Application ID:" +msgstr "Uygulama ID'niz:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3155 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:765 +#, php-format +msgid "Don't you have such a key? Request one here! %s2" +msgstr "Böyle bir anahtarınız yok mu? Buradan bir tane isteyin! %s2" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:770 +msgid "Add sitemap URL to the virtual robots.txt file." +msgstr "Sanal robots.txt dosyasına site haritası URL'ini ekle." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:774 +msgid "The virtual robots.txt generated by WordPress is used. A real robots.txt file must NOT exist in the blog directory!" +msgstr "WordPress'in oluşturduğu sanal robots.txt dosyası kullanılacaktır; gerçek bir robots.txt dosyası kök dizinde BULUNMAMALIDIR!" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:777 +msgid "Advanced options:" +msgstr "Gelişmiş seçenekler:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3124 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:780 +msgid "Limit the number of posts in the sitemap:" +msgstr "Site haritasındaki yazı sayısını sınırlandır:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3124 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:780 +msgid "Newer posts will be included first" +msgstr "Yeni yazılar site haritasında ilk sıraya yerleştirilsin" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3127 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:783 +msgid "Try to increase the memory limit to:" +msgstr "Kullanılacak bellek sınırını şuna yükseltmeyi dene:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3127 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:783 +msgid "e.g. \"4M\", \"16M\"" +msgstr "(örn. \"4M\", \"16M\")" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3130 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:786 +msgid "Try to increase the execution time limit to:" +msgstr "İşlemi gerçekleştirmek için gereken zaman sınırını şuna yükseltmeyi dene:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3130 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:786 +msgid "in seconds, e.g. \"60\" or \"0\" for unlimited" +msgstr "saniye olarak belirtin (örn. \"60\") (sınırsız için \"0\" kullanın)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3133 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:790 +msgid "Include a XSLT stylesheet:" +msgstr "Bir XSLT Sayfa Yönergesi (Stylesheet) Kullan:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3133 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:791 +msgid "Full or relative URL to your .xsl file" +msgstr ".xsl dosyanızın tam veya bağıl yolu" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3133 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:791 +msgid "Use default" +msgstr "Varsayılanı kullan" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3152 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:797 +msgid "Enable MySQL standard mode. Use this only if you're getting MySQL errors. (Needs much more memory!)" +msgstr "MySQL standart kipini etkinleştirin. Yalnızca MySQL hataları alıyorsanız bunu kullanın, çok fazla belleğe ihtiyaç duyar!" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:798 +msgid "Upgrade WordPress at least to 2.2 to enable the faster MySQL access" +msgstr "Daha hızlı MySQL erişimi için WordPress sürümünüzü en azından 2.2'ye yükseltin." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3166 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:805 +msgid "Build the sitemap in a background process (You don't have to wait when you save a post)" +msgstr "Site haritasını bir arkaplan işleminde oluştur (Bir yazıyı kaydederken beklemek zorunda kalmazsınız)" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:806 +msgid "Upgrade WordPress at least to 2.1 to enable background building" +msgstr "Haritanın arkaplanda oluşturulabilmesi için WordPress sürümünüzü en azından 2.1'e yükseltin." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:813 +msgid "Additional pages" +msgstr "Ek sayfalar" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:816 +msgid "Here you can specify files or URLs which should be included in the sitemap, but do not belong to your Blog/WordPress.
    For example, if your domain is www.foo.com and your blog is located on www.foo.com/blog you might want to include your homepage at www.foo.com" +msgstr "Burada blog'unuza ait olmayan sayfaları site haritasında yer alacak şekilde ekleyebilirsiniz.
    Örneğin, eğer sayfanız www.foo.com ise ve blog'unuz www.foo.com/blog ise, anasayfanız olan www.foo.com adresini de eklemek isteyebilirsiniz." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:818 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:997 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1011 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1020 +msgid "Note" +msgstr "Not" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:819 +msgid "If your blog is in a subdirectory and you want to add pages which are NOT in the blog directory or beneath, you MUST place your sitemap file in the root directory (Look at the "Location of your sitemap file" section on this page)!" +msgstr "Eğer blog'unuz bir alt klasördeyse ve blog'da OLMAYAN sayfalar eklemek istiyorsanız, site haritası dosyanızı KESİNLİKLE kök klasöre koymanız gereklidir (Bu sayfadaki "Site haritanızın konumu" bölümüne bakın)!" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:821 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:860 +msgid "URL to the page" +msgstr "Sayfanın URL'i" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:822 +msgid "Enter the URL to the page. Examples: http://www.foo.com/index.html or www.foo.com/home " +msgstr "Sayfanın URL'ini ekleyin. Örnekler: http://www.foo.com/index.html veya www.foo.com/home " + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:824 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:861 +msgid "Priority" +msgstr "Öncelik" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:825 +msgid "Choose the priority of the page relative to the other pages. For example, your homepage might have a higher priority than your imprint." +msgstr "Sayfanın, diğer sayfalara göre alacağı önceliği belirleyin. Örneğin, anasayfanızın daha yüksek bir öncelik alması gerekebilir." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:827 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:863 +msgid "Last Changed" +msgstr "Son Düzenlenen" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:828 +msgid "Enter the date of the last change as YYYY-MM-DD (2005-12-31 for example) (optional)." +msgstr "Son değişikliğin tarihini YYYY-AA-GG olarak yazın (örneğin 2005-12-31) (isteğe bağlı)" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:862 +msgid "Change Frequency" +msgstr "Sıklık Değiştir" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:864 +msgid "#" +msgstr "#" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:869 +msgid "No pages defined." +msgstr "Hiç sayfa tanımlanmamış." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:874 +msgid "Add new page" +msgstr "Yeni sayfa ekle" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:879 +msgid "Post Priority" +msgstr "Yazı önceliği" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3329 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:881 +msgid "Please select how the priority of each post should be calculated:" +msgstr "Lütfen yazıların önceliklerinin nasıl hesaplanmasını istediğinizi seçin:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3331 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:883 +msgid "Do not use automatic priority calculation" +msgstr "Otomatik öncelik hesaplamasını kullanma" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3331 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:883 +msgid "All posts will have the same priority which is defined in "Priorities"" +msgstr ""Öncelikler"de tanımlanmış tüm yazılar aynı önceliğe sahip olur." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:894 +msgid "Location of your sitemap file" +msgstr "Site haritanızın konumu" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:897 +msgid "Automatic detection" +msgstr "Otomatik tespit" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:901 +msgid "Filename of the sitemap file" +msgstr "Site haritası dosyasının ismi" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:904 +msgid "Detected Path" +msgstr "Bulunan Yol" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:904 +msgid "Detected URL" +msgstr "Bulunan URL" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:909 +msgid "Custom location" +msgstr "Özel konum" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:913 +msgid "Absolute or relative path to the sitemap file, including name." +msgstr "Site haritasının tam veya bağıl yolu (ismi dahil)." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:915 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:924 +msgid "Example" +msgstr "Örnek" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:922 +msgid "Complete URL to the sitemap file, including name." +msgstr "Site haritasının tam URL'i (ismi dahil)." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:935 +msgid "Sitemap Content" +msgstr "Site Haritas İçeriği" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:941 +msgid "Include homepage" +msgstr "Anasayfayı dahil et" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:947 +msgid "Include posts" +msgstr "Blog yazılarını dahil et" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:1013 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:953 +msgid "Include following pages of multi-page posts (Increases build time and memory usage!)" +msgstr "Çoklu sayfalardan aşağıdakileri dahil et (Bellek kullanımını ve site haritası kurulum süresini uzatır!)" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:959 +msgid "Include static pages" +msgstr "Sabit sayfaları dahil et" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:965 +msgid "Include categories" +msgstr "Kategorileri dahil et" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:971 +msgid "Include archives" +msgstr "Arşivleri dahil et" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:978 +msgid "Include tag pages" +msgstr "Etiket sayfalarını dahil et" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:985 +msgid "Include author pages" +msgstr "Yazar sayfalarını dahil et" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:993 +msgid "Excluded items" +msgstr "Hariç tutulacaklar" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:995 +msgid "Excluded categories" +msgstr "Hariç tutulan kategoriler" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:997 +msgid "Using this feature will increase build time and memory usage!" +msgstr "Bu özelliği kullanmak bellek kullanımını artırır ve harita oluşturma süresini uzatır!" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1004 +#, php-format +msgid "This feature requires at least WordPress 2.5.1, you are using %s" +msgstr "Bu özellik WordPress 2.5.1 sürümünü gerektirir, sizinki %s" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1007 +msgid "Exclude posts" +msgstr "Blog yazılarını hariç tut" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3206 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1009 +msgid "Exclude the following posts or pages:" +msgstr "Şu yazı veya sayfaları hariç tut:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3206 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1009 +msgid "List of IDs, separated by comma" +msgstr "ID listesi, virgülle ayırın:" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1011 +msgid "Child posts won't be excluded automatically!" +msgstr "Bu yazının altındaki iç yazılar otomatik olarak dahil edilmeyecektir!" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1017 +msgid "Change frequencies" +msgstr "Sıklıkları değiştir" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1021 +msgid "Please note that the value of this tag is considered a hint and not a command. Even though search engine crawlers consider this information when making decisions, they may crawl pages marked \"hourly\" less frequently than that, and they may crawl pages marked \"yearly\" more frequently than that. It is also likely that crawlers will periodically crawl pages marked \"never\" so that they can handle unexpected changes to those pages." +msgstr "Lütfen bu etiketin bir ipucu olduğuna, bir komut olmadığına dikkat edin. Her ne kadar arama motoru robotları bu bilgiyi karar verirken göz önünde bulunduruyor olsa da; "her saat" olarak işaretlenen sayfaları da daha az sıklıkla tarayabilir, "her yıl" olarak işaretlenen sayfaları da daha sık tarayabilir. Hatta robotlar bazen "hiçbir zaman" olarak işaretlenmiş sayfaları da, beklenmedik değişiklikleri ele alabilmek için tarayabilirler." + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1027 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1084 +msgid "Homepage" +msgstr "Anasayfa" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1033 +msgid "Posts" +msgstr "Blog yazıları" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1039 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1102 +msgid "Static pages" +msgstr "Sabit sayfalar" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1045 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1108 +msgid "Categories" +msgstr "Kategoriler" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1051 +msgid "The current archive of this month (Should be the same like your homepage)" +msgstr "Bu ayın arşivi (anasayfanızla aynı olacaktır)" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1057 +msgid "Older archives (Changes only if you edit an old post)" +msgstr "Daha eski arşivler (Yalnızca eski bir blog yazısını düzenlerseniz güncellenir)" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1064 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1121 +msgid "Tag pages" +msgstr "Etiket sayfaları" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1071 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1128 +msgid "Author pages" +msgstr "Yazar sayfaları" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1079 +msgid "Priorities" +msgstr "Öncelikler" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1090 +msgid "Posts (If auto calculation is disabled)" +msgstr "Blog yazıları (yalnızca otomatik hesaplama devre dışıysa)" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1096 +msgid "Minimum post priority (Even if auto calculation is enabled)" +msgstr "En düşük blog yazısı önceliği (otomatik hesaplama devre dışı olsa bile)" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1114 +msgid "Archives" +msgstr "Arşivler" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1139 +msgid "Update options" +msgstr "Seçenekleri güncelle" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1140 +msgid "Reset options" +msgstr "Seçenekleri sıfırla" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap.php:84 +msgid "XML-Sitemap Generator" +msgstr "XML Site Haritası Oluşturucusu" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2415 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap.php:84 +msgid "XML-Sitemap" +msgstr "XML-Sitemap" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2905 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap.php:142 +msgid "Sitemap FAQ" +msgstr "Bu Eklentinin SSS'si" + diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/lang/sitemap-uk_UA.mo Binary file web/wp-content/plugins/google-sitemap-generator/lang/sitemap-uk_UA.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/lang/sitemap-uk_UA.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/google-sitemap-generator/lang/sitemap-uk_UA.po Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,1005 @@ +msgid "" +msgstr "" +"Project-Id-Version: Google XML Sitemaps v3.1.4\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: \n" +"PO-Revision-Date: 2009-08-22 13:42+0300\n" +"Last-Translator: elenka \n" +"Language-Team: \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: Ukrainian\n" +"X-Poedit-Country: UKRAINE\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;\n" +"X-Poedit-Basepath: ../\n" +"X-Poedit-Bookmarks: \n" +"X-Poedit-SearchPath-0: .\n" +"X-Textdomain-Support: yes" + +#: sitemap-core.php:642 +#@ sitemap +msgid "Comment Count" +msgstr "Личільник коментарів" + +#: sitemap-core.php:654 +#@ sitemap +msgid "Uses the number of comments of the post to calculate the priority" +msgstr "Використовує кількість коментарів до публікацій для калькуляції пріорітету" + +#: sitemap-core.php:714 +#@ sitemap +msgid "Comment Average" +msgstr "Коментарів Середнє" + +#: sitemap-core.php:726 +#@ sitemap +msgid "Uses the average comment count to calculate the priority" +msgstr "Використовує кількість коментарів у середньому для калькуляції пріорітету" + +#: sitemap-core.php:789 +#@ sitemap +msgid "Popularity Contest" +msgstr "Конкурс Популярності" + +#: sitemap-core.php:801 +#, php-format +#@ sitemap +msgid "Uses the activated Popularity Contest Plugin from Alex King. See Settings and Most Popular Posts" +msgstr "Використовує активований Popularity Contest Plugin від Alex King< . Див. Налаштування та Популярні повідомлення " + +#: sitemap-core.php:1187 +#@ sitemap +msgid "Always" +msgstr "Завжди" + +#: sitemap-core.php:1188 +#@ sitemap +msgid "Hourly" +msgstr "Щочасу" + +#: sitemap-core.php:1189 +#@ sitemap +msgid "Daily" +msgstr "Щоденно" + +#: sitemap-core.php:1190 +#@ sitemap +msgid "Weekly" +msgstr "Щонедільно" + +#: sitemap-core.php:1191 +#@ sitemap +msgid "Monthly" +msgstr "Щомісячно" + +#: sitemap-core.php:1192 +#@ sitemap +msgid "Yearly" +msgstr "Щорічно" + +#: sitemap-core.php:1193 +#@ sitemap +msgid "Never" +msgstr "Ніколи" + +#: sitemap-ui.php:97 +#@ sitemap +msgid "Thank you very much for your donation. You help me to continue support and development of this plugin and other free software!" +msgstr "Дякую вам дуже за ваше пожертвування. Ви допомагаете мені підтримувати та розробляти цій плагін та інше вільне програмне забеспечення." + +#: sitemap-ui.php:97 +#@ sitemap +msgid "Hide this notice" +msgstr "Приховати це повідомлення" + +#: sitemap-ui.php:103 +#, php-format +#@ sitemap +msgid "Thanks for using this plugin! You've installed this plugin over a month ago. If it works and your are satisfied with the results, isn't it worth at least one dollar? Donations help me to continue support and development of this free software! Sure, no problem!" +msgstr "Дякую за використання цього плагіна! Ви встановили цей плагін більше місяця тому. Якщо він працює, і Ви задоволені результатами, чи не варто це щонайменше один долар? Пожертвування допомають мені продовжити підтримку і розвиток цього безкоштовного програмного забезпечення! Звичайно, немає проблем! " + +#: sitemap-ui.php:103 +#@ sitemap +msgid "No thanks, please don't bug me anymore!" +msgstr "Ні, дякую, будь ласка, не турбуйте мене!" + +#: sitemap-ui.php:114 +#@ sitemap +msgid "Your sitemap is being refreshed at the moment. Depending on your blog size this might take some time!" +msgstr "Ваша мапа сайту наразі оновлюється. В залежності від розміру вашого блогу це може зайняти деякий час!" + +#: sitemap-ui.php:116 +#, php-format +#@ sitemap +msgid "Your sitemap will be refreshed in %s seconds. Depending on your blog size this might take some time!" +msgstr "Ваша мапа сайту буде оновлена за % S секунд. В залежності від розміру вашого блогу це може зайняти деякий час!" + +#: sitemap-ui.php:145 +#: sitemap-ui.php:448 +#@ sitemap +msgid "XML Sitemap Generator for WordPress" +msgstr "XML Генератор Мапи сайту для WordPress" + +#: sitemap-ui.php:293 +#@ sitemap +msgid "Configuration updated" +msgstr "Конфігурація оновлена" + +#: sitemap-ui.php:294 +#@ sitemap +msgid "Error while saving options" +msgstr "Помилка при збереженні опцій" + +#: sitemap-ui.php:296 +#@ sitemap +msgid "Pages saved" +msgstr "Сторінка збережена" + +#: sitemap-ui.php:297 +#@ sitemap +msgid "Error while saving pages" +msgstr "Помилка при збереженні сторінок" + +#: sitemap-ui.php:304 +#@ sitemap +msgid "The default configuration was restored." +msgstr "Конфігурація за замовчуванням була відновлена." + +#: sitemap-ui.php:461 +#, php-format +#@ default +msgid "There is a new version of %1$s available. Download version %3$s here." +msgstr "" + +#: sitemap-ui.php:463 +#, php-format +#@ default +msgid "There is a new version of %1$s available. Download version %3$s here automatic upgrade unavailable for this plugin." +msgstr "" + +#: sitemap-ui.php:465 +#, php-format +#@ default +msgid "There is a new version of %1$s available. Download version %3$s here or upgrade automatically." +msgstr "" + +#: sitemap-ui.php:488 +#: sitemap-ui.php:505 +msgid "open" +msgstr "" + +#: sitemap-ui.php:489 +#: sitemap-ui.php:506 +msgid "close" +msgstr "" + +#: sitemap-ui.php:490 +#: sitemap-ui.php:507 +msgid "click-down and drag to move this box" +msgstr "" + +#: sitemap-ui.php:491 +#: sitemap-ui.php:508 +#, php-format +msgid "click to %toggle% this box" +msgstr "" + +#: sitemap-ui.php:492 +#: sitemap-ui.php:509 +msgid "use the arrow keys to move this box" +msgstr "" + +#: sitemap-ui.php:493 +#: sitemap-ui.php:510 +#, php-format +msgid ", or press the enter key to %toggle% it" +msgstr "" + +#: sitemap-ui.php:528 +#@ sitemap +msgid "About this Plugin:" +msgstr "Про цей Плагін:" + +#: sitemap-ui.php:529 +#: sitemap.php:153 +#@ sitemap +msgid "Plugin Homepage" +msgstr "Домашня сторінка Плагіну" + +#: sitemap-ui.php:530 +#@ sitemap +msgid "Suggest a Feature" +msgstr "Замовити Функціонал" + +#: sitemap-ui.php:531 +#@ sitemap +msgid "Notify List" +msgstr "Лист Повідомленнь" + +#: sitemap-ui.php:532 +#@ sitemap +msgid "Support Forum" +msgstr "Форум Підтримки " + +#: sitemap-ui.php:533 +#@ sitemap +msgid "Report a Bug" +msgstr "Повідомити про помилку" + +#: sitemap-ui.php:535 +#@ sitemap +msgid "Donate with PayPal" +msgstr "Пожертвувати через PayPal" + +#: sitemap-ui.php:536 +#@ sitemap +msgid "My Amazon Wish List" +msgstr "Мій ліст побажаннь на Amazon" + +#: sitemap-ui.php:537 +#@ sitemap +msgid "translator_name" +msgstr "Чеміс Олена" + +#: sitemap-ui.php:537 +#@ sitemap +msgid "translator_url" +msgstr "http://stereo-lisa.org.ua" + +#: sitemap-ui.php:540 +#@ sitemap +msgid "Sitemap Resources:" +msgstr "Ресурси Мапи сайту" + +#: sitemap-ui.php:541 +#: sitemap-ui.php:547 +#@ sitemap +msgid "Webmaster Tools" +msgstr "Інструмент Веб-майстрів" + +#: sitemap-ui.php:542 +#@ sitemap +msgid "Webmaster Blog" +msgstr "Блог Веб-майстера" + +#: sitemap-ui.php:544 +#@ sitemap +msgid "Site Explorer" +msgstr "Перегляд Сайту" + +#: sitemap-ui.php:545 +#@ sitemap +msgid "Search Blog" +msgstr "Пошук Блога" + +#: sitemap-ui.php:548 +#@ sitemap +msgid "Webmaster Center Blog" +msgstr "Блог Центра Веб-майстрів" + +#: sitemap-ui.php:550 +#@ sitemap +msgid "Sitemaps Protocol" +msgstr "Протокол Sitemaps" + +#: sitemap-ui.php:551 +#@ sitemap +msgid "Official Sitemaps FAQ" +msgstr "Офіційний Sitemaps FAQ" + +#: sitemap-ui.php:552 +#@ sitemap +msgid "My Sitemaps FAQ" +msgstr "Мій Sitemaps FAQ" + +#: sitemap-ui.php:555 +#@ sitemap +msgid "Recent Donations:" +msgstr "Останні Пожертвування" + +#: sitemap-ui.php:559 +#@ sitemap +msgid "List of the donors" +msgstr "Перелік Спонсорів" + +#: sitemap-ui.php:561 +#@ sitemap +msgid "Hide this list" +msgstr "Сховати цей перелік" + +#: sitemap-ui.php:564 +#@ sitemap +msgid "Thanks for your support!" +msgstr "Дякую за вашу підтримку!" + +#: sitemap-ui.php:582 +#@ sitemap +msgid "Status" +msgstr "Статус" + +#: sitemap-ui.php:590 +#, php-format +#@ sitemap +msgid "The sitemap wasn't built yet. Click here to build it the first time." +msgstr "Мапа сайту ще не була побудована. Натисніть тут , щоб побудувати її в перший раз." + +#: sitemap-ui.php:596 +#, php-format +#@ sitemap +msgid "Your sitemap was last built on %date%." +msgstr "Ваша мапа сайту була в останнє побудована %date%." + +#: sitemap-ui.php:598 +#, php-format +#@ sitemap +msgid "There was a problem writing your sitemap file. Make sure the file exists and is writable. Learn moreДізнатись більше" + +#: sitemap-ui.php:605 +#, php-format +#@ sitemap +msgid "Your sitemap (zipped) was last built on %date%." +msgstr "Вашу (стиснуту) мапу сайту минулого разу побудовано %date%." + +#: sitemap-ui.php:607 +#, php-format +#@ sitemap +msgid "There was a problem writing your zipped sitemap file. Make sure the file exists and is writable. Learn moreДізнатись більше" + +#: sitemap-ui.php:613 +#@ sitemap +msgid "Google was successfully notified about changes." +msgstr "Google був успішно повідомлений про зміни." + +#: sitemap-ui.php:616 +#, php-format +#@ sitemap +msgid "It took %time% seconds to notify Google, maybe you want to disable this feature to reduce the building time." +msgstr "Це займе %time% секунд щоб повідомити Google, можливо, ви хочете вимкнути цю функцію для скорочення часу побудови." + +#: sitemap-ui.php:619 +#, php-format +#@ sitemap +msgid "There was a problem while notifying Google. View result" +msgstr "Виникла проблема при повідомленні Google. Дивитись результат" + +#: sitemap-ui.php:625 +#@ sitemap +msgid "YAHOO was successfully notified about changes." +msgstr "YAHOO був успішно повідомлений про зміни." + +#: sitemap-ui.php:628 +#, php-format +#@ sitemap +msgid "It took %time% seconds to notify YAHOO, maybe you want to disable this feature to reduce the building time." +msgstr "Це займе %time% секунд щоб повідомити YAHOO, можливо, ви хочете вимкнути цю функцію для скорочення часу побудови." + +#: sitemap-ui.php:631 +#, php-format +#@ sitemap +msgid "There was a problem while notifying YAHOO. View result" +msgstr "Виникла проблема при повідомленні YAHOO. Дивитись результат" + +#: sitemap-ui.php:637 +#@ sitemap +msgid "Bing was successfully notified about changes." +msgstr "Bing був успішно повідомлений про зміни." + +#: sitemap-ui.php:640 +#, php-format +#@ sitemap +msgid "It took %time% seconds to notify Bing, maybe you want to disable this feature to reduce the building time." +msgstr "Це займе %time% секунд щоб повідомити Bing, можливо, ви хочете вимкнути цю функцію для скорочення часу побудови." + +#: sitemap-ui.php:643 +#, php-format +#@ sitemap +msgid "There was a problem while notifying Bing. View result" +msgstr "Виникла проблема при повідомленні Bing. Дивитись результат" + +#: sitemap-ui.php:649 +#@ sitemap +msgid "Ask.com was successfully notified about changes." +msgstr "Ask.com був успішно повідомлений про зміни." + +#: sitemap-ui.php:652 +#, php-format +#@ sitemap +msgid "It took %time% seconds to notify Ask.com, maybe you want to disable this feature to reduce the building time." +msgstr "Це займе %time% секунд щоб повідомити Ask.com, можливо, ви хочете вимкнути цю функцію для скорочення часу побудови." + +#: sitemap-ui.php:655 +#, php-format +#@ sitemap +msgid "There was a problem while notifying Ask.com. View result" +msgstr "Виникла проблема при повідомленні Ask.com. Дивитись результат" + +#: sitemap-ui.php:663 +#, php-format +#@ sitemap +msgid "The building process took about %time% seconds to complete and used %memory% MB of memory." +msgstr "Процес побудови зайняв %time% секунд для завершення і використував %memory% MB пам'яті." + +#: sitemap-ui.php:665 +#, php-format +#@ sitemap +msgid "The building process took about %time% seconds to complete." +msgstr "Процес побудови зайняв близько %time% секунд до завершення." + +#: sitemap-ui.php:669 +#@ sitemap +msgid "The content of your sitemap didn't change since the last time so the files were not written and no search engine was pinged." +msgstr "Зміст Вашогої мапи сайту не змінився , оскільки останній раз, файли не було записано, і не відбувся пінг пошукової системи." + +#: sitemap-ui.php:677 +#@ sitemap +msgid "The building process might still be active! Reload the page in a few seconds and check if something has changed." +msgstr "Процес побудови може бути ще активним! Перезавантажте сторінку через кілька секунд, і перевірьте - чи відбулись зміни." + +#: sitemap-ui.php:680 +#, php-format +#@ sitemap +msgid "The last run didn't finish! Maybe you can raise the memory or time limit for PHP scripts. Learn more" +msgstr "Останній запуск не закінчився! Можливо ви збільшите пам'ять або лімит часу для PHP скриптів. Дізнатися більше" + +#: sitemap-ui.php:682 +#, php-format +#@ sitemap +msgid "The last known memory usage of the script was %memused%MB, the limit of your server is %memlimit%." +msgstr "Останнє відоме використання пам'яті сценарієм було %memused%MB, межа для вашого сервера є %memlimit%. " + +#: sitemap-ui.php:686 +#, php-format +#@ sitemap +msgid "The last known execution time of the script was %timeused% seconds, the limit of your server is %timelimit% seconds." +msgstr "Останній відомий час виконання сценарію був %timeused% секунд, межа для вашого сервера є %timelimit% секунд. " + +#: sitemap-ui.php:690 +#, php-format +#@ sitemap +msgid "The script stopped around post number %lastpost% (+/- 100)" +msgstr "Сценарій зупинено біля публікації номер %lastpost% (+/- 100)" + +#: sitemap-ui.php:693 +#, php-format +#@ sitemap +msgid "If you changed something on your server or blog, you should rebuild the sitemap manually." +msgstr "Якщо ви змінювали які-небудь елементи на вашому сервері або блогі, потрібно відновити мапу сайту вручну." + +#: sitemap-ui.php:695 +#, php-format +#@ sitemap +msgid "If you encounter any problems with the build process you can use the debug function to get more information." +msgstr "Якщо у вас виникнуть проблеми з процесом побудови можна використовувати відлагоджувальна функції , щоб одержати більш докладну інформацію." + +#: sitemap-ui.php:702 +#@ sitemap +msgid "Basic Options" +msgstr "Базові Опції" + +#: sitemap-ui.php:704 +#@ sitemap +msgid "Sitemap files:" +msgstr "Файли Мапи сайту" + +#: sitemap-ui.php:704 +#: sitemap-ui.php:719 +#: sitemap-ui.php:739 +#: sitemap-ui.php:772 +#@ sitemap +msgid "Learn more" +msgstr "Дізнатись більше" + +#: sitemap-ui.php:709 +#@ sitemap +msgid "Write a normal XML file (your filename)" +msgstr "Запишіть нормальний XML файл (ваша назва файлу )" + +#: sitemap-ui.php:715 +#@ sitemap +msgid "Write a gzipped file (your filename + .gz)" +msgstr "Запишіть стиснутий файл (ваша назва файлу + .gz)" + +#: sitemap-ui.php:719 +#@ sitemap +msgid "Building mode:" +msgstr "Режим побудови:" + +#: sitemap-ui.php:724 +#@ sitemap +msgid "Rebuild sitemap if you change the content of your blog" +msgstr "Перебудуйте мапу сайту, якщо ви змінили зміст вашого блогу" + +#: sitemap-ui.php:731 +#@ sitemap +msgid "Enable manual sitemap building via GET Request" +msgstr "Включити ручну побудову мапи сайту через GET запит" + +#: sitemap-ui.php:735 +#, php-format +#@ sitemap +msgid "This will allow you to refresh your sitemap if an external tool wrote into the WordPress database without using the WordPress API. Use the following URL to start the process: %1 Please check the logfile above to see if sitemap was successfully built." +msgstr "Це дозволить вам оновити ваш сайт, якщо зовнішній інструмент писав у WordPress бази даних без використання WordPress API. Використовуйте наступний URL, щоб розпочати цей процес: %1 Будь ласка, перевірте логи вище, щоб побачити, якщо мапа сайту була успішно побудована." + +#: sitemap-ui.php:739 +#@ sitemap +msgid "Update notification:" +msgstr "Повідомлення про оновлення:" + +#: sitemap-ui.php:743 +#@ sitemap +msgid "Notify Google about updates of your Blog" +msgstr "Повідомити Google про оновлення Вашого блогу\n" + +#: sitemap-ui.php:744 +#, php-format +#@ sitemap +msgid "No registration required, but you can join the Google Webmaster Tools to check crawling statistics." +msgstr "Не потрібна реєстрація, але ви можете приєднатися до Google Інструменти для веб-майстрів , щоб перевірити статистику сканування." + +#: sitemap-ui.php:748 +#@ sitemap +msgid "Notify Bing (formerly MSN Live Search) about updates of your Blog" +msgstr "Повідомляти Бінго (колишній MSN Live Search) про оновлення Вашого блогу" + +#: sitemap-ui.php:749 +#, php-format +#@ sitemap +msgid "No registration required, but you can join the Bing Webmaster Tools to check crawling statistics." +msgstr "Не потрібна реєстрація, але ви можете приєднатися до Bing Інструменти для веб-майстрів , щоб перевірити статистику сканування." + +#: sitemap-ui.php:753 +#@ sitemap +msgid "Notify Ask.com about updates of your Blog" +msgstr "Повідомити Ask.com про оновлення Вашого блогу" + +#: sitemap-ui.php:754 +#@ sitemap +msgid "No registration required." +msgstr "Не потрібна реєстрація." + +#: sitemap-ui.php:758 +#@ sitemap +msgid "Notify YAHOO about updates of your Blog" +msgstr "Повідомити YAHOO про оновлення Вашого блогу" + +#: sitemap-ui.php:759 +#@ sitemap +msgid "Your Application ID:" +msgstr "Ваш идентифікатор :" + +#: sitemap-ui.php:760 +#, php-format +#@ sitemap +msgid "Don't you have such a key? Request one here! %s2" +msgstr "Ви не маєте такого ключа? Запитати його тут! %s2" + +#: sitemap-ui.php:765 +#@ sitemap +msgid "Add sitemap URL to the virtual robots.txt file." +msgstr "Додати URL файлу Sitemap в віртуальний файл robots.txt ." + +#: sitemap-ui.php:769 +#@ sitemap +msgid "The virtual robots.txt generated by WordPress is used. A real robots.txt file must NOT exist in the blog directory!" +msgstr "Використовується віртуальний robots.txt сгенерований WordPress. Реального файлу robots.txt НЕ ПОВИННО бути в каталозі блогу!" + +#: sitemap-ui.php:772 +#@ sitemap +msgid "Advanced options:" +msgstr "Додаткові опції:" + +#: sitemap-ui.php:775 +#@ sitemap +msgid "Limit the number of posts in the sitemap:" +msgstr "Обмеження кількості публікацій в Sitemap:" + +#: sitemap-ui.php:775 +#@ sitemap +msgid "Newer posts will be included first" +msgstr "Нові повідомлення мають бути включеними першими" + +#: sitemap-ui.php:778 +#@ sitemap +msgid "Try to increase the memory limit to:" +msgstr "Спробуйте збільшити ліміт пам'яті:" + +#: sitemap-ui.php:778 +#@ sitemap +msgid "e.g. \"4M\", \"16M\"" +msgstr "наприклад \"4M\", \"16M\"" + +#: sitemap-ui.php:781 +#@ sitemap +msgid "Try to increase the execution time limit to:" +msgstr "Спробуйте збільшити ліміт часу виконання до:" + +#: sitemap-ui.php:781 +#@ sitemap +msgid "in seconds, e.g. \"60\" or \"0\" for unlimited" +msgstr "у секундах, наприклад \"60\" або \"0\" для необмежного" + +#: sitemap-ui.php:785 +#@ sitemap +msgid "Include a XSLT stylesheet:" +msgstr "Додати таблиці стилів XSLT:" + +#: sitemap-ui.php:786 +#@ sitemap +msgid "Full or relative URL to your .xsl file" +msgstr "Повний або відносний URL до вашого. XSL-файлу" + +#: sitemap-ui.php:786 +#@ sitemap +msgid "Use default" +msgstr "Використовувати параметри за замовчуванням" + +#: sitemap-ui.php:792 +#@ sitemap +msgid "Enable MySQL standard mode. Use this only if you're getting MySQL errors. (Needs much more memory!)" +msgstr "Увімкнути стандартний режим MySQL. Використовуйте це тільки якщо ви отримуєте помилки від MySQL. (Потрібно набагато більше пам'яті!)" + +#: sitemap-ui.php:793 +#@ sitemap +msgid "Upgrade WordPress at least to 2.2 to enable the faster MySQL access" +msgstr "Оновіть WordPress, принаймні до 2.2, з тим щоб увімкнути швидший доступ до MySQL " + +#: sitemap-ui.php:800 +#@ sitemap +msgid "Build the sitemap in a background process (You don't have to wait when you save a post)" +msgstr "Побудувати Мапу сайту у фоновому режимі (Вам не доведеться чекати, коли ви збережете публікацію)" + +#: sitemap-ui.php:801 +#@ sitemap +msgid "Upgrade WordPress at least to 2.1 to enable background building" +msgstr "Оновіть WordPress, принаймні до 2.1 щоб влючити побудову у фоновому режимі " + +#: sitemap-ui.php:808 +#@ sitemap +msgid "Additional pages" +msgstr "Додаткові сторінки" + +#: sitemap-ui.php:811 +#@ sitemap +msgid "Here you can specify files or URLs which should be included in the sitemap, but do not belong to your Blog/WordPress.
    For example, if your domain is www.foo.com and your blog is located on www.foo.com/blog you might want to include your homepage at www.foo.com" +msgstr "Тут ви можете вказати файли, або URL-адрес, які повинні бути включені в Sitemap, але не належать до блогу/WordPress.
    Наприклад, якщо ваш домен www.foo.com і ваш блог знаходиться на www.foo.com/blog можна включити в вашу домашню сторінку www.foo.com" + +#: sitemap-ui.php:813 +#: sitemap-ui.php:992 +#: sitemap-ui.php:1006 +#: sitemap-ui.php:1015 +#@ sitemap +msgid "Note" +msgstr "Примітка" + +#: sitemap-ui.php:814 +#@ sitemap +msgid "If your blog is in a subdirectory and you want to add pages which are NOT in the blog directory or beneath, you MUST place your sitemap file in the root directory (Look at the "Location of your sitemap file" section on this page)!" +msgstr "Якщо ваш блог знаходиться у підкаталозі, і ви хочете додати сторінок, які не в блозі, Ви повинні розмістити свій файл Sitemap в кореневий каталог (Подивіться на \\\"Місце знаходження вашого сайту файл"Розділ на цій сторінці) !" + +#: sitemap-ui.php:816 +#: sitemap-ui.php:855 +#@ sitemap +msgid "URL to the page" +msgstr "URL сторінки" + +#: sitemap-ui.php:817 +#@ sitemap +msgid "Enter the URL to the page. Examples: http://www.foo.com/index.html or www.foo.com/home " +msgstr "Введіть URL для сторінки. Приклади: http://www.foo.com/index.html or www.foo.com/home " + +#: sitemap-ui.php:819 +#: sitemap-ui.php:856 +#@ sitemap +msgid "Priority" +msgstr "Пріорітет" + +#: sitemap-ui.php:820 +#@ sitemap +msgid "Choose the priority of the page relative to the other pages. For example, your homepage might have a higher priority than your imprint." +msgstr "Виберіть пріоритет сторінки в порівнянні з іншими сторінками. Наприклад, ваша домашня сторінка, можливо, має більш високий пріоритет, ніж інші." + +#: sitemap-ui.php:822 +#: sitemap-ui.php:858 +#@ sitemap +msgid "Last Changed" +msgstr "Останні Зміни" + +#: sitemap-ui.php:823 +#@ sitemap +msgid "Enter the date of the last change as YYYY-MM-DD (2005-12-31 for example) (optional)." +msgstr "Введіть дату останнього зміни як РРРР-ММ-ДД (наприклад, 2005-12-31) (не обов'язково)." + +#: sitemap-ui.php:857 +#@ sitemap +msgid "Change Frequency" +msgstr "Зміна частоти" + +#: sitemap-ui.php:859 +#@ sitemap +msgid "#" +msgstr "№" + +#: sitemap-ui.php:864 +#@ sitemap +msgid "No pages defined." +msgstr "Не зазначена жодна сторінка " + +#: sitemap-ui.php:869 +#@ sitemap +msgid "Add new page" +msgstr "Додати нову сторінку" + +#: sitemap-ui.php:874 +#@ sitemap +msgid "Post Priority" +msgstr "Пріорітет Публікації" + +#: sitemap-ui.php:876 +#@ sitemap +msgid "Please select how the priority of each post should be calculated:" +msgstr "Будь ласка, виберіть який пріоритет повинен бути розрахований для кожної публікації :" + +#: sitemap-ui.php:878 +#@ sitemap +msgid "Do not use automatic priority calculation" +msgstr "Не робити автоматичну калькуляцію приорітету" + +#: sitemap-ui.php:878 +#@ sitemap +msgid "All posts will have the same priority which is defined in "Priorities"" +msgstr "Всі публікацї, будуть мати такий же пріоритет, який визначений в "пріоритети"" + +#: sitemap-ui.php:889 +#@ sitemap +msgid "Location of your sitemap file" +msgstr "Місце росташування вашого файлу Sitemap" + +#: sitemap-ui.php:892 +#@ sitemap +msgid "Automatic detection" +msgstr "Автоматичне виявлення" + +#: sitemap-ui.php:896 +#@ sitemap +msgid "Filename of the sitemap file" +msgstr "Ім'я Sitemap файлу" + +#: sitemap-ui.php:899 +#@ sitemap +msgid "Detected Path" +msgstr "Знайдений Путь" + +#: sitemap-ui.php:899 +#@ sitemap +msgid "Detected URL" +msgstr "Знайдений URL" + +#: sitemap-ui.php:904 +#@ sitemap +msgid "Custom location" +msgstr "Місце розташування зазначене користувачем" + +#: sitemap-ui.php:908 +#@ sitemap +msgid "Absolute or relative path to the sitemap file, including name." +msgstr "Абсолютний або відносний шлях до файлу Sitemap, в тому числі ім'я." + +#: sitemap-ui.php:910 +#: sitemap-ui.php:919 +#@ sitemap +msgid "Example" +msgstr "Приклад" + +#: sitemap-ui.php:917 +#@ sitemap +msgid "Complete URL to the sitemap file, including name." +msgstr "Повний URL для файлу Sitemap, в тому числі ім'я." + +#: sitemap-ui.php:930 +#@ sitemap +msgid "Sitemap Content" +msgstr "Зміст мапи сайту" + +#: sitemap-ui.php:936 +#@ sitemap +msgid "Include homepage" +msgstr "Включити домашні сторінки" + +#: sitemap-ui.php:942 +#@ sitemap +msgid "Include posts" +msgstr "Включити публікації" + +#: sitemap-ui.php:948 +#@ sitemap +msgid "Include following pages of multi-page posts (Increases build time and memory usage!)" +msgstr "Включити наступні сторінки декількох публікацій (збільшує час побудови та використання пам'яті!)" + +#: sitemap-ui.php:954 +#@ sitemap +msgid "Include static pages" +msgstr "Включити статичні сторінки" + +#: sitemap-ui.php:960 +#@ sitemap +msgid "Include categories" +msgstr "Включити категорії" + +#: sitemap-ui.php:966 +#@ sitemap +msgid "Include archives" +msgstr "Включити архіви" + +#: sitemap-ui.php:973 +#@ sitemap +msgid "Include tag pages" +msgstr "Включити сторінки тегів" + +#: sitemap-ui.php:980 +#@ sitemap +msgid "Include author pages" +msgstr "Включити сторінки авторів" + +#: sitemap-ui.php:988 +#@ sitemap +msgid "Excluded items" +msgstr "" +"\t\n" +"Виключені пункти" + +#: sitemap-ui.php:990 +#@ sitemap +msgid "Excluded categories" +msgstr "Виключити категорії" + +#: sitemap-ui.php:992 +#@ sitemap +msgid "Using this feature will increase build time and memory usage!" +msgstr "Використання цієї функції збільшує час побудови та використання пам'яті!" + +#: sitemap-ui.php:999 +#, php-format +#@ sitemap +msgid "This feature requires at least WordPress 2.5.1, you are using %s" +msgstr "Ця функція вимагає, що найменьше WordPress 2.5.1, ви використовуєте %s" + +#: sitemap-ui.php:1002 +#@ sitemap +msgid "Exclude posts" +msgstr "Виключити публікації" + +#: sitemap-ui.php:1004 +#@ sitemap +msgid "Exclude the following posts or pages:" +msgstr "Виключити наступні публікації або сторінки:" + +#: sitemap-ui.php:1004 +#@ sitemap +msgid "List of IDs, separated by comma" +msgstr "Перелік ID, розділених комою" + +#: sitemap-ui.php:1006 +#@ sitemap +msgid "Child posts won't be excluded automatically!" +msgstr "Дочірні публікації не виключаються автоматично!" + +#: sitemap-ui.php:1012 +#@ sitemap +msgid "Change frequencies" +msgstr "Зміна частоти" + +#: sitemap-ui.php:1016 +#@ sitemap +msgid "Please note that the value of this tag is considered a hint and not a command. Even though search engine crawlers consider this information when making decisions, they may crawl pages marked \"hourly\" less frequently than that, and they may crawl pages marked \"yearly\" more frequently than that. It is also likely that crawlers will periodically crawl pages marked \"never\" so that they can handle unexpected changes to those pages." +msgstr "Майте на увазі, що значення для цього тега розглядається як підказка, а не команда. Незважаючи на те, що сканери пошукової системи враховують цю інформацію при прийнятті рішень, вони можуть сканувати сторінки з позначкою \\\"щогодини \" рідше, ніж сторінки з позначкою \\ \\\"щорічно \". Імовірно також, що сканери будуть періодично сканувати сторінки з позначкою \\ \\\"ніколи \", з тим щоб вони могли знайти несподівані зміни на цих сторінках." + +#: sitemap-ui.php:1022 +#: sitemap-ui.php:1079 +#@ sitemap +msgid "Homepage" +msgstr "Домашня сторінка" + +#: sitemap-ui.php:1028 +#@ sitemap +msgid "Posts" +msgstr "Пулікації" + +#: sitemap-ui.php:1034 +#: sitemap-ui.php:1097 +#@ sitemap +msgid "Static pages" +msgstr "Статичні сторінки" + +#: sitemap-ui.php:1040 +#: sitemap-ui.php:1103 +#@ sitemap +msgid "Categories" +msgstr "Катергорії" + +#: sitemap-ui.php:1046 +#@ sitemap +msgid "The current archive of this month (Should be the same like your homepage)" +msgstr "Поточний архів за цей місяць (Повинен бути таким самим, як ваша головна сторінка)" + +#: sitemap-ui.php:1052 +#@ sitemap +msgid "Older archives (Changes only if you edit an old post)" +msgstr "Попередні архіви (змінються тільки тоді, коли ви редагуєте старі публікації)" + +#: sitemap-ui.php:1059 +#: sitemap-ui.php:1116 +#@ sitemap +msgid "Tag pages" +msgstr "Сторінки тегів" + +#: sitemap-ui.php:1066 +#: sitemap-ui.php:1123 +#@ sitemap +msgid "Author pages" +msgstr "Сторінки Автора" + +#: sitemap-ui.php:1074 +#@ sitemap +msgid "Priorities" +msgstr "Пріоритети" + +#: sitemap-ui.php:1085 +#@ sitemap +msgid "Posts (If auto calculation is disabled)" +msgstr "Публікації (Якщо авторозрахунок відключено)" + +#: sitemap-ui.php:1091 +#@ sitemap +msgid "Minimum post priority (Even if auto calculation is enabled)" +msgstr "Мінімальний пріоритет публікації (Навіть якщо автоматичний розрахунок було включено)" + +#: sitemap-ui.php:1109 +#@ sitemap +msgid "Archives" +msgstr "Архіви" + +#: sitemap-ui.php:1134 +#@ sitemap +msgid "Update options" +msgstr "Оновити опції" + +#: sitemap-ui.php:1135 +#@ sitemap +msgid "Reset options" +msgstr "Скинути опції" + +#: sitemap.php:87 +#@ sitemap +msgid "XML-Sitemap Generator" +msgstr "XML-Генератор Мапи сайту" + +#: sitemap.php:87 +#@ sitemap +msgid "XML-Sitemap" +msgstr "XML-Мапа сайту" + +#: sitemap.php:101 +msgid "Settings" +msgstr "" + +#: sitemap.php:102 +msgid "FAQ" +msgstr "" + +#: sitemap.php:103 +msgid "Support" +msgstr "" + +#: sitemap.php:104 +msgid "Donate" +msgstr "" + +#: sitemap.php:154 +msgid "Sitemap FAQ" +msgstr "" + diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/lang/sitemap-zh_CN.mo Binary file web/wp-content/plugins/google-sitemap-generator/lang/sitemap-zh_CN.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/lang/sitemap-zh_CN.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/google-sitemap-generator/lang/sitemap-zh_CN.po Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,799 @@ +msgid "" +msgstr "" +"Project-Id-Version: Google XML Sitemaps 3.1\n" +"POT-Creation-Date: \n" +"PO-Revision-Date: 2008-12-22 02:51+0800\n" +"Last-Translator: dupola \n" +"Language-Team: dupola \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-Basepath: D:\\usr\\www\\wp-content\\plugins\\google-sitemap-generator\n" +"X-Poedit-KeywordsList: _e;__\n" +"X-Poedit-SearchPath-0: D:\\usr\\www\\wp-content\\plugins\\google-sitemap-generator\n" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:846 +msgid "Comment Count" +msgstr "评论数量" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:858 +msgid "Uses the number of comments of the post to calculate the priority" +msgstr "通过文章评论数量的多少来决定优先" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:918 +msgid "Comment Average" +msgstr "评论平均" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:930 +msgid "Uses the average comment count to calculate the priority" +msgstr "通过评论平均来决定计算优先" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:993 +msgid "Popularity Contest" +msgstr "热门内容" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:1005 +msgid "Uses the activated Popularity Contest Plugin from Alex King. See Settings and Most Popular Posts" +msgstr "使用已经激活的 Alex King热门日志插件。 查看 设置 and 最流行日志" + +# D:\usr\www\wp-content\plugins\google-sitemap-generator/sitemap-core.php:1123 +msgid "Always" +msgstr "总是" + +# D:\usr\www\wp-content\plugins\google-sitemap-generator/sitemap-core.php:1124 +msgid "Hourly" +msgstr "每小时" + +# D:\usr\www\wp-content\plugins\google-sitemap-generator/sitemap-core.php:1125 +msgid "Daily" +msgstr "每天" + +# D:\usr\www\wp-content\plugins\google-sitemap-generator/sitemap-core.php:1126 +msgid "Weekly" +msgstr "每周" + +# D:\usr\www\wp-content\plugins\google-sitemap-generator/sitemap-core.php:1127 +msgid "Monthly" +msgstr "每月" + +# D:\usr\www\wp-content\plugins\google-sitemap-generator/sitemap-core.php:1128 +msgid "Yearly" +msgstr "每月" + +# D:\usr\www\wp-content\plugins\google-sitemap-generator/sitemap-core.php:1129 +msgid "Never" +msgstr "从不" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2600 +msgid "Thank you very much for your donation. You help me to continue support and development of this plugin and other free software!" +msgstr "非常感谢你的捐赠,你的帮助可以使我继续开发该这个和其他项目!" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2600 +msgid "Hide this notice" +msgstr "隐藏提示" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2657 +#, php-format +msgid "Thanks for using this plugin! You've installed this plugin over a month ago. If it works and your are satisfied with the results, isn't it worth at least one dollar? Donations help me to continue support and development of this free software! Sure, no problem!" +msgstr "感谢你使用这个插件!你已经启用这个插件一个多月了。运行得很不错,你觉得它值不值1美元?捐赠 帮助我继续开发这个 免费 软件! 当然,没问题!" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2657 +msgid "No thanks, please don't bug me anymore!" +msgstr "不,请别再再骚扰我啦!" + +# D:\usr\www\wp-content\plugins\google-sitemap-generator/sitemap-ui.php:67 +msgid "Your sitemap is being refreshed at the moment. Depending on your blog size this might take some time!" +msgstr "你的 sitemap 已经更新了。Blog 配置不同,它完全生效的时间也不同。" + +# D:\usr\www\wp-content\plugins\google-sitemap-generator/sitemap-ui.php:69 +#, php-format +msgid "Your sitemap will be refreshed in %s seconds. Depending on your blog size this might take some time!" +msgstr "你的 sitemap 将在 %s 秒内更新,Blog 配置不同,它完全生效的时间也不同。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2635 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2835 +msgid "XML Sitemap Generator for WordPress" +msgstr "XML 地图生成器" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2740 +msgid "Configuration updated" +msgstr "配置已更新" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2741 +msgid "Error while saving options" +msgstr "保存设置时出错" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2743 +msgid "Pages saved" +msgstr "页面已保存" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2744 +msgid "Error while saving pages" +msgstr "保存页面时出错" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2748 +#, php-format +msgid "Robots.txt file saved" +msgstr "Robots.txt 文件已保存" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2750 +msgid "Error while saving Robots.txt file" +msgstr "保存 Robots.txt 文件时出错" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2758 +msgid "The default configuration was restored." +msgstr "默认结构已经被修复。" + +# D:\usr\www\wp-content\plugins\google-sitemap-generator/sitemap-ui.php:374 +#, php-format +msgid "There is a new version of %1$s available. Download version %3$s here." +msgstr "XML Sitemap 有新版本 %1$s 发布了。 这里来下载 %3$s 版。" + +# D:\usr\www\wp-content\plugins\google-sitemap-generator/sitemap-ui.php:376 +#, php-format +msgid "There is a new version of %1$s available. Download version %3$s here automatic upgrade unavailable for this plugin." +msgstr "XML Sitemap 的新版本 %1$s 发布了. 到这里下载 %3$s 版无法自动更新这个插件." + +# D:\usr\www\wp-content\plugins\google-sitemap-generator/sitemap-ui.php:378 +#, php-format +msgid "There is a new version of %1$s available. Download version %3$s here or upgrade automatically." +msgstr "XML Sitemap 新版 %1$s 发布了。 到这里下载 %3$s 版 或者 自动升级。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2851 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2868 +msgid "open" +msgstr "打开" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2852 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2869 +msgid "close" +msgstr "关闭" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2853 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2870 +msgid "click-down and drag to move this box" +msgstr "点击并拖动它到这个区域" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2854 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2871 +msgid "click to %toggle% this box" +msgstr "点击并 %toggle% 这个区域" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2855 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2872 +msgid "use the arrow keys to move this box" +msgstr "使用箭头指向来移动这个区块" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2856 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2873 +msgid ", or press the enter key to %toggle% it" +msgstr ",或者按这里to %toggle% it" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2884 +msgid "About this Plugin:" +msgstr "关于这个插件:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2886 +msgid "Plugin Homepage" +msgstr "插件主页" + +# D:\usr\www\wp-content\plugins\google-sitemap-generator/sitemap-ui.php:438 +msgid "Suggest a Feature" +msgstr "建议新功能" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2887 +msgid "Notify List" +msgstr "通告列表" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2888 +msgid "Support Forum" +msgstr "支持论坛" + +# D:\usr\www\wp-content\plugins\google-sitemap-generator/sitemap-ui.php:441 +msgid "Report a Bug" +msgstr "报告 Bug" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2889 +msgid "Donate with PayPal" +msgstr "通过 PayPal 捐赠" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2890 +msgid "My Amazon Wish List" +msgstr "我想要的东西(Amazon)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2891 +msgid "translator_name" +msgstr "简体中文(dupola)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2891 +msgid "translator_url" +msgstr "http://dupola.com" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2895 +msgid "Sitemap Resources:" +msgstr "Sitemap 资源:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2897 +msgid "Webmaster Tools" +msgstr "Webmaster Tools" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2898 +msgid "Webmaster Blog" +msgstr "Webmaster Blog" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2900 +msgid "Site Explorer" +msgstr "Site Explorer" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2901 +msgid "Search Blog" +msgstr "Search Blog" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3010 +msgid "Webmaster Center Blog" +msgstr "Webmaster Center Blog" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2903 +msgid "Sitemaps Protocol" +msgstr "Sitemaps 协议" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2904 +msgid "Official Sitemaps FAQ" +msgstr "通用 Sitemaps FAQ" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2905 +msgid "My Sitemaps FAQ" +msgstr "我的 Sitemaps FAQ" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2910 +msgid "Recent Donations:" +msgstr "最近捐赠者:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2914 +msgid "List of the donors" +msgstr "捐赠者列表" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2916 +msgid "Hide this list" +msgstr "隐藏这个列表" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2919 +msgid "Thanks for your support!" +msgstr "谢谢支持!" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2931 +msgid "Status" +msgstr "统计" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2941 +#, php-format +msgid "The sitemap wasn't built yet. Click here to build it the first time." +msgstr "sitemap 还没建立,点击这里建立。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2947 +msgid "Your sitemap was last built on %date%." +msgstr "你的 sitemap 上一次建立是在%date%。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2949 +msgid "There was a problem writing your sitemap file. Make sure the file exists and is writable. Learn more学习更多" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2956 +msgid "Your sitemap (zipped) was last built on %date%." +msgstr "你的 sitemap (zipped) 上一次建立是在 %date%." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2958 +msgid "There was a problem writing your zipped sitemap file. Make sure the file exists and is writable. Learn more学习更多" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2964 +msgid "Google was successfully notified about changes." +msgstr "更新已经成功通知 Google。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2967 +msgid "It took %time% seconds to notify Google, maybe you want to disable this feature to reduce the building time." +msgstr "通知 Google 用了%time% ,也许你应该禁用这一功能以减少创建时间。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3011 +#, php-format +msgid "There was a problem while notifying Google. View result" +msgstr "在通知 Google 时发生错误,查看结果" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2976 +msgid "YAHOO was successfully notified about changes." +msgstr "更新已经成功通知 YAHOO。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2979 +msgid "It took %time% seconds to notify YAHOO, maybe you want to disable this feature to reduce the building time." +msgstr "通知 YAHOO 用了 %time% ,也许你应该禁用这项功能以减少建立时间。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3023 +#, php-format +msgid "There was a problem while notifying YAHOO. View result" +msgstr "通知 YAHOO 时出错。查看结果" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3097 +msgid "MSN was successfully notified about changes." +msgstr "更新已经成功通知 MSN。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3100 +msgid "It took %time% seconds to notify MSN.com, maybe you want to disable this feature to reduce the building time." +msgstr "通知 MSN.com 用了%time% ,也许你应该禁用这一功能以减少创建时间。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3103 +#, php-format +msgid "There was a problem while notifying MSN.com. View result" +msgstr "通知 MSN.com 时出错。查看结果" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2988 +msgid "Ask.com was successfully notified about changes." +msgstr "更新已经成功通知 Ask.com。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2991 +msgid "It took %time% seconds to notify Ask.com, maybe you want to disable this feature to reduce the building time." +msgstr "通知 Ask.com 用了%time% ,也许你应该禁用这一功能以减少创建时间。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3035 +#, php-format +msgid "There was a problem while notifying Ask.com. View result" +msgstr "通知 MSN.com 时出错。查看结果" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3002 +msgid "The building process took about %time% seconds to complete and used %memory% MB of memory." +msgstr "此次建立大约用了 %time% 秒 完成,使用了 %memory% MB 内存。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3004 +msgid "The building process took about %time% seconds to complete." +msgstr "此次建立用了大约 %time% 秒 完成。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3008 +msgid "The content of your sitemap didn't change since the last time so the files were not written and no search engine was pinged." +msgstr "从上次这个文件不可写以后,你的 sitemap 就没有更新 ,并且也没有通知任何搜索引擎。" + +# D:\usr\www\wp-content\plugins\google-sitemap-generator/sitemap-ui.php:586 +msgid "The building process might still be active! Reload the page in a few seconds and check if something has changed." +msgstr "这项处理将会生效!几秒钟后刷新这个页面,查看是否有所变化。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3012 +msgid "The last run didn't finish! Maybe you can raise the memory or time limit for PHP scripts. Learn more" +msgstr "上次运行没有完成!你应该为 PHP scripts 增加内存或时间限制。学习更多" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3014 +msgid "The last known memory usage of the script was %memused%MB, the limit of your server is %memlimit%." +msgstr "上次执行用了 was %memused%MB, 你的服务器限制是 %memlimit%。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3018 +msgid "The last known execution time of the script was %timeused% seconds, the limit of your server is %timelimit% seconds." +msgstr "上次执行时间 %timeused% 秒,你的服务器限制是 %timelimit% 秒." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3022 +msgid "The script stopped around post number %lastpost% (+/- 100)" +msgstr "这个脚本停止于这篇日志: %lastpost% (+/- 100)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3025 +#, php-format +msgid "If you changed something on your server or blog, you should rebuild the sitemap manually." +msgstr "如果你 Blog 或服务器更新了某些东西,你应该手动 重建 sitemap。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3027 +#, php-format +msgid "If you encounter any problems with the build process you can use the debug function to get more information." +msgstr "如果在执行建立程序时遇到问题,你可以使用 debug function来获取更多信息。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3040 +msgid "Basic Options" +msgstr "基本设置" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3044 +msgid "Sitemap files:" +msgstr "sitemap 文件" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3044 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3059 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3079 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3104 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3121 +msgid "Learn more" +msgstr "学习更多" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3049 +msgid "Write a normal XML file (your filename)" +msgstr "创建一个 XML 文件 (你的文件名)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3055 +msgid "Write a gzipped file (your filename + .gz)" +msgstr "创建一个 gzipped 文件 (你的文件名 + .gz)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3059 +msgid "Building mode:" +msgstr "建立模式:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3064 +msgid "Rebuild sitemap if you change the content of your blog" +msgstr "在你更改了 Blog 内容后重建 sitemap" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3071 +msgid "Enable manual sitemap building via GET Request" +msgstr "通过 GET Request 启用手动建立 sitemap" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3075 +msgid "This will allow you to refresh your sitemap if an external tool wrote into the WordPress database without using the WordPress API. Use the following URL to start the process: %1 Please check the logfile above to see if sitemap was successfully built." +msgstr "这将允许你刷新你的 sitemap,如果外部工具不是通过 WordPress API写入 WordPress 数据。使用下面这个链接开始运行:%1 请检查上面的日志文件,看看 sitemap 有没有成功建立。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3079 +msgid "Update notification:" +msgstr "更新通知:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3083 +msgid "Notify Google about updates of your Blog" +msgstr "通知 Google 关于你 Blog 的更新" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3084 +#, php-format +msgid "No registration required, but you can join the Google Webmaster Tools to check crawling statistics." +msgstr "非必须注册,不过你可以使用Google 管理员工具查看爬虫统计。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3209 +msgid "Notify MSN Live Search about updates of your Blog" +msgstr "通知 MSN Live Search 关于你 Blog 的更新" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3210 +#, php-format +msgid "No registration required, but you can join the MSN Live Webmaster Tools to check crawling statistics." +msgstr "非必须注册,不过你可以加入MSN Live 管理员工具以检查爬虫统计。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3088 +msgid "Notify Ask.com about updates of your Blog" +msgstr "提醒 Ask.com 关于你 Blog 的更新" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3089 +msgid "No registration required." +msgstr "非必须注册。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3093 +msgid "Notify YAHOO about updates of your Blog" +msgstr "提醒 Yahoo 关于你 Blog 的更新" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3154 +msgid "Your Application ID:" +msgstr "你的 Application ID:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3155 +#, php-format +msgid "Don't you have such a key? Request one here! %s2" +msgstr "没有 key?点这里申请一个! %s2" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3099 +#, php-format +msgid "Modify or create %s file in blog root which contains the sitemap location." +msgstr "在 阻止 sitemap 的 blog 目录修改或建立 %s 文件。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3102 +msgid "File permissions: " +msgstr "文件权限:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3107 +msgid "OK, robots.txt is writable." +msgstr "不错,robots.txt 可写。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3109 +msgid "Error, robots.txt is not writable." +msgstr "错误,robots.txt 不可写。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3113 +msgid "OK, robots.txt doesn't exist but the directory is writable." +msgstr "不错,robots.txt 不存在,但这个目录是可写的。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3115 +msgid "Error, robots.txt doesn't exist and the directory is not writable" +msgstr "错误,robots.txt 不存在并且这个目录不可写。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3121 +msgid "Advanced options:" +msgstr "高级设置:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3124 +msgid "Limit the number of posts in the sitemap:" +msgstr "sitemap 里日志数量的限制:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3124 +msgid "Newer posts will be included first" +msgstr "较早的日志将首先被包含进来" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3127 +msgid "Try to increase the memory limit to:" +msgstr "增加内存限制到:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3127 +msgid "e.g. \"4M\", \"16M\"" +msgstr "比如: \"4M\", \"16M\"" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3130 +msgid "Try to increase the execution time limit to:" +msgstr "增加执行时间限制到:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3130 +msgid "in seconds, e.g. \"60\" or \"0\" for unlimited" +msgstr "按秒计算,比如 \"60\" or \"0\" 没有限制" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3133 +msgid "Include a XSLT stylesheet:" +msgstr "包含一个 XSLT 清单" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3133 +msgid "Use Default" +msgstr "使用默认的" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3133 +msgid "Full or relative URL to your .xsl file" +msgstr "你的 .xsl 文件的绝对或相对路径" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3152 +msgid "Enable MySQL standard mode. Use this only if you're getting MySQL errors. (Needs much more memory!)" +msgstr "启用 MySQL 标准模式。仅在 MySQL 发生错误的时候使用。(将会占用更多内存!)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3166 +msgid "Build the sitemap in a background process (You don't have to wait when you save a post)" +msgstr "在后台建立 sitemap(你不需要在保存日志时等待)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3144 +msgid "Additional pages" +msgstr "附加页面" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3149 +msgid "Here you can specify files or URLs which should be included in the sitemap, but do not belong to your Blog/WordPress.
    For example, if your domain is www.foo.com and your blog is located on www.foo.com/blog you might want to include your homepage at www.foo.com" +msgstr "在这里你可以为 sitemap 加入一些特殊的但并不存在于你 Blog/WordPress 的地址。比如,如果你的域名是 www.dupola.com,你的blog在 www.dupola.com/blog 上,你可以加入你的首页 www.dupola.com" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3151 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3462 +msgid "Note" +msgstr "注意" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3152 +msgid "If your blog is in a subdirectory and you want to add pages which are NOT in the blog directory or beneath, you MUST place your sitemap file in the root directory (Look at the "Location of your sitemap file" section on this page)!" +msgstr "如果你的 blog 在子目录里,你要添加 blog 目录或下级目录没有的页面,你必须将 sitemap 文件放到这个目录里(查看本页的 " sitemap 文件的位置 " 一节)!" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3154 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3300 +msgid "URL to the page" +msgstr "这个页面的 URL" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3155 +msgid "Enter the URL to the page. Examples: http://www.foo.com/index.html or www.foo.com/home " +msgstr "输入这个页面的地址,比如:http://dupola.com/dreamhost 或 www.dupola.com/google" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3157 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3301 +msgid "Priority" +msgstr "优先" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3158 +msgid "Choose the priority of the page relative to the other pages. For example, your homepage might have a higher priority than your imprint." +msgstr "选择该页面的相关页面的优先权。比如,你的主页应该拥有一个更高的优先权。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3160 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3303 +msgid "Last Changed" +msgstr "最近更改" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3161 +msgid "Enter the date of the last change as YYYY-MM-DD (2005-12-31 for example) (optional)." +msgstr "输入最后更改的日期,格式为 YYYY-MM-DD (例如 2005-12-31) (可选的l)." + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3302 +msgid "Change Frequency" +msgstr "更改频率" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3304 +msgid "#" +msgstr "#" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3309 +msgid "No pages defined." +msgstr "没有页面" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3314 +msgid "Add new page" +msgstr "增加一个新的页面" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3325 +msgid "Post Priority" +msgstr "日志优先" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3329 +msgid "Please select how the priority of each post should be calculated:" +msgstr "请选择每篇日志可预设的优先权:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3331 +msgid "Do not use automatic priority calculation" +msgstr "不要使用默认优先计算" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3331 +msgid "All posts will have the same priority which is defined in "Priorities"" +msgstr "所有日志都将拥有 "优先权" 设定中设置的那样的优先权" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3348 +msgid "Location of your sitemap file" +msgstr "你的 sitemap 文件的位置" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3353 +msgid "Automatic detection" +msgstr "自动检查" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3357 +msgid "Filename of the sitemap file" +msgstr "sitemap 文件的名字" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3360 +msgid "Detected Path" +msgstr "检查路径" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3360 +msgid "Detected URL" +msgstr "检查地址" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3365 +msgid "Custom location" +msgstr "自定义路径" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3369 +msgid "Absolute or relative path to the sitemap file, including name." +msgstr "sitemap 的绝对或相对路径,包括名字。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3371 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3380 +msgid "Example" +msgstr "例如" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3378 +msgid "Complete URL to the sitemap file, including name." +msgstr "sitemap 文件的完全地址,包括名字。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3397 +msgid "Sitemap Content" +msgstr "sitemap 内容" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3405 +msgid "Include homepage" +msgstr "包含首页" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3411 +msgid "Include posts" +msgstr "包含日志" + +# D:\usr\www\wp-content\plugins\google-sitemap-generator/sitemap-ui.php:1013 +msgid "Include following pages of multi-page posts (<!--nextpage-->)" +msgstr "包括所有多重页面 (<!--nextpage-->)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3417 +msgid "Include static pages" +msgstr "包含独立页面" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3423 +msgid "Include categories" +msgstr "包含分类" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3429 +msgid "Include archives" +msgstr "包含存档页面" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3436 +msgid "Include tag pages" +msgstr "包含 Tag 页面" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3443 +msgid "Include author pages" +msgstr "包含作者页面" + +# D:\usr\www\wp-content\plugins\google-sitemap-generator/sitemap-ui.php:981 +msgid "Excluded items" +msgstr "不包含的项目" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3423 +msgid "Excluded categories" +msgstr "不包含分类" + +# D:\usr\www\wp-content\plugins\google-sitemap-generator/sitemap-ui.php:985 +msgid "Using this feature will increase build time and memory usage!" +msgstr "使用这个特性将增大建立时间和使用内存!" + +# D:\usr\www\wp-content\plugins\google-sitemap-generator/sitemap-ui.php:992 +#, php-format +msgid "This feature requires at least WordPress 2.5, you are using %s" +msgstr "这个特性要求 WordPress 版本至少是 2.5,你正在使用 %s" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3411 +msgid "Exclude posts" +msgstr "不包含日志" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3206 +msgid "Exclude the following posts or pages:" +msgstr "不包括下面的日志或页面:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3206 +msgid "List of IDs, separated by comma" +msgstr "ID 列表,用英文逗号隔开" + +# D:\usr\www\wp-content\plugins\google-sitemap-generator/sitemap-ui.php:999 +msgid "Child posts will not automatically be excluded!" +msgstr "子日志将自动排除,不包含在内!" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3457 +msgid "Change frequencies" +msgstr "更改频率" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3463 +msgid "Please note that the value of this tag is considered a hint and not a command. Even though search engine crawlers consider this information when making decisions, they may crawl pages marked \"hourly\" less frequently than that, and they may crawl pages marked \"yearly\" more frequently than that. It is also likely that crawlers will periodically crawl pages marked \"never\" so that they can handle unexpected changes to those pages." +msgstr "请注意,这些值仅仅是参考建立而并非是准确无误的。 " + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3469 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3535 +msgid "Homepage" +msgstr "首页" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3475 +msgid "Posts" +msgstr "日志" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3481 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3553 +msgid "Static pages" +msgstr "独立页面" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3487 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3559 +msgid "Categories" +msgstr "分类" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3493 +msgid "The current archive of this month (Should be the same like your homepage)" +msgstr "这个月的存档(应该和你的首页保持一致)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3499 +msgid "Older archives (Changes only if you edit an old post)" +msgstr "较早的存档(只在你编辑了旧日志后才更新)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3506 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3572 +msgid "Tag pages" +msgstr "Tag页" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3513 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3579 +msgid "Author pages" +msgstr "作者页" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3527 +msgid "Priorities" +msgstr "优先权" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3541 +msgid "Posts (If auto calculation is disabled)" +msgstr "日志(如果自动计算已禁用)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3547 +msgid "Minimum post priority (Even if auto calculation is enabled)" +msgstr "日志最小优先(即使自动计算已经开启)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3565 +msgid "Archives" +msgstr "存档" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3590 +msgid "Update options" +msgstr "更新设置" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3591 +msgid "Reset options" +msgstr "重置设置" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2415 +msgid "XML-Sitemap Generator" +msgstr "XML-Sitemap 生成器" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2415 +msgid "XML-Sitemap" +msgstr "XML-Sitemap" + diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/lang/sitemap-zh_TW.mo Binary file web/wp-content/plugins/google-sitemap-generator/lang/sitemap-zh_TW.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/lang/sitemap-zh_TW.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/google-sitemap-generator/lang/sitemap-zh_TW.po Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,980 @@ +# [Countryname] Language File for sitemap (sitemap-[localname].po) +# Copyright (C) 2005 [name] : [URL] +# This file is distributed under the same license as the WordPress package. +# [name] <[mail-address]>, 2005. +# $Id: sitemap.pot 123431 2009-06-07 00:17:10Z arnee $ +# +msgid "" +msgstr "" +"Project-Id-Version: sitemap\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-06-07 01:15+0100\n" +"PO-Revision-Date: 2009-06-08 12:10+0800\n" +"Last-Translator: \n" +"Language-Team: hugo5688 \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-KeywordsList: _e;__\n" +"X-Poedit-Basepath: .\n" +"X-Poedit-SearchPath-0: H:\\Webdev\\htdocs\\wp_plugins\\sitemap_beta\n" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:846 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:642 +msgid "Comment Count" +msgstr "迴響數目" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:858 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:654 +msgid "Uses the number of comments of the post to calculate the priority" +msgstr "使用迴響的數量來計算優先權" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:918 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:714 +msgid "Comment Average" +msgstr "迴響平均值" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:930 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:726 +msgid "Uses the average comment count to calculate the priority" +msgstr "使用迴響數量平均值來計算優先權" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:993 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:789 +msgid "Popularity Contest" +msgstr "熱門競賽" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:1005 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:801 +msgid "Uses the activated Popularity Contest Plugin from Alex King. See Settings and Most Popular Posts" +msgstr "使用 Alex King 提供的 Popularity Contest 外掛(需啟用)。詳見 選項 以及Most Popular Posts" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-core.php:1118 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:1187 +msgid "Always" +msgstr "隨時" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-core.php:1119 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:1188 +msgid "Hourly" +msgstr "每小時" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-core.php:1120 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:1189 +msgid "Daily" +msgstr "每日" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-core.php:1121 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:1190 +msgid "Weekly" +msgstr "每週" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-core.php:1122 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:1191 +msgid "Monthly" +msgstr "每月" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-core.php:1123 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:1192 +msgid "Yearly" +msgstr "每年" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-core.php:1124 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:1193 +msgid "Never" +msgstr "從不" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2600 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:102 +msgid "Thank you very much for your donation. You help me to continue support and development of this plugin and other free software!" +msgstr "非常感謝您的贊助。由於您的幫助,讓我能夠繼續支援開發這個外掛以及其他免費軟體!" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2600 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:102 +msgid "Hide this notice" +msgstr "隱藏這個通知" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2657 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:108 +#, php-format +msgid "Thanks for using this plugin! You've installed this plugin over a month ago. If it works and your are satisfied with the results, isn't it worth at least one dollar? Donations help me to continue support and development of this free software! Sure, no problem!" +msgstr "感謝您使用此外掛!您已在一個月前安裝此外掛。如果它正常工作並讓您對於此結果感到安心,是不是至少價值一美元呢? 請贊助我來讓我有繼續開發及支援此免費 外掛軟體的動力。好的,沒問題!" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2657 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:108 +msgid "No thanks, please don't bug me anymore!" +msgstr "不了,請不要再煩我!" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:67 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:119 +msgid "Your sitemap is being refreshed at the moment. Depending on your blog size this might take some time!" +msgstr "您的網站地圖在此刻已開始更新。這完全取決於您的blog大小,或許會花上一點時間!" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:69 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:121 +#, php-format +msgid "Your sitemap will be refreshed in %s seconds. Depending on your blog size this might take some time!" +msgstr "您的網站地圖將會在%s秒鐘後更新。這完全取決於您的blog大小,或許會花上一點時間!" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2635 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2835 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:146 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:453 +msgid "XML Sitemap Generator for WordPress" +msgstr "WordPress 專用 XML 網站地圖產生器" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2740 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:298 +msgid "Configuration updated" +msgstr "設定已更新" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2741 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:299 +msgid "Error while saving options" +msgstr "儲存選項時產生錯誤" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2743 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:301 +msgid "Pages saved" +msgstr "頁面已儲存" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2744 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:302 +msgid "Error while saving pages" +msgstr "儲存頁面時產生錯誤" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2758 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:309 +msgid "The default configuration was restored." +msgstr "設定已重置為預設值。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:374 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:466 +#, php-format +msgid "There is a new version of %1$s available. Download version %3$s here." +msgstr "有較新的版本 %1$s 可供下載。下載版本 %3$s" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:376 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:468 +#, php-format +msgid "There is a new version of %1$s available. Download version %3$s here automatic upgrade unavailable for this plugin." +msgstr "有較新的版本 %1$s 可供下載。下載版本 %3$s 自動更新不可適用於此外掛程式。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:378 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:470 +#, php-format +msgid "There is a new version of %1$s available. Download version %3$s here or upgrade automatically." +msgstr "有較新的版本 %1$s 可供下載。下載版本 %3$s或者自動更新。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2851 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2868 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:493 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:510 +msgid "open" +msgstr "打開" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2852 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2869 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:494 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:511 +msgid "close" +msgstr "關閉" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2853 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2870 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:495 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:512 +msgid "click-down and drag to move this box" +msgstr "按下並拖曳這個矩形" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2854 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2871 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:496 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:513 +msgid "click to %toggle% this box" +msgstr "按了「%toggle%」這個矩形" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2855 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2872 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:497 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:514 +msgid "use the arrow keys to move this box" +msgstr "使用方向鍵移動這個矩形" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2856 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2873 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:498 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:515 +msgid ", or press the enter key to %toggle% it" +msgstr ",或者按下 Enter 鍵來「%toggle%」它" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2884 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:533 +msgid "About this Plugin:" +msgstr "關於這個外掛:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2886 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:534 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap.php:141 +msgid "Plugin Homepage" +msgstr "外掛首頁" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:421 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:535 +msgid "Suggest a Feature" +msgstr "功能推薦" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2887 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:536 +msgid "Notify List" +msgstr "郵件通知" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2888 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:537 +msgid "Support Forum" +msgstr "支援論壇" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:424 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:538 +msgid "Report a Bug" +msgstr "臭蟲回報" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2889 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:540 +msgid "Donate with PayPal" +msgstr "PayPal 贊助" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2890 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:541 +msgid "My Amazon Wish List" +msgstr "我的 Amazon 願望清單" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2891 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:542 +msgid "translator_name" +msgstr "Hugo5688" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2891 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:542 +msgid "translator_url" +msgstr "http://take-ez.com" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2895 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:545 +msgid "Sitemap Resources:" +msgstr "網站地圖資源:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2897 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:546 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:552 +msgid "Webmaster Tools" +msgstr "網站管理員工具" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2898 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:547 +msgid "Webmaster Blog" +msgstr "網站管理員網誌" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2900 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:549 +msgid "Site Explorer" +msgstr "Site Explorer" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2901 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:550 +msgid "Search Blog" +msgstr "Search Blog" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3010 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:553 +msgid "Webmaster Center Blog" +msgstr "網站管理員網誌" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2903 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:555 +msgid "Sitemaps Protocol" +msgstr "網站地圖通訊協定" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2904 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:556 +msgid "Official Sitemaps FAQ" +msgstr "官方版網站地圖答客問" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2905 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:557 +msgid "My Sitemaps FAQ" +msgstr "網站地圖答客問" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2910 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:560 +msgid "Recent Donations:" +msgstr "近期贊助清單:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2914 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:564 +msgid "List of the donors" +msgstr "贊助者清單" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2916 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:566 +msgid "Hide this list" +msgstr "隱藏本清單" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2919 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:569 +msgid "Thanks for your support!" +msgstr "感謝您的贊助!" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2931 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:587 +msgid "Status" +msgstr "狀態" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2941 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:595 +#, php-format +msgid "The sitemap wasn't built yet. Click here to build it the first time." +msgstr "您的網站地圖還沒產生過。點這裡來產生它吧。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2947 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:601 +msgid "Your sitemap was last built on %date%." +msgstr "您的網站地圖上次發佈時間為:%date%。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2949 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:603 +msgid "There was a problem writing your sitemap file. Make sure the file exists and is writable. Learn more更多資訊" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2956 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:610 +msgid "Your sitemap (zipped) was last built on %date%." +msgstr "網站地圖(壓縮檔)上回產生於:%date%。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2958 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:612 +msgid "There was a problem writing your zipped sitemap file. Make sure the file exists and is writable. Learn more更多資訊" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2964 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:618 +msgid "Google was successfully notified about changes." +msgstr "已經成功地通知 Google 您網站的更新。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2967 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:621 +msgid "It took %time% seconds to notify Google, maybe you want to disable this feature to reduce the building time." +msgstr "花了 %time% 秒來通知 Google,或許您想要關閉此功能來增加效能。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3011 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:624 +#, php-format +msgid "There was a problem while notifying Google. View result" +msgstr "通知 Google 時發生了問題。檢視結果" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2976 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:630 +msgid "YAHOO was successfully notified about changes." +msgstr "已經成功地通知 YAHOO 您網站的更新。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2979 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:633 +msgid "It took %time% seconds to notify YAHOO, maybe you want to disable this feature to reduce the building time." +msgstr "花了 %time% 秒來通知 YAHOO,或許您想要關閉此功能來增加效能。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3023 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:636 +#, php-format +msgid "There was a problem while notifying YAHOO. View result" +msgstr "通知 YAHOO 時發生了問題。檢視結果" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:642 +msgid "Bing was successfully notified about changes." +msgstr "已經成功地通知 Bing 您網站的更新。" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:645 +msgid "It took %time% seconds to notify Bing, maybe you want to disable this feature to reduce the building time." +msgstr "花了 %time% 秒來通知 Bing,或許您想要關閉此功能來增加效能。" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:648 +#, php-format +msgid "There was a problem while notifying Bing. View result" +msgstr "通知 Bing 時發生了問題。檢視結果" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2988 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:654 +msgid "Ask.com was successfully notified about changes." +msgstr "已經成功地通知 Ask.com 您網站的更新。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2991 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:657 +msgid "It took %time% seconds to notify Ask.com, maybe you want to disable this feature to reduce the building time." +msgstr "花了 %time% 秒來通知 Ask.com,或許您想要關閉此功能來增加效能。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3035 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:660 +#, php-format +msgid "There was a problem while notifying Ask.com. View result" +msgstr "通知 Ask.com 時發生了問題。檢視結果" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3002 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:668 +msgid "The building process took about %time% seconds to complete and used %memory% MB of memory." +msgstr "整個建置過程大約花費 %time% 秒 來完成,並且使用了 %memory% MB 的記憶體。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3004 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:670 +msgid "The building process took about %time% seconds to complete." +msgstr "整個建置過程大約花費 %time% 秒 來完成。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3008 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:674 +msgid "The content of your sitemap didn't change since the last time so the files were not written and no search engine was pinged." +msgstr "您的網站地圖內容與上次比較並沒有變更,所以沒有產生新檔案,而且搜尋引擎也沒有被通知。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:586 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:682 +msgid "The building process might still be active! Reload the page in a few seconds and check if something has changed." +msgstr "建立網站地圖的程序或許依然啟動著。頁面將在幾秒鐘後重新載入,並且確認是否改變。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3012 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:685 +msgid "The last run didn't finish! Maybe you can raise the memory or time limit for PHP scripts. Learn more" +msgstr "上次的執行並未結束!也許您需要替 PHP 增加記憶體或者時間限制。更多資訊" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3014 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:687 +msgid "The last known memory usage of the script was %memused%MB, the limit of your server is %memlimit%." +msgstr "最後一次執行本程式使用 %memused% MB 記憶體,您伺服器的限制為 %memlimit%。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3018 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:691 +msgid "The last known execution time of the script was %timeused% seconds, the limit of your server is %timelimit% seconds." +msgstr "最後一次執行本程式的時間花 %timeused% 秒,您伺服器的限制為 %timelimit% 秒。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3022 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:695 +msgid "The script stopped around post number %lastpost% (+/- 100)" +msgstr "這支程式大約停在第 %lastpost% (+/- 100)篇文章" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3025 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:698 +#, php-format +msgid "If you changed something on your server or blog, you should rebuild the sitemap manually." +msgstr "若是您對伺服器或者網誌做了某些更動,您應該手動重新產生網站地圖。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3027 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:700 +#, php-format +msgid "If you encounter any problems with the build process you can use the debug function to get more information." +msgstr "如果您在建立的過程遇到了問題,您可以使用除錯功能來得知更多的訊息。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3040 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:707 +msgid "Basic Options" +msgstr "基本選項" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3044 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:709 +msgid "Sitemap files:" +msgstr "網站地圖檔案:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3044 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3059 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3079 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3104 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3121 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:709 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:724 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:744 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:777 +msgid "Learn more" +msgstr "更多資訊" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3049 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:714 +msgid "Write a normal XML file (your filename)" +msgstr "寫入 XML 檔案(檔案名稱)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3055 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:720 +msgid "Write a gzipped file (your filename + .gz)" +msgstr "寫入壓縮檔(檔案名稱 + .gz)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3059 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:724 +msgid "Building mode:" +msgstr "產生模式:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3064 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:729 +msgid "Rebuild sitemap if you change the content of your blog" +msgstr "當修改網誌內容時重新建立網站地圖。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3071 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:736 +msgid "Enable manual sitemap building via GET Request" +msgstr "啟用透過發送 GET 要求手動建立網站地圖。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3075 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:740 +msgid "This will allow you to refresh your sitemap if an external tool wrote into the WordPress database without using the WordPress API. Use the following URL to start the process: %1 Please check the logfile above to see if sitemap was successfully built." +msgstr "本選項允許您刷新您的網站地圖。當您使用外部工具直接將文章寫入 WordPress 資料庫,而非透過 WordPress API 時,使用以下網址啟動這個作業: %1 若是要知道是否成功請檢查紀錄檔案。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3079 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:744 +msgid "Update notification:" +msgstr "更新通知:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3083 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:748 +msgid "Notify Google about updates of your Blog" +msgstr "通知 Google 關於您網站的更新" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3084 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:749 +#, php-format +msgid "No registration required, but you can join the Google Webmaster Tools to check crawling statistics." +msgstr "不需要註冊,但您可加入 Google 網站管理員工具來檢查搜索統計。" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:753 +msgid "Notify Bing (formerly MSN Live Search) about updates of your Blog" +msgstr "" +"通知 Bing (前身為 MSN Live Search\r\n" +") 關於您網站的更新" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:754 +#, php-format +msgid "No registration required, but you can join the Bing Webmaster Tools to check crawling statistics." +msgstr "不需要註冊,但您可加入 Bing 網站管理員工具來檢查搜索統計。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3088 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:758 +msgid "Notify Ask.com about updates of your Blog" +msgstr "通知 Ask.com 關於您網站的更新" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3089 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:759 +msgid "No registration required." +msgstr "不需要註冊。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3093 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:763 +msgid "Notify YAHOO about updates of your Blog" +msgstr "通知 YAHOO 關於您網站的更新" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3154 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:764 +msgid "Your Application ID:" +msgstr "您的應用程式 ID:" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:765 +#, php-format +msgid "Don't you have such a key? Request one here! %s2" +msgstr "您沒有像一個這樣的金鑰嗎? 請擊點此處申請! %s2" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:770 +msgid "Add sitemap URL to the virtual robots.txt file." +msgstr "在虛擬 robots.txt 檔案中加入網站地圖位址" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:774 +msgid "The virtual robots.txt generated by WordPress is used. A real robots.txt file must NOT exist in the blog directory!" +msgstr "此虛擬的 robots.txt 將會由 WordPress 來使用。真實的 robots.txt 不得存在於部落格的目錄中!" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3121 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:777 +msgid "Advanced options:" +msgstr "進階選項:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3124 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:780 +msgid "Limit the number of posts in the sitemap:" +msgstr "網站地圖裡文章數的最小值:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3124 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:780 +msgid "Newer posts will be included first" +msgstr "較新的文章將會優先包含" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3127 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:783 +msgid "Try to increase the memory limit to:" +msgstr "試著將記憶體限制增加至:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3127 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:783 +msgid "e.g. \"4M\", \"16M\"" +msgstr "例如:「4M」、「16M」" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3130 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:786 +msgid "Try to increase the execution time limit to:" +msgstr "試著將執行時間限制增加至:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3130 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:786 +msgid "in seconds, e.g. \"60\" or \"0\" for unlimited" +msgstr "以秒為單位,例如:「60」或者「0」則不限制" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3133 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:790 +msgid "Include a XSLT stylesheet:" +msgstr "包含 XSLT 樣式:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3133 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:791 +msgid "Full or relative URL to your .xsl file" +msgstr "您 .xsl 檔案的絕對或者相對路徑" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:791 +msgid "Use default" +msgstr "使用預設" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3152 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:797 +msgid "Enable MySQL standard mode. Use this only if you're getting MySQL errors. (Needs much more memory!)" +msgstr "啟用 MySQL 標準模式。當您發現有 MySQL 錯誤時,可以使用此選項。 (需要較多的記憶體!)" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:798 +msgid "Upgrade WordPress at least to 2.2 to enable the faster MySQL access" +msgstr "如要開啟較快的 MySQL 存取,請至少將 WordPress 升級成 2.2 版以上" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3166 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:805 +msgid "Build the sitemap in a background process (You don't have to wait when you save a post)" +msgstr "自動在背景程序中建立網站地圖 (當儲存文章時,您就不需再次產生網站地圖)" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:806 +msgid "Upgrade WordPress at least to 2.1 to enable background building" +msgstr "如要啟用背景建立網站地圖,請至少將 WordPress 升級成 2.1 版以上" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3144 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:813 +msgid "Additional pages" +msgstr "其他的頁面" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3149 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:816 +msgid "Here you can specify files or URLs which should be included in the sitemap, but do not belong to your Blog/WordPress.
    For example, if your domain is www.foo.com and your blog is located on www.foo.com/blog you might want to include your homepage at www.foo.com" +msgstr "您可以在此指定那些應被納入網站地圖的檔案或者網址,但是不屬於您的部落格(Blog/WordPress)。
    舉例來說,若是您的部落格是 www.foo.com/blog,而您想要將您 www.foo.com 下的網頁納入此網站地圖。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3151 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3462 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:818 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:997 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1011 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1020 +msgid "Note" +msgstr "注意" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3152 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:819 +msgid "If your blog is in a subdirectory and you want to add pages which are NOT in the blog directory or beneath, you MUST place your sitemap file in the root directory (Look at the "Location of your sitemap file" section on this page)!" +msgstr "若是您的部落格是在子目錄下而您想要增加的頁面並不在部落格的目錄下面,您必須將您的網站地圖置於網站的根目錄下。(請見本頁「網站地圖的位置」小節)!" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3154 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3300 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:821 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:860 +msgid "URL to the page" +msgstr "頁面網址" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3155 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:822 +msgid "Enter the URL to the page. Examples: http://www.foo.com/index.html or www.foo.com/home " +msgstr "輸入頁面的網址。例如:http://www.foo.com/index.html 或者 www.foo.com/home " + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3157 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3301 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:824 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:861 +msgid "Priority" +msgstr "優先權 " + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3158 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:825 +msgid "Choose the priority of the page relative to the other pages. For example, your homepage might have a higher priority than your imprint." +msgstr "選擇該頁面的優先權(相較於其他頁面而言)。例如:您的首頁或許會比版權說明頁的優先權來得高。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3160 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3303 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:827 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:863 +msgid "Last Changed" +msgstr "最近更動" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3161 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:828 +msgid "Enter the date of the last change as YYYY-MM-DD (2005-12-31 for example) (optional)." +msgstr "輸入最近更動的日期,格式為 YYYY-MM-DD(例如:2005-12-31)(非必要)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3302 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:862 +msgid "Change Frequency" +msgstr "設定更新頻率" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3304 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:864 +msgid "#" +msgstr "#" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3309 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:869 +msgid "No pages defined." +msgstr "還沒有頁面已被設定" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3314 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:874 +msgid "Add new page" +msgstr "新增頁面" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3325 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:879 +msgid "Post Priority" +msgstr "文章優先權 " + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3329 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:881 +msgid "Please select how the priority of each post should be calculated:" +msgstr "請選擇每篇文章應該用多少優先權來計算:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3331 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:883 +msgid "Do not use automatic priority calculation" +msgstr "不使用自動優先權計算" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3331 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:883 +msgid "All posts will have the same priority which is defined in "Priorities"" +msgstr "所有的文章使用相同定義在"優先權"內的優先權。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3348 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:894 +msgid "Location of your sitemap file" +msgstr "網站地圖的位置" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3353 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:897 +msgid "Automatic detection" +msgstr "自動位置" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3357 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:901 +msgid "Filename of the sitemap file" +msgstr "網站地圖的檔名" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3360 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:904 +msgid "Detected Path" +msgstr "偵測到的路徑" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3360 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:904 +msgid "Detected URL" +msgstr "偵測到的網址" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3365 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:909 +msgid "Custom location" +msgstr "自定位置" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3369 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:913 +msgid "Absolute or relative path to the sitemap file, including name." +msgstr "網站地圖的絕對或相對路徑,包括檔名。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3371 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3380 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:915 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:924 +msgid "Example" +msgstr "範例" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3378 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:922 +msgid "Complete URL to the sitemap file, including name." +msgstr "網站地圖的完整網址,包括檔名。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3397 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:935 +msgid "Sitemap Content" +msgstr "網站地圖內容" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3405 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:941 +msgid "Include homepage" +msgstr "包含首頁" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3411 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:947 +msgid "Include posts" +msgstr "包含文章" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:953 +msgid "Include following pages of multi-page posts (Increases build time and memory usage!)" +msgstr "包含下列頁面的分頁文章 (會增加建立時間及記憶體使用量!)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3417 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:959 +msgid "Include static pages" +msgstr "包含網誌分頁" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3423 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:965 +msgid "Include categories" +msgstr "包含分類" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3429 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:971 +msgid "Include archives" +msgstr "包含匯整" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3436 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:978 +msgid "Include tag pages" +msgstr "包含標籤頁面" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3443 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:985 +msgid "Include author pages" +msgstr "包含作者頁面" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:993 +msgid "Excluded items" +msgstr "排除的項目" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:995 +msgid "Excluded categories" +msgstr "排除的類型" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:997 +msgid "Using this feature will increase build time and memory usage!" +msgstr "使用此功能將會增加建立的時間及記憶體使用量!" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1004 +#, php-format +msgid "This feature requires at least WordPress 2.5.1, you are using %s" +msgstr "此功能至少需要 WordPress 2.5.1 版本,您目前使用的版本是 %s" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1007 +msgid "Exclude posts" +msgstr "包含文章" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3206 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1009 +msgid "Exclude the following posts or pages:" +msgstr "包含下列的文章或頁面:" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3206 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1009 +msgid "List of IDs, separated by comma" +msgstr "列出 IDs,以逗號區隔。" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1011 +msgid "Child posts won't be excluded automatically!" +msgstr "子文章不會自動包含!" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3457 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1017 +msgid "Change frequencies" +msgstr "更新頻率設定" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3463 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1021 +msgid "Please note that the value of this tag is considered a hint and not a command. Even though search engine crawlers consider this information when making decisions, they may crawl pages marked \"hourly\" less frequently than that, and they may crawl pages marked \"yearly\" more frequently than that. It is also likely that crawlers will periodically crawl pages marked \"never\" so that they can handle unexpected changes to those pages." +msgstr "請注意下列各設定值僅被視為提示而非命令。雖然搜尋引擎漫遊器會考慮這資訊做出決定,他們也許會較少漫遊被標記為「Hourly」的頁面,或者更加頻繁地漫遊被標記為「Yearly」的頁面。搜尋引擎漫遊機制會週期性地漫遊被標記為「Never」的頁面,以便他們能處理對那些頁面的變動。" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3469 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3535 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1027 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1084 +msgid "Homepage" +msgstr "首頁" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3475 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1033 +msgid "Posts" +msgstr "文章" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3481 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3553 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1039 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1102 +msgid "Static pages" +msgstr "網誌分頁" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3487 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3559 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1045 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1108 +msgid "Categories" +msgstr "分類" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3493 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1051 +msgid "The current archive of this month (Should be the same like your homepage)" +msgstr "現有的每月彙整(應該與您的首頁相同)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3499 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1057 +msgid "Older archives (Changes only if you edit an old post)" +msgstr "較舊的彙整(只有在您修改舊文章的時候才會改變)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3506 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3572 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1064 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1121 +msgid "Tag pages" +msgstr "標籤頁面" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3513 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3579 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1071 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1128 +msgid "Author pages" +msgstr "作者頁面" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3527 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1079 +msgid "Priorities" +msgstr "優先權" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3541 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1090 +msgid "Posts (If auto calculation is disabled)" +msgstr "文章(如果自動計算沒有打開)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3547 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1096 +msgid "Minimum post priority (Even if auto calculation is enabled)" +msgstr "優先權最小值(即使自動計算有打開)" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3565 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1114 +msgid "Archives" +msgstr "彙整" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3590 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1139 +msgid "Update options" +msgstr "更新選項" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3591 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1140 +msgid "Reset options" +msgstr "重置選項" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2415 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap.php:84 +msgid "XML-Sitemap Generator" +msgstr "XML 網站地圖產生器" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2415 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap.php:84 +msgid "XML-Sitemap" +msgstr "XML 網站地圖" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap.php:142 +msgid "Sitemap FAQ" +msgstr "網站地圖答客問" + diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/lang/sitemap.pot --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/google-sitemap-generator/lang/sitemap.pot Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,1036 @@ +# [Countryname] Language File for sitemap (sitemap-[localname].po) +# Copyright (C) 2005 [name] : [URL] +# This file is distributed under the same license as the WordPress package. +# [name] <[mail-address]>, 2005. +# $Id: sitemap.pot 175669 2009-11-20 21:55:02Z arnee $ +# +msgid "" +msgstr "" +"Project-Id-Version: sitemap\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2009-11-20 22:53+0100\n" +"PO-Revision-Date: 2009-11-20 22:53+0100\n" +"Last-Translator: Arne Brachhold\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-KeywordsList: _e;__\n" +"X-Poedit-Basepath: .\n" +"X-Poedit-SearchPath-0: H:\\Webdev\\htdocs\\wp_plugins\\sitemap_beta\n" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:846 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:525 +msgid "Comment Count" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:858 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:537 +msgid "Uses the number of comments of the post to calculate the priority" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:918 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:597 +msgid "Comment Average" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:930 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:609 +msgid "Uses the average comment count to calculate the priority" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:993 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:672 +msgid "Popularity Contest" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:1005 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:684 +msgid "Uses the activated Popularity Contest Plugin from Alex King. See Settings and Most Popular Posts" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-core.php:1118 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:1084 +msgid "Always" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-core.php:1119 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:1085 +msgid "Hourly" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-core.php:1120 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:1086 +msgid "Daily" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-core.php:1121 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:1087 +msgid "Weekly" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-core.php:1122 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:1088 +msgid "Monthly" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-core.php:1123 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:1089 +msgid "Yearly" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-core.php:1124 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-core.php:1090 +msgid "Never" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2600 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:107 +msgid "Thank you very much for your donation. You help me to continue support and development of this plugin and other free software!" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2600 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:107 +msgid "Hide this notice" +msgstr "" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:113 +#, php-format +msgid "Thanks for using this plugin! You've installed this plugin over a month ago. If it works and you are satisfied with the results, isn't it worth at least a few dollar? Donations help me to continue support and development of this free software! Sure, no problem!" +msgstr "" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:113 +msgid "Sure, but I already did!" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2657 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:113 +msgid "No thanks, please don't bug me anymore!" +msgstr "" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:120 +#, php-format +msgid "Thanks for using this plugin! You've installed this plugin some time ago. If it works and your are satisfied, why not rate it and recommend it to others? :-)" +msgstr "" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:120 +msgid "Don't show this anymore" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:67 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:132 +msgid "Your sitemap is being refreshed at the moment. Depending on your blog size this might take some time!" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:69 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:134 +#, php-format +msgid "Your sitemap will be refreshed in %s seconds. Depending on your blog size this might take some time!" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2635 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2835 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:163 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:480 +msgid "XML Sitemap Generator for WordPress" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2740 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:323 +msgid "Configuration updated" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2741 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:324 +msgid "Error while saving options" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2743 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:326 +msgid "Pages saved" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2744 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:327 +msgid "Error while saving pages" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2758 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:334 +msgid "The default configuration was restored." +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:374 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:496 +#, php-format +msgid "There is a new version of %1$s available. Download version %3$s here." +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:376 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:498 +#, php-format +msgid "There is a new version of %1$s available. Download version %3$s here automatic upgrade unavailable for this plugin." +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:378 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:500 +#, php-format +msgid "There is a new version of %1$s available. Download version %3$s here or upgrade automatically." +msgstr "" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:508 +#, php-format +msgid "Your blog is currently blocking search engines! Visit the privacy settings to change this." +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2851 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2868 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:529 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:546 +msgid "open" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2852 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2869 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:530 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:547 +msgid "close" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2853 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2870 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:531 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:548 +msgid "click-down and drag to move this box" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2854 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2871 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:532 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:549 +msgid "click to %toggle% this box" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2855 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2872 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:533 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:550 +msgid "use the arrow keys to move this box" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2856 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2873 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:534 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:551 +msgid ", or press the enter key to %toggle% it" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2884 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:580 +msgid "About this Plugin:" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2886 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:581 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap.php:181 +msgid "Plugin Homepage" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:421 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:582 +msgid "Suggest a Feature" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2887 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:583 +msgid "Notify List" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2888 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:584 +msgid "Support Forum" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:424 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:585 +msgid "Report a Bug" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2889 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:587 +msgid "Donate with PayPal" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2890 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:588 +msgid "My Amazon Wish List" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2891 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:589 +msgid "translator_name" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2891 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:589 +msgid "translator_url" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2895 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:593 +msgid "Sitemap Resources:" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2897 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:594 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:600 +msgid "Webmaster Tools" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2898 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:595 +msgid "Webmaster Blog" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2900 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:597 +msgid "Site Explorer" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2901 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:598 +msgid "Search Blog" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3010 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:601 +msgid "Webmaster Center Blog" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2903 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:603 +msgid "Sitemaps Protocol" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2904 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:604 +msgid "Official Sitemaps FAQ" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2905 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:605 +msgid "My Sitemaps FAQ" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2910 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:608 +msgid "Recent Donations:" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2914 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:611 +msgid "List of the donors" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2916 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:613 +msgid "Hide this list" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2919 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:616 +msgid "Thanks for your support!" +msgstr "" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:638 +msgid "The sitemap wasn't generated yet." +msgstr "" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:641 +msgid "Result of the last build process, started on %date%." +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2941 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:650 +#, php-format +msgid "The sitemap wasn't built yet. Click here to build it the first time." +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2947 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:656 +msgid "Your sitemap was last built on %date%." +msgstr "" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:657 +msgid "The last build succeeded, but the file was deleted later or can't be accessed anymore. Did you move your blog to another server or domain?" +msgstr "" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:659 +msgid "There was a problem writing your sitemap file. Make sure the file exists and is writable. Learn more" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2956 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:666 +msgid "Your sitemap (zipped) was last built on %date%." +msgstr "" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:667 +msgid "The last zipped build succeeded, but the file was deleted later or can't be accessed anymore. Did you move your blog to another server or domain?" +msgstr "" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:669 +msgid "There was a problem writing your zipped sitemap file. Make sure the file exists and is writable. Learn more" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2964 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:675 +msgid "Google was successfully notified about changes." +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2967 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:678 +msgid "It took %time% seconds to notify Google, maybe you want to disable this feature to reduce the building time." +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3011 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:681 +#, php-format +msgid "There was a problem while notifying Google. View result" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2976 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:687 +msgid "YAHOO was successfully notified about changes." +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2979 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:690 +msgid "It took %time% seconds to notify YAHOO, maybe you want to disable this feature to reduce the building time." +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3023 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:693 +#, php-format +msgid "There was a problem while notifying YAHOO. View result" +msgstr "" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:699 +msgid "Bing was successfully notified about changes." +msgstr "" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:702 +msgid "It took %time% seconds to notify Bing, maybe you want to disable this feature to reduce the building time." +msgstr "" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:705 +#, php-format +msgid "There was a problem while notifying Bing. View result" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2988 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:711 +msgid "Ask.com was successfully notified about changes." +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2991 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:714 +msgid "It took %time% seconds to notify Ask.com, maybe you want to disable this feature to reduce the building time." +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3035 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:717 +#, php-format +msgid "There was a problem while notifying Ask.com. View result" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3002 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:725 +msgid "The building process took about %time% seconds to complete and used %memory% MB of memory." +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3004 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:727 +msgid "The building process took about %time% seconds to complete." +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3008 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:731 +msgid "The content of your sitemap didn't change since the last time so the files were not written and no search engine was pinged." +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap-ui.php:586 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:739 +msgid "The building process might still be active! Reload the page in a few seconds and check if something has changed." +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3012 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:742 +msgid "The last run didn't finish! Maybe you can raise the memory or time limit for PHP scripts. Learn more" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3014 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:744 +msgid "The last known memory usage of the script was %memused%MB, the limit of your server is %memlimit%." +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3018 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:748 +msgid "The last known execution time of the script was %timeused% seconds, the limit of your server is %timelimit% seconds." +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3022 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:752 +msgid "The script stopped around post number %lastpost% (+/- 100)" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3025 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:755 +#, php-format +msgid "If you changed something on your server or blog, you should rebuild the sitemap manually." +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3027 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:757 +#, php-format +msgid "If you encounter any problems with the build process you can use the debug function to get more information." +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3040 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:764 +msgid "Basic Options" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3044 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:766 +msgid "Sitemap files:" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3044 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3059 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3079 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3104 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3121 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:766 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:781 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:801 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:834 +msgid "Learn more" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3049 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:771 +msgid "Write a normal XML file (your filename)" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3055 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:777 +msgid "Write a gzipped file (your filename + .gz)" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3059 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:781 +msgid "Building mode:" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3064 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:786 +msgid "Rebuild sitemap if you change the content of your blog" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3071 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:793 +msgid "Enable manual sitemap building via GET Request" +msgstr "" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:797 +msgid "This will allow you to refresh your sitemap if an external tool wrote into the WordPress database without using the WordPress API. Use the following URL to start the process: %1 Please check the result box above to see if sitemap was successfully built." +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3079 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:801 +msgid "Update notification:" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3083 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:805 +msgid "Notify Google about updates of your Blog" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3084 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:806 +#, php-format +msgid "No registration required, but you can join the Google Webmaster Tools to check crawling statistics." +msgstr "" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:810 +msgid "Notify Bing (formerly MSN Live Search) about updates of your Blog" +msgstr "" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:811 +#, php-format +msgid "No registration required, but you can join the Bing Webmaster Tools to check crawling statistics." +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3088 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:815 +msgid "Notify Ask.com about updates of your Blog" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3089 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:816 +msgid "No registration required." +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3093 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:820 +msgid "Notify YAHOO about updates of your Blog" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3154 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:821 +msgid "Your Application ID:" +msgstr "" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:822 +#, php-format +msgid "Don't you have such a key? Request one here! %s2" +msgstr "" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:827 +msgid "Add sitemap URL to the virtual robots.txt file." +msgstr "" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:831 +msgid "The virtual robots.txt generated by WordPress is used. A real robots.txt file must NOT exist in the blog directory!" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3121 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:834 +msgid "Advanced options:" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3124 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:837 +msgid "Limit the number of posts in the sitemap:" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3124 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:837 +msgid "Newer posts will be included first" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3127 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:840 +msgid "Try to increase the memory limit to:" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3127 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:840 +msgid "e.g. \"4M\", \"16M\"" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3130 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:843 +msgid "Try to increase the execution time limit to:" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3130 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:843 +msgid "in seconds, e.g. \"60\" or \"0\" for unlimited" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3133 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:847 +msgid "Include a XSLT stylesheet:" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3133 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:848 +msgid "Full or relative URL to your .xsl file" +msgstr "" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:848 +msgid "Use default" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3152 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:854 +msgid "Enable MySQL standard mode. Use this only if you're getting MySQL errors. (Needs much more memory!)" +msgstr "" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:855 +msgid "Upgrade WordPress at least to 2.2 to enable the faster MySQL access" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3166 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:862 +msgid "Build the sitemap in a background process (You don't have to wait when you save a post)" +msgstr "" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:863 +msgid "Upgrade WordPress at least to 2.1 to enable background building" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3144 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:870 +msgid "Additional pages" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3149 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:873 +msgid "Here you can specify files or URLs which should be included in the sitemap, but do not belong to your Blog/WordPress.
    For example, if your domain is www.foo.com and your blog is located on www.foo.com/blog you might want to include your homepage at www.foo.com" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3151 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3462 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:875 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1083 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1097 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1106 +msgid "Note" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3152 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:876 +msgid "If your blog is in a subdirectory and you want to add pages which are NOT in the blog directory or beneath, you MUST place your sitemap file in the root directory (Look at the "Location of your sitemap file" section on this page)!" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3154 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3300 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:878 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:917 +msgid "URL to the page" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3155 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:879 +msgid "Enter the URL to the page. Examples: http://www.foo.com/index.html or www.foo.com/home " +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3157 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3301 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:881 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:918 +msgid "Priority" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3158 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:882 +msgid "Choose the priority of the page relative to the other pages. For example, your homepage might have a higher priority than your imprint." +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3160 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3303 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:884 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:920 +msgid "Last Changed" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3161 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:885 +msgid "Enter the date of the last change as YYYY-MM-DD (2005-12-31 for example) (optional)." +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3302 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:919 +msgid "Change Frequency" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3304 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:921 +msgid "#" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3309 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:926 +msgid "No pages defined." +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3314 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:931 +msgid "Add new page" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3325 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:936 +msgid "Post Priority" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3329 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:938 +msgid "Please select how the priority of each post should be calculated:" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3331 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:940 +msgid "Do not use automatic priority calculation" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3331 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:940 +msgid "All posts will have the same priority which is defined in "Priorities"" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3348 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:951 +msgid "Location of your sitemap file" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3353 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:954 +msgid "Automatic detection" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3357 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:958 +msgid "Filename of the sitemap file" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3360 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:961 +msgid "Detected Path" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3360 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:961 +msgid "Detected URL" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3365 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:966 +msgid "Custom location" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3369 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:970 +msgid "Absolute or relative path to the sitemap file, including name." +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3371 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3380 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:972 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:981 +msgid "Example" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3378 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:979 +msgid "Complete URL to the sitemap file, including name." +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3397 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:992 +msgid "Sitemap Content" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3405 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:998 +msgid "Include homepage" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3411 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1004 +msgid "Include posts" +msgstr "" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1010 +msgid "Include following pages of multi-page posts (Increases build time and memory usage!)" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3417 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1016 +msgid "Include static pages" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3423 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1022 +msgid "Include categories" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3429 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1028 +msgid "Include archives" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3436 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1035 +msgid "Include tag pages" +msgstr "" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1051 +#, php-format +msgid "Include taxonomy pages for %s" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3443 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1061 +msgid "Include author pages" +msgstr "" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1065 +msgid "Further options" +msgstr "" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1070 +msgid "Include the last modification time." +msgstr "" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1072 +msgid "This is highly recommended and helps the search engines to know when your content has changed. This option affects all sitemap entries." +msgstr "" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1079 +msgid "Excluded items" +msgstr "" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1081 +msgid "Excluded categories" +msgstr "" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1083 +msgid "Using this feature will increase build time and memory usage!" +msgstr "" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1090 +#, php-format +msgid "This feature requires at least WordPress 2.5.1, you are using %s" +msgstr "" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1093 +msgid "Exclude posts" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3206 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1095 +msgid "Exclude the following posts or pages:" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3206 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1095 +msgid "List of IDs, separated by comma" +msgstr "" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1097 +msgid "Child posts won't be excluded automatically!" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3457 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1103 +msgid "Change frequencies" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3463 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1107 +msgid "Please note that the value of this tag is considered a hint and not a command. Even though search engine crawlers consider this information when making decisions, they may crawl pages marked \"hourly\" less frequently than that, and they may crawl pages marked \"yearly\" more frequently than that. It is also likely that crawlers will periodically crawl pages marked \"never\" so that they can handle unexpected changes to those pages." +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3469 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3535 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1113 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1170 +msgid "Homepage" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3475 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1119 +msgid "Posts" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3481 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3553 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1125 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1188 +msgid "Static pages" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3487 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3559 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1131 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1194 +msgid "Categories" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3493 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1137 +msgid "The current archive of this month (Should be the same like your homepage)" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3499 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1143 +msgid "Older archives (Changes only if you edit an old post)" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3506 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3572 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1150 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1207 +msgid "Tag pages" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3513 +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3579 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1157 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1214 +msgid "Author pages" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3527 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1165 +msgid "Priorities" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3541 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1176 +msgid "Posts (If auto calculation is disabled)" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3547 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1182 +msgid "Minimum post priority (Even if auto calculation is enabled)" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3565 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1200 +msgid "Archives" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3590 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1225 +msgid "Update options" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:3591 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap-ui.php:1226 +msgid "Reset options" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2415 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap.php:95 +msgid "XML-Sitemap Generator" +msgstr "" + +# C:\Inetpub\wwwroot\wp\wp-content\plugins\sitemap_beta/sitemap.php:2415 +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap.php:95 +msgid "XML-Sitemap" +msgstr "" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap.php:109 +msgid "Settings" +msgstr "" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap.php:110 +msgid "FAQ" +msgstr "" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap.php:111 +msgid "Support" +msgstr "" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap.php:112 +msgid "Donate" +msgstr "" + +#: H:\Webdev\htdocs\wp_plugins\sitemap_beta/sitemap.php:182 +msgid "Sitemap FAQ" +msgstr "" + diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/readme-ar_AR.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/google-sitemap-generator/readme-ar_AR.txt Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,37 @@ +=== صانع خريطة الموقع لبرنامج ووردبريس === + + +المطورون: Arne, Michael, Rodney, Hirosama, James, John, Brad, Christian +ترجمة: سوار - http://www.sewar.be/wordpress/plugins/sitemap/ + +هذه الأداة ستشئ خريطة لموقعك متوافقة مع محرك البحث google لمدونة ووردبريس الخاصة بك. حالياً يتم إضافة الصفحة الرئيسية, التدوينات, الصفحات, التصنيفات و الأرشيف إلى الخريطة آلياً. أفضلية التدوينة تعتمد على عدد التعليقات عليها. تعليقات أكثر, أفضلية أعلى! إذا كان لديك صفحات خارجية لا تنتمي إلى مدونتك, تستطيع أيضاً إضافتهم إلى الخريطة. هذه الأداة ستخبر Google تلقائياً عندما يتم إعادة إنشاء خريطة الموقع. + +== التثبيت == + +1. ارفع المجلد بالكامل إلى مجلد wp-content/plugins في موقعك، يكفي رفع الملفات التالية: sitemap.php و sitemap-ar.mo لكي تعمل الإضافة باللغة العربية. +2. إجعل مجلد مدونتك الرئيسي قابل للكتابة أو إنشأ ملفين و سمهم: sitemap.xml و sitemap.xml.gz و أجعلهم قابلين للكتابة. +2. فعل الإضافة من لوحة تحكم مدونتك. +3. حرر أو إنشر تدوينة أو إضغط على زر "إعادة إنشاء خريطة الموقع" في إعدادات خريطة الموقع. + +== الأسئلة المتكررة == + += لا يوجد في مدونتي تعليقات (أو قمت بإلغائهم) و جميع تدويناتي لديها الأفضلية صفر! = +قم بتعطل حساب الأفضلية الآلية و حدد أفضلية ثابتة للتدوينات! + += هل يجب علي دائماً الضغط على زر "إعادة إنشاء خريطة الموقع" إذا قمت بتعديل تدوينة? = +A: لا! إذا قمت بتحرير أو نشر أو حذف تدوينة, سيتم إعادة إنشاء خريطة موقعك تلقائياً! + += الإعدادات كثيرة جداً … هل يجب عليّ تغييرهم كلهم? = +A: لا! فقط إذا أردت ذلك. الإعدادات الإفتراضية مناسبة! + += ما هي الإصدارات التي تعمل عليها هذه الإضافة في ووردبريس? = +A: هذه الإضافة تعمل على الإصدارة 1.5.1.1 و الإصدارات الأحدث بما في ذلك الإصدارة 2.0. بعض المستخدمين حصلت لهم مشاكل في الإصدارة 1.5. يجب أن تحدث مدونتك إلى آخر إصدار من برنامج ووردبريس لأنه يتضمن أيضاً على إغلاق ثغرات خطيرة. + += ظهرت لي رسالة خطأ "fopen error" و / أو "permission denied" = +A: إذا ظهرت لك أخطاء في الصلاحيات تأكد من إعدادات خريطة الموقع في لوحة التحكم. حاول أن تنشئ ملفين باسم sitemap.xml و sitemap.xml.gz يدوياً ثم أرفعهم إلى موقعك و غير الصلاحيات "CHMOD" إلى 666. ثم أعد إنشاء خارطة الموقع من لوحة التحكم. يوجد درس رائع لطريقة تغيير صلاحيات ملف تستطيع إيجاده في ووردبريس كوديكس. + += ما هي إصدارات قاعدة البيانات MySQL المدعومة? = +A: جميع إصدارات MySQL 4 تعمل, دعم إصدار MySQL 3 أضيف في الإصدارة 2.12 من هذه الإضافة. + += هل أنا أحتاج حقاً إلى إستخدام هذه الأداة? = +ربما لا إذا كان Google يعرف موقعك جيداً و يزوره يومياً. إذا لم يكن كذلك, ستكون أداة جيدة لإعلام Google بموقعك و التحديثات التي طرأت عليه. هذا سيجعل Google يحدث الصفحة فقط إذا تطلب الأمر ذلك و سوف يجعلك تحافظ على الـ Bandwith. diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/readme-it_IT.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/google-sitemap-generator/readme-it_IT.txt Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,36 @@ +=== Google Sitemap Generator per WordPress === + +Tag: wordpress, sitemap, google, plugin +Contributi: Arne, Michael, Rodney, Hirosama, James, John, Brad, Christian + +Questo generatore crea una mappa del vostro blog WordPress (sitemap) secondo le specifiche di Google. Attualmente vengono gestiti la homepage, gli articoli, le pagine statiche, le categorie e gli archivi. La priorit degli articoli dipende dai loro commenti. Pi commenti, maggiore priorit! Se si hanno pagine esterne che non appartngono al blog, queste pagine possono venir incluse all'elenco. Questo plugin eseguira una notifica automatica a Google ogni qualvolta la sitemap viene rigenerata. + +== Installzione == + +1. Caricare tutti i file nella directory wp-content/plugins +2. Rendere la directory del blog scrivibile OPPURE creare due file denominati sitemap.xml e sitemap.xml.gz e renderli scrivibili tramite CHMOD. Nella maggior pate dei casi la direcotry del vostro blog gi scrivibile. +2. Attivare il plugin tramite il pannello di controllo Plugin +3. Modificare o pubblicare un articolo o fare click su Ricostruisci la Sitemap nel pannello di amministrazione Sitemap nella sezione Opzioni + +== FAQ == + += Non ho commenti (o sono disabilitati) e tutti i miei articoli hanno priorit zero! = +A: Disabilitare il calcolo automatico della priorit e definire una priorit statica per gli articoli! + += Devo far sempre click su "Ricostruisci la Sitemap" se modifico un articolo? = +A: No! Quando si modifica/pubblica/cancella un articolo la sitemap viene rigenerata automaticamente! + += Ci sono cos tante opzioni Devo cambiarle per forza? = +A: No! Solo se lo desiderate. I valori predfiniti dovrebbero gi essere ok! + += Funziona con tutte le versioni di WordPress? = +A: Spiacente, l'ho provata solo con la 1.5.1.1. Alcuni utenti hanno segnalato problemi con Wordpress 1.5. COnsiderate la possibilit di un aggiornamento del vostro blog alla Versione corrente di WordPress che contiene inoltre anche "un importante aggiornamento di sicurezza". + += Ottengo un fopen error e/o permesso negato = +A: Se ottenete un errore sui permessi assicuratevi che lo script abbia i diritti di scrittura sulla directory del vostro blog. Provate a creare manualmente i file sitemap.xml e sitemap.xml.gz e a caricarli con un programma ftp impostando i diritti di scrittura tramite CHMOD. Quindi riavviate la generazione della sitemap dalla pagina di amministrazione. Un valida guida per modificare i permessi si trova sul Codex di WordPress. + += Quale versione di MySQL supportata? = +A: MySQL 4 funziona con tutte le versioni, il supporto a MySQL 3 stato aggiunto nella versione 2.12 + += Devo usare per forza questo plugin? = +No se Google conosce bene il vostro blog e lo visita ogni giorno. Se non accade questo un ottimo metodo per informare Google riguardo alle vostre pagine ed i loro ultimi cambiamenti. Ci fa si che Google aggiorni le pagine solo se necessario dandovi un certo risparmio di banda. diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/readme.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/google-sitemap-generator/readme.txt Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,82 @@ +=== Google XML Sitemaps === +Contributors: arnee +Donate link: http://www.arnebrachhold.de/redir/sitemap-paypal +Tags: seo, google, sitemaps, google sitemaps, yahoo, msn, ask, live, xml sitemap, xml +Requires at least: 2.1 +Tested up to: 2.9 +Stable tag: 3.1.9 + +This plugin will generate a special XML sitemap which will help search engines to better index your blog. + +== Description == + +This plugin will generate a special XML sitemap which will help search engines like Google, Bing, Yahoo and Ask.com to better index your blog. With such a sitemap, it's much easier for the crawlers to see the complete structure of your site and retrieve it more efficiently. The plugin supports all kinds of WordPress generated pages as well as custom URLs. Additionally it notifies all major search engines every time you create a post about the new content. + +Related Links: + +* Plugin Homepage +* Changelog +* Plugin and sitemaps FAQ +* Support Forum + +*This release is compatible with all WordPress versions since 2.1. If you are still using an older one, use version 2.7.1 instead.* + +== Installation == + +1. Upload the full directory into your wp-content/plugins directory +2. Use your favorite FTP program to create two files in your WordPress directory (that's where the wp-config.php is) named sitemap.xml and sitemap.xml.gz and make them writable via CHMOD 666. More information about CHMOD and how to make files writable is available at the [WordPress Codex](http://codex.wordpress.org/Changing_File_Permissions) and on [stadtaus.com](http://www.stadtaus.com/en/tutorials/chmod-ftp-file-permissions.php). Making your whole blog directory writable is NOT recommended anymore due to security reasons. +4. Activate the plugin at the plugin administration page +5. Open the plugin configuration page, which is located under Options -> XML-Sitemap and build the sitemap the first time. If you get a permission error, check the file permissions of the newly created files. +6. The plugin will automatically update your sitemap of you publish a post, so theres nothing more to do :) + +== Frequently Asked Questions == + += There are no comments yet (or I've disabled them) and all my postings have a priority of zero! = + +Please disable automatic priority calculation and define a static priority for posts. + += Do I always have to click on "Rebuild Sitemap" if I modified a post? = + +No, if you edit/publish/delete a post, your sitemap is automatically regenerated + += So much configuration options... Do I need to change them? = + +No, only if you want to. Default values should be ok! + += Does this plugin work with all WordPress versions? = + +This version works with WordPress 2.1 and better. If you're using an older version, please check the [Google Sitemaps Plugin Homepage](http://www.arnebrachhold.de/projects/wordpress-plugins/google-xml-sitemaps-generator/ "Google (XML) Sitemap Generator Plugin Homepage") for the legacy releases. There is a working release for every WordPress version since 1.5 + += I get an fopen and / or permission denied error or my sitemap files could not be written = + +If you get permission errors, make sure that the script has the right to overwrite the sitemap.xml and sitemap.xml.gz files. Try to create the sitemap.xml resp. sitemap.xml.gz at manually and upload them with a ftp program and set the rights with CHMOD to 666 (or 777 if 666 still doesn't work). Then restart sitemap generation on the administration page. A good tutorial for changing file permissions can be found on the [WordPress Codex](http://codex.wordpress.org/Changing_File_Permissions) and at [stadtaus.com](http://www.stadtaus.com/en/tutorials/chmod-ftp-file-permissions.php). + += My question isn't answered here = + +Most of the plugin options are described at the [plugin homepage](http://www.arnebrachhold.de/projects/wordpress-plugins/google-xml-sitemaps-generator/) as well as the dedicated [Google Sitemap FAQ](http://www.arnebrachhold.de/2006/04/07/google-sitemaps-faq-sitemap-issues-errors-and-problems/ "List of common questions / problems regarding Google (XML) Sitemaps") + += My question isn't even answered there = + +Please post your question at the [WordPress support forum](http://wordpress.org/tags/google-sitemap-generator?forum_id=10) and tag your post with "google-sitemap-generator". + += What's new in the latest version? = + +The changelog is maintained on [here](http://www.arnebrachhold.de/projects/wordpress-plugins/google-xml-sitemaps-generator/changelog/ "Google (XML) Sitemap Generator Plugin Changelog") + +== Changelog == + +Until it appears here, the changelog is maintained on [the plugin website](http://www.arnebrachhold.de/projects/wordpress-plugins/google-xml-sitemaps-generator/changelog/ "Google (XML) Sitemap Generator Plugin Changelog") + +== Screenshots == + +1. Administration interface in WordPress 2.7 +2. Administration interface in WordPress 2.5 +3. Administration interface in WordPress 2.0 + +== License == + +Good news, this plugin is free for everyone! Since it's released under the GPL, you can use it free of charge on your personal or commercial blog. But if you enjoy this plugin, you can thank me and leave a [small donation](http://www.arnebrachhold.de/redir/sitemap-paypal "Donate with PayPal") for the time I've spent writing and supporting this plugin. And I really don't want to know how many hours of my life this plugin has already eaten ;) + +== Translations == + +The plugin comes with various translations, please refer to the [WordPress Codex](http://codex.wordpress.org/Installing_WordPress_in_Your_Language "Installing WordPress in Your Language") for more information about activating the translation. If you want to help to translate the plugin to your language, please have a look at the sitemap.pot file which contains all definitions and may be used with a [gettext](http://www.gnu.org/software/gettext/) editor like [Poedit](http://www.poedit.net/) (Windows). \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/screenshot-1.gif Binary file web/wp-content/plugins/google-sitemap-generator/screenshot-1.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/screenshot-2.gif Binary file web/wp-content/plugins/google-sitemap-generator/screenshot-2.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/screenshot-3.gif Binary file web/wp-content/plugins/google-sitemap-generator/screenshot-3.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/sitemap-core.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/google-sitemap-generator/sitemap-core.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,2590 @@ +_startTime = $this->GetMicrotimeFloat(); + + $exists = get_option("sm_status"); + + if($exists === false) add_option("sm_status","","Status","no"); + + $this->Save(); + } + + function Save() { + update_option("sm_status",$this); + } + + /** + * Returns the last saved status object or null + * + * @return GoogleSitemapGeneratorStatus + */ + function Load() { + $status = @get_option("sm_status"); + if(is_a($status,"GoogleSitemapGeneratorStatus")) return $status; + else return null; + } + + /** + * @var float $_startTime The start time of the building process + * @access private + */ + var $_startTime = 0; + + /** + * @var float $_endTime The end time of the building process + * @access private + */ + var $_endTime = 0; + + /** + * @var bool $$_hasChanged Indicates if the sitemap content has changed + * @access private + */ + var $_hasChanged = true; + + /** + * @var int $_memoryUsage The amount of memory used in bytes + * @access private + */ + var $_memoryUsage = 0; + + /** + * @var int $_lastPost The number of posts processed. This value is updated every 50 posts. + * @access private + */ + var $_lastPost = 0; + + /** + * @var int $_lastTime The time when the last step-update occured. This value is updated every 50 posts. + * @access private + */ + var $_lastTime = 0; + + function End($hasChanged = true) { + $this->_endTime = $this->GetMicrotimeFloat(); + + $this->SetMemoryUsage(); + + $this->_hasChanged = $hasChanged; + + $this->Save(); + } + + function SetMemoryUsage() { + if(function_exists("memory_get_peak_usage")) { + $this->_memoryUsage = memory_get_peak_usage(true); + } else if(function_exists("memory_get_usage")) { + $this->_memoryUsage = memory_get_usage(true); + } + } + + function GetMemoryUsage() { + return round($this->_memoryUsage / 1024 / 1024,2); + } + + function SaveStep($postCount) { + $this->SetMemoryUsage(); + $this->_lastPost = $postCount; + $this->_lastTime = $this->GetMicrotimeFloat(); + + $this->Save(); + } + + function GetTime() { + return round($this->_endTime - $this->_startTime,2); + } + + function GetStartTime() { + return round($this->_startTime, 2); + } + + function GetLastTime() { + return round($this->_lastTime - $this->_startTime,2); + } + + function GetLastPost() { + return $this->_lastPost; + } + + var $_usedXml = false; + var $_xmlSuccess = false; + var $_xmlPath = ''; + var $_xmlUrl = ''; + + function StartXml($path,$url) { + $this->_usedXml = true; + $this->_xmlPath = $path; + $this->_xmlUrl = $url; + + $this->Save(); + } + + function EndXml($success) { + $this->_xmlSuccess = $success; + + $this->Save(); + } + + + var $_usedZip = false; + var $_zipSuccess = false; + var $_zipPath = ''; + var $_zipUrl = ''; + + function StartZip($path,$url) { + $this->_usedZip = true; + $this->_zipPath = $path; + $this->_zipUrl = $url; + + $this->Save(); + } + + function EndZip($success) { + $this->_zipSuccess = $success; + + $this->Save(); + } + + var $_usedGoogle = false; + var $_googleUrl = ''; + var $_gooogleSuccess = false; + var $_googleStartTime = 0; + var $_googleEndTime = 0; + + function StartGooglePing($url) { + $this->_googleUrl = $url; + $this->_usedGoogle = true; + $this->_googleStartTime = $this->GetMicrotimeFloat(); + + $this->Save(); + } + + function EndGooglePing($success) { + $this->_googleEndTime = $this->GetMicrotimeFloat(); + $this->_gooogleSuccess = $success; + + $this->Save(); + } + + function GetGoogleTime() { + return round($this->_googleEndTime - $this->_googleStartTime,2); + } + + var $_usedYahoo = false; + var $_yahooUrl = ''; + var $_yahooSuccess = false; + var $_yahooStartTime = 0; + var $_yahooEndTime = 0; + + function StartYahooPing($url) { + $this->_yahooUrl = $url; + $this->_usedYahoo = true; + $this->_yahooStartTime = $this->GetMicrotimeFloat(); + + $this->Save(); + } + + function EndYahooPing($success) { + $this->_yahooEndTime = $this->GetMicrotimeFloat(); + $this->_yahooSuccess = $success; + + $this->Save(); + } + + function GetYahooTime() { + return round($this->_yahooEndTime - $this->_yahooStartTime,2); + } + + var $_usedAsk = false; + var $_askUrl = ''; + var $_askSuccess = false; + var $_askStartTime = 0; + var $_askEndTime = 0; + + function StartAskPing($url) { + $this->_usedAsk = true; + $this->_askUrl = $url; + $this->_askStartTime = $this->GetMicrotimeFloat(); + + $this->Save(); + } + + function EndAskPing($success) { + $this->_askEndTime = $this->GetMicrotimeFloat(); + $this->_askSuccess = $success; + + $this->Save(); + } + + function GetAskTime() { + return round($this->_askEndTime - $this->_askStartTime,2); + } + + var $_usedMsn = false; + var $_msnUrl = ''; + var $_msnSuccess = false; + var $_msnStartTime = 0; + var $_msnEndTime = 0; + + function StartMsnPing($url) { + $this->_usedMsn = true; + $this->_msnUrl = $url; + $this->_msnStartTime = $this->GetMicrotimeFloat(); + + $this->Save(); + } + + function EndMsnPing($success) { + $this->_msnEndTime = $this->GetMicrotimeFloat(); + $this->_msnSuccess = $success; + + $this->Save(); + } + + function GetMsnTime() { + return round($this->_msnEndTime - $this->_msnStartTime,2); + } + + function GetMicrotimeFloat() { + list($usec, $sec) = explode(" ", microtime()); + return ((float)$usec + (float)$sec); + } + } + +/** + * Represents an item in the page list + * @author Arne Brachhold + * @package sitemap + * @since 3.0 + */ +class GoogleSitemapGeneratorPage { + + /** + * @var string $_url Sets the URL or the relative path to the blog dir of the page + * @access private + */ + var $_url; + + /** + * @var float $_priority Sets the priority of this page + * @access private + */ + var $_priority; + + /** + * @var string $_changeFreq Sets the chanfe frequency of the page. I want Enums! + * @access private + */ + var $_changeFreq; + + /** + * @var int $_lastMod Sets the lastMod date as a UNIX timestamp. + * @access private + */ + var $_lastMod; + + /** + * Initialize a new page object + * + * @since 3.0 + * @access public + * @author Arne Brachhold + * @param bool $enabled Should this page be included in thesitemap + * @param string $url The URL or path of the file + * @param float $priority The Priority of the page 0.0 to 1.0 + * @param string $changeFreq The change frequency like daily, hourly, weekly + * @param int $lastMod The last mod date as a unix timestamp + */ + function GoogleSitemapGeneratorPage($url="",$priority=0.0,$changeFreq="never",$lastMod=0) { + $this->SetUrl($url); + $this->SetProprity($priority); + $this->SetChangeFreq($changeFreq); + $this->SetLastMod($lastMod); + } + + /** + * Returns the URL of the page + * + * @return string The URL + */ + function GetUrl() { + return $this->_url; + } + + /** + * Sets the URL of the page + * + * @param string $url The new URL + */ + function SetUrl($url) { + $this->_url=(string) $url; + } + + /** + * Returns the priority of this page + * + * @return float the priority, from 0.0 to 1.0 + */ + function GetPriority() { + return $this->_priority; + } + + /** + * Sets the priority of the page + * + * @param float $priority The new priority from 0.1 to 1.0 + */ + function SetProprity($priority) { + $this->_priority=floatval($priority); + } + + /** + * Returns the change frequency of the page + * + * @return string The change frequncy like hourly, weekly, monthly etc. + */ + function GetChangeFreq() { + return $this->_changeFreq; + } + + /** + * Sets the change frequency of the page + * + * @param string $changeFreq The new change frequency + */ + function SetChangeFreq($changeFreq) { + $this->_changeFreq=(string) $changeFreq; + } + + /** + * Returns the last mod of the page + * + * @return int The lastmod value in seconds + */ + function GetLastMod() { + return $this->_lastMod; + } + + /** + * Sets the last mod of the page + * + * @param int $lastMod The lastmod of the page + */ + function SetLastMod($lastMod) { + $this->_lastMod=intval($lastMod); + } + + function Render() { + + if($this->_url == "/" || empty($this->_url)) return ''; + + $r=""; + $r.= "\t\n"; + $r.= "\t\t" . $this->EscapeXML($this->_url) . "\n"; + if($this->_lastMod>0) $r.= "\t\t" . date('Y-m-d\TH:i:s+00:00',$this->_lastMod) . "\n"; + if(!empty($this->_changeFreq)) $r.= "\t\t" . $this->_changeFreq . "\n"; + if($this->_priority!==false && $this->_priority!=="") $r.= "\t\t" . number_format($this->_priority,1) . "\n"; + $r.= "\t\n"; + return $r; + } + + function EscapeXML($string) { + return str_replace ( array ( '&', '"', "'", '<', '>'), array ( '&' , '"', ''' , '<' , '>'), $string); + } +} + +class GoogleSitemapGeneratorXmlEntry { + + var $_xml; + + function GoogleSitemapGeneratorXmlEntry($xml) { + $this->_xml = $xml; + } + + function Render() { + return $this->_xml; + } +} + +class GoogleSitemapGeneratorDebugEntry extends GoogleSitemapGeneratorXmlEntry { + + function Render() { + return "\n"; + } +} + +/** + * Base class for all priority providers + * @author Arne Brachhold + * @package sitemap + * @since 3.0 + */ +class GoogleSitemapGeneratorPrioProviderBase { + + /** + * @var int $_totalComments The total number of comments of all posts + * @access protected + */ + var $_totalComments=0; + + /** + * @var int $_totalComments The total number of posts + * @access protected + */ + var $_totalPosts=0; + + /** + * Returns the (translated) name of this priority provider + * + * @since 3.0 + * @access public + * @author Arne Brachhold + * @return string The translated name + */ + function GetName() { + return ""; + } + + /** + * Returns the (translated) description of this priority provider + * + * @since 3.0 + * @access public + * @author Arne Brachhold + * @return string The translated description + */ + function GetDescription() { + return ""; + } + + /** + * Initializes a new priority provider + * + * @param $totalComments int The total number of comments of all posts + * @param $totalPosts int The total number of posts + * @since 3.0 + * @access public + * @author Arne Brachhold + */ + function GoogleSitemapGeneratorPrioProviderBase($totalComments,$totalPosts) { + $this->_totalComments=$totalComments; + $this->_totalPosts=$totalPosts; + + } + + /** + * Returns the priority for a specified post + * + * @param $postID int The ID of the post + * @param $commentCount int The number of comments for this post + * @since 3.0 + * @access public + * @author Arne Brachhold + * @return int The calculated priority + */ + function GetPostPriority($postID,$commentCount) { + return 0; + } +} + +/** + * Priority Provider which calculates the priority based on the number of comments + * @author Arne Brachhold + * @package sitemap + * @since 3.0 + */ +class GoogleSitemapGeneratorPrioByCountProvider extends GoogleSitemapGeneratorPrioProviderBase { + + /** + * Returns the (translated) name of this priority provider + * + * @since 3.0 + * @access public + * @author Arne Brachhold + * @return string The translated name + */ + function GetName() { + return __("Comment Count",'sitemap'); + } + + /** + * Returns the (translated) description of this priority provider + * + * @since 3.0 + * @access public + * @author Arne Brachhold + * @return string The translated description + */ + function GetDescription() { + return __("Uses the number of comments of the post to calculate the priority",'sitemap'); + } + + /** + * Initializes a new priority provider which calculates the post priority based on the number of comments + * + * @param $totalComments int The total number of comments of all posts + * @param $totalPosts int The total number of posts + * @since 3.0 + * @access public + * @author Arne Brachhold + */ + function GoogleSitemapGeneratorPrioByCountProvider($totalComments,$totalPosts) { + parent::GoogleSitemapGeneratorPrioProviderBase($totalComments,$totalPosts); + } + + /** + * Returns the priority for a specified post + * + * @param $postID int The ID of the post + * @param $commentCount int The number of comments for this post + * @since 3.0 + * @access public + * @author Arne Brachhold + * @return int The calculated priority + */ + function GetPostPriority($postID,$commentCount) { + $prio=0; + if($this->_totalComments>0 && $commentCount>0) { + $prio = round(($commentCount*100/$this->_totalComments)/100,1); + } else { + $prio = 0; + } + return $prio; + } +} + +/** + * Priority Provider which calculates the priority based on the average number of comments + * @author Arne Brachhold + * @package sitemap + * @since 3.0 + */ +class GoogleSitemapGeneratorPrioByAverageProvider extends GoogleSitemapGeneratorPrioProviderBase { + + /** + * @var int $_average The average number of comments per post + * @access protected + */ + var $_average=0.0; + + /** + * Returns the (translated) name of this priority provider + * + * @since 3.0 + * @access public + * @author Arne Brachhold + * @return string The translated name + */ + function GetName() { + return __("Comment Average",'sitemap'); + } + + /** + * Returns the (translated) description of this priority provider + * + * @since 3.0 + * @access public + * @author Arne Brachhold + * @return string The translated description + */ + function GetDescription() { + return __("Uses the average comment count to calculate the priority",'sitemap'); + } + + /** + * Initializes a new priority provider which calculates the post priority based on the average number of comments + * + * @param $totalComments int The total number of comments of all posts + * @param $totalPosts int The total number of posts + * @since 3.0 + * @access public + * @author Arne Brachhold + */ + function GoogleSitemapGeneratorPrioByAverageProvider($totalComments,$totalPosts) { + parent::GoogleSitemapGeneratorPrioProviderBase($totalComments,$totalPosts); + + if($this->_totalComments>0 && $this->_totalPosts>0) { + $this->_average= (double) $this->_totalComments / $this->_totalPosts; + } + } + + /** + * Returns the priority for a specified post + * + * @param $postID int The ID of the post + * @param $commentCount int The number of comments for this post + * @since 3.0 + * @access public + * @author Arne Brachhold + * @return int The calculated priority + */ + function GetPostPriority($postID,$commentCount) { + $prio = 0; + //Do not divide by zero! + if($this->_average==0) { + if($commentCount>0) $prio = 1; + else $prio = 0; + } else { + $prio = $commentCount/$this->_average; + if($prio>1) $prio = 1; + else if($prio<0) $prio = 0; + } + + return round($prio,1); + } +} + +/** + * Priority Provider which calculates the priority based on the popularity by the PopularityContest Plugin + * @author Arne Brachhold + * @package sitemap + * @since 3.0 + */ +class GoogleSitemapGeneratorPrioByPopularityContestProvider extends GoogleSitemapGeneratorPrioProviderBase { + + /** + * Returns the (translated) name of this priority provider + * + * @since 3.0 + * @access public + * @author Arne Brachhold + * @return string The translated name + */ + function GetName() { + return __("Popularity Contest",'sitemap'); + } + + /** + * Returns the (translated) description of this priority provider + * + * @since 3.0 + * @access public + * @author Arne Brachhold + * @return string The translated description + */ + function GetDescription() { + return str_replace("%4","index.php?page=popularity-contest.php",str_replace("%3","options-general.php?page=popularity-contest.php",str_replace("%2","http://www.alexking.org/",str_replace("%1","http://www.alexking.org/index.php?content=software/wordpress/content.php",__("Uses the activated Popularity Contest Plugin from Alex King. See Settings and Most Popular Posts",'sitemap'))))); + } + + /** + * Initializes a new priority provider which calculates the post priority based on the popularity by the PopularityContest Plugin + * + * @param $totalComments int The total number of comments of all posts + * @param $totalPosts int The total number of posts + * @since 3.0 + * @access public + * @author Arne Brachhold + */ + function GoogleSitemapGeneratorPrioByPopularityContestProvider($totalComments,$totalPosts) { + parent::GoogleSitemapGeneratorPrioProviderBase($totalComments,$totalPosts); + } + + /** + * Returns the priority for a specified post + * + * @param $postID int The ID of the post + * @param $commentCount int The number of comments for this post + * @since 3.0 + * @access public + * @author Arne Brachhold + * @return int The calculated priority + */ + function GetPostPriority($postID,$commentCount) { + //$akpc is the global instance of the Popularity Contest Plugin + global $akpc,$posts; + + $res=0; + //Better check if its there + if(!empty($akpc) && is_object($akpc)) { + //Is the method we rely on available? + if(method_exists($akpc,"get_post_rank")) { + if(!is_array($posts) || !$posts) $posts = array(); + if(!isset($posts[$postID])) $posts[$postID] = get_post($postID); + //popresult comes as a percent value + $popresult=$akpc->get_post_rank($postID); + if(!empty($popresult) && strpos($popresult,"%")!==false) { + //We need to parse it to get the priority as an int (percent) + $matches=null; + preg_match("/([0-9]{1,3})\%/si",$popresult,$matches); + if(!empty($matches) && is_array($matches) && count($matches)==2) { + //Divide it so 100% = 1, 10% = 0.1 + $res=round(intval($matches[1])/100,1); + } + } + } + } + return $res; + } +} + +/** + * Class to generate a sitemaps.org Sitemaps compliant sitemap of a WordPress blog. + * + * @package sitemap + * @author Arne Brachhold + * @since 3.0 +*/ +class GoogleSitemapGenerator { + /** + * @var Version of the generator in SVN + */ + var $_svnVersion = '$Id: sitemap-core.php 175664 2009-11-20 21:21:09Z arnee $'; + + /** + * @var array The unserialized array with the stored options + */ + var $_options = array(); + + /** + * @var array The saved additional pages + */ + var $_pages = array(); + + /** + * @var array The values and names of the change frequencies + */ + var $_freqNames = array(); + + /** + * @var array A list of class names which my be called for priority calculation + */ + var $_prioProviders = array(); + + /** + * @var bool True if init complete (options loaded etc) + */ + var $_initiated = false; + + /** + * @var string Holds the last error if one occurs when writing the files + */ + var $_lastError=null; + + /** + * @var int The last handled post ID + */ + var $_lastPostID = 0; + + /** + * @var bool Defines if the sitemap building process is active at the moment + */ + var $_isActive = false; + + /** + * @var bool Defines if the sitemap building process has been scheduled via Wp cron + */ + var $_isScheduled = false; + + /** + * @var object The file handle which is used to write the sitemap file + */ + var $_fileHandle = null; + + /** + * @var object The file handle which is used to write the zipped sitemap file + */ + var $_fileZipHandle = null; + + /** + * Holds the user interface object + * + * @since 3.1.1 + * @var GoogleSitemapGeneratorUI + */ + var $_ui = null; + + /** + * Returns the path to the blog directory + * + * @since 3.0 + * @access private + * @author Arne Brachhold + * @return string The full path to the blog directory + */ + function GetHomePath() { + + $res=""; + //Check if we are in the admin area -> get_home_path() is avaiable + if(function_exists("get_home_path")) { + $res = get_home_path(); + } else { + //get_home_path() is not available, but we can't include the admin + //libraries because many plugins check for the "check_admin_referer" + //function to detect if you are on an admin page. So we have to copy + //the get_home_path function in our own... + $home = get_option( 'home' ); + if ( $home != '' && $home != get_option( 'siteurl' ) ) { + $home_path = parse_url( $home ); + $home_path = $home_path['path']; + $root = str_replace( $_SERVER["PHP_SELF"], '', $_SERVER["SCRIPT_FILENAME"] ); + $home_path = trailingslashit( $root.$home_path ); + } else { + $home_path = ABSPATH; + } + + $res = $home_path; + } + return $res; + } + + /** + * Returns the path to the directory where the plugin file is located + * @since 3.0b5 + * @access private + * @author Arne Brachhold + * @return string The path to the plugin directory + */ + function GetPluginPath() { + $path = dirname(__FILE__); + return trailingslashit(str_replace("\\","/",$path)); + } + + /** + * Returns the URL to the directory where the plugin file is located + * @since 3.0b5 + * @access private + * @author Arne Brachhold + * @return string The URL to the plugin directory + */ + function GetPluginUrl() { + + //Try to use WP API if possible, introduced in WP 2.6 + if (function_exists('plugins_url')) return trailingslashit(plugins_url(basename(dirname(__FILE__)))); + + //Try to find manually... can't work if wp-content was renamed or is redirected + $path = dirname(__FILE__); + $path = str_replace("\\","/",$path); + $path = trailingslashit(get_bloginfo('wpurl')) . trailingslashit(substr($path,strpos($path,"wp-content/"))); + return $path; + } + + /** + * Returns the URL to default XSLT style if it exists + * @since 3.0b5 + * @access private + * @author Arne Brachhold + * @return string The URL to the default stylesheet, empty string if not available. + */ + function GetDefaultStyle() { + $p = $this->GetPluginPath(); + if(file_exists($p . "sitemap.xsl")) { + $url = $this->GetPluginUrl(); + //If called over the admin area using HTTPS, the stylesheet would also be https url, even if the blog frontend is not. + if(substr(get_bloginfo('url'),0,5) !="https" && substr($url,0,5)=="https") $url="http" . substr($url,5); + return $url . 'sitemap.xsl'; + } + return ''; + } + + /** + * Sets up the default configuration + * + * @since 3.0 + * @access private + * @author Arne Brachhold + */ + function InitOptions() { + + $this->_options=array(); + $this->_options["sm_b_prio_provider"]="GoogleSitemapGeneratorPrioByCountProvider"; //Provider for automatic priority calculation + $this->_options["sm_b_filename"]="sitemap.xml"; //Name of the Sitemap file + $this->_options["sm_b_debug"]=true; //Write debug messages in the xml file + $this->_options["sm_b_xml"]=true; //Create a .xml file + $this->_options["sm_b_gzip"]=true; //Create a gzipped .xml file(.gz) file + $this->_options["sm_b_ping"]=true; //Auto ping Google + $this->_options["sm_b_pingyahoo"]=false; //Auto ping YAHOO + $this->_options["sm_b_yahookey"]=''; //YAHOO Application Key + $this->_options["sm_b_pingask"]=true; //Auto ping Ask.com + $this->_options["sm_b_pingmsn"]=true; //Auto ping MSN + $this->_options["sm_b_manual_enabled"]=false; //Allow manual creation of the sitemap via GET request + $this->_options["sm_b_auto_enabled"]=true; //Rebuild sitemap when content is changed + $this->_options["sm_b_auto_delay"]=true; //Use WP Cron to execute the building process in the background + $this->_options["sm_b_manual_key"]=md5(microtime());//The secret key to build the sitemap via GET request + $this->_options["sm_b_memory"] = ''; //Set Memory Limit (e.g. 16M) + $this->_options["sm_b_time"] = -1; //Set time limit in seconds, 0 for unlimited, -1 for disabled + $this->_options["sm_b_max_posts"] = -1; //Maximum number of posts, <= 0 for all + $this->_options["sm_b_safemode"] = false; //Enable MySQL Safe Mode (doesn't use unbuffered results) + $this->_options["sm_b_style_default"] = true; //Use default style + $this->_options["sm_b_style"] = ''; //Include a stylesheet in the XML + $this->_options["sm_b_robots"] = true; //Add sitemap location to WordPress' virtual robots.txt file + $this->_options["sm_b_exclude"] = array(); //List of post / page IDs to exclude + $this->_options["sm_b_exclude_cats"] = array(); //List of post / page IDs to exclude + $this->_options["sm_b_location_mode"]="auto"; //Mode of location, auto or manual + $this->_options["sm_b_filename_manual"]=""; //Manuel filename + $this->_options["sm_b_fileurl_manual"]=""; //Manuel fileurl + + $this->_options["sm_in_home"]=true; //Include homepage + $this->_options["sm_in_posts"]=true; //Include posts + $this->_options["sm_in_posts_sub"]=false; //Include post pages ( tag) + $this->_options["sm_in_pages"]=true; //Include static pages + $this->_options["sm_in_cats"]=false; //Include categories + $this->_options["sm_in_arch"]=false; //Include archives + $this->_options["sm_in_auth"]=false; //Include author pages + $this->_options["sm_in_tags"]=false; //Include tag pages + $this->_options["sm_in_tax"]=array(); //Include additional taxonomies + $this->_options["sm_in_lastmod"]=true; //Include the last modification date + + $this->_options["sm_cf_home"]="daily"; //Change frequency of the homepage + $this->_options["sm_cf_posts"]="monthly"; //Change frequency of posts + $this->_options["sm_cf_pages"]="weekly"; //Change frequency of static pages + $this->_options["sm_cf_cats"]="weekly"; //Change frequency of categories + $this->_options["sm_cf_auth"]="weekly"; //Change frequency of author pages + $this->_options["sm_cf_arch_curr"]="daily"; //Change frequency of the current archive (this month) + $this->_options["sm_cf_arch_old"]="yearly"; //Change frequency of older archives + $this->_options["sm_cf_tags"]="weekly"; //Change frequency of tags + + $this->_options["sm_pr_home"]=1.0; //Priority of the homepage + $this->_options["sm_pr_posts"]=0.6; //Priority of posts (if auto prio is disabled) + $this->_options["sm_pr_posts_min"]=0.2; //Minimum Priority of posts, even if autocalc is enabled + $this->_options["sm_pr_pages"]=0.6; //Priority of static pages + $this->_options["sm_pr_cats"]=0.3; //Priority of categories + $this->_options["sm_pr_arch"]=0.3; //Priority of archives + $this->_options["sm_pr_auth"]=0.3; //Priority of author pages + $this->_options["sm_pr_tags"]=0.3; //Priority of tags + + $this->_options["sm_i_donated"]=false; //Did you donate? Thank you! :) + $this->_options["sm_i_hide_donated"]=false; //And hide the thank you.. + $this->_options["sm_i_install_date"]=time(); //The installation date + $this->_options["sm_i_hide_note"]=false; //Hide the note which appears after 30 days + $this->_options["sm_i_hide_works"]=false; //Hide the "works?" message which appears after 15 days + $this->_options["sm_i_hide_donors"]=false; //Hide the list of donations + } + + /** + * Loads the configuration from the database + * + * @since 3.0 + * @access private + * @author Arne Brachhold + */ + function LoadOptions() { + + $this->InitOptions(); + + //First init default values, then overwrite it with stored values so we can add default + //values with an update which get stored by the next edit. + $storedoptions=get_option("sm_options"); + if($storedoptions && is_array($storedoptions)) { + foreach($storedoptions AS $k=>$v) { + $this->_options[$k]=$v; + } + } else update_option("sm_options",$this->_options); //First time use, store default values + } + + /** + * Initializes a new Google Sitemap Generator + * + * @since 3.0 + * @access private + * @author Arne Brachhold + */ + function GoogleSitemapGenerator() { + + + + + } + + /** + * Returns the version of the generator + * + * @since 3.0 + * @access public + * @author Arne Brachhold + * @return int The version + */ + function GetVersion() { + return GoogleSitemapGeneratorLoader::GetVersion(); + } + + /** + * Returns all parent classes of a class + * + * @param $className string The name of the class + * + * @since 3.0 + * @access private + * @author Arne Brachhold + * @return array An array which contains the names of the parent classes + */ + function GetParentClasses($classname) { + $parent = get_parent_class($classname); + $parents = array(); + if (!empty($parent)) { + $parents = $this->GetParentClasses($parent); + $parents[] = strtolower($parent); + } + return $parents; + } + + /** + * Returns if a class is a subclass of another class + * + * @param $className string The name of the class + * @param $$parentName string The name of the parent class + * + * @since 3.0 + * @access private + * @author Arne Brachhold + * @return bool true if the given class is a subclass of the other one + */ + function IsSubclassOf($className, $parentName) { + + $className = strtolower($className); + $parentName = strtolower($parentName); + + if(empty($className) || empty($parentName) || !class_exists($className) || !class_exists($parentName)) return false; + + $parents=$this->GetParentClasses($className); + + return in_array($parentName,$parents); + } + + /** + * Loads up the configuration and validates the prioity providers + * + * This method is only called if the sitemaps needs to be build or the admin page is displayed. + * + * @since 3.0 + * @access private + * @author Arne Brachhold + */ + function Initate() { + if(!$this->_initiated) { + + //Loading language file... + //load_plugin_textdomain('sitemap'); + //Hmm, doesn't work if the plugin file has its own directory. + //Let's make it our way... load_plugin_textdomain() searches only in the wp-content/plugins dir. + $currentLocale = get_locale(); + if(!empty($currentLocale)) { + $moFile = dirname(__FILE__) . "/lang/sitemap-" . $currentLocale . ".mo"; + if(@file_exists($moFile) && is_readable($moFile)) load_textdomain('sitemap', $moFile); + } + + $this->_freqNames = array( + "always"=>__("Always","sitemap"), + "hourly"=>__("Hourly","sitemap"), + "daily"=>__("Daily","sitemap"), + "weekly"=>__("Weekly","sitemap"), + "monthly"=>__("Monthly","sitemap"), + "yearly"=>__("Yearly","sitemap"), + "never"=>__("Never","sitemap") + ); + + + $this->LoadOptions(); + $this->LoadPages(); + + //Register our own priority providers + add_filter("sm_add_prio_provider",array(&$this, 'AddDefaultPrioProviders')); + + //Let other plugins register their providers + $r = apply_filters("sm_add_prio_provider",$this->_prioProviders); + + //Check if no plugin return null + if($r != null) $this->_prioProviders = $r; + + $this->ValidatePrioProviders(); + + $this->_initiated = true; + } + } + + /** + * Returns the instance of the Sitemap Generator + * + * @since 3.0 + * @access public + * @return GoogleSitemapGenerator The instance or null if not available. + * @author Arne Brachhold + */ + function &GetInstance() { + if(isset($GLOBALS["sm_instance"])) { + return $GLOBALS["sm_instance"]; + } else return null; + } + + /** + * Returns if the sitemap building process is currently active + * + * @since 3.0 + * @access public + * @return bool true if active + * @author Arne Brachhold + */ + function IsActive() { + $inst = &GoogleSitemapGenerator::GetInstance(); + return ($inst != null && $inst->_isActive); + } + + /** + * Returns if the compressed sitemap was activated + * + * @since 3.0b8 + * @access private + * @author Arne Brachhold + * @return true if compressed + */ + function IsGzipEnabled() { + return ($this->GetOption("b_gzip")===true && function_exists("gzwrite")); + } + + /** + * Returns if this version of WordPress supports the new taxonomy system + * + * @since 3.0b8 + * @access private + * @author Arne Brachhold + * @return true if supported + */ + function IsTaxonomySupported() { + return (function_exists("get_taxonomy") && function_exists("get_terms")); + } + + /** + * Returns the list of custom taxonies. These are basically all taxonomies without categories and post tags + * + * @since 3.1.7 + * @return array Array of names of user-defined taxonomies + */ + function GetCustomTaxonomies() { + $taxonomies = get_object_taxonomies('post'); + return array_diff($taxonomies,array("category","post_tag")); + } + + /** + * Enables the Google Sitemap Generator and registers the WordPress hooks + * + * @since 3.0 + * @access public + * @author Arne Brachhold + */ + function Enable() { + if(!isset($GLOBALS["sm_instance"])) { + $GLOBALS["sm_instance"]=new GoogleSitemapGenerator(); + } + } + + /** + * Checks if sitemap building after content changed is enabled and rebuild the sitemap + * + * @param int $postID The ID of the post to handle. Used to avoid double rebuilding if more than one hook was fired. + * @param bool $external Added in 3.1.9. Skips checking of b_auto_enabled if set to true + * @since 3.0 + * @access public + * @author Arne Brachhold + */ + function CheckForAutoBuild($postID, $external = false) { + global $wp_version; + $this->Initate(); + //Build one time per post and if not importing. + if((($this->GetOption("b_auto_enabled")===true && $this->_lastPostID != $postID) || $external) && (!defined('WP_IMPORTING') || WP_IMPORTING != true)) { + + //Build the sitemap directly or schedule it with WP cron + if($this->GetOption("b_auto_delay")==true && floatval($wp_version) >= 2.1) { + if(!$this->_isScheduled) { + //Schedule in 15 seconds, this should be enough to catch all changes. + //Clear all other existing hooks, so the sitemap is only built once. + wp_clear_scheduled_hook('sm_build_cron'); + wp_schedule_single_event(time()+15,'sm_build_cron'); + $this->_isScheduled = true; + } + } else { + //Build sitemap only once and never in bulk mode + if(!$this->_lastPostID && (!isset($_GET["delete"]) || count((array) $_GET['delete'])<=0)) { + $this->BuildSitemap(); + } + } + $this->_lastPostID = $postID; + } + } + + /** + * Builds the sitemap by external request, for example other plugins. + * + * @since 3.1.9 + * @return null + */ + function BuildNowRequest() { + $this->CheckForAutoBuild(null, true); + } + + /** + * Checks if the rebuild request was send and starts to rebuilt the sitemap + * + * @since 3.0 + * @access public + * @author Arne Brachhold + */ + function CheckForManualBuild() { + if(!empty($_GET["sm_command"]) && !empty($_GET["sm_key"])) { + $this->Initate(); + if($this->GetOption("b_manual_enabled")===true && $_GET["sm_command"]=="build" && $_GET["sm_key"]==$this->GetOption("b_manual_key")) { + $this->BuildSitemap(); + echo "DONE"; + exit; + } + } + } + + /** + * Validates all given Priority Providers by checking them for required methods and existence + * + * @since 3.0 + * @access private + * @author Arne Brachhold + */ + function ValidatePrioProviders() { + $validProviders=array(); + + for($i=0; $i_prioProviders); $i++) { + if(class_exists($this->_prioProviders[$i])) { + if($this->IsSubclassOf($this->_prioProviders[$i],"GoogleSitemapGeneratorPrioProviderBase")) { + array_push($validProviders,$this->_prioProviders[$i]); + } + } + } + $this->_prioProviders=$validProviders; + + if(!$this->GetOption("b_prio_provider")) { + if(!in_array($this->GetOption("b_prio_provider"),$this->_prioProviders,true)) { + $this->SetOption("b_prio_provider",""); + } + } + } + + /** + * Adds the default Priority Providers to the provider list + * + * @since 3.0 + * @access private + * @author Arne Brachhold + */ + function AddDefaultPrioProviders($providers) { + array_push($providers,"GoogleSitemapGeneratorPrioByCountProvider"); + array_push($providers,"GoogleSitemapGeneratorPrioByAverageProvider"); + if(class_exists("ak_popularity_contest")) { + array_push($providers,"GoogleSitemapGeneratorPrioByPopularityContestProvider"); + } + return $providers; + } + + /** + * Loads the stored pages from the database + * + * @since 3.0 + * @access private + * @author Arne Brachhold + */ + function LoadPages() { + global $wpdb; + + $needsUpdate=false; + + $pagesString=$wpdb->get_var("SELECT option_value FROM $wpdb->options WHERE option_name = 'sm_cpages'"); + + //Class sm_page was renamed with 3.0 -> rename it in serialized value for compatibility + if(!empty($pagesString) && strpos($pagesString,"sm_page")!==false) { + $pagesString = str_replace("O:7:\"sm_page\"","O:26:\"GoogleSitemapGeneratorPage\"",$pagesString); + $needsUpdate=true; + } + + if(!empty($pagesString)) { + $storedpages=unserialize($pagesString); + $this->_pages=$storedpages; + } else { + $this->_pages=array(); + } + + if($needsUpdate) $this->SavePages(); + } + + /** + * Saved the additional pages back to the database + * + * @since 3.0 + * @access private + * @author Arne Brachhold + * @return true on success + */ + function SavePages() { + $oldvalue = get_option("sm_cpages"); + if($oldvalue == $this->_pages) { + return true; + } else { + delete_option("sm_cpages"); + //Add the option, Note the autoload=false because when the autoload happens, our class GoogleSitemapGeneratorPage doesn't exist + add_option("sm_cpages",$this->_pages,"Storage for custom pages of the sitemap plugin","no"); + return true; + } + } + + + /** + * Returns the URL for the sitemap file + * + * @since 3.0 + * @access private + * @author Arne Brachhold + * @param bool $forceAuto Force the return value to the autodetected value. + * @return The URL to the Sitemap file + */ + function GetXmlUrl($forceAuto=false) { + + if(!$forceAuto && $this->GetOption("b_location_mode")=="manual") { + return $this->GetOption("b_fileurl_manual"); + } else { + return trailingslashit(get_bloginfo('siteurl')). $this->GetOption("b_filename"); + } + } + + /** + * Returns the URL for the gzipped sitemap file + * + * @since 3.0 + * @access private + * @author Arne Brachhold + * @param bool $forceAuto Force the return value to the autodetected value. + * @return The URL to the gzipped Sitemap file + */ + function GetZipUrl($forceAuto=false) { + return $this->GetXmlUrl($forceAuto) . ".gz"; + } + + /** + * Returns the file system path to the sitemap file + * + * @since 3.0 + * @access private + * @author Arne Brachhold + * @param bool $forceAuto Force the return value to the autodetected value. + * @return The file system path; + */ + function GetXmlPath($forceAuto=false) { + if(!$forceAuto && $this->GetOption("b_location_mode")=="manual") { + return $this->GetOption("b_filename_manual"); + } else { + return $this->GetHomePath() . $this->GetOption("b_filename"); + } + } + + /** + * Returns the file system path to the gzipped sitemap file + * + * @since 3.0 + * @access private + * @author Arne Brachhold + * @param bool $forceAuto Force the return value to the autodetected value. + * @return The file system path; + */ + function GetZipPath($forceAuto=false) { + return $this->GetXmlPath($forceAuto) . ".gz"; + } + + /** + * Returns the option value for the given key + * + * @since 3.0 + * @access private + * @author Arne Brachhold + * @param $key string The Configuration Key + * @return mixed The value + */ + function GetOption($key) { + $key="sm_" . $key; + if(array_key_exists($key,$this->_options)) { + return $this->_options[$key]; + } else return null; + } + + /** + * Sets an option to a new value + * + * @since 3.0 + * @access private + * @author Arne Brachhold + * @param $key string The configuration key + * @param $value mixed The new object + */ + function SetOption($key,$value) { + if(strstr($key,"sm_")!==0) $key="sm_" . $key; + + $this->_options[$key]=$value; + } + + /** + * Saves the options back to the database + * + * @since 3.0 + * @access private + * @author Arne Brachhold + * @return bool true on success + */ + function SaveOptions() { + $oldvalue = get_option("sm_options"); + if($oldvalue == $this->_options) { + return true; + } else return update_option("sm_options",$this->_options); + } + + /** + * Retrieves the number of comments of a post in a asso. array + * The key is the postID, the value the number of comments + * + * @since 3.0 + * @access private + * @author Arne Brachhold + * @return array An array with postIDs and their comment count + */ + function GetComments() { + global $wpdb; + $comments=array(); + + //Query comments and add them into the array + $commentRes=$wpdb->get_results("SELECT `comment_post_ID` as `post_id`, COUNT(comment_ID) as `comment_count` FROM `" . $wpdb->comments . "` WHERE `comment_approved`='1' GROUP BY `comment_post_ID`"); + if($commentRes) { + foreach($commentRes as $comment) { + $comments[$comment->post_id]=$comment->comment_count; + } + } + return $comments; + } + + /** + * Calculates the full number of comments from an sm_getComments() generated array + * + * @since 3.0 + * @access private + * @author Arne Brachhold + * @param $comments array The Array with posts and c0mment count + * @see sm_getComments + * @return The full number of comments + */ + function GetCommentCount($comments) { + $commentCount=0; + foreach($comments AS $k=>$v) { + $commentCount+=$v; + } + return $commentCount; + } + + /** + * Adds a url to the sitemap. You can use this method or call AddElement directly. + * + * @since 3.0 + * @access public + * @author Arne Brachhold + * @param $loc string The location (url) of the page + * @param $lastMod int The last Modification time as a UNIX timestamp + * @param $changeFreq string The change frequenty of the page, Valid values are "always", "hourly", "daily", "weekly", "monthly", "yearly" and "never". + * @param $priorty float The priority of the page, between 0.0 and 1.0 + * @see AddElement + * @return string The URL node + */ + function AddUrl($loc, $lastMod = 0, $changeFreq = "monthly", $priority = 0.5) { + //Strip out the last modification time if activated + if($this->GetOption('in_lastmod')===false) $lastMod = 0; + $page = new GoogleSitemapGeneratorPage($loc, $priority, $changeFreq, $lastMod); + + $this->AddElement($page); + } + + /** + * Adds an element to the sitemap + * + * @since 3.0 + * @access private + * @author Arne Brachhold + * @param $page The element + */ + function AddElement(&$page) { + if(empty($page)) return; + + $s = $page->Render(); + + if($this->_fileZipHandle && $this->IsGzipEnabled()) { + gzwrite($this->_fileZipHandle,$s); + } + + if($this->_fileHandle && $this->GetOption("b_xml")) { + fwrite($this->_fileHandle,$s); + } + } + + /** + * Checks if a file is writable and tries to make it if not. + * + * @since 3.05b + * @access private + * @author VJTD3 + * @return bool true if writable + */ + function IsFileWritable($filename) { + //can we write? + if(!is_writable($filename)) { + //no we can't. + if(!@chmod($filename, 0666)) { + $pathtofilename = dirname($filename); + //Lets check if parent directory is writable. + if(!is_writable($pathtofilename)) { + //it's not writeable too. + if(!@chmod($pathtoffilename, 0666)) { + //darn couldn't fix up parrent directory this hosting is foobar. + //Lets error because of the permissions problems. + return false; + } + } + } + } + //we can write, return 1/true/happy dance. + return true; + } + + /** + * Adds the sitemap to the virtual robots.txt file + * This function is executed by WordPress with the do_robots hook + * + * @since 3.1.2 + */ + function DoRobots() { + $this->Initate(); + if($this->GetOption('b_robots') === true) { + + $smUrl = $this->GetXmlUrl(); + if($this->IsGzipEnabled()) { + $smUrl = $this->GetZipUrl(); + } + + echo "\nSitemap: " . $smUrl . "\n"; + } + } + + /** + * Builds the sitemap and writes it into a xml file. + * + * ATTENTION PLUGIN DEVELOPERS! DONT CALL THIS METHOD DIRECTLY! + * The method is probably not available, since it is only loaded when needed. + * Use do_action("sm_rebuild"); if you want to rebuild the sitemap. + * Please refer to the documentation.txt for more details. + * + * @since 3.0 + * @access public + * @author Arne Brachhold + * @return array An array with messages such as failed writes etc. + */ + function BuildSitemap() { + global $wpdb, $posts, $wp_version; + $this->Initate(); + + if($this->GetOption("b_memory")!='') { + @ini_set("memory_limit",$this->GetOption("b_memory")); + } + + if($this->GetOption("b_time")!=-1) { + @set_time_limit($this->GetOption("b_time")); + } + + //This object saves the status information of the script directly to the database + $status = new GoogleSitemapGeneratorStatus(); + + //Other plugins can detect if the building process is active + $this->_isActive = true; + + //$this->AddElement(new GoogleSitemapGeneratorXmlEntry()); + + //Debug mode? + $debug=$this->GetOption("b_debug"); + + if($this->GetOption("b_xml")) { + $fileName = $this->GetXmlPath(); + $status->StartXml($this->GetXmlPath(),$this->GetXmlUrl()); + + if($this->IsFileWritable($fileName)) { + + $this->_fileHandle = fopen($fileName,"w"); + if(!$this->_fileHandle) $status->EndXml(false,"Not openable"); + + } else $status->EndXml(false,"not writable"); + } + + //Write gzipped sitemap file + if($this->IsGzipEnabled()) { + $fileName = $this->GetZipPath(); + $status->StartZip($this->GetZipPath(),$this->GetZipUrl()); + + if($this->IsFileWritable($fileName)) { + + $this->_fileZipHandle = gzopen($fileName,"w1"); + if(!$this->_fileZipHandle) $status->EndZip(false,"Not openable"); + + } else $status->EndZip(false,"not writable"); + } + + if(!$this->_fileHandle && !$this->_fileZipHandle) { + $status->End(); + return; + } + + + //Content of the XML file + $this->AddElement(new GoogleSitemapGeneratorXmlEntry('')); + + $styleSheet = ($this->GetDefaultStyle() && $this->GetOption('b_style_default')===true?$this->GetDefaultStyle():$this->GetOption('b_style')); + + if(!empty($styleSheet)) { + $this->AddElement(new GoogleSitemapGeneratorXmlEntry('<' . '?xml-stylesheet type="text/xsl" href="' . $styleSheet . '"?' . '>')); + } + + $this->AddElement(new GoogleSitemapGeneratorDebugEntry("generator=\"wordpress/" . get_bloginfo('version') . "\"")); + $this->AddElement(new GoogleSitemapGeneratorDebugEntry("sitemap-generator-url=\"http://www.arnebrachhold.de\" sitemap-generator-version=\"" . $this->GetVersion() . "\"")); + $this->AddElement(new GoogleSitemapGeneratorDebugEntry("generated-on=\"" . date(get_option("date_format") . " " . get_option("time_format")) . "\"")); + + //All comments as an asso. Array (postID=>commentCount) + $comments=($this->GetOption("b_prio_provider")!=""?$this->GetComments():array()); + + //Full number of comments + $commentCount=(count($comments)>0?$this->GetCommentCount($comments):0); + + if($debug && $this->GetOption("b_prio_provider")!="") { + $this->AddElement(new GoogleSitemapGeneratorDebugEntry("Debug: Total comment count: " . $commentCount)); + } + + //Go XML! + $this->AddElement(new GoogleSitemapGeneratorXmlEntry('')); + + $home = get_bloginfo('url'); + + $homePid = 0; + + //Add the home page (WITH a slash!) + if($this->GetOption("in_home")) { + if('page' == get_option('show_on_front') && get_option('page_on_front')) { + $pageOnFront = get_option('page_on_front'); + $p = get_page($pageOnFront); + if($p) { + $homePid = $p->ID; + $this->AddUrl(trailingslashit($home),$this->GetTimestampFromMySql(($p->post_modified_gmt && $p->post_modified_gmt!='0000-00-00 00:00:00'?$p->post_modified_gmt:$p->post_date_gmt)),$this->GetOption("cf_home"),$this->GetOption("pr_home")); + } + } else { + $this->AddUrl(trailingslashit($home),$this->GetTimestampFromMySql(get_lastpostmodified('GMT')),$this->GetOption("cf_home"),$this->GetOption("pr_home")); + } + } + + //Add the posts + if($this->GetOption("in_posts") || $this->GetOption("in_pages")) { + + if($debug) $this->AddElement(new GoogleSitemapGeneratorDebugEntry("Debug: Start Postings")); + + //Pre 2.1 compatibility. 2.1 introduced 'future' as post_status so we don't need to check post_date + $wpCompat = (floatval($wp_version) < 2.1); + + $useQTransLate = false; //function_exists('qtrans_convertURL') && function_exists('qtrans_getEnabledLanguages'); Not really working yet + + $excludes = $this->GetOption('b_exclude'); //Excluded posts + + $exclCats = $this->GetOption("b_exclude_cats"); // Excluded cats + + if($exclCats && count($exclCats)>0 && $this->IsTaxonomySupported()) { + + $exPosts = get_objects_in_term($exclCats,"category"); // Get all posts in excl. cats + + if(is_array($exPosts) && count($exPosts) > 0) { //Merge it with the list of user excluded posts + $excludes = array_merge($excludes, $exPosts); + } + } + + + $contentStmt = ''; + if($useQTransLate) { + $contentStmt.=', post_content '; + } + + $postPageStmt = ''; + + $inSubPages = ($this->GetOption('in_posts_sub')===true); + + if($inSubPages && $this->GetOption('in_posts')===true) { + $pageDivider=''; + $postPageStmt = ", (character_length(`post_content`) - character_length(REPLACE(`post_content`, '$pageDivider', ''))) / " . strlen($pageDivider) . " as postPages"; + } + + $sql="SELECT `ID`, `post_author`, `post_date`, `post_date_gmt`, `post_status`, `post_name`, `post_modified`, `post_modified_gmt`, `post_parent`, `post_type` $postPageStmt $contentStmt FROM `" . $wpdb->posts . "` WHERE "; + + $where = '('; + + if($this->GetOption('in_posts')) { + //WP < 2.1: posts are post_status = publish + //WP >= 2.1: post_type must be 'post', no date check required because future posts are post_status='future' + if($wpCompat) $where.="(post_status = 'publish' AND post_date_gmt <= '" . gmdate('Y-m-d H:i:59') . "')"; + else $where.=" (post_status = 'publish' AND (post_type = 'post' OR post_type = '')) "; + } + + if($this->GetOption('in_pages')) { + if($this->GetOption('in_posts')) { + $where.=" OR "; + } + if($wpCompat) { + //WP < 2.1: posts have post_status = published, pages have post_status = static + $where.=" post_status='static' "; + } else { + //WP >= 2.1: posts have post_type = 'post' and pages have post_type = 'page'. Both must be published. + $where.=" (post_status = 'publish' AND post_type = 'page') "; + } + } + + $where.=") "; + + + if(is_array($excludes) && count($excludes)>0) { + $where.=" AND ID NOT IN ('" . implode("','",$excludes) . "')"; + } + + $where.=" AND post_password='' ORDER BY post_modified DESC"; + + $sql .= $where; + + if($this->GetOption("b_max_posts")>0) { + $sql.=" LIMIT 0," . $this->GetOption("b_max_posts"); + } + + $postCount = intval($wpdb->get_var("SELECT COUNT(*) AS cnt FROM `" . $wpdb->posts . "` WHERE ". $where,0,0)); + + //Create a new connection because we are using mysql_unbuffered_query and don't want to disturb the WP connection + //Safe Mode for other plugins which use mysql_query() without a connection handler and will destroy our resultset :( + $con = $postRes = null; + + //In 2.2, a bug which prevented additional DB connections was fixed + if(floatval($wp_version) < 2.2) { + $this->SetOption("b_safemode",true); + } + + if($this->GetOption("b_safemode")===true) { + $postRes = mysql_query($sql,$wpdb->dbh); + if(!$postRes) { + trigger_error("MySQL query failed: " . mysql_error(),E_USER_NOTICE); //E_USER_NOTICE will be displayed on our debug mode + return; + } + } else { + $con = mysql_connect(DB_HOST,DB_USER,DB_PASSWORD,true); + if(!$con) { + trigger_error("MySQL Connection failed: " . mysql_error(),E_USER_NOTICE); + return; + } + if(!mysql_select_db(DB_NAME,$con)) { + trigger_error("MySQL DB Select failed: " . mysql_error(),E_USER_NOTICE); + return; + } + $postRes = mysql_unbuffered_query($sql,$con); + + if(!$postRes) { + trigger_error("MySQL unbuffered query failed: " . mysql_error(),E_USER_NOTICE); + return; + } + } + + if($postRes) { + + //#type $prioProvider GoogleSitemapGeneratorPrioProviderBase + $prioProvider=NULL; + + if($this->GetOption("b_prio_provider") != '') { + $providerClass=$this->GetOption('b_prio_provider'); + $prioProvider = new $providerClass($commentCount,$postCount); + } + + //$posts is used by Alex King's Popularity Contest plugin + //if($posts == null || !is_array($posts)) { + // $posts = &$postRes; + //} + + $z = 1; + $zz = 1; + + //Default priorities + $default_prio_posts = $this->GetOption('pr_posts'); + $default_prio_pages = $this->GetOption('pr_pages'); + + //Change frequencies + $cf_pages = $this->GetOption('cf_pages'); + $cf_posts = $this->GetOption('cf_posts'); + + $minPrio=$this->GetOption('pr_posts_min'); + + + //Cycle through all posts and add them + while($post = mysql_fetch_object($postRes)) { + + //Fill the cache with our DB result. Since it's incomplete (no text-content for example), we will clean it later. + $cache = array(&$post); + update_post_cache($cache); + + //Set the current working post for other plugins which depend on "the loop" + $GLOBALS['post'] = &$post; + + $permalink = get_permalink($post->ID); + if($permalink != $home && $post->ID != $homePid) { + + $isPage = false; + if($wpCompat) { + $isPage = ($post->post_status == 'static'); + } else { + $isPage = ($post->post_type == 'page'); + } + + + //Default Priority if auto calc is disabled + $prio = 0; + + if($isPage) { + //Priority for static pages + $prio = $default_prio_pages; + } else { + //Priority for normal posts + $prio = $default_prio_posts; + } + + //If priority calc. is enabled, calculate (but only for posts, not pages)! + if($prioProvider !== null && !$isPage) { + + //Comment count for this post + $cmtcnt = (isset($comments[$post->ID])?$comments[$post->ID]:0); + $prio = $prioProvider->GetPostPriority($post->ID, $cmtcnt, $post); + + if($debug) $this->AddElement(new GoogleSitemapGeneratorDebugEntry('Debug: Priority report of postID ' . $post->ID . ': Comments: ' . $cmtcnt . ' of ' . $commentCount . ' = ' . $prio . ' points')); + } + + if(!$isPage && $minPrio>0 && $prio<$minPrio) { + $prio = $minPrio; + } + + //Add it + $this->AddUrl($permalink,$this->GetTimestampFromMySql(($post->post_modified_gmt && $post->post_modified_gmt!='0000-00-00 00:00:00'?$post->post_modified_gmt:$post->post_date_gmt)),($isPage?$cf_pages:$cf_posts),$prio); + + if($inSubPages) { + $subPage = ''; + for($p = 1; $p <= $post->postPages; $p++) { + if(get_option('permalink_structure') == '') { + $subPage = $permalink . '&page=' . ($p+1); + } else { + $subPage = trailingslashit($permalink) . user_trailingslashit($p+1, 'single_paged'); + } + + $this->AddUrl($subPage,$this->GetTimestampFromMySql(($post->post_modified_gmt && $post->post_modified_gmt!='0000-00-00 00:00:00'?$post->post_modified_gmt:$post->post_date_gmt)),($isPage?$cf_pages:$cf_posts),$prio); + } + } + + // Multilingual Support with qTranslate, thanks to Qian Qin + if($useQTransLate) { + global $q_config; + foreach(qtrans_getEnabledLanguages($post->post_content) as $language) { + if($language!=$q_config['default_language']) { + $this->AddUrl(qtrans_convertURL($permalink,$language),$this->GetTimestampFromMySql(($post->post_modified_gmt && $post->post_modified_gmt!='0000-00-00 00:00:00'?$post->post_modified_gmt:$post->post_date_gmt)),($isPage?$cf_pages:$cf_posts),$prio); + } + } + } + } + + //Update the status every 100 posts and at the end. + //If the script breaks because of memory or time limit, + //we have a "last reponded" value which can be compared to the server settings + if($zz==100 || $z == $postCount) { + $status->SaveStep($z); + $zz=0; + } else $zz++; + + $z++; + + //Clean cache because it's incomplete + if(version_compare($wp_version,"2.5",">=")) { + //WP 2.5 makes a mysql query for every clean_post_cache to clear the child cache + //so I've copied the function here until a patch arrives... + wp_cache_delete($post->ID, 'posts'); + wp_cache_delete($post->ID, 'post_meta'); + clean_object_term_cache($post->ID, 'post'); + } else { + clean_post_cache($post->ID); + } + } + unset($postRes); + unset($prioProvider); + + if($this->GetOption("b_safemode")!==true && $con) mysql_close($con); + } + if($debug) $this->AddElement(new GoogleSitemapGeneratorDebugEntry("Debug: End Postings")); + } + + //Add the cats + if($this->GetOption("in_cats")) { + if($debug) $this->AddElement(new GoogleSitemapGeneratorDebugEntry("Debug: Start Cats")); + + $exclCats = $this->GetOption("b_exclude_cats"); // Excluded cats + if($exclCats == null) $exclCats=array(); + + if(!$this->IsTaxonomySupported()) { + + $catsRes=$wpdb->get_results(" + SELECT + c.cat_ID AS ID, + MAX(p.post_modified_gmt) AS last_mod + FROM + `" . $wpdb->categories . "` c, + `" . $wpdb->post2cat . "` pc, + `" . $wpdb->posts . "` p + WHERE + pc.category_id = c.cat_ID + AND p.ID = pc.post_id + AND p.post_status = 'publish' + AND p.post_type='post' + GROUP + BY c.cat_id + "); + if($catsRes) { + foreach($catsRes as $cat) { + if($cat && $cat->ID && $cat->ID>0 && !in_array($cat->ID, $exclCats)) { + if($debug) if($debug) $this->AddElement(new GoogleSitemapGeneratorDebugEntry("Cat-ID:" . $cat->ID)); + $this->AddUrl(get_category_link($cat->ID),$this->GetTimestampFromMySql($cat->last_mod),$this->GetOption("cf_cats"),$this->GetOption("pr_cats")); + } + } + } + } else { + $cats = get_terms("category",array("hide_empty"=>true,"hierarchical"=>false)); + if($cats && is_array($cats) && count($cats)>0) { + foreach($cats AS $cat) { + if(!in_array($cat->term_id, $exclCats)) $this->AddUrl(get_category_link($cat->term_id),0,$this->GetOption("cf_cats"),$this->GetOption("pr_cats")); + } + } + } + if($debug) $this->AddElement(new GoogleSitemapGeneratorDebugEntry("Debug: End Cats")); + } + + //Add the archives + if($this->GetOption("in_arch")) { + if($debug) $this->AddElement(new GoogleSitemapGeneratorDebugEntry("Debug: Start Archive")); + $now = current_time('mysql'); + + //WP2.1 introduced post_status='future', for earlier WP versions we need to check the post_date_gmt + $arcresults = $wpdb->get_results(" + SELECT DISTINCT + YEAR(post_date_gmt) AS `year`, + MONTH(post_date_gmt) AS `month`, + MAX(post_date_gmt) as last_mod, + count(ID) as posts + FROM + $wpdb->posts + WHERE + post_date < '$now' + AND post_status = 'publish' + AND post_type = 'post' + " . (floatval($wp_version) < 2.1?"AND {$wpdb->posts}.post_date_gmt <= '" . gmdate('Y-m-d H:i:59') . "'":"") . " + GROUP BY + YEAR(post_date_gmt), + MONTH(post_date_gmt) + ORDER BY + post_date_gmt DESC"); + if ($arcresults) { + foreach ($arcresults as $arcresult) { + + $url = get_month_link($arcresult->year, $arcresult->month); + $changeFreq=""; + + //Archive is the current one + if($arcresult->month==date("n") && $arcresult->year==date("Y")) { + $changeFreq=$this->GetOption("cf_arch_curr"); + } else { // Archive is older + $changeFreq=$this->GetOption("cf_arch_old"); + } + + $this->AddUrl($url,$this->GetTimestampFromMySql($arcresult->last_mod),$changeFreq,$this->GetOption("pr_arch")); + } + } + if($debug) $this->AddElement(new GoogleSitemapGeneratorDebugEntry("Debug: End Archive")); + } + + //Add the author pages + if($this->GetOption("in_auth")) { + if($debug) $this->AddElement(new GoogleSitemapGeneratorDebugEntry("Debug: Start Author pages")); + + $linkFunc = null; + + //get_author_link is deprecated in WP 2.1, try to use get_author_posts_url first. + if(function_exists('get_author_posts_url')) { + $linkFunc = 'get_author_posts_url'; + } else if(function_exists('get_author_link')) { + $linkFunc = 'get_author_link'; + } + + //Who knows what happens in later WP versions, so check again if it worked + if($linkFunc !== null) { + //Unfortunately there is no API function to get all authors, so we have to do it the dirty way... + //We retrieve only users with published and not password protected posts (and not pages) + //WP2.1 introduced post_status='future', for earlier WP versions we need to check the post_date_gmt + $sql = "SELECT DISTINCT + p.ID, + u.user_nicename, + MAX(p.post_modified_gmt) AS last_post + FROM + {$wpdb->users} u, + {$wpdb->posts} p + WHERE + p.post_author = u.ID + AND p.post_status = 'publish' + AND p.post_type = 'post' + AND p.post_password = '' + " . (floatval($wp_version) < 2.1?"AND p.post_date_gmt <= '" . gmdate('Y-m-d H:i:59') . "'":"") . " + GROUP BY + u.ID, + u.user_nicename"; + + $authors = $wpdb->get_results($sql); + + if($authors && is_array($authors)) { + foreach($authors as $author) { + if($debug) if($debug) $this->AddElement(new GoogleSitemapGeneratorDebugEntry("Author-ID:" . $author->ID)); + $url = ($linkFunc=='get_author_posts_url'?get_author_posts_url($author->ID,$author->user_nicename):get_author_link(false,$author->ID,$author->user_nicename)); + $this->AddUrl($url,$this->GetTimestampFromMySql($author->last_post),$this->GetOption("cf_auth"),$this->GetOption("pr_auth")); + } + } + } else { + //Too bad, no author pages for you :( + if($debug) $this->AddElement(new GoogleSitemapGeneratorDebugEntry("Debug: No valid author link function found")); + } + + if($debug) $this->AddElement(new GoogleSitemapGeneratorDebugEntry("Debug: End Author pages")); + } + + //Add tag pages + if($this->GetOption("in_tags") && $this->IsTaxonomySupported()) { + if($debug) $this->AddElement(new GoogleSitemapGeneratorDebugEntry("Debug: Start Tags")); + $tags = get_terms("post_tag",array("hide_empty"=>true,"hierarchical"=>false)); + if($tags && is_array($tags) && count($tags)>0) { + foreach($tags AS $tag) { + $this->AddUrl(get_tag_link($tag->term_id),0,$this->GetOption("cf_tags"),$this->GetOption("pr_tags")); + } + } + if($debug) $this->AddElement(new GoogleSitemapGeneratorDebugEntry("Debug: End Tags")); + } + + //Add custom taxonomy pages + if($this->GetOption("in_tax") && $this->IsTaxonomySupported()) { + + if($debug) $this->AddElement(new GoogleSitemapGeneratorDebugEntry("Debug: Start custom taxonomies")); + + $enabledTaxonomies = $this->GetOption("in_tax"); + + $taxList = array(); + + foreach ($enabledTaxonomies as $taxName) { + $taxonomy = get_taxonomy($taxName); + if($taxonomy) $taxList[] = $wpdb->escape($taxonomy->name); + } + + if(count($taxList)>0) { + //We're selecting all term information (t.*) plus some additional fields + //like the last mod date and the taxonomy name, so WP doesnt need to make + //additional queries to build the permalink structure. + //This does NOT work for categories and tags yet, because WP uses get_category_link + //and get_tag_link internally and that would cause one additional query per term! + $sql=" + SELECT + t.*, + tt.taxonomy AS _taxonomy, + UNIX_TIMESTAMP(MAX(post_date_gmt)) as _mod_date + FROM + {$wpdb->posts} p , + {$wpdb->term_relationships} r, + {$wpdb->terms} t, + {$wpdb->term_taxonomy} tt + WHERE + p.ID = r.object_id + AND p.post_status = 'publish' + AND p.post_type = 'post' + AND p.post_password = '' + AND r.term_taxonomy_id = t.term_id + AND t.term_id = tt.term_id + AND tt.count > 0 + AND tt.taxonomy IN ('" . implode("','",$taxList) . "') + GROUP BY + t.term_id"; + + $termInfo = $wpdb->get_results($sql); + + foreach($termInfo AS $term) { + $this->AddUrl(get_term_link($term,$term->_taxonomy),$term->_mod_date ,$this->GetOption("cf_tags"),$this->GetOption("pr_tags")); + } + } + + if($debug) $this->AddElement(new GoogleSitemapGeneratorDebugEntry("Debug: End custom taxonomies")); + } + + //Add the custom pages + if($debug) $this->AddElement(new GoogleSitemapGeneratorDebugEntry("Debug: Start Custom Pages")); + if($this->_pages && is_array($this->_pages) && count($this->_pages)>0) { + //#type $page GoogleSitemapGeneratorPage + foreach($this->_pages AS $page) { + $this->AddUrl($page->GetUrl(),$page->getLastMod(),$page->getChangeFreq(),$page->getPriority()); + } + } + + if($debug) $this->AddElement(new GoogleSitemapGeneratorDebugEntry("Debug: End Custom Pages")); + + if($debug) $this->AddElement(new GoogleSitemapGeneratorDebugEntry("Debug: Start additional URLs")); + + do_action('sm_buildmap'); + + if($debug) $this->AddElement(new GoogleSitemapGeneratorDebugEntry("Debug: End additional URLs")); + + $this->AddElement(new GoogleSitemapGeneratorXmlEntry("")); + + + $pingUrl=''; + + if($this->GetOption("b_xml")) { + if($this->_fileHandle && fclose($this->_fileHandle)) { + $this->_fileHandle = null; + $status->EndXml(true); + $pingUrl=$this->GetXmlUrl(); + } else $status->EndXml(false,"Could not close the sitemap file."); + } + + if($this->IsGzipEnabled()) { + if($this->_fileZipHandle && fclose($this->_fileZipHandle)) { + $this->_fileZipHandle = null; + $status->EndZip(true); + $pingUrl=$this->GetZipUrl(); + } else $status->EndZip(false,"Could not close the zipped sitemap file"); + } + + //Ping Google + if($this->GetOption("b_ping") && !empty($pingUrl)) { + $sPingUrl="http://www.google.com/webmasters/sitemaps/ping?sitemap=" . urlencode($pingUrl); + $status->StartGooglePing($sPingUrl); + $pingres=$this->RemoteOpen($sPingUrl); + + if($pingres==NULL || $pingres===false) { + $status->EndGooglePing(false,$this->_lastError); + trigger_error("Failed to ping Google: " . htmlspecialchars(strip_tags($pingres)),E_USER_NOTICE); + } else { + $status->EndGooglePing(true); + } + } + + //Ping Ask.com + if($this->GetOption("b_pingask") && !empty($pingUrl)) { + $sPingUrl="http://submissions.ask.com/ping?sitemap=" . urlencode($pingUrl); + $status->StartAskPing($sPingUrl); + $pingres=$this->RemoteOpen($sPingUrl); + + if($pingres==NULL || $pingres===false || strpos($pingres,"successfully received and added")===false) { //Ask.com returns 200 OK even if there was an error, so we need to check the content. + $status->EndAskPing(false,$this->_lastError); + trigger_error("Failed to ping Ask.com: " . htmlspecialchars(strip_tags($pingres)),E_USER_NOTICE); + } else { + $status->EndAskPing(true); + } + } + + //Ping YAHOO + if($this->GetOption("b_pingyahoo")===true && $this->GetOption("b_yahookey")!="" && !empty($pingUrl)) { + $sPingUrl="http://search.yahooapis.com/SiteExplorerService/V1/updateNotification?appid=" . $this->GetOption("b_yahookey") . "&url=" . urlencode($pingUrl); + $status->StartYahooPing($sPingUrl); + $pingres=$this->RemoteOpen($sPingUrl); + + if($pingres==NULL || $pingres===false || strpos(strtolower($pingres),"success")===false) { + trigger_error("Failed to ping YAHOO: " . htmlspecialchars(strip_tags($pingres)),E_USER_NOTICE); + $status->EndYahooPing(false,$this->_lastError); + } else { + $status->EndYahooPing(true); + } + } + + //Ping Bing + if($this->GetOption("b_pingmsn") && !empty($pingUrl)) { + $sPingUrl="http://www.bing.com/webmaster/ping.aspx?siteMap=" . urlencode($pingUrl); + $status->StartMsnPing($sPingUrl); + $pingres=$this->RemoteOpen($sPingUrl); + + if($pingres==NULL || $pingres===false || strpos($pingres,"Thanks for submitting your sitemap")===false) { + trigger_error("Failed to ping Bing: " . htmlspecialchars(strip_tags($pingres)),E_USER_NOTICE); + $status->EndMsnPing(false,$this->_lastError); + } else { + $status->EndMsnPing(true); + } + } + + $status->End(); + + + $this->_isActive = false; + + //done... + return $status; + } + + /** + * Tries to ping a specific service showing as much as debug output as possible + * @since 3.1.9 + * @return null + */ + function ShowPingResult() { + + check_admin_referer('sitemap'); + + if(!current_user_can("administrator")) { + echo '

    Please log in as admin

    '; + return; + } + + $service = !empty($_GET["sm_ping_service"])?$_GET["sm_ping_service"]:null; + + $status = GoogleSitemapGeneratorStatus::Load(); + + if(!$status) die("No build status yet. Build the sitemap first."); + + $url = null; + + switch($service) { + case "google": + $url = $status->_googleUrl; + break; + case "yahoo": + $url = $status->_yahooUrl; + break; + case "msn": + $url = $status->_msnUrl; + break; + case "ask": + $url = $status->_askUrl; + break; + } + + if(empty($url)) die("Invalid ping url"); + + echo 'Ping Test'; + if(function_exists('wp_admin_css')) wp_admin_css('css/global',true); + echo '

    Ping Test

    '; + + echo '

    Trying to ping: ' . $url . '. The sections below should give you an idea whats going on.

    '; + + //Try to get as much as debug / error output as possible + $errLevel = error_reporting(E_ALL); + $errDisplay = ini_set("display_errors",1); + if(!defined('WP_DEBUG')) define('WP_DEBUG',true); + + echo '

    Errors, Warnings, Notices:

    '; + + if(WP_DEBUG == false) echo "WP_DEBUG was set to false somewhere before. You might not see all debug information until you remove this declaration!
    "; + if(ini_get("display_errors")!=1) echo "Your display_errors setting currently prevents the plugin from showing errors here. Please check your webserver logfile instead.
    "; + + $res = $this->RemoteOpen($url); + + echo '

    Result (text only):

    '; + + echo wp_kses($res,array('a' => array('href' => array()),'p' => array(), 'ul' => array(), 'ol' => array(), 'li' => array())); + + echo '

    Result (HTML):

    '; + + echo htmlspecialchars($res); + + //Revert back old values + error_reporting($errLevel); + ini_set("display_errors",$errDisplay); + echo ''; + exit; + } + + /** + * Opens a remote file using the WordPress API or Snoopy + * @since 3.0 + * @param $url The URL to open + * @param $method get or post + * @param $postData An array with key=>value paris + * @param $timeout Timeout for the request, by default 10 + * @return mixed False on error, the body of the response on success + */ + function RemoteOpen($url,$method = 'get', $postData = null, $timeout = 10) { + global $wp_version; + + //Before WP 2.7, wp_remote_fopen was quite crappy so Snoopy was favoured. + if(floatval($wp_version) < 2.7) { + if(!file_exists(ABSPATH . 'wp-includes/class-snoopy.php')) { + trigger_error('Snoopy Web Request failed: Snoopy not found.',E_USER_NOTICE); + return false; //Hoah? + } + + require_once( ABSPATH . 'wp-includes/class-snoopy.php'); + + $s = new Snoopy(); + + $s->read_timeout = $timeout; + + if($method == 'get') { + $s->fetch($url); + } else { + $s->submit($url,$postData); + } + + if($s->status != "200") { + trigger_error('Snoopy Web Request failed: Status: ' . $s->status . "; Content: " . htmlspecialchars($s->results),E_USER_NOTICE); + } + + return $s->results; + + } else { + + $options = array(); + $options['timeout'] = $timeout; + + if($method == 'get') { + $response = wp_remote_get( $url, $options ); + } else { + $response = wp_remote_post($url, array_merge($options,array('body'=>$postData))); + } + + if ( is_wp_error( $response ) ) { + $errs = $response->get_error_messages(); + $errs = htmlspecialchars(implode('; ', $errs)); + trigger_error('WP HTTP API Web Request failed: ' . $errs,E_USER_NOTICE); + return false; + } + + return $response['body']; + } + + return false; + } + + /** + * Echos option fields for an select field containing the valid change frequencies + * + * @since 3.0 + * @access private + * @author Arne Brachhold + * @param $currentVal The value which should be selected + * @return all valid change frequencies as html option fields + */ + function HtmlGetFreqNames($currentVal) { + + foreach($this->_freqNames AS $k=>$v) { + echo ""; + } + } + + /** + * Echos option fields for an select field containing the valid priorities (0- 1.0) + * + * @since 3.0 + * @access private + * @author Arne Brachhold + * @param $currentVal string The value which should be selected + * @return 0.0 - 1.0 as html option fields + */ + function HtmlGetPriorityValues($currentVal) { + $currentVal=(float) $currentVal; + for($i=0.0; $i<=1.0; $i+=0.1) { + $v = number_format($i,1,".",""); + //number_format_i18n is there since WP 2.3 + $t = function_exists('number_format_i18n')?number_format_i18n($i,1):number_format($i,1); + echo ""; + } + } + + /** + * Returns the checked attribute if the given values match + * + * @since 3.0 + * @access private + * @author Arne Brachhold + * @param $val string The current value + * @param $equals string The value to match + * @return The checked attribute if the given values match, an empty string if not + */ + function HtmlGetChecked($val,$equals) { + if($val==$equals) return $this->HtmlGetAttribute("checked"); + else return ""; + } + + /** + * Returns the selected attribute if the given values match + * + * @since 3.0 + * @access private + * @author Arne Brachhold + * @param $val string The current value + * @param $equals string The value to match + * @return The selected attribute if the given values match, an empty string if not + */ + function HtmlGetSelected($val,$equals) { + if($val==$equals) return $this->HtmlGetAttribute("selected"); + else return ""; + } + + /** + * Returns an formatted attribute. If the value is NULL, the name will be used. + * + * @since 3.0 + * @access private + * @author Arne Brachhold + * @param $attr string The attribute name + * @param $value string The attribute value + * @return The formatted attribute + */ + function HtmlGetAttribute($attr,$value=NULL) { + if($value==NULL) $value=$attr; + return " " . $attr . "=\"" . $value . "\" "; + } + + /** + * Returns an array with GoogleSitemapGeneratorPage objects which is generated from POST values + * + * @since 3.0 + * @see GoogleSitemapGeneratorPage + * @access private + * @author Arne Brachhold + * @return array An array with GoogleSitemapGeneratorPage objects + */ + function HtmlApplyPages() { + // Array with all page URLs + $pages_ur=(!isset($_POST["sm_pages_ur"]) || !is_array($_POST["sm_pages_ur"])?array():$_POST["sm_pages_ur"]); + + //Array with all priorities + $pages_pr=(!isset($_POST["sm_pages_pr"]) || !is_array($_POST["sm_pages_pr"])?array():$_POST["sm_pages_pr"]); + + //Array with all change frequencies + $pages_cf=(!isset($_POST["sm_pages_cf"]) || !is_array($_POST["sm_pages_cf"])?array():$_POST["sm_pages_cf"]); + + //Array with all lastmods + $pages_lm=(!isset($_POST["sm_pages_lm"]) || !is_array($_POST["sm_pages_lm"])?array():$_POST["sm_pages_lm"]); + + //Array where the new pages are stored + $pages=array(); + //Loop through all defined pages and set their properties into an object + if(isset($_POST["sm_pages_mark"]) && is_array($_POST["sm_pages_mark"])) { + for($i=0; $iSetUrl($pages_ur[$i]); + $p->SetProprity($pages_pr[$i]); + $p->SetChangeFreq($pages_cf[$i]); + //Try to parse last modified, if -1 (note ===) automatic will be used (0) + $lm=(!empty($pages_lm[$i])?strtotime($pages_lm[$i],time()):-1); + if($lm===-1) $p->setLastMod(0); + else $p->setLastMod($lm); + //Add it to the array + array_push($pages,$p); + } + } + + return $pages; + } + + /** + * Converts a mysql datetime value into a unix timestamp + * + * @param The value in the mysql datetime format + * @return int The time in seconds + */ + function GetTimestampFromMySql($mysqlDateTime) { + list($date, $hours) = split(' ', $mysqlDateTime); + list($year,$month,$day) = split('-',$date); + list($hour,$min,$sec) = split(':',$hours); + return mktime(intval($hour), intval($min), intval($sec), intval($month), intval($day), intval($year)); + } + + /** + * Returns a link pointing to a spcific page of the authors website + * + * @since 3.0 + * @param The page to link to + * @return string The full url + */ + function GetRedirectLink($redir) { + return trailingslashit("http://www.arnebrachhold.de/redir/" . $redir); + } + + /** + * Returns a link pointing back to the plugin page in WordPress + * + * @since 3.0 + * @return string The full url + */ + function GetBackLink() { + //admin_url was added in WP 2.6.0 + if(function_exists("admin_url")) return admin_url("options-general.php?page=" . GoogleSitemapGeneratorLoader::GetBaseName()); + else return $_SERVER['PHP_SELF'] . "?page=" . GoogleSitemapGeneratorLoader::GetBaseName(); + } + + /** + * Shows the option page of the plugin. Before 3.1.1, this function was basically the UI, afterwards the UI was outsourced to another class + * + * @see GoogleSitemapGeneratorUI + * @since 3.0 + * @return bool + */ + function HtmlShowOptionsPage() { + + $ui = $this->GetUI(); + if($ui) { + $ui->HtmlShowOptionsPage(); + return true; + } + + return false; + } + + /** + * Includes the user interface class and intializes it + * + * @since 3.1.1 + * @see GoogleSitemapGeneratorUI + * @return GoogleSitemapGeneratorUI + */ + function GetUI() { + + global $wp_version; + + if($this->_ui === null) { + + $className='GoogleSitemapGeneratorUI'; + $fileName='sitemap-ui.php'; + + if(!class_exists($className)) { + + $path = trailingslashit(dirname(__FILE__)); + + if(!file_exists( $path . $fileName)) return false; + require_once($path. $fileName); + } + + $this->_ui = new $className($this); + + } + + return $this->_ui; + } + + function HtmlShowHelp() { + + + } +} \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/sitemap-ui.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/google-sitemap-generator/sitemap-ui.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,1271 @@ +sg = $sitemapBuilder; + + if(floatval($wp_version) >= 2.7) { + $this->mode = 27; + } + } + + function HtmlPrintBoxHeader($id, $title, $right = false) { + if($this->mode == 27) { + ?> +
    +

    +
    + +
    +
    +

    +
    + +
    +
    + mode == 27) { + ?> +
    +
    + +
    +
    + + sg->Initate(); + + //All output should go in this var which get printed at the end + $message=""; + + if(!$snl) { + + if(isset($_GET['sm_hidedonate'])) { + $this->sg->SetOption('i_hide_donated',true); + $this->sg->SaveOptions(); + } + if(isset($_GET['sm_donated'])) { + $this->sg->SetOption('i_donated',true); + $this->sg->SaveOptions(); + } + if(isset($_GET['sm_hide_note'])) { + $this->sg->SetOption('i_hide_note',true); + $this->sg->SaveOptions(); + } + if(isset($_GET['sm_hidedonors'])) { + $this->sg->SetOption('i_hide_donors',true); + $this->sg->SaveOptions(); + } + if(isset($_GET['sm_hide_works'])) { + $this->sg->SetOption('i_hide_works',true); + $this->sg->SaveOptions(); + } + + + if(isset($_GET['sm_donated']) || ($this->sg->GetOption('i_donated')===true && $this->sg->GetOption('i_hide_donated')!==true)) { + ?> +
    +

    ">

    +
    + sg->GetOption('i_donated') !== true && $this->sg->GetOption('i_install_date')>0 && $this->sg->GetOption('i_hide_note')!==true && time() > ($this->sg->GetOption('i_install_date') + (60*60*24*30))) { + ?> +
    +

    sg->GetRedirectLink("sitemap-donate-note"),__('Thanks for using this plugin! You\'ve installed this plugin over a month ago. If it works and you are satisfied with the results, isn\'t it worth at least a few dollar? Donations help me to continue support and development of this free software! Sure, no problem!','sitemap')); ?> " style="float:right; display:block; border:none; margin-left:10px;"> " style="float:right; display:block; border:none;">

    +
    +
    + sg->GetOption('i_install_date')>0 && $this->sg->GetOption('i_hide_works')!==true && time() > ($this->sg->GetOption('i_install_date') + (60*60*24*15))) { + ?> +
    +

    sg->GetRedirectLink("sitemap-works-note"),__('Thanks for using this plugin! You\'ve installed this plugin some time ago. If it works and your are satisfied, why not rate it and recommend it to others? :-)','sitemap')); ?> " style="float:right; display:block; border:none;">

    +
    +
    + +
    +

    +
    +
    + Please log in as admin

    '; + return; + } + + $oldErr = error_reporting(E_ALL); + $oldIni = ini_set("display_errors",1); + + echo '
    '; + echo '

    ' . __('XML Sitemap Generator for WordPress', 'sitemap') . " " . $this->sg->GetVersion(). '

    '; + echo '

    This is the debug mode of the XML Sitemap Generator. It will show all PHP notices and warnings as well as the internal logs, messages and configuration.

    '; + echo '

    DO NOT POST THIS INFORMATION ON PUBLIC PAGES LIKE SUPPORT FORUMS AS IT MAY CONTAIN PASSWORDS OR SECRET SERVER INFORMATION!

    '; + echo "

    WordPress and PHP Information

    "; + echo '

    WordPress ' . $GLOBALS['wp_version'] . ' with ' . ' DB ' . $GLOBALS['wp_db_version'] . ' on PHP ' . phpversion() . '

    '; + echo '

    Plugin version: ' . $this->sg->GetVersion() . ' (' . $this->sg->_svnVersion . ')'; + echo '

    Environment

    '; + echo "
    ";
    +				$sc = $_SERVER;
    +				unset($sc["HTTP_COOKIE"]);
    +				print_r($sc);
    +				echo "
    "; + echo "

    WordPress Config

    "; + echo "
    ";
    +				$opts = array();
    +				if(function_exists('wp_load_alloptions')) {
    +					$opts = wp_load_alloptions();
    +				} else {
    +					global $wpdb;
    +					$os = $wpdb->get_results( "SELECT option_name, option_value FROM $wpdb->options");
    +					foreach ( (array) $os as $o ) $opts[$o->option_name] = $o->option_value;
    +				}
    +				
    +				$popts = array();
    +				foreach($opts as $k=>$v) {
    +					//Try to filter out passwords etc...
    +					if(preg_match("/(pass|login|pw|secret|user|usr)/si",$v)) continue;
    +					$popts[$k] = htmlspecialchars($v);
    +				}
    +				print_r($popts);
    +				echo "
    "; + echo '

    Sitemap Config

    '; + echo "
    ";
    +				print_r($this->sg->_options);
    +				echo "
    "; + echo '

    Errors, Warnings, Notices

    '; + echo '
    '; + $status = $this->sg->BuildSitemap(); + echo '
    '; + echo '

    MySQL Queries

    '; + if(defined('SAVEQUERIES') && SAVEQUERIES) { + echo '
    ';
    +					var_dump($GLOBALS['wpdb']->queries);
    +					echo '
    '; + + $total = 0; + foreach($GLOBALS['wpdb']->queries as $q) { + $total+=$q[1]; + } + echo '

    Total Query Time

    '; + echo '
    ' . count($GLOBALS['wpdb']->queries) . ' queries in ' . round($total,2) . ' seconds.
    '; + } else { + echo '

    Please edit wp-db.inc.php in wp-includes and set SAVEQUERIES to true if you want to see the queries.

    '; + } + echo "

    Build Process Results

    "; + echo "
    ";
    +				print_r($status);
    +				echo "
    "; + echo '

    Done. Rebuild or Return

    '; + echo '

    DO NOT POST THIS INFORMATION ON PUBLIC PAGES LIKE SUPPORT FORUMS AS IT MAY CONTAIN PASSWORDS OR SECRET SERVER INFORMATION!

    '; + echo '
    '; + @error_reporting($oldErr); + @ini_set("display_errors",$oldIni); + return; + } else { + $this->sg->BuildSitemap(); + $redirURL = $this->sg->GetBackLink() . '&sm_fromrb=true'; + + //Redirect so the sm_rebuild GET parameter no longer exists. + @header("location: " . $redirURL); + //If there was already any other output, the header redirect will fail + echo ''; + echo ''; + exit; + } + } else if (!empty($_POST['sm_update'])) { //Pressed Button: Update Config + check_admin_referer('sitemap'); + + if(isset($_POST['sm_b_style']) && $_POST['sm_b_style'] == $this->sg->getDefaultStyle()) { + $_POST['sm_b_style_default'] = true; + $_POST['sm_b_style'] = ''; + } + + foreach($this->sg->_options as $k=>$v) { + //Check vor values and convert them into their types, based on the category they are in + if(!isset($_POST[$k])) $_POST[$k]=""; // Empty string will get false on 2bool and 0 on 2float + + //Options of the category "Basic Settings" are boolean, except the filename and the autoprio provider + if(substr($k,0,5)=="sm_b_") { + if($k=="sm_b_filename" || $k=="sm_b_fileurl_manual" || $k=="sm_b_filename_manual" || $k=="sm_b_prio_provider" || $k=="sm_b_manual_key" || $k == "sm_b_yahookey" || $k == "sm_b_style" || $k == "sm_b_memory") { + if($k=="sm_b_filename_manual" && strpos($_POST[$k],"\\")!==false){ + $_POST[$k]=stripslashes($_POST[$k]); + } + + $this->sg->_options[$k]=(string) $_POST[$k]; + } else if($k=="sm_b_location_mode") { + $tmp=(string) $_POST[$k]; + $tmp=strtolower($tmp); + if($tmp=="auto" || $tmp="manual") $this->sg->_options[$k]=$tmp; + else $this->sg->_options[$k]="auto"; + } else if($k == "sm_b_time" || $k=="sm_b_max_posts") { + if($_POST[$k]=='') $_POST[$k] = -1; + $this->sg->_options[$k] = intval($_POST[$k]); + } else if($k== "sm_i_install_date") { + if($this->sg->GetOption('i_install_date')<=0) $this->sg->_options[$k] = time(); + } else if($k=="sm_b_exclude") { + $IDss = array(); + $IDs = explode(",",$_POST[$k]); + for($x = 0; $x0) $IDss[] = $ID; + } + $this->sg->_options[$k] = $IDss; + } else if($k == "sm_b_exclude_cats") { + $exCats = array(); + if(isset($_POST["post_category"])) { + foreach((array) $_POST["post_category"] AS $vv) if(!empty($vv) && is_numeric($vv)) $exCats[] = intval($vv); + } + $this->sg->_options[$k] = $exCats; + } else { + $this->sg->_options[$k]=(bool) $_POST[$k]; + + } + //Options of the category "Includes" are boolean + } else if(substr($k,0,6)=="sm_in_") { + if($k=='sm_in_tax') { + + $enabledTaxonomies = array(); + + foreach(array_keys((array) $_POST[$k]) AS $taxName) { + if(empty($taxName) || !is_taxonomy($taxName)) continue; + + $enabledTaxonomies[] = $taxName; + } + + $this->sg->_options[$k] = $enabledTaxonomies; + + } else $this->sg->_options[$k]=(bool) $_POST[$k]; + //Options of the category "Change frequencies" are string + } else if(substr($k,0,6)=="sm_cf_") { + $this->sg->_options[$k]=(string) $_POST[$k]; + //Options of the category "Priorities" are float + } else if(substr($k,0,6)=="sm_pr_") { + $this->sg->_options[$k]=(float) $_POST[$k]; + } + } + + //No Mysql unbuffered query for WP < 2.2 + if(floatval($wp_version) < 2.2) { + $this->sg->SetOption('b_safemode',true); + } + + //No Wp-Cron for WP < 2.1 + if(floatval($wp_version) < 2.1) { + $this->sg->SetOption('b_auto_delay',false); + } + + //Apply page changes from POST + $this->sg->_pages=$this->sg->HtmlApplyPages(); + + if($this->sg->SaveOptions()) $message.=__('Configuration updated', 'sitemap') . "
    "; + else $message.=__('Error while saving options', 'sitemap') . "
    "; + + if($this->sg->SavePages()) $message.=__("Pages saved",'sitemap') . "
    "; + else $message.=__('Error while saving pages', 'sitemap'). "
    "; + + } else if(!empty($_POST["sm_reset_config"])) { //Pressed Button: Reset Config + check_admin_referer('sitemap'); + $this->sg->InitOptions(); + $this->sg->SaveOptions(); + + $message.=__('The default configuration was restored.','sitemap'); + } + + //Print out the message to the user, if any + if($message!="") { + ?> +

    + + + + mode == 27): ?> + + + =")): ?> + + + + + + + +
    +
    +

    sg->GetVersion() ?>

    + response[$file])) { + $r = $current->response[$file]; + ?>
    Download version %3$s here.','default'), $plugin_data['Name'], $r->url, $r->new_version); + else if ( empty($r->package) ) + printf( __('There is a new version of %1$s available. Download version %3$s here automatic upgrade unavailable for this plugin.','default'), $plugin_data['Name'], $r->url, $r->new_version); + else + printf( __('There is a new version of %1$s available. Download version %3$s here or upgrade automatically.','default'), $plugin_data['Name'], $r->url, $r->new_version, wp_nonce_url("update.php?action=upgrade-plugin&plugin=$file", 'upgrade-plugin_' . $file) ); + + ?>

    privacy settings to change this.','sitemap')); ?>

    + + + + + + + mode == 27): ?> + + +
    +
    +
    + +
    + + + +
    +
    +
    + +
    + + + + + + HtmlPrintBoxHeader('sm_pnres',__('About this Plugin:','sitemap'),true); ?> + + + + + + + + + + HtmlPrintBoxFooter(true); ?> + + + HtmlPrintBoxHeader('sm_smres',__('Sitemap Resources:','sitemap'),true); ?> + + + + + + + + +
    + + + + HtmlPrintBoxFooter(true); ?> + + HtmlPrintBoxHeader('dm_donations',__('Recent Donations:','sitemap'),true); ?> + sg->GetOption('i_hide_donors')!==true) { ?> +
    + ">

    + + PayPal + +
    + HtmlPrintBoxFooter(true); ?> + + +
    +
    + + + mode == 27): ?> +
    + +
    + +
    + +
    + + + + GetStartTime(); + $head=str_replace("%date%",date(get_option('date_format'),$st) . " " . date(get_option('time_format'),$st),__("Result of the last build process, started on %date%.",'sitemap')); + } + + $this->HtmlPrintBoxHeader('sm_rebuild',$head); ?> +
      + " . str_replace("%s",wp_nonce_url($this->sg->GetBackLink() . "&sm_rebuild=true&noheader=true",'sitemap'),__('The sitemap wasn\'t built yet. Click here to build it the first time.','sitemap')) . ""; + } else { + if($status->_endTime !== 0) { + if($status->_usedXml) { + if($status->_xmlSuccess) { + $ft = is_readable($status->_xmlPath)?filemtime($status->_xmlPath):false; + if($ft!==false) echo "
    • " . str_replace("%url%",$status->_xmlUrl,str_replace("%date%",date(get_option('date_format'),$ft) . " " . date(get_option('time_format'),$ft),__("Your sitemap was last built on %date%.",'sitemap'))) . "
    • "; + else echo "
    • " . __("The last build succeeded, but the file was deleted later or can't be accessed anymore. Did you move your blog to another server or domain?",'sitemap') . "
    • "; + } else { + echo "
    • " . str_replace("%url%",$this->sg->GetRedirectLink('sitemap-help-files'),__("There was a problem writing your sitemap file. Make sure the file exists and is writable. Learn more",'sitemap')) . "
    • "; + } + } + + if($status->_usedZip) { + if($status->_zipSuccess) { + $ft = is_readable($status->_zipPath)?filemtime($status->_zipPath):false; + if($ft !== false) echo "
    • " . str_replace("%url%",$status->_zipUrl,str_replace("%date%",date(get_option('date_format'),$ft) . " " . date(get_option('time_format'),$ft),__("Your sitemap (zipped) was last built on %date%.",'sitemap'))) . "
    • "; + else echo "
    • " . __("The last zipped build succeeded, but the file was deleted later or can't be accessed anymore. Did you move your blog to another server or domain?",'sitemap') . "
    • "; + } else { + echo "
    • " . str_replace("%url%",$this->sg->GetRedirectLink('sitemap-help-files'),__("There was a problem writing your zipped sitemap file. Make sure the file exists and is writable. Learn more",'sitemap')) . "
    • "; + } + } + + if($status->_usedGoogle) { + if($status->_gooogleSuccess) { + echo "
    • " .__("Google was successfully notified about changes.",'sitemap'). "
    • "; + $gt = $status->GetGoogleTime(); + if($gt>4) { + echo "
    • " . str_replace("%time%",$gt,__("It took %time% seconds to notify Google, maybe you want to disable this feature to reduce the building time.",'sitemap')) . "
    • "; + } + } else { + echo "
    • " . str_replace("%s",wp_nonce_url($this->sg->GetBackLink() . "&sm_ping_service=google&noheader=true",'sitemap'),__('There was a problem while notifying Google. View result','sitemap')) . "
    • "; + } + } + + if($status->_usedYahoo) { + if($status->_yahooSuccess) { + echo "
    • " .__("YAHOO was successfully notified about changes.",'sitemap'). "
    • "; + $yt = $status->GetYahooTime(); + if($yt>4) { + echo "
    • " . str_replace("%time%",$yt,__("It took %time% seconds to notify YAHOO, maybe you want to disable this feature to reduce the building time.",'sitemap')) . "
    • "; + } + } else { + echo "
    • " . str_replace("%s",wp_nonce_url($this->sg->GetBackLink() . "&sm_ping_service=yahoo&noheader=true",'sitemap'),__('There was a problem while notifying YAHOO. View result','sitemap')) . "
    • "; + } + } + + if($status->_usedMsn) { + if($status->_msnSuccess) { + echo "
    • " .__("Bing was successfully notified about changes.",'sitemap'). "
    • "; + $at = $status->GetMsnTime(); + if($at>4) { + echo "
    • " . str_replace("%time%",$at,__("It took %time% seconds to notify Bing, maybe you want to disable this feature to reduce the building time.",'sitemap')) . "
    • "; + } + } else { + echo "
    • " . str_replace("%s",wp_nonce_url($this->sg->GetBackLink() . "&sm_ping_service=msn&noheader=true",'sitemap'),__('There was a problem while notifying Bing. View result','sitemap')) . "
    • "; + } + } + + if($status->_usedAsk) { + if($status->_askSuccess) { + echo "
    • " .__("Ask.com was successfully notified about changes.",'sitemap'). "
    • "; + $at = $status->GetAskTime(); + if($at>4) { + echo "
    • " . str_replace("%time%",$at,__("It took %time% seconds to notify Ask.com, maybe you want to disable this feature to reduce the building time.",'sitemap')) . "
    • "; + } + } else { + echo "
    • " . str_replace("%s",wp_nonce_url($this->sg->GetBackLink() . "&sm_ping_service=ask&noheader=true",'sitemap'),__('There was a problem while notifying Ask.com. View result','sitemap')) . "
    • "; + } + } + + $et = $status->GetTime(); + $mem = $status->GetMemoryUsage(); + + if($mem > 0) { + echo "
    • " .str_replace(array("%time%","%memory%"),array($et,$mem),__("The building process took about %time% seconds to complete and used %memory% MB of memory.",'sitemap')). "
    • "; + } else { + echo "
    • " .str_replace("%time%",$et,__("The building process took about %time% seconds to complete.",'sitemap')). "
    • "; + } + + if(!$status->_hasChanged) { + echo "
    • " . __("The content of your sitemap didn't change since the last time so the files were not written and no search engine was pinged.",'sitemap'). "
    • "; + } + + } else { + if($this->sg->GetOption("b_auto_delay")) { + $st = ($status->GetStartTime() - time()) * -1; + //If the building process runs in background and was started within the last 45 seconds, the sitemap might not be completed yet... + if($st < 45) { + echo '
    • '. __("The building process might still be active! Reload the page in a few seconds and check if something has changed.",'sitemap') . '
    • '; + } + } + echo '
    • '. str_replace("%url%",$this->sg->GetRedirectLink('sitemap-help-memtime'),__("The last run didn't finish! Maybe you can raise the memory or time limit for PHP scripts. Learn more",'sitemap')) . '
    • '; + if($status->_memoryUsage > 0) { + echo '
    • '. str_replace(array("%memused%","%memlimit%"),array($status->GetMemoryUsage(),ini_get('memory_limit')),__("The last known memory usage of the script was %memused%MB, the limit of your server is %memlimit%.",'sitemap')) . '
    • '; + } + + if($status->_lastTime > 0) { + echo '
    • '. str_replace(array("%timeused%","%timelimit%"),array($status->GetLastTime(),ini_get('max_execution_time')),__("The last known execution time of the script was %timeused% seconds, the limit of your server is %timelimit% seconds.",'sitemap')) . '
    • '; + } + + if($status->GetLastPost() > 0) { + echo '
    • '. str_replace("%lastpost%",$status->GetLastPost(),__("The script stopped around post number %lastpost% (+/- 100)",'sitemap')) . '
    • '; + } + } + echo "
    • " . str_replace("%s",wp_nonce_url($this->sg->GetBackLink() . "&sm_rebuild=true&noheader=true",'sitemap'),__('If you changed something on your server or blog, you should rebuild the sitemap manually.','sitemap')) . "
    • "; + } + echo "
    • " . str_replace("%d",wp_nonce_url($this->sg->GetBackLink() . "&sm_rebuild=true&sm_do_debug=true",'sitemap'),__('If you encounter any problems with the build process you can use the debug function to get more information.','sitemap')) . "
    • "; + ?> + +
    + HtmlPrintBoxFooter(); ?> + + + HtmlPrintBoxHeader('sm_basic_options',__('Basic Options', 'sitemap')); ?> + + +
      +
    • + +
    • +
    • + +
    • +
    + +
      +
    • + +
    • +
    • + + [?] + +
    • +
    + +
      +
    • + sg->GetOption("b_ping")==true?"checked=\"checked\"":"") ?> /> +
      + sg->GetRedirectLink('sitemap-gwt'),__('No registration required, but you can join the Google Webmaster Tools to check crawling statistics.','sitemap')); ?> +
    • +
    • + sg->GetOption("b_pingmsn")==true?"checked=\"checked\"":"") ?> /> +
      + sg->GetRedirectLink('sitemap-lwt'),__('No registration required, but you can join the Bing Webmaster Tools to check crawling statistics.','sitemap')); ?> +
    • +
    • + sg->GetOption("b_pingask")==true?"checked=\"checked\"":"") ?> /> +
      + +
    • +
    • + sg->GetOption("b_pingyahoo")==true?"checked=\"checked\"":"") ?> /> +
      +
      + sg->GetRedirectLink('sitemap-ykr'),' (Web Services by Yahoo!)'),__('Don\'t you have such a key? Request one here! %s2','sitemap')); ?> +
    • +
    • + + +
      + +
    • +
    + +
      +
    • + () +
    • +
    • + () +
    • +
    • + () +
    • +
    • + sg->GetDefaultStyle() && $this->sg->GetOption('b_style_default')===true); ?> + + () sg->GetDefaultStyle()): ?>
    • +
    • + +
    • +
    • + +
    • +
    + + HtmlPrintBoxFooter(); ?> + + HtmlPrintBoxHeader('sm_pages',__('Additional pages', 'sitemap')); ?> + + For example, if your domain is www.foo.com and your blog is located on www.foo.com/blog you might want to include your homepage at www.foo.com','sitemap'); + echo "
    • "; + echo "" . __('Note','sitemap'). ": "; + _e("If your blog is in a subdirectory and you want to add pages which are NOT in the blog directory or beneath, you MUST place your sitemap file in the root directory (Look at the "Location of your sitemap file" section on this page)!",'sitemap'); + echo "
    • "; + echo "" . __('URL to the page','sitemap'). ": "; + _e("Enter the URL to the page. Examples: http://www.foo.com/index.html or www.foo.com/home ",'sitemap'); + echo "
    • "; + echo "" . __('Priority','sitemap') . ": "; + _e("Choose the priority of the page relative to the other pages. For example, your homepage might have a higher priority than your imprint.",'sitemap'); + echo "
    • "; + echo "" . __('Last Changed','sitemap'). ": "; + _e("Enter the date of the last change as YYYY-MM-DD (2005-12-31 for example) (optional).",'sitemap'); + + echo "
    "; + + + ?> + + + + + + + + + + + sg->_pages)<=0) { ?> + + + +
    + + HtmlPrintBoxFooter(); ?> + + + + HtmlPrintBoxHeader('sm_postprio',__('Post Priority', 'sitemap')); ?> + +

    +
      +
    • sg->HtmlGetChecked($this->sg->GetOption("b_prio_provider"),"") ?> />

    • + sg->_prioProviders); $i++) { + echo "
    • sg->_prioProviders[$i] . "\" " . $this->sg->HtmlGetChecked($this->sg->GetOption("b_prio_provider"),$this->sg->_prioProviders[$i]) . " />
      " . call_user_func(array(&$this->sg->_prioProviders[$i], 'getDescription')) . "

    • "; + } + ?> +
    + HtmlPrintBoxFooter(); ?> + + + + HtmlPrintBoxHeader('sm_location',__('Location of your sitemap file', 'sitemap')); ?> + +
    + + +
    +
    + +
      +
    • + +
    • +
    • + +
    • +
    +
    + + HtmlPrintBoxFooter(); ?> + + + HtmlPrintBoxHeader('sm_includes',__('Sitemap Content', 'sitemap')); ?> + +
      +
    • + +
    • +
    • + +
    • +
    • + +
    • +
    • + +
    • +
    • + +
    • +
    • + +
    • + sg->IsTaxonomySupported()): ?> +
    • + +
    • + sg->GetCustomTaxonomies(); + + $enabledTaxonomies = $this->sg->GetOption('in_tax'); + + foreach ($taxonomies as $taxName) { + + $taxonomy = get_taxonomy($taxName); + $selected = in_array($taxonomy->name, $enabledTaxonomies); + ?> +
    • + +
    • + + +
    • + +
    • +
    + : +
      +
    • +
      + all sitemap entries.', 'sitemap') ?> +
    • +
    + + HtmlPrintBoxFooter(); ?> + + + HtmlPrintBoxHeader('sm_excludes',__('Excluded items', 'sitemap')); ?> + + : + =")): ?> + : +
    +
      + sg->GetOption("b_exclude_cats"),false); ?> +
    +
    + +
    + + + : +
    +
    + : +
    + + HtmlPrintBoxFooter(); ?> + + + HtmlPrintBoxHeader('sm_change_frequencies',__('Change frequencies', 'sitemap')); ?> + +

    + : + +

    +
      +
    • + +
    • +
    • + +
    • +
    • + +
    • +
    • + +
    • +
    • + +
    • +
    • + +
    • + sg->IsTaxonomySupported()): ?> +
    • + +
    • + +
    • + +
    • +
    + + HtmlPrintBoxFooter(); ?> + + + HtmlPrintBoxHeader('sm_priorities',__('Priorities', 'sitemap')); ?> +
      +
    • + +
    • +
    • + +
    • +
    • + +
    • +
    • + +
    • +
    • + +
    • +
    • + +
    • + sg->IsTaxonomySupported()): ?> +
    • + +
    • + +
    • + +
    • +
    + + HtmlPrintBoxFooter(); ?> + +
    +
    +

    + + + +

    +
    + + mode == 27): ?> +
    +
    + +
    + + +
    + array("cc"=>"USD","lc"=>"US"), + "en-GB"=>array("cc"=>"GBP","lc"=>"GB"), + "de"=>array("cc"=>"EUR","lc"=>"DE"), + ); + $myLc = $lc["en"]; + $wpl = get_bloginfo('language'); + if(!empty($wpl)) { + if(array_key_exists($wpl,$lc)) $myLc = $lc[$wpl]; + else { + $wpl = substr($wpl,0,2); + if(array_key_exists($wpl,$lc)) $myLc = $lc[$wpl]; + } + } + ?> + + " /> + + + + + " /> + + " /> + + + "/> +
    +
    + Configuration Page + Version: 3.2 + Author: Arne Brachhold + Author URI: http://www.arnebrachhold.de/ +*/ + +/** + * Loader class for the Google Sitemap Generator + * + * This class takes care of the sitemap plugin and tries to load the different parts as late as possible. + * On normal requests, only this small class is loaded. When the sitemap needs to be rebuild, the generator itself is loaded. + * The last stage is the user interface which is loaded when the administration page is requested. + */ +class GoogleSitemapGeneratorLoader { + /** + * Enabled the sitemap plugin with registering all required hooks + * + * If the sm_command and sm_key GET params are given, the function will init the generator to rebuild the sitemap. + */ + function Enable() { + + //Register the sitemap creator to wordpress... + add_action('admin_menu', array('GoogleSitemapGeneratorLoader', 'RegisterAdminPage')); + + //Nice icon for Admin Menu (requires Ozh Admin Drop Down Plugin) + add_filter('ozh_adminmenu_icon', array('GoogleSitemapGeneratorLoader', 'RegisterAdminIcon')); + + //Additional links on the plugin page + add_filter('plugin_row_meta', array('GoogleSitemapGeneratorLoader', 'RegisterPluginLinks'),10,2); + + //Existing posts was deleted + add_action('delete_post', array('GoogleSitemapGeneratorLoader', 'CallCheckForAutoBuild'),9999,1); + + //Existing post was published + add_action('publish_post', array('GoogleSitemapGeneratorLoader', 'CallCheckForAutoBuild'),9999,1); + + //Existing page was published + add_action('publish_page', array('GoogleSitemapGeneratorLoader', 'CallCheckForAutoBuild'),9999,1); + + //WP Cron hook + add_action('sm_build_cron', array('GoogleSitemapGeneratorLoader', 'CallBuildSitemap'),1,0); + + //External build hook + add_action('sm_rebuild', array('GoogleSitemapGeneratorLoader', 'CallBuildNowRequest'),1,0); + + //Robots.txt request + add_action('do_robots', array('GoogleSitemapGeneratorLoader', 'CallDoRobots'),100,0); + + //Help topics for context sensitive help + add_filter('contextual_help_list', array('GoogleSitemapGeneratorLoader', 'CallHtmlShowHelpList'),9999,2); + + //Check if this is a BUILD-NOW request (key will be checked later) + if(!empty($_GET["sm_command"]) && !empty($_GET["sm_key"])) { + GoogleSitemapGeneratorLoader::CallCheckForManualBuild(); + } + + //Check if the result of a ping request should be shown + if(!empty($_GET["sm_ping_service"])) { + GoogleSitemapGeneratorLoader::CallShowPingResult(); + } + } + + /** + * Registers the plugin in the admin menu system + */ + function RegisterAdminPage() { + + if (function_exists('add_options_page')) { + add_options_page(__('XML-Sitemap Generator','sitemap'), __('XML-Sitemap','sitemap'), 10, GoogleSitemapGeneratorLoader::GetBaseName(), array('GoogleSitemapGeneratorLoader','CallHtmlShowOptionsPage')); + } + } + + function RegisterAdminIcon($hook) { + if ( $hook == GoogleSitemapGeneratorLoader::GetBaseName() && function_exists('plugins_url')) { + return plugins_url('img/icon-arne.gif',GoogleSitemapGeneratorLoader::GetBaseName()); + } + return $hook; + } + + function RegisterPluginLinks($links, $file) { + $base = GoogleSitemapGeneratorLoader::GetBaseName(); + if ($file == $base) { + $links[] = '' . __('Settings') . ''; + $links[] = '' . __('FAQ') . ''; + $links[] = '' . __('Support') . ''; + $links[] = '' . __('Donate') . ''; + } + return $links; + } + + /** + * Invokes the HtmlShowOptionsPage method of the generator + */ + function CallHtmlShowOptionsPage() { + if(GoogleSitemapGeneratorLoader::LoadPlugin()) { + $gs = GoogleSitemapGenerator::GetInstance(); + $gs->HtmlShowOptionsPage(); + } + } + + /** + * Invokes the CheckForAutoBuild method of the generator + */ + function CallCheckForAutoBuild($args) { + if(GoogleSitemapGeneratorLoader::LoadPlugin()) { + $gs = GoogleSitemapGenerator::GetInstance(); + $gs->CheckForAutoBuild($args); + } + } + + /** + * Invokes the CheckForAutoBuild method of the generator + */ + function CallBuildNowRequest() { + if(GoogleSitemapGeneratorLoader::LoadPlugin()) { + $gs = GoogleSitemapGenerator::GetInstance(); + $gs->BuildNowRequest(); + } + } + + /** + * Invokes the BuildSitemap method of the generator + */ + function CallBuildSitemap() { + if(GoogleSitemapGeneratorLoader::LoadPlugin()) { + $gs = GoogleSitemapGenerator::GetInstance(); + $gs->BuildSitemap(); + } + } + + /** + * Invokes the CheckForManualBuild method of the generator + */ + function CallCheckForManualBuild() { + if(GoogleSitemapGeneratorLoader::LoadPlugin()) { + $gs = GoogleSitemapGenerator::GetInstance(); + $gs->CheckForManualBuild(); + } + } + + /** + * Invokes the ShowPingResult method of the generator + */ + function CallShowPingResult() { + if(GoogleSitemapGeneratorLoader::LoadPlugin()) { + $gs = GoogleSitemapGenerator::GetInstance(); + $gs->ShowPingResult(); + } + } + + + function CallHtmlShowHelpList($filterVal,$screen) { + if($screen == "settings_page_sitemap") { + $links = array( + __('Plugin Homepage','sitemap')=>'http://www.arnebrachhold.de/redir/sitemap-help-home/', + __('Sitemap FAQ')=>'http://www.arnebrachhold.de/redir/sitemap-help-faq/' + ); + + $filterVal["settings_page_sitemap"] = ''; + + $i=0; + foreach($links AS $text=>$url) { + $filterVal["settings_page_sitemap"].='' . $text . '' . ($i < (count($links)-1)?'
    ':'') ; + $i++; + } + } + return $filterVal; + } + + function CallDoRobots() { + if(GoogleSitemapGeneratorLoader::LoadPlugin()) { + $gs = GoogleSitemapGenerator::GetInstance(); + $gs->DoRobots(); + } + } + + /** + * Loads the actual generator class and tries to raise the memory and time limits if not already done by WP + * + * @return boolean true if run successfully + */ + function LoadPlugin() { + + $mem = abs(intval(@ini_get('memory_limit'))); + if($mem && $mem < 32) { + @ini_set('memory_limit', '32M'); + } + + $time = abs(intval(@ini_get("max_execution_time"))); + if($time != 0 && $time < 120) { + @set_time_limit(120); + } + + if(!class_exists("GoogleSitemapGenerator")) { + + $path = trailingslashit(dirname(__FILE__)); + + if(!file_exists( $path . 'sitemap-core.php')) return false; + require_once($path. 'sitemap-core.php'); + } + + GoogleSitemapGenerator::Enable(); + return true; + } + + /** + * Returns the plugin basename of the plugin (using __FILE__) + * + * @return string The plugin basename, "sitemap" for example + */ + function GetBaseName() { + return plugin_basename(__FILE__); + } + + /** + * Returns the name of this loader script, using __FILE__ + * + * @return string The __FILE__ value of this loader script + */ + function GetPluginFile() { + return __FILE__; + } + + /** + * Returns the plugin version + * + * Uses the WP API to get the meta data from the top of this file (comment) + * + * @return string The version like 3.1.1 + */ + function GetVersion() { + if(!function_exists('get_plugin_data')) { + if(file_exists(ABSPATH . 'wp-admin/includes/plugin.php')) require_once(ABSPATH . 'wp-admin/includes/plugin.php'); //2.3+ + else if(file_exists(ABSPATH . 'wp-admin/admin-functions.php')) require_once(ABSPATH . 'wp-admin/admin-functions.php'); //2.1 + else return "0.ERROR"; + } + $data = get_plugin_data(__FILE__); + return $data['Version']; + } + + +} + +//Enable the plugin for the init hook, but only if WP is loaded. Calling this php file directly will do nothing. +if(defined('ABSPATH') && defined('WPINC')) { + add_action("init",array("GoogleSitemapGeneratorLoader","Enable"),1000,0); +} +?> \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/google-sitemap-generator/sitemap.xsl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/google-sitemap-generator/sitemap.xsl Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,110 @@ + + + + + + + XML Sitemap + + + + +

    XML Sitemap

    +
    +

    + This is a XML Sitemap which is supposed to be processed by search engines like Google, MSN Search and YAHOO.
    + It was generated using the Blogging-Software WordPress and the Google Sitemap Generator Plugin by Arne Brachhold.
    + You can find more information about XML sitemaps on sitemaps.org and Google's list of sitemap programs. +

    +
    +
    + + + + + + + + + + + + + high + + + + + + + +
    URLPriorityChange FrequencyLastChange
    + + + + + + + + + + + + +
    +
    + + + +
    +
    \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/hello.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/hello.php Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 web/wp-content/plugins/index.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/index.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,3 @@ + \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/page2cat/page2cat.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/page2cat/page2cat.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,850 @@ +
    + +Category Page plugin + | +Support Forum | +GPL2© ≥ 2007 Paolo Tresso / Pixline | +If you like this plugin, support its development with a small donation.

    '); + +$wpdb->page2cat = $table_prefix . 'page2cat'; + +###################################################### +# check version. # +###################################################### + +$p2c_version = get_option('pixline_page2cat_version'); + register_activation_hook(__FILE__, 'page2cat_install'); + +// DB installation. usually happen just one time. +function page2cat_install(){ +global $wpdb, $p2c_version; + +if ($version < 6): + $query = " + CREATE TABLE `".$wpdb->prefix."page2cat` ( + `rel_ID` BIGINT NOT NULL AUTO_INCREMENT , + `page_ID` BIGINT NOT NULL , + `cat_ID` BIGINT NOT NULL , + PRIMARY KEY ( `rel_ID` ) , + INDEX ( `page_ID` , `cat_ID` ) + ); + "; + + if(is_file(ABSPATH . 'wp-admin/includes/upgrade.php')){ + require_once(ABSPATH . 'wp-admin/includes/upgrade.php'); + }elseif(is_file(ABSPATH . 'wp-admin/upgrade-functions.php')){ + require_once(ABSPATH . 'wp-admin/upgrade-functions.php'); + } + + if($wpdb->get_var("SHOW TABLES LIKE '".$wpdb->prefix."page2cat'") != $wpdb->prefix."page2cat") { + dbDelta($query); + delete_option('pixline_page2cat_version'); + add_option('pixline_page2cat_version', 6); + } + +update_option('p2c_use_empty','false'); +update_option('p2c_show_used_pages','false'); +update_option('p2c_catlist_limit',5); +update_option('p2c_catlist_title',''); +endif; + +delete_option('p2c_use_img'); // deprecated, so we're going to delete it anyway. +if( !get_option('p2c_use_empty')) update_option('p2c_use_empty','false'); +if(!get_option('p2c_show_used_pages')) update_option('p2c_show_used_pages','false'); +if(!get_option('p2c_catlist_limit')) update_option('p2c_catlist_limit',5); +if(!get_option('p2c_catlist_title')) update_option('p2c_catlist_title',''); +} + +###################################### +# setup management and option panels # +###################################### + +// adds a panel under "manage » category pages" +// shows actual connections, and allow creations of new ones. +function page2cat_manage_page(){ +global $wpdb, $wp_db_version; + + #print_r($_POST); #die(); + + // multiple delete + if( isset($_POST['deleteit']) && !empty($_POST['p2c_reldel'])): + foreach($_POST['p2c_reldel'] as $key=>$id): + $query = "DELETE FROM {$wpdb->page2cat} WHERE rel_ID = '".$id."' LIMIT 1;"; + $daje = $wpdb->get_results($query); + endforeach; + echo '
    +

    Some connections deleted.

    '; + endif; + + // multiple link + if( isset($_POST['action']) && $_POST['p2c_linkto'] == true && $_POST['multipageid'] != ""): +# print_r($_POST); + $pageid = $_POST['multipageid'][0]; + foreach($_POST['p2c_reladd'] as $key=>$id): + if(trim($id)!=""): + $query = "INSERT INTO {$wpdb->page2cat} (rel_ID, page_ID, cat_ID) VALUES ('', '".$pageid."', '".$id."');"; + $daje = $wpdb->get_results($query); + endif; + endforeach; + echo '
    +

    Connections created.

    '; + + elseif( isset($_POST['action']) && $_POST['p2c_update'] == true): +# print_r($_POST); die(); + $pageid = $_POST['pageid']; + foreach($pageid as $cat_id=>$page_id): + if(trim($page_id) != ""): + $sql = "INSERT INTO {$wpdb->page2cat} (rel_ID, page_ID, cat_ID) VALUES ('', '".$page_id."', '".$cat_id."');"; + $result = $wpdb->get_results($sql); + endif; + endforeach; + echo('
    +

    New Category Page created succesfully.

    '); + endif; + + // single delete, confirm request + if( isset($_REQUEST['p2cdel']) && !isset($_REQUEST['p2c_confirm']) ): + $relid = $wpdb->escape($_REQUEST['p2cdel']); + echo "

    Delete this Category › Page relation?

    "; + $opt = $wpdb->get_results("SELECT * FROM {$wpdb->page2cat} WHERE rel_ID = '".$relid."' LIMIT 1;"); + $catid = $opt[0]->cat_ID; + $pageid = $opt[0]->page_ID; + $catname = get_cat_name($catid); + $page = get_page($pageid); + $title = $page->post_title; + echo "
    "; + echo "

    You are going to delete the relationship between + Category ".$catname." and Page ".$title.". Confirm?

    "; + echo '

    + + + + +

    '; + echo "
    "; + endif; + + // confirmed, so delete this connection + if( isset($_REQUEST['p2cdel']) && $_REQUEST['p2c_confirm'] == 'true'): + $relid = $wpdb->escape($_REQUEST['p2cdel']); + $myopts = $wpdb->get_results("DELETE FROM {$wpdb->page2cat} WHERE rel_ID = '".$relid."' LIMIT 1;"); + echo('

    You have succesfully deleted a connection.

    '); + echo ""; + endif; + + + /* + real pages + */ + $count_used = $wpdb->get_var("SELECT count(*) FROM {$wpdb->page2cat};"); + + if($wp_db_version >= 6124): // this is WordPress >= 2.3 + $count_full = $wpdb->get_var("SELECT count(*) + FROM {$wpdb->terms} AS t LEFT JOIN {$wpdb->term_taxonomy} AS tt + ON t.term_id = tt.term_id WHERE tt.taxonomy='category';"); + + $count_noempty = $wpdb->get_var("SELECT count(*) + FROM {$wpdb->terms} AS t LEFT JOIN {$wpdb->term_taxonomy} AS tt + ON t.term_id = tt.term_id WHERE tt.taxonomy='category' AND tt.count != '0';"); + else: // WP < 2.3 + $count_full = $wpdb->get_var("SELECT count(*) FROM {$wpdb->categories};"); + $count_noempty = $wpdb->get_var("SELECT count(*) FROM {$wpdb->categories}; WHERE category_count != '0';"); + endif; + + $count_free = $count_full - $count_used; + if(get_option('p2c_use_empty') == "false"): $count_usable = $count_noempty - $count_used; else : $count_usable = $count_free; endif; + + + // this is the already connected page + + + $myopts = $wpdb->get_results("SELECT * FROM {$wpdb->page2cat} ORDER BY page_ID ASC;"); + $usedcats = array(); + $usedpages = array(); + + if($_REQUEST['view'] == 'new'): + $css1 = ''; $css2 = ' class="current"'; + $pagetitle = "New connection"; + else: + $css1 = ' class="current"'; $css2 = ''; + $pagetitle = "Manage connections"; + endif; + + + if( !isset($_REQUEST['p2cdel'])): + echo "

    Category Pages

    "; + echo ''; + +if($_REQUEST['view'] != 'new'): + + if(count($myopts) != 0): +# echo "

    These categories and these pages are already connected each other. You can view the category page in your website, clicking on the Category name. You can also edit or delete each connection.

    "; + + echo "
    "; + echo "
     
    "; + echo '
    +
    + + + + +
    '; + echo "
    "; + echo "
    "; + + echo "
    "; + echo ' + '; + echo ""; + echo ""; + echo " + + + + + "; + echo ""; + foreach($myopts as $opt): + $catid = $opt->cat_ID; + $pageid = $opt->page_ID; + $catname = get_cat_name($catid); + $usedcats[] = $catid; + $usedpages[] = $pageid; + $page = get_page($pageid); + $title = $page->post_title; + + echo " + + + + + "; + endforeach; + + echo ""; + echo "
    "; + if($wp_db_version >= 7098): echo "" ; + else: echo " "; endif; + echo "Host CategoryHeader Page 
    ".$catname." + ".$title." + Delete
    "; + + echo "
    "; + echo "
     
    "; + echo '
    + + + + + + +
    '; + echo "
    "; + echo "
    "; + + else: + + echo "

    Sorry, no Category » Page connection available (yet). Maybe you want to create some new connections?

    "; + endif; + + +else: +// this is the 'new' page + + $usedcats = $wpdb->get_col("SELECT cat_ID FROM {$wpdb->page2cat};"); +# print_r($usedcats); + $opt3 = get_option('p2c_use_empty'); + if($opt3 == "true"): $empty = false; $excats = ""; elseif($opt3 == "false"): $empty = true; $excats = implode(',',$usedcats); endif; + + $catdef = array('type' => 'post', 'child_of' => 0, 'orderby' => 'name', 'order' => 'ASC', + 'hide_empty' => $empty, 'include_last_update_time' => false, 'hierarchical' => true, + 'exclude' => $excats, 'include' => '', 'number' => '', 'pad_counts' => true); + $others = get_categories($catdef); + + $used = count($usedcats); + $count = count($others); + + if( $count == 0): + echo "

    Sorry, you don't have any usable category (or there are some, but empty; check your settings).

    "; + else: +# echo "

    New connections

    "; +# echo "

    These categories aren't connected with any page. Here you can setup a connection with an existent page, or create a brand new one.

    "; + + echo "
    "; + $pages_already_used = implode(',',$usedpages); + if(get_option('p2c_show_used_pages')=='true') $exclude = $pages_already_used; else $exclude =""; + + // wp_dropdown_pages settings (for both boxes in this page) + $pre_ddprefs = array('depth' => 0, 'child_of' => 0, 'selected' => 0, + 'echo' => 0,'name' => 'multipageid[]', 'exclude' => $exclude, + 'show_option_none' => '(none)'); + + +/* + echo "
    "; + echo "
    + +
    +
    "; + echo '
    + + + + Link checked to: + '.wp_dropdown_pages($pre_ddprefs).' + +
    '; + echo "
     
    "; + echo "
    "; +*/ + echo ""; + echo ""; + echo " + "; + echo " + + + "; + echo ""; + + + foreach($others as $otro): + switch($wp_db_version): + // "7098"=>"2.5", "6124"=>"2.3.3", "5183"=>"2.2.1", "4773"=>"2.1.3" + case ( $wp_db_version < 5183 ): // WP 2.1.3 and smaller + $versioned_catid = $otro->cat_ID; + $versioned_catname = $otro->cat_name; + $versioned_slug = $otro->category_nicename; + $versioned_count = $otro->category_count + $otro->posts_private; + break; + case ( $wp_db_version >= 5183 ): // WP 2.2.1 and greater + default: + $versioned_catid = $otro->term_id; + $versioned_catname = $otro->name; + $versioned_slug = $otro->category_nicename; + $versioned_count = $otro->count; + break; + endswitch; + + // wp_dropdown_pages settings + $ddprefs = array('depth' => 0, 'child_of' => 0, 'selected' => 0, + 'echo' => 0,'name' => 'pageid['.$versioned_catid.']', + 'exclude' => $exclude, 'show_option_none' => '(none)'); + + $output = " + + + "; + $output .= " + "; + + $stringhe[$versioned_catname] = $output; + endforeach; + + asort($stringhe); + reset($stringhe); + + foreach($stringhe as $stringa): + echo $stringa; + endforeach; + + echo ""; + echo "
    "; + if($wp_db_version >= 7098): echo ""; + else: echo " "; endif; + echo "Host CategoryChoose PageCreate New Page
    ".$versioned_catname." ".wp_dropdown_pages($ddprefs)."Create New
    "; + + echo "
    "; + echo "
    + +
    "; + echo '
    + + + + Link checked to: + '.wp_dropdown_pages($pre_ddprefs).' + +
    '; + echo "
    "; + echo "
    "; +endif; + + echo "
    "; + endif; + echo PIXLINE_FOOTER; + echo "
    "; + endif; +} + +// adds styles in admin head (WP 2.5+) +function page2cat_metabox_styles(){ +?> + + + + +
    +

    Category Pages

    +
    + +
    +
    +get_results("SELECT * FROM {$wpdb->page2cat} WHERE page_ID = '".$post_ID."';",OBJECT); + ?> +

    Use this page as Category Page for these categories.

    + 0): + echo "
      "; + foreach($mypage as $connection): + # print_r($connection); + echo "
    • ".get_cat_name($connection->cat_ID)."
    • + "; + $usedcats[] = $connection->cat_ID; + endforeach; + echo "
    "; + endif; + + $opt3 = get_option('p2c_use_empty'); + if($opt3 == "true"): $empty = false; $exclude = ""; + elseif($opt3 == "false"): $empty = true; $exclude = implode(',',$usedcats); + endif; + + $catdef = array('type' => 'post', 'child_of' => 0, 'orderby' => 'name', 'order' => 'ASC', 'exclude' => $exclude, + 'hide_empty' => $empty, 'include_last_update_time' => false, 'hierarchical' => true, 'pad_counts' => true); + + $others = get_categories($catdef); + echo "
    "; + echo "
      "; + foreach($others as $cat): + #print_r($cat); exit(); + if($cat->cat_ID == $_REQUEST['p2c']): $flag = "checked='checked'"; else: $flag = ""; endif; + + $has_page = $wpdb->get_var("SELECT count(*) FROM {$wpdb->page2cat} WHERE cat_ID = '".$cat->cat_ID."'"); + if($has_page == 0): + echo "
    • " + ."".get_cat_name($cat->cat_ID)."
    • + "; + else: +# echo "
    • " +# .get_cat_name($cat->cat_ID)." (".$cat->category_count." items)
    • +# "; + $nothing = 0; + endif; + endforeach; + echo "
    "; + echo "
    "; + echo "
    "; + ?> + page2cat} WHERE page_ID = '".$_POST['post_ID']."'"; +$result = $wpdb->get_results($via); +if(count($values) > 0): +foreach($values as $key=>$cat){ + if($_POST['post_ID'] != ""): + $sql = "INSERT INTO {$wpdb->page2cat} (rel_ID, page_ID, cat_ID) VALUES ('','".$_POST['post_ID']."','".$cat."')"; + $result = $wpdb->get_results($sql); + endif; +} +endif; +} + +// trigger page deletion and free db relations +function page2cat_trigger_delete(){ + // yes, there's no trigger, actually.... +} + +// filter the content of a page, check for tag and replace it with a list of posts in the requested category. +// function heavily inspired from Alex Rabe NextGen Gallery's nggfunctions.php. +function page2cat_content_catlist($content){ +global $post; + if ( stristr( $content, '[catlist' )) { + $search = "@(?:

    )*\s*\[catlist\s*=\s*(\w+|^\+)\]\s*(?:

    )*@i"; + if (preg_match_all($search, $content, $matches)) { + if (is_array($matches)) { + $title = get_option('p2c_catlist_title'); + if($title != "") $output = "

    ".$title."

    "; else $output = ""; + $output .= "
      "; + $limit = get_option('p2c_catlist_limit'); + foreach ($matches[1] as $key =>$v0) { + $catposts = get_posts('category='.$v0."&numberposts=".$limit); + foreach($catposts as $single): + $output .= "
    • ".$single->post_title."
    • "; + endforeach; + $search = $matches[0][$key]; + $replace= $output; + $content= str_replace ($search, $replace, $content); + } + $output .= "
    "; + } + } + } +return $content; +} + +// add real option page +function page2cat_options_page(){ +global $wpdb, $styles; + +$p2c_defaults = array("show_usedpages_yes"=>"","show_usedpages_no"=>"","use_empty_no"=>"", "use_empty_yes"=>"", "catlist_limit"=>"", "catlist_title"=>""); + +if(isset($_POST['page2cat_action'])): +#print_r($_POST); #die(); + $sane1 = strip_tags(htmlentities($_POST['p2c_catlist_limit'])); + update_option('p2c_catlist_limit',$sane1); + $sane4 = strip_tags(htmlentities($_POST['p2c_catlist_title'])); + update_option('p2c_catlist_title',$sane4); + $sane2 = strip_tags(htmlentities($_POST['p2c_show_used_pages'])); + update_option('p2c_show_used_pages',$sane2); + $sane3 = strip_tags(htmlentities($_POST['p2c_use_empty'])); + update_option('p2c_use_empty',$sane3); + echo('

    Settings saved.

    '); +endif; + +$opt3 = get_option('p2c_use_empty'); +if($opt3 == "false"){ + $p2c_defaults['use_empty_no'] = ' selected="selected"'; +}elseif($opt3 == "true"){ + $p2c_defaults['use_empty_yes'] = ' selected="selected"'; +} + +$opt2 = get_option('p2c_show_used_pages'); +if($opt2 == "false"){ + $p2c_defaults['show_usedpages_no'] = ' selected="selected"'; +}elseif($opt2 == "true"){ + $p2c_defaults['show_usedpages_yes'] = ' selected="selected"'; +} + +$p2c_catlist_title = get_option('p2c_catlist_title'); + + + echo "
    "; + echo "

    Category Page settings

    "; + echo "
    "; + + echo ' +

    Management settings

    +

    These settings let you customize your Category Page management panel.

    + + + + + + + + + + + +
    Show empty categories + (Choose whether empty categories are shown or not. ) +
    Allow single page sharing + (You can share a single page with more than a category, if you like.) +
    + +

    [catlist] tag settings

    +

    You can use a [catlist=xx] tag in a post/page to show a list of post from a certain category, replacing xx with the category ID.

    + + + + + + + + + + + +
    Display at most + posts. +
    Display list title + (Leave empty to show a post list without a title.) +
    + '; + + echo '

    + + +

    + '; + + echo '
    '; + echo PIXLINE_FOOTER; + echo "
    "; +} + +// template function for manual hacks and widgets :-) +function page2cat_output($cat, $style = 'getpost', $useimg = 1){ +global $wpdb; + + $useimg = get_option('p2c_use_img'); + $mypage = $wpdb->get_row("SELECT * FROM {$wpdb->page2cat} WHERE cat_ID = '".$cat."';",OBJECT); +# print_r($mypage); + $pageid = $mypage->page_ID; + if($pageid != ""): + + switch($style): + + case 'getpost': + ?> +
    + post_title!=""){ + ?> +
    +

    post_title; ?>

    +

    +
    +
    +
    + +
    + posts} WHERE ID='".$pageid."' AND post_type = 'page';"; + $mine = $wpdb->get_results($pagina); + if($mine[0]->post_title!=""){ + ?> +
    + +

    post_content,1); ?>

    +
    +
    +
    + +
    + posts} WHERE ID='".$pageid."' AND post_type = 'page';"; + $mine = $wpdb->get_results($pagina); + if($mine[0]->post_title!=""){ + ?> +
    +

    post_title; ?>

    +

    post_content,1); ?>

    +
    +
    +
    + + '.single_cat_title('',false).''; + endif; +} + + +// adds sidebox in page write/edit +function page2cat_init(){ + if (function_exists('add_meta_box')) { + add_meta_box('page2cat','Category Page Options', 'page2cat_add_meta_box', 'page'); + add_action('admin_head','page2cat_metabox_styles'); + } else { + add_action('dbx_page_sidebar', 'page2cat_add_sidebox'); + add_action('admin_head','page2cat_sidebox_styles'); + } +} +// install management and options page +function page2cat_config_page() { + if ( function_exists('add_submenu_page') && is_admin()): + add_submenu_page('edit.php', __('Category Pages'), __('Category Pages'), 8, 'category-pages', 'page2cat_manage_page'); + endif; + if( function_exists('add_options_page') && is_admin()): + add_options_page('Category Pages options','Category Pages',8,'category-page-options','page2cat_options_page'); + endif; +} + + +if( is_admin() ): + if( preg_match('|page-new.php|i', $_SERVER['REQUEST_URI']) || + preg_match('|page.php|i', $_SERVER['REQUEST_URI']) || + preg_match('|edit.php|i', $_SERVER['REQUEST_URI']) ){ + add_action('admin_menu', 'page2cat_init'); + } + add_action('admin_menu', 'page2cat_config_page'); + add_action('save_post','page2cat_trigger_save'); +endif; + +add_filter('the_content','page2cat_content_catlist'); // by popular demand :-) +?> diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/page2cat/readme.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/page2cat/readme.txt Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,47 @@ +=== Category Page === +Contributors: pixline +Donate link: http://tinyurl.com/375yrk +Tags: admin, pages, category, formatting, plugin, categories, integration, page, theme +Requires at least: 2.2 +Tested up to: 2.5 +Stable tag: 2.5 + +Use pages as category archive header, or list some posts from a category into a post/page. + +== Description == + +This plugin will let you setup connection between pages and categories, in order to display the page content like a "header" for your category archive (theme tweak required). By popular demand, version 2.5 also ships with a shortcode like [catlist] that allows to display a list of posts from a certain category inside a post or a page. +. +Copyright (C) 2008 Paolo Tresso / [Pixline](http://pixline.net/) + +[plugin page](http://pixline.net/wordpress-plugins/category-page-plugin/en/) - [support forum](http://talks.pixline.net/forum/category-page-plugin) + +== Installation == + +1. Download the plugin Zip archive. +1. Upload `Category Page` folder to your `/wp-content/plugins/` directory +1. Activate the plugin through the 'Plugins' menu in WordPress +1. Setup some relationship between Categories and Pages +1. Tweak `archive.php` in your theme folder (while I write documentation, please [read here](http://talks.pixline.net/topic.php?id=13#post-32) to learn how). +1. Enjoy! + +[plugin page](http://pixline.net/wordpress-plugins/category-page-plugin/en/) - [support forum](http://talks.pixline.net/forum/category-page-plugin) + + +== Changelog == + +* 2.5 (26/03/07) WordPress 2.5 compliance. Theme examples released as separate theme pack. +* 0.4.4 (03/09/07) fix content filters. 2.3 compliant release. +* 0.4.3 (30/08/07) 2.3beta1-compliant release +* 0.4.2 (22/08/07) microbugfix, example files for Kubrik, Hemingway and Sandbox themes. +* 0.4.1 (15/08/07) fix 'foreach' errors +* 0.4 (10/08/07) stable release for 0.4. going to the next level. +* 0.4b2 (06/08/07) fix for db version... +* 0.4b (05/08/07) TESTING RELEASE svn only. moved to database, plugin almost rewritten from scratch. +* 0.3 (27/07/07) many fixes for 2.1.3, 2.2.1 and svn compatibility. archive.php example fixed. +* 0.2.1 (19/07/07) fixed backward compatibility for 2.1 +* 0.2 (18/07/07) management and options panel, better sidebox, widget available, one more example theme. +* 0.1 (17/07/07) first tag. alpha 2 with some typo fixing. +* 0.1a2 (17/07/07) fix sidebox in page editing, manage panel. +* 0.1a (16/07/07) first public alpha. +` \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/php-code-widget/execphp.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/php-code-widget/execphp.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,78 @@ + 'widget_execphp', 'description' => __('Arbitrary text, HTML, or PHP Code')); + $control_ops = array('width' => 400, 'height' => 350); + $this->WP_Widget('execphp', __('PHP Code'), $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_execphp', $instance['text'], $instance ); + echo $before_widget; + if ( !empty( $title ) ) { echo $before_title . $title . $after_title; } + ob_start(); + eval('?>'.$text); + $text = ob_get_contents(); + ob_end_clean(); + ?> +
    + '', 'text' => '' ) ); + $title = strip_tags($instance['title']); + $text = format_to_edit($instance['text']); +?> +

    +

    + + + +

    /> 

    + tags for it to be +recognized. + +WARNING: Upgrading to 2.0 from 1.2 may cause loss of your existing widgets. +Copy the code you have in them elsewhere first, then recreate your widgets +afterwards. + +== Installation == + +1. Upload `execphp.php` to the `/wp-content/plugins/` directory +1. Activate the plugin through the 'Plugins' menu in WordPress +1. Use the widget like any other widget. + +== Frequently Asked Questions == + += There's some kind of error on line 43! = + +That error means that your PHP code is incorrect or otherwise broken. + += No, my code is fine! = + +No, it's not. + +Really. + +This widget has no bugs, it's about the simplest widget one can possibly +make. Any errors coming out of the "execphp,php" file are errors in code you +put into one of the widgets. The reason that it shows the error being in the +execphp.php file is because that is where your code is actually being run +from. + +So, if it says that you have an error on line 43, I assure you, the problem +is yours. Please don't email me about that error. + +== Screenshots == + +1. The widgets screen showing a PHP code widget in use. +2. The output of the widget on the site. + +== Changelog == += 2.1 = +* Fixed broken wpautop filter. Checkbox on widget works now. + += 2.0 = +* Changed widget to use new Class methods for creating widget. This simplifies the widget and should eliminate any problems with it losing code or disappearing from sidebars and so forth. +* WARNING: Version 2.0 REQUIRES WordPress 2.8 and up. It will not work with older versions. +* WARNING: Upgrading this widget from 1.x might cause the widget to LOSE YOUR EXISTING SIDEBAR CODE. Copy and paste the existing code somewhere else before upgrading (just in case), then recreate the widgets afterwards. diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/php-code-widget/screenshot-1.png Binary file web/wp-content/plugins/php-code-widget/screenshot-1.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/php-code-widget/screenshot-2.png Binary file web/wp-content/plugins/php-code-widget/screenshot-2.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/posts-of-current-category/posts-of-current-category-1.jpg Binary file web/wp-content/plugins/posts-of-current-category/posts-of-current-category-1.jpg has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/posts-of-current-category/posts-of-current-category-2.jpg Binary file web/wp-content/plugins/posts-of-current-category/posts-of-current-category-2.jpg has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/posts-of-current-category/posts-of-current-category-3.jpg Binary file web/wp-content/plugins/posts-of-current-category/posts-of-current-category-3.jpg has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/posts-of-current-category/posts-of-current-category.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/posts-of-current-category/posts-of-current-category.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,158 @@ +Widgets and Drag "Posts of Current Category" widget to your Sidebar. +Version: 0.1 +Author: Anup Raj +Author URI: http://anupraj.com.np/home/ +*/ + +class posts_cur_cat extends WP_Widget { + function posts_cur_cat() { + $widget_ops = array('description' => __('Display Posts of current category and order it.', 'posts-of-cur-cat') ); + //Create widget + $this->WP_Widget('postsofcurrentcategory', __('Posts of Current Category', 'posts-of-cur-cat'), $widget_ops); + } + + function widget($args, $instance) { + extract($args, EXTR_SKIP); + echo $before_widget; + + $title = empty($instance['title']) ? __('', 'posts-of-cur-cat') : apply_filters('widget_title', $instance['title']); + $parameters = array( + 'title' => $title, + 'limit' => (int) $instance['show-num'], + 'excerpt' => (int) $instance['excerpt-length'], + 'AscDesc' => esc_attr($instance['AscDesc']), + 'OrderBy' => esc_attr($instance['OrderBy']) + + ); + if ( !empty( $title ) ) { + echo $before_title . $title . $after_title; + }; + + //print recent posts + post_of_curCat($parameters); + echo $after_widget; + + } //end of widget + + //Update widget options + function update($new_instance, $old_instance) { + + $instance = $old_instance; + //get old variables + $instance['title'] = esc_attr($new_instance['title']); + $instance['show-num'] = (int) abs($new_instance['show-num']); + + $instance['OrderBy'] = esc_attr($new_instance['OrderBy']); + $instance['AscDesc'] = esc_attr($new_instance['AscDesc']); + + return $instance; + } //end of update + + //Widget options form + function form($instance) { + + $instance = wp_parse_args( + (array) $instance, + array( + 'title' => __('Posts of Current Category','posts-of-cur-cat'), + 'show-num' => 10, + 'AscDesc' => "ASC", + 'OrderBy' => "ID" + ) + ); + + $title = esc_attr($instance['title']); + $show_num = (int) $instance['show-num']; + $AscDesc = esc_attr($instance['AscDesc']); + $OrderBy = esc_attr($instance['OrderBy']); + + ?> +

    + +

    +

    + +

    +

    + + +

    +

    + + +

    + 10, + 'AscDesc' => "ASC", + 'OrderBy' =>'ID', + + ); + $args = wp_parse_args( $args, $defaults ); + extract($args); + + $limit = (int) abs($limit); + + if(is_category()){ + $curCategoryID = get_query_var('cat'); + } + if (is_single()) { + $curCategoryID = ''; + foreach (get_the_category() as $catt) { + $curCategoryID .= $catt->cat_ID.' '; + } + $curCategoryID = str_replace(" ", ",", trim($curCategoryID)); + } + if (!intval($curCategoryID)) $curCategoryID=''; + + $query = "&category=$curCategoryID&showposts=$limit&orderby=$OrderBy&order=$AscDesc"; + $posts = get_posts($query); //get posts + $postlist = ''; + foreach ($posts as $post) { + $post_title = htmlspecialchars(stripslashes($post->post_title)); + $postlist .= '
  • ' . $post_title . '
  • '; + } + + echo '
      '; + echo $postlist; + echo '
    '; + } +?> \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/posts-of-current-category/readme.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/posts-of-current-category/readme.txt Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,42 @@ +=== Posts of Current Category === +Contributors: Anup Raj +Donate link: http://anupraj.com.np/home/ +Tags: posts,category,list post, display post, current category, show post name, +Requires at least: 2.7.0 +Tested up to: 2.8.4 +Stable tag: 2.8.4 + +Display or List post name of current category. + +== Description == +This Widget is meant to display the recent posts by sorting them. +Posts of Current Category displays 'n' Number of posts of related category. User can Sort the Posts in various orders like author, content, date, ID , .. etc +The posts can be Sorted in ASCending or DESCending way. + +== Installation == + +1. Upload `posts-of-current-category.zip` to the `/wp-content/plugins/` directory +2. Go to Widget through Appreance > Widgets menu in WordPress +3. Drag "Posts of current category" widget to sidebar +4. Update fields as requirement + + +== Frequently Asked Questions == + += What happens when Pages are opened?= + +That's simple it still displays the 'n' No. of posts. + += Is this is a bug? = + +No, this is not a bug. +== Screenshots == + +1. Posts that can be sorted by the order of post's details. posts-of-current-category-1.jpg +2. Options for Posts of Current Category Widget. posts-of-current-category-2.jpg +3. Widgets posts-of-current-category-3.jpg + +== Changelog == + += 0.1 = +* First Release. diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/quick-pagepost-redirect-plugin/license.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/quick-pagepost-redirect-plugin/license.txt Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey 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; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If 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 convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU 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 that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + 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. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +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. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + 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 +state 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 3 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, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program 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, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU 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. But first, please read +. diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/quick-pagepost-redirect-plugin/page_post_redirect_plugin.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/quick-pagepost-redirect-plugin/page_post_redirect_plugin.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,204 @@ +. +*/ + +// Actions +//---------- + add_action('admin_menu', 'add_edit_box_ppr'); + add_action('save_post', 'ppr_save_postdata', 1, 2); // save the custom fields + add_action('wp','ppr_do_redirect', 1, 2); + +// Variables +//---------- + global $wpdb; + global $wp_query; + +// Functions +//---------- + function addmetatohead_theme(){ + global $ppr_url; + $meta_code = ''; + echo $meta_code; + exit;//stop loading page so meta can do it's job without rest of page loading. + } + + function ppr_do_redirect(){ + global $post,$wp_query,$ppr_url,$ppr_active,$ppr_url,$ppr_type; + if($wp_query->is_single || $wp_query->is_page ): + $thisidis_current= $post->ID; + $ppr_active=get_post_meta($thisidis_current,'pprredirect_active',true); + $ppr_url=get_post_meta($thisidis_current,'pprredirect_url',true); + $ppr_type=get_post_meta($thisidis_current,'pprredirect_type',true); + + if( $ppr_active==1 && $ppr_url!='' ): + if($ppr_type===0){$ppr_type='200';} + if($ppr_type===''){$ppr_type='302';} + if($ppr_type=='meta'): + //metaredirect + add_action('wp_head', "addmetatohead_theme",1); + elseif($ppr_url!=''): + //check for http:// - as full url - then we can just redirect if it is // + if( strpos($ppr_url, 'http://')=== 0 || strpos($ppr_url, 'https://')=== 0){ + $offsite=$ppr_url; + header('Status: '.$ppr_type); + header('Location: '.$offsite, true, $ppr_type); + exit; //stop loading page + }elseif(strpos($ppr_url, 'www')=== 0){ // check if they have full url but did not put http:// + $offsite='http://'.$ppr_url; + header("Status: $ppr_type"); + header("Location: $offsite", true, $ppr_type); + exit; //stop loading page + }elseif(is_numeric($ppr_url)){ // page/post number + if($ppr_postpage=='page'){ //page + $onsite=get_bloginfo('url').'/?page_id='.$ppr_url; + header("Status: $ppr_type"); + header("Location: $onsite", true, $ppr_type); + exit; //stop loading page + }else{ //post + $onsite=get_bloginfo('url').'/?p='.$ppr_url; + header("Status: $ppr_type"); + header("Location: $onsite", true, $ppr_type); + exit; //stop loading page + } + //check permalink or local page redirect + }else{ // we assume they are using the permalink / page name?? + $onsite=get_bloginfo('url'). $ppr_url; + header("Location: $onsite", true, $ppr_type); + exit; //stop loading page + } + + endif; + endif; + endif; + } + +//======================================= +// Add options to post/page edit pages +//======================================= + // Adds a custom section to the Post and Page edit screens + function add_edit_box_ppr() { + if( function_exists( 'add_meta_box' )) { + add_meta_box( 'edit-box-ppr', __( 'Quick Page/Post Redirect', 'sp' ), 'edit_box_ppr_1', 'page', 'normal', 'high' ); //for page + add_meta_box( 'edit-box-ppr', __( 'Quick Page/Post Redirect', 'sp' ), 'edit_box_ppr_1', 'post', 'normal', 'high' ); //for post + } + } + + // Prints the inner fields for the custom post/page section + function edit_box_ppr_1() { + global $post; + $ppr_option1=''; + $ppr_option2=''; + $ppr_option3=''; + $ppr_option4=''; + $ppr_option5=''; + // Use nonce for verification ... ONLY USE ONCE! + echo ''; + // The actual fields for data entry + if(get_post_meta($post->ID, 'pprredirect_active', true)!=''){$pprediractive="checked";}else{$pprediractive="";} + echo ' '; + echo ' (check to turn on) NOTE: The page or post needs to be published for the redirect to happen UNLESS you publish it first, then save it as a Draft..

    '; + + echo '
    '; + if(get_post_meta($post->ID, 'pprredirect_url', true)!=''){$pprredirecturl=get_post_meta($post->ID, 'pprredirect_url', true);}else{$pprredirecturl="";} + echo '
    (i.e., http://example.com or /somepage/ or p=15 or 155. Use FULL URL including http:// for all external and meta redirects. )

    '; + + echo ' '; + if(get_post_meta($post->ID, 'pprredirect_type', true)!=''){$pprredirecttype=get_post_meta($post->ID, 'pprredirect_type', true);}else{$pprredirecttype="";} + switch($pprredirecttype): + case "": + $ppr_option2=" selected";//default + break; + case "301": + $ppr_option1=" selected"; + break; + case "302": + $ppr_option2=" selected"; + break; + case "307": + $ppr_option3=" selected"; + break; + case "meta": + $ppr_option5=" selected"; + break; + endswitch; + + echo ' (Default is 302)

    '; + + } + // When the post is saved, saves our custom data + function ppr_save_postdata($post_id, $post) { + if(isset($_POST['pprredirect_active']) || isset($_POST['pprredirect_url']) || isset($_POST['pprredirect_type']) ): + // verify authorization + if(isset($_POST['pprredirect_noncename'])){ + if ( !wp_verify_nonce( $_POST['pprredirect_noncename'], plugin_basename(__FILE__) )) { + return $post->ID; + } + } + + // check allowed to editing + 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; + } + + // find & save the form data + // Put it into an array + $mydata['pprredirect_active'] = $_POST['pprredirect_active']; + $mydata['pprredirect_url'] = $_POST['pprredirect_url']; + if($mydata['pprredirect_url']!=''){ + $mydata['pprredirect_type'] = $_POST['pprredirect_type']; + } + + // Add values of $mydata as custom fields + foreach ($mydata as $key => $value) { //Let's cycle through the $mydata array! + if( $post->post_type == 'revision' ) return; //don't store custom data twice + $value = implode(',', (array)$value); //if $value is an array, make it a CSV (unlikely) + if(get_post_meta($post->ID, $key, FALSE)) { //if the custom field already has a value + update_post_meta($post->ID, $key, $value); + } else { //if the custom field doesn't have a value + add_post_meta($post->ID, $key, $value); + } + if(!$value) delete_post_meta($post->ID, $key); //delete if blank + } + endif; + } + +?> \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/quick-pagepost-redirect-plugin/readme.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/quick-pagepost-redirect-plugin/readme.txt Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,100 @@ +=== Quick Page/Post Redirect === +Contributors: Don Fischer +Donate link: http://fischercreativemedia.com/ +Tags: redirect, 301, 302, meta, post, plugin, page, forward, re-direct, wpmu, WordPress MU +Requires at least: 2.5 +Tested up to: 2.8.4 +Stable tag: 1.7 + +Redirect Pages/Posts to another page/post or external URL. Adds edit box to admin edit so user can specify the redirect Location and type. + +== Description == + +Quick Page/Post Redirect Plugin redirects WordPress Pages or Posts to another location quickly. +It adds an option box to the edit section where you can specify the redirect location and type of redirect that you want, temporary, permanent, or meta. + +The redirect Location can be to another WordPress page/post or any other website with an external URL. It allows the use of a full URL path, the post or page ID, permalink or page-name. + +PLEASE NOTE: At this time, the a new page or post needs to be Published in order for the redirect to happen. It WILL work on a DRAFT Status Post/Page ONLY, and I mean ONLY, if the Post/Page has FIRST been Published and the re-saved as a Draft - WordPress does not set up the post meta for the permalink until after first publish for some reason - will hopefully fix this in the future. + +This plugin is also not compatible with WordPress versions less than 2.5. + +Tested in MU 2.8.4a (9/8/2009) + +TROUBLESHOOTING: +If your page or post is not redirecting, this is most likely because something else like the theme functions file or another plugin is outputting the header BEFORE the plugin can perform the redirect. This can be tested by turning off all plugins except the Quick Page/Post Redirect Plugin and testing if the redirect works. 9 out of 10 times, a plugin or bad code is the culprit. +We have tested the plugin in dozens of themes and alongside a whole lot more plugins. In our experience, (with exception to a few bugs) most of the time another plugin is the problem. If you do notice a problem, please let us know at plugins@fischercreativemedia.com - along with the WP version, theme you are using and plugins you have installed - and we will try to troubleshoot the problem. + +== Installation == + += If you downloaded this plugin: = +* Upload `quick_page_post_redirect` folder to the `/wp-content/plugins/` directory +* Activate the plugin through the 'Plugins' menu in WordPress +* Once Activated, you can add a redirect by entering the correct information in the `Quick Page/Post Redirect` box in the edit section of a page or post + += If you install this plugin through WordPress 2.8+ plugin search interface: = +* Click Install `Quick Page/Post Redirect Plugin` +* Activate the plugin through the 'Plugins' menu in WordPress +* Once Activated, you can add a redirect by entering the correct information in the `Quick Page/Post Redirect` box in the edit section of a page or post + +== Frequently Asked Questions == + += Why is my Page/Post not redirecting? = +If your page or post is not redirecting, this is most likely because something else like the theme functions file or another plugin is outputting the header BEFORE the plugin can perform the redirect. This can be tested by turning off all plugins except the Quick Page/Post Redirect Plugin and testing if the redirect works. 9 out of 10 times, a plugin or bad code is the culprit. + +We have tested the plugin in dozens of themes and a whole lot more plugins. In our experience, (with exception to a few bugs) most of the time another plugin is the problem. If you do notice a problem, please let us know at plugins@fischercreativemedia.com - along with the WP version, theme you are using and plugins you have installed - and we will try to troubleshoot the problem. + += Does the Page/Post need to be Published to redirect? = +YES... and NO... The redirect will always work on a Published Post/Page. For it to work correctly on a Post/Page in DRAFT status, you need to fist publish the page, then re-save it as a draft. If you don't follow that step, you will get a 404 error. + += Can I do a permanent 301 Redirect? = + +Yes. You can perform a 301 Permanent Redirect. Additionally, you can select a 302 Temporary or a 307 Temporary redirect or a Meta redirect. + += What the heck is a 301 or 302 redirect anyway? = + +Good question! THe number corresponds with the header code that is returned to the browser when the page is first accessed. A good page, meaning something was found, returns a 200 status code and that tells the browser to go ahead and keep loading the content for the page. If nothing is found a 404 error is returned (and we have ALL seen these - usually it is a bad link or a page was moved). There are many other types of codes, but those ore the most common. + +The 300+ range of codes in the header, tells the browser (and search engine spider) that the original page has moved to a new location - this can be just a new file name a new folder or a completely different site. + +A 301 code means that you want to tell the browser (or Google, bing, etc.) that your new page has permanently moved to a new location. This is great for search engines because it lets them know that there was a page there once, but now go to the new place to get it - and they update there old link to is so future visitors will not have to go through the same process. + +A 302 or 307 code tell the browser that the file was there but TEMPORARILY it can be found at a new location. This will tell the search engines to KEEP the old link in place becasue SOME day it will be back at the same old link. There is only a slight difference between a 302 and a 307 status. Truth is, 302 is more widely used, so unless you know why you need a 307, stick with a 302. + += So, which one do I use? = + +Easiest way to decide is this: If you want the page to permanetnly change to a new spot, use 301. If you are editing the page or post and only want it to be down for a few hours, minutes, days or weeks and plan on putting it back with the same link as before, then us 302. If you want to hide the reponse code from the spiders, use the `no code` option, and if you are having trouble with the redirects, use a `meta` redirect. The meta redirect actuall starts to load the page as a 200 good status, then redirects using a meta redirect tag. + +Still not sure? Try 302 for now - at least until you have a little time to read up on the subject. + += Should I use a full URL with http:// or https:// ? = + +Yes, you can, but you do not always need to. If you are redirecting to an external URL, then yes. If you are just redirecting to another page or post on your site, then no, it is not needed. When in doubt, use the entire URL. + + +== Screenshots == + +1. Sample admin Post/Page edit box screenshot. + + +== Changelog == += 1.7 = +* fix to correct meta redirect - moved "exit" commant to "addtoheader_theme" function. Also fixed the problem woth some pages not redirecting. Made the plugin WordPress MU compatible. (9/8/2009) += 1.6.1 = +* Small fix to correct the same problem as 1.6 for Category and Archive pages (9/1/2009) += 1.6 = +* Fixed wrongfull redirect when the first blog post on home page (main blog page) has a redirect set up - this was redirecting the entire page incorrectly. This was only an issue with the first post on a page. (9/1/2009) += 1.5 = +* Major re-Write of the plugin core function to hook WP at a later time to take advantage of the POST function - no sense re-creating the wheel. +* Removed the 'no code' redirect, as it turns out, many browsers will not redirect properly without a code - sorry guys. +* Can have page/post as draft and still redirect - but ONLY after the post/page has first been published and then re-saved as draft (this will hopefully be a fix for a later version). (8/31/2009) += 1.4 = +* Add exit script command after header redirect function - needed on some servers and browsers. (8/19/2009) += 1.3 = +* Add Meta Re-fresh option (7/26/2009) += 1.2 = +* Add easy Post/Page Edit Box (7/25/2009) += 1.1 = +* Fix redirect for off site links (7/7/2009) += 1.0 = +* Initial Plugin creation (7/1/2009) \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/quick-pagepost-redirect-plugin/screenshot-1.jpg Binary file web/wp-content/plugins/quick-pagepost-redirect-plugin/screenshot-1.jpg has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/quick-pagepost-redirect-plugin/screenshot.jpg Binary file web/wp-content/plugins/quick-pagepost-redirect-plugin/screenshot.jpg has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/related-posts-by-category/readme.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/related-posts-by-category/readme.txt Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,85 @@ +=== Related Posts by Category === +Contributors: stalkerX +Tags: similar posts, related posts, similar, related, posts, category +Requires at least: 2.3 +Tested up to: 2.8.6 +Stable tag: trunk + +The WordPress Plugin for Similar Posts. It's small. It's fast. Really! + + +== Description == +*Related Posts by Category* lists similar posts within any post. As a search string the plugin does not use the title of the article nor weighs the content. In fact the category, which was assigned to the post, serves as the source of accordance. + + += Features = +* Very fast execution +* No user interface required +* Quick query in only one sql statement +* Quantity of results and further options are adjustable +* Foolproven implementing of this plugin + + += Mode of operation = +Just put `` in your *single.php* template for display a list of similar posts. + + += Example = +` +
      + 'RAND', + 'order' => 'DESC', + 'limit' => 5, + 'echo' => true, + 'before' => '
    • ', + 'inside' => '» ', + 'outside' => '', + 'after' => '
    • ', + 'rel' => 'nofollow', + 'type' => 'post', + 'message' => 'no matches' + ) + ); + ?> +
    +` +Please adjust the parameters accordingly. + + += Documentation = +* [*Related Posts by Category* documentation in English](http://playground.ebiene.de/400/related-posts-by-category-the-wordpress-plugin-for-similar-posts/ "Related Posts by Category") +* [*Related Posts by Category* documentation in German](http://playground.ebiene.de/356/related-posts-by-category-wp-plugin-fur-verwandte-beitrage-einer-kategorie/ "Related Posts by Category") +* [Follow us on Twitter for updates](http://twitter.com/wpSEO "wpSEO on Twitter") + + +== Changelog == += 0.4 = +* Increase the security of the database query + += 0.3 = +* By chance generated display of results with *orderby* => *RAND* + += 0.2 = +* *post* or *page* as a parameter for type value + += 0.1 = +* *Related Posts by Category* goes online + + +== Installation == +1. Download plugin +1. Unzip the archive +1. Upload the file *related_posts.php* into *../wp-content/plugins/* +1. Go to tab *Plugins* +1. Activate *Related Posts by Category* +1. Ready + + +== Frequently Asked Questions == += Documentation = +* [*Related Posts by Category* documentation in English](http://playground.ebiene.de/400/related-posts-by-category-the-wordpress-plugin-for-similar-posts/ "Related Posts by Category") +* [*Related Posts by Category* documentation in German](http://playground.ebiene.de/356/related-posts-by-category-wp-plugin-fur-verwandte-beitrage-einer-kategorie/ "Related Posts by Category") +* [Follow us on Twitter for updates](http://twitter.com/wpSEO "wpSEO on Twitter") \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/related-posts-by-category/related_posts.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/related-posts-by-category/related_posts.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,67 @@ +ID; +} +if (isset($params['limit'])) { +$limit = intval($params['limit']); +} +if (isset($params['type']) && !empty($params['type'])) { +$type = ($params['type'] == 'page' ? 'page' : 'post'); +} +if (isset($params['order']) && !empty($params['order'])) { +$order = (strtoupper($params['order']) == 'DESC' ? 'DESC' : 'ASC'); +} +if (isset($params['orderby']) && !empty($params['orderby']) && preg_match('/^[a-zA-Z_]+$/', $params['orderby'])) { +$orderby = $params['orderby']; +} +$entries = $GLOBALS['wpdb']->get_results( +sprintf( +"SELECT DISTINCT object_id, post_title FROM {$GLOBALS['wpdb']->term_relationships} r, {$GLOBALS['wpdb']->term_taxonomy} t, {$GLOBALS['wpdb']->posts} p WHERE t.term_id IN (SELECT t.term_id FROM {$GLOBALS['wpdb']->term_relationships} r, {$GLOBALS['wpdb']->term_taxonomy} t WHERE r.term_taxonomy_id = t.term_taxonomy_id AND t.taxonomy = 'category' AND r.object_id = $post_id) AND r.term_taxonomy_id = t.term_taxonomy_id AND p.post_status = 'publish' AND p.ID = r.object_id AND object_id <> $post_id %s %s %s", +($type ? ("AND p.post_type = '" .$type. "'") : ''), +($orderby ? ('ORDER BY ' .(strtoupper($params['orderby']) == 'RAND' ? 'RAND()' : $orderby. ' ' .$order)) : ''), +($limit ? ('LIMIT ' .$limit) : '') +), +OBJECT +); +if ($entries) { +foreach ($entries as $entry) { +$output .= sprintf( +'%s%s%s%s%s', +isset($params['before']) ? $params['before'] : '', +get_permalink($entry->object_id), +(isset($params['rel']) ? ('rel="' .$params['rel']. '"') : ''), +str_replace('"', '"', $entry->post_title), +isset($params['inside']) ? $params['inside'] : '', +$entry->post_title, +isset($params['outside']) ? $params['outside'] : '', +isset($params['after']) ? $params['after'] : '' +); +} +} else { +$output = $params['message']; +} +if (isset($params['echo']) === true && $params['echo']) { +echo $output; +} else { +return $output; +} +} +?> \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/twitter-tools-bitly-links/readme.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/twitter-tools-bitly-links/readme.txt Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,66 @@ +=== Twitter Tools: bit.ly Links === +Contributors: Viper007Bond +Donate link: http://www.viper007bond.com/donate/ +Tags: twitter +Requires at least: 2.7 +Tested up to: 2.8 +Stable tag: trunk + +Makes the links that Twitter Tools posts to Twitter be API-created bit.ly links so you can track the number of clicks and such via your bit.ly account. + +== Description == + +[Twitter Tools](http://wordpress.org/extend/plugins/twitter-tools/) is an excellent plugin for posting notifications of new blog posts to [Twitter](http://twitter.com/). However Twitter Tools just sends the URL to the new post normally which is then shortened by Twitter itself to a [bit.ly](http://bit.ly/) short link. This is done anonymously. + +This plugin will replace the normal URLs sent by Twitter Tools to Twitter with bit.ly URLs tied to your bit.ly account. You can then easily track the number of clicks from your bit.ly profile. + +**Requirements** + +* [Twitter Tools](http://wordpress.org/extend/plugins/twitter-tools/) be installed and activated +* PHP 5.2.0 or newer (PHP4 is dead anyway) +* WordPress 2.7 or newer + +== Installation == + +###Manual Installation### + +Extract all files from the ZIP file, **making sure to keep the file/folder structure intact**, and then upload it to `/wp-content/plugins/`. + +###Automated Installation### + +Visit Plugins -> Add New in your admin area and search for this plugin. Click "Install". + +**See Also:** ["Installing Plugins" article on the WP Codex](http://codex.wordpress.org/Managing_Plugins#Installing_Plugins) + +###Plugin Usage### + +Visit Settings -> Twitter Tools: bit.ly and fill in your login and API key. + +== Frequently Asked Questions == + += It's not working! = + +Did you make sure to fill in your bit.ly login and API key on the plugin's settings page? + +== ChangeLog == + +**Version 1.1.2** + +* Starting with version 2.0, Twitter Tools comes with it's own plugin to allow this. As such, my plugin will now give way to if the other plugin is activated. + +**Version 1.1.1** + +* Display an error message to the user if they don't meet the minimum PHP and WordPress version requirements. + +**Version 1.1.0** + +* Apparently you need `history=1` in the API call in order for it to show up in your history. That was my problem. +* Minor settings page improvements. + +**Version 1.0.1** + +* Fix a stupid mistake on my part that completely broke the plugin. + +**Version 1.0.0** + +* Initial release! \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/twitter-tools-bitly-links/twitter-tools-bitly-links.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/twitter-tools-bitly-links/twitter-tools-bitly-links.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,184 @@ +Twitter Tools posts to Twitter be API-created bit.ly links so you can track the number of clicks and such via your bit.ly account. Requires PHP 5.2.0+. +Author: Viper007Bond +Author URI: http://www.viper007bond.com/ + +**************************************************************************/ + +class TwitterToolsBitlyLinks { + + // Initalize the plugin by registering the hooks + function __construct() { + // Twitter Tools v2.0+ supports this natively. Don't do anything if that sub-plugin is active. + if ( function_exists('aktt_bitly_shorten_url') ) + return false; + + // Load localization domain + load_plugin_textdomain( 'twitter-tools-bitly-links', false, '/twitter-tools-bitly-links/localization' ); + + // This plugin requires PHP 5.2.0+ and WordPress 2.7+ + if ( function_exists('json_decode') && function_exists('wp_remote_retrieve_body') ) { + // Register options + add_option( 'viper_ttbl_login' ); + add_option( 'viper_ttbl_apikey' ); + + // Register hooks + add_action( 'admin_menu', array(&$this, 'register_settings_page') ); + add_action( 'wp_ajax_viper_ttbl_check', array(&$this, 'ajax_authentication_check') ); + add_filter( 'whitelist_options', array(&$this, 'whitelist_options') ); + add_filter( 'tweet_blog_post_url', array(&$this, 'modify_url') ); + + // Make sure the user has filled in their login and API key + $login = trim( get_option('viper_ttbl_login') ); + $apikey = trim( get_option('viper_ttbl_apikey') ); + if ( ( !$login || !$apikey ) && current_user_can('manage_options') ) + add_action( 'admin_notices', array(&$this, 'settings_warn') ); + } + + // Old version of PHP or WordPress? Let the user know. + elseif ( current_user_can('activate_plugins') ) { + add_action( 'admin_notices', array(&$this, 'old_version_warning') ); + } + } + + + // Register the settings page + function register_settings_page() { + add_options_page( __('Twitter Tools: bit.ly Links', 'twitter-tools-bitly-links'), __('Twitter Tools: bit.ly', 'twitter-tools-bitly-links'), 'manage_options', 'twitter-tools-bitly-links', array(&$this, 'settings_page') ); + } + + + // Whitelist the options to allow saving via options.php + function whitelist_options( $whitelist_options ) { + $whitelist_options['twitter-tools-bitly-links'] = array( 'viper_ttbl_login', 'viper_ttbl_apikey' ); + + return $whitelist_options; + } + + + // Warn about an old version of PHP or WordPress + function old_version_warning() { + global $wp_version; + echo '

    ' . sprintf( __( 'Twitter Tools: bit.ly Links: You do not meet the minimum requirements of PHP %1$s and WordPress %2$s. You are currently using PHP %3$s and WordPress %4$s.', 'vipers-video-quicktags' ), '5.2.0', '2.7', PHP_VERSION, $wp_version ) . "

    \n"; + } + + + // Display a notice telling the user to fill in their bit.ly details + function settings_warn() { + echo '

    ' . sprintf( __( 'Twitter Tools: bit.ly Links: You must fill in your bit.ly details on the settings page in order for this plugin to function.', 'vipers-video-quicktags' ), admin_url('options-general.php?page=twitter-tools-bitly-links') ) . "

    \n"; + } + + + // Modify the URL being sent to Twitter by Twitter Tools + function modify_url( $url ) { + + // Make sure the user has filled in their login and API key + $login = urlencode( strtolower( trim( get_option('viper_ttbl_login') ) ) ); + $apikey = urlencode( trim( get_option('viper_ttbl_apikey') ) ); + if ( empty($login) || empty($apikey) ) + return $url; + + // Tell bit.ly to shorten the URL for us + $response = wp_remote_retrieve_body( wp_remote_get( "http://api.bit.ly/shorten?version=2.0.1&format=json&history=1&login={$login}&apiKey={$apikey}&longUrl=" . urlencode( $url ) ) ); + + if ( empty($response) ) + return $url; + + // Decode the response from bit.ly + if ( !$response = json_decode( $response, true ) ) + return $url; + + if ( !isset($response['errorCode']) || 0 != $response['errorCode'] || empty($response['results']) || empty($response['results'][$url]) || empty($response['results'][$url]['shortUrl']) ) + return $url; + + return $response['results'][$url]['shortUrl']; + } + + + // Settings page + function settings_page() { ?> + + + +
    + +

    + +
    + + + + + + + + + + + + + + + +
    + + account page.', 'twitter-tools-bitly-links' ), 'http://bit.ly/account/' ); ?> +
    Checking...
    + +

    + +

    + +
    +
    + +' . __('Failed to test credentials. Hmm.', 'twitter-tools-bitly-links') . '' ); + + // Decode the response from bit.ly + if ( !$response = json_decode( $response, true ) ) + exit( '' . __('Failed to parse bit.ly API response. Hmm.', 'twitter-tools-bitly-links') . '' ); + + if ( !isset($response['errorCode']) || 0 != $response['errorCode'] ) + exit( '' . __('Your credentials are invalid. Please double-check them.', 'twitter-tools-bitly-links') . '' ); + + exit( '' . __('Your credentials are valid.', 'twitter-tools-bitly-links') . '' ); + } +} + +// Start this plugin once all other plugins are fully loaded +add_action( 'init', 'TwitterToolsBitlyLinks' ); function TwitterToolsBitlyLinks() { global $TwitterToolsBitlyLinks; $TwitterToolsBitlyLinks = new TwitterToolsBitlyLinks(); } + +?> \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/twitter-tools/README.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/twitter-tools/README.txt Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,213 @@ +=== Twitter Tools === +Tags: twitter, tweet, integration, post, digest, notify, integrate, archive, widget +Contributors: alexkingorg. crowdfavorite +Requires at least: 2.3 +Tested up to: 2.8.3 +Stable tag: 2.0 + +Twitter Tools is a plugin that creates a complete integration between your WordPress blog and your Twitter account. + +== Details == + +Twitter Tools integrates with Twitter by giving you the following functionality: + +* Archive your Twitter tweets (downloaded every 10 minutes) +* Create a blog post from each of your tweets +* Create a daily or weekly digest post of your tweets +* Create a tweet on Twitter whenever you post in your blog, with a link to the blog post +* Post a tweet from your sidebar +* Post a tweet from the WP Admin screens +* Pass your tweets along to another service (via API hook) + + +== Installation == + +1. Download the plugin archive and expand it (you've likely already done this). +2. Put the 'twitter-tools.php' file into your wp-content/plugins/ directory. +3. Go to the Plugins page in your WordPress Administration area and click 'Activate' for Twitter Tools. +4. Go to the Twitter Tools Options page (Options > Twitter Tools) to set your Twitter account information and preferences. + + +== Configuration == + +There are a number of configuration options for Twitter Tools. You can find these in Options > Twitter Tools. + +== Showing Your Tweets == + += Widget Friendly = + +If you are using widgets, you can drag Twitter Tools to your sidebar to display your latest tweets. + + += Template Tags = + +If you are not using widgest, you can use a template tag to add your latest tweets to your sidebar. + +`` + + +If you just want your latest tweet, use this template tag. + +`` + + +== Hooks/API == + +Twitter Tools contains a hook that can be used to pass along your tweet data to another service (for example, some folks have wanted to be able to update their Facebook status). To use this hook, create a plugin and add an action to: + +`aktt_add_tweet` (action) + +Your plugin function will receive an `aktt_tweet` object as the first parameter. + +Example psuedo-code: + +`function my_status_update($tweet) { // do something here }` +`add_action('aktt_add_tweet', 'my_status_update')` + +--- + +Twitter Tools also provides a filter on the URL sent to Twitter so that you can run it through an URL-shortening service if you like. + +`tweet_blog_post_url` (filter) + +Your plugin function will receive the URL as the first parameter. + +Example psuedo-code: + +`function my_short_url($long_url) { + // do something here - return the shortened URL + $short_url = my_short_url_func($long_url); + return $short_url; +}` +`add_filter('tweet_blog_post_url', 'my_short_url')` + +--- + +`aktt_do_tweet` (filter) + +Returning false in this hook will prevent a tweet from being sent. One parameter is sent, the Tweet object to be sent to Twitter. + +Example psuedo-code: + +`function dont_tweet($tweet) { + if (some condition) { + // will not tweet + return false; + } + else { + // must return the $tweet to send it + return $tweet; + } +}` +`add_filter('aktt_do_tweet', 'dont_tweet')` + +--- + +`aktt_do_blog_post_tweet` (filter) + +Returning false in this hook will prevent a blog post Tweet from being sent. Two parameters are passed, the Tweet object to be sent to Twitter and the Post generating the Tweet. + +Example psuedo-code: + +`function dont_post_tweet($tweet, $post) { + if (some condition) { + // will not tweet + return false; + } + else { + // must return the $tweet to send it + return $tweet; + } +}` +`add_filter('aktt_do_blog_post_tweet', 'dont_post_tweet', 10, 2)` + +--- + +`aktt_do_tweet_post` (filter) + +Returning false in this hook will prevent a blog post from being created from a Tweet. Two parameters are passed, the data to be used in the post and the Tweet object. + +Example psuedo-code: + +`function dont_tweet_post($post, $data) { + if (some condition) { + // will not post + return false; + } + else { + // must return the $data for a post to be created + return $data; + } +}` +`add_filter('aktt_do_tweet_post', 'dont_tweet_post', 10, 2)` + +--- + +`aktt_tweets_to_digest_post` (filter) + +Allows you to make changes the tweets that will be included in a digest post. + +--- + +`aktt_options_form` (action) + +Allows you to add to the Twitter Tools settings page. + +--- + +`aktt_post_options` (action) + +Allows you to add to the Twitter Tools box on the New Post page (requires the option to tweet on blog posts to be enabled). + +== Known Issues == + +* If you change your blog post notification tweet prefix, the previous blog post notification might not be correctly recognized as a blog post tweet. This is only under very rare conditions due to timing issues. +* Only one Twitter account is supported (not one account per author). +* Tweets are not deleted from the tweet table in your WordPress database when they are deleted from Twitter. To delete from your WordPress database, use a database admin tool like phpMyAdmin. + + +== Frequently Asked Questions == + += Who is allowed to post a Tweet from within WordPress? = + +Anyone who has a 'publish_post' permission. Basically, if you can post to the blog, you can also post to Twitter (using the account info in the Twitter Tools configuration). + += What happens if I have both my tweets posting to my blog as posts and my posts sent to Twitter? Will it cause the world to end in a spinning fireball of death? = + +Actually, Twitter Tools has taken this into account and you can safely enable both creating posts from your tweets and tweets from your posts without duplicating them in either place. + += Does Twitter Tools use a URL shortening service by default? = + +No, Twitter Tools sends your long URL to Twitter and Twitter chooses to shorten it or not. + +As of version 2.0 a plugin to do this with the Bit.ly service is included as an option. + += Can Twitter Tools use a URL shortening service? = + +Yes, Twitter Tools includes a filter: + +`tweet_blog_post_url` + +as of version 1.6. Plugins for this filter may already exist, or you can create your own. The plugin needs to attach to this filter using the standard WordPress `add_filter()` function and return a URL that will then be passed with your blog post tweet. + +As of version 2.0 a plugin to do this with the Bit.ly service is included as an option. + += Is there any way to change the 'New Blog Post:' prefix when my new posts get tweeted? = + +Yes, as of version 2.0 you can change this on the Options page. + += Can I remove the 'New Blog Post:' prefix entirely? = + +No, this is not a good idea. Twitter Tools needs to be able to look at the beginning of the tweet and identify if it's a notification from your blog or not. Otherwise, Twitter Tools and Twitter could keep passing the blog posts and resulting tweets back and forth resulting in the 'spinning fireball of death' mentioned above. + + +== Changelog == + += 2.0 = + +* Added various hooks and filters to enable other plugins to interact with Twitter Tools. +* Added option to set blog post tweet prefix +* Added CSS classes for elements in tweet list +* Initial release of Bit.ly for Twitter Tools - enables shortening your URLs and tracking them on your Bit.ly account. +* Initial release of #hashtags for Twitter Tools - enables adding hashtags to your blog post tweets. +* Initial release of Exclude Category for Twitter Tools - enables not tweeting posts in chosen categories. diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/twitter-tools/twitter-tools-bitly.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/twitter-tools/twitter-tools-bitly.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,193 @@ +agent = 'Twitter Tools http://alexking.org/projects/wordpress'; + $snoop->fetch($api); + $result = $json->decode($snoop->results); + $url = $result->results->{$url}->shortUrl; + } + return $url; +} +add_filter('tweet_blog_post_url', 'aktt_bitly_shorten_url'); + +function aktt_bitly_shorten_tweet($tweet) { + if (strpos($tweet->tw_text, 'http') !== false) { + preg_match_all('@(https?://([-\w\.]+)+(:\d+)?(/([\w/_\.]*(\?\S+)?)?)?)@', $tweet->tw_text, $urls); + if (isset($urls[0]) && count($urls[0])) { + foreach ($urls[0] as $url) { +// borrowed from WordPress's make_clickable code + if ( in_array(substr($url, -1), array('.', ',', ';', ':', ')')) === true ) { + $url = substr($url, 0, strlen($url)-1); + } + $tweet->tw_text = str_replace($url, aktt_bitly_shorten_url($url), $tweet->tw_text); + } + } + } + return $tweet; +} +add_filter('aktt_do_tweet', 'aktt_bitly_shorten_tweet'); + +function aktt_bitly_request_handler() { + if (!empty($_GET['cf_action'])) { + switch ($_GET['cf_action']) { + + } + } + if (!empty($_POST['cf_action'])) { + switch ($_POST['cf_action']) { + + case 'aktt_bitly_update_settings': + aktt_bitly_save_settings(); + wp_redirect(trailingslashit(get_bloginfo('wpurl')).'wp-admin/options-general.php?page=twitter-tools.php&updated=true'); + die(); + break; + } + } +} +add_action('init', 'aktt_bitly_request_handler'); + +$aktt_bitly_settings = array( + 'aktt_bitly_api_login' => array( + 'type' => 'string', + 'label' => __('Bit.ly Username', 'twitter-tools-bitly'), + 'default' => '', + 'help' => '', + ), + 'aktt_bitly_api_key' => array( + 'type' => 'string', + 'label' => __('Bit.ly API key', 'twitter-tools-bitly'), + 'default' => '', + 'help' => '', + ), +); + +function aktt_bitly_setting($option) { + $value = get_option($option); + if (empty($value)) { + global $aktt_bitly_settings; + $value = $aktt_bitly_settings[$option]['default']; + } + return $value; +} + +if (!function_exists('cf_settings_field')) { + function cf_settings_field($key, $config) { + $option = get_option($key); + if (empty($option) && !empty($config['default'])) { + $option = $config['default']; + } + $label = ''; + $help = ''.$config['help'].''; + switch ($config['type']) { + case 'select': + $output = $label.''.$help; + break; + case 'textarea': + $output = $label.''.$help; + break; + case 'string': + case 'int': + default: + $output = $label.''.$help; + break; + } + return '
    '.$output.'
    '; + } +} + +function aktt_bitly_settings_form() { + global $aktt_bitly_settings; + + print(' +
    +

    '.__('Bit.ly for Twitter Tools', 'twitter-tools-bitly').'

    +
    + +
    + '); + foreach ($aktt_bitly_settings as $key => $config) { + echo cf_settings_field($key, $config); + } + print(' +
    +

    + +

    +
    +
    + '); +} +add_action('aktt_options_form', 'aktt_bitly_settings_form'); + +function aktt_bitly_save_settings() { + if (!current_user_can('manage_options')) { + return; + } + global $aktt_bitly_settings; + foreach ($aktt_bitly_settings as $key => $option) { + $value = ''; + switch ($option['type']) { + case 'int': + $value = intval($_POST[$key]); + break; + case 'select': + $test = stripslashes($_POST[$key]); + if (isset($option['options'][$test])) { + $value = $test; + } + break; + case 'string': + case 'textarea': + default: + $value = stripslashes($_POST[$key]); + break; + } + update_option($key, $value); + } +} + + +if (!function_exists('get_snoopy')) { + function get_snoopy() { + include_once(ABSPATH.'/wp-includes/class-snoopy.php'); + return new Snoopy; + } +} + +//a:21:{s:11:"plugin_name";s:29:"Bit.ly URLs for Twitter Tools";s:10:"plugin_uri";s:35:"http://crowdfavorite.com/wordpress/";s:18:"plugin_description";s:49:"Use Bit.ly for URL shortening with Twitter Tools.";s:14:"plugin_version";s:3:"1.0";s:6:"prefix";s:10:"aktt_bitly";s:12:"localization";s:19:"twitter-tools-bitly";s:14:"settings_title";s:24:"Bit.ly for Twitter Tools";s:13:"settings_link";s:24:"Bit.ly for Twitter Tools";s:4:"init";b:0;s:7:"install";b:0;s:9:"post_edit";b:0;s:12:"comment_edit";b:0;s:6:"jquery";b:0;s:6:"wp_css";b:0;s:5:"wp_js";b:0;s:9:"admin_css";b:0;s:8:"admin_js";b:0;s:15:"request_handler";s:1:"1";s:6:"snoopy";s:1:"1";s:11:"setting_cat";b:0;s:14:"setting_author";b:0;} + +?> \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/twitter-tools/twitter-tools-excludecat.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/twitter-tools/twitter-tools-excludecat.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,126 @@ + +#aktt_exclude_cat_options { + list-style: none; +} +#aktt_exclude_cat_options li { + float: left; + margin: 0 0 5px 0; + padding: 3px; + width: 200px; +} + + +
    +

    '.__('Exclude Categories for Twitter Tools', 'twitter-tools-excludecat').'

    +
    + +
    +

    '.__('Posts in selected categories will be excluded from blog post tweets', 'twitter-tools-excludecat').'

    +

    '.__('Select All', 'twitter-tools-excludecat').' | '.__('Unselect All', 'twitter-tools-excludecat').'

    +
      + '); + + $categories = get_categories('hide_empty=0'); + $exclude_cats = get_option('aktt_excludecats'); + if (!is_array($exclude_cats)) { + $exclude_cats = array(); + } + foreach ($categories as $cat) { + $id = 'aktt_exclude_cat_'.$cat->term_id; + in_array($cat->term_id, $exclude_cats) ? $checked = ' checked="checked"' : $checked = ''; + print(' +
    • + + +
    • + '); + } + print(' +
    +
    +
    +

    + +

    +
    +
    + '); +} +add_action('aktt_options_form', 'aktt_excludecat_settings_form'); + +function aktt_excludecat_save_settings() { + if (!current_user_can('manage_options')) { + return; + } + $cats = array(); + if (isset($_POST['aktt_exclude_cats']) && is_array($_POST['aktt_exclude_cats'])) { + foreach ($_POST['aktt_exclude_cats'] as $cat_id) { + $cat_id = intval($cat_id); + if ($cat_id) { + $cats[] = $cat_id; + } + } + } + update_option('aktt_excludecats', $cats); +} + +//a:21:{s:11:"plugin_name";s:34:"Twitter Tools - Exclude Categories";s:10:"plugin_uri";s:35:"http://crowdfavorite.com/wordpress/";s:18:"plugin_description";s:72:"Exclude posts in certain categories from being tweeted by Twitter Tools.";s:14:"plugin_version";s:3:"1.0";s:6:"prefix";s:15:"aktt_excludecat";s:12:"localization";s:24:"twitter-tools-excludecat";s:14:"settings_title";s:34:"Exclude Category for Twitter Tools";s:13:"settings_link";s:34:"Exclude Category for Twitter Tools";s:4:"init";b:0;s:7:"install";b:0;s:9:"post_edit";b:0;s:12:"comment_edit";b:0;s:6:"jquery";b:0;s:6:"wp_css";b:0;s:5:"wp_js";b:0;s:9:"admin_css";b:0;s:8:"admin_js";b:0;s:15:"request_handler";s:1:"1";s:6:"snoopy";b:0;s:11:"setting_cat";s:1:"1";s:14:"setting_author";b:0;} + +?> \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/twitter-tools/twitter-tools-hashtags.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/twitter-tools/twitter-tools-hashtags.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,191 @@ +ID) ? $hashtags = get_option('aktt_hash_tags') : $hashtags = get_post_meta($post->ID, '_aktt_hash_meta', true); + echo '

    + + +

    '; +} +add_action('aktt_post_options', 'aktt_hash_post_options'); + +function aktt_hash_do_blog_post_tweet($tweet, $post) { + $hashtags = get_post_meta($post->ID, '_aktt_hash_meta', true); + $overall_len = strlen($tweet->tw_text.' '.$hashtags); + if ($overall_len <= 140) { + $tweet->tw_text .= ' '.$hashtags; + } + else { +// check overall needed length + $needed = $overall_len - 140; + $title = html_entity_decode($post->post_title, ENT_COMPAT, 'UTF-8'); + $title_len = strlen($title); +// try to regain the space by truncating the title +// if we need more than half of the title, only take half - we'll trim some hashtags later + ($needed + 3) >= (ceil($title_len / 2) + 3) ? $title_trim = substr($title, 0, ceil($title_len / 2)).'...' : $title_trim = substr($title, 0, strlen($title) - ($needed + 3)).'...'; +// reconstruct the tweet + global $aktt; + $tweet_text = sprintf(__($aktt->tweet_format, 'twitter-tools'), $title_trim, apply_filters('tweet_blog_post_url', get_permalink($post->ID))); +// if hashtags now fit, add hashtags + if (strlen($tweet_text.' '.$hashtags) <= 140) { +// yay, we're done! + $tweet->tw_text = $tweet_text.' '.$hashtags; + } + else { + $tagged_tweet = $tweet_text; +// drop hashtags if multiple + if (strpos($hashtags, ' ') !== false) { + $hashtags_array = explode(' ', $hashtags); + foreach ($hashtags_array as $hashtag) { + $test = $tagged_tweet.' '.$hashtag; + if (strlen($test) <= 140) { + $tagged_tweet = $test; + } + } + $tweet->tw_text = $tagged_tweet; + } + } + } + return $tweet; +} +add_filter('aktt_do_blog_post_tweet', 'aktt_hash_do_blog_post_tweet', 10, 2); + +function aktt_hash_save_post($post_id, $post) { + if (current_user_can('edit_post', $post_id)) { + update_post_meta($post_id, '_aktt_hash_meta', $_POST['_aktt_hash_meta']); + } +} +add_action('save_post', 'aktt_hash_save_post', 10, 2); + +function aktt_hash_request_handler() { + if (!empty($_POST['cf_action'])) { + switch ($_POST['cf_action']) { + case 'aktt_hash_update_settings': + aktt_hash_save_settings(); + wp_redirect(trailingslashit(get_bloginfo('wpurl')).'wp-admin/options-general.php?page=twitter-tools.php&updated=true'); + die(); + break; + } + } +} +add_action('init', 'aktt_hash_request_handler'); + +$aktt_hash_settings = array( + 'aktt_hash_tags' => array( + 'type' => 'string', + 'label' => __('Default #hashtags for blog post tweets', 'twitter-tools-hash'), + 'default' => '', + 'help' => __('include the #, example: #twittertools', 'twitter-tools-hash'), + ), +); + +function aktt_hash_setting($option) { + $value = get_option($option); + if (empty($value)) { + global $aktt_hash_settings; + $value = $aktt_hash_settings[$option]['default']; + } + return $value; +} + +if (!function_exists('cf_settings_field')) { + function cf_settings_field($key, $config) { + $option = get_option($key); + if (empty($option) && !empty($config['default'])) { + $option = $config['default']; + } + $label = ''; + $help = ''.$config['help'].''; + switch ($config['type']) { + case 'select': + $output = $label.''.$help; + break; + case 'textarea': + $output = $label.''.$help; + break; + case 'string': + case 'int': + default: + $output = $label.''.$help; + break; + } + return '
    '.$output.'
    '; + } +} + +function aktt_hash_settings_form() { + global $aktt_hash_settings; + + print(' +
    +

    '.__('#hashtags for Twitter Tools', 'twitter-tools-hash').'

    +
    + +
    + '); + foreach ($aktt_hash_settings as $key => $config) { + echo cf_settings_field($key, $config); + } + print(' +
    +

    + +

    +
    +
    + '); +} +add_action('aktt_options_form', 'aktt_hash_settings_form'); + +function aktt_hash_save_settings() { + if (!current_user_can('manage_options')) { + return; + } + global $aktt_hash_settings; + foreach ($aktt_hash_settings as $key => $option) { + $value = ''; + switch ($option['type']) { + case 'int': + $value = intval($_POST[$key]); + break; + case 'select': + $test = stripslashes($_POST[$key]); + if (isset($option['options'][$test])) { + $value = $test; + } + break; + case 'string': + case 'textarea': + default: + $value = stripslashes($_POST[$key]); + break; + } + update_option($key, $value); + } +} + +//a:21:{s:11:"plugin_name";s:26:"Hashtags for Twitter Tools";s:10:"plugin_uri";s:35:"http://crowdfavorite.com/wordpress/";s:18:"plugin_description";s:46:"Set #hastags for tweets sent by Twitter Tools.";s:14:"plugin_version";s:3:"1.0";s:6:"prefix";s:9:"aktt_hash";s:12:"localization";s:18:"twitter-tools-hash";s:14:"settings_title";s:27:"#hashtags for Twitter Tools";s:13:"settings_link";s:27:"#hashtags for Twitter Tools";s:4:"init";b:0;s:7:"install";b:0;s:9:"post_edit";s:1:"1";s:12:"comment_edit";b:0;s:6:"jquery";b:0;s:6:"wp_css";b:0;s:5:"wp_js";b:0;s:9:"admin_css";b:0;s:8:"admin_js";b:0;s:15:"request_handler";s:1:"1";s:6:"snoopy";b:0;s:11:"setting_cat";b:0;s:14:"setting_author";b:0;} + +?> \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/twitter-tools/twitter-tools.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/twitter-tools/twitter-tools.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,2730 @@ +Twitter. Bring your tweets into your blog and pass your blog posts to Twitter. Show your tweets in your sidebar, and post tweets from your WordPress admin. +Version: 2.0 +Author: Alex King +Author URI: http://alexking.org +*/ + +// Copyright (c) 2007-2009 Crowd Favorite, Ltd., Alex King. All rights reserved. +// +// Released under the GPL license +// http://www.opensource.org/licenses/gpl-license.php +// +// This is an add-on for WordPress +// http://wordpress.org/ +// +// Thanks to John Ford ( http://www.aldenta.com ) for his contributions. +// Thanks to Dougal Campbell ( http://dougal.gunters.org ) for his contributions. +// Thanks to Silas Sewell ( http://silas.sewell.ch ) for his contributions. +// Thanks to Greg Grubbs for his contributions. +// +// ********************************************************************** +// 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. +// ********************************************************************** + +load_plugin_textdomain('twitter-tools'); + +if (!defined('PLUGINDIR')) { + define('PLUGINDIR','wp-content/plugins'); +} + +if (is_file(trailingslashit(ABSPATH.PLUGINDIR).'twitter-tools.php')) { + define('AKTT_FILE', trailingslashit(ABSPATH.PLUGINDIR).'twitter-tools.php'); +} +else if (is_file(trailingslashit(ABSPATH.PLUGINDIR).'twitter-tools/twitter-tools.php')) { + define('AKTT_FILE', trailingslashit(ABSPATH.PLUGINDIR).'twitter-tools/twitter-tools.php'); +} + +if (!function_exists('wp_prototype_before_jquery')) { + function wp_prototype_before_jquery( $js_array ) { + if ( false === $jquery = array_search( 'jquery', $js_array ) ) + return $js_array; + + if ( false === $prototype = array_search( 'prototype', $js_array ) ) + return $js_array; + + if ( $prototype < $jquery ) + return $js_array; + + unset($js_array[$prototype]); + + array_splice( $js_array, $jquery, 0, 'prototype' ); + + return $js_array; + } + + add_filter( 'print_scripts_array', 'wp_prototype_before_jquery' ); +} + +define('AKTT_API_POST_STATUS', 'http://twitter.com/statuses/update.json'); +define('AKTT_API_USER_TIMELINE', 'http://twitter.com/statuses/user_timeline.json'); +define('AKTT_API_STATUS_SHOW', 'http://twitter.com/statuses/show/###ID###.json'); +define('AKTT_PROFILE_URL', 'http://twitter.com/###USERNAME###'); +define('AKTT_STATUS_URL', 'http://twitter.com/###USERNAME###/statuses/###STATUS###'); +define('AKTT_HASHTAG_URL', 'http://search.twitter.com/search?q=###HASHTAG###'); + +function aktt_install() { + global $wpdb; + + $aktt_install = new twitter_tools; + $wpdb->aktt = $wpdb->prefix.'ak_twitter'; + $charset_collate = ''; + if ( version_compare(mysql_get_server_info(), '4.1.0', '>=') ) { + if (!empty($wpdb->charset)) { + $charset_collate .= " DEFAULT CHARACTER SET $wpdb->charset"; + } + if (!empty($wpdb->collate)) { + $charset_collate .= " COLLATE $wpdb->collate"; + } + } + $result = $wpdb->query(" + CREATE TABLE `$wpdb->aktt` ( + `id` INT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY , + `tw_id` VARCHAR( 255 ) NOT NULL , + `tw_text` VARCHAR( 255 ) NOT NULL , + `tw_reply_username` VARCHAR( 255 ) DEFAULT NULL , + `tw_reply_tweet` VARCHAR( 255 ) DEFAULT NULL , + `tw_created_at` DATETIME NOT NULL , + `modified` DATETIME NOT NULL , + INDEX ( `tw_id` ) + ) $charset_collate + "); + foreach ($aktt_install->options as $option) { + add_option('aktt_'.$option, $aktt_install->$option); + } + add_option('aktt_update_hash', ''); +} +register_activation_hook(AKTT_FILE, 'aktt_install'); + +class twitter_tools { + function twitter_tools() { + $this->options = array( + 'twitter_username' + , 'twitter_password' + , 'create_blog_posts' + , 'create_digest' + , 'create_digest_weekly' + , 'digest_daily_time' + , 'digest_weekly_time' + , 'digest_weekly_day' + , 'digest_title' + , 'digest_title_weekly' + , 'blog_post_author' + , 'blog_post_category' + , 'blog_post_tags' + , 'notify_twitter' + , 'sidebar_tweet_count' + , 'tweet_from_sidebar' + , 'give_tt_credit' + , 'exclude_reply_tweets' + , 'tweet_prefix' + , 'last_tweet_download' + , 'doing_tweet_download' + , 'doing_digest_post' + , 'install_date' + , 'js_lib' + , 'digest_tweet_order' + , 'notify_twitter_default' + ); + $this->twitter_username = ''; + $this->twitter_password = ''; + $this->create_blog_posts = '0'; + $this->create_digest = '0'; + $this->create_digest_weekly = '0'; + $this->digest_daily_time = null; + $this->digest_weekly_time = null; + $this->digest_weekly_day = null; + $this->digest_title = __("Twitter Updates for %s", 'twitter-tools'); + $this->digest_title_weekly = __("Twitter Weekly Updates for %s", 'twitter-tools'); + $this->blog_post_author = '1'; + $this->blog_post_category = '1'; + $this->blog_post_tags = ''; + $this->notify_twitter = '0'; + $this->notify_twitter_default = '0'; + $this->sidebar_tweet_count = '3'; + $this->tweet_from_sidebar = '1'; + $this->give_tt_credit = '1'; + $this->exclude_reply_tweets = '0'; + $this->install_date = ''; + $this->js_lib = 'jquery'; + $this->digest_tweet_order = 'ASC'; + $this->tweet_prefix = 'New blog post'; + // not included in options + $this->update_hash = ''; + $this->tweet_format = $this->tweet_prefix.': %s %s'; + $this->last_digest_post = ''; + $this->last_tweet_download = ''; + $this->doing_tweet_download = '0'; + $this->doing_digest_post = '0'; + $this->version = '1.6'; + } + + function upgrade() { + global $wpdb; + $wpdb->aktt = $wpdb->prefix.'ak_twitter'; + + $col_data = $wpdb->get_results(" + SHOW COLUMNS FROM $wpdb->aktt + "); + $cols = array(); + foreach ($col_data as $col) { + $cols[] = $col->Field; + } + // 1.2 schema upgrade + if (!in_array('tw_reply_username', $cols)) { + $wpdb->query(" + ALTER TABLE `$wpdb->aktt` + ADD `tw_reply_username` VARCHAR( 255 ) DEFAULT NULL + AFTER `tw_text` + "); + } + if (!in_array('tw_reply_tweet', $cols)) { + $wpdb->query(" + ALTER TABLE `$wpdb->aktt` + ADD `tw_reply_tweet` VARCHAR( 255 ) DEFAULT NULL + AFTER `tw_reply_username` + "); + } + $this->upgrade_default_tweet_prefix(); + } + + function upgrade_default_tweet_prefix() { + $prefix = get_option('aktt_tweet_prefix'); + if (empty($prefix)) { + $aktt_defaults = new twitter_tools; + update_option('aktt_tweet_prefix', $aktt_defaults->tweet_prefix); + } + } + + function get_settings() { + foreach ($this->options as $option) { + $value = get_option('aktt_'.$option); + if ($option != 'tweet_prefix' || !empty($value)) { + $this->$option = $value; + } + } + $this->tweet_format = $this->tweet_prefix.': %s %s'; + } + + // puts post fields into object propps + function populate_settings() { + foreach ($this->options as $option) { + $value = stripslashes($_POST['aktt_'.$option]); + if (isset($_POST['aktt_'.$option]) && ($option != 'tweet_prefix' || !empty($value))) { + $this->$option = $value; + } + } + } + + // puts object props into wp option storage + function update_settings() { + if (current_user_can('manage_options')) { + $this->sidebar_tweet_count = intval($this->sidebar_tweet_count); + if ($this->sidebar_tweet_count == 0) { + $this->sidebar_tweet_count = '3'; + } + foreach ($this->options as $option) { + update_option('aktt_'.$option, $this->$option); + } + if (empty($this->install_date)) { + update_option('aktt_install_date', current_time('mysql')); + } + $this->initiate_digests(); + $this->upgrade(); + $this->upgrade_default_tweet_prefix(); + } + } + + // figure out when the next weekly and daily digests will be + function initiate_digests() { + $next = ($this->create_digest) ? $this->calculate_next_daily_digest() : null; + $this->next_daily_digest = $next; + update_option('aktt_next_daily_digest', $next); + + $next = ($this->create_digest_weekly) ? $this->calculate_next_weekly_digest() : null; + $this->next_weekly_digest = $next; + update_option('aktt_next_weekly_digest', $next); + } + + function calculate_next_daily_digest() { + $optionDate = strtotime($this->digest_daily_time); + $hour_offset = date("G", $optionDate); + $minute_offset = date("i", $optionDate); + $next = mktime($hour_offset, $minute_offset, 0); + + // may have to move to next day + $now = time(); + while($next < $now) { + $next += 60 * 60 * 24; + } + return $next; + } + + function calculate_next_weekly_digest() { + $optionDate = strtotime($this->digest_weekly_time); + $hour_offset = date("G", $optionDate); + $minute_offset = date("i", $optionDate); + + $current_day_of_month = date("j"); + $current_day_of_week = date("w"); + $current_month = date("n"); + + // if this week's day is less than today, go for next week + $nextDay = $current_day_of_month - $current_day_of_week + $this->digest_weekly_day; + $next = mktime($hour_offset, $minute_offset, 0, $current_month, $nextDay); + if ($this->digest_weekly_day <= $current_day_of_week) { + $next = strtotime('+1 week', $next); + } + return $next; + } + + function ping_digests() { + // still busy + if (get_option('aktt_doing_digest_post') == '1') { + return; + } + // check all the digest schedules + if ($this->create_digest == 1) { + $this->ping_digest('aktt_next_daily_digest', 'aktt_last_digest_post', $this->digest_title, 60 * 60 * 24 * 1); + } + if ($this->create_digest_weekly == 1) { + $this->ping_digest('aktt_next_weekly_digest', 'aktt_last_digest_post_weekly', $this->digest_title_weekly, 60 * 60 * 24 * 7); + } + return; + } + + function ping_digest($nextDateField, $lastDateField, $title, $defaultDuration) { + + $next = get_option($nextDateField); + + if ($next) { + $next = $this->validateDate($next); + $rightNow = time(); + if ($rightNow >= $next) { + $start = get_option($lastDateField); + $start = $this->validateDate($start, $rightNow - $defaultDuration); + if ($this->do_digest_post($start, $next, $title)) { + update_option($lastDateField, $rightNow); + update_option($nextDateField, $next + $defaultDuration); + } else { + update_option($lastDateField, null); + } + } + } + } + + function validateDate($in, $default = 0) { + if (!is_numeric($in)) { + // try to convert what they gave us into a date + $out = strtotime($in); + // if that doesn't work, return the default + if (!is_numeric($out)) { + return $default; + } + return $out; + } + return $in; + } + + function do_digest_post($start, $end, $title) { + + if (!$start || !$end) return false; + + // flag us as busy + update_option('aktt_doing_digest_post', '1'); + remove_action('publish_post', 'aktt_notify_twitter', 99); + remove_action('publish_post', 'aktt_store_post_options', 1, 2); + remove_action('save_post', 'aktt_store_post_options', 1, 2); + // see if there's any tweets in the time range + global $wpdb; + + $startGMT = gmdate("Y-m-d H:i:s", $start); + $endGMT = gmdate("Y-m-d H:i:s", $end); + + // build sql + $conditions = array(); + $conditions[] = "tw_created_at >= '{$startGMT}'"; + $conditions[] = "tw_created_at <= '{$endGMT}'"; + $conditions[] = "tw_text NOT LIKE '$this->tweet_prefix%'"; + if ($this->exclude_reply_tweets) { + $conditions[] = "tw_text NOT LIKE '@%'"; + } + $where = implode(' AND ', $conditions); + + $sql = " + SELECT * FROM {$wpdb->aktt} + WHERE {$where} + GROUP BY tw_id + ORDER BY tw_created_at {$this->digest_tweet_order} + "; + + $tweets = $wpdb->get_results($sql); + + if (count($tweets) > 0) { + + $tweets_to_post = array(); + foreach ($tweets as $data) { + $tweet = new aktt_tweet; + $tweet->tw_text = $data->tw_text; + $tweet->tw_reply_tweet = $data->tw_reply_tweet; + if (!$tweet->tweet_is_post_notification() || ($tweet->tweet_is_reply() && $this->exclude_reply_tweets)) { + $tweets_to_post[] = $data; + } + } + + $tweets_to_post = apply_filters('aktt_tweets_to_digest_post', $tweets_to_post); // here's your chance to alter the tweet list that will be posted as the digest + + if (count($tweets_to_post) > 0) { + $content = '
      '."\n"; + foreach ($tweets_to_post as $tweet) { + $content .= '
    • '.aktt_tweet_display($tweet, 'absolute').'
    • '."\n"; + } + $content .= '
    '."\n"; + if ($this->give_tt_credit == '1') { + $content .= '

    '.__('Powered by Twitter Tools', 'twitter-tools').'

    '; + } + $post_data = array( + 'post_content' => $wpdb->escape($content), + 'post_title' => $wpdb->escape(sprintf($title, date('Y-m-d'))), + 'post_date' => date('Y-m-d H:i:s', $end), + 'post_category' => array($this->blog_post_category), + 'post_status' => 'publish', + 'post_author' => $wpdb->escape($this->blog_post_author) + ); + $post_data = apply_filters('aktt_digest_post_data', $post_data); // last chance to alter the digest content + + $post_id = wp_insert_post($post_data); + + add_post_meta($post_id, 'aktt_tweeted', '1', true); + wp_set_post_tags($post_id, $this->blog_post_tags); + } + + } + add_action('publish_post', 'aktt_notify_twitter', 99); + add_action('publish_post', 'aktt_store_post_options', 1, 2); + add_action('save_post', 'aktt_store_post_options', 1, 2); + update_option('aktt_doing_digest_post', '0'); + return true; + } + + function tweet_download_interval() { + return 600; + } + + function do_tweet($tweet = '') { + if (empty($this->twitter_username) + || empty($this->twitter_password) + || empty($tweet) + || empty($tweet->tw_text) + ) { + return; + } + $tweet = apply_filters('aktt_do_tweet', $tweet); // return false here to not tweet + if (!$tweet) { + return; + } + require_once(ABSPATH.WPINC.'/class-snoopy.php'); + $snoop = new Snoopy; + $snoop->agent = 'Twitter Tools http://alexking.org/projects/wordpress'; + $snoop->rawheaders = array( + 'X-Twitter-Client' => 'Twitter Tools' + , 'X-Twitter-Client-Version' => $this->version + , 'X-Twitter-Client-URL' => 'http://alexking.org/projects/wordpress/twitter-tools.xml' + ); + $snoop->user = $this->twitter_username; + $snoop->pass = $this->twitter_password; + $snoop->submit( + AKTT_API_POST_STATUS + , array( + 'status' => $tweet->tw_text + , 'source' => 'twittertools' + ) + ); + if (strpos($snoop->response_code, '200')) { + update_option('aktt_last_tweet_download', strtotime('-28 minutes')); + return true; + } + return false; + } + + function do_blog_post_tweet($post_id = 0) { +// this is only called on the publish_post hook + if ($this->notify_twitter == '0' + || $post_id == 0 + || get_post_meta($post_id, 'aktt_tweeted', true) == '1' + || get_post_meta($post_id, 'aktt_notify_twitter', true) == 'no' + ) { + return; + } + $post = get_post($post_id); + // check for an edited post before TT was installed + if ($post->post_date <= $this->install_date) { + return; + } + // check for private posts + if ($post->post_status == 'private') { + return; + } + $tweet = new aktt_tweet; + $url = apply_filters('tweet_blog_post_url', get_permalink($post_id)); + $tweet->tw_text = sprintf(__($this->tweet_format, 'twitter-tools'), @html_entity_decode($post->post_title, ENT_COMPAT, 'UTF-8'), $url); + $tweet = apply_filters('aktt_do_blog_post_tweet', $tweet, $post); // return false here to not tweet + if (!$tweet) { + return; + } + $this->do_tweet($tweet); + add_post_meta($post_id, 'aktt_tweeted', '1', true); + } + + function do_tweet_post($tweet) { + global $wpdb; + remove_action('publish_post', 'aktt_notify_twitter', 99); + $data = array( + 'post_content' => $wpdb->escape(aktt_make_clickable($tweet->tw_text)) + , 'post_title' => $wpdb->escape(trim_add_elipsis($tweet->tw_text, 30)) + , 'post_date' => get_date_from_gmt(date('Y-m-d H:i:s', $tweet->tw_created_at)) + , 'post_category' => array($this->blog_post_category) + , 'post_status' => 'publish' + , 'post_author' => $wpdb->escape($this->blog_post_author) + ); + $data = apply_filters('aktt_do_tweet_post', $data, $tweet); // return false here to not make a blog post + if (!$data) { + return; + } + $post_id = wp_insert_post($data); + add_post_meta($post_id, 'aktt_twitter_id', $tweet->tw_id, true); + wp_set_post_tags($post_id, $this->blog_post_tags); + add_action('publish_post', 'aktt_notify_twitter', 99); + } +} + +class aktt_tweet { + function aktt_tweet( + $tw_id = '' + , $tw_text = '' + , $tw_created_at = '' + , $tw_reply_username = null + , $tw_reply_tweet = null + ) { + $this->id = ''; + $this->modified = ''; + $this->tw_created_at = $tw_created_at; + $this->tw_text = $tw_text; + $this->tw_reply_username = $tw_reply_username; + $this->tw_reply_tweet = $tw_reply_tweet; + $this->tw_id = $tw_id; + } + + function twdate_to_time($date) { + $parts = explode(' ', $date); + $date = strtotime($parts[1].' '.$parts[2].', '.$parts[5].' '.$parts[3]); + return $date; + } + + function tweet_post_exists() { + global $wpdb; + $test = $wpdb->get_results(" + SELECT * + FROM $wpdb->postmeta + WHERE meta_key = 'aktt_twitter_id' + AND meta_value = '".$wpdb->escape($this->tw_id)."' + "); + if (count($test) > 0) { + return true; + } + return false; + } + + function tweet_is_post_notification() { + global $aktt; + if (substr($this->tw_text, 0, strlen($aktt->tweet_prefix)) == $aktt->tweet_prefix) { + return true; + } + return false; + } + + function tweet_is_reply() { +// Twitter data changed - users still expect anything starting with @ is a reply +// return !empty($this->tw_reply_tweet); + return (substr($this->tw_text, 0, 1) == '@'); + } + + function add() { + global $wpdb, $aktt; + $wpdb->query(" + INSERT + INTO $wpdb->aktt + ( tw_id + , tw_text + , tw_reply_username + , tw_reply_tweet + , tw_created_at + , modified + ) + VALUES + ( '".$wpdb->escape($this->tw_id)."' + , '".$wpdb->escape($this->tw_text)."' + , '".$wpdb->escape($this->tw_reply_username)."' + , '".$wpdb->escape($this->tw_reply_tweet)."' + , '".date('Y-m-d H:i:s', $this->tw_created_at)."' + , NOW() + ) + "); + do_action('aktt_add_tweet', $this); + if ($aktt->create_blog_posts == '1' && !$this->tweet_post_exists() && !$this->tweet_is_post_notification() && (!$aktt->exclude_reply_tweets || !$this->tweet_is_reply())) { + $aktt->do_tweet_post($this); + } + } +} + +function aktt_api_status_show_url($id) { + return str_replace('###ID###', $id, AKTT_API_STATUS_SHOW); +} + +function aktt_profile_url($username) { + return str_replace('###USERNAME###', $username, AKTT_PROFILE_URL); +} + +function aktt_profile_link($username, $prefix = '', $suffix = '') { + return $prefix.''.$username.''.$suffix; +} + +function aktt_hashtag_url($hashtag) { + $hashtag = urlencode('#'.$hashtag); + return str_replace('###HASHTAG###', $hashtag, AKTT_HASHTAG_URL); +} + +function aktt_hashtag_link($hashtag, $prefix = '', $suffix = '') { + return $prefix.''.htmlspecialchars($hashtag).''.$suffix; +} + +function aktt_status_url($username, $status) { + return str_replace( + array( + '###USERNAME###' + , '###STATUS###' + ) + , array( + $username + , $status + ) + , AKTT_STATUS_URL + ); +} + +function aktt_login_test($username, $password) { + require_once(ABSPATH.WPINC.'/class-snoopy.php'); + $snoop = new Snoopy; + $snoop->agent = 'Twitter Tools http://alexking.org/projects/wordpress'; + $snoop->user = $username; + $snoop->pass = $password; + $snoop->fetch(AKTT_API_USER_TIMELINE); + if (strpos($snoop->response_code, '200')) { + return __("Login succeeded, you're good to go.", 'twitter-tools'); + } else { + $json = new Services_JSON(); + $results = $json->decode($snoop->results); + return sprintf(__('Sorry, login failed. Error message from Twitter: %s', 'twitter-tools'), $results->error); + } +} + + +function aktt_ping_digests() { + global $aktt; + $aktt->ping_digests(); +} + +function aktt_update_tweets() { + global $aktt; + // let the last update run for 10 minutes + if (time() - intval(get_option('aktt_doing_tweet_download')) < $aktt->tweet_download_interval()) { + return; + } + // wait 10 min between downloads + if (time() - intval(get_option('aktt_last_tweet_download')) < $aktt->tweet_download_interval()) { + return; + } + update_option('aktt_doing_tweet_download', time()); + global $wpdb, $aktt; + if (empty($aktt->twitter_username) || empty($aktt->twitter_password)) { + update_option('aktt_doing_tweet_download', '0'); + return; + } + require_once(ABSPATH.WPINC.'/class-snoopy.php'); + $snoop = new Snoopy; + $snoop->agent = 'Twitter Tools http://alexking.org/projects/wordpress'; + $snoop->user = $aktt->twitter_username; + $snoop->pass = $aktt->twitter_password; + $snoop->fetch(AKTT_API_USER_TIMELINE); + + if (!strpos($snoop->response_code, '200')) { + update_option('aktt_doing_tweet_download', '0'); + return; + } + + $data = $snoop->results; + // hash results to see if they're any different than the last update, if so, return + $hash = md5($data); + if ($hash == get_option('aktt_update_hash')) { + update_option('aktt_last_tweet_download', time()); + update_option('aktt_doing_tweet_download', '0'); + return; + } + $json = new Services_JSON(); + $tweets = $json->decode($data); + + if (is_array($tweets) && count($tweets) > 0) { + $tweet_ids = array(); + foreach ($tweets as $tweet) { + $tweet_ids[] = $wpdb->escape($tweet->id); + } + $existing_ids = $wpdb->get_col(" + SELECT tw_id + FROM $wpdb->aktt + WHERE tw_id + IN ('".implode("', '", $tweet_ids)."') + "); + $new_tweets = array(); + foreach ($tweets as $tw_data) { + if (!$existing_ids || !in_array($tw_data->id, $existing_ids)) { + $tweet = new aktt_tweet( + $tw_data->id + , $tw_data->text + ); + $tweet->tw_created_at = $tweet->twdate_to_time($tw_data->created_at); + if (!empty($tw_data->in_reply_to_status_id)) { + $tweet->tw_reply_tweet = $tw_data->in_reply_to_status_id; + $url = aktt_api_status_show_url($tw_data->in_reply_to_status_id); + $snoop->fetch($url); + if (strpos($snoop->response_code, '200') !== false) { + $data = $snoop->results; + $status = $json->decode($data); + $tweet->tw_reply_username = $status->user->screen_name; + } + } + // make sure we haven't downloaded someone else's tweets - happens sometimes due to Twitter hiccups + if (strtolower($tw_data->user->screen_name) == strtolower($aktt->twitter_username)) { + $new_tweets[] = $tweet; + $tweet->add(); + } + } + } + } + aktt_reset_tweet_checking($hash, time()); +} + + +function aktt_reset_tweet_checking($hash = '', $time = 0) { + if (!current_user_can('manage_options')) { + return; + } + update_option('aktt_update_hash', $hash); + update_option('aktt_last_tweet_download', $time); + update_option('aktt_doing_tweet_download', '0'); +} + +function aktt_reset_digests() { + if (!current_user_can('manage_options')) { + return; + } + update_option('aktt_doing_digest_post', '0'); +} + +function aktt_notify_twitter($post_id) { + global $aktt; + $aktt->do_blog_post_tweet($post_id); +} +add_action('publish_post', 'aktt_notify_twitter', 99); + +function aktt_sidebar_tweets() { + global $wpdb, $aktt; + if ($aktt->exclude_reply_tweets) { + $where = "AND tw_text NOT LIKE '@%' "; + } + else { + $where = ''; + } + $tweets = $wpdb->get_results(" + SELECT * + FROM $wpdb->aktt + WHERE tw_text NOT LIKE '$aktt->tweet_prefix%' + $where + GROUP BY tw_id + ORDER BY tw_created_at DESC + LIMIT $aktt->sidebar_tweet_count + "); + $output = '
    '."\n" + .'
      '."\n"; + if (count($tweets) > 0) { + foreach ($tweets as $tweet) { + $output .= '
    • '.aktt_tweet_display($tweet).'
    • '."\n"; + } + } + else { + $output .= '
    • '.__('No tweets available at the moment.', 'twitter-tools').'
    • '."\n"; + } + if (!empty($aktt->twitter_username)) { + $output .= '
    • '.__('More updates...', 'twitter-tools').'
    • '."\n"; + } + $output .= '
    '; + if ($aktt->tweet_from_sidebar == '1' && !empty($aktt->twitter_username) && !empty($aktt->twitter_password)) { + $output .= aktt_tweet_form('input', 'onsubmit="akttPostTweet(); return false;"'); + $output .= '

    '.__('Posting tweet...', 'twitter-tools').'

    '; + } + if ($aktt->give_tt_credit == '1') { + $output .= '

    '.__('Powered by Twitter Tools', 'twitter-tools').'

    '; + } + $output .= '
    '; + print($output); +} + +function aktt_latest_tweet() { + global $wpdb, $aktt; + $tweets = $wpdb->get_results(" + SELECT * + FROM $wpdb->aktt + WHERE tw_text NOT LIKE '$aktt->tweet_prefix%' + GROUP BY tw_id + ORDER BY tw_created_at DESC + LIMIT 1 + "); + if (count($tweets) == 1) { + foreach ($tweets as $tweet) { + $output = aktt_tweet_display($tweet); + } + } + else { + $output = __('No tweets available at the moment.', 'twitter-tools'); + } + print($output); +} + +function aktt_tweet_display($tweet, $time = 'relative') { + global $aktt; + $output = aktt_make_clickable(wp_specialchars($tweet->tw_text)); + if (!empty($tweet->tw_reply_username)) { + $output .= ' '.sprintf(__('in reply to %s', 'twitter-tools'), $tweet->tw_reply_username).''; + } + switch ($time) { + case 'relative': + $time_display = aktt_relativeTime($tweet->tw_created_at, 3); + break; + case 'absolute': + $time_display = '#'; + break; + } + $output .= ' '.$time_display.''; + $output = apply_filters('aktt_tweet_display', $output, $tweet); // allows you to alter the tweet display output + return $output; +} + +function aktt_make_clickable($tweet) { + $tweet .= ' '; + $tweet = preg_replace_callback( + '/@([a-zA-Z0-9_]{1,15})([) ])/' + , create_function( + '$matches' + , 'return aktt_profile_link($matches[1], \'@\', $matches[2]);' + ) + , $tweet + ); + $tweet = preg_replace_callback( + '/\ #([a-zA-Z0-9_]{1,15})/' + , create_function( + '$matches' + , 'return aktt_hashtag_link($matches[1], \' #\', \'\');' + ) + , $tweet + ); + + if (function_exists('make_chunky')) { + return make_chunky($tweet); + } + else { + return make_clickable($tweet); + } +} + +function aktt_tweet_form($type = 'input', $extra = '') { + $output = ''; + if (current_user_can('publish_posts')) { + $output .= ' +
    +
    + '; + switch ($type) { + case 'input': + $output .= ' +

    + + + '; + break; + case 'textarea': + $output .= ' +

    + + + '; + break; + } + $output .= ' +

    + + +

    +
    +
    +
    + '; + } + return $output; +} + +function aktt_widget_init() { + if (!function_exists('register_sidebar_widget')) { + return; + } + function aktt_widget($args) { + extract($args); + $options = get_option('aktt_widget'); + $title = $options['title']; + if (empty($title)) { + } + echo $before_widget . $before_title . $title . $after_title; + aktt_sidebar_tweets(); + echo $after_widget; + } + register_sidebar_widget(array(__('Twitter Tools', 'twitter-tools'), 'widgets'), 'aktt_widget'); + + function aktt_widget_control() { + $options = get_option('aktt_widget'); + if (!is_array($options)) { + $options = array( + 'title' => __("What I'm Doing...", 'twitter-tools') + ); + } + if (isset($_POST['ak_action']) && $_POST['ak_action'] == 'aktt_update_widget_options') { + $options['title'] = strip_tags(stripslashes($_POST['aktt_widget_title'])); + update_option('aktt_widget', $options); + // reset checking so that sidebar isn't blank if this is the first time activating + aktt_reset_tweet_checking(); + aktt_update_tweets(); + } + + // Be sure you format your options to be valid HTML attributes. + $title = htmlspecialchars($options['title'], ENT_QUOTES); + + // Here is our little form segment. Notice that we don't need a + // complete form. This will be embedded into the existing form. + print(' +

    +

    '.__('Find additional Twitter Tools options on the Twitter Tools Options page.', 'twitter-tools').' + + '); + } + register_widget_control(array(__('Twitter Tools', 'twitter-tools'), 'widgets'), 'aktt_widget_control', 300, 100); + +} +add_action('widgets_init', 'aktt_widget_init'); + +function aktt_init() { + global $wpdb, $aktt; + $aktt = new twitter_tools; + + $wpdb->aktt = $wpdb->prefix.'ak_twitter'; + + $aktt->get_settings(); + if (($aktt->last_tweet_download + $aktt->tweet_download_interval()) < time()) { + add_action('shutdown', 'aktt_update_tweets'); + add_action('shutdown', 'aktt_ping_digests'); + } + if (is_admin() || ($aktt->tweet_from_sidebar && current_user_can('publish_posts'))) { + switch ($aktt->js_lib) { + case 'jquery': + wp_enqueue_script('jquery'); + break; + case 'prototype': + wp_enqueue_script('prototype'); + break; + } + } + global $wp_version; + if (isset($wp_version) && version_compare($wp_version, '2.5', '>=') && empty ($aktt->install_date)) { + add_action('admin_notices', create_function( '', "echo '

    ".sprintf(__('Please update your Twitter Tools settings', 'twitter-tools'), get_bloginfo('wpurl')."/wp-admin/options-general.php?page=twitter-tools.php")."

    ';" ) ); + } + if (!get_option('aktt_tweet_prefix')) { + update_option('aktt_tweet_prefix', $aktt->tweet_prefix); + add_action('admin_notices', create_function( '', "echo '

    ".sprintf(__('Please update your Twitter Tools settings', 'twitter-tools'), get_bloginfo('wpurl')."/wp-admin/options-general.php?page=twitter-tools.php")."

    ';" ) ); + } +} +add_action('init', 'aktt_init'); + +function aktt_head() { + global $aktt; + if ($aktt->tweet_from_sidebar) { + print(' + + + '); + } +} +add_action('wp_head', 'aktt_head'); + +function aktt_head_admin() { + print(' + + + '); +} +add_action('admin_head', 'aktt_head_admin'); + +function aktt_request_handler() { + global $wpdb, $aktt; + if (!empty($_GET['ak_action'])) { + switch($_GET['ak_action']) { + case 'aktt_update_tweets': + aktt_update_tweets(); + wp_redirect(get_bloginfo('wpurl').'/wp-admin/options-general.php?page=twitter-tools.php&tweets-updated=true'); + die(); + break; + case 'aktt_reset_tweet_checking': + aktt_reset_tweet_checking(); + wp_redirect(get_bloginfo('wpurl').'/wp-admin/options-general.php?page=twitter-tools.php&tweet-checking-reset=true'); + die(); + break; + case 'aktt_reset_tweet_checking': + aktt_reset_digests(); + wp_redirect(get_bloginfo('wpurl').'/wp-admin/options-general.php?page=twitter-tools.php&digest-reset=true'); + die(); + break; + case 'aktt_js': + remove_action('shutdown', 'aktt_ping_digests'); + header("Content-type: text/javascript"); + switch ($aktt->js_lib) { + case 'jquery': +?> +function akttPostTweet() { + var tweet_field = jQuery('#aktt_tweet_text'); + var tweet_text = tweet_field.val(); + if (tweet_text == '') { + return; + } + var tweet_msg = jQuery("#aktt_tweet_posted_msg"); + jQuery.post( + "/index.php" + , { + ak_action: "aktt_post_tweet_sidebar" + , aktt_tweet_text: tweet_text + } + , function(data) { + tweet_msg.html(data); + akttSetReset(); + } + ); + tweet_field.val('').focus(); + jQuery('#aktt_char_count').html(''); + jQuery("#aktt_tweet_posted_msg").show(); +} +function akttSetReset() { + setTimeout('akttReset();', 2000); +} +function akttReset() { + jQuery('#aktt_tweet_posted_msg').hide(); +} + +function akttPostTweet() { + var tweet_field = $('aktt_tweet_text'); + var tweet_text = tweet_field.value; + if (tweet_text == '') { + return; + } + var tweet_msg = $("aktt_tweet_posted_msg"); + var akttAjax = new Ajax.Updater( + tweet_msg, + "/index.php", + { + method: "post", + parameters: "ak_action=aktt_post_tweet_sidebar&aktt_tweet_text=" + tweet_text, + onComplete: akttSetReset + } + ); + tweet_field.value = ''; + tweet_field.focus(); + $('aktt_char_count').innerHTML = ''; + tweet_msg.style.display = 'block'; +} +function akttSetReset() { + setTimeout('akttReset();', 2000); +} +function akttReset() { + $('aktt_tweet_posted_msg').style.display = 'none'; +} + +#aktt_tweet_form { + margin: 0; + padding: 5px 0; +} +#aktt_tweet_form fieldset { + border: 0; +} +#aktt_tweet_form fieldset #aktt_tweet_submit { + float: right; + margin-right: 10px; +} +#aktt_tweet_form fieldset #aktt_char_count { + color: #666; +} +#aktt_tweet_posted_msg { + background: #ffc; + display: none; + margin: 0 0 5px 0; + padding: 5px; +} +#aktt_tweet_form div.clear { + clear: both; + float: none; +} +js_lib) { + case 'jquery': +?> +function akttTestLogin() { + var result = jQuery('#aktt_login_test_result'); + result.show().addClass('aktt_login_result_wait').html(''); + jQuery.post( + "/index.php" + , { + ak_action: "aktt_login_test" + , aktt_twitter_username: jQuery('#aktt_twitter_username').val() + , aktt_twitter_password: jQuery('#aktt_twitter_password').val() + } + , function(data) { + result.html(data).removeClass('aktt_login_result_wait'); + setTimeout('akttTestLoginResult();', 5000); + } + ); +}; + +function akttTestLoginResult() { + jQuery('#aktt_login_test_result').fadeOut('slow'); +}; + +(function($){ + + jQuery.fn.timepicker = function(){ + + var hrs = new Array(); + for(var h = 1; h <= 12; hrs.push(h++)); + + var mins = new Array(); + for(var m = 0; m < 60; mins.push(m++)); + + var ap = new Array('am', 'pm'); + + function pad(n) { + n = n.toString(); + return n.length == 1 ? '0' + n : n; + } + + this.each(function() { + + var v = $(this).val(); + if (!v) v = new Date(); + + var d = new Date(v); + var h = d.getHours(); + var m = d.getMinutes(); + var p = (h >= 12) ? "pm" : "am"; + h = (h > 12) ? h - 12 : h; + + var output = ''; + + output += ''; + + output += ''; + + output += ''; + + $(this).after(output); + + var field = this; + $(this).siblings('select.timepicker').change(function() { + var h = parseInt($('#h_' + field.id).val(), 10); + var m = parseInt($('#m_' + field.id).val(), 10); + var p = $('#p_' + field.id).val(); + + if (p == "am") { + if (h == 12) { + h = 0; + } + } else if (p == "pm") { + if (h < 12) { + h += 12; + } + } + + var d = new Date(); + d.setHours(h); + d.setMinutes(m); + + $(field).val(d.toUTCString()); + }).change(); + + }); + + return this; + }; + + jQuery.fn.daypicker = function() { + + var days = new Array('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'); + + this.each(function() { + + var v = $(this).val(); + if (!v) v = 0; + v = parseInt(v, 10); + + var output = ""; + output += ''; + + $(this).after(output); + + var field = this; + $(this).siblings('select.daypicker').change(function() { + $(field).val( $(this).val() ); + }).change(); + + }); + + }; + + jQuery.fn.forceToggleClass = function(classNames, bOn) { + return this.each(function() { + jQuery(this)[ bOn ? "addClass" : "removeClass" ](classNames); + }); + }; + +})(jQuery); + +jQuery(function() { + + // add in the time and day selects + jQuery('form#ak_twittertools input.time').timepicker(); + jQuery('form#ak_twittertools input.day').daypicker(); + + // togglers + jQuery('.time_toggle .toggler').change(function() { + var theSelect = jQuery(this); + theSelect.parent('.time_toggle').forceToggleClass('active', theSelect.val() === "1"); + }).change(); + +}); + +function akttTestLogin() { + var username = $('aktt_twitter_username').value; + var password = $('aktt_twitter_password').value; + var result = $('aktt_login_test_result'); + result.className = 'aktt_login_result_wait'; + result.innerHTML = ''; + var akttAjax = new Ajax.Updater( + result, + "/index.php", + { + method: "post", + parameters: "ak_action=aktt_login_test&aktt_twitter_username=" + username + "&aktt_twitter_password=" + password, + onComplete: akttTestLoginResult + } + ); +} +function akttTestLoginResult() { + $('aktt_login_test_result').className = 'aktt_login_result'; + Fat.fade_element('aktt_login_test_result'); +} + +#aktt_tweet_form { + margin: 0; + padding: 5px 0; +} +#aktt_tweet_form fieldset { + border: 0; +} +#aktt_tweet_form fieldset textarea { + width: 95%; +} +#aktt_tweet_form fieldset #aktt_tweet_submit { + float: right; + margin-right: 50px; +} +#aktt_tweet_form fieldset #aktt_char_count { + color: #666; +} +#ak_readme { + height: 300px; + width: 95%; +} +#ak_twittertools .options { + overflow: hidden; + border: none; +} +#ak_twittertools .option { + overflow: hidden; + padding-bottom: 9px; + padding-top: 9px; +} +#ak_twittertools .option label { + display: block; + float: left; + width: 200px; + margin-right: 24px; + text-align: right; +} +#ak_twittertools .option span { + display: block; + float: left; + margin-left: 230px; + margin-top: 6px; + clear: left; +} +#ak_twittertools select, +#ak_twittertools input { + float: left; + display: block; + margin-right: 6px; +} +#ak_twittertools p.submit { + overflow: hidden; +} +#ak_twittertools .option span { + color: #666; + display: block; +} +#ak_twittertools #aktt_login_test_result { + display: inline; + padding: 3px; +} +#ak_twittertools fieldset.options .option span.aktt_login_result_wait { + background: #ffc; +} +#ak_twittertools fieldset.options .option span.aktt_login_result { + background: #CFEBF7; + color: #000; +} +#ak_twittertools .timepicker, +#ak_twittertools .daypicker { + display: none; +} +#ak_twittertools .active .timepicker, +#ak_twittertools .active .daypicker { + display: block +} +populate_settings(); + $aktt->update_settings(); + wp_redirect(get_bloginfo('wpurl').'/wp-admin/options-general.php?page=twitter-tools.php&updated=true'); + die(); + break; + case 'aktt_post_tweet_sidebar': + if (!empty($_POST['aktt_tweet_text']) && current_user_can('publish_posts')) { + $tweet = new aktt_tweet(); + $tweet->tw_text = stripslashes($_POST['aktt_tweet_text']); + if ($aktt->do_tweet($tweet)) { + die(__('Tweet posted.', 'twitter-tools')); + } + else { + die(__('Tweet post failed.', 'twitter-tools')); + } + } + break; + case 'aktt_post_tweet_admin': + if (!empty($_POST['aktt_tweet_text']) && current_user_can('publish_posts')) { + $tweet = new aktt_tweet(); + $tweet->tw_text = stripslashes($_POST['aktt_tweet_text']); + if ($aktt->do_tweet($tweet)) { + wp_redirect(get_bloginfo('wpurl').'/wp-admin/post-new.php?page=twitter-tools.php&tweet-posted=true'); + } + else { + wp_die(__('Oops, your tweet was not posted. Please check your username and password and that Twitter is up and running happily.', 'twitter-tools')); + } + die(); + } + break; + case 'aktt_login_test': + $test = @aktt_login_test( + @stripslashes($_POST['aktt_twitter_username']) + , @stripslashes($_POST['aktt_twitter_password']) + ); + die(__($test, 'twitter-tools')); + break; + } + } +} +add_action('init', 'aktt_request_handler', 10); + +function aktt_admin_tweet_form() { + global $aktt; + if ( $_GET['tweet-posted'] ) { + print(' +
    +

    '.__('Tweet posted.', 'twitter-tools').'

    +
    + '); + } + print(' +
    + '); + if (empty($aktt->twitter_username) || empty($aktt->twitter_password)) { + print(' +

    '.__('Please enter your Twitter account information in your Twitter Tools Options.', 'twitter-tools').'

    + '); + } + else { + print(' +

    '.__('Write Tweet', 'twitter-tools').'

    +

    '.__('This will create a new \'tweet\' in Twitter using the account information in your Twitter Tools Options.', 'twitter-tools').'

    + '.aktt_tweet_form('textarea').' + '); + } + print(' +
    + '); +} + +function aktt_options_form() { + global $wpdb, $aktt; + + $categories = get_categories('hide_empty=0'); + $cat_options = ''; + foreach ($categories as $category) { +// WP < 2.3 compatibility + !empty($category->term_id) ? $cat_id = $category->term_id : $cat_id = $category->cat_ID; + !empty($category->name) ? $cat_name = $category->name : $cat_name = $category->cat_name; + if ($cat_id == $aktt->blog_post_category) { + $selected = 'selected="selected"'; + } + else { + $selected = ''; + } + $cat_options .= "\n\t"; + } + + $authors = get_users_of_blog(); + $author_options = ''; + foreach ($authors as $user) { + $usero = new WP_User($user->user_id); + $author = $usero->data; + // Only list users who are allowed to publish + if (! $usero->has_cap('publish_posts')) { + continue; + } + if ($author->ID == $aktt->blog_post_author) { + $selected = 'selected="selected"'; + } + else { + $selected = ''; + } + $author_options .= "\n\t"; + } + + $js_libs = array( + 'jquery' => 'jQuery' + , 'prototype' => 'Prototype' + ); + $js_lib_options = ''; + foreach ($js_libs as $js_lib => $js_lib_display) { + if ($js_lib == $aktt->js_lib) { + $selected = 'selected="selected"'; + } + else { + $selected = ''; + } + $js_lib_options .= "\n\t"; + } + $digest_tweet_orders = array( + 'ASC' => __('Oldest first (Chronological order)', 'twitter-tools'), + 'DESC' => __('Newest first (Reverse-chronological order)', 'twitter-tools') + ); + $digest_tweet_order_options = ''; + foreach ($digest_tweet_orders as $digest_tweet_order => $digest_tweet_order_display) { + if ($digest_tweet_order == $aktt->digest_tweet_order) { + $selected = 'selected="selected"'; + } + else { + $selected = ''; + } + $digest_tweet_order_options .= "\n\t"; + } + $yes_no = array( + 'create_blog_posts' + , 'create_digest' + , 'create_digest_weekly' + , 'notify_twitter' + , 'notify_twitter_default' + , 'tweet_from_sidebar' + , 'give_tt_credit' + , 'exclude_reply_tweets' + ); + foreach ($yes_no as $key) { + $var = $key.'_options'; + if ($aktt->$key == '0') { + $$var = ' + + + '; + } + else { + $$var = ' + + + '; + } + } + if ( $_GET['tweets-updated'] ) { + print(' +
    +

    '.__('Tweets updated.', 'twitter-tools').'

    +
    + '); + } + if ( $_GET['tweet-checking-reset'] ) { + print(' +
    +

    '.__('Tweet checking has been reset.', 'twitter-tools').'

    +
    + '); + } + print(' +
    +

    '.__('Twitter Tools Options', 'twitter-tools').'

    +
    +
    +
    + + + + + +
    +
    + + +
    +
    + + '.__('Cannot be left blank. Will result in {Your prefix}: Title URL', 'twitter-tools').' +
    +
    + + ' .__('Also determines tweeting for posting via XML-RPC', 'twitter-tools').' +
    +
    + + +
    +
    + + + +
    +
    + + + '.__('Include %s where you want the date. Example: Tweets on %s', 'twitter-tools').' +
    +
    + + + + +
    +
    + + + '.__('Include %s where you want the date. Example: Tweets on %s', 'twitter-tools').' +
    +
    + + +
    +
    + + +
    +
    + + + '.__('Separate multiple tags with commas. Example: tweets, twitter', 'twitter-tools').' +
    +
    + + +
    +
    + + +
    +
    + + + '.__('Numbers only please.', 'twitter-tools').' +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +

    + +

    + +
    +

    '.__('Update Tweets / Reset Checking and Digests', 'twitter-tools').'

    +
    +

    '.__('Use these buttons to manually update your tweets or reset the checking settings.', 'twitter-tools').'

    +

    + + + + +

    +
    + '); + do_action('aktt_options_form'); + print(' + +

    '.__('README', 'twitter-tools').'

    +

    '.__('Find answers to common questions here.', 'twitter-tools').'

    + +
    + '); +} + +function aktt_post_options() { + global $aktt, $post; + if ($aktt->notify_twitter) { + echo '
    +

    '.__('Twitter Tools', 'twitter-tools').'

    +
    +

    '.__('Notify Twitter about this post?', 'twitter-tools'); + $notify = get_post_meta($post->ID, 'aktt_notify_twitter', true); + if ($notify == '') { + switch ($aktt->notify_twitter_default) { + case '1': + $notify = 'yes'; + break; + case '0': + $notify = 'no'; + break; + } + } + if ($notify == 'no') { + $yes = ''; + $no = 'checked="checked"'; + } + else { + $yes = 'checked="checked"'; + $no = ''; + } + echo ' +    + + '; + echo ' +

    + '; + do_action('aktt_post_options'); + echo ' +
    +
    + '; + } +} +add_action('edit_form_advanced', 'aktt_post_options'); + +function aktt_store_post_options($post_id, $post = false) { + global $aktt; + $post = get_post($post_id); + if (!$post || $post->post_type == 'revision') { + return; + } + + $notify_meta = get_post_meta($post_id, 'aktt_notify_twitter', true); + $posted_meta = $_POST['aktt_notify_twitter']; + + $save = false; + if (!empty($posted_meta)) { + $posted_meta == 'yes' ? $meta = 'yes' : $meta = 'no'; + $save = true; + } + else if (empty($notify_meta)) { + $aktt->notify_twitter_default ? $meta = 'yes' : $meta = 'no'; + $save = true; + } + else { + $save = false; + } + + if ($save) { + if (!update_post_meta($post_id, 'aktt_notify_twitter', $meta)) { + add_post_meta($post_id, 'aktt_notify_twitter', $meta); + } + } +} +add_action('draft_post', 'aktt_store_post_options', 1, 2); +add_action('publish_post', 'aktt_store_post_options', 1, 2); +add_action('save_post', 'aktt_store_post_options', 1, 2); + +function aktt_menu_items() { + if (current_user_can('manage_options')) { + add_options_page( + __('Twitter Tools Options', 'twitter-tools') + , __('Twitter Tools', 'twitter-tools') + , 10 + , basename(__FILE__) + , 'aktt_options_form' + ); + } + if (current_user_can('publish_posts')) { + add_submenu_page( + 'post-new.php' + , __('New Tweet', 'twitter-tools') + , __('Tweet', 'twitter-tools') + , 2 + , basename(__FILE__) + , 'aktt_admin_tweet_form' + ); + } +} +add_action('admin_menu', 'aktt_menu_items'); + +function aktt_plugin_action_links($links, $file) { + $plugin_file = basename(__FILE__); + if (basename($file) == $plugin_file) { + $settings_link = ''.__('Settings', 'twitter-tools').''; + array_unshift($links, $settings_link); + } + return $links; +} +add_filter('plugin_action_links', 'aktt_plugin_action_links', 10, 2); + +if (!function_exists('trim_add_elipsis')) { + function trim_add_elipsis($string, $limit = 100) { + if (strlen($string) > $limit) { + $string = substr($string, 0, $limit)."..."; + } + return $string; + } +} + +if (!function_exists('ak_gmmktime')) { + function ak_gmmktime() { + return gmmktime() - get_option('gmt_offset') * 3600; + } +} + +/** + +based on: http://www.gyford.com/phil/writing/2006/12/02/quick_twitter.php + + * Returns a relative date, eg "4 hrs ago". + * + * Assumes the passed-in can be parsed by strtotime. + * Precision could be one of: + * 1 5 hours, 3 minutes, 2 seconds ago (not yet implemented). + * 2 5 hours, 3 minutes + * 3 5 hours + * + * This is all a little overkill, but copied from other places I've used it. + * Also superfluous, now I've noticed that the Twitter API includes something + * similar, but this version is more accurate and less verbose. + * + * @access private. + * @param string date In a format parseable by strtotime(). + * @param integer precision + * @return string + */ +function aktt_relativeTime ($date, $precision=2) +{ + + $now = time(); + + $time = gmmktime( + substr($date, 11, 2) + , substr($date, 14, 2) + , substr($date, 17, 2) + , substr($date, 5, 2) + , substr($date, 8, 2) + , substr($date, 0, 4) + ); + + $time = strtotime(date('Y-m-d H:i:s', $time)); + + $diff = $now - $time; + + $months = floor($diff/2419200); + $diff -= $months * 2419200; + $weeks = floor($diff/604800); + $diff -= $weeks*604800; + $days = floor($diff/86400); + $diff -= $days * 86400; + $hours = floor($diff/3600); + $diff -= $hours * 3600; + $minutes = floor($diff/60); + $diff -= $minutes * 60; + $seconds = $diff; + + if ($months > 0) { + return date_i18n( __('Y-m-d', 'twitter-tools'), $time); + } else { + $relative_date = ''; + if ($weeks > 0) { + // Weeks and days + $relative_date .= ($relative_date?', ':'').$weeks.' '.__ngettext('week', 'weeks', $weeks, 'twitter-tools'); + if ($precision <= 2) { + $relative_date .= $days>0? ($relative_date?', ':'').$days.' '.__ngettext('day', 'days', $days, 'twitter-tools'):''; + if ($precision == 1) { + $relative_date .= $hours>0?($relative_date?', ':'').$hours.' '.__ngettext('hr', 'hrs', $hours, 'twitter-tools'):''; + } + } + } elseif ($days > 0) { + // days and hours + $relative_date .= ($relative_date?', ':'').$days.' '.__ngettext('day', 'days', $days, 'twitter-tools'); + if ($precision <= 2) { + $relative_date .= $hours>0?($relative_date?', ':'').$hours.' '.__ngettext('hr', 'hrs', $hours, 'twitter-tools'):''; + if ($precision == 1) { + $relative_date .= $minutes>0?($relative_date?', ':'').$minutes.' '.__ngettext('min', 'mins', $minutes, 'twitter-tools'):''; + } + } + } elseif ($hours > 0) { + // hours and minutes + $relative_date .= ($relative_date?', ':'').$hours.' '.__ngettext('hr', 'hrs', $hours, 'twitter-tools'); + if ($precision <= 2) { + $relative_date .= $minutes>0?($relative_date?', ':'').$minutes.' '.__ngettext('min', 'mins', $minutes, 'twitter-tools'):''; + if ($precision == 1) { + $relative_date .= $seconds>0?($relative_date?', ':'').$seconds.' '.__ngettext('sec', 'secs', $seconds, 'twitter-tools'):''; + } + } + } elseif ($minutes > 0) { + // minutes only + $relative_date .= ($relative_date?', ':'').$minutes.' '.__ngettext('min', 'mins', $minutes, 'twitter-tools'); + if ($precision == 1) { + $relative_date .= $seconds>0?($relative_date?', ':'').$seconds.' '.__ngettext('sec', 'secs', $seconds, 'twitter-tools'):''; + } + } else { + // seconds only + $relative_date .= ($relative_date?', ':'').$seconds.' '.__ngettext('sec', 'secs', $seconds, 'twitter-tools'); + } + } + + // Return relative date and add proper verbiage + return sprintf(__('%s ago', 'twitter-tools'), $relative_date); +} +if (!class_exists('Services_JSON')) { + +// PEAR JSON class + +/** +* Converts to and from JSON format. +* +* JSON (JavaScript Object Notation) is a lightweight data-interchange +* format. It is easy for humans to read and write. It is easy for machines +* to parse and generate. It is based on a subset of the JavaScript +* Programming Language, Standard ECMA-262 3rd Edition - December 1999. +* This feature can also be found in Python. JSON is a text format that is +* completely language independent but uses conventions that are familiar +* to programmers of the C-family of languages, including C, C++, C#, Java, +* JavaScript, Perl, TCL, and many others. These properties make JSON an +* ideal data-interchange language. +* +* This package provides a simple encoder and decoder for JSON notation. It +* is intended for use with client-side Javascript applications that make +* use of HTTPRequest to perform server communication functions - data can +* be encoded into JSON notation for use in a client-side javascript, or +* decoded from incoming Javascript requests. JSON format is native to +* Javascript, and can be directly eval()'ed with no further parsing +* overhead +* +* All strings should be in ASCII or UTF-8 format! +* +* LICENSE: 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. +* +* THIS SOFTWARE IS PROVIDED ``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 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. +* +* @category +* @package Services_JSON +* @author Michal Migurski +* @author Matt Knapp +* @author Brett Stimmerman +* @copyright 2005 Michal Migurski +* @version CVS: $Id: JSON.php,v 1.31 2006/06/28 05:54:17 migurski Exp $ +* @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 + * + * @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 + $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): + // 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): + // 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 + $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): + // 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) + { + + } + } + +} + +} + +?> \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/wp-super-cache/Changelog.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/wp-super-cache/Changelog.txt Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,2626 @@ +2009-11-18 17:28 donncha + + * readme.txt: Added "Translators" thank you message + +2009-11-18 17:14 donncha + + * Changelog.txt, readme.txt: Updated changelog + +2009-11-18 16:36 donncha + + * wp-cache-config-sample.php, wp-cache.php: Added + $wp_super_cache_advanced_debug and hide advanced debug features + by default + +2009-11-13 12:33 donncha + + * languages/wp-super-cache-es_ES.mo, + languages/wp-super-cache-es_ES.po: Update Spanish translation + files, props Omi + +2009-11-13 10:34 donncha + + * wp-super-cache.pot: Update translation file + +2009-11-13 10:24 donncha + + * wp-cache.php: Fire off page checker every 5 minutes rather than 1 + minute. + +2009-11-13 10:02 donncha + + * languages/wp-super-cache-it_IT.mo, + languages/wp-super-cache-it_IT.po: Fixed typo in translation + +2009-11-12 14:05 donncha + + * languages/wp-super-cache-es_ES.mo, + languages/wp-super-cache-es_ES.po, + languages/wp-super-cache-it_IT.mo, + languages/wp-super-cache-it_IT.po: Language updates via Gianni + Diurno and Omi (thanks guys, you do a great job!) + +2009-11-10 16:31 donncha + + * wp-super-cache.pot: Updated translation file + +2009-11-10 16:26 donncha + + * wp-cache-config-sample.php, wp-cache.php: Added + wp_cache_check_site() function + +2009-11-10 13:00 donncha + + * wp-cache.php: More gettext fixes + +2009-11-10 12:24 donncha + + * languages/wp-super-cache-es_ES.mo, + languages/wp-super-cache-es_ES.po: Added Spanish translation, + props Omi + +2009-11-09 16:45 donncha + + * wp-cache.php: Change wordpress_logged_in to wordpress in + supercache cookie checks to match PHP code + +2009-11-05 18:01 donncha + + * languages/wp-super-cache-it_IT.po: Fix link to adverts for + friends plugin + +2009-11-05 16:17 donncha + + * wp-cache.php: More gettext fixes, props Juan P.F. + +2009-11-05 12:24 donncha + + * languages/wp-super-cache-it_IT.mo, + languages/wp-super-cache-it_IT.po: First check in of Italian + translation by Gianni Diurno (http://gidibao.net/) + +2009-11-05 12:10 donncha + + * wp-super-cache.pot: Update translations + +2009-11-05 11:57 donncha + + * wp-cache.php: More gettext changes, props Gianni + +2009-11-04 16:28 donncha + + * wp-super-cache.pot: Fixed missing < in text + +2009-11-04 16:26 donncha + + * plugins/searchengine.php: Ooops, minor typo, props Juan P.F. + +2009-11-04 12:07 donncha + + * languages, wp-cache.php: Load translation files from languages + folder + +2009-11-04 11:50 donncha + + * wp-super-cache.pot: Updated translation file + +2009-11-04 11:39 donncha + + * wp-cache-phase1.php: Split user agent and cache file checks into + two for easier debugging + +2009-11-04 11:38 donncha + + * plugins/badbehaviour.php, plugins/searchengine.php, wp-cache.php: + gettext updates, thanks Gianni + +2009-10-25 17:44 donncha + + * wp-cache.php: Check for WP_CACHE when plugin loaded rather than + after init. See + http://wordpress.org/support/topic/307644?replies=28#post-1258599 + +2009-10-21 12:22 donncha + + * wp-cache-phase2.php: Add wp_cache_clear_cache() function to clean + cache directory + +2009-10-21 12:04 donncha + + * wp-cache-phase2.php: Fix indentation in ob callback + +2009-10-21 12:01 donncha + + * wp-cache-phase2.php: Only show logged in message when debugging + enabled + +2009-10-20 11:21 donncha + + * wp-super-cache.pot: Updated translation file + +2009-10-20 11:19 donncha + + * wp-cache.php: Minor typo + +2009-10-20 11:13 donncha + + * wp-cache.php: Minor text change to aid translation. Props Aldo + Latino + +2009-10-15 03:08 donncha + + * readme.txt: Added troubleshooting no 20., php vs apache owners + accessing cache files. props Nikolay Bachiyski. + +2009-10-12 22:01 donncha + + * wp-cache.php: Fix problem deleting cache files. props Marco + Schmoecker + +2009-10-06 14:55 donncha + + * wp-cache-phase2.php: Deleting a moderated comment shouldn't + delete cached files. + +2009-10-06 10:32 donncha + + * wp-cache-phase2.php: "wp_set_comment_status" action has 2 + parameters + +2009-10-06 08:50 donncha + + * wp-cache-phase2.php: Don't delete cache files on moderated pings + or trackbacks + +2009-10-05 21:29 donncha + + * wp-cache.php: Remove this debugging code + +2009-10-05 21:25 donncha + + * wp-cache.php: Schedule the site checker from the admin page, fix + typo when checking schedules + +2009-10-05 16:53 donncha + + * wp-cache.php: Added gzipped front page checker that kicks in + every 60 seconds via cron + +2009-10-02 21:42 donncha + + * Changelog.txt: More updating + +2009-10-02 21:40 donncha + + * readme.txt, wp-cache.php: Bump version to 0.9.7 + +2009-10-02 21:39 donncha + + * Changelog.txt: Updated changelog + +2009-10-02 21:34 donncha + + * wp-cache-phase2.php: Don't show "blank page", "404 not cached" or + "no html tag" warnings on output unless debugging enabled. + +2009-10-02 19:45 donncha + + * Changelog.txt, readme.txt: Updated changelog and readme.txt + changes + +2009-10-02 13:14 donncha + + * wp-super-cache.pot: Updated POT file + +2009-10-02 13:09 donncha + + * wp-cache.php: Minor text change to bio text + +2009-10-01 20:47 donncha + + * wp-cache-phase2.php, wp-cache.php: Added more debugging, on cache + cleanup + +2009-10-01 20:26 donncha + + * wp-cache.php: Sort the file listing by newest first. + Hide a filemtime warning, props @reverbstudios + +2009-10-01 19:57 donncha + + * wp-cache-phase1.php: Load wp-cache-phase2.php all the time + +2009-10-01 17:50 donncha + + * readme.txt: Added "How do I make certain parts of the page stay + dynamic?" to FAQ + +2009-09-30 09:51 donncha + + * wp-cache.php: Sort the stale from the fresh wp-cache files + properly + +2009-09-29 22:21 donncha + + * wp-cache-config-sample.php: Added $wp_super_cache_late_init to + config page + +2009-09-29 10:17 donncha + + * wp-cache.php: Add button to delete specific cache files. + +2009-09-29 09:14 donncha + + * wp-cache.php: Count wp-cached cache files correctly + +2009-09-29 08:17 donncha + + * wp-cache-config-sample.php: Added "Yandex" to list of rejected UA + for not caching + +2009-09-29 08:08 donncha + + * wp-cache.php: Add anchors to each section of the admin page + +2009-09-29 07:47 donncha + + * wp-cache-phase2.php: Don't cache wp-admin requests + +2009-09-29 07:43 donncha + + * wp-cache-phase2.php: Disable supercaching when GET parameters + present instead of all caching. Disable on POST (as normal) and + preview + +2009-09-28 21:59 donncha + + * wp-cache-phase1.php: Move cron code down so that cache variables + are set. + +2009-09-28 21:37 donncha + + * wp-super-cache.pot: More translatable text + +2009-09-28 21:35 donncha + + * wp-cache.php: More il8n mods + +2009-09-28 17:48 donncha + + * wp-cache.php: More il8n mods + +2009-09-28 13:57 donncha + + * wp-cache.php: Add positional anchors + +2009-09-28 13:52 donncha + + * wp-cache.php: Improve listing of cache files + +2009-09-28 13:35 donncha + + * wp-cache-phase1.php, wp-cache-phase2.php, wp-cache.php: Record + the cache key in the wp-cache meta file. Show that key on the + admin page file listings and add "wp_cache_meta" filter to modify + the cache meta data + +2009-09-28 13:12 donncha + + * wp-cache.php: Warn users they must enable mobile device support + if rewrite rules detected. Better detect when to warn that + .htaccess rules must be updated (no need when rewrite rules not + present) + +2009-09-28 11:12 donncha + + * wp-cache.php: Allow admin to list cached files. + +2009-09-28 09:43 donncha + + * wp-cache.php: More il8n changes + +2009-09-24 20:45 donncha + + * wp-cache.php: Forgot the fieldset, props thunderlounge! + +2009-09-24 11:43 donncha + + * wp-cache.php, wp-super-cache.pot: Renamed text domain to + wp-super-cache + Added .pot file + Load text domain as described in + http://codex.wordpress.org/I18n_for_WordPress_Developers + +2009-09-24 11:27 donncha + + * wp-cache.php: First stab at internationalising wp-super-cache + +2009-09-24 10:18 donncha + + * wp-cache.php: Removed REQUEST_URI from form actions + +2009-09-20 21:13 donncha + + * wp-cache-phase2.php, wp-cache.php: Added "Newest Cached Pages" + option to list 10 newest pages cached by the plugin. + +2009-09-20 19:10 donncha + + * wp-cache-phase2.php: Added "wpsupercache_404" filter. Return true + to cache error 404 pages. Props simonwheatley, see + http://wordpress.org/support/topic/312672 + +2009-09-18 20:37 donncha + + * wp-cache-phase1.php: Include the wordpress_test_cookie in the + cache key for wp-cache files. + +2009-09-16 10:23 donncha + + * wp-cache-phase1.php: Late Init. Don't do anything until "init" + +2009-09-16 10:21 donncha + + * wp-cache-phase2.php: Better debug messages + +2009-09-15 10:58 donncha + + * wp-cache-config-sample.php, wp-cache-phase1.php, + wp-cache-phase2.php, wp-cache.php: Check if logging enabled + before calling debug function (optimization) + Improve debug admin screen + +2009-09-10 10:12 donncha + + * wp-cache.php: Generate the correct rules for users ins + directories + +2009-09-10 08:41 donncha + + * wp-cache.php: When cache compression is off don't divide number + of cached files by 2 as no .gz files are created. Props dpark, + http://wordpress.org/support/topic/309443 + +2009-09-09 16:29 donncha + + * wp-cache-phase2.php: Improved output buffer error message + +2009-09-09 12:37 donncha + + * wp-cache-phase1.php, wp-cache-phase2.php, wp-cache.php: Added + debug settings section on admin page. + +2009-09-09 09:11 donncha + + * wp-cache.php: Check if safe_mode is 1 or "on", + http://wordpress.org/support/topic/239579?replies=9#post-1204927 + +2009-09-03 11:06 donncha + + * wp-cache-phase2.php: Don't cache GET requests earlier on before + OB is set up. + +2009-09-03 11:05 donncha + + * wp-cache-phase1.php: If debugging is not set then return + immediately + +2009-09-03 11:02 donncha + + * wp-cache-config-sample.php, wp-cache-phase1.php, + wp-cache-phase2.php: Added logging to a file and configurable log + level + +2009-09-01 09:31 donncha + + * readme.txt: Updated description of "How to tell if a page is + cached" + +2009-09-01 09:26 donncha + + * wp-cache.php: Tell user that compression is enabled in half-on + mode. + +2009-08-24 13:04 donncha + + * readme.txt: Added http://redbot.org/ to FAQ (thanks Alex!) + +2009-08-24 12:14 donncha + + * wp-cache.php: Send the Vary header to browsers + +2009-08-24 08:49 donncha + + * readme.txt: Added FAQ about caching warnings at + ismyblogworking.com + +2009-08-21 16:52 donncha + + * wp-cache.php: Minor fixes for rewrite rules. + http://wordpress.org/support/topic/301570?replies=14 + +2009-08-19 08:44 donncha + + * readme.txt: Added troubleshooting note to use half-on mode if + timestamp keeps updating. + +2009-08-06 10:55 donncha + + * wp-cache-phase2.php, wp-cache.php: Added "Cached Page" counter. + +2009-07-30 08:24 donncha + + * wp-cache-phase2.php, wp-cache.php: Add support for not caching + feeds and search pages. + +2009-07-29 17:28 donncha + + * Changelog.txt: Updated changelog + +2009-07-29 17:26 donncha + + * readme.txt, wp-cache.php: Bump version to 0.9.6.1 + +2009-07-29 17:13 donncha + + * readme.txt: Added changelog details for 0.9.6.1 + +2009-07-29 11:43 donncha + + * wp-cache-phase2.php, wp-cache.php: Apply "no caching" rules + Record options properly + +2009-07-29 11:29 donncha + + * wp-cache.php: Add page types to not cache to admin page + +2009-07-29 09:36 donncha + + * wp-cache-phase2.php: Move logged in message below check for POST + Add check for is_admin() too + (http://wordpress.org/support/topic/294687) + +2009-07-27 11:51 donncha + + * Changelog.txt: Updated changelog + +2009-07-27 11:50 donncha + + * readme.txt, wp-cache.php: Bumped version to 0.9.6 + +2009-07-27 11:49 donncha + + * Changelog.txt: Updated changelog.txt + +2009-07-27 11:46 donncha + + * wp-cache.php: I prefer pretty links + +2009-07-27 11:43 donncha + + * readme.txt: Added 0.9.6 changelog + +2009-07-27 11:38 donncha + + * wp-cache-phase2.php: Only show "not cached" message to logged in + users if not a feed. + +2009-07-27 11:34 donncha + + * wp-cache.php: Add link to uninstall script to admin page + +2009-07-27 11:33 donncha + + * readme.txt: Added filesmatch rules to docs + +2009-07-27 11:26 donncha + + * readme.txt: Added docs for using uninstall script + +2009-07-27 11:25 donncha + + * uninstall.php: Check if user can install plugins in uninstall + script + +2009-07-27 11:17 donncha + + * uninstall.php: Added uninstall script + +2009-07-27 10:42 donncha + + * wp-cache-phase2.php: Removed check of filemtime that's not needed + any more. + +2009-07-27 10:41 donncha + + * wp-cache.php: Added "ForceType" in cache .htaccess to force + supercache html.gz files to be served as html files. + +2009-07-27 10:39 donncha + + * readme.txt: Added category page and static page problem to FAQ + +2009-07-21 11:57 donncha + + * wp-cache-phase1.php: Fix indentation + +2009-07-21 11:55 donncha + + * wp-cache-phase2.php: Add back in + wp_cache_user_agent_is_rejected() if it doesn't exist (shouldn't + happen but it does) + +2009-07-21 10:58 donncha + + * wp-cache-phase2.php: Added message to show to logged in users + when caching disabled for them. + +2009-07-21 10:34 donncha + + * wp-cache-phase2.php: Check the filemtime on the right file, props + Simone Marx + +2009-07-20 16:37 donncha + + * wp-cache.php: Remove "get_comment_author_url" filter + +2009-07-17 15:42 donncha + + * wp-cache.php: Silly typo + +2009-07-17 15:41 donncha + + * wp-cache.php: Use Amazon UK link rather than US one + +2009-07-17 15:31 donncha + + * Changelog.txt: Updated changelog + +2009-07-17 15:30 donncha + + * readme.txt: Added changelog to readme.txt + +2009-07-17 15:22 donncha + + * readme.txt, wp-cache.php: Bump version to 0.9.5 + Bump tested version to 2.8.1 + +2009-07-17 15:19 donncha + + * wp-cache-phase1.php, wp-cache-phase2.php, wp-cache.php: Don't + serve wp_cached cache files to rejected USER AGENTs + +2009-07-17 15:08 donncha + + * wp-cache.php: Show next and last GC times in minutes, not local + times + +2009-07-02 17:21 donncha + + * wp-cache-phase2.php: Rearrange checks for cache files. + +2009-06-25 21:01 donncha + + * wp-cache-phase2.php: Hide filemtime warnings + +2009-06-19 15:07 donncha + + * wp-cache-phase1.php: Don't check the filesize or mtime + +2009-06-19 13:02 donncha + + * wp-cache-phase1.php, wp-cache-phase2.php: Don't check file age + when serving cached content - it will be deleted by ordinary + updates or by garbage collection + Check file age of each cache file only when regenerating (and + only to check if file was recently recreated) + +2009-06-19 09:03 donncha + + * wp-cache.php: Updated blurb + +2009-06-19 09:01 donncha + + * Changelog.txt: Updated changelog + +2009-06-18 12:34 donncha + + * wp-cache-phase2.php: Typos in closing and unlink commands + +2009-06-12 10:47 donncha + + * readme.txt, wp-cache-config-sample.php, wp-cache-phase1.php, + wp-cache.php: Bump tested version to 2.8 + Applied patch to fix PHP warnings by Matt Martz, + http://sivel.net/ + +2009-06-10 22:46 donncha + + * wp-cache-phase1.php: Forgot the mobile whitelist + +2009-06-05 17:04 donncha + + * wp-cache-phase1.php: Use cookies action instead of cache_key so + that supercache files aren't generated by anon mobile users + +2009-06-05 15:12 donncha + + * wp-cache-config-sample.php, wp-cache.php: Added "Android" mobile + user agent, thanks Matt Martz/sivel + +2009-06-05 12:27 donncha + + * readme.txt, wp-cache.php: Don't force the plugin into "half on" + mode if mobile support selected. + Added rewrite rules so that mobile devices are ignored by static + cache. + Thanks Vladimir Prelovac for bugging me about this. + +2009-05-29 08:40 donncha + + * wp-cache-phase1.php: Ignore the WP test cookie, props Jay @ + http://jay.gooby.org/post/nginx-wp-super-cache-not-writing-cache-files-solved + +2009-05-26 09:55 donncha + + * wp-cache-phase2.php: Use blog's html type rather than text/html, + props Weston Ruter + +2009-05-26 09:25 donncha + + * wp-cache-phase1.php, wp-cache-phase2.php: Cache the REQUEST_URI + in $wp_cache_request_uri in case a plugin overwrites it. + +2009-05-21 13:12 donncha + + * wp-cache.php: Add newlines to mod_rewrite rules + +2009-05-19 11:21 donncha + + * readme.txt: Updated recent changes list + +2009-05-19 11:18 donncha + + * readme.txt: Updated docs for DONOTCACHEPAGE constant + +2009-05-19 11:15 donncha + + * wp-cache.php: Added "WPSC_DISABLE_COMPRESSION" constant so + hosting companies can disable compression in wp-super-cache + +2009-05-19 11:04 donncha + + * wp-cache.php: Added "WPSC_DISABLE_LOCKING" constant so hosting + companies can disable file locking sitewide + +2009-05-19 10:19 donncha + + * wp-cache-phase2.php: Added "DONOTCACHEPAGE" constant so plugins + can specify pages that should not be cached. + +2009-05-11 13:35 donncha + + * wp-cache.php: Use PHP_DOCUMENT_ROOT in .htaccess rules if set, + props Adrian Ott @ Mosso + +2009-04-25 06:30 donncha + + * Changelog.txt: Updated changelog + +2009-04-25 06:30 donncha + + * readme.txt, wp-cache.php: Bumped version number to 0.9.4.3 + +2009-04-23 20:04 donncha + + * wp-cache-phase2.php: Move mutex init above actions again + +2009-04-22 11:34 donncha + + * readme.txt, wp-cache.php: Bump version number to 0.9.4.2 + +2009-04-22 11:06 donncha + + * wp-cache-phase2.php: Move check for logged in user after actions + are defined, otherwise cache files aren't updated. See + http://wordpress.org/support/topic/264090?replies=2 + +2009-04-21 19:53 donncha + + * Changelog.txt: Updated changelog + +2009-04-21 19:53 donncha + + * readme.txt, wp-cache.php: Bumped version to 0.9.4.1 + +2009-04-21 19:52 donncha + + * wp-cache.php: Oops, make sure the "don't cache if logged in" + checkbox can be unchecked! + Clear the cache when it's enabled + +2009-04-21 15:46 donncha + + * Changelog.txt: Updated changelog + +2009-04-21 15:45 donncha + + * readme.txt: Updated recent changes + +2009-04-21 15:44 donncha + + * Changelog.txt: Updated changelog + +2009-04-21 15:43 donncha + + * readme.txt, wp-cache.php: Bumped version number to 0.9.4 + +2009-04-21 11:46 donncha + + * wp-cache.php: Minor docs update + +2009-04-20 09:25 donncha + + * wp-cache-phase2.php: Check that user is logged in before not + caching + +2009-04-20 08:49 donncha + + * wp-cache-phase2.php, wp-cache.php: Added "Don't cache for logged + in users" option + +2009-04-18 22:03 donncha + + * readme.txt: Updated donation link + +2009-04-15 16:38 donncha + + * wp-cache.php: Display file size stats on admin page + +2009-04-15 15:27 donncha + + * wp-cache-phase2.php: Clear the cache when the profile is updated. + Props djquinn http://wordpress.org/support/topic/261504?replies=6 + http://www.dquinn.net/wp-super-cache-preview-draft-update-profile-wordpress/ + +2009-04-15 15:25 donncha + + * wp-cache-phase1.php: Don't cache post previews + +2009-04-14 14:10 donncha + + * wp-cache-config-sample.php, wp-cache.php: Added backslashes to + rejected URI. See + http://wordpress.org/support/topic/260790?replies=10#post-1045412 + +2009-04-06 14:17 donncha + + * Changelog.txt: Updated changelog to 0.9.3.1 + +2009-04-06 14:16 donncha + + * readme.txt, wp-cache.php: Bump version to 0.9.3.1 + +2009-04-06 14:16 donncha + + * readme.txt: Added link to forum thread on posting problems in + 0.9.3 + +2009-04-06 14:11 donncha + + * readme.txt: Added "Recent Changes" section to start of readme.txt + to make life easier on those upgrading + +2009-04-05 22:15 donncha + + * advanced-cache.php: Don't show broken path message in wp-admin. + Check if file is missing before showing an error + +2009-04-05 21:51 donncha + + * wp-cache-phase1.php: Return true so the include_once() returns + true. Fixes problem with saving posts + +2009-04-05 18:53 donncha + + * wp-cache-phase2.php: Clear the supercache when all cache is + cleared on post edit. + +2009-04-05 18:53 donncha + + * advanced-cache.php: whitespace cleanup + +2009-04-05 09:36 donncha + + * Changelog.txt: Updated changelog + +2009-04-05 08:25 donncha + + * wp-cache-phase2.php: Hide any potential opendir warnings + +2009-04-04 11:40 donncha + + * Changelog.txt: Updated Changelog to 0.9.3 + +2009-04-04 11:40 donncha + + * readme.txt, wp-cache.php: Bump version number to 0.9.3 + +2009-04-04 11:23 donncha + + * wp-cache.php: Minor change in cache rebuild and mutex option text + +2009-04-04 11:15 donncha + + * wp-cache-phase1.php: Cache files for single blogs go in cache/, + MU cache files go in cache/blogs/ + +2009-04-03 15:01 donncha + + * wp-cache-config-sample.php, wp-cache.php: "Cache rebuild" feature + is now on by default + File locks are off by default + Change language on admin page to "Enable file locking" instead of + "Disable..." + +2009-04-02 19:56 donncha + + * wp-cache-phase2.php: Get rid of more get_option() calls in the + shutdown function + +2009-04-02 13:42 donncha + + * wp-cache-phase1.php, wp-cache-phase2.php, wp-cache.php: Added a + blog cache dir. WordPress MU blogs will be cached into different + directories. + Regular WP will cache into cache/blogs/ instead of cache/ + +2009-04-02 13:41 donncha + + * readme.txt: Update docs: + 1. new signature on page. + 2. Minor text changes + +2009-04-02 11:49 donncha + + * wp-cache-phase2.php: Removed errlog + +2009-04-02 11:09 donncha + + * wp-cache-phase2.php: Check if rejected uri expr is a blank. See + http://justinblanton.com/2009/03/broken-wp-super-cache + +2009-04-01 11:46 donncha + + * wp-cache-phase2.php: Added "wp_cache_rebuild_or_delete()" + function to delete or create rebuild cache files + +2009-03-31 10:56 donncha + + * readme.txt: Minor docs update + +2009-03-31 10:53 donncha + + * readme.txt: Updated docs to stress that wp-cached files are "good + enough" for most people. + +2009-03-31 10:46 donncha + + * advanced-cache.php, readme.txt: Added "wpcache_broken_message()" + and code to catch when path in advanced-cache.php is broken. + +2009-03-31 10:32 donncha + + * wp-cache.php: Check if admin_url exists. Not everyone updates + WordPress. + +2009-03-31 10:31 donncha + + * wp-cache-phase2.php: In post change, remove corrupted or obsolete + meta and cache files + +2009-03-31 10:30 donncha + + * Changelog.txt: Updated changelog.txt + +2009-03-30 16:12 donncha + + * wp-cache-phase2.php: Added an "auto reject" list of URIs + +2009-03-30 06:22 donncha + + * wp-cache-phase1.php: Remove corrupted or obsolete meta file and + cache file. + +2009-03-30 04:53 donncha + + * wp-cache-phase1.php, wp-cache-phase2.php: Don't use array_push(). + Removed wp_cache_file_contents action as it may contribute to + memory problems for some hosts. + Pass buffer by reference to ob function. + Revert merge of shutdown function and ob function + Pass "siteurl" to post_id gc function + +2009-03-29 16:32 donncha + + * wp-cache-phase1.php: Make sure $meta is an array + +2009-03-28 13:03 donncha + + * Changelog.txt: Updated changelog + +2009-03-28 13:02 donncha + + * readme.txt, wp-cache.php: Bump version number to 0.9.2 + +2009-03-28 12:58 donncha + + * readme.txt: Added a troubleshooting entry for advanced-cache.php + +2009-03-28 12:54 donncha + + * advanced-cache.php: Include once instead of require because it + won't cause a FATAL error if the path is incorrect + +2009-03-28 12:39 donncha + + * readme.txt: Minimum version is now 2.6, props tigertech, + http://wordpress.org/support/topic/255628?replies=1 + +2009-03-28 12:34 donncha + + * wp-cache-phase2.php: Delete static "pages on front" when posts + change. + +2009-03-28 12:30 donncha + + * readme.txt: Move uninstall instructions up + Added "If all else fails" instructions + +2009-03-21 21:15 donncha + + * wp-cache.php: Added "Settings" link on plugins page. + Simplified admin notice, may fix 500 internal errors + +2009-03-21 21:13 donncha + + * wp-cache-phase1.php, wp-cache-phase2.php, wp-cache.php: Revert + moving meta information into cache file. It took too long to scan + the directory + +2009-03-20 15:34 donncha + + * wp-cache-phase2.php: Unlink supercache cache files as well as + wp-cache files + +2009-03-20 15:33 donncha + + * wp-cache-phase2.php: No need for separate $log variable + +2009-03-20 15:31 donncha + + * wp-cache-phase2.php: $supercacheonly is set further up + +2009-03-20 15:30 donncha + + * wp-cache-phase2.php: Minor typos "attac" + Removed unused function + +2009-03-20 15:28 donncha + + * wp-cache-phase2.php: Make sure other actions have a chance to + mark comments as spam + +2009-03-13 22:19 donncha + + * wp-cache-phase1.php: Don't need that error_log + +2009-03-13 11:41 donncha + + * wp-cache-phase1.php, wp-cache-phase2.php, wp-cache.php: Make meta + an array rather than an object because of this change to PHP5: + http://bugs.php.net/bug.php?id=40104 + Move meta file data into cache file. + +2009-03-13 09:06 donncha + + * wp-cache-phase2.php: Move wp_cache_shutdown_callback() into the + ob callback + +2009-03-09 09:52 donncha + + * wp-cache.php: Only check for apache modules if in supercache + mode. + +2009-02-27 09:55 donncha + + * plugins/badbehaviour.php: Note that compression disabled when BB + support enabled. + +2009-02-27 09:46 donncha + + * plugins/badbehaviour.php: Bad-behavior fixes. Plugin will find + the bb plugin folder now. + +2009-02-26 12:55 donncha + + * wp-cache-phase1.php: set the right variable. + +2009-02-26 11:53 donncha + + * Changelog.txt: Updated changelog, should have svnupped last time + +2009-02-26 11:53 donncha + + * Changelog.txt: Updated changelog + +2009-02-26 11:51 donncha + + * readme.txt, wp-cache.php: Bump version to 0.9.1 + +2009-02-26 11:35 donncha + + * readme.txt: Updated docs on "expired pages" and the required + modules needed to serve new data + +2009-02-26 11:23 donncha + + * wp-cache.php: Remove "experimental" heading. + +2009-02-26 11:07 donncha + + * wp-cache.php: Added "About the author" box to admin page. + +2009-02-19 16:07 donncha + + * wp-cache.php: Make the donation box hidable. + +2009-02-19 15:46 donncha + + * wp-cache.php: Added donation button, yes my html skills suck. + +2009-02-19 15:00 donncha + + * wp-cache.php: Match IP against 192.168 instead of 192. + +2009-02-19 13:43 donncha + + * readme.txt, wp-cache.php: Added checks for hostname = 127.x.x.x + or 192.x.x.x or if available uses wp_remote_get() to load + wp-cron.php + Gives warning if checks fail + Updated readme.txt with docs on how to resolve. Thanks to Joost + de Valk for help debugging this. http://yoast.com/wp-cron-issues/ + +2009-02-19 13:34 donncha + + * wp-cache-phase2.php: Hide file op warning. + Removed register_shutdown command that's not used any more + +2009-02-19 11:48 donncha + + * wp-cache.php: Hide rename warning. Possibly related to no global + lock. + +2009-02-17 13:04 donncha + + * Changelog.txt: Updated changelog + +2009-02-17 12:58 donncha + + * wp-cache-phase2.php: Don't show no HTML tag warning for + robots.txt, http://wordpress.org/support/topic/243904?replies=1 + +2009-02-17 12:36 donncha + + * wp-cache.php: Clear the supercache folder when it's disabled. + Remove the .disabled folder if a supercache folder exists. + Show Last and Next garbage collection times as UTC + Added an admin notice on the plugins page if wp-super-cache + caching is disabled + Add plugin notice below plugin row if caching is disabled + +2009-02-17 12:34 donncha + + * wp-cache-phase2.php: Hide some filemtime() warnings. Without a + global file lock we'll get more of these. + +2009-02-17 12:33 donncha + + * plugins/badbehaviour.php: Disable the supercache if Bad Behaviour + support is enabled. + +2009-02-14 11:48 donncha + + * readme.txt: Updated tag and added Donation link + +2009-02-06 10:48 donncha + + * wp-cache-phase1.php, wp-cache-phase2.php: Just use the output + buffer, no shutdown functions. + +2009-02-05 20:53 donncha + + * wp-cache-phase2.php: No need to call this callback twice! + +2009-02-05 15:32 donncha + + * wp-cache-config-sample.php: Remove any slashes left in the + blogcacheid + +2009-02-05 13:36 donncha + + * wp-cache.php: Replace blashslashes in WP_CONTENT_DIR here, + possible Win32 fix + +2009-02-05 10:20 donncha + + * readme.txt: Added "UserOnline" to the list of plugins that don't + update when a page is cached + +2009-02-05 09:55 donncha + + * wp-cache.php: Replace backslashes in WP_CONTENT_DIR too. Win32 + fix. props Chris (beerfan) + +2009-02-04 21:49 donncha + + * wp-cache-config-sample.php, wp-cache-phase2.php: Added + $wp_cache_shutdown_gc config option to use shutdown instead of + wp-cron + Added comments on config options + +2009-02-04 20:38 donncha + + * wp-cache-phase2.php: Don't create empty supercache directories. + +2009-02-04 10:25 donncha + + * readme.txt: Troubleshooting updates: advanced-cache.php, cache on + NFS warning + +2009-02-03 21:53 donncha + + * plugins/badbehaviour.php, wp-cache-phase1.php: Things act strange + when a function has a require_once(), even if it's never reached + +2009-02-03 21:41 donncha + + * plugins/badbehaviour.php, plugins/searchengine.php, + wp-cache-config-sample.php, wp-cache-phase1.php: Added Bad + Behaviour plugin + Allow SuperCache plugin directory to be relocated. See + $wp_cache_plugins_dir in config file. + Fixed updating Active status of searchengine plugin + Added new cacheactions: + 'wp_cache_served_cache_file' activated just before headers are + sent for an existing cache file. + 'wp_cache_file_contents' filter that every wp-cache cache file is + sent through. (ignoring mfunc) + +2009-02-03 12:11 donncha + + * wp-cache-phase1.php: Clean and echo the buffer + +2009-02-03 11:49 donncha + + * wp-cache-phase1.php, wp-cache-phase2.php: Register supercache + shutdown function right at the start of the process so it's + executed before WP objects are destroyed + +2009-02-02 15:48 donncha + + * wp-cache-phase2.php: Don't register shutdown function, call it + from the output buffer callback. + +2009-02-02 09:58 donncha + + * wp-cache-phase2.php: Don't read files into an array, reverting + [86134] + +2009-01-29 17:19 donncha + + * wp-cache.php: Remove double slashes from inst_root + +2009-01-29 16:28 donncha + + * wp-cache.php: Guess the install root properly + +2009-01-29 14:25 donncha + + * wp-cache-phase2.php: Revert prune_super_cache and + garbage_collection code. + +2009-01-29 06:41 donncha + + * wp-cache.php: Fix caching for blogs installed in sub dirs. See + http://wordpress.org/support/topic/238022?replies=6 + +2009-01-27 19:57 donncha + + * wp-cache-phase2.php: Only rename the tmp cache file when it's + created. + Hide warnings about renames and unlinks + +2009-01-27 06:18 donncha + + * Changelog.txt: Updated changelog + +2009-01-27 06:17 donncha + + * readme.txt, wp-cache.php: Bump version to 0.9 + +2009-01-27 06:17 donncha + + * wp-cache-phase2.php: Bring back mfunc code + +2009-01-27 05:53 donncha + + * wp-cache-phase2.php, wp-cache.php: Set GC to 10 minutes instead + of 30. + +2009-01-26 20:08 donncha + + * wp-cache.php: Show last and next garbage collection times + +2009-01-26 18:11 donncha + + * wp-cache.php: Make sure constant value is displayed, props + Jonathan Dingman + +2009-01-26 17:32 donncha + + * wp-cache-phase1.php: Update mobile "enabled" variable + +2009-01-26 17:32 donncha + + * wp-cache-phase2.php: Don't send gzip headers if headers already + sent + +2009-01-26 13:00 donncha + + * wp-cache-config-sample.php, wp-cache-phase2.php, wp-cache.php: + Removed "dynamic caching" that isn't documented anywhere any more + Fixed activate bugs with mobile device support + +2009-01-26 11:12 donncha + + * wp-cache-config-sample.php, wp-cache-phase1.php, wp-cache.php: + Mobile device support via + http://wordpress.org/extend/plugins/wordpress-mobile-edition/ by + Alex King + +2009-01-26 10:03 donncha + + * readme.txt: Added extra FAQs + +2009-01-25 11:21 donncha + + * wp-cache-phase2.php, wp-cache.php: Admin page updates + If expiry time is over 30 minutes, set garbage collection to 30 + minutes, else expiry time + +2009-01-25 09:11 donncha + + * wp-cache-phase2.php: If supercache enabled, Don't create wp-cache + files for anonymous users. Should cut down cached files by half + ore more. + +2009-01-25 07:56 donncha + + * wp-cache-phase2.php: Warn if cache expiry cron job took longer + than 30 seconds, props SiriusBuzz + +2009-01-25 07:49 donncha + + * advanced-cache.php, wp-cache-phase2.php, wp-cache.php: + advanced-cache.php will load the phase1.php even in relocated + plugin folders now. (NOTE. Must be updated if plugin folder + changes) + Removed error_log() + +2009-01-24 06:03 donncha + + * wp-cache.php: Update advanced-cache.php message, props Jonathan + Dingman + +2009-01-23 19:10 donncha + + * Changelog.txt: Updated Changelog for 0.8.9 + +2009-01-23 19:09 donncha + + * readme.txt, wp-cache.php: Bump version number to 0.8.9 and update + documentation + +2009-01-23 18:34 donncha + + * wp-cache.php: Updated text + +2009-01-23 12:43 donncha + + * wp-cache-phase2.php, wp-cache.php: Set garbage collection to 10 + seconds after expiry + +2009-01-23 12:13 donncha + + * wp-cache.php: mutext variable needs to be global + +2009-01-23 12:06 donncha + + * advanced-cache.php, wp-cache.php: Added "advanced-cache.php" + which will load wp-cache-phase1.php + Copy that file to wp-content/ instead of symlinking + Added checkboxes for "cache rebuild" and "disable file locking" + remove #list anchor tag + +2009-01-22 11:26 donncha + + * wp-cache-phase2.php: Delete lots more cache files in one go, for + busy sites + +2009-01-21 13:42 donncha + + * wp-cache-phase2.php: Removed "cron job called" debug message + +2009-01-21 13:05 donncha + + * wp-cache.php: Show all sections of the admin page by default. + Move cache contents up + +2009-01-20 11:23 donncha + + * wp-cache.php: Admin page UI update, props Robert Wolf + +2009-01-19 18:29 donncha + + * wp-cache-config-sample.php: Comment out $wp_cache_mutex_disabled + by default + +2009-01-19 18:27 donncha + + * wp-cache-config-sample.php, wp-cache-phase2.php: Allow mutex file + locking to be disabled + +2009-01-19 18:18 donncha + + * wp-cache.php: Fix the favourites if a non admin users logs in + +2009-01-16 17:04 donncha + + * Changelog.txt: Updated Changelog + +2009-01-16 17:03 donncha + + * wp-cache-config-sample.php, wp-cache-phase1.php, + wp-cache-phase2.php: Added simple DEBUG mode. Activate by setting + $wp_cache_debug to your email address in wp-cache-config.php + Sends debug emails on: cron job, failed job, when gzip headers + are missing from wp-cache meta file. + +2009-01-16 16:14 donncha + + * readme.txt, wp-cache.php: Bump version to 0.8.8 + +2009-01-16 16:10 donncha + + * wp-cache.php: Added "Delete Cache" link to Favourites menu + +2009-01-15 23:16 donncha + + * wp-cache-phase2.php: We clean up files as well as directories. + Should fix issue with non-updating blogs + +2009-01-14 22:47 donncha + + * wp-cache-config-sample.php, wp-cache-phase1.php, + wp-cache-phase2.php: Remove debugging code + +2009-01-14 18:51 donncha + + * wp-cache-config-sample.php, wp-cache-phase1.php, + wp-cache-phase2.php: Lots of debug code + +2009-01-14 14:33 donncha + + * readme.txt: Updated the "How do I know my blog is being cached?" + FAQ + +2009-01-12 17:51 donncha + + * wp-cache-phase2.php: Don't overwrite $dh directory handler + +2009-01-12 17:38 donncha + + * wp-cache-phase2.php: When reading large directories, create array + of files. The opendir handle seems to die. + +2009-01-11 09:16 donncha + + * wp-cache-phase2.php, wp-cache.php: Use opendir()/readdir() + instead of glob() + +2009-01-09 21:16 donncha + + * wp-cache-phase2.php: Minor typo + +2009-01-09 11:04 donncha + + * Changelog.txt: Updated changelog + +2009-01-09 11:04 donncha + + * readme.txt, wp-cache.php: Bump version to 0.8.7 + +2009-01-09 10:59 donncha + + * wp-cache-phase2.php, wp-cache.php: Change default expiry time to + 10 minutes + Only clean out 100 files at a time. Should help with very large + sites. + Fix file pointer. + +2008-12-05 09:57 donncha + + * wp-cache.php: Fix term -> meta typo, props kettari, + http://wordpress.org/support/topic/222613?replies=1 + +2008-12-04 18:13 donncha + + * Changelog.txt: Updated changelog for 0.8.6 + +2008-12-04 18:12 donncha + + * wp-cache-phase1.php: Added "WP-Super-Cache: WP-Cache" header for + cached php files. + +2008-12-04 17:59 donncha + + * readme.txt, wp-cache.php: Bump version numberb to 2.7 + +2008-12-04 17:44 donncha + + * wp-cache.php: Hide unlink errors + +2008-12-04 16:53 donncha + + * wp-cache-phase2.php: Use uniqid() instead of tempnam() to + generate temporary filenames. + No need for chmod. + Fixed minor typo + +2008-12-04 13:40 donncha + + * wp-cache-phase2.php: Record time of cache generation + +2008-12-04 13:27 donncha + + * readme.txt: Added Apache configuration docs on AllowOverride + +2008-12-02 11:00 donncha + + * wp-cache.php: If WP_CACHE is not enabled, but the define() line + is in wp-config.php, stop, because it's probably commented out. + +2008-12-01 11:38 donncha + + * wp-cache-phase2.php: Abort caching if plugin can't write to any + cache file, and report error + $gzsize may not survive to shutdown callback. Get the filesize + again + +2008-12-01 11:37 donncha + + * wp-cache-phase1.php: Push the headers into the headers array, not + the meta object + +2008-11-25 12:58 donncha + + * Changelog.txt: Updated changelog + +2008-11-25 12:58 donncha + + * readme.txt, wp-cache.php: Bump version number to 0.8.5 + +2008-11-25 12:45 donncha + + * wp-cache-phase2.php: Added "supercache_dir" filter so supercache + directory can be modified. + +2008-11-25 12:40 donncha + + * wp-cache-phase2.php: Removed backslashes from the supercache + filename + +2008-11-25 12:27 donncha + + * wp-cache.php: Warn if Apache modules are missing. + Display gzip cache rewrite rules. + Deal with WordPress MU better as it can't upgrade the .htaccess + file. + +2008-11-25 12:24 donncha + + * wp-cache-phase1.php: Added wp_cache_key cacheaction to modify + cache key (ie. add user agent, IP, etc) + +2008-11-25 11:10 donncha + + * wp-cache-phase1.php, wp-cache-phase2.php: Check that cache file + exists before serving, it may have been removed without the meta + file + +2008-11-25 11:01 donncha + + * wp-cache-phase2.php: Removed $gzipped variable + +2008-11-25 10:54 donncha + + * wp-cache-phase2.php: No need to addslashes() to file functions + +2008-11-14 13:20 donncha + + * wp-cache-phase2.php: Added wpsupercache_buffer filter so buffer + can be manipulated before writing to cache file + +2008-11-14 13:00 donncha + + * wp-cache-phase2.php: Move gzip header detection down + +2008-11-14 10:09 donncha + + * wp-cache-phase1.php, wp-cache-phase2.php: Add gzip headers back + if they are missing. Should fix problems with users seeing + corrupted pages. + +2008-11-14 10:00 donncha + + * readme.txt: Updated docs on file locking + +2008-11-11 17:28 donncha + + * wp-cache-phase2.php: Write wp-cache php cache files to temporary + files before moving into place. + Increase gzip compression to 3 + If cron job failed to get mutex lock, try again in 10 minutes + +2008-11-07 09:43 donncha + + * wp-cache.php: Use WP_CONTENT_URL in mod_rewrite rules. + Use WP_CONTENT_DIR in WPCACHEHOME definition. + +2008-10-27 13:21 donncha + + * readme.txt: Added links section and link to WP Widget Cache, + props to Ben @ http://www.binarymoon.co.uk/ + Minor troubleshooting update + +2008-10-23 08:14 donncha + + * wp-cache.php: wp_cache_check_global_config() fixes by joelhardi, + http://wordpress.org/support/topic/211477?replies=1#post-879591 + +2008-10-22 15:57 donncha + + * Changelog.txt: Updated changelog + +2008-10-22 15:55 donncha + + * readme.txt, wp-cache.php: Bump version number to 0.8.4 + +2008-10-11 22:10 donncha + + * wp-cache-phase2.php: Update the time of last gc + +2008-10-10 11:54 donncha + + * wp-cache-phase2.php, wp-cache.php: Change garbage collection + parameters to time rather than hits + +2008-10-08 16:06 donncha + + * Changelog.txt: Updated changelog + +2008-10-08 16:04 donncha + + * readme.txt, wp-cache.php: Bump version numbers to 0.8.3 + Updated docs + +2008-10-08 08:12 donncha + + * readme.txt: Note for WPMU users, + http://wordpress.org/support/topic/208770?replies=3#post-871207 + +2008-10-07 12:03 donncha + + * readme.txt: x-gzip->gzip + +2008-10-07 10:50 donncha + + * readme.txt: Minor typo, + http://wordpress.org/support/topic/208770?replies=1#post-870518 + +2008-10-07 10:44 donncha + + * plugins/searchengine.php: Don't overwrite logged in user details + in searchengine plugin. + +2008-10-06 09:19 donncha + + * wp-cache-phase1.php, wp-cache.php: Encode as gzip, not x-gzip as + IE7 has problems with it. ref: + http://bugs.typo3.org/view.php?id=4623 + +2008-10-01 08:05 donncha + + * readme.txt, wp-cache.php: Options -> Settings, thanks webmaestro + http://wordpress.org/support/topic/207576?replies=2 + +2008-09-29 09:29 donncha + + * wp-cache.php: Only update "clear on post" setting when saving + status options, thanks Viper007Bond + +2008-09-28 11:04 donncha + + * wp-cache-phase2.php: Only create compressed data if required + +2008-09-28 06:16 donncha + + * wp-cache-phase2.php: Compress cache files with "dynamic content" + too + +2008-09-28 05:56 donncha + + * wp-cache-phase2.php: Only compress cached files once. Nice speed + boost! + +2008-09-28 05:46 donncha + + * wp-cache-phase2.php: Write gzipped supercache files using fopen + instead of gzopen + +2008-09-26 23:16 donncha + + * Changelog.txt: Updated changelog + +2008-09-26 23:15 donncha + + * readme.txt, wp-cache.php: Bump the version number to 0.8.2 + +2008-09-26 23:14 donncha + + * wp-cache-config-sample.php, wp-cache-phase2.php, wp-cache.php: + Added $cache_rebuild_files setting to switch off "need rebuild" + functionality by default + +2008-09-26 16:00 donncha + + * wp-cache-phase2.php: On post change clear the front page + +2008-09-26 12:04 donncha + + * wp-cache-phase2.php: Move cache writers entry up above supercache + cleaning. + Only clean individual posts, don't clear cache when no post_id + +2008-09-26 09:49 donncha + + * wp-cache.php: Only show "Delete Cache" link to MU site admins or + admins on WP blogs + +2008-09-25 12:47 donncha + + * wp-cache.php: Save "wp_cache_clear_on_post_edit" properly, thanks + HarryRAR, + http://wordpress.org/support/topic/206371?replies=2#post-861998 + +2008-09-25 11:12 donncha + + * wp-cache-phase2.php, wp-cache.php: Can't clear cache on edit_post + because leaving a comment calls edit_post unfortunately + Experimental code to preserve supercache version of a page while + it's being regenerated. + +2008-09-24 14:21 donncha + + * wp-cache.php: Added "Delete Cache" link at top of admin pages + +2008-09-24 13:57 donncha + + * Changelog.txt: Updated changelog, still release 0.8.1 + +2008-09-24 13:03 donncha + + * wp-cache-phase2.php: Added function to clear cache when a post is + edited + +2008-09-24 13:02 donncha + + * wp-cache.php: Added "Clear on edit" checkbox to clear all cache + files when a post or page is edited + +2008-09-24 13:01 donncha + + * wp-cache.php: Remove meta and supercache directories when + deactivating + +2008-09-24 12:47 donncha + + * wp-cache.php: Switch status messages around. + +2008-09-24 12:47 donncha + + * wp-cache.php: Remove cache/.htaccess when uninstalling. + +2008-09-24 12:44 donncha + + * readme.txt: Make mod mime and rewrite line clearer, hopefully + +2008-09-24 12:38 donncha + + * wp-cache-phase2.php: comment_id typo + Only clear supercache files if it's enabled + +2008-09-24 12:37 donncha + + * readme.txt: Updated mod_rewrite rules and expiry/mime type rules + +2008-09-24 11:57 donncha + + * Changelog.txt: Updated changelog for 0.8.1 + +2008-09-24 11:57 donncha + + * readme.txt, wp-cache.php: Bump the version number + +2008-09-24 10:01 donncha + + * wp-cache-phase2.php: Make the temporary filename world readable + to avoid problems where Apache and PHP run as different users. + Thanks Tigertech for the code. + +2008-09-24 09:57 donncha + + * wp-cache-phase2.php: Check that rename worked, if not, remove + cache file and rename again. Props tigertech + +2008-09-23 19:55 donncha + + * wp-cache-phase2.php: Don't clear the supercache if it's not + enabled (In blog context, when a moderated comment is made) + +2008-09-23 13:09 donncha + + * Changelog.txt: Updated changelog + +2008-09-23 13:05 donncha + + * readme.txt, wp-cache.php: Bump the version to 0.8 + +2008-09-23 13:01 donncha + + * wp-cache-phase1.php: Comment: reminder to update .htaccess rules + if get_cookie cacheaction is used. + +2008-09-23 12:58 donncha + + * wp-cache-phase1.php: Don't return if the $string is not '' + +2008-09-23 12:50 donncha + + * wp-cache.php: Generate a semaphore id based on hostname and cache + path, props Tigertech + http://wordpress.org/support/topic/205195?replies=4#post-857610 + +2008-09-23 11:14 donncha + + * wp-cache.php: Make the expiry cleanup list an unordered list + +2008-09-23 11:06 donncha + + * wp-cache-phase2.php: siteurl -> home for those who run WP in a + different place + +2008-09-23 10:44 donncha + + * wp-cache-config-sample.php, wp-cache-phase2.php, wp-cache.php: No + need for $super_cache_max_time + +2008-09-23 10:39 donncha + + * wp-cache-phase2.php: On post change: + 1. Clear all files from permalink in supercache directory. + 2. Clear siteurl/page/ permalinks. + 3. Clear supercache files when corresponding php meta files are + removed. + +2008-09-18 09:45 donncha + + * wp-cache.php: Show mod_rewrite rules when .htaccess is RO, props + Matt @ http://mattsblog.ca/ + +2008-09-17 16:29 donncha + + * wp-cache-phase2.php, wp-cache.php: Decrease the chance of + cleanup. + +2008-09-17 11:01 donncha + + * wp-cache.php: Don't server cached static files when url contains + "=". Should avoid lots of problems with query strings + +2008-09-17 11:00 donncha + + * wp-cache-phase2.php: Replace the siteurl correctly for those who + have installed in a subdir, but access from the directory above. + Thanks Viper007Bond. + +2008-09-16 13:01 donncha + + * wp-cache.php: Check for WordPress MU because .htaccess can't be + updated. + Set cache control and expiry headers of supercached files. Cached + for 5 minutes, but with "must-revalidate" + +2008-09-06 11:00 donncha + + * wp-cache-phase2.php: Write cache files to a temporary file first, + then rename. Rename should be atomic. + +2008-08-28 11:30 donncha + + * Changelog.txt: Updated changelog + +2008-08-28 11:29 donncha + + * readme.txt, wp-cache.php: Bump the version number to 0.7.1 + +2008-08-28 11:00 donncha + + * wp-cache.php: Updated .htaccess code: + Check that file is writable (again?) + Fix warnings about upgrades. + Bright yellow backgrounds on items that need attention + Thanks Matt @ http://twitter.com/mattfreedman/statuses/901325274 + for reporting. + +2008-08-27 19:32 donncha + + * Changelog.txt: Updated changelog + +2008-08-27 19:31 donncha + + * readme.txt, wp-cache.php: Bump to 0.7, fix activation link + +2008-08-27 19:17 donncha + + * Changelog.txt: Updated Changelog + +2008-08-27 19:16 donncha + + * readme.txt, wp-cache.php: Bump the version number to 0.6.8 + +2008-08-27 18:59 donncha + + * wp-cache.php: Added rules to redirect to urls ending with a "/", + props Andylav and definitelynot, + http://wordpress.org/support/topic/199542?replies=6 + +2008-08-21 16:41 donncha + + * wp-cache.php: Change menu options url + +2008-08-20 11:47 donncha + + * Changelog.txt: Update Changelog + +2008-08-20 10:49 donncha + + * readme.txt, wp-cache.php: Bump version number to 0.6.7 + +2008-08-20 09:38 donncha + + * wp-cache.php: Added CRs + +2008-08-20 09:01 donncha + + * wp-cache.php: Added apache_request_headers() as suggested in + http://wordpress.org/support/topic/197053 + +2008-08-19 16:27 donncha + + * plugins/searchengine.php, wp-cache.php: Updated styling with the + help of the simple trackback validation plugin + +2008-08-19 15:11 donncha + + * wp-cache-config-sample.php: Don't include rss files in cacheable + list + +2008-08-19 15:05 donncha + + * wp-cache.php: Added "deactivation hook" to remove + advanced-cache.php and wp-cache-config.php and cached files. + +2008-08-14 10:39 donncha + + * wp-cache-phase1.php: Only include once + +2008-08-14 09:14 donncha + + * wp-cache-phase1.php, wp-cache-phase2.php: Cron fixed from Mike + +2008-08-13 12:52 donncha + + * wp-cache-phase2.php, wp-cache.php: Fixes from Mike Beggs: + Use custom is_writeable() that works in Win32 NTFS + Update "Vary" header + Let WP Cron handle cache cleaning. + Don't let mod_deflate try to compress gzipped cached files + +2008-08-09 10:13 donncha + + * wp-cache-phase2.php: Use get_comment(), props Lazy @ + http://www.lazybrain.de/ + +2008-07-31 15:53 donncha + + * Changelog.txt: Updated changelog + +2008-07-31 10:47 donncha + + * readme.txt, wp-cache.php: Bump version numbers + +2008-07-29 19:52 donncha + + * wp-cache-config-sample.php, wp-cache-phase1.php, wp-cache.php: WP + 2.6 fixes. Use WP_CONTENT_DIR. Have not added to .htaccess rules + yet + +2008-07-28 09:37 donncha + + * readme.txt, wp-cache.php: Change wp-super-cache expiry to 3600 + seconds. + Avoid foreach error on empty directories + Minor change to status message + +2008-07-24 16:26 donncha + + * wp-cache-phase2.php, wp-cache.php: Removed debug error log + Catch 404 file not found requests when themes use query_posts() + +2008-07-24 13:17 donncha + + * wp-cache-phase2.php: If we can't get a file lock, warn user. + +2008-07-23 18:30 donncha + + * readme.txt: Update FAQ on cache times. + +2008-07-23 18:27 donncha + + * readme.txt, wp-cache.php: Added p= parameter to htacess rules so + they'll be served by wp-cache only, + http://wordpress.org/support/topic/191275?replies=3 + +2008-07-17 09:48 donncha + + * wp-cache.php: Handle if wp-config.php has been moved ../ in + WordPress 2.6 + +2008-07-16 11:12 donncha + + * wp-cache.php: Don't warn the user wp-content is writable if + webserver is running as user. + Create correct .htaccess rules when WordPress is installed in a + different location. Both fixes props Allan Bazinet @ + http://sneezingfrog.com/blog/ + +2008-07-15 10:17 donncha + + * Changelog.txt: Update changelog + +2008-07-15 10:15 donncha + + * readme.txt, wp-cache.php: Bump the version number to 0.6.5 + +2008-07-15 10:14 donncha + + * readme.txt: Add "Subscribe to comments" rule to readme + +2008-07-15 10:11 donncha + + * wp-cache-phase1.php: Use comment_author instead of email in case + email isn't mandatory. props rhapsodyv @ + http://wordpress.org/support/topic/188775 + +2008-07-14 10:42 donncha + + * wp-cache-phase2.php, wp-cache.php: Added "wp_cache_gc" option + Allow chance of garbage collection to be configurable. + +2008-07-14 10:06 donncha + + * readme.txt: If caching doesn't work, it could be + advanced-cache.php + +2008-07-14 09:53 donncha + + * wp-cache.php: Added Subscribe To Comments exclusion rewrite rule + +2008-07-14 09:52 donncha + + * wp-cache.php: Warn if wp-content is writable, props alexleonard, + http://wordpress.org/support/topic/188530 + +2008-07-08 10:41 donncha + + * wp-cache-phase2.php: Remove extra pages generated at the current + permalink. ie. paged comments. + +2008-06-20 16:16 donncha + + * wp-cache.php: Only need the config file writable to change it + +2008-06-16 09:08 donncha + + * wp-cache-phase2.php: Increase the chance of expired file cleanup + +2008-06-16 09:07 donncha + + * wp-cache-phase2.php: Warn if page is a 404 or not complete and + won't be cached + +2008-06-12 09:53 donncha + + * readme.txt: Add troubleshooting message for Dreamhost users + +2008-05-26 09:12 donncha + + * wp-cache-phase2.php: Use [] instead of {} for array indexes + Fix warning notices + +2008-05-14 16:22 donncha + + * Changelog.txt: Updated changelog + +2008-05-14 16:19 donncha + + * readme.txt, wp-cache-phase2.php, wp-cache.php: Remove comment. + Bump version number + +2008-05-14 12:21 donncha + + * wp-cache-phase2.php: Clean up the supercache if no post_id is + defined + +2008-05-14 12:11 donncha + + * wp-cache.php: Move menu code up + +2008-05-13 14:57 donncha + + * wp-cache-phase2.php: Only prune files in the supercache directory + Remove expired files 1/500's of the time + +2008-05-11 08:51 donncha + + * wp-cache.php: Allow the "digg proof" message to be styled + Removed whitespace + +2008-05-05 09:49 donncha + + * wp-cache-phase1.php: Removed Last-Modified header so plugin works + on godaddy servers. props Brad @ + http://www.littleredrails.com/blog/2007/09/08/using-wp-cache-on-godaddy-500-error/ + +2008-05-05 09:44 donncha + + * readme.txt, wp-cache.php: Added rewrite rules to stop POST + requests to html static files. props eharris @ + http://wordpress.org/support/topic/173972?replies=2 + +2008-04-24 19:14 donncha + + * Changelog.txt: Update Changelog + +2008-04-24 19:14 donncha + + * readme.txt: Added changelog link + Added attachment_id mod_rewrite rule + +2008-04-24 19:11 donncha + + * Changelog.txt: Updated Changelog + +2008-04-24 19:09 donncha + + * readme.txt, wp-cache.php: Bump the version number + +2008-04-24 15:45 donncha + + * wp-cache-phase2.php: Put "could not write" message in a HTML + comment at the end of the current page. + +2008-04-20 07:48 donncha + + * wp-cache.php: Use blog charset for encoding. + Don't supercache attachment pages, props Callum + +2008-04-17 09:23 donncha + + * wp-cache.php: Make sure files are served as UTF-8, props + tanguillo and nikolayb + http://wordpress.org/support/topic/169540?replies=3 + +2008-04-12 07:06 donncha + + * Changelog.txt: Updated changelog + +2008-04-12 07:05 donncha + + * readme.txt, wp-cache.php: Bump version number and update + .htaccess example code + +2008-04-11 23:30 donncha + + * wp-cache-phase1.php, wp-cache-phase2.php: Remove "index.php" from + cached file paths + +2008-04-11 23:17 donncha + + * wp-cache-config-sample.php, wp-cache.php: Add index.php to list + of not to be cached pages + Minor typo fix + +2008-04-08 09:51 donncha + + * wp-cache.php: Delete all contents of cache dir, not just + supercachedir when caching disabled. + +2008-04-04 11:59 donncha + + * wp-cache.php: wp_specialchars the rules + +2008-04-01 11:31 donncha + + * wp-cache.php: Added wpsc_remove_marker() to remove WordPress + rewrite rules + Super Cache rules now go in the WPSuperCache marker + Check for comment cookie in one line, props askapache + +2008-03-31 08:42 donncha + + * wp-cache.php: wp_specialchars() the mod_rewrite rules, props + Viper007Bond + +2008-03-30 10:42 donncha + + * readme.txt, wp-cache.php: Bump the version numbers + +2008-03-30 10:41 donncha + + * Changelog.txt: Updated changelog + +2008-03-30 10:41 donncha + + * wp-cache.php: Warn if mod_rewrite rules are out of date and + encourage user to remove or update them manually + +2008-03-30 10:26 donncha + + * Changelog.txt: Updated changelog + +2008-03-28 17:37 donncha + + * wp-cache.php: Login cookie got shortened to "wordpress" in 2.5, + still backwards compatible + +2008-03-28 17:22 donncha + + * wp-cache.php: Move toggleLayer js around + +2008-03-13 11:37 donncha + + * readme.txt, wp-cache.php: Bump to 0.6 + +2008-03-13 11:34 donncha + + * readme.txt: Added compression FAQ + +2008-03-13 11:28 donncha + + * wp-cache.php: Only require mod_rewrite if super cache is enabled + Hide super cache parts of page when not activated + Add "/" to mod_rewrite rules for URLs not ending in a /, props + Michael R Aulia @ http://www.michaelaulia.com/blogs/ + +2008-03-13 11:25 donncha + + * readme.txt: Updated documentation + +2008-03-12 18:55 donncha + + * wp-cache-phase2.php: This somehow stops PHP creating directories + in the root folder, thanks to Cherie and Jennifer for their + invaluable help! + +2008-03-12 17:00 donncha + + * wp-cache.php: No need for this message any more + +2008-03-11 13:04 donncha + + * wp-cache.php: Don't auto update .htaccess until user wants to. + Hide listing of cached files, it's wrong anyway. + Move advanced features to the end of backend page. + +2008-02-11 20:52 donncha + + * readme.txt, wp-cache.php: You must define things before loading + WordPress! (props s2j @ + http://wordpress.org/support/topic/154996?replies=12#post-691402 + ) + +2008-02-08 10:27 donncha + + * wp-cache.php: Remember to delete compressed files from directly + cached folders, props John Pozadzides + +2008-01-16 12:14 donncha + + * Changelog.txt: Update changelog + +2008-01-16 12:13 donncha + + * readme.txt, wp-cache.php: Bump version number + Make admin page readonly if configuration page cannot be written + to + +2008-01-04 11:23 donncha + + * Changelog.txt, readme.txt, wp-cache.php: Bump version and update + changelog + +2008-01-04 11:22 donncha + + * wp-cache.php: Only update the hello_world option when updating + the right form + +2008-01-04 10:41 donncha + + * readme.txt, wp-cache.php: Bump version number + +2008-01-04 10:40 donncha + + * wp-cache.php: Rearrange .htaccess generator. + Allow mod_rewrite rules to be viewed later + Only create wp-content/cache/.htaccess if it doesn't exist + +2008-01-04 10:16 donncha + + * wp-cache.php: Added Super Cache footer message + +2008-01-03 22:29 donncha + + * wp-cache.php: More fixes for sub directory blogs, props Otto42 - + http://wordpress.org/support/topic/146443?replies=9#post-664254 + +2007-12-16 11:07 donncha + + * wp-cache.php: Warn if ABSPATH is writeable + Add $home_root to cached files path in rewrite rules + make mod_rewrite module warning more verbose + +2007-12-09 07:39 donncha + + * wp-cache-phase2.php: Hide unlink errors + +2007-12-04 10:18 donncha + + * wp-cache-phase2.php: Check that mutex is set, + http://wordpress.org/support/topic/146052?replies=4 + +2007-11-28 11:29 donncha + + * wp-cache-phase2.php, wp-cache.php: Check that $entries is not + empty + Don't ever recurse from ABSPATH up + +2007-11-26 11:33 donncha + + * Changelog.txt: Updated changelog + +2007-11-26 11:32 donncha + + * wp-cache.php: It's WPLOCKDOWN + +2007-11-26 11:31 donncha + + * Changelog.txt: Updated Changelog + +2007-11-26 11:30 donncha + + * readme.txt, wp-cache.php: Bump the version number + Docs for lockdown + +2007-11-26 11:17 donncha + + * wp-cache.php: Bumpy bumpy + +2007-11-26 11:12 donncha + + * Changelog.txt: Updated Changelog + +2007-11-26 11:11 donncha + + * readme.txt: Bump version + +2007-11-26 11:07 donncha + + * readme.txt: Warn about safe mode + +2007-11-26 10:56 donncha + + * wp-cache.php: Print a warning message if PHP safe mode is + enabled. + Super Cache plugins will fail silently if advanced-cache.php is + not loaded + Updated "Directly Cached Files" text + +2007-11-16 21:56 donncha + + * plugins/searchengine.php, wp-cache-phase1.php, + wp-cache-phase2.php, wp-cache.php: Added » + Updated formatting of admin backend + Added "direct caching" of pages. + +2007-11-12 21:23 donncha + + * wp-cache-phase2.php, wp-cache.php: PHP 5's mkdir() doesn't like + slashes, http://ie2.php.net/manual/en/function.mkdir.php#73848 - + props Tummmbler + +2007-11-12 15:26 donncha + + * Changelog.txt: Updated changelog + +2007-11-12 15:23 donncha + + * readme.txt, wp-cache.php: Bump version + Update readme docs + Add options page for wpmu site admins + +2007-11-12 11:32 donncha + + * wp-cache.php: Check if cache config file is out of date + +2007-11-12 11:14 donncha + + * wp-cache-phase2.php, wp-cache.php: Hide some warning messages + Don't super cache $_GET requests + Use wp_mkdir_p() instead of mkpath() + Don't delete meta, supercache or .htaccess + +2007-11-11 10:05 donncha + + * wp-cache.php: Don't want to check for .gz files twice! + +2007-11-11 08:06 donncha + + * wp-cache.php: Added 'comment moderation' message when blog locked + down. + Formatting changes + Use 'manage_options' instead of administrator because viper + changed his role names :) + +2007-11-11 01:13 donncha + + * wp-cache.php: If .htaccess updating fails, inform the user + +2007-11-11 00:20 donncha + + * wp-cache-phase2.php, wp-cache.php: Added "Lockdown" function so + static files won't be deleted by comments + Minor changes to admin page formatting + get_settings to get_option + +2007-11-10 21:06 donncha + + * wp-cache.php: Spell out radio boxes a bit more. + Modified .htaccess rules so search pages aren't served from super + cache + Actually insert_with_markers instead of echoing the command! + Tell user rules have been updated + Disable super cache *before* renaming directory. Sleep for a + second before + deleting to allow other processes to finish + +2007-11-10 20:03 donncha + + * wp-cache-phase2.php: Make sure the .htaccess isn't deleted + +2007-11-10 09:28 donncha + + * wp-cache-phase2.php: Don't remove super-cache file until comment + is approved + +2007-11-10 07:19 donncha + + * wp-cache.php: Check that WP_CACHE is defined before checking for + do_cacheaction. + Better instructions for verifying a new install + +2007-11-09 21:33 donncha + + * wp-cache.php: Define WPCACHEHOME properly, thanks tummbler for + testing! + +2007-11-09 17:09 donncha + + * wp-cache-phase2.php: Don't super-cache WordPress searches. May + need to extend that to any GET activity + +2007-11-09 15:01 donncha + + * wp-cache-phase2.php: Change preg_match delimiter so slashes work + again + +2007-11-09 14:41 donncha + + * readme.txt: Updated documentation + +2007-11-09 14:27 donncha + + * wp-cache.php: Use get_mod_rewrite() to detect if that module is + loaded + Automatically populate the .htaccess file if it's writable + Add gzip encoding rules to the cache dir, props Dennis @ + http://allmybrain.com/2007/11/08/making-wp-super-cache-gzip-compression-work/ + Replace Windows folder deliminator, "\" with "/" in WPCACHEHOME, + props Computer Guru @ + http://neosmart.net/blog/2007/getting-wordpress-super-cache-to-run-on-a-windows-iis-or-apache-server/ + +2007-11-09 01:19 donncha + + * wp-cache-phase2.php: Move is_feed() check earlier. + Check that mkpath() path is in $cache_path + +2007-11-08 21:57 donncha + + * wp-cache.php: Single quote ABSPATH + Check advanced-cache.php for version, remove if necessary, fixed + create conditions + +2007-11-08 21:55 donncha + + * wp-cache-phase1.php: realpath() two filenames + +2007-11-08 21:53 donncha + + * readme.txt: Fix subdirectory .htaccess rules, props Computer Guru + +2007-11-08 21:51 donncha + + * plugins/searchengine.php: Hide setcookie errors + Return correct string + +2007-11-07 15:38 donncha + + * Changelog.txt: Added Changelog.txt + +2007-11-07 15:27 donncha + + * readme.txt: Bump version to 0.3.1 (getting to 1.0 far too + quickly!) + Change formatting again + +2007-11-07 15:26 donncha + + * wp-cache.php: Bump version to 0.3.1 + +2007-11-07 15:26 donncha + + * wp-cache-config-sample.php, wp-cache-phase2.php: Use preg_match() + to match rejected URIs. + Change "wp-" to "wp-.*.php" to match files and paths starting + with "wp-" and ending in "php" + +2007-11-07 11:56 donncha + + * wp-cache.php: Bump the version number + +2007-11-06 22:50 donncha + + * readme.txt: Bump version + +2007-11-06 22:18 donncha + + * wp-cache-phase2.php: Fix feed content-type, props Dougal, + (http://dougal.gunters.org/blog/2007/06/19/wp-cache-fix-for-content-type-in-feeds) + +2007-11-06 22:15 donncha + + * wp-cache.php: Check the do_cacheaction() exists + Copy file if symlink is not found + +2007-11-06 21:44 donncha + + * wp-cache.php: Move WP Super Cache to "Site Admin" menu on + WordPress MU, + http://www.darcynorman.net/2007/11/06/wordpress-super-cache/ + +2007-11-06 21:19 donncha + + * wp-cache-phase1.php: Don't compress WP-Cache data files is PHP is + already doing it + +2007-11-06 10:29 donncha + + * readme.txt: Minor typo in tag + +2007-11-06 10:06 donncha + + * readme.txt, wp-cache-phase1.php, wp-cache-phase2.php, + wp-cache.php: Bump the version to 0.2 + Enable gzip support in WP-Cache data files, fix feed content + type, props tummbler: + http://www.tummblr.com/wordpress/improving-wp-super-cache-gzip-for-logged-in-users/ + http://elliottback.com/wp/archives/2005/07/12/getting-wp-cache-to-work/ + http://blog.saddey.net/2007/02/18/how-to-prevent-wpcache-from-changing-a-feeds-content-type-to-text-html/ + When Super Cache is disabled, still write to WP-Cache files + Check that prune_super_cache() exists before calling it in + wp-cache.php, props Dougal + +2007-11-06 09:06 donncha + + * readme.txt: Fix line endings + +2007-11-05 18:41 donncha + + * wp-cache.php: Fixed display of "compression changed" message + +2007-11-05 18:06 donncha + + * readme.txt: Convert to DOS mode + reformat lists for display on wporg + +2007-11-05 17:25 donncha + + * readme.txt: Minor updates to the readme + +2007-11-05 15:21 donncha + + * wp-cache.php: When disabling or enabling compression make sure + the user knows about .htaccess + +2007-11-05 15:11 donncha + + * wp-cache-phase2.php: Rejected URIs must have .php in them now so + pages starting with "wp-" will be cached + +2007-11-05 15:10 donncha + + * wp-cache.php: When disabling supercache, make sure wpcache is + enabled. + Avoid resetting cache_compression when submitting other forms + Reset supercache meta cache when compression modified + +2007-11-05 14:54 donncha + + * wp-cache-config-sample.php, wp-cache.php: Fix weirdness with + radio buttons on admin page + +2007-11-05 11:35 donncha + + * plugins, plugins/searchengine.php, readme.txt, wp-cache-base.php, + wp-cache-config-sample.php, wp-cache-phase1.php, + wp-cache-phase2.php, wp-cache.php: Initial import of WP Super + Cache + +2007-10-23 20:02 plugin-master + + * wp-super-cache, wp-super-cache/branches, wp-super-cache/tags, .: + adding wp-super-cache by donncha + diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/wp-super-cache/advanced-cache.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/wp-super-cache/advanced-cache.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,12 @@ +"; +} + +if ( !include_once( 'CACHEHOME' . 'wp-cache-phase1.php' ) ) { + if ( !@is_file( 'CACHEHOME' . 'wp-cache-phase1.php' ) ) + register_shutdown_function( 'wpcache_broken_message' ); +} +?> diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/wp-super-cache/languages/wp-super-cache-es_ES.mo Binary file web/wp-content/plugins/wp-super-cache/languages/wp-super-cache-es_ES.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/wp-super-cache/languages/wp-super-cache-es_ES.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/wp-super-cache/languages/wp-super-cache-es_ES.po Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,1069 @@ +msgid "" +msgstr "" +"Project-Id-Version: WP Super Cache 0.9.7\n" +"Report-Msgid-Bugs-To: http://wordpress.org/tag/wp-super-cache\n" +"POT-Creation-Date: 2009-11-13 10:27+0000\n" +"PO-Revision-Date: \n" +"Last-Translator: Omi \n" +"Language-Team: Omi \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: Spanish\n" +"X-Poedit-Country: Spain\n" +"X-Poedit-SourceCharset: utf-8\n" + +#: plugins/badbehaviour.php:45 +msgid "Bad Behaviour not found. Please check your install." +msgstr "No se encuentra Bad Behaviour. Por favor, revise su instalación." + +#: plugins/badbehaviour.php:47 +#: plugins/badbehaviour.php:66 +#: plugins/searchengine.php:61 +#: plugins/searchengine.php:76 +#: wp-cache.php:709 +msgid "Disable" +msgstr "Desactivar" + +#: plugins/badbehaviour.php:55 +#: plugins/searchengine.php:67 +msgid "disabled" +msgstr "desactivado" + +#: plugins/badbehaviour.php:57 +#: plugins/searchengine.php:69 +#: wp-cache.php:1052 +msgid "enabled" +msgstr "activado" + +#: plugins/badbehaviour.php:60 +#, php-format +msgid "Bad Behaviour support is %s" +msgstr "El soporte de Bad Behaviour está %s" + +#: plugins/badbehaviour.php:62 +#, php-format +msgid "(Only half-on caching supported, disabled compression and requires Bad Behavior in \"%s/plugins/bad-behavior/\") " +msgstr "(Sólo se soporta caché \"a medias\", se desactiva la compresión y requiere instalar Bad Behavior en \"%s/plugins/bad-behavior/\") " + +#: plugins/badbehaviour.php:64 +#: plugins/searchengine.php:74 +#: wp-cache.php:709 +msgid "Enable" +msgstr "Activar" + +#: plugins/badbehaviour.php:70 +#: wp-cache.php:786 +#: wp-cache.php:788 +msgid "Warning!" +msgstr "¡Atención!" + +#: plugins/searchengine.php:71 +#, php-format +msgid "No Adverts for Friends plugin is %s" +msgstr "El plugin No Adverts for Friends está %s" + +#: plugins/searchengine.php:72 +msgid "(requires friendsadverts.php too) " +msgstr "(Necesita también friendsadverts.php) " + +#: wp-cache.php:87 +#, php-format +msgid "Please create %s /wp-cache-config.php from wp-super-cache/wp-cache-config-sample.php" +msgstr "Por favor, cree %s /wp-cache-config.php desde wp-super-cache/wp-cache-config-sample.php" + +#: wp-cache.php:170 +msgid "WP Super Cache Manager" +msgstr "Gestión de WP Super Cache" + +#: wp-cache.php:172 +msgid "Warning! PHP Safe Mode Enabled!" +msgstr "¡Atención, modo PHP Safe activo!" + +#: wp-cache.php:173 +msgid "You may experience problems running this plugin because SAFE MODE is enabled." +msgstr "Podría experimentar problemas ejecutando este plugin con el modo PHP SAFE activo." + +#: wp-cache.php:175 +msgid "Your server is set up to check the owner of PHP scripts before allowing them to read and write files." +msgstr "Su servidor está configurado para comprobar el propietario de los scripts PHP antes de permitirles escribir y leer archivos." + +#: wp-cache.php:176 +#, php-format +msgid "You or an administrator may be able to make it work by changing the group owner of the plugin scripts to match that of the web server user. The group owner of the %s/cache/ directory must also be changed. See the safe mode manual page for further details." +msgstr "Usted, o un administrador, debería ser capaz de hacerlo funcionar cambiando el propietario del grupo de los scripts para que coincidan con el del usuario web del servidor. El propietario del grupo del directorio %s/cache/ también deberá cambiarse. Revise la página sobre safe mode en el manual para obtener más información." + +#: wp-cache.php:178 +msgid "You or an administrator must disable this. See the safe mode manual page for further details. This cannot be disabled in a .htaccess file unfortunately. It must be done in the php.ini config file." +msgstr "Usted, o un administrador, deberán desactivar esto. Revise la página sobre safe mode en el manual para obtener más información. Desafortunadamente, esto no puede ser desactivado desde un fichero .htaccess sino que debe hacerse desde el fichero de configuración php.ini" + +#: wp-cache.php:189 +msgid "Configuration file changed, some values might be wrong. Load the page again from the \"Settings\" menu to reset them." +msgstr "El archivo de configuración ha cambiado, algunos valores pueden ser incorrectos. Recargue de nuevo la página desde el menú \"Opciones\" para reestablecerlos." + +#: wp-cache.php:195 +msgid "Cannot continue... fix previous problems and retry." +msgstr "No puedo continuar...solucione los problemas descritos y reintente." + +#: wp-cache.php:211 +#, php-format +msgid "Warning! Your hostname \"%s\" resolves to %s" +msgstr "¡Atención! Su hostname \"%s\" resuelve como %s" + +#: wp-cache.php:213 +#, php-format +msgid "Your server thinks your hostname resolves to %s. Some services such as garbage collection by this plugin, and WordPress scheduled posts may not operate correctly." +msgstr "Su servidor cree que su hostname resuelve como %s. Algunos servicios, como la recolección de basura de este plugin o la publicación diferida de WordPress, podrían no funcionar correctamente." + +#: wp-cache.php:214 +#: wp-cache.php:228 +#, php-format +msgid "Please see entry 16 in the Troubleshooting section of the readme.txt" +msgstr "Por favor, revise la entrada nº 16 de la sección Troubleshooting del fichero readme.txt" + +#: wp-cache.php:227 +msgid "Unfortunately WordPress cannot find the file wp-cron.php. This script is required for the the correct operation of garbage collection by this plugin, WordPress scheduled posts as well as other critical activities." +msgstr "Desafortunadamente WordPress no puede localizar el fichero wp-cron.php. Este script es necesario para el funcionamiento de la función de recolección de basura que realiza este, plugin así como para la publicación diferida de WordPress y otras actividades críticas." + +#: wp-cache.php:239 +msgid "Mod rewrite may not be installed!" +msgstr "¡Mod rewrite puede no estar instalado!" + +#: wp-cache.php:240 +msgid "It appears that mod_rewrite is not installed. Sometimes this check isn’t 100% reliable, especially if you are not using Apache. Please verify that the mod_rewrite module is loaded. It is required for serving Super Cache static files. You will still be able to use half-on mode." +msgstr "Parece que mod_rewrite no está instalado. Algunas veces esto no es 100% preciso, especialmente si no está utilizando Apache. Por favor, compruebe que el módulo mod_rewrite se encuentra cargado. Es necesario para servir los ficheros estáticos del Super Cache. No obstante, debería ser capaz de poder usar el modo de caché \"a medias\"." + +#: wp-cache.php:245 +msgid "Read Only Mode. Configuration cannot be changed." +msgstr "Modo de Solo Lectura. La configuración no puede cambiarse." + +#: wp-cache.php:245 +msgid "Why your configuration may not be changed" +msgstr "¿Por qué no puede cambiarse su configuración?" + +#: wp-cache.php:245 +msgid "Why" +msgstr "¿Por qué?" + +#: wp-cache.php:247 +#, php-format +msgid "The WP Super Cache configuration file is %s/wp-cache-config.php and cannot be modified. That file must be writeable by the webserver to make any changes." +msgstr "El archivo de configuración de WP Super Cache es %s/wp-cache-config.php y no puede modificarse. Dicho archivo debe tener permisos de escritura para que pueda ser modificado." + +#: wp-cache.php:248 +msgid "A simple way of doing that is by changing the permissions temporarily using the CHMOD command or through your ftp client. Make sure it’s globally writeable and it should be fine." +msgstr "La forma más sencilla es cambiar temporalmente los permisos utilizando el comando CHMOD de su cliente FTP. Asegúrese de que puede ser globalmente editado y todo debería ir bien." + +#: wp-cache.php:249 +msgid "Writeable:" +msgstr "Editable:" + +#: wp-cache.php:250 +msgid "Readonly:" +msgstr "Sólo lectura:" + +#: wp-cache.php:262 +#, php-format +msgid "Warning! %s is writeable!" +msgstr "¡Atención, %s es editable!" + +#: wp-cache.php:263 +#, php-format +msgid "You should change the permissions on %s and make it more restrictive. Use your ftp client, or the following command to fix things:" +msgstr "Debería cambiar los permisos de %s y hacerlos más restrictivos. Utilice su cliente de FTP o el siguiente comando para resolver cosas:" + +#: wp-cache.php:354 +msgid "WP Super Cache Status" +msgstr "Estado WP Super Cache" + +#: wp-cache.php:357 +msgid "ON" +msgstr "ACTIVADO" + +#: wp-cache.php:357 +msgid "WP Cache and Super Cache enabled" +msgstr "WP Cache y Super Cache activos" + +#: wp-cache.php:358 +msgid "HALF ON" +msgstr "A MEDIAS" + +#: wp-cache.php:358 +msgid "Super Cache Disabled, only legacy WP-Cache caching." +msgstr "Super Cache desactivado, sólo caché WP-Cache." + +#: wp-cache.php:359 +msgid "OFF" +msgstr "DESACTIVADO" + +#: wp-cache.php:359 +msgid "WP Cache and Super Cache disabled" +msgstr "WP Cache y Super Cache desactivados" + +#: wp-cache.php:360 +msgid "Don’t cache pages for logged in users." +msgstr "No hacer caché de páginas para usuarios autentificados." + +#: wp-cache.php:361 +msgid "Proudly tell the world your server is Digg proof! (places a message in your blog’s footer)" +msgstr "¡Dígale al mundo que su servidor está a prueba de Digg! (pone un mensaje en el pie de su blog)" + +#: wp-cache.php:362 +msgid "Clear all cache files when a post or page is published. (This may significantly slow down saving of posts.)" +msgstr "Limpiar la caché cuando se publique un artículo o página (esto puede ralentizar bastante el proceso de guardado)." + +#: wp-cache.php:363 +msgid "Cache rebuild. Serve a supercache file to anonymous users while a new file is being generated. Recommended for very busy websites with lots of comments. Makes \"directly cached pages\" and \"Lockdown mode\" obsolete." +msgstr "Reconstruir caché. Sirve un fichero supercaché a los usuarios anónimos mientras que el nuevo está siendo generado. Recomendado para sitios muy activos con muchos comentarios. Hace que \"páginas directamente en caché\" y \"modo Confinamiento\" queden obsoletos." + +#: wp-cache.php:365 +msgid "Coarse file locking. You probably don’t need this but it may help if your server is underpowered. Warning! May cause your server to lock up in very rare cases!" +msgstr "Bloquear ficheros toscamente. Normalmente no necesitará esto, pero podría serle de ayuda si su servidor tiene poca potencia. ¡Aviso, es muy poco probable, pero podría ocasionar que su servidor se bloquease!" + +#: wp-cache.php:367 +msgid "List the newest cached pages (may be expensive to run on busy sites, use with caution.)" +msgstr "Listar las nuevas páginas en caché (puede ser costoso de ejecutar en sitios muy activos, utilizar con precaución)." + +#: wp-cache.php:368 +msgid "Mobile device support." +msgstr "Soporte para dispositivos móviles." + +#: wp-cache.php:373 +msgid "Mobile rewrite rules detected" +msgstr "Reglas Mobile rewrite detectadas" + +#: wp-cache.php:374 +msgid "For best performance you should enable \"Mobile device support\" or delete the mobile rewrite rules in your .htaccess. Look for the 2 lines with the text \"Android|2.0\\ MMP|240x320|AvantGo|BlackBerry|Blazer|Cellphone\" and delete those." +msgstr "Para un mejor rendimiento debería activar \"Soporte para dispositivos móviles\" o borrar las reglas mobile rewrite rules de su archivo .htaccess. Localice las 2 líneas con el texto \"Android|2.0\\ MMP|240x320|AvantGo|BlackBerry|Blazer|Cellphone\" y elimínelas." + +#: wp-cache.php:374 +msgid "This will have no affect on ordinary users but mobile users will see uncached pages." +msgstr "Esto no tendrá repercusión sobre los usuarios normales pero los usuarios de móviles verán las páginas sin usar la caché." + +#: wp-cache.php:377 +msgid "Mobile support requires extra rules in your .htaccess file, or you can set the plugin to half-on mode. Here are your options (in order of difficulty):" +msgstr "El soporte para móviles requiere de reglas extra en su archivo .htaccess. También puede seleccionar el modo \"A medias\". Aquí se muestran sus opciones (en orden de dificultad):" + +#: wp-cache.php:378 +msgid "Set the plugin to half on mode and enable mobile support." +msgstr "Establecer este plugin en el modo \"A medias\" y activar el soporte para móviles." + +#: wp-cache.php:379 +#, php-format +msgid "Delete the plugin mod_rewrite rules in %s.htaccess enclosed by # BEGIN WPSuperCache and # END WPSuperCache and let the plugin regenerate them by reloading this page." +msgstr "Eliminar las reglas mod_rewrite del plugin en %s.htaccess que estén entre # BEGIN WPSuperCache y # END WPSuperCache y permitir que el plugin vuelva a generarlas recargando esta página." + +#: wp-cache.php:380 +msgid "Add the rules yourself. Edit %s.htaccess and find the block of code enclosed by the lines # BEGIN WPSuperCache and # END WPSuperCache. There are two sections that look very similar. Just below the line %{HTTP:Cookie} !^.*(comment_author_|wordpress|wp-postpass_).*$ add this line: (do it twice, once for each section)" +msgstr "Añadir las reglas manualmente. Edite el fichero %s.htaccess y localice el bloque de código encerrado entre las líneas # BEGIN WPSuperCache y # END WPSuperCache. Hay dos secciones que parecen muy similares. Justo debajo de la línea %{HTTP:Cookie} !^.*(comment_author_|wordpress|wp-postpass_).*$ añada esta otra línea: (deberá hacerlo dos veces, una para cada sección)" + +#: wp-cache.php:383 +msgid "Note:" +msgstr "Nota:" + +#: wp-cache.php:383 +#, php-format +msgid "If uninstalling this plugin, make sure the directory %s is writeable by the webserver so the files advanced-cache.php and cache-config.php can be deleted automatically. (Making sure those files are writeable too is probably a good idea!)" +msgstr "Si desinstala este plugin asegúrese de que el directorio %s es editable por el servidor web para que los archivos advanced-cache.php y cache-config.php puedan eliminarse automáticamente (asegurarse de que esos archivos son editables es también una buena idea!)" + +#: wp-cache.php:384 +#, php-format +msgid "Uninstall using the uninstall script to remove files and directories created by the plugin. (Please see readme.txt for instructions on uninstalling this script.)" +msgstr "Desinstale utilizando el script de desinstalación para eliminar los archivos y directorios creados por el plugin. (Por favor, eche un vistazo al archivo readme.txt para obtener instrucciones sobre como desinstalar este script)" + +#: wp-cache.php:386 +msgid "Update Status" +msgstr "Actualizar Estado" + +#: wp-cache.php:393 +msgid "Required to serve compressed supercache files properly." +msgstr "Requerido para servir archivos de supercache correctamente." + +#: wp-cache.php:393 +msgid "Required to set caching information on supercache pages. IE7 users will see old pages without this module." +msgstr "Requerido para establecer la información en las páginas de supercache. Los usuarios de IE7 verán páginas antiguas sin este módulo." + +#: wp-cache.php:393 +msgid "Set the expiry date on supercached pages. Visitors may not see new pages when they refresh or leave comments without this module." +msgstr "Establece la fecha de caducidad en las páginas de supercache. Los visitantes puede que no vean las nuevas páginas al refrescar o que no puedan dejar comentarios sin este modulo." + +#: wp-cache.php:400 +msgid "Missing Apache Modules" +msgstr "Módulos de Apache Ausentes" + +#: wp-cache.php:401 +msgid "The following Apache modules are missing. The plugin will work in half-on mode without them. In full Supercache mode, your visitors may see corrupted pages or out of date content however." +msgstr "Faltan los siguientes módulos de Apache. El plugin trabajará en modo \"A Medias\" sin ellos. En el modo Supercache sus visitantes podrían ver páginas corruptas o contenido desactualizado." + +#: wp-cache.php:413 +msgid "Make WordPress Faster" +msgstr "Hace WordPress Veloz" + +#: wp-cache.php:415 +#, php-format +msgid "%1$s really makes your blog go faster. Make it go faster* by buying me an Amazon gift card! Make it out to \"%3$s\" for whatever amount you want. Every penny helps!" +msgstr "%1$s realmente consigue que su blog sea más veloz. Puede acelerarlo todavía más* comprándome una tarjeta regalo de Amazon! Hágalo para \"%3$s\" por la cantidad que quiera. Cada céntimo ayuda!" + +#: wp-cache.php:416 +#, php-format +msgid "If Amazon isn’t your thing, there’s also PayPal. Click the \"Donate\" button below or take a quick peek at my wishlist." +msgstr "Si Amazon no es su sitio preferido, también puede ayudarme a través de PayPal. Pinche sobre el botón \"Donate\" que está un poco más abajo o eche un rápido vistazo a mi lista de deseos." + +#: wp-cache.php:417 +msgid "Thanks in advance!" +msgstr "¡Gracias por adelantado!" + +#: wp-cache.php:418 +msgid "Ok, it won’t go any faster but you’ll make this plugin author very happy!" +msgstr "Ok, no conseguirá que vaya más rápido, ¡pero hará muy feliz al autor de este plugin!" + +#: wp-cache.php:426 +msgid "Don’t show me this again." +msgstr "No mostrar esto nuevamente." + +#: wp-cache.php:426 +msgid "Hide" +msgstr "Ocultar" + +#: wp-cache.php:429 +#, php-format +msgid "%1$s is maintained and developed by %2$s with contributions from many others." +msgstr "%1$s es mantenido y desarrollado por %2$s con la colaboración de muchos otros." + +#: wp-cache.php:430 +#, php-format +msgid "He blogs at %1$s, posts photos at %2$s and wishes he had more time to read and relax." +msgstr "El escribe en %1$s, publica fotos en %2$s y desearía tener más tiempo para leer y relajarse." + +#: wp-cache.php:431 +#, php-format +msgid "Please say hi to him on %s too!" +msgstr "Por favor, dígale hola también en %s!" + +#: wp-cache.php:440 +#, php-format +msgid "Cached pages since %1$s : %2$s" +msgstr "Páginas en caché desde %1$s : %2$s" + +#: wp-cache.php:441 +msgid "Newest Cached Pages:" +msgstr "Nuevas páginas en caché:" + +#: wp-cache.php:445 +#, php-format +msgid "Cached %s seconds ago" +msgstr "En caché desde hace %s segundos" + +#: wp-cache.php:448 +msgid "(may not always be accurate on busy sites)" +msgstr "(puede no ser siempre preciso en sitios muy concurridos)" + +#: wp-cache.php:469 +msgid "Accepted Filenames & Rejected URIs" +msgstr "Nombres de archivos aceptados y URIs rechazadas" + +#: wp-cache.php:494 +msgid "Cache Plugins" +msgstr "Caché de Plugins " + +#: wp-cache.php:505 +#: wp-cache.php:516 +msgid "Super Cache Compression" +msgstr "Compresión Super Caché" + +#: wp-cache.php:506 +msgid "Compression is enabled by default when in HALF ON mode." +msgstr "La compresión está activa por defecto cuando se ejecuta el modo A MEDIAS." + +#: wp-cache.php:518 +#: wp-cache.php:696 +msgid "Enabled" +msgstr "Activado" + +#: wp-cache.php:519 +#: wp-cache.php:696 +msgid "Disabled" +msgstr "Desactivado" + +#: wp-cache.php:520 +msgid "Compression is disabled by default because some hosts have problems with compressed files. Switching this on and off clears the cache." +msgstr "La compresión está desactivada por defecto debido a que algunos servidores tienen problemas con los archivos comprimidos. Activar o desactivar esta opción limpiará la caché." + +#: wp-cache.php:523 +msgid "Super Cache compression is now disabled." +msgstr "La Compresión Super Caché se ha desactivado." + +#: wp-cache.php:525 +msgid "Super Cache compression is now enabled." +msgstr "La Compresión Super Caché se ha activado." + +#: wp-cache.php:527 +msgid "Update Compression" +msgstr "Actualizar compresión" + +#: wp-cache.php:534 +msgid "Mod Rewrite Rules" +msgstr "Reglas Mod Rewrite" + +#: wp-cache.php:581 +msgid "WordPress MU Detected" +msgstr "Se ha detectado WordPress MU" + +#: wp-cache.php:581 +msgid "Unfortunately the rewrite rules cannot be updated automatically when running WordPress MU. Please open your .htaccess and add the following mod_rewrite rules above any other rules in that file." +msgstr "Desafortunadamente las reglas \"rewrite\" no pueden actualizarse de forma automática cuando se ejecuta WordPress MU. Por favir, abra su archivo .htaccess y añada las siguientes reglas mod_rewrite por debajo de otras reglas existentes en dicho fichero." + +#: wp-cache.php:583 +msgid "Mod Rewrite rules cannot be updated!" +msgstr "¡Las reglas Mod Rewrite no pueden actualizarse!" + +#: wp-cache.php:584 +#, php-format +msgid "You must have BEGIN and END markers in %s.htaccess for the auto update to work. They look like this and surround the main WordPress mod_rewrite rules:" +msgstr "Debe tener marcadores BEGIN y END dentro de su fichero %s.htaccess para que funcione la actualización automática. Se parecen a lo siguiente y rodean a las reglas mod_rewrite principales de WordPress:" + +#: wp-cache.php:586 +msgid "Refresh this page when you have updated your .htaccess file." +msgstr "Recargue esta página después de que haya actualizado su fichero .htaccess" + +#: wp-cache.php:590 +msgid "Thank you for upgrading." +msgstr "Gracias por actualizar." + +#: wp-cache.php:590 +#, php-format +msgid "The mod_rewrite rules changed since you last installed this plugin. Unfortunately you must remove the old supercache rules before the new ones are updated. Refresh this page when you have edited your .htaccess file. If you wish to manually upgrade, change the following line: %1$s so it looks like this: %2$s The only changes are \"HTTP_COOKIE\" becomes \"HTTP:Cookie\" and \"wordpressuser\" becomes \"wordpress\". This is a WordPress 2.5 change but it’s backwards compatible with older versions if you’re brave enough to use them." +msgstr "Las reglas mod_rewrite han cambiado desde que instaló este plugin. Desafortunadamente, deberá eliminar las antiguas reglas de supercache antes de que puedan instalarse las nuevas. Recargue esta página después de que haya editado su fichero .htaccess file. Si desea realizar una actualización manual, cambie la siguiente línea: %1$s para que quede como la siguiente: %2$s Los únicos cambios son que\"HTTP_COOKIE\" pasa a ser \"HTTP:Cookie\" y \"wordpressuser\" se convierte en \"wordpress\". Este es un cambio de WordPress 2.5 aunque sigue siendo compatible con versiones anteriores (si tiene valor para usarlas)" + +#: wp-cache.php:594 +msgid "Trailing slash check required." +msgstr "Comprobación de \"trailing slash\" (barra al final de una dirección) requerida" + +#: wp-cache.php:594 +msgid "It looks like your blog has URLs that end with a \"/\". Unfortunately since you installed this plugin a duplicate content bug has been found where URLs not ending in a \"/\" end serve the same content as those with the \"/\" and do not redirect to the proper URL. To fix, you must edit your .htaccess file and add these two rules to the two groups of Super Cache rules:" +msgstr "Parece que su blog tiene URLs que terminan con \"/\". Desafortunadamente, desde que instaló este plugin, se ha encontrado un fallo de contenido duplicado para las URLs que no terminan en \"/\" y de aquellas que sí lo hacen y que provoca que no se llame a la URL correcta. Para resolverlo, deberá editar su fichero .htaccess y añadir las dos siguientes reglas a los dos grupos de Super Caché:" + +#: wp-cache.php:596 +msgid "You can see where the rules go and examine the complete rules by clicking the \"View mod_rewrite rules\" link below." +msgstr "Puede ver dónde van las reglas y examinar todas ellas pinchando sobre el enlace \"Ver reglas mod_rewrite\" que se muestra abajo." + +#: wp-cache.php:608 +msgid "Cannot update .htaccess" +msgstr "No se pudo actualizar el fichero .htaccess" + +#: wp-cache.php:608 +#, php-format +msgid "The file %s.htaccess cannot be modified by the web server. Please correct this using the chmod command or your ftp client." +msgstr "El fichero %s.htaccess no puede ser modificado por el servidor. Por favor, resuélvalo mediante el comando CHMOD de su cliente de FTP." + +#: wp-cache.php:608 +msgid "Refresh this page when the file permissions have been modified." +msgstr "Recargue esta página cuando los permisos hayan sido modificados." + +#: wp-cache.php:608 +#, php-format +msgid "Alternatively, you can edit your %s.htaccess file manually and add the following code (before any WordPress rules):" +msgstr "Alternativamente, puede editar manualmente su fichero %s.htaccess y añadir el siguiente código (antes de cualquier regla de WordPress):" + +#: wp-cache.php:611 +#, php-format +msgid "To serve static html files your server must have the correct mod_rewrite rules added to a file called %s.htaccess" +msgstr "Para servir archivos html estáticos, su servidor debe tener las reglas mod_rewrite correctas añadidas a un fichero llamado %s.htaccess" + +#: wp-cache.php:613 +msgid "You must edit the file yourself add the following rules." +msgstr "Deberá editar manualmente el fichero para añadir las siguientes reglas." + +#: wp-cache.php:615 +msgid "You can edit the file yourself add the following rules." +msgstr "Puede editar manualmente el archivo y añadir las siguientes reglas." + +#: wp-cache.php:617 +msgid " Make sure they appear before any existing WordPress rules. " +msgstr " Asegúrese de que se muestran antes de cualquier regla de WordPress existente. " + +#: wp-cache.php:619 +#: wp-cache.php:646 +#, php-format +msgid "Rules must be added to %s too:" +msgstr "Las reglas deben añadirse también a %s:" + +#: wp-cache.php:624 +msgid "Update Mod_Rewrite Rules" +msgstr "Actualizar reglas Mod_Rewrite" + +#: wp-cache.php:633 +msgid "Mod Rewrite rules updated!" +msgstr "¡Las reglas Mod Rewrite se han actualizado!" + +#: wp-cache.php:634 +#, php-format +msgid "%s.htaccess has been updated with the necessary mod_rewrite rules. Please verify they are correct. They should look like this:" +msgstr "El fichero %s.htaccess ha sido actualizado con las reglas mod_rewrite necesarias. Por favor, verifique que son correctas. Deberían parecerse a lo siguiente:" + +#: wp-cache.php:636 +msgid "Mod Rewrite rules must be updated!" +msgstr "¡Las reglas Mod Rewrite deben actualizarse!" + +#: wp-cache.php:637 +#, php-format +msgid "Your %s.htaccess is not writable by the webserver and must be updated with the necessary mod_rewrite rules. The new rules go above the regular WordPress rules as shown in the code below:" +msgstr "Su fichero %s.htaccess no puede ser editado por el servidor y debe actualizarse con las reglas mod_rewrite necesarias. Las nuevas reglas van encima de las reglas normales de WordPress, como se muestra en el siguiente código:" + +#: wp-cache.php:642 +#, php-format +msgid "WP Super Cache mod rewrite rules were detected in your %s.htaccess file.
    Click the following link to see the lines added to that file. If you have upgraded the plugin make sure these rules match." +msgstr "Se han detectado reglas mod rewrite de WP Super Cache en su fichero %s.htaccess.
    Pinche sobre el siguiente enlace para ver las líneas añadidas a dicho fichero. Si ha actualizado el plugin, asegúrese de que dichas reglas coinciden." + +#: wp-cache.php:643 +msgid "View Mod_Rewrite Rules" +msgstr "Ver reglas Mod_Rewrite" + +#: wp-cache.php:654 +#, php-format +msgid "Gzip encoding rules in %s.htaccess created." +msgstr "Reglas de codificación Gzip creadas en %s.htaccess" + +#: wp-cache.php:661 +msgid "Fix Configuration" +msgstr "Arreglar configuración" + +#: wp-cache.php:664 +msgid "Restore Default Configuration" +msgstr "Volver a la configuración por defecto" + +#: wp-cache.php:672 +msgid "Comment moderation is enabled. Your comment may take some time to appear." +msgstr "La moderación de comentarios está activada. Su comentario podría tardar cierto tiempo en aparecer." + +#: wp-cache.php:696 +msgid "Lock Down:" +msgstr "Modo Confinamiento:" + +#: wp-cache.php:697 +msgid "Prepare your server for an expected spike in traffic by enabling the lock down. When this is enabled, new comments on a post will not refresh the cached static files." +msgstr "Prepare su servidor para un pico de tráfico no esperado activando el modo \"confinamiento\". Cuando está activo, los nuevos comentarios de un artículo no provocarán que se refresquen los archivos estáticos de la caché." + +#: wp-cache.php:698 +msgid "Developers: Make your plugin lock down compatible by checking the \"WPLOCKDOWN\" constant. The following code will make sure your plugin respects the WPLOCKDOWN setting." +msgstr "Atención desarrolladores: hagan su plugin compatible con el modo \"confinamiento\" comprobando la constante \"WPLOCKDOWN\". El siguiente código hará que su plugin respete la configuración WPLOCKDOWN." + +#: wp-cache.php:700 +msgid "Sorry. My blog is locked down. Updates will appear shortly" +msgstr "Lo siento, mi blog está en modo confinamiento. Las actualizaciones aparecerán en breve." + +#: wp-cache.php:704 +msgid "WordPress is locked down. Super Cache static files will not be deleted when new comments are made." +msgstr "WordPress está en modo confinamiento. Los ficheros estáticos de Super Caché no se borrarán cuando se hagan nuevos comentarios." + +#: wp-cache.php:706 +msgid "WordPress is not locked down. New comments will refresh Super Cache static files as normal." +msgstr "WordPress no está en modo confinamiento. Los nuevos comentarios refrescarán los ficheros estáticos de Super Caché con normalidad." + +#: wp-cache.php:712 +msgid "Lock Down" +msgstr "Confinamiento" + +#: wp-cache.php:720 +msgid "Directly Cached Files" +msgstr "Archivos directos en caché" + +#: wp-cache.php:778 +#, php-format +msgid "%s removed!" +msgstr "%s eliminado!" + +#: wp-cache.php:786 +#, php-format +msgid "You must make %s writable to enable this feature. As this is a security risk please make it readonly after your page is generated." +msgstr "Debe hacer que %s pueda editarse para activar esta opción. Como es un riesgo para la seguridad, asegúrese de volverlo a dejar como solo lectura después de que se haya generado la página." + +#: wp-cache.php:788 +#, php-format +msgid "%s is writable. Please make it readonly after your page is generated as this is a security risk." +msgstr "%s es editable. Como es un riesgo para la seguridad, asegúrese de dejarlo como solo lectura después de que se haya generado la página." + +#: wp-cache.php:802 +msgid "Existing direct page" +msgstr "Página directa existente" + +#: wp-cache.php:802 +msgid "Delete cached file" +msgstr "Archivo de caché borrado" + +#: wp-cache.php:807 +msgid "Add direct page:" +msgstr "Añadir página directa:" + +#: wp-cache.php:809 +#, php-format +msgid "Directly cached files are files created directly off %s where your blog lives. This feature is only useful if you are expecting a major Digg or Slashdot level of traffic to one post or page." +msgstr "Los archivos directos a caché son archivos creados directamente fuera de %s donde reside su blog. Esta opción sólo es útil si esta experimentando problemas de mucho tráfico en un artículo o página concreta desde sitios del estilo a Digg o Menéame." + +#: wp-cache.php:811 +#, php-format +msgid "For example: to cache %1$sabout/, you would enter %1$sabout/ or /about/. The cached file will be generated the next time an anonymous user visits that page." +msgstr "Por ejemplo: to cache %1$sabout/, you would enter %1$sabout/ or /about/. The cached file will be generated the next time an anonymous user visits that page." + +#: wp-cache.php:812 +msgid "Make the textbox blank to remove it from the list of direct pages and delete the cached file." +msgstr "Deje el cuadro en blanco para eliminarla de la lista de páginas directas en caché y borrar así el fichero de caché." + +#: wp-cache.php:817 +msgid "Update Direct Pages" +msgstr "Actualizar páginas directas" + +#: wp-cache.php:857 +msgid "Expiry Time & Garbage Collection" +msgstr "Tiempo de caducidad y Recogida de basura" + +#: wp-cache.php:859 +msgid "Expire time:" +msgstr "Tiempo de caducidad:" + +#: wp-cache.php:860 +msgid "seconds" +msgstr "segundos" + +#: wp-cache.php:861 +msgid "Garbage Collection" +msgstr "Recolección de basura" + +#: wp-cache.php:861 +msgid "If expiry time is more than 1800 seconds (half an hour), garbage collection will be done every 10 minutes, otherwise it will happen 10 seconds after the expiry time above." +msgstr "Si el tiempo de caducidad es mayor a 1800 segundos (media hora), la recolección de basura se hará cada 10 minutos; en otro caso, se hará 10 segundos después del tiempo de caducidad indicado arriba." + +#: wp-cache.php:862 +msgid "Checking for and deleting expired files is expensive, but it’s expensive leaving them there too. On a very busy site you should set the expiry time to 300 seconds. Experiment with different values and visit this page to see how many expired files remain at different times during the day. Aim to have less than 500 cached files if possible." +msgstr "Comprobar y eliminar archivos caducados es costoso, pero dejarlos ahí lo es más. En un sitio con mucho tráfico debería establecer el tiempo de caducidad a 300 segundos. Experimente con diferentes valores y visite regularmente esta página para comprobar cuantos ficheros caducados aparecen a diferentes horas del día. El objetivo está en tener menos de 500 archivos en caché siempre que sea posible." + +#: wp-cache.php:863 +msgid "Change Expiration" +msgstr "Cambiar caducidad" + +#: wp-cache.php:902 +msgid "Rejected User Agents" +msgstr "Agentes de usuario rechazados" + +#: wp-cache.php:903 +msgid "Strings in the HTTP ’User Agent’ header that prevent WP-Cache from caching bot, spiders, and crawlers’ requests. Note that super cached files are still sent to these agents if they already exists." +msgstr "Cadenas en la cabecera HTTP ’User Agent’ que previenen que WP-Cache almacene peticiones de robots de búsqueda. Tenga en cuenta que los archivos de Super Caché se siguen enviando a esos agentes si ya existen." + +#: wp-cache.php:910 +msgid "Save UA Strings" +msgstr "Grabar cadenas User Agent" + +#: wp-cache.php:933 +msgid "Do not cache the following page types. See the Conditional Tags documentation for a complete discussion on each type." +msgstr "No almacenar en caché los siguientes tipos de páginas. Revise el apartado Conditional Tags de la documentación para acceder a un completo argumento sobre cada uno de los tipos." + +#: wp-cache.php:936 +msgid "Single Posts" +msgstr "Artículos individuales" + +#: wp-cache.php:937 +msgid "Pages" +msgstr "Páginas" + +#: wp-cache.php:938 +msgid "Front Page" +msgstr "Página principal" + +#: wp-cache.php:939 +msgid "Home" +msgstr "Home" + +#: wp-cache.php:940 +msgid "Archives" +msgstr "Archivos" + +#: wp-cache.php:941 +msgid "Tags" +msgstr "Etiquetas (tags)" + +#: wp-cache.php:942 +msgid "Category" +msgstr "Categorías" + +#: wp-cache.php:943 +msgid "Feeds" +msgstr "Feeds" + +#: wp-cache.php:944 +msgid "Search Pages" +msgstr "Páginas de búsqueda" + +#: wp-cache.php:946 +#: wp-cache.php:1073 +msgid "Save" +msgstr "Grabar" + +#: wp-cache.php:963 +msgid "Add here strings (not a filename) that forces a page not to be cached. For example, if your URLs include year and you dont want to cache last year posts, it’s enough to specify the year, i.e. ’/2004/’. WP-Cache will search if that string is part of the URI and if so, it will not cache that page." +msgstr "Añada aquí las cadenas (no el nombre del fichero) que forzará que una página no entre en caché. Por ejemplo, si su URL incluye un año y no quiere que los artículos del último año entren en caché, bastará con especificar el año, por ejemplo:’/2004/’. WP-Cache buscará si esa cadena forma parte de la URI para, de ser así, no alojar dicha página en la caché." + +#: wp-cache.php:969 +msgid "Save Strings" +msgstr "Grabar cadenas" + +#: wp-cache.php:985 +msgid "Add here those filenames that can be cached, even if they match one of the rejected substring specified above." +msgstr "Añada aquí aquellos nombres de archivos que pueden ser almacenados en caché, incluso si coinciden con alguna de las subcadenas especificadas arriba." + +#: wp-cache.php:991 +msgid "Save Files" +msgstr "Grabar archivos" + +#: wp-cache.php:1035 +msgid "Debug Settings" +msgstr "Depurar opciones" + +#: wp-cache.php:1037 +msgid "Currently logging to: " +msgstr "Actualmente registrando datos (log) en:" + +#: wp-cache.php:1047 +msgid "Fix problems with the plugin by debugging it here. It can send you debug emails or log them to a file in your cache directory." +msgstr "Solucione problemas con el plugin depurándolos aquí. Podrá recibir emails de depuración o guardar los registros en un fichero de su directorio caché." + +#: wp-cache.php:1048 +msgid "Logging to a file is easier but faces the problem that clearing the cache will clear the log file." +msgstr "Guardar los registros en un fichero es más sencillo, pero limpiar la caché provocará que se borren dichos archivos de registro." + +#: wp-cache.php:1052 +msgid "Debugging" +msgstr "Modo depuración" + +#: wp-cache.php:1053 +msgid "Logging Type" +msgstr "Tipo de registro" + +#: wp-cache.php:1053 +msgid "Email" +msgstr "Email" + +#: wp-cache.php:1054 +msgid "file" +msgstr "archivo" + +#: wp-cache.php:1055 +msgid "IP Address" +msgstr "Dirección IP" + +#: wp-cache.php:1055 +#, php-format +msgid "(only log requests from this IP address. Your IP is %s)" +msgstr "(depurar sólo peticiones desde esta dirección IP. Su IP es %s)" + +#: wp-cache.php:1056 +msgid "Log level" +msgstr "Nivel de registro" + +#: wp-cache.php:1062 +msgid "(1 = less, 5 = more, may cause severe server load.)" +msgstr "(1 = menor, 5 = mayor, puede provocar una gran carga al servidor)" + +#: wp-cache.php:1064 +msgid "Advanced" +msgstr "Avanzado" + +#: wp-cache.php:1064 +msgid "In very rare cases two problems may arise on some blogs:
    1. The front page may start downloading as a zip file.
    2. The wrong page is occasionally cached as the front page if your blog uses a static front page and the permalink structure is /%category%/%postname%/.
    " +msgstr "En algún caso bastante excepcional pueden ocurrir dos problemas en algunos blogs:
    1. La página principal puede empezar a descargarse como un archivo zip.
    2. Ocasionalmente, una página incorrecta se almacena en caché como si fuese la página principal si su blog utiliza una página principal estática y la estructura de enlaces permanentes es /%categoría%/%artículo%/.
    " + +#: wp-cache.php:1065 +#, php-format +msgid "I’m 99% certain that they aren’t bugs in WP Super Cache and they only happen in very rare cases but you can run a simple check once every 5 minutes to verify that your site is ok if you’re worried. You will be emailed if there is a problem." +msgstr "Estoy seguro al 99% de que no son fallos de WP Super Cache y de que tan sólo ocurren en casos muy excepcionales, pero si esto le preocupa puede ejecutar un sencillo test cada 5 minutos para verificar que su sitio esta bien. Recibirá un correo en caso de problemas." + +#: wp-cache.php:1067 +msgid "Check front page every 5 minutes." +msgstr "Comprobar la página principal cada 5 minutos." + +#: wp-cache.php:1068 +msgid "Front page text" +msgstr "Texto página principal" + +#: wp-cache.php:1068 +msgid "Text to search for on your front page. If this text is missing the cache will be cleared. Leave blank to disable." +msgstr "Texto a buscar en su página principal. Si se detecta que falta este texto, la caché se limpiará. Déjelo en blanco para desactivar esta opción" + +#: wp-cache.php:1069 +msgid "Clear cache on error." +msgstr "Limpiar la caché en caso de error." + +#: wp-cache.php:1070 +msgid "Email the blog admin when checks are made. (useful for testing)" +msgstr "Enviar un email al administrador del blog cuando se hagan comprobaciones (útil para pruebas)" + +#: wp-cache.php:1083 +msgid "Error: GZIP compression is enabled, disable it if you want to enable wp-cache." +msgstr "Error: la compresión GZIP está activada; debe desactivarla si quiere activar wp-cache." + +#: wp-cache.php:1131 +#: wp-cache.php:1293 +msgid "Warning" +msgstr "Aviso" + +#: wp-cache.php:1131 +msgid "GZIP compression is enabled in Wordpress, wp-cache will be bypassed until you disable gzip compression." +msgstr "La compresión GZIP está activa en WordPress, wp-cache se omitirá hasta que desactive dicha compresión." + +#: wp-cache.php:1189 +#: wp-cache.php:1194 +#: wp-cache.php:1226 +#: wp-cache.php:1231 +#: wp-cache.php:1237 +msgid "Error" +msgstr "Error" + +#: wp-cache.php:1189 +#, php-format +msgid "Your cache directory ($cache_path) did not exist and couldn’t be created by the web server. Check %s permissions." +msgstr "Si directorio caché ($cache_path) no existe y no puede ser creado por el servidor. Compruebe los permisos de %s." + +#: wp-cache.php:1194 +#, php-format +msgid "Your cache directory (%1$s) or %2$s need to be writable for this plugin to work. Double-check it." +msgstr "Su directorio caché (%1$s) o %2$s necesita tener permisos de escritura para que este plugin funcione. Verifíquelo bien." + +#: wp-cache.php:1226 +#, php-format +msgid "Your WP-Cache config file (%s) is out of date and not writable by the Web server.Please delete it and refresh this page." +msgstr "El archivo de configuración de WP-Cache (%s) está desactualizado y no puede editarse por el servidor. Por favor, bórrelo y recargue esta página." + +#: wp-cache.php:1231 +#, php-format +msgid "Configuration file missing and %1$s directory (%2$s) is not writable by the Web server.Check its permissions." +msgstr "Falta el archivo de configuración y %1$s el directorio (%2$s) no puede editarse por el servidor. Compruebe sus permisos." + +#: wp-cache.php:1237 +#, php-format +msgid "Sample WP-Cache config file (%s) does not exist.Verify you installation." +msgstr "El archivo de ejemplo de configuración WP-Cache (%s) no existe. Verifique su instalación." + +#: wp-cache.php:1293 +#, php-format +msgid "%s/advanced-cache.php does not exist or cannot be updated." +msgstr "%s/advanced-cache.php no existe o no puede ser actualizado." + +#: wp-cache.php:1294 +msgid "1. If it already exists please delete the file first." +msgstr "1. Si existe, por favor, borre primero el fichero." + +#: wp-cache.php:1295 +#, php-format +msgid "2. Make %1$s writable using the chmod command through your ftp or server software. (chmod 777 %1$s) and refresh this page. This is only a temporary measure and you’ll have to make it read only afterwards again. (Change 777 to 755 in the previous command)" +msgstr "2. Proporcione permisos de escritura a %1$s utilizando el comando CHMOD de su cliente de FTP. (chmod 777 %1$s) y recargue esta página. Esto sólo es una medida temporal: terminado el proceso deberá volver a dejarlo como de sólo lectura (cambiar de 777 a 755 en el comando anterior)" + +#: wp-cache.php:1296 +#, php-format +msgid "3. Refresh this page to update %s/advanced-cache.php" +msgstr "3. Recargue esta página para actualizar %s/advanced-cache.php" + +#: wp-cache.php:1297 +#, php-format +msgid "If that doesn’t work, make sure the file %s/advanced-cache.php doesn’t exist:" +msgstr "Si eso no funciona, asegúrese de que el archivo %s/advanced-cache.php no existe:" + +#: wp-cache.php:1298 +#, php-format +msgid "
  • 1. Open %1$s$wp_cache_file in a text editor.
  • 2. Change the text CACHEHOME to %2$s
  • 3. Save the file and copy it to %3$s and refresh this page.
  • " +msgstr "
  • 1. Abra el fichero %1$s$wp_cache_file en un editor de texto.
  • 2. Cambie el texto CACHEHOME por %2$s
  • 3. Guarde los cambios y salve el fichero en %3$s; luego recargue esta página.
  • " + +#: wp-cache.php:1318 +msgid "Error: WP_CACHE is not enabled in your wp-config.php file and I couldn’t modify it." +msgstr "Error: WP_CACHE no está activo en su fichero wp-config.php y no puedo modificarlo." + +#: wp-cache.php:1319 +#, php-format +msgid "Edit %s and add the following line:
    define('WP_CACHE', true);
    Otherwise, WP-Cache will not be executed by Wordpress core. " +msgstr "Edite el fichero %s y añada la siguiente línea:
    define('WP_CACHE', true);
    En caso contrario, WP-Cache no será ejecutado por el núcleo de Wordpress." + +#: wp-cache.php:1322 +msgid "

    WP_CACHE constant added to wp-config.php

    If you continue to see this warning message please see point 5 of the FAQ. The WP_CACHE line must be moved up." +msgstr "

    Constante WP_CACHE añadida al fichero wp-config.php

    Si sigue viendo este mensaje de aviso, revise por favor el punto 5 del FAQ. La línea WP_CACHE debe subirse sobre otras líneas." + +#: wp-cache.php:1343 +msgid "Cache Contents" +msgstr "Contenidos en caché" + +#: wp-cache.php:1362 +#, php-format +msgid "Deleting supercache file: %s
    " +msgstr "Borrando archivo supercache: %s
    " + +#: wp-cache.php:1379 +#, php-format +msgid "Deleting wp-cache file: %s
    " +msgstr "Borrando archivo wp-cache: %s
    " + +#: wp-cache.php:1443 +msgid "WP-Cache" +msgstr "WP-Cache" + +#: wp-cache.php:1444 +#: wp-cache.php:1457 +#, php-format +msgid "%s Cached Pages" +msgstr "%s Páginas en caché" + +#: wp-cache.php:1445 +#: wp-cache.php:1459 +#, php-format +msgid "%s Expired Pages" +msgstr "%s Páginas caducadas" + +#: wp-cache.php:1456 +msgid "WP-Super-Cache" +msgstr "WP-Super-Cache" + +#: wp-cache.php:1464 +msgid "Fresh WP-Cached Files" +msgstr "Archivos recientes en caché" + +#: wp-cache.php:1465 +#: wp-cache.php:1481 +#: wp-cache.php:1497 +#: wp-cache.php:1513 +msgid "URI" +msgstr "URI" + +#: wp-cache.php:1465 +#: wp-cache.php:1481 +msgid "Key" +msgstr "Clave" + +#: wp-cache.php:1465 +#: wp-cache.php:1481 +#: wp-cache.php:1497 +#: wp-cache.php:1513 +msgid "Age" +msgstr "Edad" + +#: wp-cache.php:1465 +#: wp-cache.php:1481 +#: wp-cache.php:1497 +#: wp-cache.php:1513 +msgid "Delete" +msgstr "Borrar" + +#: wp-cache.php:1480 +msgid "Stale WP-Cached Files" +msgstr "Archivos anticuados en caché" + +#: wp-cache.php:1496 +msgid "Fresh Super Cached Files" +msgstr "Archivos recientes en Super Caché" + +#: wp-cache.php:1512 +msgid "Stale Super Cached Files" +msgstr "Archivos anticuados en Super Caché" + +#: wp-cache.php:1528 +msgid "Hide file list" +msgstr "Ocultar lista de archivos" + +#: wp-cache.php:1530 +msgid "List all cached files" +msgstr "Mostrar archivos en caché" + +#: wp-cache.php:1536 +#, php-format +msgid "Garbage Collection
    Last GC was %s minutes ago
    " +msgstr "Recolección de Basura
    La última \"RdB\" se hizo hace %s minutos
    " + +#: wp-cache.php:1537 +#, php-format +msgid "Next GC in %s minutes" +msgstr "La siguiente \"RdB\" se hará en %s minutos" + +#: wp-cache.php:1540 +#, php-format +msgid "Expired files are files older than %s seconds. They are still used by the plugin and are deleted periodically." +msgstr "Los ficheros caducados son aquellos superiores a %s segundos. Todavía están en uso por el plugin y son borrados periódicamente." + +#: wp-cache.php:1543 +msgid "Delete Expired" +msgstr "Borrar caducados" + +#: wp-cache.php:1549 +#: wp-cache.php:1563 +#: wp-cache.php:1719 +msgid "Delete Cache" +msgstr "Borrar caché" + +#: wp-cache.php:1563 +msgid "Delete Super Cache cached files (opens in new window)" +msgstr "Borrar archivos de Super Caché (se abrirá una nueva ventana)" + +#: wp-cache.php:1695 +#, php-format +msgid "%1$s is Digg proof thanks to caching by %2$s" +msgstr "%1$s está orgullosamente a prueba de Digg gracias a la caché que proporciona %2$s" + +#: wp-cache.php:1728 +#, php-format +msgid "WP Super Cache must be configured. Go to the admin page to enable and configure the plugin." +msgstr "WP Super Cache debe configurarse. Vaya a la página de administración para activar y configurar el plugin." + +#: wp-cache.php:1734 +msgid "Settings" +msgstr "Configuraciones" + +#: wp-cache.php:1744 +#, php-format +msgid "WP Super Cache is disabled. Please go to the plugin admin page to enable caching." +msgstr "WP Super Cache está desactivado. Por favor, vaya a la página de administración del plugin para activar la caché." + +#: wp-cache.php:1763 +#, php-format +msgid "[%s] Front page is gzipped! Please clear cache!" +msgstr "[%s] La página principal esta comprimida con Gzip! Debe limpiar la caché." + +#: wp-cache.php:1763 +#, php-format +msgid "Please visit %s to clear the cache as the front page of your site is now downloading!" +msgstr "Por favor, visite %s para limpiar la caché ya que la página principal de su sitio esta ahora descargándose!" + +#: wp-cache.php:1766 +#, php-format +msgid "[%s] Front page is gzipped! Cache Cleared!" +msgstr "[%s] La página principal esta comprimida con Gzip! Caché eliminada!" + +#: wp-cache.php:1766 +#, php-format +msgid "The cache on your blog has been cleared because the front page of your site is now downloading. Please visit %s to verify the cache has been cleared." +msgstr "La caché de su blog se ha limpiado ya que la página principal de su sitio se está descargando. Por favor, visite %s para comprobar que la caché se ha limpiado correctamente." + +#: wp-cache.php:1773 +#, php-format +msgid "[%s] Front page is not correct! Please clear cache!" +msgstr "[%s] La página principal esta comprimida con Gzip! Por favor, limpie la caché." + +#: wp-cache.php:1773 +#, php-format +msgid "Please visit %1$s to clear the cache as the front page of your site is not correct and missing the text, \"%2$s\"!" +msgstr "Por favor, visite %1$s para limpiar la caché, ya que la página principal de su sitio no es correcta y falta el texto , \"%2$s\"!" + +#: wp-cache.php:1776 +#, php-format +msgid "[%s] Front page is not correct! Cache Cleared!" +msgstr "[%s] La página principal no es correcta, caché eliminada!" + +#: wp-cache.php:1776 +#, php-format +msgid "The cache on your blog has been cleared because the front page of your site is missing the text \"%2$s\". Please visit %1$s to verify the cache has been cleared." +msgstr "Se ha limpiado la caché de su blog debido a que la página principal de su sitio carece del texto \"%2$s\". Por favor, visite %1$s para comprobar que la caché se ha limpiado correctamente." + +#: wp-cache.php:1781 +#, php-format +msgid "[%s] Front page check!" +msgstr "[%s] Comprobar página principal!" + +#: wp-cache.php:1781 +#, php-format +msgid "WP Super Cache has checked the front page of your blog. Please visit %s if you would like to disable this." +msgstr "WP Super Cache ha comprobado la página principal de su blog. Por favor, visite %s si quiere desactivar esto." + diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/wp-super-cache/languages/wp-super-cache-it_IT.mo Binary file web/wp-content/plugins/wp-super-cache/languages/wp-super-cache-it_IT.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/wp-super-cache/languages/wp-super-cache-it_IT.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/wp-super-cache/languages/wp-super-cache-it_IT.po Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,1071 @@ +# WP Super Cache Translation File +# GPL +# Donncha O Caoimh, http://ocaoimh.ie/ +# +msgid "" +msgstr "" +"Project-Id-Version: WP Super Cache in italiano\n" +"Report-Msgid-Bugs-To: http://wordpress.org/tag/wp-super-cache\n" +"POT-Creation-Date: 2009-11-10 16:29+0000\n" +"PO-Revision-Date: 2009-11-10 21:06+0100\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" + +#: plugins/badbehaviour.php:45 +msgid "Bad Behaviour not found. Please check your install." +msgstr "Non é stato trovato Bad Behaviour. Effettua una verifica." + +#: plugins/badbehaviour.php:47 +#: plugins/badbehaviour.php:66 +#: plugins/searchengine.php:61 +#: plugins/searchengine.php:76 +#: wp-cache.php:709 +msgid "Disable" +msgstr "Disattiva" + +#: plugins/badbehaviour.php:55 +#: plugins/searchengine.php:67 +msgid "disabled" +msgstr "disattivato" + +#: plugins/badbehaviour.php:57 +#: plugins/searchengine.php:69 +#: wp-cache.php:1050 +msgid "enabled" +msgstr "attivato" + +#: plugins/badbehaviour.php:60 +#, php-format +msgid "Bad Behaviour support is %s" +msgstr "Il supporto a Bad Behaviour é %s" + +#: plugins/badbehaviour.php:62 +#, php-format +msgid "(Only half-on caching supported, disabled compression and requires Bad Behavior in \"%s/plugins/bad-behavior/\") " +msgstr "(utilizzare la sola cache parziale, non attivare la compressione ed installare Bad Behavior sotto \"%s/plugins/bad-behavior/\") " + +#: plugins/badbehaviour.php:64 +#: plugins/searchengine.php:74 +#: wp-cache.php:709 +msgid "Enable" +msgstr "Attiva" + +#: plugins/badbehaviour.php:70 +#: wp-cache.php:786 +#: wp-cache.php:788 +msgid "Warning!" +msgstr "Attenzione!" + +#: plugins/searchengine.php:71 +#, php-format +msgid "No Adverts for Friends plugin is %s" +msgstr "Il plugin No Adverts for Friends é %s" + +#: plugins/searchengine.php:72 +msgid "(requires friendsadverts.php too) " +msgstr "(é necessario anche friendsadverts.php) " + +#: wp-cache.php:87 +#, php-format +msgid "Please create %s /wp-cache-config.php from wp-super-cache/wp-cache-config-sample.php" +msgstr "Crea %s /wp-cache-config.php da wp-super-cache/wp-cache-config-sample.php" + +#: wp-cache.php:170 +msgid "WP Super Cache Manager" +msgstr "Gestione WP Super Cache" + +#: wp-cache.php:172 +msgid "Warning! PHP Safe Mode Enabled!" +msgstr "Attenzione! Il PHP Safe Mode é attivo!" + +#: wp-cache.php:173 +msgid "You may experience problems running this plugin because SAFE MODE is enabled." +msgstr "Attivando questo plugin potresti andare incontro ad alcuni problemi poiché il SAFE MODE é attivo." + +#: wp-cache.php:175 +msgid "Your server is set up to check the owner of PHP scripts before allowing them to read and write files." +msgstr "Prima che sia possibile la lettura e la scrittura dei file, il tuo server richiede che venga effettuata una verifica circa il proprietario degli script PHP." + +#: wp-cache.php:176 +#, php-format +msgid "You or an administrator may be able to make it work by changing the group owner of the plugin scripts to match that of the web server user. The group owner of the %s/cache/ directory must also be changed. See the safe mode manual page for further details." +msgstr "L'amministratore del sito ha la possibilità di cambiare il proprietario del gruppo che fa capo agli script di questo plugin facendo sì che esso coincida con l'utente web del server. Anche il proprietario del gruppo per la cartella %s/cache/ può essere cambiato. Per ulteriori informazioni, consulta la pagina del manuale safe mode." + +#: wp-cache.php:178 +msgid "You or an administrator must disable this. See the safe mode manual page for further details. This cannot be disabled in a .htaccess file unfortunately. It must be done in the php.ini config file." +msgstr "L'amministratore del sito ha la possibilità di disattivare questa funzione. Per ulteriori informazioni, consulta la pagina del manuale safe mode. La disattivazione non potrà avvenire via file .htaccess. L'operazione dovrà essere effettuata nel file di configurazione php.ini." + +#: wp-cache.php:189 +msgid "Configuration file changed, some values might be wrong. Load the page again from the \"Settings\" menu to reset them." +msgstr "La configurazione del file é stata modificata: alcuni valori potrebbero essere errati. Ricarica nuovamente la pagina dal menu delle \"Impostazioni\" per ripristinare." + +#: wp-cache.php:195 +msgid "Cannot continue... fix previous problems and retry." +msgstr "Non é possibile proseguire l'operazione. Correggi i problemi precedenti prima di riprovare." + +#: wp-cache.php:211 +#, php-format +msgid "Warning! Your hostname \"%s\" resolves to %s" +msgstr "Attenzione! Il tuo hostname \"%s\" viene convertito in %s" + +#: wp-cache.php:213 +#, php-format +msgid "Your server thinks your hostname resolves to %s. Some services such as garbage collection by this plugin, and WordPress scheduled posts may not operate correctly." +msgstr "Il tuo server ritiene che il tuo hostname venga convertito in %s. Alcuni servizi quali ad esempio la garbage collection fornita da questo plugin e la pubblicazione programmata dei post di WordPress potrebbero non funzionare correttamente." + +#: wp-cache.php:214 +#: wp-cache.php:228 +#, php-format +msgid "Please see entry 16 in the Troubleshooting section of the readme.txt" +msgstr "Leggi il punto numero 16 nella sezione Troubleshooting del file readme.txt" + +#: wp-cache.php:227 +msgid "Unfortunately WordPress cannot find the file wp-cron.php. This script is required for the the correct operation of garbage collection by this plugin, WordPress scheduled posts as well as other critical activities." +msgstr "WordPress non é in grado di trovare il file wp-cron.php. Questo script é necessario script per un corretto funzionamento della garbage collection fornita da questo plugin, per la pubblicazione programmata dei post di WordPress così come per tutte le altre attività di rilevante importanza." + +#: wp-cache.php:239 +msgid "Mod rewrite may not be installed!" +msgstr "Il Mod rewrite potrebbe non essere stato installato!" + +#: wp-cache.php:240 +msgid "It appears that mod_rewrite is not installed. Sometimes this check isn’t 100% reliable, especially if you are not using Apache. Please verify that the mod_rewrite module is loaded. It is required for serving Super Cache static files. You will still be able to use half-on mode." +msgstr "Pare che il mod_rewrite non sia installato. Considera che questa affermazione potrebbe non essere attendibile al 100%, specialmente qualora non venisse utilizzato Apache. Verifica che sia stato caricato il modulo mod_rewrite. Il modulo sarà necessario per potere servire i file statici di Super Cache. Avrai comunque ancora la possibilità di poter utilizzare la modalità parziale." + +#: wp-cache.php:245 +msgid "Read Only Mode. Configuration cannot be changed." +msgstr "Modalita di sola lettura. La configurazione non può essere modificata." + +#: wp-cache.php:245 +msgid "Why your configuration may not be changed" +msgstr "Perché la tua configurazione non può essere modificata" + +#: wp-cache.php:245 +msgid "Why" +msgstr "Perché" + +#: wp-cache.php:247 +#, php-format +msgid "The WP Super Cache configuration file is %s/wp-cache-config.php and cannot be modified. That file must be writeable by the webserver to make any changes." +msgstr "Il file di configurazione di WP Super Cache é %s/wp-cache-config.php e non può essere modificato. Affinché possa essere modicato, il file in questione deve essere scrivibile." + +#: wp-cache.php:248 +msgid "A simple way of doing that is by changing the permissions temporarily using the CHMOD command or through your ftp client. Make sure it’s globally writeable and it should be fine." +msgstr "Un modo semplice per compiere l'operazione é quello di modificare temporaneamente i permessi facendo uso del comando CHMOD oppure via il tuo client ftp. Assicurati che sia scrivibile affinché il tutto possa funzionare propriamente." + +#: wp-cache.php:249 +msgid "Writeable:" +msgstr "Scrivibile:" + +#: wp-cache.php:250 +msgid "Readonly:" +msgstr "Sola lettura:" + +#: wp-cache.php:262 +#, php-format +msgid "Warning! %s is writeable!" +msgstr "Attenzione! %s é scrivibile!" + +#: wp-cache.php:263 +#, php-format +msgid "You should change the permissions on %s and make it more restrictive. Use your ftp client, or the following command to fix things:" +msgstr "E' necessario modificare i permessi per %s per renderli maggiormente restrittivi. Utilizza per la correzione il tuo client ftp oppure il seguente comando:" + +#: wp-cache.php:354 +msgid "WP Super Cache Status" +msgstr "Stato WP Super Cache" + +#: wp-cache.php:357 +msgid "ON" +msgstr "ATTIVO" + +#: wp-cache.php:357 +msgid "WP Cache and Super Cache enabled" +msgstr "WP Cache e Super Cache sono attivi" + +#: wp-cache.php:358 +msgid "HALF ON" +msgstr "PARZIALE" + +#: wp-cache.php:358 +msgid "Super Cache Disabled, only legacy WP-Cache caching." +msgstr "Super Cache non attivo, WP-Cache attivo" + +#: wp-cache.php:359 +msgid "OFF" +msgstr "NON ATTIVO" + +#: wp-cache.php:359 +msgid "WP Cache and Super Cache disabled" +msgstr "WP Cache e Super Cache non sono attivi" + +#: wp-cache.php:360 +msgid "Don’t cache pages for logged in users." +msgstr "Non effettuare la cache delle pagine per gli utenti collegati." + +#: wp-cache.php:361 +msgid "Proudly tell the world your server is Digg proof! (places a message in your blog’s footer)" +msgstr "Fai sapere a tutti che il tuo sito é a prova di Digg! (inserisce un messaggio nel footer del tuo blog)" + +#: wp-cache.php:362 +msgid "Clear all cache files when a post or page is published. (This may significantly slow down saving of posts.)" +msgstr "Svuota tutti i file di cache quando viene pubblicato un articolo o una pagina (il salvataggio del post subirà un rallentamento significante)" + +#: wp-cache.php:363 +msgid "Cache rebuild. Serve a supercache file to anonymous users while a new file is being generated. Recommended for very busy websites with lots of comments. Makes \"directly cached pages\" and \"Lockdown mode\" obsolete." +msgstr "Rigenerazione della cache. Proponi agli utenti anonimi un file di supercache quando un nuovo file sta per essere generato. L'attivazione di questa funzione é preferibile per quei siti ad alto traffico e con molti commenti. Questa opzione rende di fatto obsoleta la \"cache diretta pagine\" e la \"modalità Lockdown\"." + +#: wp-cache.php:365 +msgid "Coarse file locking. You probably don’t need this but it may help if your server is underpowered. Warning! May cause your server to lock up in very rare cases!" +msgstr "Blocco grezzo del file. Sebbene questa funzione non sia particolarmente necessaria potrebbe tornarti utile qualora il tuo server non avesse una potenza sufficiente. Attenzione! In alcuni casi molto rari potrebbe bloccare il tuo server!" + +#: wp-cache.php:367 +msgid "List the newest cached pages (may be expensive to run on busy sites, use with caution.)" +msgstr "Lista delle nuove pagine nella cache (non indicato per i siti ad alto traffico - usare con cautela)" + +#: wp-cache.php:368 +msgid "Mobile device support." +msgstr "Supporto " + +#: wp-cache.php:373 +msgid "Mobile rewrite rules detected" +msgstr "Sono state rilevate le regole Mobile rewrite" + +#: wp-cache.php:374 +msgid "For best performance you should enable \"Mobile device support\" or delete the mobile rewrite rules in your .htaccess. Look for the 2 lines with the text \"Android|2.0\\ MMP|240x320|AvantGo|BlackBerry|Blazer|Cellphone\" and delete those." +msgstr "Per una migliore prestazione attivare il \"Supporto mobile device\" oppure cancellare le regole mobile rewrite presenti nel tuo file .htaccess. Cerca le 2 linee contenenti il testo \"Android|2.0\\ MMP|240x320|AvantGo|BlackBerry|Blazer|Cellphone\" e cancellale." + +#: wp-cache.php:374 +msgid "This will have no affect on ordinary users but mobile users will see uncached pages." +msgstr "Questa operazione non avrà alcun effetto per gli utenti comuni mentre gli utenti via mobile non visualizzeranno le pagine nella cache." + +#: wp-cache.php:377 +msgid "Mobile support requires extra rules in your .htaccess file, or you can set the plugin to half-on mode. Here are your options (in order of difficulty):" +msgstr "Il supporto mobile necessita della aggiunta di alcune regole extra nel tuo file .htaccess oppure che tu imposti il plugin nella modalità parziale. Qui puoi trovare le opzioni disponibili (in ordine di difficoltà):" + +#: wp-cache.php:378 +msgid "Set the plugin to half on mode and enable mobile support." +msgstr "Imposta il plugin nella modalità parziale ed attiva il supporto mobile." + +#: wp-cache.php:379 +#, php-format +msgid "Delete the plugin mod_rewrite rules in %s.htaccess enclosed by # BEGIN WPSuperCache and # END WPSuperCache and let the plugin regenerate them by reloading this page." +msgstr "Cancella le regole mod_rewrite del plugin in %s.htaccess presenti tra # BEGIN WPSuperCache e # END WPSuperCache quindi, permetti al plugin di rigenerarle al momento della ricarica di questa pagina." + +#: wp-cache.php:380 +msgid "Add the rules yourself. Edit %s.htaccess and find the block of code enclosed by the lines # BEGIN WPSuperCache and # END WPSuperCache. There are two sections that look very similar. Just below the line %{HTTP:Cookie} !^.*(comment_author_|wordpress|wp-postpass_).*$ add this line: (do it twice, once for each section)" +msgstr "Aggiungi tu stesso le regole. Modifica il file %s.htaccess e trova il blocco del codice contenuto tra le linee # BEGIN WPSuperCache e # END WPSuperCache. Troverai due sezioni particolarmente simili tra loro. Proprio sotto la linea %{HTTP:Cookie} !^.*(comment_author_|wordpress|wp-postpass_).*$ aggiungi questa linea: (per due volte, una per ogni sezione)" + +#: wp-cache.php:383 +msgid "Note:" +msgstr "Nota:" + +#: wp-cache.php:383 +#, php-format +msgid "If uninstalling this plugin, make sure the directory %s is writeable by the webserver so the files advanced-cache.php and cache-config.php can be deleted automatically. (Making sure those files are writeable too is probably a good idea!)" +msgstr "Qualora desiderassi disinstallare questo plugin, assicurati che la cartella %s sia scrivibile in modo tale che i file advanced-cache.php e cache-config.php possano venire cancellati automaticamente. (l'accertarsi che anche questi due file siano scrivibile é probabilmente una buona idea!)" + +#: wp-cache.php:384 +#, php-format +msgid "Uninstall using the uninstall script to remove files and directories created by the plugin. (Please see readme.txt for instructions on uninstalling this script.)" +msgstr "Utilizzando lo script di disinstallazione verranno rimossi tutti i file e tutte le cartelle create dal plugin. (per maggiori informazioni sul come effettuare la disinstallazione, consulta il readme.txt.)" + +#: wp-cache.php:386 +msgid "Update Status" +msgstr "Aggiorna lo stato" + +#: wp-cache.php:393 +msgid "Required to serve compressed supercache files properly." +msgstr "E' necessario fornire correttamente i file compressi supercache." + +#: wp-cache.php:393 +msgid "Required to set caching information on supercache pages. IE7 users will see old pages without this module." +msgstr "E' necessario impostare le informazioni cache per le pagine supercache. In assenza di questo modulo, gli utenti che utilizzano IE7 visualizzeranno le pagine non aggiornate." + +#: wp-cache.php:393 +msgid "Set the expiry date on supercached pages. Visitors may not see new pages when they refresh or leave comments without this module." +msgstr "Imposta la data di scadenza per le pagine supercached. Senza questo modulo, i visitatori potrebbero non visualizzare le nuove pagine sebbene venga ricaricata la pagina oppure inviare dei commenti." + +#: wp-cache.php:400 +msgid "Missing Apache Modules" +msgstr "Moduli Apache mancanti" + +#: wp-cache.php:401 +msgid "The following Apache modules are missing. The plugin will work in half-on mode without them. In full Supercache mode, your visitors may see corrupted pages or out of date content however." +msgstr "Non sono presenti i seguenti moduli Apache. Senza di essi, il plugin funzionerà in modalità parziale. Qualora facessi uso della modalita Supercache attiva, i tuoi visitatori potrebbero visualizzare delle pagine non aggiornate e/o corrotte." + +#: wp-cache.php:413 +msgid "Make WordPress Faster" +msgstr "Rendi più veloce WordPress" + +#: wp-cache.php:415 +#, php-format +msgid "%1$s really makes your blog go faster. Make it go faster* by buying me an Amazon gift card! Make it out to \"%3$s\" for whatever amount you want. Every penny helps!" +msgstr "%1$s rende veramente più veloce il tuo blog. Rendilo più rapido* offrendomi una Amazon gift card! Partecipa a \"%3$s\" con un qualsiasi importo tu desideri offrire. Ogni centesimo é di aiuto!" + +#: wp-cache.php:416 +#, php-format +msgid "If Amazon isn’t your thing, there’s also PayPal. Click the \"Donate\" button below or take a quick peek at my wishlist." +msgstr "Non ti piacesse Amazon, utilizza PayPal. Clicca sul pulsante \"Donazione\" qui sotto oppure fai un salto alla mia wishlist." + +#: wp-cache.php:417 +msgid "Thanks in advance!" +msgstr "Un grazie anticipato!" + +#: wp-cache.php:418 +msgid "Ok, it won’t go any faster but you’ll make this plugin author very happy!" +msgstr "Ok, considera che sebbene il tuo sito non sarà più veloce avrai almeno reso più felice l'autore di questo plugin!" + +#: wp-cache.php:426 +msgid "Don’t show me this again." +msgstr "Non mostrarmelo più." + +#: wp-cache.php:426 +msgid "Hide" +msgstr "Nascondi" + +#: wp-cache.php:429 +#, php-format +msgid "%1$s is maintained and developed by %2$s with contributions from many others." +msgstr "Il plugin %1$s viene aggiornato e sviluppato da %2$s grazie anche al contributo di molte altre persone." + +#: wp-cache.php:430 +#, php-format +msgid "He blogs at %1$s, posts photos at %2$s and wishes he had more time to read and relax." +msgstr "Oltre al tempo dedicato alla lettura ed al relax, Donncha cura il blog %1$s, pubblica le sue foto nel sito %2$s e riceve anche dei doni." + +#: wp-cache.php:431 +#, php-format +msgid "Please say hi to him on %s too!" +msgstr "Mandagli un saluto su %s!" + +#: wp-cache.php:440 +#, php-format +msgid "Cached pages since %1$s : %2$s" +msgstr "Pagine in cache da %1$s : %2$s" + +#: wp-cache.php:441 +msgid "Newest Cached Pages:" +msgstr "Pagine recenti nella cache:" + +#: wp-cache.php:445 +#, php-format +msgid "Cached %s seconds ago" +msgstr "Cache effettuata %s secondi fa" + +#: wp-cache.php:448 +msgid "(may not always be accurate on busy sites)" +msgstr "(il dato potrebbe essere non sempre accurato per quei siti ad alto traffico)" + +#: wp-cache.php:469 +msgid "Accepted Filenames & Rejected URIs" +msgstr "Nomi file consentiti e URL respinti" + +#: wp-cache.php:494 +msgid "Cache Plugins" +msgstr "Plugin e cache" + +#: wp-cache.php:505 +#: wp-cache.php:516 +msgid "Super Cache Compression" +msgstr "Compressione Super Cache" + +#: wp-cache.php:506 +msgid "Compression is enabled by default when in HALF ON mode." +msgstr "La compressione viene attivata come predefinita quando é in uso la modalità PARZIALE." + +#: wp-cache.php:518 +#: wp-cache.php:696 +msgid "Enabled" +msgstr "Attivato" + +#: wp-cache.php:519 +#: wp-cache.php:696 +msgid "Disabled" +msgstr "Disattivato" + +#: wp-cache.php:520 +msgid "Compression is disabled by default because some hosts have problems with compressed files. Switching this on and off clears the cache." +msgstr "La compressione é disattivata come predefinita poiché alcuni host riscontrano dei problemi con i file compressi. La commutazione attivo/non attivo svuoterà la cache." + +#: wp-cache.php:523 +msgid "Super Cache compression is now disabled." +msgstr "La compressione Super Cache é stata disattivata." + +#: wp-cache.php:525 +msgid "Super Cache compression is now enabled." +msgstr "La compressione Super Cache é stata attivata." + +#: wp-cache.php:527 +msgid "Update Compression" +msgstr "Aggiorna la compressione" + +#: wp-cache.php:534 +msgid "Mod Rewrite Rules" +msgstr "Regole Mod Rewrite" + +#: wp-cache.php:581 +msgid "WordPress MU Detected" +msgstr "E' stata rilevata una installazione WordPress MU" + +#: wp-cache.php:581 +msgid "Unfortunately the rewrite rules cannot be updated automatically when running WordPress MU. Please open your .htaccess and add the following mod_rewrite rules above any other rules in that file." +msgstr "Sfortunatamente, le rewrite rule non possono essere aggiornate in automatico quando WordPress MU é in funzione. Apri il tuo file .htaccess ed aggiungi le seguenti regole mod_rewrite in cima ad ogni altra regola presente nel file." + +#: wp-cache.php:583 +msgid "Mod Rewrite rules cannot be updated!" +msgstr "Le regole Mod Rewrite non possono essere aggiornate!" + +#: wp-cache.php:584 +#, php-format +msgid "You must have BEGIN and END markers in %s.htaccess for the auto update to work. They look like this and surround the main WordPress mod_rewrite rules:" +msgstr "Affinché l'aggiornamento automatico possa funzionare, sono necessari i marcatori BEGIN ed END nel file %s.htaccess. Sono simili a questa ed avvolgono le principali regole mod_rewrite di WordPress:" + +#: wp-cache.php:586 +msgid "Refresh this page when you have updated your .htaccess file." +msgstr "Ricarica questa pagina una volta aggiornato il file .htaccess." + +#: wp-cache.php:590 +msgid "Thank you for upgrading." +msgstr "Grazie per avere effettuato l'aggiornamento." + +#: wp-cache.php:590 +#, php-format +msgid "The mod_rewrite rules changed since you last installed this plugin. Unfortunately you must remove the old supercache rules before the new ones are updated. Refresh this page when you have edited your .htaccess file. If you wish to manually upgrade, change the following line: %1$s so it looks like this: %2$s The only changes are \"HTTP_COOKIE\" becomes \"HTTP:Cookie\" and \"wordpressuser\" becomes \"wordpress\". This is a WordPress 2.5 change but it’s backwards compatible with older versions if you’re brave enough to use them." +msgstr "Le regole mod_rewrite sono cambiate dalla tua ultima installazione di questo plugin. E' necessario che tu rimuova le regole supercache precedenti prima che le nuove siano aggiornate. Ricarica questa pagina una volta che avrai modificato il tuo file .htaccess. Qualora desiderassi effettuare un aggiornamento manuale, modifica la seguente linea: %1$s rendendola simile a questa: %2$s Le sole modifiche sono \"HTTP_COOKIE\" che diventa \"HTTP:Cookie\" e \"wordpressuser\" che va sostituito con \"wordpress\". Questa é una modifica relativa a WordPress 2.5 comunque, la sua validità é estesa anche alle versioni precedenti (qualora avessi il coraggio di utilizzarle)." + +#: wp-cache.php:594 +msgid "Trailing slash check required." +msgstr "E' necessaria una verifica sullo slash di chiusura." + +#: wp-cache.php:594 +msgid "It looks like your blog has URLs that end with a \"/\". Unfortunately since you installed this plugin a duplicate content bug has been found where URLs not ending in a \"/\" end serve the same content as those with the \"/\" and do not redirect to the proper URL. To fix, you must edit your .htaccess file and add these two rules to the two groups of Super Cache rules:" +msgstr "Pare che il tuo URL termini con uno \"/\". Dal momento in cui hai installato questo plugin, é stato rilevato un bug che duplica il contenuto laddove l'URL non termina con uno \"/\"; di fatto, vengono proposti gli stessi contenuti di quelli con lo \"/\" e non viene altresì effettuato un reindirizzamento all'URL appropriato. Per la correzione, sarà necessario modificare il tuo file .htaccess aggiungendo queste due regole ai due gruppi di regole di Super Cache:" + +#: wp-cache.php:596 +msgid "You can see where the rules go and examine the complete rules by clicking the \"View mod_rewrite rules\" link below." +msgstr "Puoi vedere dove posizionare ed esaminare nella loro completezza le regole cliccando il link qui sotto a nome \"Visualizza le regole Mod_Rewrite\"." + +#: wp-cache.php:608 +msgid "Cannot update .htaccess" +msgstr "Non é possibile aggiornare il file .htaccess" + +#: wp-cache.php:608 +#, php-format +msgid "The file %s.htaccess cannot be modified by the web server. Please correct this using the chmod command or your ftp client." +msgstr "Il file %s.htaccess non può essere modificato. Correggi utilizzando il comando chmod oppure il tuo client ftp." + +#: wp-cache.php:608 +msgid "Refresh this page when the file permissions have been modified." +msgstr "Ricarica questa pagina una volta che i permessi per il file sono stati modificati." + +#: wp-cache.php:608 +#, php-format +msgid "Alternatively, you can edit your %s.htaccess file manually and add the following code (before any WordPress rules):" +msgstr "Come alternativa, puoi modificare manualmente il file %s.htaccess aggiungendo il seguente codice (prima di ogni regola WordPress):" + +#: wp-cache.php:611 +#, php-format +msgid "To serve static html files your server must have the correct mod_rewrite rules added to a file called %s.htaccess" +msgstr "Affinché il tuo server possa fornire dei file html statici é necessario che le regole mod_rewrite vengano aggiunte al file %s.htaccess" + +#: wp-cache.php:613 +msgid "You must edit the file yourself add the following rules." +msgstr "E' necessario che tu modifichi il file aggiungendo le seguenti regole." + +#: wp-cache.php:615 +msgid "You can edit the file yourself add the following rules." +msgstr "Puoi modificare tu stesso il file aggiungendo le seguenti regole." + +#: wp-cache.php:617 +msgid " Make sure they appear before any existing WordPress rules. " +msgstr " Accertati che appaiano prima di ogni regola WordPress già presente. " + +#: wp-cache.php:619 +#: wp-cache.php:646 +#, php-format +msgid "Rules must be added to %s too:" +msgstr "Le regole devono essere aggiunte anche a %s:" + +#: wp-cache.php:624 +msgid "Update Mod_Rewrite Rules" +msgstr "Aggiorna le regole Mod_Rewrite" + +#: wp-cache.php:633 +msgid "Mod Rewrite rules updated!" +msgstr "Le regole Mod Rewrite sono state aggiornate!" + +#: wp-cache.php:634 +#, php-format +msgid "%s.htaccess has been updated with the necessary mod_rewrite rules. Please verify they are correct. They should look like this:" +msgstr "Il file %s.htaccess é stato aggiornato con l'inserimento delle regole mod_rewrite necessarie. Verifica la loro correttezza. Ecco come dovrebbero essere:" + +#: wp-cache.php:636 +msgid "Mod Rewrite rules must be updated!" +msgstr "E' necessario aggiornare le regole Mod Rewrite!" + +#: wp-cache.php:637 +#, php-format +msgid "Your %s.htaccess is not writable by the webserver and must be updated with the necessary mod_rewrite rules. The new rules go above the regular WordPress rules as shown in the code below:" +msgstr "Il tuo file %s.htaccess non é scrivibile e deve essere aggiornato con le regole mod_rewrite necessarie. Le nuove regole andranno inserite al di sopra di quelle regolari di WordPress così come nel codice qui sotto:" + +#: wp-cache.php:642 +#, php-format +msgid "WP Super Cache mod rewrite rules were detected in your %s.htaccess file.
    Click the following link to see the lines added to that file. If you have upgraded the plugin make sure these rules match." +msgstr "Sono state rilevate le regole mod rewrite di WP Super Cache nel tuo file %s.htaccess.
    Clicca il seguente link per vedere le linee aggiunte a quel file. Nel caso in cui avessi aggiornato il plugin assicurati che esse coincidano." + +#: wp-cache.php:643 +msgid "View Mod_Rewrite Rules" +msgstr "Visualizza le regole Mod_Rewrite" + +#: wp-cache.php:654 +#, php-format +msgid "Gzip encoding rules in %s.htaccess created." +msgstr "Sono state create nel file %s.htaccess le regole per la codifica Gzip." + +#: wp-cache.php:661 +msgid "Fix Configuration" +msgstr "Correggi la configurazione" + +#: wp-cache.php:664 +msgid "Restore Default Configuration" +msgstr "Ripristina la configurazione predefinita" + +#: wp-cache.php:672 +msgid "Comment moderation is enabled. Your comment may take some time to appear." +msgstr "Moderazione dei commenti attiva. Il tuo commento non apparirà immediatamente." + +#: wp-cache.php:696 +msgid "Lock Down:" +msgstr "Blocco di protezione:" + +#: wp-cache.php:697 +msgid "Prepare your server for an expected spike in traffic by enabling the lock down. When this is enabled, new comments on a post will not refresh the cached static files." +msgstr "Proteggi il tuo server da un inatteso picco di traffico attivando il blocco. Quando il blocco é attivo, i nuovi commenti non ricaricheranno i file statici nella cache." + +#: wp-cache.php:698 +msgid "Developers: Make your plugin lock down compatible by checking the \"WPLOCKDOWN\" constant. The following code will make sure your plugin respects the WPLOCKDOWN setting." +msgstr "Sviluppatori: é possibile rendere compatibile il plugin con il blocco di protezione grazie alla costante \"WPLOCKDOWN\". Il seguente codice farà sì che il plugin sia in grado di sopperire alle impostazioni WPLOCKDOWN." + +#: wp-cache.php:700 +msgid "Sorry. My blog is locked down. Updates will appear shortly" +msgstr "Il mio blog ha attivato un blocco di protezione. Gli aggiornamenti appariranno a breve" + +#: wp-cache.php:704 +msgid "WordPress is locked down. Super Cache static files will not be deleted when new comments are made." +msgstr "WordPress ha un blocco di protezione. Quando verranno effettuati dei nuovi commenti, i file statici di Super Cache non saranno cancellati." + +#: wp-cache.php:706 +msgid "WordPress is not locked down. New comments will refresh Super Cache static files as normal." +msgstr "WordPress ha un blocco di protezione. I nuovi commenti rigenereranno come al solito i file statici di Super Cache." + +#: wp-cache.php:712 +msgid "Lock Down" +msgstr "Blocco di protezione" + +#: wp-cache.php:720 +msgid "Directly Cached Files" +msgstr "File cache diretta" + +#: wp-cache.php:778 +#, php-format +msgid "%s removed!" +msgstr "%s rimosso!" + +#: wp-cache.php:786 +#, php-format +msgid "You must make %s writable to enable this feature. As this is a security risk please make it readonly after your page is generated." +msgstr "E' necessario rendere scrivibile %s affinché questa opzione possa essere attivata. Per ragioni di sicurezza, rendi di sola lettura una volta che la pagina é stata generata." + +#: wp-cache.php:788 +#, php-format +msgid "%s is writable. Please make it readonly after your page is generated as this is a security risk." +msgstr "%s é scrivibile. Assicurati che essa sia di sola lettura una volta che la pagina verrà generata (limita i problemi di sicurezza)." + +#: wp-cache.php:802 +msgid "Existing direct page" +msgstr "Pagina diretta esistente" + +#: wp-cache.php:802 +msgid "Delete cached file" +msgstr "Cancella i file nella cache" + +#: wp-cache.php:807 +msgid "Add direct page:" +msgstr "Aggiungi una pagina diretta:" + +#: wp-cache.php:809 +#, php-format +msgid "Directly cached files are files created directly off %s where your blog lives. This feature is only useful if you are expecting a major Digg or Slashdot level of traffic to one post or page." +msgstr "I file di cache diretta sono dei file creati direttamente sotto %s ossia laddove il tuo blog risiede. Questa opzione é particolarmente utile qualora ti aspettassi un alto livello di traffico proveniente da Digg o Slashdot verso un articolo/pagina." + +#: wp-cache.php:811 +#, php-format +msgid "For example: to cache %1$sabout/, you would enter %1$sabout/ or /about/. The cached file will be generated the next time an anonymous user visits that page." +msgstr "Esempio: per la cache di %1$sabout/, sarà necessario che tu inserisca %1$sabout/ oppure /about/. Il file di cache verrà generato la prima volta che un utente anonimo visiterà quella pagina." + +#: wp-cache.php:812 +msgid "Make the textbox blank to remove it from the list of direct pages and delete the cached file." +msgstr "Svuota la casella di testo per rimuovere l'indirizzo dalla lista delle pagine dirette e cancellare dalla cache il file." + +#: wp-cache.php:817 +msgid "Update Direct Pages" +msgstr "Aggiorna le pagine dirette" + +#: wp-cache.php:857 +msgid "Expiry Time & Garbage Collection" +msgstr "Periodo scadenza e Garbage Collection" + +#: wp-cache.php:859 +msgid "Expire time:" +msgstr "Periodo scadenza:" + +#: wp-cache.php:860 +msgid "seconds" +msgstr "secondi" + +#: wp-cache.php:861 +msgid "Garbage Collection" +msgstr "Garbage Collection" + +#: wp-cache.php:861 +msgid "If expiry time is more than 1800 seconds (half an hour), garbage collection will be done every 10 minutes, otherwise it will happen 10 seconds after the expiry time above." +msgstr "Qualora il periodo di scadenza fosse maggiore di 1800 secondi (mezz'ora), la garbage collection verrà effettuata ogni 10 minuti diversamente, l'operazione verrà effettuata 10 secondi dopo il periodo di scadenza indicato qui sopra." + +#: wp-cache.php:862 +msgid "Checking for and deleting expired files is expensive, but it’s expensive leaving them there too. On a very busy site you should set the expiry time to 300 seconds. Experiment with different values and visit this page to see how many expired files remain at different times during the day. Aim to have less than 500 cached files if possible." +msgstr "La ricerca e la cancellazione dei file scaduti é particolarmente dispendiosa così come lo é il lasciarli lì scaduti. Qualora avessi un sito con un traffico rilevante, imposta il tempo di scadenza a 300 secondi. Effettua eventualmente più prove con valori differenti e controlla in questa pagina (più volte durante l'arco della giornata) il totale dei file scaduti presenti. Il numero ottimale dovrebbe corrispondere a circa 500 file di cache." + +#: wp-cache.php:863 +msgid "Change Expiration" +msgstr "Modifica la scadenza" + +#: wp-cache.php:902 +msgid "Rejected User Agents" +msgstr "User Agents " + +#: wp-cache.php:903 +msgid "Strings in the HTTP ’User Agent’ header that prevent WP-Cache from caching bot, spiders, and crawlers’ requests. Note that super cached files are still sent to these agents if they already exists." +msgstr "Le stringhe presenti nella header HTTP degli ’User Agent’ che impediscono a WP-Cache di fornire i dati nella cache alle richieste da parte dei bot, degli spider e dei crawler. Nota che anche i file super cached saranno inviati a questi agent qualora esistessero." + +#: wp-cache.php:910 +msgid "Save UA Strings" +msgstr "Salva le stringhe UA" + +#: wp-cache.php:933 +msgid "Do not cache the following page types. See the Conditional Tags documentation for a complete discussion on each type." +msgstr "Non effettuare la cache per i tipi di pagine a seguire. Per maggiori informazioni, leggi la documentazione circa i tag condizionali." + +#: wp-cache.php:936 +msgid "Single Posts" +msgstr "Articoli singoli" + +#: wp-cache.php:937 +msgid "Pages" +msgstr "Pagine" + +#: wp-cache.php:938 +msgid "Front Page" +msgstr "Pagina principale" + +#: wp-cache.php:939 +msgid "Home" +msgstr "Home" + +#: wp-cache.php:940 +msgid "Archives" +msgstr "Archivi" + +#: wp-cache.php:941 +msgid "Tags" +msgstr "Tag" + +#: wp-cache.php:942 +msgid "Category" +msgstr "Categoria" + +#: wp-cache.php:943 +msgid "Feeds" +msgstr "Feed" + +#: wp-cache.php:944 +msgid "Search Pages" +msgstr "Pagine ricerca" + +#: wp-cache.php:946 +#: wp-cache.php:1071 +msgid "Save" +msgstr "Salva" + +#: wp-cache.php:963 +msgid "Add here strings (not a filename) that forces a page not to be cached. For example, if your URLs include year and you dont want to cache last year posts, it’s enough to specify the year, i.e. ’/2004/’. WP-Cache will search if that string is part of the URI and if so, it will not cache that page." +msgstr "Aggiungi qui le stringhe (non il nome del file) per forzare il blocco della cache per quella data pagina. Ad esempio, se il tuo URL contenesse l'anno e tu non gradissi la cache per gli articoli pubblicati in quel dato periodo, sarà sufficiente specificare l'anno, ad es. ’/2004/’. WP-Cache effettuerà una ricerca in modo tale da verificare la presenza di quella stringa nell'URI quindi, la cache per quella pagina non verrà generata." + +#: wp-cache.php:969 +msgid "Save Strings" +msgstr "Salva le stringhe" + +#: wp-cache.php:985 +msgid "Add here those filenames that can be cached, even if they match one of the rejected substring specified above." +msgstr "Aggiungi qui i nomi dei file per i quali potrà essere effettuata la cache (anche in caso di corrispondenza con una delle stringhe specificate più sopra)." + +#: wp-cache.php:991 +msgid "Save Files" +msgstr "Salva i file" + +#: wp-cache.php:1033 +msgid "Debug Settings" +msgstr "Impostazioni debug" + +#: wp-cache.php:1035 +msgid "Currently logging to: " +msgstr "Log attuale:" + +#: wp-cache.php:1045 +msgid "Fix problems with the plugin by debugging it here. It can send you debug emails or log them to a file in your cache directory." +msgstr "Correggi qui i problemi con il debugging del plugin. Potrai sceglie tra l'invio delle tue email di debug oppure consultare il registro contenuto in un file allocato nella cartella della cache." + +#: wp-cache.php:1046 +msgid "Logging to a file is easier but faces the problem that clearing the cache will clear the log file." +msgstr "Consultare il file di registro é semplice ma ricordati che, una volta svuotata la cache, verrà cancellato anche il file di registro." + +#: wp-cache.php:1050 +msgid "Debugging" +msgstr "Debugging" + +#: wp-cache.php:1051 +msgid "Logging Type" +msgstr "Tipo di logging" + +#: wp-cache.php:1051 +msgid "Email" +msgstr "Email" + +#: wp-cache.php:1052 +msgid "file" +msgstr "file" + +#: wp-cache.php:1053 +msgid "IP Address" +msgstr "Indirizzo IP" + +#: wp-cache.php:1053 +#, php-format +msgid "(only log requests from this IP address. Your IP is %s)" +msgstr "(richieste per il registro provenienti da questo solo indirizzo IP. Il tuo IP é %s)" + +#: wp-cache.php:1054 +msgid "Log level" +msgstr "Livello log" + +#: wp-cache.php:1060 +msgid "(1 = less, 5 = more, may cause severe server load.)" +msgstr "(1 = minore, 5 = maggiore, può essere causa di un maggior carico sul server.)" + +#: wp-cache.php:1062 +msgid "Advanced" +msgstr "Avanzato" + +#: wp-cache.php:1062 +msgid "In very rare cases two problems may arise on some blogs:

    1. The front page may start downloading as a zip file.
    2. The wrong page is occasionally cached as the front page if your blog uses a static front page and the permalink structure is /%category%/%postname%/.
    " +msgstr "In alcuni casi molto rari, é possibile che si verifichino in alcuni blog due problematiche:
    1. La front page potrebbe giungere come download di un file zip.
    2. La pagina errata può essere in certi casi custodita nella cache quale front page qualora il tuo blog facesse uso di una front page statica e la struttura del permalink fosse /%category%/%postname%/.
    " + +#: wp-cache.php:1063 +#, php-format +msgid "I’m 99% certain that they aren’t bugs in WP Super Cache and they only happen in very rare cases but you can run a simple check once a minute to verify that your site is ok if you’re worried. You will be emailed if there is a problem." +msgstr "Sono certo al 99% che non si tratta di bugs in WP Super Cache e questo problema può accadere in casi veramente molto rari. Puoi attivare comunque un controllo al minuto in modo tale che sia possibile monitorare il tuo sito. In caso di problemi, ti verrà inviata una email." + +#: wp-cache.php:1065 +msgid "Check front page once a minute." +msgstr "Controlla la front page ogni minuto." + +#: wp-cache.php:1066 +msgid "Front page text" +msgstr "Testo front page" + +#: wp-cache.php:1066 +msgid "Text to search for on your front page. If this text is missing the cache will be cleared. Leave blank to disable." +msgstr "il testo da cercare nella tua front page. La cache verrà svuotata in assenza del testo. Lascia vuoto per disattivare" + +#: wp-cache.php:1067 +msgid "Clear cache on error." +msgstr "Svuota la cache in caso di errore." + +#: wp-cache.php:1068 +msgid "Email the blog admin when checks are made. (useful for testing)" +msgstr "Invia una email di notifica all'aministratore del blog per l'avvenuto controllo. (utile per il testing) " + +#: wp-cache.php:1081 +msgid "Error: GZIP compression is enabled, disable it if you want to enable wp-cache." +msgstr "Errore: la compressione GZIP é attiva: disattivala qualora desiderassi attivare wp-cache." + +#: wp-cache.php:1129 +#: wp-cache.php:1291 +msgid "Warning" +msgstr "Attenzione" + +#: wp-cache.php:1129 +msgid "GZIP compression is enabled in Wordpress, wp-cache will be bypassed until you disable gzip compression." +msgstr "La tua installazione di WordPress ha la compressione GZIP attiva: wp-cache non sarà disponibile sino a quando la compressione gzip non verrà disattivata." + +#: wp-cache.php:1187 +#: wp-cache.php:1192 +#: wp-cache.php:1224 +#: wp-cache.php:1229 +#: wp-cache.php:1235 +msgid "Error" +msgstr "Errore" + +#: wp-cache.php:1187 +#, php-format +msgid "Your cache directory ($cache_path) did not exist and couldn’t be created by the web server. Check %s permissions." +msgstr "La tua cartella per la cache ($cache_path) non esiste e non può essere creata nel server. Verifica i permessi %s." + +#: wp-cache.php:1192 +#, php-format +msgid "Your cache directory (%1$s) or %2$s need to be writable for this plugin to work. Double-check it." +msgstr "La tua cartella per la cache (%1$s) oppure %2$s é necessario renderla scrivibile affinché il plugin possa funzionare. Verifica con attenzione." + +#: wp-cache.php:1224 +#, php-format +msgid "Your WP-Cache config file (%s) is out of date and not writable by the Web server.Please delete it and refresh this page." +msgstr "Il tuo file di configurazione WP-Cache (%s) non é aggiornato e non é scrivibile. Cancellalo e ricarica questa pagina." + +#: wp-cache.php:1229 +#, php-format +msgid "Configuration file missing and %1$s directory (%2$s) is not writable by the Web server.Check its permissions." +msgstr "Non é presente il file di configurazione e la cartella %1$s (%2$s) non é scrivibile. Verifica i suoi permessi." + +#: wp-cache.php:1235 +#, php-format +msgid "Sample WP-Cache config file (%s) does not exist.Verify you installation." +msgstr "Il file campione per la configurazione di WP-Cache (%s) non esiste. Effettua una verifica." + +#: wp-cache.php:1291 +#, php-format +msgid "%s/advanced-cache.php does not exist or cannot be updated." +msgstr "Il file %s/advanced-cache.php non esiste oppure non può essere aggiornato." + +#: wp-cache.php:1292 +msgid "1. If it already exists please delete the file first." +msgstr "1. Nel caso fosse già esistente, cancellalo." + +#: wp-cache.php:1293 +#, php-format +msgid "2. Make %1$s writable using the chmod command through your ftp or server software. (chmod 777 %1$s) and refresh this page. This is only a temporary measure and you’ll have to make it read only afterwards again. (Change 777 to 755 in the previous command)" +msgstr "2. Rendi il file %1$s scrivibile utilizzando il comando chmod via ftp oppure grazie al software del server. (chmod 777 %1$s) e ricarica questa pagina. Questa é una misura temporanea: ad operazione compiuta, rendi il file di sola lettura. (modificando da 777 a 755 il comando precedente)" + +#: wp-cache.php:1294 +#, php-format +msgid "3. Refresh this page to update %s/advanced-cache.php" +msgstr "3. Ricarica questa pagina per aggiornare il file %s/advanced-cache.php" + +#: wp-cache.php:1295 +#, php-format +msgid "If that doesn’t work, make sure the file %s/advanced-cache.php doesn’t exist:" +msgstr "Nel caso in cui non funzionasse, accertati che il file %s/advanced-cache.php non esista:" + +#: wp-cache.php:1296 +#, php-format +msgid "
  • 1. Open %1$s$wp_cache_file in a text editor.
  • 2. Change the text CACHEHOME to %2$s
  • 3. Save the file and copy it to %3$s and refresh this page.
  • " +msgstr "
  • 1. Apri %1$s$wp_cache_file con un editor di testo.
  • 2. Modifica il testo da CACHEHOME a %2$s
  • 3. Salva il file e copialo in %3$s quindi, ricarica questa pagina.
  • " + +#: wp-cache.php:1316 +msgid "Error: WP_CACHE is not enabled in your wp-config.php file and I couldn’t modify it." +msgstr "Errore: WP_CACHE non é attivo nel tuo file wp-config.php ed il plugin non é in grado di modificarlo." + +#: wp-cache.php:1317 +#, php-format +msgid "Edit %s and add the following line:
    define('WP_CACHE', true);
    Otherwise, WP-Cache will not be executed by Wordpress core. " +msgstr "Modifica %s aggiungendo la seguente linea:
    define('WP_CACHE', true);
    Diversamente, WP-Cache non verrà eseguito dal core di Wordpress. " + +#: wp-cache.php:1320 +msgid "

    WP_CACHE constant added to wp-config.php

    If you continue to see this warning message please see point 5 of the FAQ. The WP_CACHE line must be moved up." +msgstr "

    La costante WP_CACHE é stata aggiunta al file wp-config.php

    Nel caso in cui continuassi a visualizzare questo messaggio consulta il punto 5 delle FAQ. La riga WP_CACHE deve essere spostata." + +#: wp-cache.php:1341 +msgid "Cache Contents" +msgstr "Contenuti cache" + +#: wp-cache.php:1360 +#, php-format +msgid "Deleting supercache file: %s
    " +msgstr "Sto cancellando il file supercache: %s
    " + +#: wp-cache.php:1377 +#, php-format +msgid "Deleting wp-cache file: %s
    " +msgstr "Sto cancellando il file wp-cache: %s
    " + +#: wp-cache.php:1441 +msgid "WP-Cache" +msgstr "WP-Cache" + +#: wp-cache.php:1442 +#: wp-cache.php:1455 +#, php-format +msgid "%s Cached Pages" +msgstr "%s pagine nella cache" + +#: wp-cache.php:1443 +#: wp-cache.php:1457 +#, php-format +msgid "%s Expired Pages" +msgstr "%s pagine scadute" + +#: wp-cache.php:1454 +msgid "WP-Super-Cache" +msgstr "WP-Super-Cache" + +#: wp-cache.php:1462 +msgid "Fresh WP-Cached Files" +msgstr "Aggiorna file WP-Cached" + +#: wp-cache.php:1463 +#: wp-cache.php:1479 +#: wp-cache.php:1495 +#: wp-cache.php:1511 +msgid "URI" +msgstr "URI" + +#: wp-cache.php:1463 +#: wp-cache.php:1479 +msgid "Key" +msgstr "Chiave" + +#: wp-cache.php:1463 +#: wp-cache.php:1479 +#: wp-cache.php:1495 +#: wp-cache.php:1511 +msgid "Age" +msgstr "Età" + +#: wp-cache.php:1463 +#: wp-cache.php:1479 +#: wp-cache.php:1495 +#: wp-cache.php:1511 +msgid "Delete" +msgstr "Cancella" + +#: wp-cache.php:1478 +msgid "Stale WP-Cached Files" +msgstr "Ordina i file WP-Cached" + +#: wp-cache.php:1494 +msgid "Fresh Super Cached Files" +msgstr "Aggiorna file Super Cached" + +#: wp-cache.php:1510 +msgid "Stale Super Cached Files" +msgstr "Scadenza file Super Cached" + +#: wp-cache.php:1526 +msgid "Hide file list" +msgstr "Nascondi la lista dei file" + +#: wp-cache.php:1528 +msgid "List all cached files" +msgstr "Lista di tutti i file presenti nella cache" + +#: wp-cache.php:1534 +#, php-format +msgid "Garbage Collection
    Last GC was %s minutes ago
    " +msgstr "Garbage Collection
    L'ultima GC é stata effettuata %s minuti fa
    " + +#: wp-cache.php:1535 +#, php-format +msgid "Next GC in %s minutes" +msgstr "La prossima GC verrà effettuata tra %s minuti" + +#: wp-cache.php:1538 +#, php-format +msgid "Expired files are files older than %s seconds. They are still used by the plugin and are deleted periodically." +msgstr "I file scaduti sono file più vecchi di %s secondi. Sebbene questi file vengano comunque utilizzati dal plugin sappi che sono cancellati periodicamente." + +#: wp-cache.php:1541 +msgid "Delete Expired" +msgstr "Cancella la cache scaduta" + +#: wp-cache.php:1547 +#: wp-cache.php:1561 +#: wp-cache.php:1717 +msgid "Delete Cache" +msgstr "Cancella la cache" + +#: wp-cache.php:1561 +msgid "Delete Super Cache cached files (opens in new window)" +msgstr "Cancella i file cache di Super Cache (apre in una nuova finestra)" + +#: wp-cache.php:1693 +#, php-format +msgid "%1$s is Digg proof thanks to caching by %2$s" +msgstr "%1$s é a prova di Digg grazie alla cache fornita da %2$s" + +#: wp-cache.php:1726 +#, php-format +msgid "WP Super Cache must be configured. Go to the admin page to enable and configure the plugin." +msgstr "E' necessario configurare WP Super Cache. Vai alla pagina di amministrazione per attivare e configurare il plugin." + +#: wp-cache.php:1732 +msgid "Settings" +msgstr "Impostazioni" + +#: wp-cache.php:1742 +#, php-format +msgid "WP Super Cache is disabled. Please go to the plugin admin page to enable caching." +msgstr "WP Super Cache non é attivo. Vai alla pagina di amministrazione del plugin per attivare la funzione di caching." + +#: wp-cache.php:1761 +#, php-format +msgid "[%s] Front page is gzipped! Please clear cache!" +msgstr "[%s] La front page é stata gzipped! Svuota la cache!" + +#: wp-cache.php:1761 +#, php-format +msgid "Please visit %s to clear the cache as the front page of your site is now downloading!" +msgstr "Visita %s per svuotare la cache!" + +#: wp-cache.php:1764 +#, php-format +msgid "[%s] Front page is gzipped! Cache Cleared!" +msgstr "[%s] La front page é stata gzipped! La cache é stata svuotata!" + +#: wp-cache.php:1764 +#, php-format +msgid "The cache on your blog has been cleared because the front page of your site is now downloading. Please visit %s to verify the cache has been cleared." +msgstr "La cache del blog é stata svuotata perché la front page del tuo sito é sotto downloading. Visita %1$s per controllare se la cache sia stata svuotata." + +#: wp-cache.php:1771 +#, php-format +msgid "[%s] Front page is not correct! Please clear cache!" +msgstr "[%s] La front page non é corretta! Svuota la cache!" + +#: wp-cache.php:1771 +#, php-format +msgid "Please visit %1$s to clear the cache as the front page of your site is not correct and missing the text, \"%2$s\"!" +msgstr "Visita %1$s per svuotare la cache nel caso in cui la front page del tuo sito non fosse corretta e mancasse del testo, \"%2$s\"!" + +#: wp-cache.php:1774 +#, php-format +msgid "[%s] Front page is not correct! Cache Cleared!" +msgstr "[%s] La front page non é corretta! La cache é stata svuotata!" + +#: wp-cache.php:1774 +#, php-format +msgid "The cache on your blog has been cleared because the front page of your site is missing the text \"%2$s\". Please visit %1$s to verify the cache has been cleared." +msgstr "La cache del blog é stata svuotata perché manca il testo \"%2$s\" nella front page del tuo sito. Visita %1$s per controllare se la cache sia stata svuotata." + +#: wp-cache.php:1779 +#, php-format +msgid "[%s] Front page check!" +msgstr "[%s] Controllo Front page!" + +#: wp-cache.php:1779 +#, php-format +msgid "WP Super Cache has checked the front page of your blog. Please visit %s if you would like to disable this." +msgstr "WP Super Cache ha controllato la front page del tuo blog. Visita %s qualora gradissi disattivare la funzione." + diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/wp-super-cache/plugins/badbehaviour.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/wp-super-cache/plugins/badbehaviour.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,75 @@ +'; + wp_nonce_field('wp-cache'); + if( $cache_badbehaviour == 0 ) { + $bb_status = __( 'disabled', 'wp-super-cache' ); + } else { + $bb_status = __( 'enabled', 'wp-super-cache' ); + wp_super_cache_disable(); + } + echo '' . sprintf( __( 'Bad Behaviour support is %s', 'wp-super-cache' ), $bb_status ); + echo '.'; + printf( __( '(Only half-on caching supported, disabled compression and requires Bad Behavior in "%s/plugins/bad-behavior/") ', 'wp-super-cache' ), WP_CONTENT_DIR ); + if( $cache_badbehaviour == 0 ) { + echo ''; + } else { + echo ''; + } + echo "\n"; + if( $err ) + echo "

    " . __( 'Warning!', 'wp-super-cache' ) . " $err

    "; + +} +add_cacheaction( 'cache_admin_page', 'wp_supercache_badbehaviour_admin' ); + +?> diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/wp-super-cache/plugins/searchengine.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/wp-super-cache/plugins/searchengine.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,83 @@ +'; + wp_nonce_field('wp-cache'); + if( $cache_no_adverts_for_friends == 'no' ) { + $status = __( 'disabled', 'wp-super-cache' ); + } else { + $status = __( 'enabled', 'wp-super-cache' ); + } + echo '' . sprintf( __( 'No Adverts for Friends plugin is %s', 'wp-super-cache' ), $status ); + echo '. ' . __( '(requires friendsadverts.php too) ', 'wp-super-cache' ); + if( $cache_no_adverts_for_friends == 'no' ) { + echo ''; + } else { + echo ''; + } + echo "\n"; + +} +add_cacheaction( 'cache_admin_page', 'wp_supercache_searchengine_admin' ); + +?> diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/wp-super-cache/readme.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/wp-super-cache/readme.txt Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,307 @@ +=== WP Super Cache === +Contributors: donncha +Tags: performance,caching,wp-cache,wp-super-cache,cache +Tested up to: 2.8.6 +Stable tag: 0.9.8 +Requires at least: 2.6 +Donate link: http://ocaoimh.ie/gad/ + +A very fast caching engine for WordPress that produces static html files. + +== Description == +This plugin generates static html files from your dynamic WordPress blog. After a html file is generated your webserver will serve that file instead of processing the comparatively heavier and more expensive WordPress PHP scripts. + +The static html files will be served to the vast majority of your users, but because a user's details are displayed in the comment form after they leave a comment those requests are handled by PHP. Static files are served to: + +1. Users who are not logged in. +2. Users who have not left a comment on your blog. +3. Or users who have not viewed a password protected post. + +99% of your visitors will be served static html files. Those users who don't see the static files will still benefit because they will see regular WP-Cache cached files and your server won't be as busy as before. This plugin will help your server cope with a front page appearance on digg.com or other social networking site. + +If for some reason "supercaching" doesn't work on your server then don't worry. Caching will still be performed, but every request will require loading the PHP engine. In normal circumstances this isn't bad at all. Visitors to your site will notice no slowdown or difference. Supercache really comes into it's own if your server is underpowered, or you're experiencing heavy traffic. +Super Cached html files will be served more quickly than PHP generated cached files but in every day use, the difference isn't noticeable. + +See the [WP Super Cache homepage](http://ocaoimh.ie/wp-super-cache/) for further information. + +The [changelog](http://svn.wp-plugins.org/wp-super-cache/trunk/Changelog.txt) is a good place to start if you want to know what has changed since you last downloaded the plugin. + +== Changelog == + += 0.9.8 = +* Added Spanish translation by Omi. +* Added Italian translation by Gianni Diurno. +* Addded advanced debug code to check front page for category problem. Enable by setting $wp_super_cache_advanced_debug to 1 in the config file. +* Fixed wordpress vs wordpress_logged_in cookie mismatch in cookie checking function. +* Correctly check if WP_CACHE is set or not. PHP is weird. +* Added wp_cache_clear_cache() to clear out cache directory. +* Only show logged in message when debugging enabled. +* Added troubleshooting point 20. PHP vs Apache user. +* Fixed problem deleting cache file. +* Don't delete cache files when moderated comments are deleted. + + += 0.9.7 = +* Fixed problem with blogs in folders. +* Added cache file listing and delete links to admin page. +* Added "Newest Cached Pages" listing in sidebox. +* Made admin page translatable. +* Added "How do I make certain parts of the page stay dynamic?" to FAQ. +* Advanced: added "late init" feature so that plugin activates on "init". Set $wp_super_cache_late_init to true in config file to use. +* Disable supercaching when GET parameters present instead of disabling all caching. Disable on POST (as normal) and preview. +* Fixed problem with cron job and mutex filename. +* Warn users they must enable mobile device support if rewrite rules detected. Better detection of when to warn that .htaccess rules must be updated (no need when rewrite rules not present) +* Advanced: Added "wpsupercache_404" filter. Return true to cache 404 error pages. +* Use the wordpress_test_cookie in the cache key. +* Show correct number of cache files when compression off. +* Fixed problem with PHP safe_mode detection. +* Various bugfixes and documentation updates. See Changelog.txt + + += 0.9.6.1 = +* Move "not logged in" message init below check for POST. +* Add is_admin() check so plugin definitely can't cache the backend. +* Add "do not cache" page type to admin page. + += 0.9.6 = +* Add uninstall.php uninstall script. +* Updated cache/.htaccess rules (option to upgrade that) +* Added FAQ about category and static homepage problem. +* Add wp_cache_user_agent_is_rejected() back to wp-cache-phase2.php +* Show message for logged in users when caching disable for them. +* Check filemtime on correct supercache file + += 0.9.5 = +* Show next and last GC times in minutes, not local time. +* Don't serve wp_cache cache files to rejected user agents. Supercache files are still served to them. +* If enabled, mobile support now serves php cached files to mobile clients and static cached files to everyone else. +* Added checks for "WPSC_DISABLE_COMPRESSION" and "WPSC_DISABLE_LOCKING" constants to disable compression and file locking. For hosting companies primarily. +* Added check for DONOTCACHEPAGE constant to avoid caching a page. +* Use PHP_DOCUMENT_ROOT when creating .htaccess if necessary. + += 0.9.4.3 = +1. Added "Don't cache for logged in users" option. +2. Display file size stats on admin page. +3. Clear the cache when profile page is updated. +4. Don't cache post previews. +5. Added backslashes to rejected URI regex list. +6. Fixed problems with posts and comments not refreshing. + +== Installation == +1. You should have the Apache mod mime and mod rewrite modules installed and WordPress fancy permalinks enabled. PHP safe mode should be disabled. If any of those are missing or off you can still use the slower WP-Cache part of the plugin. +2. If you have WP-Cache installed already, please disable it. Edit wp-config.php and make sure the WP_CACHE define is deleted, and remove the files wp-content/wp-cache-config.php and wp-content/advanced-cache.php. These will be recreated when you install this plugin. +3. Upload this directory to your plugins directory. It will create a 'wp-content/plugins/wp-super-cache/' directory. +4. If you are using WordPress MU you will need to install this in 'wp-content/mu-plugins/wp-super-cache/' and the file wp-cache.php must be copied into the mu-plugins directory. +5. WordPress users should go to their Plugins page and activate "WP Super Cache". +6. Now go to Settings->WP Super Cache and enable caching. If you see an error message or a blank screen you may need to fix it. See the "FAQ" section later in this readme for instructions. +7. mod_rewrite rules will be inserted into your .htaccess file. Look in your web root directory for this file. It should look similar to this: + + `-----------------.htaccess-----------------` + `RewriteEngine On` + `RewriteBase /` + + `RewriteCond %{REQUEST_METHOD} !=POST` + `RewriteCond %{QUERY_STRING} !.*=.*` + `RewriteCond %{HTTP_COOKIE} !^.*(comment_author_|wordpress|wp-postpass_).*$` + `RewriteCond %{HTTP:Accept-Encoding} gzip` + `RewriteCond %{HTTP_user_agent} !^.*(2.0\ MMP|240x320|AvantGo|BlackBerry|Blazer|Cellphone|Danger|DoCoMo|Elaine/3.0|EudoraWeb|hiptop|IEMobile|iPhone|iPod|KYOCERA/WX310K|LG/U990|MIDP-2.0|MMEF20|MOT-V|NetFront|Newt|Nintendo\ Wii|Nitro|Nokia|Opera\ Mini|Palm|Playstation\ Portable|portalmmm|Proxinet|ProxiNet|SHARP-TQ-GX10|Small|SonyEricsson|Symbian\ OS|SymbianOS|TS21i-10|UP.Browser|UP.Link|Windows\ CE|WinWAP).*` + `RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz -f` + `RewriteRule ^(.*) /wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz [L]` + + `RewriteCond %{REQUEST_METHOD} !=POST` + `RewriteCond %{QUERY_STRING} !.*=.*` + `RewriteCond %{QUERY_STRING} !.*attachment_id=.*` + `RewriteCond %{HTTP_COOKIE} !^.*(comment_author_|wordpress|wp-postpass_).*$` + `RewriteCond %{HTTP_user_agent} !^.*(2.0\ MMP|240x320|AvantGo|BlackBerry|Blazer|Cellphone|Danger|DoCoMo|Elaine/3.0|EudoraWeb|hiptop|IEMobile|iPhone|iPod|KYOCERA/WX310K|LG/U990|MIDP-2.0|MMEF20|MOT-V|NetFront|Newt|Nintendo\ Wii|Nitro|Nokia|Opera\ Mini|Palm|Playstation\ Portable|portalmmm|Proxinet|ProxiNet|SHARP-TQ-GX10|Small|SonyEricsson|Symbian\ OS|SymbianOS|TS21i-10|UP.Browser|UP.Link|Windows\ CE|WinWAP).*` + `RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html -f` + `RewriteRule ^(.*) /wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html [L]` + + `RewriteCond %{REQUEST_FILENAME} !-f` + `RewriteCond %{REQUEST_FILENAME} !-d` + `RewriteRule . /index.php [L]` + `-----------------.htaccess-----------------` +8. After you have enabled the plugin, look for the file "wp-content/cache/.htaccess". If it's not there you must create it. It should read: + + `# BEGIN supercache` + `` + ` ` + ` ForceType text/html` + ` FileETag None` + ` ` + ` AddEncoding gzip .gz` + ` AddType text/html .gz` + `` + `` + ` SetEnvIfNoCase Request_URI \.gz$ no-gzip` + `` + `` + ` Header set Cache-Control 'max-age=300, must-revalidate'` + `` + `` + ` ExpiresActive On` + ` ExpiresByType text/html A300` + `` + `` + `# END supercache` +9. Apache must be configured to allow the modules above. If you receive a "500 internal error" when serving requests to anonymous users you need to dig into your Apache configuration. This configuration in my virtual host works for me: + + `` + `AllowOverride All` + `` +10. wp-content/advanced-cache.php loads the caching engine. This file is generated by the plugin. Make sure the path in the include_once() is correct. + +== How to uninstall WP Super Cache == + +Edit the file uninstall.php in your plugins/wp-super-cache/ directory and set +UNINSTALL_WPSUPERCACHE to a non blank value. + + `define( 'UNINSTALL_WPSUPERCACHE', '1' );` + +Open your browser and load wp-content/plugins/wp-super-cache/uninstall.php directly. +You must be logged in, and you must confirm the action. If you do not delete the plugin +immediately, after the script runs, please comment out the define() above to stop +someone else running it. + +To manually uninstall: + +1. Remove the WP_CACHE define from wp-config.php. It looks like `define( 'WP_CACHE', true );` +2. Clear the cache in the backend page and then deactivate the plugin on the plugins page. +3. Remove the Super Cache mod_rewrite rules from your .htaccess file. +4. Remove the files wp-content/advanced-cache.php and wp-content/wp-cache-config.php +5. Remove the directory wp-content/cache/ +6. Remove the directory wp-super-cache from your plugins directory. + +== If all else fails and your site is broken == +1. Remove the WP_CACHE define from wp-config.php. It looks like `define( 'WP_CACHE', true );` +2. Remove the rules (see above) that the plugin wrote to the .htaccess file in your root directory. +3. Delete the wp-super-cache folder in the plugins folder. +4. Optionally delete advanced-cache.php, wp-cache-config.php and the cache folder in wp-content/. + +== Frequently Asked Questions == + += How do I know my blog is being cached? = + +View the source of any page on your site. When a page is first created, you'll see the text "Dynamic page generated in XXXX seconds." and "Cached page generated by WP-Super-Cache on YYYY-MM-DD HH:MM:SS" at the end of the source code. On reload, a cached page will show the same timestamp so wait a few seconds before checking. +In "HALF-ON" mode, if you have compression enabled, the text "Compression = gzip" will be added. If compression is disabled and the page is served as a static html file, the text "super cache" will be added. The only other way to check if your cached file was served by PHP script or from the static cache is by looking at the HTTP headers. WP-Cache (PHP) cached pages will have the header "WP-Super-Cache: WP-Cache". I used the Live HTTP Headers extension for Firefox to examine the headers. You should also check your cache directory in wp-content/cache/supercache/hostname/ for static cache files. + += Why is WP-Super-Cache better than WP-Cache? = + +This plugin is based on the excellent WP-Cache plugin and therefore brings all the benefits of that plugin to WordPress. On top of that it creates copies of every page that is accessed on a blog in a form that is quickly served by the web server. It's almost as quick as if the you had saved a page in your browser and uploaded it to replace your homepage. + += Will comments and other dynamic parts of my blog update immediately? = + +Comments will show as soon as they are moderated, depending on the comment policy of the blog owner. Other dynamic elements on a page may not update unless they are written in Javascript, Flash, Java or another client side browser language. The plugin really produces static html pages. No PHP is executed when those pages are served. "Popularity Contest" is one such plugin that will not work. Plugins that show different content for mobile users will probaby not work either. + += Will the Super Cache compression slow down my server? = + +No, it will do the opposite in fact. Super Cache files are compressed and stored that way so the heavy compression is done only once. These files are generally much smaller and are sent to a visitor's browser much more quickly than uncompressed html. As a result, your server spends less time talking over the network which saves CPU time and bandwidth, and can also serve the next request much more quickly. + += How do I make certain parts of the page stay dynamic? = + +WP Super Cache retains the dynamic loading code of WP Cache but only works in "half on" mode. + +There are two ways to do this, you can have functions that stay dynamic or you can include other files on every page load. To have a dynamic function in the cached PHP page use this syntax around the function: + +` + +` + +The HTML comments around the mirrored PHP allow it to be executed in the static page. To include another file try this: + +` + +` + +That will include file.php under the ABSPATH directory, which is the same as where your wp-config.php file is located. + += Why doesn't WP UserOnline, Popularity Contest, WP Postratings or plugin X not work or update on my blog now? = + +This plugin caches entire pages but some plugins think they can run PHP code every time a page loads. To fix this, the plugin needs to use Javascript/AJAX methods or the mfunc/mclude code described in the previous answer to update or display dynamic information. + += Why doesn't the plugin cache requests by search engine bots by default? = + +Those bots usually only visit each page once and if the page is not popular there's no point creating a cache file that will sit idle on your server. + += Why shouldn't I create a cache file of every page on my site? = + +Like the previous question, there's no point caching pages that won't be visited. The large number of cache files will slow down the garbage collection system as it attempts to check each file. It also causes problems for hosting companies. In the event of a disk failure on your server it may take much longer to check the files. Remember how long a scandisk or a fsck took on a large drive? + += A category page is showing instead of my homepage = + +A tiny proportion of websites will have problems with the following configuration: + +1. Uses a static page for the front page. +2. Uses /%category%/%postname%/ permalink structure. + +Sometimes a category page is cached as the homepage of the site instead of the static page. I can't [replicate the problem](http://wordpress.org/support/topic/237415/page/2?replies=38) but a simple solution is to switch the plugin to half-on mode. For normal traffic you will see no difference in the speed of your site. + += Why do I get warnings about caching from http://ismyblogworking.com/ = + +"Your blog doesn't support client caching (no 304 response to If-modified-since)." +"Your feed doesn't support caching (no 304 response to If-modified-since)" + +Supercache doesn't support 304 header checks. This is caching done by your browser, not your server. It is a check your browser does to ask the server if an updated version of the current page is available. If not, it doesn't download the old version again. +The page is still cached by your server, just not by the browsers of your visitors. WordPress doesn't support 304 caching either so you're not losing out. +Try the Cacheability Engine at http://www.ircache.net/cgi-bin/cacheability.py or http://redbot.org/ for further analysis. + += Troubleshooting = + +If things don't work when you installed the plugin here are a few things to check: + +1. Is wp-content writable by the web server? +2. Is there a wp-content/wp-cache-config.php ? If not, copy the file wp-super-cache/wp-cache-config-sample.php to wp-content/wp-cache-config.php and make sure WPCACHEHOME points at the right place. "plugins" should be "mu-plugins" if you're using WordPress MU. +3. Is there a wp-content/advanced-cache.php ? If not, then you must copy wp-super-cache/advanced-cache.php into wp-content/. You must edit the file and change the path so it points at the wp-super-cache folder. +4. If pages are not cached at all, remove wp-content/advanced-cache.php and recreate it, following the advice above. +5. Make sure the following line is in wp-config.php and it is ABOVE the "require_once(ABSPATH.'wp-settings.php');" line: + + `define( 'WP_CACHE', true );` +6. Try the Settings->WP Super Cache page again and enable cache. +7. Look in wp-content/cache/supercache/. Are there directories and files there? +8. Anything in your php error_log? +9. If your browser keeps asking you to save the file after the super cache is installed you must disable Super Cache compression. Go to the Settings->WP Super Cache page and disable it there. +10. The plugin does not work very well when PHP's safe mode is active. This must be disabled by your administrator. +11. If pages are randomly super cached and sometimes not, your blog can probably be viewed with and without the "www" prefix on the URL. You should choose one way and install the [Enforce www preference](http://txfx.net/code/wordpress/enforce-www-preference/) plugin if you are using an old WordPress install. The latest versions redirect themselves (you should always be running the latest version of WordPress anyway!) +12. Private Server users at Dreamhost should edit wp-content/wp-cache-config.php and set the cache dir to "/tmp/" if they are getting errors about increasing CPU usage. See this [discussion](http://wordpress.org/support/topic/145895?replies=42) for more. +13. File locking errors such as "failed to acquire key 0x152b: Permission denied in..." or "Page not cached by WP Super Cache. Could not get mutex lock." are a sign that you may have to use file locking. Edit wp-content/wp-cache-config.php and uncomment "$use_flock = true" or set $sem_id to a different value. You can also disable file locking from the Admin screen as a last resort. +14. Make sure cache/wp_cache_mutex.lock is writeable by the web server. +15. The cache folder cannot be put on an NFS or Samba or NAS share. It has to be on a local disk. File locking and deleting expired files will not work properly unless the cache folder is on the local machine. +16. Garbage collection of old cache files won't work if WordPress can't find wp-cron.php. If your hostname resolves to 127.0.0.1 it could be preventing the garbage collection from working. Check your access_logs for wp-cron.php entries. Do they return a 404 (file not found) or 200 code? If it's 404 or you don't see wp-cron.php anywhere WordPress may be looking for that script in the wrong place. You should speak to your server administator to correct this or edit /etc/hosts on Unix servers and remove the following line. Your hostname must resolve to the external IP address other servers on the network/Internet use. See http://yoast.com/wp-cron-issues/ for more. + + `127.0.0.1 myhostname.com` +A line like "127.0.0.1 localhost localhost.localdomain" is ok. +17. If old pages are being served to your visitors via the supercache, you may be missing Apache modules (or their equivalents if you don't use Apache). 3 modules are required: mod_mime, mod_headers and mod_expires. The last two are especially important for making sure browsers load new versions of existing pages on your site. +18. The error message, "WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed!" appears at the end of every page. Open the file wp-content/advanced-cache.php in your favourite editor. Is the path to wp-cache-phase1.php correct? If it is not the caching engine will not load. +19. Caching doesn't work. The timestamp on my blog keeps changing when I reload. Check that the path in your .htaccess rules matches where the supercache directory is. You may have to hardcode it. Or use the plugin in Half-On mode. +20. If supercache cache files are generated but not served, check the permissions on all your wp-content/cache/supercache folders (and each of wp-content cache and supercache folders) and wp-content/cache/.htaccess. If your PHP runs as a different user to Apache and permissions are strict Apache may not be able to read the PHP generated cache files. To fix you must add the following line to your wp-config.php (Add it above the WP_CACHE define.) Then clear your cache. + + `umask( 0022 );` + +== Custom Caching == +It is now possible to hook into the caching process using the add_cacheaction() function. + +Three hooks are available: + +1. 'wp_cache_get_cookies_values' - modify the key used by WP Cache. +2. 'add_cacheaction' - runs in phase2. Allows a plugin to add WordPress hooks. +3. 'cache_admin_page' - runs in the admin page. Use it to modify that page, perhaps by adding new configuration options. + +There is one regular WordPress filter too. Use the "do_createsupercache" filter +to customize the checks made before caching. The filter accepts one parameter. +The output of WP-Cache's wp_cache_get_cookies_values() function. + +See plugins/searchengine.php as an example I use for my [No Adverts for Friends](plugin at http://ocaoimh.ie/no-adverts-for-friends/) + +== Links == +[WP Widget Cache](http://wordpress.org/extend/plugins/wp-widget-cache/) is another caching plugin for WordPress. This plugin caches the output of widgets and may significantly speed up dynamic page generation times. + +== Updates == +Updates to the plugin will be posted here, to [Holy Shmoly!](http://ocaoimh.ie/) and the [WP Super Cache homepage](http://ocaoimh.ie/wp-super-cache/) will always link to the newest version. + +== Thanks == +I would sincerely like to thank [John Pozadzides](http://onemansblog.com/) for giving me the idea for this, for writing the "How it works" section and for testing the plugin through 2 front page appearances on digg.com + +Thanks to James Farmer and Andrew Billits of [Edu Blogs](http://edublogs.org/) fame who helped me make this more WordPress MU friendly. + +Translators who did a great job converting the text of the plugin to their native language. Thank you! +[Gianni Diurno](http://gidibao.net/) (Italian) +[Omi](http://equipajedemano.info/) (Spanish) diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/wp-super-cache/uninstall.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/wp-super-cache/uninstall.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,88 @@ + + +WP Super Cache Uninstall Script + + + +

    This script will uninstall the files and directories created by WP Super Cache.

    +DONE

    "; + } + + if ( in_array( 'wp-super-cache/wp-cache.php', get_option( 'active_plugins' ) ) ) + wp_die( 'WP Super Cache is still active. Please disable it on your plugins page first.' ); + echo "Removing " . WP_CONTENT_DIR . "/cache/ :"; + uninstall_supercache( WP_CONTENT_DIR . '/cache' ); + echo " DONE
    "; + echo "Removing " . WP_CONTENT_DIR . "/advanced-cache.php :"; + @unlink( WP_CONTENT_DIR . "/advanced-cache.php" ); + echo " DONE
    "; + echo "Removing " . WP_CONTENT_DIR . "/wp-cache-config.php :"; + @unlink( WP_CONTENT_DIR . "/wp-cache-config.php" ); + echo " DONE
    "; + echo "

    Make sure you remove the following line from " . ABSPATH . "wp-config.php too.

    "; + echo "
    define('WP_CACHE', true);
    "; + echo "

    Please comment out the UNINSTALL_WPSUPERCACHE define() in this file!

    "; + wp_mail( $current_user->user_email, 'WP Super Cache Uninstalled', '' ); +} else { + ?> +
    +

    Click UNINSTALL to delete the following files and directories: +

      +
    1. +
    2. +
    3. +
    + + +
    + + + diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/wp-super-cache/wp-cache-base.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/wp-super-cache/wp-cache-base.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,13 @@ + diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/wp-super-cache/wp-cache-config-sample.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/wp-super-cache/wp-cache-config-sample.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,79 @@ +\'\"\r\n\t\(\)]/', '', str_replace( '..', '', $_SERVER['REQUEST_URI'] ) ); + if( strpos( $request_uri, '/', 1 ) ) { + if( $base == '/' ) { + $blogcacheid = substr( $request_uri, 1, strpos( $request_uri, '/', 1 ) - 1 ); + } else { + $blogcacheid = str_replace( $base, '', $request_uri ); + $blogcacheid = substr( $blogcacheid, 0, strpos( $blogcacheid, '/', 1 ) ); + } + if ( '/' == substr($blogcacheid, -1)) + $blogcacheid = substr($blogcacheid, 0, -1); + } + $blogcacheid = str_replace( '/', '', $blogcacheid ); + } +} + +// Array of files that have 'wp-' but should still be cached +$cache_acceptable_files = array( 'wp-comments-popup.php', 'wp-links-opml.php', 'wp-locations.php' ); + +$cache_rejected_uri = array('wp-.*\\.php', 'index\\.php'); +$cache_rejected_user_agent = array ( 0 => 'bot', 1 => 'ia_archive', 2 => 'slurp', 3 => 'crawl', 4 => 'spider', 5 => 'Yandex' ); + +$cache_rebuild_files = 1; + + +// Disable the file locking system. +// If you are experiencing problems with clearing or creating cache files +// uncommenting this may help. +$wp_cache_mutex_disabled = 1; + +// Just modify it if you have conflicts with semaphores +$sem_id = 5419; + +if ( '/' != substr($cache_path, -1)) { + $cache_path .= '/'; +} + +$wp_cache_mobile = 0; +$wp_cache_mobile_whitelist = 'Stand Alone/QNws'; +$wp_cache_mobile_browsers = 'Android, 2.0 MMP, 240x320, AvantGo, BlackBerry, Blazer, Cellphone, Danger, DoCoMo, Elaine/3.0, EudoraWeb, hiptop, IEMobile, iPhone, iPod, KYOCERA/WX310K, LG/U990, MIDP-2.0, MMEF20, MOT-V, NetFront, Newt, Nintendo Wii, Nitro, Nokia, Opera Mini, Palm, Playstation Portable, portalmmm, Proxinet, ProxiNet, SHARP-TQ-GX10, Small, SonyEricsson, Symbian OS, SymbianOS, TS21i-10, UP.Browser, UP.Link, Windows CE, WinWAP'; + +// gzip the first page generated for clients that support it. +$wp_cache_gzip_first = 0; +// change to relocate the supercache plugins directory +$wp_cache_plugins_dir = WPCACHEHOME . 'plugins'; +// set to 1 to do garbage collection during normal process shutdown instead of wp-cron +$wp_cache_shutdown_gc = 0; +$wp_super_cache_late_init = 0; + +// uncomment the next line to enable advanced debugging features +//$wp_super_cache_advanced_debug = 1; +$wp_super_cache_front_page_check = 0; +$wp_super_cache_front_page_clear = 0; +$wp_super_cache_front_page_text = ''; +?> diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/wp-super-cache/wp-cache-phase1.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/wp-super-cache/wp-cache-phase1.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,269 @@ + $header) { + // godaddy fix, via http://blog.gneu.org/2008/05/wp-supercache-on-godaddy/ and http://www.littleredrails.com/blog/2007/09/08/using-wp-cache-on-godaddy-500-error/ + if( strpos( $header, 'Last-Modified:' ) === false ) + header($header); + } + header( 'WP-Super-Cache: WP-Cache' ); + if ( $meta[ 'dynamic' ] ) { + if ( isset( $wp_super_cache_debug ) && $wp_super_cache_debug ) wp_cache_debug( "Serving wp-cache dynamic file", 5 ); + include($cache_file); + } else { + if ( isset( $wp_super_cache_debug ) && $wp_super_cache_debug ) wp_cache_debug( "Serving wp-cache static file", 5 ); + readfile( $cache_file ); + } + if ( isset( $wp_super_cache_debug ) && $wp_super_cache_debug ) wp_cache_debug( "exit request", 5 ); + die(); + } else { + if ( isset( $wp_super_cache_debug ) && $wp_super_cache_debug ) wp_cache_debug( "No wp-cache file exists. Must generate a new one.", 5 ); + } +} + +if(defined('DOING_CRON')) { + extract( wp_super_cache_init() ); + return true; +} + +if ( !isset( $wp_super_cache_late_init ) || ( isset( $wp_super_cache_late_init ) && false == $wp_super_cache_late_init ) ) { + wp_cache_serve_cache_file(); +} + +function wp_cache_postload() { + global $cache_enabled, $wp_super_cache_late_init, $wp_super_cache_debug; + + if ( !$cache_enabled || isset( $_GET[ 'preview' ] ) ) + return true; + + if ( isset( $wp_super_cache_late_init ) && true == $wp_super_cache_late_init ) { + if ( isset( $wp_super_cache_debug ) && $wp_super_cache_debug ) wp_cache_debug( "Supercache Late Init: add wp_cache_serve_cache_file to init", 3 ); + add_action( 'init', 'wp_cache_late_loader', 9999 ); + } else { + wp_super_cache_init(); + wp_cache_phase2(); + } +} + +function wp_cache_late_loader() { + global $wp_super_cache_debug; + if ( isset( $wp_super_cache_debug ) && $wp_super_cache_debug ) wp_cache_debug( "Supercache Late Loader running on init", 3 ); + wp_cache_serve_cache_file(); + wp_cache_phase2(); +} + +function wp_cache_get_cookies_values() { + $string = ''; + while ($key = key($_COOKIE)) { + if ( preg_match( "/^wp-postpass|^wordpress|^comment_author_/", $key ) ) { + if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( "Cookie detected: $key", 5 ); + $string .= $_COOKIE[ $key ] . ","; + } + next($_COOKIE); + } + reset($_COOKIE); + + // If you use this hook, make sure you update your .htaccess rules with the same conditions + $string = do_cacheaction( 'wp_cache_get_cookies_values', $string ); + return $string; +} + +function add_cacheaction( $action, $func ) { + global $wp_supercache_actions; + $wp_supercache_actions[ $action ][] = $func; +} + +function do_cacheaction( $action, $value = '' ) { + global $wp_supercache_actions; + if( is_array( $wp_supercache_actions[ $action ] ) ) { + $actions = $wp_supercache_actions[ $action ]; + foreach( $actions as $func ) { + $value = $func( $value ); + } + } + + return $value; +} + +// From http://wordpress.org/extend/plugins/wordpress-mobile-edition/ by Alex King +function wp_cache_check_mobile( $cache_key ) { + global $wp_cache_mobile_enabled, $wp_cache_mobile_browsers, $wp_cache_mobile_whitelist; + if( !isset( $wp_cache_mobile_enabled ) || false == $wp_cache_mobile_enabled ) + return $cache_key; + + if (!isset($_SERVER["HTTP_USER_AGENT"])) { + return $cache_key; + } + $whitelist = explode( ',', $wp_cache_mobile_whitelist ); + foreach ($whitelist as $browser) { + if (strstr($_SERVER["HTTP_USER_AGENT"], trim($browser))) { + if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( "whitelst mobile browser detected: " . $_SERVER[ "HTTP_USER_AGENT" ], 5 ); + return $cache_key; + } + } + + $browsers = explode( ',', $wp_cache_mobile_browsers ); + foreach ($browsers as $browser) { + if (strstr($_SERVER["HTTP_USER_AGENT"], trim( $browser ))) { + if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( "mobile browser detected: " . $_SERVER[ "HTTP_USER_AGENT" ], 5 ); + return $cache_key . $browser; + } + } + return $cache_key; +} + +function wp_cache_debug( $message, $level = 1 ) { + global $wp_cache_debug_level, $wp_cache_debug_log, $wp_cache_debug_email, $cache_path, $wp_cache_debug_ip, $wp_super_cache_debug; + + if ( isset( $wp_super_cache_debug ) && $wp_super_cache_debug == false ) + return false; + + if ( isset( $wp_cache_debug_email ) == false && isset( $wp_cache_debug_log ) == false ) + return false; + + if ( isset( $wp_cache_debug_level ) == false ) + $wp_cache_debug_level = 1; + if ( $wp_cache_debug_level < $level ) + return false; + + if ( isset( $wp_cache_debug_ip ) && $wp_cache_debug_ip != '' && $wp_cache_debug_ip != $_SERVER[ 'REMOTE_ADDR' ] ) + return false; + + if ( isset( $wp_cache_debug_log ) && $wp_cache_debug_log != '' ) { + error_log( date( 'H:i:s' ) . " " . $_SERVER[ 'REQUEST_URI' ] . " " . $message . "\n", 3, $cache_path . str_replace( '/', '', str_replace( '..', '', $wp_cache_debug_log ) ) ); + } + + if ( isset( $wp_cache_debug_email ) && $wp_cache_debug_email != '' ) { + $message .= "\n\nDisable these emails by commenting out or deleting the line containing\n\$wp_cache_debug_email in wp-content/wp-cache-config.php on your server.\n"; + mail( $wp_cache_debug_email, '[' . addslashes( $_SERVER[ 'HTTP_HOST' ] ) . "] WP Super Cache Debug", $message ); + } +} + +function wp_cache_user_agent_is_rejected() { + global $cache_rejected_user_agent; + + if (!function_exists('apache_request_headers')) return false; + $headers = apache_request_headers(); + if (!isset($headers["User-Agent"])) return false; + foreach ($cache_rejected_user_agent as $expr) { + if (strlen($expr) > 0 && stristr($headers["User-Agent"], $expr)) + return true; + } + return false; +} + +?> diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/wp-super-cache/wp-cache-phase2.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/wp-super-cache/wp-cache-phase2.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,881 @@ +'; +} + +if ( !function_exists( 'wp_cache_user_agent_is_rejected' ) ) { + function wp_cache_user_agent_is_rejected() { + global $cache_rejected_user_agent; + + if (!function_exists('apache_request_headers')) return false; + $headers = apache_request_headers(); + if (!isset($headers["User-Agent"])) return false; + foreach ($cache_rejected_user_agent as $expr) { + if (strlen($expr) > 0 && stristr($headers["User-Agent"], $expr)) + return true; + } + return false; + } +} + +function wp_cache_get_response_headers() { + if(function_exists('apache_response_headers')) { + flush(); + $headers = apache_response_headers(); + } else if(function_exists('headers_list')) { + $headers = array(); + foreach(headers_list() as $hdr) { + list($header_name, $header_value) = explode(': ', $hdr, 2); + $headers[$header_name] = $header_value; + } + } else + $headers = null; + + return $headers; +} + +function wp_cache_is_rejected($uri) { + global $cache_rejected_uri; + + $auto_rejected = array( '/wp-admin/', 'xmlrpc.php', 'wp-app.php' ); + foreach( $auto_rejected as $u ) { + if( strstr( $uri, $u ) ) + return true; // we don't allow caching of wp-admin for security reasons + } + foreach ($cache_rejected_uri as $expr) { + if( $expr != '' && preg_match( "~$expr~", $uri ) ) + return true; + } + return false; +} + +function wp_cache_mutex_init() { + global $use_flock, $mutex, $cache_path, $mutex_filename, $sem_id, $blog_cache_dir, $wp_cache_mutex_disabled; + + if( isset( $wp_cache_mutex_disabled ) && $wp_cache_mutex_disabled ) + return true; + + if(!is_bool($use_flock)) { + if(function_exists('sem_get')) + $use_flock = false; + else + $use_flock = true; + } + + $mutex = false; + if ($use_flock) { + if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( "Created mutex lock on filename: {$blog_cache_dir}{$mutex_filename}", 5 ); + $mutex = @fopen($blog_cache_dir . $mutex_filename, 'w'); + } else { + if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( "Created mutex lock on semaphore: $sem_id", 5 ); + $mutex = @sem_get($sem_id, 1, 0644 | IPC_CREAT, 1); + } +} + +function wp_cache_writers_entry() { + global $use_flock, $mutex, $cache_path, $mutex_filename, $wp_cache_mutex_disabled; + + if( isset( $wp_cache_mutex_disabled ) && $wp_cache_mutex_disabled ) + return true; + + if( !$mutex ) { + if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( "(writers entry) mutex lock not created. not caching.", 2 ); + return false; + } + + if ($use_flock) { + if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( "grabbing lock using flock()", 5 ); + flock($mutex, LOCK_EX); + } else { + if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( "grabbing lock using sem_acquire()", 5 ); + sem_acquire($mutex); + } + + return true; +} + +function wp_cache_writers_exit() { + global $use_flock, $mutex, $cache_path, $mutex_filename, $wp_cache_mutex_disabled; + + if( isset( $wp_cache_mutex_disabled ) && $wp_cache_mutex_disabled ) + return true; + + if( !$mutex ) { + if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( "(writers exit) mutex lock not created. not caching.", 2 ); + return false; + } + + if ($use_flock) { + if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( "releasing lock using flock()", 5 ); + flock($mutex, LOCK_UN); + } else { + if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( "releasing lock using sem_release()", 5 ); + sem_release($mutex); + } +} + +function get_current_url_supercache_dir() { + global $cached_direct_pages, $cache_path, $wp_cache_request_uri; + $uri = preg_replace('/[ <>\'\"\r\n\t\(\)]/', '', str_replace( '/index.php', '/', str_replace( '..', '', preg_replace("/(\?.*)?$/", '', $wp_cache_request_uri ) ) ) ); + $uri = str_replace( '\\', '', $uri ); + $dir = strtolower(preg_replace('/:.*$/', '', $_SERVER["HTTP_HOST"])) . $uri; // To avoid XSS attacks + $dir = apply_filters( 'supercache_dir', $dir ); + $dir = trailingslashit( $cache_path . 'supercache/' . $dir ); + if( is_array( $cached_direct_pages ) && in_array( $_SERVER[ 'REQUEST_URI' ], $cached_direct_pages ) ) { + $dir = trailingslashit( ABSPATH . $uri ); + } + $dir = str_replace( '//', '/', $dir ); + if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( "supercache dir: $dir", 5 ); + return $dir; +} + +function wp_cache_ob_callback( $buffer ) { + global $wp_cache_pages; + if( defined( 'DONOTCACHEPAGE' ) ) + return $buffer; + if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( 'Output buffer callback', 4 ); + + if ( isset( $wp_cache_pages[ 'single' ] ) && $wp_cache_pages[ 'single' ] == 1 && is_single() ) { + return $buffer; + } elseif ( isset( $wp_cache_pages[ 'pages' ] ) && $wp_cache_pages[ 'pages' ] == 1 && is_page() ) { + return $buffer; + } elseif ( isset( $wp_cache_pages[ 'archives' ] ) && $wp_cache_pages[ 'archives' ] == 1 && is_archive() ) { + return $buffer; + } elseif ( isset( $wp_cache_pages[ 'tag' ] ) && $wp_cache_pages[ 'tag' ] == 1 && is_tag() ) { + return $buffer; + } elseif ( isset( $wp_cache_pages[ 'category' ] ) && $wp_cache_pages[ 'category' ] == 1 && is_category() ) { + return $buffer; + } elseif ( isset( $wp_cache_pages[ 'frontpage' ] ) && $wp_cache_pages[ 'frontpage' ] == 1 && is_front_page() ) { + return $buffer; + } elseif ( isset( $wp_cache_pages[ 'home' ] ) && $wp_cache_pages[ 'home' ] == 1 && is_home() ) { + return $buffer; + } elseif ( isset( $wp_cache_pages[ 'search' ] ) && $wp_cache_pages[ 'search' ] == 1 && is_search() ) { + return $buffer; + } elseif ( isset( $wp_cache_pages[ 'feed' ] ) && $wp_cache_pages[ 'feed' ] == 1 && is_feed() ) { + return $buffer; + } + $buffer = &wp_cache_get_ob( $buffer ); + wp_cache_shutdown_callback(); + return $buffer; +} + + +function wp_cache_get_ob(&$buffer) { + global $cache_path, $cache_filename, $meta_file, $wp_start_time, $supercachedir; + global $new_cache, $wp_cache_meta, $file_expired, $blog_id, $cache_compression; + global $wp_cache_gzip_encoding, $super_cache_enabled, $cached_direct_pages; + global $wp_cache_404, $gzsize, $supercacheonly, $wp_cache_gzip_first, $wp_cache_gmt_offset; + global $blog_cache_dir, $wp_cache_request_uri, $wp_supercache_cache_list; + + $new_cache = true; + $wp_cache_meta = ''; + + /* Mode paranoic, check for closing tags + * we avoid caching incomplete files */ + if ( $buffer == '' ) { + $new_cache = false; + if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) { + wp_cache_debug( "Buffer is blank. Output buffer may have been corrupted by another plugin or this is a redirected URL. Look for text 'ob_start' in the files of your plugins directory.", 2 ); + $buffer .= "\n\n"; + } + } + + if ( $wp_cache_404 && false == apply_filters( 'wpsupercache_404', false ) ) { + $new_cache = false; + if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) { + wp_cache_debug( "404 file not found not cached", 2 ); + $buffer .= "\n\n"; + } + } + + if (!preg_match('/(<\/html>|<\/rss>|<\/feed>)/i',$buffer) ) { + $new_cache = false; + if( false === strpos( $_SERVER[ 'REQUEST_URI' ], 'robots.txt' ) ) { + if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) { + wp_cache_debug( "No closing html tag. Not caching.", 2 ); + $buffer .= "\n\n"; + } + } else { + if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( "robots.txt detected. Not caching.", 2 ); + } + } + + if( !$new_cache ) + return $buffer; + + $duration = wp_cache_microtime_diff($wp_start_time, microtime()); + $duration = sprintf("%0.3f", $duration); + $buffer .= "\n\n"; + + if( !wp_cache_writers_entry() ) { + $buffer .= "\n\n"; + if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( "Could not get mutex lock. Not caching.", 1 ); + return $buffer; + } + + $dir = get_current_url_supercache_dir(); + $supercachedir = $cache_path . 'supercache/' . preg_replace('/:.*$/', '', $_SERVER["HTTP_HOST"]); + if( !empty( $_GET ) || is_feed() || ( $super_cache_enabled == true && is_dir( substr( $supercachedir, 0, -1 ) . '.disabled' ) ) ) { + if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( "Supercache disabled: GET or feed detected or disabled by config.", 2 ); + $super_cache_enabled = false; + } + + $tmp_wpcache_filename = $cache_path . uniqid( mt_rand(), true ) . '.tmp'; + + // Don't create wp-cache files for anon users + $supercacheonly = false; + if( $super_cache_enabled && wp_cache_get_cookies_values() == '' ) { + if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( "Anonymous user detected. Only creating Supercache file.", 3 ); + $supercacheonly = true; + } + + if( !$supercacheonly ) { + if ( !@file_exists( $blog_cache_dir . $cache_filename ) || ( @file_exists( $blog_cache_dir . $cache_filename ) && ( time() - @filemtime( $blog_cache_dir . $cache_filename ) ) > 5 ) ) { + $fr = @fopen($tmp_wpcache_filename, 'w'); + if (!$fr) { + if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( "Error. Supercache could not write to " . str_replace( ABSPATH, '', $cache_path ) . $cache_filename, 1 ); + $buffer .= "\n"; + return $buffer; + } + } + } + if( $super_cache_enabled ) { + $user_info = wp_cache_get_cookies_values(); + $do_cache = apply_filters( 'do_createsupercache', $user_info ); + if( $user_info == '' || $do_cache === true ) { + + if( @is_dir( $dir ) == false ) + @wp_mkdir_p( $dir ); + + $cache_fname = "{$dir}index.html"; + $tmp_cache_filename = $dir . uniqid( mt_rand(), true ) . '.tmp'; + if ( !@file_exists( $cache_fname ) || ( @file_exists( $cache_fname ) && ( time() - @filemtime( $cache_fname ) ) > 5 ) ) { + $fr2 = @fopen( $tmp_cache_filename, 'w' ); + if (!$fr2) { + if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( "Error. Supercache could not write to " . str_replace( ABSPATH, '', $tmp_cache_filename ), 1 ); + $buffer .= "\n"; + @fclose( $fr ); + @unlink( $tmp_wpcache_filename ); + return $buffer; + } elseif( $cache_compression ) { + $gz = @fopen( $tmp_cache_filename . ".gz", 'w'); + if (!$gz) { + if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( "Error. Supercache could not write to " . str_replace( ABSPATH, '', $tmp_cache_filename ) . ".gz", 1 ); + $buffer .= "\n"; + @fclose( $fr ); + @unlink( $tmp_wpcache_filename ); + @fclose( $fr2 ); + @unlink( $tmp_cache_filename ); + return $buffer; + } + } + } + } + } + + if (preg_match('/(.*?)|is', + "\n\n", $buffer); + $store = preg_replace('|(.*?)|is', + "\n\n", $store); + $store = apply_filters( 'wpsupercache_buffer', $store ); + $wp_cache_meta[ 'dynamic' ] = true; + /* Clean function calls in tag */ + $buffer = preg_replace('||is', '', $buffer); + $buffer = preg_replace('||is', '', $buffer); + if( $fr ) + fputs($fr, $store); + if( $fr2 ) + fputs($fr2, $store . '' ); + if( $gz ) + fputs($gz, gzencode( $store . '', 1, FORCE_GZIP ) ); + } else { + $buffer = apply_filters( 'wpsupercache_buffer', $buffer ); + $buffer .= "\n"; + + if( $gz || $wp_cache_gzip_encoding ) { + if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( "Gzipping buffer.", 5 ); + $gzdata = gzencode( $buffer . "", 3, FORCE_GZIP ); + $gzsize = strlen($gzdata); + } + if ($wp_cache_gzip_encoding) { + $wp_cache_meta[ 'headers' ][ 'Content-Encoding' ] = 'Content-Encoding: ' . $wp_cache_gzip_encoding; + $wp_cache_meta[ 'headers' ][ 'Vary' ] = 'Vary: Accept-Encoding, Cookie'; + // Return uncompressed data & store compressed for later use + if( $fr ) { + if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( "Writing gzipped buffer to wp-cache cache file.", 5 ); + fputs($fr, $gzdata); + } + } else { // no compression + $wp_cache_meta[ 'headers' ][ 'Vary' ] = 'Vary: Cookie'; + if( $fr ) { + if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( "Writing non-gzipped buffer to wp-cache cache file.", 5 ); + fputs($fr, $buffer); + } + } + if( $fr2 ) { + if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( "Writing non-gzipped buffer to supercache file.", 5 ); + fputs($fr2, $buffer . '' ); + } + if( $gz ) { + if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( "Writing gzipped buffer to supercache file.", 5 ); + fwrite($gz, $gzdata ); + } + $buffer .= $log; + } + $new_cache = true; + $added_cache = 0; + if( $fr ) { + $supercacheonly = false; + fclose($fr); + if( !rename( $tmp_wpcache_filename, $blog_cache_dir . $cache_filename ) ) { + unlink( $blog_cache_dir . $cache_filename ); + rename( $tmp_wpcache_filename, $blog_cache_dir . $cache_filename ); + } + if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( "Renamed temp wp-cache file to {$blog_cache_dir}$cache_filename", 5 ); + $added_cache = 1; + } + if( $fr2 ) { + fclose($fr2); + if( !@rename( $tmp_cache_filename, $cache_fname ) ) { + @unlink( $cache_fname ); + @rename( $tmp_cache_filename, $cache_fname ); + } + if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( "Renamed temp supercache file to $cache_fname", 5 ); + $added_cache = 1; + } + if( $gz ) { + fclose($gz); + if( !@rename( $tmp_cache_filename . '.gz', $cache_fname . '.gz' ) ) { + @unlink( $cache_fname . '.gz' ); + @rename( $tmp_cache_filename . '.gz', $cache_fname . '.gz' ); + } + if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( "Renamed temp supercache gz file to {$cache_fname}.gz", 5 ); + $added_cache = 1; + } + if ( $added_cache && isset( $wp_supercache_cache_list ) && $wp_supercache_cache_list ) { + update_option( 'wpsupercache_count', ( get_option( 'wpsupercache_count' ) + 1 ) ); + $last_urls = (array)get_option( 'supercache_last_cached' ); + if ( count( $last_urls ) >= 10 ) + $last_urls = array_slice( $last_urls, 1, 9 ); + $last_urls[] = array( 'url' => $_SERVER[ 'REQUEST_URI' ], 'date' => date( 'Y-m-d H:i:s' ) ); + update_option( 'supercache_last_cached', $last_urls ); + } + wp_cache_writers_exit(); + if ( !headers_sent() && isset( $wp_cache_gzip_first ) && 1 == $wp_cache_gzip_first && $wp_cache_gzip_encoding && $gzdata) { + if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( "Writing gzip content headers. Sending buffer to browser", 5 ); + header( 'Content-Encoding: ' . $wp_cache_gzip_encoding ); + header( 'Vary: Accept-Encoding, Cookie' ); + header( 'Content-Length: ' . $gzsize ); + return $gzdata; + } else { + if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( "Sending buffer to browser", 5 ); + return $buffer; + } +} + +function wp_cache_phase2_clean_cache($file_prefix) { + global $cache_path, $blog_cache_dir; + + if( !wp_cache_writers_entry() ) + return false; + if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( "Cleaning cache in $blog_cache_dir", 3 ); + if ( ( $handle = @opendir( $blog_cache_dir ) ) ) { + while ( false !== ($file = @readdir($handle))) { + if ( preg_match("/^$file_prefix/", $file) ) + @unlink( $blog_cache_dir . $file ); + } + closedir($handle); + } + wp_cache_writers_exit(); +} + +function prune_super_cache( $directory, $force = false, $rename = false ) { + global $cache_max_time, $cache_path, $super_cache_enabled, $cache_rebuild_files, $blog_cache_dir; + + if( !is_admin() && $super_cache_enabled == 0 ) + return false; + + if( !isset( $cache_max_time ) ) + $cache_max_time = 3600; + + $now = time(); + + $protected_directories = array( $cache_path . '.htaccess', $cache_path . $blog_cache_dir . 'meta', $cache_path . 'supercache' ); + + $oktodelete = false; + if (is_dir($directory)) { + if( $dh = @opendir( $directory ) ) { + $directory = trailingslashit( $directory ); + while( ( $entry = @readdir( $dh ) ) !== false ) { + if ($entry == '.' || $entry == '..') + continue; + $entry = $directory . $entry; + prune_super_cache( $entry, $force, $rename ); + // If entry is a directory, AND it's not a protected one, AND we're either forcing the delete, OR the file is out of date, + if( is_dir( $entry ) && !in_array( $entry, $protected_directories ) && ( $force || @filemtime( $entry ) + $cache_max_time <= $now ) ) { + // if the directory isn't empty can't delete it + if( $handle = @opendir( $entry ) ) { + $donotdelete = false; + while( !$donotdelete && ( $file = @readdir( $handle ) ) !== false ) { + if ($file == '.' || $file == '..') + continue; + $donotdelete = true; + } + closedir($handle); + } + if( $donotdelete ) + continue; + if( !$rename ) { + @rmdir( $entry ); + if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( "gc: deleted $entry", 2 ); + } + } + } + closedir($dh); + } + } elseif( is_file($directory) && ($force || @filemtime( $directory ) + $cache_max_time <= $now ) ) { + $oktodelete = true; + if( in_array( $directory, $protected_directories ) ) + $oktodelete = false; + if( $oktodelete && !$rename ) { + @unlink( $directory ); + } elseif( $oktodelete && $rename ) { + wp_cache_rebuild_or_delete( $directory ); + } + } +} + +function wp_cache_rebuild_or_delete( $file ) { + global $cache_rebuild_files; + if( strpos( $file, '?' ) !== false ) + $file = substr( $file, 0, strpos( $file, '?' ) ); + if( $cache_rebuild_files && substr( $file, -14 ) != '.needs-rebuild' ) { + if( @rename($file, $file . '.needs-rebuild') ) { + @touch( $file . '.needs-rebuild' ); + if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( "rebuild_or_gc: rename to {$file}.needs-rebuild", 2 ); + } else { + @unlink( $file ); + if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( "rebuild_or_gc: deleted $file", 2 ); + } + } else { + @unlink( $file ); + if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( "rebuild_or_gc: deleted $file", 2 ); + } +} + +function wp_cache_phase2_clean_expired($file_prefix) { + global $cache_path, $cache_max_time, $blog_cache_dir; + + clearstatcache(); + if( !wp_cache_writers_entry() ) + return false; + $now = time(); + if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( "Cleaning expired cache files in $blog_cache_dir", 2 ); + if ( ( $handle = @opendir( $blog_cache_dir ) ) ) { + while ( false !== ($file = readdir($handle))) { + if ( preg_match("/^$file_prefix/", $file) && + (@filemtime( $blog_cache_dir . $file) + $cache_max_time) <= $now ) { + @unlink( $blog_cache_dir . $file ); + @unlink( $blog_cache_dir . 'meta/' . str_replace( '.html', '.meta', $file ) ); + if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( "Deleting $blog_cache_dir{$file} (plus meta)", 5 ); + continue; + } + if($file != '.' && $file != '..') { + if( is_dir( $blog_cache_dir . $file ) == false && (@filemtime($blog_cache_dir . $file) + $cache_max_time) <= $now ) { + if( substr( $file, -9 ) != '.htaccess' ) { + @unlink($blog_cache_dir . $file); + if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( "Deleting $blog_cache_dir{$file}", 5 ); + } + } + } + } + closedir($handle); + if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( "Doing GC on supercache dir: {$cache_path}supercache", 2 ); + prune_super_cache( $cache_path . 'supercache' ); + } + + wp_cache_writers_exit(); + return true; +} + +function wp_cache_shutdown_callback() { + global $cache_path, $cache_max_time, $file_expired, $file_prefix, $meta_file, $new_cache, $wp_cache_meta, $known_headers, $blog_id, $wp_cache_gzip_encoding, $gzsize, $cache_filename, $supercacheonly, $blog_cache_dir; + global $wp_cache_blog_charset, $wp_cache_request_uri, $wp_cache_key; + + $wp_cache_meta[ 'uri' ] = $_SERVER["SERVER_NAME"].preg_replace('/[ <>\'\"\r\n\t\(\)]/', '', $wp_cache_request_uri); // To avoid XSS attacks + $wp_cache_meta[ 'blog_id' ] = $blog_id; + $wp_cache_meta[ 'post' ] = wp_cache_post_id(); + $wp_cache_meta[ 'key' ] = $wp_cache_key; + $wp_cache_meta = apply_filters( 'wp_cache_meta', $wp_cache_meta ); + + $response = wp_cache_get_response_headers(); + foreach ($known_headers as $key) { + if(isset($response[$key])) { + $wp_cache_meta[ 'headers' ][ $key ] = "$key: " . $response[$key]; + } + } + if (!isset( $response['Last-Modified'] )) { + $value = gmdate('D, d M Y H:i:s') . ' GMT'; + /* Dont send this the first time */ + /* @header('Last-Modified: ' . $value); */ + $wp_cache_meta[ 'headers' ][ 'Last-Modified' ] = "Last-Modified: $value"; + } + if (!$response['Content-Type'] && !$response['Content-type']) { + // On some systems, headers set by PHP can't be fetched from + // the output buffer. This is a last ditch effort to set the + // correct Content-Type header for feeds, if we didn't see + // it in the response headers already. -- dougal + if (is_feed()) { + $type = get_query_var('feed'); + $type = str_replace('/','',$type); + switch ($type) { + case 'atom': + $value = "application/atom+xml"; + break; + case 'rdf': + $value = "application/rdf+xml"; + break; + case 'rss': + case 'rss2': + default: + $value = "application/rss+xml"; + } + } else { // not a feed + $value = get_option( 'html_type' ); + if( $value == '' ) + $value = 'text/html'; + } + $value .= "; charset=\"" . $wp_cache_blog_charset . "\""; + + if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( "Sending 'Content-Type: $value' header.", 2 ); + @header("Content-Type: $value"); + $wp_cache_meta[ 'headers' ][ 'Content-Type' ] = "Content-Type: $value"; + } + + if ( ! $supercacheonly && $new_cache ) { + if( $wp_cache_gzip_encoding && !in_array( 'Content-Encoding: ' . $wp_cache_gzip_encoding, $wp_cache_meta[ 'headers' ] ) ) { + if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( "Sending gzip headers.", 2 ); + $wp_cache_meta[ 'headers' ][ 'Content-Encoding' ] = 'Content-Encoding: ' . $wp_cache_gzip_encoding; + $wp_cache_meta[ 'headers' ][ 'Vary' ] = 'Vary: Accept-Encoding, Cookie'; + } + + $serial = serialize($wp_cache_meta); + if( wp_cache_writers_entry() ) { + if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( "Writing meta file: {$blog_cache_dir}meta/{$meta_file}", 2 ); + $tmp_meta_filename = $blog_cache_dir . 'meta/' . uniqid( mt_rand(), true ) . '.tmp'; + $fr = @fopen( $tmp_meta_filename, 'w'); + if( !$fr ) + @mkdir( $blog_cache_dir . 'meta' ); + $fr = fopen( $tmp_meta_filename, 'w'); + fputs($fr, $serial); + fclose($fr); + @chmod( $tmp_meta_filename, 0666 & ~umask()); + if( !@rename( $tmp_meta_filename, $blog_cache_dir . 'meta/' . $meta_file ) ) { + unlink( $blog_cache_dir . 'meta/' . $meta_file ); + rename( $tmp_meta_filename, $blog_cache_dir . 'meta/' . $meta_file ); + } + wp_cache_writers_exit(); + } + } + global $time_to_gc_cache; + if( isset( $time_to_gc_cache ) && $time_to_gc_cache == 1 ) { + if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( "Executing wp_cache_gc action.", 3 ); + do_action( 'wp_cache_gc' ); + } +} + +function wp_cache_no_postid($id) { + return wp_cache_post_change(wp_cache_post_id()); +} + +function wp_cache_get_postid_from_comment( $comment_id, $status = 'NA' ) { + global $super_cache_enabled, $wp_cache_request_uri; + $comment = get_comment($comment_id, ARRAY_A); + if ( $status != 'NA' ) { + $comment[ 'old_comment_approved' ] = $comment[ 'comment_approved' ]; + $comment[ 'comment_approved' ] = $status; + } + $postid = $comment['comment_post_ID']; + // Do nothing if comment is not moderated + // http://ocaoimh.ie/2006/12/05/caching-wordpress-with-wp-cache-in-a-spam-filled-world + if ( !preg_match('/wp-admin\//', $wp_cache_request_uri) ) { + if ( $comment['comment_approved'] == 'delete' && ( isset( $comment[ 'old_comment_approved' ] ) && $comment[ 'old_comment_approved' ] == 0 ) ) { // do nothing if moderated comments are deleted + if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( "Moderated comment deleted. Don't delete any cache files.", 4 ); + return $postid; + } elseif ( $comment['comment_approved'] == 'spam' ) { + if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( "Spam comment. Don't delete any cache files.", 4 ); + return $postid; + } elseif( $comment['comment_approved'] == '0' ) { + if ( $comment[ 'content_type' ] == '' ) { + if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( "Moderated comment. Don't delete supercache file until comment approved.", 4 ); + $super_cache_enabled = 0; // don't remove the super cache static file until comment is approved + } else { + if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( "Moderated ping or trackback. Not deleting cache files..", 4 ); + return $postid; + } + } + } + // We must check it up again due to WP bugs calling two different actions + // for delete, for example both wp_set_comment_status and delete_comment + // are called when deleting a comment + if ($postid > 0) { + if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( "Post $postid changed. Update cache.", 4 ); + return wp_cache_post_change($postid); + } else { + if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( "Unknown post changed. Update cache.", 4 ); + return wp_cache_post_change(wp_cache_post_id()); + } +} + +/* Clear out the cache directory. */ +function wp_cache_clear_cache() { + global $cache_path; + prune_super_cache( $cache_path . 'supercache/', true ); + prune_super_cache( $cache_path, true ); +} + +function wp_cache_post_edit($post_id) { + global $wp_cache_clear_on_post_edit, $cache_path, $blog_cache_dir; + if( $wp_cache_clear_on_post_edit ) { + if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( "Clearing cache $blog_cache_dir and {$cache_path}supercache/ on post edit per config.", 2 ); + prune_super_cache( $blog_cache_dir, true ); + prune_super_cache( $cache_path . 'supercache/', true ); + } else { + if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( "Clearing cache for post $post_id on post edit.", 2 ); + wp_cache_post_change( $post_id ); + } +} + +function wp_cache_post_id_gc( $siteurl, $post_id ) { + global $cache_path; + + $post_id = intval( $post_id ); + if( $post_id == 0 ) + return; + + $permalink = trailingslashit( str_replace( get_option( 'home' ), '', post_permalink( $post_id ) ) ); + $dir = $cache_path . 'supercache/' . $siteurl; + if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( "wp_cache_post_id_gc clearing cache in $dir{$permalink}.", 4 ); + prune_super_cache( $dir . $permalink, true, true ); + @rmdir( $dir . $permalink ); + if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( "wp_cache_post_id_gc clearing cache in {$dir}page/.", 4 ); + prune_super_cache( $dir . 'page/', true ); +} + +function wp_cache_post_change($post_id) { + global $file_prefix, $cache_path, $blog_id, $super_cache_enabled, $blog_cache_dir, $blogcacheid; + static $last_processed = -1; + + if ($post_id == $last_processed) return $post_id; + $last_processed = $post_id; + if( !wp_cache_writers_entry() ) + return $post_id; + + $permalink = trailingslashit( str_replace( get_option( 'siteurl' ), '', post_permalink( $post_id ) ) ); + if( $super_cache_enabled ) { + $siteurl = trailingslashit( strtolower( preg_replace( '/:.*$/', '', str_replace( 'http://', '', get_option( 'home' ) ) ) ) ); + // make sure the front page has a rebuild file + if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( "Post change: deleting cache files in " . $cache_path . 'supercache/' . $siteurl, 4 ); + prune_super_cache( $cache_path . 'supercache/' . $siteurl . 'index.html', true, true ); + prune_super_cache( $cache_path . 'supercache/' . $siteurl . 'index.html.gz', true, true ); + wp_cache_post_id_gc( $siteurl, $post_id ); + if( get_option( 'show_on_front' ) == 'page' ) { + wp_cache_post_id_gc( $siteurl, get_option( 'page_on_front' ) ); + wp_cache_post_id_gc( $siteurl, get_option( 'page_for_posts' ) ); + } + } + + $matches = array(); + if ( ($handle = @opendir( $blog_cache_dir . 'meta/' )) ) { + while ( false !== ($file = readdir($handle))) { + if ( preg_match("/^({$file_prefix}{$blogcacheid}.*)\.meta/", $file, $matches) ) { + $meta_pathname = $blog_cache_dir . 'meta/' . $file; + $content_pathname = $blog_cache_dir . $matches[1] . ".html"; + $meta = unserialize(@file_get_contents($meta_pathname)); + if( false == is_array( $meta ) ) { + @unlink($meta_pathname); + @unlink($content_pathname); + continue; + } + if ($post_id > 0 && $meta) { + if ($meta[ 'blog_id' ] == $blog_id && (!$meta[ 'post' ] || $meta[ 'post' ] == $post_id) ) { + @unlink($meta_pathname); + @unlink($content_pathname); + @wp_cache_rebuild_or_delete($cache_path . 'supercache/' . trailingslashit( $meta[ 'uri' ] ) . 'index.html'); + @wp_cache_rebuild_or_delete($cache_path . 'supercache/' . trailingslashit( $meta[ 'uri' ] ) . 'index.html.gz'); + } + } elseif ($meta[ 'blog_id' ] == $blog_id) { + @unlink($meta_pathname); + @unlink($content_pathname); + @wp_cache_rebuild_or_delete($cache_path . 'supercache/' . trailingslashit( $meta[ 'uri' ] ) . 'index.html'); + @wp_cache_rebuild_or_delete($cache_path . 'supercache/' . trailingslashit( $meta[ 'uri' ] ) . 'index.html.gz'); + } + + } + } + closedir($handle); + } + wp_cache_writers_exit(); + return $post_id; +} + +function wp_cache_microtime_diff($a, $b) { + list($a_dec, $a_sec) = explode(' ', $a); + list($b_dec, $b_sec) = explode(' ', $b); + return $b_sec - $a_sec + $b_dec - $a_dec; +} + +function wp_cache_post_id() { + global $posts, $comment_post_ID, $post_ID; + // We try hard all options. More frequent first. + if ($post_ID > 0 ) return $post_ID; + if ($comment_post_ID > 0 ) return $comment_post_ID; + if (is_single() || is_page()) return $posts[0]->ID; + if (isset( $_GET[ 'p' ] ) && $_GET['p'] > 0) return $_GET['p']; + if (isset( $_POST[ 'p' ] ) && $_POST['p'] > 0) return $_POST['p']; + return 0; +} + +function wp_cache_gc_cron() { + global $file_prefix, $cache_max_time; + if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( 'Cache garbage collection.', 5 ); + + if( !isset( $cache_max_time ) ) + $cache_max_time = 600; + + $start = time(); + if( !wp_cache_phase2_clean_expired($file_prefix ) ) { + if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( 'Cache Expiry cron job failed. Probably mutex locked.', 1 ); + update_option( 'wpsupercache_gc_time', time() - ( $cache_max_time - 10 ) ); // if GC failed then run it again in one minute + } + if( time() - $start > 30 ) + if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( "Cache Expiry cron job took more than 30 seconds to execute.\nYou should reduce the Expiry Time in the WP Super Cache admin page\nas you probably have more cache files than your server can handle efficiently.", 1 ); +} + +?> diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/wp-super-cache/wp-cache.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/wp-super-cache/wp-cache.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,1792 @@ + + +'; + echo "

    " . __( 'WP Super Cache Manager', 'wp-super-cache' ) . "

    \n"; + if( 1 == ini_get( 'safe_mode' ) || "on" == strtolower( ini_get( 'safe_mode' ) ) ) { + ?>

    +

    "; + echo sprintf( __( 'You or an administrator may be able to make it work by changing the group owner of the plugin scripts to match that of the web server user. The group owner of the %s/cache/ directory must also be changed. See the safe mode manual page for further details.', 'wp-super-cache' ), WP_CONTENT_DIR ) . "

    "; + } else { + echo __( 'You or an administrator must disable this. See the safe mode manual page for further details. This cannot be disabled in a .htaccess file unfortunately. It must be done in the php.ini config file.', 'wp-super-cache' ) . "

    "; + } + } + + if ( isset( $wp_super_cache_front_page_check ) && $wp_super_cache_front_page_check == 1 && !wp_next_scheduled( 'wp_cache_check_site_hook' ) ) { + wp_schedule_single_event( time() + 360 , 'wp_cache_check_site_hook' ); + if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( 'scheduled wp_cache_check_site_hook for 360 seconds time.', 2 ); + } + + if(isset($_REQUEST['wp_restore_config']) && $valid_nonce) { + unlink($wp_cache_config_file); + echo '' . __( 'Configuration file changed, some values might be wrong. Load the page again from the "Settings" menu to reset them.', 'wp-super-cache' ) . ''; + } + + if ( !wp_cache_check_link() || + !wp_cache_verify_config_file() || + !wp_cache_verify_cache_dir() ) { + echo '

    ' . __( "Cannot continue... fix previous problems and retry.", 'wp-super-cache' ) . '

    '; + echo "
    \n"; + return; + } + + if (!wp_cache_check_global_config()) { + echo "
    \n"; + return; + } + if( $wp_cache_debug || !$wp_cache_cron_check ) { + if( function_exists( "wp_remote_get" ) == false ) { + $hostname = str_replace( 'http://', '', str_replace( 'https://', '', get_option( 'siteurl' ) ) ); + if( strpos( $hostname, '/' ) ) + $hostname = substr( $hostname, 0, strpos( $hostname, '/' ) ); + $ip = gethostbyname( $hostname ); + if( substr( $ip, 0, 3 ) == '127' || substr( $ip, 0, 7 ) == '192.168' ) { + ?>

    +
    +

    +

    Troubleshooting section of the readme.txt', 'wp-super-cache' ), 'http://wordpress.org/extend/plugins/wp-super-cache/faq/' ); ?>

    +
    + 0.01, 'blocking' => true)); + if( is_array( $cron ) ) { + if( $cron[ 'response' ][ 'code' ] == '404' ) { + ?>

    Warning! wp-cron.php not found!

    +
    +

    +

    Troubleshooting section of the readme.txt', 'wp-super-cache' ), 'http://wordpress.org/extend/plugins/wp-super-cache/faq/' ); ?>

    +
    +

    +

    +

    +

    chmod 755 /

    '; + ?> +
    +

    '; + ?> +
    +
    +
    +

    +

    +

    +

    + +

    + +

    +

    +

    " . __( 'Mobile rewrite rules detected', 'wp-super-cache' ) . "

    "; + echo "

    " . __( 'For best performance you should enable "Mobile device support" or delete the mobile rewrite rules in your .htaccess. Look for the 2 lines with the text "Android|2.0\ MMP|240x320|AvantGo|BlackBerry|Blazer|Cellphone" and delete those.', 'wp-super-cache' ) . "

    " . __( 'This will have no affect on ordinary users but mobile users will see uncached pages.', 'wp-super-cache' ) . "

    "; + } elseif ( $wp_cache_mobile_enabled && $scrules != '' && false === strpos( $scrules, '240x320|AvantGo|BlackBerry|Blazer|Cellphone|Danger|DoCoMo' ) ) { + ?> +

    +

    1. 1.
    2. +
    3. 2. # BEGIN WPSuperCache and # END WPSuperCache and let the plugin regenerate them by reloading this page.', 'wp-super-cache' ), $home_path ); ?>
    4. +
    5. 3. # BEGIN WPSuperCache and # END WPSuperCache. There are two sections that look very similar. Just below the line %{HTTP:Cookie} !^.*(comment_author_|wordpress|wp-postpass_).*$ add this line: (do it twice, once for each section)', 'wp-super-cache' ), $home_path ); ?>

      +
      RewriteCond %{HTTP_user_agent} !^.*(Android|2.0\ MMP|240x320|AvantGo|BlackBerry|Blazer|Cellphone|Danger|DoCoMo|Elaine/3.0|EudoraWeb|hiptop|IEMobile|iPhone|iPod|KYOCERA/WX310K|LG/U990|MIDP-2.0|MMEF20|MOT-V|NetFront|Newt|Nintendo\ Wii|Nitro|Nokia|Opera\ Mini|Palm|Playstation\ Portable|portalmmm|Proxinet|ProxiNet|SHARP-TQ-GX10|Small|SonyEricsson|Symbian\ OS|SymbianOS|TS21i-10|UP.Browser|UP.Link|Windows\ CE|WinWAP).*
    + +

    %s is writeable by the webserver so the files advanced-cache.php and cache-config.php can be deleted automatically. (Making sure those files are writeable too is probably a good idea!)', 'wp-super-cache' ), WP_CONTENT_DIR ); ?>

    +

    uninstall script to remove files and directories created by the plugin. (Please see readme.txt for instructions on uninstalling this script.)', 'wp-super-cache' ), WP_PLUGIN_URL ); ?>

    + "; + wp_nonce_field('wp-cache'); + ?> + + __( 'Required to serve compressed supercache files properly.', 'wp-super-cache' ), 'mod_headers' => __( 'Required to set caching information on supercache pages. IE7 users will see old pages without this module.', 'wp-super-cache' ), 'mod_expires' => __( 'Set the expiry date on supercached pages. Visitors may not see new pages when they refresh or leave comments without this module.', 'wp-super-cache' ) ); + foreach( $required_modules as $req => $desc ) { + if( !in_array( $req, $mods ) ) { + $missing_mods[ $req ] = $desc; + } + } + if( isset( $missing_mods) && is_array( $missing_mods ) ) { + echo "

    " . __( 'Missing Apache Modules', 'wp-super-cache' ) . "

    "; + echo "

    " . __( 'The following Apache modules are missing. The plugin will work in half-on mode without them. In full Supercache mode, your visitors may see corrupted pages or out of date content however.', 'wp-super-cache' ) . "

    "; + echo "
      "; + foreach( $missing_mods as $req => $desc ) { + echo "
    • $req - $desc
    • "; + } + echo "
    "; + } + } + ?> +
    +
    +
    +

    + +

    * by buying me an Amazon gift card! Make it out to "%3$s" for whatever amount you want. Every penny helps!', 'wp-super-cache' ), 'WP Super Cache', 'http://ocaoimh.ie/agc', 'donncha@ocaoimh.ie' ) ?>;

    +

    wishlist.', 'wp-super-cache' ), 'http://ocaoimh.ie/wish' ); ?>

    +


    Donncha
    + *

    +
    +
    + + + +
    +
    +

    ' />

    +
    + +

    WP Super Cache', 'Donncha O Caoimh' ); ?>

    +

    wishes he had more time to read and relax.', 'wp-super-cache' ), 'Holy Shmoly', 'In Photos.org', 'http://ocaoimh.ie/gad' ); ?>

    +

    Twitter' ); ?>

    + +

    %2$s', 'wp-super-cache' ), date( 'M j, Y', $start_date ), number_format( get_option( 'wpsupercache_count' ) ) ); ?>

    +

      + {$url[ 'url' ]}\n"; + } + ?>
    + +

    +
    + +
    +

    ' . __( 'Accepted Filenames & Rejected URIs', 'wp-super-cache' ) . '

    '; + wp_cache_edit_rejected_pages(); + echo "\n"; + wp_cache_edit_rejected(); + echo "\n"; + wp_cache_edit_accepted(); + echo '
    '; + + wp_cache_edit_rejected_ua(); + + wp_cache_debug_settings(); + + wp_lock_down(); + + wp_cache_restore(); + + ob_start(); + if( defined( 'WP_CACHE' ) ) { + if( function_exists( 'do_cacheaction' ) ) { + do_cacheaction( 'cache_admin_page' ); + } + } + $out = ob_get_contents(); + ob_end_clean(); + if( SUBMITDISABLED == ' ' && $out != '' ) { + echo '

    ' . __( 'Cache Plugins', 'wp-super-cache' ) . '

    '; + echo $out; + echo '
    '; + } + + echo "
    \n"; +} + +function wsc_mod_rewrite() { + global $cache_enabled, $super_cache_enabled, $cache_compression, $cache_compression_changed, $valid_nonce, $cache_path; + if( $super_cache_enabled == false && $cache_enabled == true ) { + ?>

    +

    HALF ON mode.', 'wp-super-cache' ); ?>

    + + +
    +

    +
    + + +

    +

    '; + wp_nonce_field('wp-cache'); + echo "\n"; + ?> + + +
    +

    \n"; + $rules .= "RewriteEngine On\n"; + $rules .= "RewriteBase $home_root\n"; // props Chris Messina + $charset = get_option('blog_charset') == '' ? 'UTF-8' : get_option('blog_charset'); + $rules .= "AddDefaultCharset {$charset}\n"; + $rules .= "CONDITION_RULES"; + $rules .= "RewriteCond %{HTTP:Accept-Encoding} gzip\n"; + $rules .= "RewriteCond {$apache_root}{$inst_root}cache/supercache/%{HTTP_HOST}{$home_root}$1/index.html.gz -f\n"; + $rules .= "RewriteRule ^(.*) {$inst_root}cache/supercache/%{HTTP_HOST}{$home_root}$1/index.html.gz [L]\n\n"; + + $rules .= "CONDITION_RULES"; + $rules .= "RewriteCond {$apache_root}{$inst_root}cache/supercache/%{HTTP_HOST}{$home_root}$1/index.html -f\n"; + $rules .= "RewriteRule ^(.*) {$inst_root}cache/supercache/%{HTTP_HOST}{$home_root}$1/index.html [L]\n"; + $rules .= "\n"; + $rules = apply_filters( 'supercacherewriterules', $rules ); + + $rules = str_replace( "CONDITION_RULES", implode( "\n", $condition_rules ) . "\n", $rules ); + + $dohtaccess = true; + if( function_exists( 'is_site_admin' ) ) { + echo "

    " . __( 'WordPress MU Detected', 'wp-super-cache' ) . "

    " . __( "Unfortunately the rewrite rules cannot be updated automatically when running WordPress MU. Please open your .htaccess and add the following mod_rewrite rules above any other rules in that file.", 'wp-super-cache' ) . "

    "; + } elseif( !$wprules || $wprules == '' ) { + echo "

    " . __( 'Mod Rewrite rules cannot be updated!', 'wp-super-cache' ) . "

    "; + echo "

    " . sprintf( __( "You must have BEGIN and END markers in %s.htaccess for the auto update to work. They look like this and surround the main WordPress mod_rewrite rules:", 'wp-super-cache' ), $home_path ); + echo "

    # BEGIN WordPress\n RewriteCond %{REQUEST_FILENAME} !-f\n RewriteCond %{REQUEST_FILENAME} !-d\n RewriteRule . /index.php [L]\n # END WordPress
    "; + _e( 'Refresh this page when you have updated your .htaccess file.', 'wp-super-cache' ); + echo "
    "; + return; + } elseif( strpos( $wprules, 'wordpressuser' ) ) { // Need to clear out old mod_rewrite rules + echo "

    " . __( 'Thank you for upgrading.', 'wp-super-cache' ) . " " . sprintf( __( 'The mod_rewrite rules changed since you last installed this plugin. Unfortunately you must remove the old supercache rules before the new ones are updated. Refresh this page when you have edited your .htaccess file. If you wish to manually upgrade, change the following line: %1$s so it looks like this: %2$s The only changes are "HTTP_COOKIE" becomes "HTTP:Cookie" and "wordpressuser" becomes "wordpress". This is a WordPress 2.5 change but it’s backwards compatible with older versions if you’re brave enough to use them.', 'wp-super-cache' ), '

    RewriteCond %{HTTP_COOKIE} !^.*wordpressuser.*$
    ', '
    RewriteCond %{HTTP:Cookie} !^.*wordpress.*$
    ' ) . "

    "; + echo "
    "; + return; + } elseif( $scrules != '' && strpos( $scrules, '%{REQUEST_URI} !^.*[^/]$' ) === false && substr( get_option( 'permalink_structure' ), -1 ) == '/' ) { // permalink structure has a trailing slash, need slash check in rules. + echo "

    " . __( 'Trailing slash check required.', 'wp-super-cache' ) . "

    " . __( 'It looks like your blog has URLs that end with a "/". Unfortunately since you installed this plugin a duplicate content bug has been found where URLs not ending in a "/" end serve the same content as those with the "/" and do not redirect to the proper URL. To fix, you must edit your .htaccess file and add these two rules to the two groups of Super Cache rules:', 'wp-super-cache' ) . "

    "; + echo "
    RewriteCond %{REQUEST_URI} !^.*[^/]$RewriteCond %{REQUEST_URI} !^.*//.*$
    "; + echo "

    " . __( 'You can see where the rules go and examine the complete rules by clicking the "View mod_rewrite rules" link below.', 'wp-super-cache' ) . "

    "; + $dohtaccess = false; + } elseif( strpos( $scrules, 'supercache' ) || strpos( $wprules, 'supercache' ) ) { // only write the rules once + $dohtaccess = false; + } + // cache/.htaccess rules + $gziprules = "\n \n ForceType text/html\n FileETag None\n \n AddEncoding gzip .gz\n AddType text/html .gz\n\n"; + $gziprules .= "\n SetEnvIfNoCase Request_URI \.gz$ no-gzip\n\n"; + $gziprules .= "\n Header set Vary \"Accept-Encoding, Cookie\"\n Header set Cache-Control 'max-age=300, must-revalidate'\n\n"; + $gziprules .= "\n ExpiresActive On\n ExpiresByType text/html A300\n\n"; + if( $dohtaccess && !$_POST[ 'updatehtaccess' ] ) { + if( !is_writeable_ACLSafe( $home_path . ".htaccess" ) ) { + echo "

    " . __( 'Cannot update .htaccess', 'wp-super-cache' ) . "

    " . sprintf( __( 'The file %s.htaccess cannot be modified by the web server. Please correct this using the chmod command or your ftp client.', 'wp-super-cache' ), $home_path ) . "

    " . __( 'Refresh this page when the file permissions have been modified.' ) . "

    " . sprintf( __( 'Alternatively, you can edit your %s.htaccess file manually and add the following code (before any WordPress rules):', 'wp-super-cache' ), $home_path ) . "

    "; + echo "

    # BEGIN WPSuperCache\n" . wp_specialchars( $rules ) . "# END WPSuperCache

    "; + } else { + echo "

    " . sprintf( __( 'To serve static html files your server must have the correct mod_rewrite rules added to a file called %s.htaccess', 'wp-super-cache' ), $home_path ) . " "; + if( !function_exists( 'is_site_admin' ) ) { + _e( "You must edit the file yourself add the following rules.", 'wp-super-cache' ); + } else { + _e( "You can edit the file yourself add the following rules.", 'wp-super-cache' ); + } + echo __( " Make sure they appear before any existing WordPress rules. ", 'wp-super-cache' ) . "

    "; + echo "
    # BEGIN WPSuperCache\n" . wp_specialchars( $rules ) . "# END WPSuperCache

    "; + echo "

    " . sprintf( __( 'Rules must be added to %s too:', 'wp-super-cache' ), WP_CONTENT_DIR . "/cache/.htaccess" ) . "

    "; + echo "
    # BEGIN supercache\n" . wp_specialchars( $gziprules ) . "# END supercache

    "; + if( !function_exists( 'is_site_admin' ) ) { + echo '
    '; + echo ''; + echo '
    '; + wp_nonce_field('wp-cache'); + echo "
    \n"; + } + } + } elseif( $dohtaccess && $valid_nonce && $_POST[ 'updatehtaccess' ] ) { + wpsc_remove_marker( $home_path.'.htaccess', 'WordPress' ); // remove original WP rules so SuperCache rules go on top + echo "
    "; + if( insert_with_markers( $home_path.'.htaccess', 'WPSuperCache', explode( "\n", $rules ) ) && insert_with_markers( $home_path.'.htaccess', 'WordPress', explode( "\n", $wprules ) ) ) { + echo "

    " . __( 'Mod Rewrite rules updated!', 'wp-super-cache' ) . "

    "; + echo "

    " . sprintf( __( '%s.htaccess has been updated with the necessary mod_rewrite rules. Please verify they are correct. They should look like this:', 'wp-super-cache' ), $home_path ) . "

    \n"; + } else { + echo "

    " . __( 'Mod Rewrite rules must be updated!', 'wp-super-cache' ) . "

    "; + echo "

    " . sprintf( __( 'Your %s.htaccess is not writable by the webserver and must be updated with the necessary mod_rewrite rules. The new rules go above the regular WordPress rules as shown in the code below:', 'wp-super-cache' ), $home_path ) . "

    \n"; + } + echo "

    " . wp_specialchars( $rules ) . "

    \n
    "; + } else { + ?> +

    Click the following link to see the lines added to that file. If you have upgraded the plugin make sure these rules match.', 'wp-super-cache' ), $home_path ); ?>

    + +

    + " . sprintf( __( 'Gzip encoding rules in %s.htaccess created.', 'wp-super-cache' ), $cache_path ) . ""; + } + + ?>

    ' . __( 'Fix Configuration', 'wp-super-cache' ) . '

    '; + echo '
    '; + echo ''; + echo '
    '; + wp_nonce_field('wp-cache'); + echo "
    \n"; + echo ''; + +} + +function comment_form_lockdown_message() { + ?>

    +
    +

    ' . __( 'Disabled', 'wp-super-cache' ) . '' : '' . __( 'Enabled', 'wp-super-cache' ) . ''; ?>

    +

    +

    +

    if( defined( 'WPLOCKDOWN' ) && constant( 'WPLOCKDOWN' ) ) { +     echo ""; + }
    +

    '; + echo ""; + echo "
    "; + wp_nonce_field('wp-cache'); + echo "\n"; + + ?>
    +
    +

    escape( $page ); + if( $page != '' ) { + $cached_direct_pages[] = $page; + $out .= "'$page', "; + } + } + if( $out == '' ) { + $out = "'', "; + } + } + if( $valid_nonce && $_POST[ 'new_direct_page' ] && '' != $_POST[ 'new_direct_page' ] ) { + $page = str_replace( get_option( 'siteurl' ), '', $_POST[ 'new_direct_page' ] ); + if( substr( $page, 0, 1 ) != '/' ) + $page = '/' . $page; + $page = $wpdb->escape( $page ); + if( in_array( $page, $cached_direct_pages ) == false ) { + $cached_direct_pages[] = $page; + $out .= "'$page', "; + } + } + + if( $out != '' ) { + $out = substr( $out, 0, -2 ); + $out = '$cached_direct_pages = array( ' . $out . ' );'; + wp_cache_replace_line('^ *\$cached_direct_pages', "$out", $wp_cache_config_file); + prune_super_cache( $cache_path, true ); + } + + if( !empty( $expiredfiles ) ) { + foreach( $expiredfiles as $file ) { + if( $file != '' ) { + $firstfolder = explode( '/', $file ); + $firstfolder = ABSPATH . $firstfolder[1]; + $file = ABSPATH . $file; + @unlink( trailingslashit( $file ) . 'index.html' ); + @unlink( trailingslashit( $file ) . 'index.html.gz' ); + RecursiveFolderDelete( trailingslashit( $firstfolder ) ); + } + } + } + + if( $valid_nonce && $_POST[ 'deletepage' ] ) { + $page = preg_replace('/[ <>\'\"\r\n\t\(\)]/', '', str_replace( '..', '', $_POST['deletepage']) ); + $pagefile = ABSPATH . $page . 'index.html'; + $firstfolder = explode( '/', $page ); + $firstfolder = ABSPATH . $firstfolder[1]; + $page = ABSPATH . $page; + if( is_file( $pagefile ) && is_writeable_ACLSafe( $pagefile ) && is_writeable_ACLSafe( $firstfolder ) ) { + @unlink( $pagefile ); + @unlink( $pagefile . '.gz' ); + RecursiveFolderDelete( $firstfolder ); + echo "" . sprintf( __( '%s removed!', 'wp-super-cache' ), $pagefile ) . ""; + prune_super_cache( $cache_path, true ); + } + } + + $readonly = ''; + if( !is_writeable_ACLSafe( ABSPATH ) ) { + $readonly = 'READONLY'; + ?>

    '; + if( is_array( $cached_direct_pages ) ) { + $out = ''; + foreach( $cached_direct_pages as $page ) { + if( $page == '' ) + continue; + $generated = ''; + if( is_file( ABSPATH . $page . '/index.html' ) ) + $generated = ''; + $out .= "$generated"; + } + if( $out != '' ) { + ?>"; + } + } + if( $readonly != 'READONLY' ) + echo __( "Add direct page:", 'wp-super-cache' ) . ""; + + echo "

    " . sprintf( __( "Directly cached files are files created directly off %s where your blog lives. This feature is only useful if you are expecting a major Digg or Slashdot level of traffic to one post or page.", 'wp-super-cache' ), ABSPATH ) . "

    "; + if( $readonly != 'READONLY' ) { + echo "

    " . sprintf( __( 'For example: to cache %1$sabout/, you would enter %1$sabout/ or /about/. The cached file will be generated the next time an anonymous user visits that page.', 'wp-super-cache' ), trailingslashit( get_option( 'siteurl' ) ) ) . "

    "; + echo "

    " . __( 'Make the textbox blank to remove it from the list of direct pages and delete the cached file.', 'wp-super-cache' ) . "

    "; + } + + wp_nonce_field('wp-cache'); + if( $readonly != 'READONLY' ) + echo "
    "; + echo "\n"; + ?> 0) { + $cache_max_time = $max_time; + wp_cache_replace_line('^ *\$cache_max_time', "\$cache_max_time = $cache_max_time;", $wp_cache_config_file); + } + } + ?>
    + +

    '; + echo ' '; + echo " " . __( "seconds", 'wp-super-cache' ); + echo "

    " . __( 'Garbage Collection', 'wp-super-cache' ) . "

    " . __( 'If expiry time is more than 1800 seconds (half an hour), garbage collection will be done every 10 minutes, otherwise it will happen 10 seconds after the expiry time above.', 'wp-super-cache' ) . "

    "; + echo "

    " . __( 'Checking for and deleting expired files is expensive, but it’s expensive leaving them there too. On a very busy site you should set the expiry time to 300 seconds. Experiment with different values and visit this page to see how many expired files remain at different times during the day. Aim to have less than 500 cached files if possible.', 'wp-super-cache' ) . "

    "; + echo '
    '; + wp_nonce_field('wp-cache'); + echo "\n"; + ?>

    ' . __( 'Rejected User Agents', 'wp-super-cache' ) . '

    '; + echo "

    " . __( 'Strings in the HTTP ’User Agent’ header that prevent WP-Cache from caching bot, spiders, and crawlers’ requests. Note that super cached files are still sent to these agents if they already exists.', 'wp-super-cache' ) . "

    \n"; + echo '
    '; + echo ' '; + echo '
    '; + wp_nonce_field('wp-cache'); + echo ''; + echo "
    \n"; +} + +function wp_cache_edit_rejected_pages() { + global $wp_cache_config_file, $valid_nonce, $wp_cache_pages; + + if ( isset( $_POST[ 'wp_edit_rejected_pages' ] ) && $valid_nonce ) { + $pages = array( 'single', 'pages', 'archives', 'tag', 'frontpage', 'home', 'category', 'feed', 'search' ); + foreach( $pages as $page ) { + if ( isset( $_POST[ 'wp_cache_pages' ][ $page ] ) ) { + $value = 1; + } else { + $value = 0; + } + wp_cache_replace_line('^ *\$wp_cache_pages\[ "' . $page . '" \]', "\$wp_cache_pages[ \"{$page}\" ] = $value;", $wp_cache_config_file); + $wp_cache_pages[ $page ] = $value; + } + } + + echo ''; + echo '

    ' . __( 'Do not cache the following page types. See the Conditional Tags documentation for a complete discussion on each type.', 'wp-super-cache' ) . '

    '; + echo ''; + echo ''; + echo '
    '; + echo '
    '; + echo '
    '; + echo '  
    '; + echo '
    '; + echo '  
    '; + echo '  
    '; + echo '
    '; + echo '
    '; + + echo '
    '; + wp_nonce_field('wp-cache'); + echo "\n"; + +} + +function wp_cache_edit_rejected() { + global $cache_acceptable_files, $cache_rejected_uri, $wp_cache_config_file, $valid_nonce; + + if(isset($_REQUEST['wp_rejected_uri']) && $valid_nonce) { + $text = wp_cache_sanitize_value( str_replace( '\\\\', '\\', $_REQUEST['wp_rejected_uri'] ), $cache_rejected_uri ); + wp_cache_replace_line('^ *\$cache_rejected_uri', "\$cache_rejected_uri = $text;", $wp_cache_config_file); + } + + + echo ''; + echo ''; + echo "

    " . __( 'Add here strings (not a filename) that forces a page not to be cached. For example, if your URLs include year and you dont want to cache last year posts, it’s enough to specify the year, i.e. ’/2004/’. WP-Cache will search if that string is part of the URI and if so, it will not cache that page.', 'wp-super-cache' ) . "

    \n"; + echo ' '; + echo '
    '; + wp_nonce_field('wp-cache'); + echo "\n"; +} + +function wp_cache_edit_accepted() { + global $cache_acceptable_files, $cache_rejected_uri, $wp_cache_config_file, $valid_nonce; + + if(isset($_REQUEST['wp_accepted_files']) && $valid_nonce) { + $text = wp_cache_sanitize_value($_REQUEST['wp_accepted_files'], $cache_acceptable_files); + wp_cache_replace_line('^ *\$cache_acceptable_files', "\$cache_acceptable_files = $text;", $wp_cache_config_file); + } + + + echo ''; + echo '
    '; + echo "

    " . __( 'Add here those filenames that can be cached, even if they match one of the rejected substring specified above.', 'wp-super-cache' ) . "

    \n"; + echo ' '; + echo '
    '; + wp_nonce_field('wp-cache'); + echo "\n"; +} + +function wp_cache_debug_settings() { + global $wp_super_cache_debug, $wp_cache_debug_email, $wp_cache_debug_log, $wp_cache_debug_level, $wp_cache_debug_ip, $cache_path, $valid_nonce, $wp_cache_config_file, $wp_cache_debug_to_file; + global $wp_super_cache_front_page_check, $wp_super_cache_front_page_clear, $wp_super_cache_front_page_text, $wp_super_cache_front_page_notification, $wp_super_cache_advanced_debug; + + if ( !isset( $wp_cache_debug_level ) ) + $wp_cache_debug_level = 1; + if ( isset( $_POST[ 'wp_cache_debug' ] ) && $valid_nonce ) { + $wp_super_cache_debug = intval( $_POST[ 'wp_super_cache_debug' ] ); + wp_cache_replace_line('^ *\$wp_super_cache_debug', "\$wp_super_cache_debug = '$wp_super_cache_debug';", $wp_cache_config_file); + $wp_cache_debug_email = wp_specialchars( $_POST[ 'wp_cache_debug_email' ] ); + wp_cache_replace_line('^ *\$wp_cache_debug_email', "\$wp_cache_debug_email = '$wp_cache_debug_email';", $wp_cache_config_file); + $wp_cache_debug_to_file = intval( $_POST[ 'wp_cache_debug_to_file' ] ); + if ( $wp_cache_debug_to_file && ( ( isset( $wp_cache_debug_log ) && $wp_cache_debug_log == '' ) || !isset( $wp_cache_debug_log ) ) ) { + $wp_cache_debug_log = md5( time() ) . ".txt"; + } elseif( $wp_cache_debug_to_file == false ) { + $wp_cache_debug_log = ""; + } + wp_cache_replace_line('^ *\$wp_cache_debug_to_file', "\$wp_cache_debug_to_file = '$wp_cache_debug_to_file';", $wp_cache_config_file); + wp_cache_replace_line('^ *\$wp_cache_debug_log', "\$wp_cache_debug_log = '$wp_cache_debug_log';", $wp_cache_config_file); + $wp_cache_debug_ip = wp_specialchars( $_POST[ 'wp_cache_debug_ip' ] ); + wp_cache_replace_line('^ *\$wp_cache_debug_ip', "\$wp_cache_debug_ip = '$wp_cache_debug_ip';", $wp_cache_config_file); + $wp_cache_debug_level = (int)$_POST[ 'wp_cache_debug_level' ]; + wp_cache_replace_line('^ *\$wp_cache_debug_level', "\$wp_cache_debug_level = '$wp_cache_debug_level';", $wp_cache_config_file); + $wp_super_cache_front_page_check = (int)$_POST[ 'wp_super_cache_front_page_check' ]; + wp_cache_replace_line('^ *\$wp_super_cache_front_page_check', "\$wp_super_cache_front_page_check = '$wp_super_cache_front_page_check';", $wp_cache_config_file); + $wp_super_cache_front_page_clear = (int)$_POST[ 'wp_super_cache_front_page_clear' ]; + wp_cache_replace_line('^ *\$wp_super_cache_front_page_clear', "\$wp_super_cache_front_page_clear = '$wp_super_cache_front_page_clear';", $wp_cache_config_file); + $wp_super_cache_front_page_text = wp_specialchars( $_POST[ 'wp_super_cache_front_page_text' ] ); + wp_cache_replace_line('^ *\$wp_super_cache_front_page_text', "\$wp_super_cache_front_page_text = '$wp_super_cache_front_page_text';", $wp_cache_config_file); + $wp_super_cache_front_page_notification = (int)$_POST[ 'wp_super_cache_front_page_notification' ]; + wp_cache_replace_line('^ *\$wp_super_cache_front_page_notification', "\$wp_super_cache_front_page_notification = '$wp_super_cache_front_page_notification';", $wp_cache_config_file); + if ( isset( $wp_super_cache_front_page_check ) && $wp_super_cache_front_page_check == 1 && !wp_next_scheduled( 'wp_cache_check_site_hook' ) ) { + wp_schedule_single_event( time() + 360 , 'wp_cache_check_site_hook' ); + if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( 'scheduled wp_cache_check_site_hook for 360 seconds time.', 2 ); + } + } + + echo ''; + echo '
    '; + echo "

    " . __( 'Debug Settings', 'wp-super-cache' ) . "

    "; + if ( ( isset( $wp_cache_debug_log ) && $wp_cache_debug_log != '' ) || ( isset( $wp_cache_debug_email ) && $wp_cache_debug_email != '' ) ) { + echo "

    " . __( 'Currently logging to: ', 'wp-super-cache' ); + if ( isset( $wp_cache_debug_log ) && $wp_cache_debug_log != '' ) { + $url = str_replace( ABSPATH, '', "{$cache_path}{$wp_cache_debug_log}" ); + echo "$cache_path{$wp_cache_debug_log} "; + + } + if ( isset( $wp_cache_debug_email ) ) + echo " $wp_cache_debug_email "; + echo "

    "; + } + echo '

    ' . __( 'Fix problems with the plugin by debugging it here. It can send you debug emails or log them to a file in your cache directory.', 'wp-super-cache' ) . '

    '; + echo '

    ' . __( 'Logging to a file is easier but faces the problem that clearing the cache will clear the log file.', 'wp-super-cache' ) . '

    '; + echo '
    '; + echo "
    "; + echo "
    "; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo "
    " . __( 'Debugging', 'wp-super-cache' ) . " " . __( 'enabled', 'wp-super-cache' ) . "
    " . __( 'Logging Type', 'wp-super-cache' ) . " " . __( 'Email', 'wp-super-cache' ) . ":
    " . __( 'file', 'wp-super-cache' ) . "
    " . __( 'IP Address', 'wp-super-cache' ) . " " . sprintf( __( '(only log requests from this IP address. Your IP is %s)', 'wp-super-cache' ), $_SERVER[ 'REMOTE_ADDR' ] ) . "
    " . __( 'Log level', 'wp-super-cache' ) . " "; + for( $t = 1; $t <= 5; $t++ ) { + echo " $t "; + } + echo " " . __( '(1 = less, 5 = more, may cause severe server load.)', 'wp-super-cache' ) . "
    \n"; + if ( isset( $wp_super_cache_advanced_debug ) ) { + echo "

    " . __( 'Advanced', 'wp-super-cache' ) . "

    " . __( 'In very rare cases two problems may arise on some blogs:

    1. The front page may start downloading as a zip file.
    2. The wrong page is occasionally cached as the front page if your blog uses a static front page and the permalink structure is /%category%/%postname%/.
    ', 'wp-super-cache' ) . '

    '; + echo "

    " . __( 'I’m 99% certain that they aren’t bugs in WP Super Cache and they only happen in very rare cases but you can run a simple check once every 5 minutes to verify that your site is ok if you’re worried. You will be emailed if there is a problem.', 'wp-super-cache' ) . "

    "; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + + echo "
    " . __( 'Check front page every 5 minutes.', 'wp-super-cache' ) . "
    " . __( 'Front page text', 'wp-super-cache' ) . " (" . __( 'Text to search for on your front page. If this text is missing the cache will be cleared. Leave blank to disable.', 'wp-super-cache' ) . ")
    " . __( 'Clear cache on error.', 'wp-super-cache' ) . "
    " . __( 'Email the blog admin when checks are made. (useful for testing)', 'wp-super-cache' ) . "
    \n"; + } + echo '
    '; + wp_nonce_field('wp-cache'); + echo "\n"; + echo '
    '; +} + +function wp_cache_enable() { + global $wp_cache_config_file, $cache_enabled, $supercachedir; + + if(get_option('gzipcompression')) { + echo "" . __( 'Error: GZIP compression is enabled, disable it if you want to enable wp-cache.', 'wp-super-cache' ) . ""; + return false; + } + if( wp_cache_replace_line('^ *\$cache_enabled', '$cache_enabled = true;', $wp_cache_config_file) ) { + $cache_enabled = true; + } + wp_super_cache_enable(); +} + +function wp_cache_disable() { + global $wp_cache_config_file, $cache_enabled; + + if (wp_cache_replace_line('^ *\$cache_enabled', '$cache_enabled = false;', $wp_cache_config_file)) { + $cache_enabled = false; + } + wp_super_cache_disable(); +} +function wp_super_cache_enable() { + global $supercachedir, $wp_cache_config_file, $super_cache_enabled; + + if( is_dir( $supercachedir . ".disabled" ) ) + if( is_dir( $supercachedir ) ) { + prune_super_cache( $supercachedir . ".disabled", true ); + @unlink( $supercachedir . ".disabled" ); + } else { + @rename( $supercachedir . ".disabled", $supercachedir ); + } + wp_cache_replace_line('^ *\$super_cache_enabled', '$super_cache_enabled = true;', $wp_cache_config_file); + $super_cache_enabled = true; +} + +function wp_super_cache_disable() { + global $cache_path, $supercachedir, $wp_cache_config_file, $super_cache_enabled; + + wp_cache_replace_line('^ *\$super_cache_enabled', '$super_cache_enabled = false;', $wp_cache_config_file); + if( is_dir( $supercachedir ) ) + @rename( $supercachedir, $supercachedir . ".disabled" ); + $super_cache_enabled = false; + sleep( 1 ); // allow existing processes to write to the supercachedir and then delete it + if (function_exists ('prune_super_cache') && is_dir( $supercachedir ) ) { + prune_super_cache( $cache_path, true ); + } +} + +function wp_cache_is_enabled() { + global $wp_cache_config_file; + + if(get_option('gzipcompression')) { + echo "" . __( 'Warning', 'wp-super-cache' ) . ": " . __( "GZIP compression is enabled in Wordpress, wp-cache will be bypassed until you disable gzip compression.", 'wp-super-cache' ); + return false; + } + $lines = file($wp_cache_config_file); + foreach($lines as $line) { + if (preg_match('/^ *\$cache_enabled *= *true *;/', $line)) + return true; + } + return false; +} + + +function wp_cache_replace_line($old, $new, $my_file) { + if (!is_writeable_ACLSafe($my_file)) { + echo "Error: file $my_file is not writable.\n"; + return false; + } + $found = false; + $lines = file($my_file); + foreach($lines as $line) { + if ( preg_match("/$old/", $line)) { + $found = true; + break; + } + } + if ($found) { + $fd = fopen($my_file, 'w'); + foreach($lines as $line) { + if ( !preg_match("/$old/", $line)) + fputs($fd, $line); + else { + fputs($fd, "$new //Added by WP-Cache Manager\n"); + } + } + fclose($fd); + return true; + } + $fd = fopen($my_file, 'w'); + $done = false; + foreach($lines as $line) { + if ( $done || !preg_match('/^(if\ \(\ \!\ )?define|\$|\?>/', $line) ) { + fputs($fd, $line); + } else { + fputs($fd, "$new //Added by WP-Cache Manager\n"); + fputs($fd, $line); + $done = true; + } + } + fclose($fd); + return true; +} + +function wp_cache_verify_cache_dir() { + global $cache_path, $blog_cache_dir, $blogcacheid; + + $dir = dirname($cache_path); + if ( !file_exists($cache_path) ) { + if ( !is_writeable_ACLSafe( $dir ) || !($dir = mkdir( $cache_path ) ) ) { + echo "" . __( 'Error', 'wp-super-cache' ) . ": " . sprintf( __( 'Your cache directory ($cache_path) did not exist and couldn’t be created by the web server. Check %s permissions.', 'wp-super-cache' ), $dir ); + return false; + } + } + if ( !is_writeable_ACLSafe($cache_path)) { + echo "" . __( 'Error', 'wp-super-cache' ) . ": " . sprintf( __( 'Your cache directory (%1$s) or %2$s need to be writable for this plugin to work. Double-check it.', 'wp-super-cache' ), $cache_path, $dir ); + return false; + } + + if ( '/' != substr($cache_path, -1)) { + $cache_path .= '/'; + } + + if( false == is_dir( $blog_cache_dir ) ) { + @mkdir( $cache_path . "blogs" ); + if( $blog_cache_dir != $cache_path . "blogs/" ) + @mkdir( $blog_cache_dir ); + } + + if( false == is_dir( $blog_cache_dir . 'meta' ) ) + @mkdir( $blog_cache_dir . 'meta' ); + + return true; +} + +function wp_cache_verify_config_file() { + global $wp_cache_config_file, $wp_cache_config_file_sample, $sem_id, $cache_path; + + $new = false; + $dir = dirname($wp_cache_config_file); + + if ( file_exists($wp_cache_config_file) ) { + $lines = join( ' ', file( $wp_cache_config_file ) ); + if( strpos( $lines, 'WPCACHEHOME' ) === false ) { + if( is_writeable_ACLSafe( $wp_cache_config_file ) ) { + @unlink( $wp_cache_config_file ); + } else { + echo "" . __( 'Error', 'wp-super-cache' ) . ": " . sprintf( __( 'Your WP-Cache config file (%s) is out of date and not writable by the Web server.Please delete it and refresh this page.', 'wp-super-cache' ), $wp_cache_config_file ); + return false; + } + } + } elseif( !is_writeable_ACLSafe($dir)) { + echo "" . __( 'Error', 'wp-super-cache' ) . ": " . sprintf( __( 'Configuration file missing and %1$s directory (%2$s) is not writable by the Web server.Check its permissions.', 'wp-super-cache' ), WP_CONTENT_DIR, $dir ); + return false; + } + + if ( !file_exists($wp_cache_config_file) ) { + if ( !file_exists($wp_cache_config_file_sample) ) { + echo "" . __( 'Error', 'wp-super-cache' ) . ": " . sprintf( __( 'Sample WP-Cache config file (%s) does not exist.Verify you installation.', 'wp-super-cache' ), $wp_cache_config_file_sample ); + return false; + } + copy($wp_cache_config_file_sample, $wp_cache_config_file); + $dir = str_replace( str_replace( '\\', '/', WP_CONTENT_DIR ), '', str_replace( '\\', '/', dirname(__FILE__) ) ); + if( is_file( dirname(__FILE__) . '/wp-cache-config-sample.php' ) ) { + wp_cache_replace_line('define\(\ \'WPCACHEHOME', "\tdefine( 'WPCACHEHOME', WP_CONTENT_DIR . \"{$dir}/\" );", $wp_cache_config_file); + } elseif( is_file( dirname(__FILE__) . '/wp-super-cache/wp-cache-config-sample.php' ) ) { + wp_cache_replace_line('define\(\ \'WPCACHEHOME', "\tdefine( 'WPCACHEHOME', WP_CONTENT_DIR . \"{$dir}/wp-super-cache/\" );", $wp_cache_config_file); + } + $new = true; + } + if( $sem_id == 5419 && $cache_path != '' ) { + $sem_id = crc32( $_SERVER[ 'HTTP_HOST' ] . $cache_path ) & 0x7fffffff; + wp_cache_replace_line('sem_id', '$sem_id = ' . $sem_id . ';', $wp_cache_config_file); + } + require($wp_cache_config_file); + return true; +} + +function wp_cache_create_advanced_cache() { + global $wp_cache_link, $wp_cache_file; + $ret = true; + + $file = file_get_contents( $wp_cache_file ); + $file = str_replace( 'CACHEHOME', constant( 'WPCACHEHOME' ), $file ); + $fp = @fopen( $wp_cache_link, 'w' ); + if( $fp ) { + fputs( $fp, $file ); + fclose( $fp ); + } else { + $ret = false; + } + return $ret; +} + +function wp_cache_check_link() { + global $wp_cache_link, $wp_cache_file; + + $ret = true; + if( file_exists($wp_cache_link) ) { + $file = file_get_contents( $wp_cache_link ); + if( strpos( $file, "WP SUPER CACHE 0.8.9.1" ) ) { + return true; + } else { + if( !@unlink($wp_cache_link) ) { + $ret = false; + } else { + $ret = wp_cache_create_advanced_cache(); + } + } + } else { + $ret = wp_cache_create_advanced_cache(); + } + + if( false == $ret ) { + echo "

    " . __( 'Warning', 'wp-super-cache' ) . "! " . sprintf( __( '%s/advanced-cache.php does not exist or cannot be updated.', 'wp-super-cache' ), WP_CONTENT_DIR ) . "

    "; + echo "

    • " . __( '1. If it already exists please delete the file first.', 'wp-super-cache' ) . "
    • "; + echo "
    • " . sprintf( __( '2. Make %1$s writable using the chmod command through your ftp or server software. (chmod 777 %1$s) and refresh this page. This is only a temporary measure and you’ll have to make it read only afterwards again. (Change 777 to 755 in the previous command)', 'wp-super-cache' ), WP_CONTENT_DIR ) . "
    • "; + echo "
    • " . sprintf( __( '3. Refresh this page to update %s/advanced-cache.php', 'wp-super-cache' ), WP_CONTENT_DIR ) . "
    "; + echo sprintf( __( 'If that doesn’t work, make sure the file %s/advanced-cache.php doesn’t exist:', 'wp-super-cache' ), WP_CONTENT_DIR ) . "
      "; + printf( __( '
    1. 1. Open %1$s$wp_cache_file in a text editor.
    2. 2. Change the text CACHEHOME to %2$s
    3. 3. Save the file and copy it to %3$s and refresh this page.
    4. ', 'wp-super-cache' ), $wp_cache_file, WPCACHEHOME, $wp_cache_link ); + return false; + } + return true; +} + +function wp_cache_check_global_config() { + global $wp_cache_check_wp_config; + + if ( !isset( $wp_cache_check_wp_config ) ) + return true; + + if ( file_exists( ABSPATH . 'wp-config.php') ) { + $global = ABSPATH . 'wp-config.php'; + } else { + $global = dirname(ABSPATH) . '/wp-config.php'; + } + + $line = 'define(\'WP_CACHE\', true);'; + if (!is_writeable_ACLSafe($global) || !wp_cache_replace_line('define *\( *\'WP_CACHE\'', $line, $global) ) { + echo "

      " . __( "Error: WP_CACHE is not enabled in your wp-config.php file and I couldn’t modify it.", 'wp-super-cache' ) . "

      ";; + echo "

      " . sprintf( __( "Edit %s and add the following line:
      define('WP_CACHE', true);
      Otherwise, WP-Cache will not be executed by Wordpress core. ", 'wp-super-cache' ), $global ) . "

      "; + return false; + } else { + echo "
      " . __( '

      WP_CACHE constant added to wp-config.php

      If you continue to see this warning message please see point 5 of the FAQ. The WP_CACHE line must be moved up.', 'wp-super-cache' ) . "

      "; + } + return true; +} + +function wp_cache_files() { + global $cache_path, $file_prefix, $cache_max_time, $valid_nonce, $supercachedir, $cache_enabled, $super_cache_enabled, $blog_cache_dir, $cache_compression; + + if ( '/' != substr($cache_path, -1)) { + $cache_path .= '/'; + } + + if ( $valid_nonce ) { + if(isset($_REQUEST['wp_delete_cache'])) { + wp_cache_clean_cache($file_prefix); + } + if(isset($_REQUEST['wp_delete_expired'])) { + wp_cache_clean_expired($file_prefix); + } + } + echo ""; + echo '

      ' . __( 'Cache Contents', 'wp-super-cache' ) . '

      '; + + $list_files = false; // it doesn't list supercached files, and removing single pages is buggy + $count = 0; + $expired = 0; + $now = time(); + if ( ($handle = @opendir( $blog_cache_dir . 'meta/' )) ) { + if ($list_files) echo ""; + $wp_cache_fsize = 0; + if ( $valid_nonce && isset( $_GET[ 'action' ] ) && $_GET[ 'action' ] == 'deletewpcache' ) { + $deleteuri = preg_replace( '/[ <>\'\"\r\n\t\(\)]/', '', str_replace( '/index.php', '/', str_replace( '..', '', preg_replace("/(\?.*)?$/", '', base64_decode( $_GET[ 'uri' ] ) ) ) ) ); + $deleteuri = str_replace( '\\', '', $deleteuri ); + } else { + $deleteuri = ''; + } + + if ( $valid_nonce && isset( $_GET[ 'action' ] ) && $_GET[ 'action' ] == 'deletesupercache' ) { + $supercacheuri = preg_replace( '/[ <>\'\"\r\n\t\(\)]/', '', str_replace( '/index.php', '/', str_replace( '..', '', preg_replace("/(\?.*)?$/", '', base64_decode( $_GET[ 'uri' ] ) ) ) ) ); + $supercacheuri = trailingslashit( str_replace( '\\', '', $supercacheuri ) ); + printf( __( "Deleting supercache file: %s
      ", 'wp-super-cache' ), $supercacheuri ); + @unlink( $cache_path . 'supercache/' . $supercacheuri . 'index.html' ); + @unlink( $cache_path . 'supercache/' . $supercacheuri . 'index.html.gz' ); + prune_super_cache( $cache_path . 'supercache/' . $supercacheuri . 'page', true ); + @rmdir( $cache_path . 'supercache/' . $supercacheuri ); + } + while( false !== ($file = readdir($handle))) { + if ( preg_match("/^$file_prefix.*\.meta/", $file) ) { + $content_file = preg_replace("/meta$/", "html", $file); + $mtime = filemtime( $blog_cache_dir . 'meta/' . $file ); + if ( ! ( $fsize = @filesize( $blog_cache_dir . $content_file ) ) ) + continue; // .meta does not exists + + $age = $now - $mtime; + if ( $valid_nonce && $_GET[ 'listfiles' ] ) { + $meta = unserialize( file_get_contents( $blog_cache_dir . 'meta/' . $file ) ); + if ( $deleteuri != '' && $meta[ 'uri' ] == $deleteuri ) { + printf( __( "Deleting wp-cache file: %s
      ", 'wp-super-cache' ), $deleteuri ); + @unlink( $blog_cache_dir . 'meta/' . $file ); + @unlink( $blog_cache_dir . $content_file ); + continue; + } + $meta[ 'age' ] = $age; + if ( $age > $cache_max_time ) { + $expired_list[ $age ][] = $meta; + } else { + $cached_list[ $age ][] = $meta; + } + } + + if ( $age > $cache_max_time ) { + $expired++; + } else { + $count++; + } + $wp_cache_fsize += $fsize; + $fsize = intval($fsize/1024); + } + } + closedir($handle); + if ($list_files) echo "
      "; + } + if( $wp_cache_fsize != 0 ) { + $wp_cache_fsize = $wp_cache_fsize/1024; + } else { + $wp_cache_fsize = 0; + } + if( $wp_cache_fsize > 1024 ) { + $wp_cache_fsize = number_format( $wp_cache_fsize / 1024, 2 ) . "MB"; + } elseif( $wp_cache_fsize != 0 ) { + $wp_cache_fsize = number_format( $wp_cache_fsize, 2 ) . "KB"; + } else { + $wp_cache_fsize = '0KB'; + } + if( $cache_enabled == true && $super_cache_enabled == true ) { + $now = time(); + $sizes = array( 'expired' => 0, 'expired_list' => array(), 'cached' => 0, 'cached_list' => array(), 'ts' => 0 ); + + if (is_dir($supercachedir)) { + if( $dh = opendir( $supercachedir ) ) { + while( ( $entry = readdir( $dh ) ) !== false ) { + if ($entry != '.' && $entry != '..') { + $sizes = wpsc_dirsize( trailingslashit( $supercachedir ) . $entry, $sizes ); + } + } + closedir($dh); + } + } else { + $filem = @filemtime( $supercachedir ); + if(is_file($supercachedir) && $filem + $cache_max_time <= $now ) { + $sizes[ 'expired' ] ++; + if ( $valid_nonce && $_GET[ 'listfiles' ] ) + $sizes[ 'expired_list' ][ str_replace( $cache_path . 'supercache/' , '', $supercachedir ) ] = $now - $filem; + } else { + if ( $valid_nonce && $_GET[ 'listfiles' ] && $filem ) + $sizes[ 'cached_list' ][ str_replace( $cache_path . 'supercache/' , '', $supercachedir ) ] = $now - $filem; + } + } + $sizes[ 'ts' ] = time(); + } + + echo "

      " . __( 'WP-Cache', 'wp-super-cache' ) . " ({$wp_cache_fsize})

      "; + echo "
      • " . sprintf( __( '%s Cached Pages', 'wp-super-cache' ), $count ) . "
      • "; + echo "
      • " . sprintf( __( '%s Expired Pages', 'wp-super-cache' ), $expired ) . "
      "; + if( $cache_enabled == true && $super_cache_enabled == true ) { + $fsize = $sizes[ 'fsize' ] / 1024; + if( $fsize > 1024 ) { + $fsize = number_format( $fsize / 1024, 2 ) . "MB"; + } elseif( $fsize != 0 ) { + $fsize = number_format( $fsize, 2 ) . "KB"; + } else { + $fsize = "0KB"; + } + $divisor = $cache_compression == 1 ? 2 : 1; + echo "

      " . __( 'WP-Super-Cache', 'wp-super-cache' ) . " ({$fsize})

      "; + echo "
      • " . sprintf( __( '%s Cached Pages', 'wp-super-cache' ), intval( $sizes[ 'cached' ] / $divisor ) ) . "
      • "; + $age = intval(($now - $sizes['ts'])/60); + echo "
      • " . sprintf( __( '%s Expired Pages', 'wp-super-cache' ), intval( $sizes[ 'expired' ] / $divisor ) ) . "
      "; + } + if ( $valid_nonce && $_GET[ 'listfiles' ] ) { + echo "
      "; + if ( is_array( $cached_list ) && !empty( $cached_list ) ) { + echo "

      " . __( 'Fresh WP-Cached Files', 'wp-super-cache' ) . "

      "; + echo ""; + $c = 1; + $flip = 1; + ksort( $cached_list ); + foreach( $cached_list as $age => $d ) { + foreach( $d as $details ) { + $bg = $flip ? 'style="background: #EAEAEA;"' : ''; + echo "\n"; + $flip = !$flip; + $c++; + } + } + echo "
      #" . __( 'URI', 'wp-super-cache' ) . "" . __( 'Key', 'wp-super-cache' ) . "" . __( 'Age', 'wp-super-cache' ) . "" . __( 'Delete', 'wp-super-cache' ) . "
      $c " . $details[ 'uri' ] . " " . str_replace( $details[ 'uri' ], '', $details[ 'key' ] ) . " {$age} 'wpsupercache', 'action' => 'deletewpcache', 'uri' => base64_encode( $details[ 'uri' ] ) ) ), 'wp-cache' ) . "#listfiles'>X
      "; + } + if ( is_array( $expired_list ) && !empty( $expired_list ) ) { + echo "

      " . __( 'Stale WP-Cached Files', 'wp-super-cache' ) . "

      "; + echo ""; + $c = 1; + $flip = 1; + ksort( $expired_list ); + foreach( $expired_list as $age => $d ) { + foreach( $d as $details ) { + $bg = $flip ? 'style="background: #EAEAEA;"' : ''; + echo "\n"; + $flip = !$flip; + $c++; + } + } + echo "
      #" . __( 'URI', 'wp-super-cache' ) . "" . __( 'Key', 'wp-super-cache' ) . "" . __( 'Age', 'wp-super-cache' ) . "" . __( 'Delete', 'wp-super-cache' ) . "
      $c " . $details[ 'uri' ] . " " . str_replace( $details[ 'uri' ], '', $details[ 'key' ] ) . " {$age} 'wpsupercache', 'action' => 'deletewpcache', 'uri' => base64_encode( $details[ 'uri' ] ) ) ), 'wp-cache' ) . "#listfiles'>X
      "; + } + if ( is_array( $sizes[ 'cached_list' ] ) & !empty( $sizes[ 'cached_list' ] ) ) { + echo "

      " . __( 'Fresh Super Cached Files', 'wp-super-cache' ) . "

      "; + echo ""; + $c = 1; + $flip = 1; + ksort( $sizes[ 'cached_list' ] ); + foreach( $sizes[ 'cached_list' ] as $age => $d ) { + foreach( $d as $uri => $n ) { + $bg = $flip ? 'style="background: #EAEAEA;"' : ''; + echo "\n"; + $flip = !$flip; + $c++; + } + } + echo "
      #" . __( 'URI', 'wp-super-cache' ) . "" . __( 'Age', 'wp-super-cache' ) . "" . __( 'Delete', 'wp-super-cache' ) . "
      $c " . $uri . "$age 'wpsupercache', 'action' => 'deletesupercache', 'uri' => base64_encode( $uri ) ) ), 'wp-cache' ) . "#listfiles'>X
      "; + } + if ( is_array( $sizes[ 'expired_list' ] ) && !empty( $sizes[ 'expired_list' ] ) ) { + echo "

      " . __( 'Stale Super Cached Files', 'wp-super-cache' ) . "

      "; + echo ""; + $c = 1; + $flip = 1; + ksort( $sizes[ 'expired_list' ] ); + foreach( $sizes[ 'expired_list' ] as $age => $d ) { + foreach( $d as $uri => $n ) { + $bg = $flip ? 'style="background: #EAEAEA;"' : ''; + echo "\n"; + $flip = !$flip; + $c++; + } + } + echo "
      #" . __( 'URI', 'wp-super-cache' ) . "" . __( 'Age', 'wp-super-cache' ) . "" . __( 'Delete', 'wp-super-cache' ) . "
      $c " . $uri . "$age 'wpsupercache', 'action' => 'deletesupercache', 'uri' => base64_encode( $uri ) ) ), 'wp-cache' ) . "#listfiles'>X
      "; + } + echo "
      "; + echo "

      " . __( 'Hide file list', 'wp-super-cache' ) . "

      "; + } else { + echo "

      'wpsupercache', 'listfiles' => '1' ) ), 'wp-cache' ) . "#listfiles'>" . __( 'List all cached files', 'wp-super-cache' ) . "

      "; + } + $last_gc = get_option( "wpsupercache_gc_time" ); + if( $last_gc ) { + $next_gc = $cache_max_time < 1800 ? $cache_max_time : 600; + $next_gc_mins = ( time() - $last_gc ); + echo "

      " . sprintf( __( 'Garbage Collection
      Last GC was %s minutes ago
      ', 'wp-super-cache' ), date( 'i:s', $next_gc_mins ) ); + printf( __( "Next GC in %s minutes", 'wp-super-cache' ), date( 'i:s', $next_gc - $next_gc_mins ) ) . "

      "; + } + + echo "

      " . sprintf( __( 'Expired files are files older than %s seconds. They are still used by the plugin and are deleted periodically.', 'wp-super-cache' ), $cache_max_time ) . "

      "; + echo '
      '; + echo ''; + echo '
      '; + wp_nonce_field('wp-cache'); + echo "
      \n"; + + echo '
      '; + echo ''; + echo '
      '; + wp_nonce_field('wp-cache'); + echo "
      \n"; + + echo '
      '; +} + +function delete_cache_dashboard() { + if( function_exists( 'is_site_admin' ) && !is_site_admin() ) + return false; + + if( function_exists('current_user_can') && !current_user_can('manage_options') ) + return false; + + echo "
    5. " . __( 'Delete Cache', 'wp-super-cache' ) . "
    6. "; +} +add_action( 'dashmenu', 'delete_cache_dashboard' ); + +function wpsc_dirsize($directory, $sizes) { + global $cache_max_time, $cache_path, $valid_nonce; + $now = time(); + + if (is_dir($directory)) { + if( $dh = opendir( $directory ) ) { + while( ( $entry = readdir( $dh ) ) !== false ) { + if ($entry != '.' && $entry != '..') { + $sizes = wpsc_dirsize( trailingslashit( $directory ) . $entry, $sizes ); + } + } + closedir($dh); + } + } else { + if(is_file($directory) ) { + $filem = filemtime( $directory ); + if( $filem + $cache_max_time <= $now ) { + $sizes[ 'expired' ]+=1; + if ( $valid_nonce && $_GET[ 'listfiles' ] ) + $sizes[ 'expired_list' ][ $now - $filem ][ str_replace( $cache_path . 'supercache/' , '', str_replace( 'index.html', '', str_replace( 'index.html.gz', '', $directory ) ) ) ] = 1; + } else { + $sizes[ 'cached' ]+=1; + if ( $valid_nonce && $_GET[ 'listfiles' ] ) + $sizes[ 'cached_list' ][ $now - $filem ][ str_replace( $cache_path . 'supercache/' , '', str_replace( 'index.html', '', str_replace( 'index.html.gz', '', $directory ) ) ) ] = 1; + } + if ( ! isset( $sizes[ 'fsize' ] ) ) + $sizes[ 'fsize' ] = @filesize( $directory ); + else + $sizes[ 'fsize' ] += @filesize( $directory ); + } + } + return $sizes; +} + + +function wp_cache_clean_cache($file_prefix) { + global $cache_path, $supercachedir, $blog_cache_dir; + + // If phase2 was compiled, use its function to avoid race-conditions + if(function_exists('wp_cache_phase2_clean_cache')) { + if (function_exists ('prune_super_cache')) { + if( is_dir( $supercachedir ) ) { + prune_super_cache( $supercachedir, true ); + } elseif( is_dir( $supercachedir . '.disabled' ) ) { + prune_super_cache( $supercachedir . '.disabled', true ); + } + prune_super_cache( $cache_path, true ); + $_POST[ 'super_cache_stats' ] = 1; // regenerate super cache stats; + } elseif ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( 'Warning! prune_super_cache() not found in wp-cache.php', 1 ); + return wp_cache_phase2_clean_cache($file_prefix); + } elseif ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( 'Warning! wp_cache_phase2_clean_cache() not found in wp-cache.php', 1 ); + + $expr = "/^$file_prefix/"; + if ( ($handle = @opendir( $blog_cache_dir )) ) { + while ( false !== ($file = readdir($handle))) { + if ( preg_match($expr, $file) ) { + @unlink( $blog_cache_dir . $file); + @unlink( $blog_cache_dir . 'meta/' . str_replace( '.html', '.meta', $file ) ); + } + } + closedir($handle); + } +} + +function wp_cache_clean_expired($file_prefix) { + global $cache_path, $cache_max_time, $blog_cache_dir; + + // If phase2 was compiled, use its function to avoid race-conditions + if(function_exists('wp_cache_phase2_clean_expired')) { + if (function_exists ('prune_super_cache')) { + $dir = $cache_path . 'supercache/' . preg_replace('/:.*$/', '', $_SERVER["HTTP_HOST"]); + if( is_dir( $dir ) ) { + prune_super_cache( $dir ); + } elseif( is_dir( $dir . '.disabled' ) ) { + prune_super_cache( $dir . '.disabled' ); + } + $_POST[ 'super_cache_stats' ] = 1; // regenerate super cache stats; + } + return wp_cache_phase2_clean_expired($file_prefix); + } + + $expr = "/^$file_prefix/"; + $now = time(); + if ( ($handle = @opendir( $blog_cache_dir )) ) { + while ( false !== ($file = readdir($handle))) { + if ( preg_match( $expr, $file ) && + ( filemtime( $blog_cache_dir . $file ) + $cache_max_time ) <= $now ) { + @unlink( $blog_cache_dir . $file ); + @unlink( $blog_cache_dir . 'meta/' . str_replace( '.html', '.meta', $file ) ); + } + } + closedir($handle); + } +} + +function wpsc_remove_marker( $filename, $marker ) { + if (!file_exists( $filename ) || is_writeable_ACLSafe( $filename ) ) { + if (!file_exists( $filename ) ) { + return ''; + } else { + $markerdata = explode( "\n", implode( '', file( $filename ) ) ); + } + + $f = fopen( $filename, 'w' ); + $foundit = false; + if ( $markerdata ) { + $state = true; + foreach ( $markerdata as $n => $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) { + $state = true; + } + } + } + return true; + } else { + return false; + } +} + +function wp_super_cache_footer() { + ?>

      WP Super Cache' ); ?>

      is_404 +function wp_cache_catch_404() { + global $wp_cache_404; + $wp_cache_404 = false; + if( is_404() ) + $wp_cache_404 = true; +} +add_action( 'template_redirect', 'wp_cache_catch_404' ); + +function wp_cache_favorite_action( $actions ) { + if( function_exists( 'is_site_admin' ) && !is_site_admin() ) + return $actions; + + if( function_exists('current_user_can') && !current_user_can('manage_options') ) + return $actions; + + $actions[ wp_nonce_url( 'options-general.php?page=wpsupercache&wp_delete_cache=1', 'wp-cache' ) ] = array( __( 'Delete Cache', 'wp-super-cache' ), 'manage_options' ); + + return $actions; +} +add_filter( 'favorite_actions', 'wp_cache_favorite_action' ); + +function wp_cache_plugin_notice( $plugin ) { + global $cache_enabled; + if( $plugin == 'wp-super-cache/wp-cache.php' && !$cache_enabled && function_exists( "admin_url" ) ) + echo '' . sprintf( __( 'WP Super Cache must be configured. Go to the admin page to enable and configure the plugin.' ), admin_url( 'options-general.php?page=wpsupercache' ) ) . ''; +} +add_action( 'after_plugin_row', 'wp_cache_plugin_notice' ); + +function wp_cache_plugin_actions( $links, $file ) { + if( $file == 'wp-super-cache/wp-cache.php' && function_exists( "admin_url" ) ) { + $settings_link = '' . __('Settings') . ''; + array_unshift( $links, $settings_link ); // before other links + } + return $links; +} +add_filter( 'plugin_action_links', 'wp_cache_plugin_actions', 10, 2 ); + +function wp_cache_admin_notice() { + global $cache_enabled; + if( substr( $_SERVER["PHP_SELF"], -11 ) == 'plugins.php' && !$cache_enabled && function_exists( "admin_url" ) ) + echo '

      ' . sprintf( __('WP Super Cache is disabled. Please go to the plugin admin page to enable caching.', 'wp-super-cache' ), admin_url( 'options-general.php?page=wpsupercache' ) ) . '

      '; +} +add_action( 'admin_notices', 'wp_cache_admin_notice' ); + +function wp_cache_check_site() { + global $wp_super_cache_front_page_check, $wp_super_cache_front_page_clear, $wp_super_cache_front_page_text, $wp_super_cache_front_page_notification; + + if ( !isset( $wp_super_cache_front_page_check ) || ( isset( $wp_super_cache_front_page_check ) && $wp_super_cache_front_page_check == 0 ) ) { + return false; + } + + if ( function_exists( "wp_remote_get" ) == false ) { + return false; + } + $front_page = wp_remote_get( site_url(), array('timeout' => 60, 'blocking' => true ) ); + if( is_array( $front_page ) ) { + // Check for gzipped front page + if ( $front_page[ 'headers' ][ 'content-type' ] == 'application/x-gzip' ) { + if ( !isset( $wp_super_cache_front_page_clear ) || ( isset( $wp_super_cache_front_page_clear ) && $wp_super_cache_front_page_clear == 0 ) ) { + wp_mail( get_option( 'admin_email' ), sprintf( __( '[%s] Front page is gzipped! Please clear cache!', 'wp-super-cache' ), site_url() ), sprintf( __( "Please visit %s to clear the cache as the front page of your site is now downloading!", 'wp-super-cache' ), trailingslashit( site_url() ) . "wp-admin/options-general.php?page=wpsupercache" ) ); + } else { + wp_cache_clear_cache(); + wp_mail( get_option( 'admin_email' ), sprintf( __( '[%s] Front page is gzipped! Cache Cleared!', 'wp-super-cache' ), site_url() ), sprintf( __( "The cache on your blog has been cleared because the front page of your site is now downloading. Please visit %s to verify the cache has been cleared.", 'wp-super-cache' ), trailingslashit( site_url() ) . "wp-admin/options-general.php?page=wpsupercache" ) ); + } + } + + // Check for broken front page + if ( isset( $wp_super_cache_front_page_text ) && $wp_super_cache_front_page_text != '' && false === strpos( $front_page[ 'body' ], $wp_super_cache_front_page_text ) ) { + if ( !isset( $wp_super_cache_front_page_clear ) || ( isset( $wp_super_cache_front_page_clear ) && $wp_super_cache_front_page_clear == 0 ) ) { + wp_mail( get_option( 'admin_email' ), sprintf( __( '[%s] Front page is not correct! Please clear cache!', 'wp-super-cache' ), site_url() ), sprintf( __( 'Please visit %1$s to clear the cache as the front page of your site is not correct and missing the text, "%2$s"!', 'wp-super-cache' ), trailingslashit( site_url() ) . "wp-admin/options-general.php?page=wpsupercache", $wp_super_cache_front_page_text ) ); + } else { + wp_cache_clear_cache(); + wp_mail( get_option( 'admin_email' ), sprintf( __( '[%s] Front page is not correct! Cache Cleared!', 'wp-super-cache' ), site_url() ), sprintf( __( 'The cache on your blog has been cleared because the front page of your site is missing the text "%2$s". Please visit %1$s to verify the cache has been cleared.', 'wp-super-cache' ), trailingslashit( site_url() ) . "wp-admin/options-general.php?page=wpsupercache", $wp_super_cache_front_page_text ) ); + } + } + } + if ( isset( $wp_super_cache_front_page_notification ) && $wp_super_cache_front_page_notification == 1 ) { + wp_mail( get_option( 'admin_email' ), sprintf( __( '[%s] Front page check!', 'wp-super-cache' ), site_url() ), sprintf( __( "WP Super Cache has checked the front page of your blog. Please visit %s if you would like to disable this.", 'wp-super-cache' ) . "\n\n", trailingslashit( site_url() ) . "wp-admin/options-general.php?page=wpsupercache#debug" ) . print_r( $front_page, 1 ) ); + } + + if ( !wp_next_scheduled( 'wp_cache_check_site_hook' ) ) { + wp_schedule_single_event( time() + 360 , 'wp_cache_check_site_hook' ); + if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( 'scheduled wp_cache_check_site_hook for 360 seconds time.', 2 ); + } +} +add_action( 'wp_cache_check_site_hook', 'wp_cache_check_site' ); +?> diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/wp-super-cache/wp-super-cache.pot --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/wp-super-cache/wp-super-cache.pot Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,1278 @@ +# WP Super Cache Translation File +# GPL +# Donncha O Caoimh, http://ocaoimh.ie/ +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: http://wordpress.org/tag/wp-super-cache\n" +"POT-Creation-Date: 2009-11-13 10:27+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: plugins/badbehaviour.php:45 +msgid "Bad Behaviour not found. Please check your install." +msgstr "" + +#: plugins/badbehaviour.php:47 plugins/badbehaviour.php:66 +#: plugins/searchengine.php:61 plugins/searchengine.php:76 wp-cache.php:709 +msgid "Disable" +msgstr "" + +#: plugins/badbehaviour.php:55 plugins/searchengine.php:67 +msgid "disabled" +msgstr "" + +#: plugins/badbehaviour.php:57 plugins/searchengine.php:69 wp-cache.php:1052 +msgid "enabled" +msgstr "" + +#: plugins/badbehaviour.php:60 +#, php-format +msgid "Bad Behaviour support is %s" +msgstr "" + +#: plugins/badbehaviour.php:62 +#, php-format +msgid "" +"(Only half-on caching supported, disabled compression and requires Bad Behavior in \"%s/plugins/bad-" +"behavior/\") " +msgstr "" + +#: plugins/badbehaviour.php:64 plugins/searchengine.php:74 wp-cache.php:709 +msgid "Enable" +msgstr "" + +#: plugins/badbehaviour.php:70 wp-cache.php:786 wp-cache.php:788 +msgid "Warning!" +msgstr "" + +#: plugins/searchengine.php:71 +#, php-format +msgid "" +"No Adverts for " +"Friends plugin is %s" +msgstr "" + +#: plugins/searchengine.php:72 +msgid "" +"(requires friendsadverts.php too) " +msgstr "" + +#: wp-cache.php:87 +#, php-format +msgid "" +"Please create %s /wp-cache-config.php from wp-super-cache/wp-cache-config-" +"sample.php" +msgstr "" + +#: wp-cache.php:170 +msgid "WP Super Cache Manager" +msgstr "" + +#: wp-cache.php:172 +msgid "Warning! PHP Safe Mode Enabled!" +msgstr "" + +#: wp-cache.php:173 +msgid "" +"You may experience problems running this plugin because SAFE MODE is enabled." +msgstr "" + +#: wp-cache.php:175 +msgid "" +"Your server is set up to check the owner of PHP scripts before allowing them " +"to read and write files." +msgstr "" + +#: wp-cache.php:176 +#, php-format +msgid "" +"You or an administrator may be able to make it work by changing the group " +"owner of the plugin scripts to match that of the web server user. The group " +"owner of the %s/cache/ directory must also be changed. See the safe mode manual page for further " +"details." +msgstr "" + +#: wp-cache.php:178 +msgid "" +"You or an administrator must disable this. See the safe mode manual page for further details. This " +"cannot be disabled in a .htaccess file unfortunately. It must be done in the " +"php.ini config file." +msgstr "" + +#: wp-cache.php:189 +msgid "" +"Configuration file changed, some values might be wrong. Load the page again " +"from the \"Settings\" menu to reset them." +msgstr "" + +#: wp-cache.php:195 +msgid "Cannot continue... fix previous problems and retry." +msgstr "" + +#: wp-cache.php:211 +#, php-format +msgid "Warning! Your hostname \"%s\" resolves to %s" +msgstr "" + +#: wp-cache.php:213 +#, php-format +msgid "" +"Your server thinks your hostname resolves to %s. Some services such as " +"garbage collection by this plugin, and WordPress scheduled posts may not " +"operate correctly." +msgstr "" + +#: wp-cache.php:214 wp-cache.php:228 +#, php-format +msgid "" +"Please see entry 16 in the Troubleshooting section of the " +"readme.txt" +msgstr "" + +#: wp-cache.php:227 +msgid "" +"Unfortunately WordPress cannot find the file wp-cron.php. This script is " +"required for the the correct operation of garbage collection by this plugin, " +"WordPress scheduled posts as well as other critical activities." +msgstr "" + +#: wp-cache.php:239 +msgid "Mod rewrite may not be installed!" +msgstr "" + +#: wp-cache.php:240 +msgid "" +"It appears that mod_rewrite is not installed. Sometimes this check isn’" +"t 100% reliable, especially if you are not using Apache. Please verify that " +"the mod_rewrite module is loaded. It is required for serving Super Cache " +"static files. You will still be able to use half-on mode." +msgstr "" + +#: wp-cache.php:245 +msgid "Read Only Mode. Configuration cannot be changed." +msgstr "" + +#: wp-cache.php:245 +msgid "Why your configuration may not be changed" +msgstr "" + +#: wp-cache.php:245 +msgid "Why" +msgstr "" + +#: wp-cache.php:247 +#, php-format +msgid "" +"The WP Super Cache configuration file is %s/wp-cache-config.php " +"and cannot be modified. That file must be writeable by the webserver to make " +"any changes." +msgstr "" + +#: wp-cache.php:248 +msgid "" +"A simple way of doing that is by changing the permissions temporarily using " +"the CHMOD command or through your ftp client. Make sure it’s globally " +"writeable and it should be fine." +msgstr "" + +#: wp-cache.php:249 +msgid "Writeable:" +msgstr "" + +#: wp-cache.php:250 +msgid "Readonly:" +msgstr "" + +#: wp-cache.php:262 +#, php-format +msgid "Warning! %s is writeable!" +msgstr "" + +#: wp-cache.php:263 +#, php-format +msgid "" +"You should change the permissions on %s and make it more restrictive. Use " +"your ftp client, or the following command to fix things:" +msgstr "" + +#: wp-cache.php:354 +msgid "WP Super Cache Status" +msgstr "" + +#: wp-cache.php:357 +msgid "ON" +msgstr "" + +#: wp-cache.php:357 +msgid "WP Cache and Super Cache enabled" +msgstr "" + +#: wp-cache.php:358 +msgid "HALF ON" +msgstr "" + +#: wp-cache.php:358 +msgid "Super Cache Disabled, only legacy WP-Cache caching." +msgstr "" + +#: wp-cache.php:359 +msgid "OFF" +msgstr "" + +#: wp-cache.php:359 +msgid "WP Cache and Super Cache disabled" +msgstr "" + +#: wp-cache.php:360 +msgid "Don’t cache pages for logged in users." +msgstr "" + +#: wp-cache.php:361 +msgid "" +"Proudly tell the world your server is Digg proof! (places a message in your " +"blog’s footer)" +msgstr "" + +#: wp-cache.php:362 +msgid "" +"Clear all cache files when a post or page is published. (This may " +"significantly slow down saving of posts.)" +msgstr "" + +#: wp-cache.php:363 +msgid "" +"Cache rebuild. Serve a supercache file to anonymous users while a new file " +"is being generated. Recommended for very busy websites with lots of " +"comments. Makes \"directly cached pages\" and \"Lockdown mode\" obsolete." +msgstr "" + +#: wp-cache.php:365 +msgid "" +"Coarse file locking. You probably don’t need this but it may help if " +"your server is underpowered. Warning! May cause your server to lock up " +"in very rare cases!" +msgstr "" + +#: wp-cache.php:367 +msgid "" +"List the newest cached pages (may be expensive to run on busy sites, use " +"with caution.)" +msgstr "" + +#: wp-cache.php:368 +msgid "Mobile device support." +msgstr "" + +#: wp-cache.php:373 +msgid "Mobile rewrite rules detected" +msgstr "" + +#: wp-cache.php:374 +msgid "" +"For best performance you should enable \"Mobile device support\" or delete " +"the mobile rewrite rules in your .htaccess. Look for the 2 lines with the " +"text \"Android|2.0\\ MMP|240x320|AvantGo|BlackBerry|Blazer|Cellphone\" and " +"delete those." +msgstr "" + +#: wp-cache.php:374 +msgid "" +"This will have no affect on ordinary users but mobile users will see " +"uncached pages." +msgstr "" + +#: wp-cache.php:377 +msgid "" +"Mobile support requires extra rules in your .htaccess file, or you can set " +"the plugin to half-on mode. Here are your options (in order of difficulty):" +msgstr "" + +#: wp-cache.php:378 +msgid "Set the plugin to half on mode and enable mobile support." +msgstr "" + +#: wp-cache.php:379 +#, php-format +msgid "" +"Delete the plugin mod_rewrite rules in %s.htaccess enclosed by # BEGIN " +"WPSuperCache and # END WPSuperCache and let the plugin " +"regenerate them by reloading this page." +msgstr "" + +#: wp-cache.php:380 +msgid "" +"Add the rules yourself. Edit %s.htaccess and find the block of code enclosed " +"by the lines # BEGIN WPSuperCache and # END WPSuperCache. There are two sections that look very similar. Just below the line " +"%{HTTP:Cookie} !^.*(comment_author_|wordpress|wp-postpass_).*$ " +"add this line: (do it twice, once for each section)" +msgstr "" + +#: wp-cache.php:383 +msgid "Note:" +msgstr "" + +#: wp-cache.php:383 +#, php-format +msgid "" +"If uninstalling this plugin, make sure the directory %s is " +"writeable by the webserver so the files advanced-cache.php and " +"cache-config.php can be deleted automatically. (Making sure those " +"files are writeable too is probably a good idea!)" +msgstr "" + +#: wp-cache.php:384 +#, php-format +msgid "" +"Uninstall using the uninstall " +"script to remove files and directories created by the plugin. (Please " +"see readme.txt for " +"instructions on uninstalling this script.)" +msgstr "" + +#: wp-cache.php:386 +msgid "Update Status" +msgstr "" + +#: wp-cache.php:393 +msgid "Required to serve compressed supercache files properly." +msgstr "" + +#: wp-cache.php:393 +msgid "" +"Required to set caching information on supercache pages. IE7 users will see " +"old pages without this module." +msgstr "" + +#: wp-cache.php:393 +msgid "" +"Set the expiry date on supercached pages. Visitors may not see new pages " +"when they refresh or leave comments without this module." +msgstr "" + +#: wp-cache.php:400 +msgid "Missing Apache Modules" +msgstr "" + +#: wp-cache.php:401 +msgid "" +"The following Apache modules are missing. The plugin will work in half-on " +"mode without them. In full Supercache mode, your visitors may see corrupted " +"pages or out of date content however." +msgstr "" + +#: wp-cache.php:413 +msgid "Make WordPress Faster" +msgstr "" + +#: wp-cache.php:415 +#, php-format +msgid "" +"%1$s really makes your blog go faster. Make it go faster* by " +"buying me an Amazon gift card! Make it out to \"%3$s\" " +"for whatever amount you want. Every penny helps!" +msgstr "" + +#: wp-cache.php:416 +#, php-format +msgid "" +"If Amazon isn’t your thing, there’s also PayPal. Click the " +"\"Donate\" button below or take a quick peek at my wishlist." +msgstr "" + +#: wp-cache.php:417 +msgid "Thanks in advance!" +msgstr "" + +#: wp-cache.php:418 +msgid "" +"Ok, it won’t go any faster but you’ll make this plugin author " +"very happy!" +msgstr "" + +#: wp-cache.php:426 +msgid "Don’t show me this again." +msgstr "" + +#: wp-cache.php:426 +msgid "Hide" +msgstr "" + +#: wp-cache.php:429 +#, php-format +msgid "" +"%1$s is maintained and developed by %2$s with contributions from many others." +msgstr "" + +#: wp-cache.php:430 +#, php-format +msgid "" +"He blogs at %1$s, posts photos at %2$s and wishes he " +"had more time to read and relax." +msgstr "" + +#: wp-cache.php:431 +#, php-format +msgid "Please say hi to him on %s too!" +msgstr "" + +#: wp-cache.php:440 +#, php-format +msgid "Cached pages since %1$s : %2$s" +msgstr "" + +#: wp-cache.php:441 +msgid "Newest Cached Pages:" +msgstr "" + +#: wp-cache.php:445 +#, php-format +msgid "Cached %s seconds ago" +msgstr "" + +#: wp-cache.php:448 +msgid "(may not always be accurate on busy sites)" +msgstr "" + +#: wp-cache.php:469 +msgid "Accepted Filenames & Rejected URIs" +msgstr "" + +#: wp-cache.php:494 +msgid "Cache Plugins" +msgstr "" + +#: wp-cache.php:505 wp-cache.php:516 +msgid "Super Cache Compression" +msgstr "" + +#: wp-cache.php:506 +msgid "Compression is enabled by default when in HALF ON mode." +msgstr "" + +#: wp-cache.php:518 wp-cache.php:696 +msgid "Enabled" +msgstr "" + +#: wp-cache.php:519 wp-cache.php:696 +msgid "Disabled" +msgstr "" + +#: wp-cache.php:520 +msgid "" +"Compression is disabled by default because some hosts have problems with " +"compressed files. Switching this on and off clears the cache." +msgstr "" + +#: wp-cache.php:523 +msgid "Super Cache compression is now disabled." +msgstr "" + +#: wp-cache.php:525 +msgid "Super Cache compression is now enabled." +msgstr "" + +#: wp-cache.php:527 +msgid "Update Compression" +msgstr "" + +#: wp-cache.php:534 +msgid "Mod Rewrite Rules" +msgstr "" + +#: wp-cache.php:581 +msgid "WordPress MU Detected" +msgstr "" + +#: wp-cache.php:581 +msgid "" +"Unfortunately the rewrite rules cannot be updated automatically when running " +"WordPress MU. Please open your .htaccess and add the following mod_rewrite " +"rules above any other rules in that file." +msgstr "" + +#: wp-cache.php:583 +msgid "Mod Rewrite rules cannot be updated!" +msgstr "" + +#: wp-cache.php:584 +#, php-format +msgid "" +"You must have BEGIN and END markers in %s." +"htaccess for the auto update to work. They look like this and surround the " +"main WordPress mod_rewrite rules:" +msgstr "" + +#: wp-cache.php:586 +msgid "Refresh this page when you have updated your .htaccess file." +msgstr "" + +#: wp-cache.php:590 +msgid "Thank you for upgrading." +msgstr "" + +#: wp-cache.php:590 +#, php-format +msgid "" +"The mod_rewrite rules changed since you last installed this plugin. " +"Unfortunately you must remove the old supercache rules before the new ones " +"are updated. Refresh this page when you have edited your .htaccess file. If " +"you wish to manually upgrade, change the following line: %1$s so it looks " +"like this: %2$s The only changes are \"HTTP_COOKIE\" becomes \"HTTP:Cookie\" " +"and \"wordpressuser\" becomes \"wordpress\". This is a WordPress 2.5 change " +"but it’s backwards compatible with older versions if you’re " +"brave enough to use them." +msgstr "" + +#: wp-cache.php:594 +msgid "Trailing slash check required." +msgstr "" + +#: wp-cache.php:594 +msgid "" +"It looks like your blog has URLs that end with a \"/\". Unfortunately since " +"you installed this plugin a duplicate content bug has been found where URLs " +"not ending in a \"/\" end serve the same content as those with the \"/\" and " +"do not redirect to the proper URL. To fix, you must edit your .htaccess file " +"and add these two rules to the two groups of Super Cache rules:" +msgstr "" + +#: wp-cache.php:596 +msgid "" +"You can see where the rules go and examine the complete rules by clicking " +"the \"View mod_rewrite rules\" link below." +msgstr "" + +#: wp-cache.php:608 +msgid "Cannot update .htaccess" +msgstr "" + +#: wp-cache.php:608 +#, php-format +msgid "" +"The file %s.htaccess cannot be modified by the web server. " +"Please correct this using the chmod command or your ftp client." +msgstr "" + +#: wp-cache.php:608 +msgid "Refresh this page when the file permissions have been modified." +msgstr "" + +#: wp-cache.php:608 +#, php-format +msgid "" +"Alternatively, you can edit your %s.htaccess file manually and " +"add the following code (before any WordPress rules):" +msgstr "" + +#: wp-cache.php:611 +#, php-format +msgid "" +"To serve static html files your server must have the correct mod_rewrite " +"rules added to a file called %s.htaccess" +msgstr "" + +#: wp-cache.php:613 +msgid "You must edit the file yourself add the following rules." +msgstr "" + +#: wp-cache.php:615 +msgid "You can edit the file yourself add the following rules." +msgstr "" + +#: wp-cache.php:617 +msgid " Make sure they appear before any existing WordPress rules. " +msgstr "" + +#: wp-cache.php:619 wp-cache.php:646 +#, php-format +msgid "Rules must be added to %s too:" +msgstr "" + +#: wp-cache.php:624 +msgid "Update Mod_Rewrite Rules" +msgstr "" + +#: wp-cache.php:633 +msgid "Mod Rewrite rules updated!" +msgstr "" + +#: wp-cache.php:634 +#, php-format +msgid "" +"%s.htaccess has been updated with the necessary mod_rewrite rules. Please " +"verify they are correct. They should look like this:" +msgstr "" + +#: wp-cache.php:636 +msgid "Mod Rewrite rules must be updated!" +msgstr "" + +#: wp-cache.php:637 +#, php-format +msgid "" +"Your %s.htaccess is not writable by the webserver and must be updated with " +"the necessary mod_rewrite rules. The new rules go above the regular " +"WordPress rules as shown in the code below:" +msgstr "" + +#: wp-cache.php:642 +#, php-format +msgid "" +"WP Super Cache mod rewrite rules were detected in your %s.htaccess file.
      Click the following link to see the lines added to that file. If you have " +"upgraded the plugin make sure these rules match." +msgstr "" + +#: wp-cache.php:643 +msgid "View Mod_Rewrite Rules" +msgstr "" + +#: wp-cache.php:654 +#, php-format +msgid "Gzip encoding rules in %s.htaccess created." +msgstr "" + +#: wp-cache.php:661 +msgid "Fix Configuration" +msgstr "" + +#: wp-cache.php:664 +msgid "Restore Default Configuration" +msgstr "" + +#: wp-cache.php:672 +msgid "" +"Comment moderation is enabled. Your comment may take some time to appear." +msgstr "" + +#: wp-cache.php:696 +msgid "Lock Down:" +msgstr "" + +#: wp-cache.php:697 +msgid "" +"Prepare your server for an expected spike in traffic by enabling the lock " +"down. When this is enabled, new comments on a post will not refresh the " +"cached static files." +msgstr "" + +#: wp-cache.php:698 +msgid "" +"Developers: Make your plugin lock down compatible by checking the " +"\"WPLOCKDOWN\" constant. The following code will make sure your plugin " +"respects the WPLOCKDOWN setting." +msgstr "" + +#: wp-cache.php:700 +msgid "Sorry. My blog is locked down. Updates will appear shortly" +msgstr "" + +#: wp-cache.php:704 +msgid "" +"WordPress is locked down. Super Cache static files will not be deleted when " +"new comments are made." +msgstr "" + +#: wp-cache.php:706 +msgid "" +"WordPress is not locked down. New comments will refresh Super Cache static " +"files as normal." +msgstr "" + +#: wp-cache.php:712 +msgid "Lock Down" +msgstr "" + +#: wp-cache.php:720 +msgid "Directly Cached Files" +msgstr "" + +#: wp-cache.php:778 +#, php-format +msgid "%s removed!" +msgstr "" + +#: wp-cache.php:786 +#, php-format +msgid "" +"You must make %s writable to enable this feature. As this is a security risk " +"please make it readonly after your page is generated." +msgstr "" + +#: wp-cache.php:788 +#, php-format +msgid "" +"%s is writable. Please make it readonly after your page is generated as this " +"is a security risk." +msgstr "" + +#: wp-cache.php:802 +msgid "Existing direct page" +msgstr "" + +#: wp-cache.php:802 +msgid "Delete cached file" +msgstr "" + +#: wp-cache.php:807 +msgid "Add direct page:" +msgstr "" + +#: wp-cache.php:809 +#, php-format +msgid "" +"Directly cached files are files created directly off %s where your blog " +"lives. This feature is only useful if you are expecting a major Digg or " +"Slashdot level of traffic to one post or page." +msgstr "" + +#: wp-cache.php:811 +#, php-format +msgid "" +"For example: to cache %1$sabout/, you would enter %1$sabout/ or /" +"about/. The cached file will be generated the next time an anonymous user " +"visits that page." +msgstr "" + +#: wp-cache.php:812 +msgid "" +"Make the textbox blank to remove it from the list of direct pages and delete " +"the cached file." +msgstr "" + +#: wp-cache.php:817 +msgid "Update Direct Pages" +msgstr "" + +#: wp-cache.php:857 +msgid "Expiry Time & Garbage Collection" +msgstr "" + +#: wp-cache.php:859 +msgid "Expire time:" +msgstr "" + +#: wp-cache.php:860 +msgid "seconds" +msgstr "" + +#: wp-cache.php:861 +msgid "Garbage Collection" +msgstr "" + +#: wp-cache.php:861 +msgid "" +"If expiry time is more than 1800 seconds (half an hour), garbage collection " +"will be done every 10 minutes, otherwise it will happen 10 seconds after the " +"expiry time above." +msgstr "" + +#: wp-cache.php:862 +msgid "" +"Checking for and deleting expired files is expensive, but it’s " +"expensive leaving them there too. On a very busy site you should set the " +"expiry time to 300 seconds. Experiment with different values and " +"visit this page to see how many expired files remain at different times " +"during the day. Aim to have less than 500 cached files if possible." +msgstr "" + +#: wp-cache.php:863 +msgid "Change Expiration" +msgstr "" + +#: wp-cache.php:902 +msgid "Rejected User Agents" +msgstr "" + +#: wp-cache.php:903 +msgid "" +"Strings in the HTTP ’User Agent’ header that prevent WP-Cache " +"from caching bot, spiders, and crawlers’ requests. Note that super " +"cached files are still sent to these agents if they already exists." +msgstr "" + +#: wp-cache.php:910 +msgid "Save UA Strings" +msgstr "" + +#: wp-cache.php:933 +msgid "" +"Do not cache the following page types. See the Conditional Tags documentation for a " +"complete discussion on each type." +msgstr "" + +#: wp-cache.php:936 +msgid "Single Posts" +msgstr "" + +#: wp-cache.php:937 +msgid "Pages" +msgstr "" + +#: wp-cache.php:938 +msgid "Front Page" +msgstr "" + +#: wp-cache.php:939 +msgid "Home" +msgstr "" + +#: wp-cache.php:940 +msgid "Archives" +msgstr "" + +#: wp-cache.php:941 +msgid "Tags" +msgstr "" + +#: wp-cache.php:942 +msgid "Category" +msgstr "" + +#: wp-cache.php:943 +msgid "Feeds" +msgstr "" + +#: wp-cache.php:944 +msgid "Search Pages" +msgstr "" + +#: wp-cache.php:946 wp-cache.php:1073 +msgid "Save" +msgstr "" + +#: wp-cache.php:963 +msgid "" +"Add here strings (not a filename) that forces a page not to be cached. For " +"example, if your URLs include year and you dont want to cache last year " +"posts, it’s enough to specify the year, i.e. ’/2004/’. WP-" +"Cache will search if that string is part of the URI and if so, it will not " +"cache that page." +msgstr "" + +#: wp-cache.php:969 +msgid "Save Strings" +msgstr "" + +#: wp-cache.php:985 +msgid "" +"Add here those filenames that can be cached, even if they match one of the " +"rejected substring specified above." +msgstr "" + +#: wp-cache.php:991 +msgid "Save Files" +msgstr "" + +#: wp-cache.php:1035 +msgid "Debug Settings" +msgstr "" + +#: wp-cache.php:1037 +msgid "Currently logging to: " +msgstr "" + +#: wp-cache.php:1047 +msgid "" +"Fix problems with the plugin by debugging it here. It can send you debug " +"emails or log them to a file in your cache directory." +msgstr "" + +#: wp-cache.php:1048 +msgid "" +"Logging to a file is easier but faces the problem that clearing the cache " +"will clear the log file." +msgstr "" + +#: wp-cache.php:1052 +msgid "Debugging" +msgstr "" + +#: wp-cache.php:1053 +msgid "Logging Type" +msgstr "" + +#: wp-cache.php:1053 +msgid "Email" +msgstr "" + +#: wp-cache.php:1054 +msgid "file" +msgstr "" + +#: wp-cache.php:1055 +msgid "IP Address" +msgstr "" + +#: wp-cache.php:1055 +#, php-format +msgid "(only log requests from this IP address. Your IP is %s)" +msgstr "" + +#: wp-cache.php:1056 +msgid "Log level" +msgstr "" + +#: wp-cache.php:1062 +msgid "(1 = less, 5 = more, may cause severe server load.)" +msgstr "" + +#: wp-cache.php:1064 +msgid "Advanced" +msgstr "" + +#: wp-cache.php:1064 +msgid "" +"In very rare cases two problems may arise on some blogs:
      1. The front " +"page may start downloading as a zip file.
      2. The wrong page is " +"occasionally cached as the front page if your blog uses a static front page " +"and the permalink structure is /%category%/%postname%/.
      " +msgstr "" + +#: wp-cache.php:1065 +#, php-format +msgid "" +"I’m 99% certain that they aren’t bugs in WP Super Cache and they " +"only happen in very rare cases but you can run a simple check once every 5 " +"minutes to verify that your site is ok if you’re worried. You will be " +"emailed if there is a problem." +msgstr "" + +#: wp-cache.php:1067 +msgid "Check front page every 5 minutes." +msgstr "" + +#: wp-cache.php:1068 +msgid "Front page text" +msgstr "" + +#: wp-cache.php:1068 +msgid "" +"Text to search for on your front page. If this text is missing the cache " +"will be cleared. Leave blank to disable." +msgstr "" + +#: wp-cache.php:1069 +msgid "Clear cache on error." +msgstr "" + +#: wp-cache.php:1070 +msgid "Email the blog admin when checks are made. (useful for testing)" +msgstr "" + +#: wp-cache.php:1083 +msgid "" +"Error: GZIP compression is enabled, disable it if you want to enable wp-" +"cache." +msgstr "" + +#: wp-cache.php:1131 wp-cache.php:1293 +msgid "Warning" +msgstr "" + +#: wp-cache.php:1131 +msgid "" +"GZIP compression is enabled in Wordpress, wp-cache will be bypassed until " +"you disable gzip compression." +msgstr "" + +#: wp-cache.php:1189 wp-cache.php:1194 wp-cache.php:1226 wp-cache.php:1231 +#: wp-cache.php:1237 +msgid "Error" +msgstr "" + +#: wp-cache.php:1189 +#, php-format +msgid "" +"Your cache directory ($cache_path) did not exist and " +"couldn’t be created by the web server. Check %s permissions." +msgstr "" + +#: wp-cache.php:1194 +#, php-format +msgid "" +"Your cache directory (%1$s) or %2$s need " +"to be writable for this plugin to work. Double-check it." +msgstr "" + +#: wp-cache.php:1226 +#, php-format +msgid "" +"Your WP-Cache config file (%s) is out of date and not " +"writable by the Web server.Please delete it and refresh this page." +msgstr "" + +#: wp-cache.php:1231 +#, php-format +msgid "" +"Configuration file missing and %1$s directory (%2$s) is " +"not writable by the Web server.Check its permissions." +msgstr "" + +#: wp-cache.php:1237 +#, php-format +msgid "" +"Sample WP-Cache config file (%s) does not exist.Verify you " +"installation." +msgstr "" + +#: wp-cache.php:1293 +#, php-format +msgid "%s/advanced-cache.php does not exist or cannot be updated." +msgstr "" + +#: wp-cache.php:1294 +msgid "1. If it already exists please delete the file first." +msgstr "" + +#: wp-cache.php:1295 +#, php-format +msgid "" +"2. Make %1$s writable using the chmod command through your ftp or server " +"software. (chmod 777 %1$s) and refresh this page. This is only a " +"temporary measure and you’ll have to make it read only afterwards " +"again. (Change 777 to 755 in the previous command)" +msgstr "" + +#: wp-cache.php:1296 +#, php-format +msgid "3. Refresh this page to update %s/advanced-cache.php" +msgstr "" + +#: wp-cache.php:1297 +#, php-format +msgid "" +"If that doesn’t work, make sure the file %s/advanced-cache.php doesn’t exist:" +msgstr "" + +#: wp-cache.php:1298 +#, php-format +msgid "" +"
    7. 1. Open %1$s$wp_cache_file in a text editor.
    8. 2. Change " +"the text CACHEHOME to %2$s
    9. 3. Save the file and " +"copy it to %3$s and refresh this page.
    10. " +msgstr "" + +#: wp-cache.php:1318 +msgid "" +"Error: WP_CACHE is not enabled in your wp-config.php file and I couldn’t modify it." +msgstr "" + +#: wp-cache.php:1319 +#, php-format +msgid "" +"Edit %s and add the following line:
      define" +"('WP_CACHE', true);
      Otherwise, WP-Cache will not be " +"executed by Wordpress core. " +msgstr "" + +#: wp-cache.php:1322 +msgid "" +"

      WP_CACHE constant added to wp-config.php

      If you continue to see " +"this warning message please see point 5 of the FAQ. The WP_CACHE line must be " +"moved up." +msgstr "" + +#: wp-cache.php:1343 +msgid "Cache Contents" +msgstr "" + +#: wp-cache.php:1362 +#, php-format +msgid "Deleting supercache file: %s
      " +msgstr "" + +#: wp-cache.php:1379 +#, php-format +msgid "Deleting wp-cache file: %s
      " +msgstr "" + +#: wp-cache.php:1443 +msgid "WP-Cache" +msgstr "" + +#: wp-cache.php:1444 wp-cache.php:1457 +#, php-format +msgid "%s Cached Pages" +msgstr "" + +#: wp-cache.php:1445 wp-cache.php:1459 +#, php-format +msgid "%s Expired Pages" +msgstr "" + +#: wp-cache.php:1456 +msgid "WP-Super-Cache" +msgstr "" + +#: wp-cache.php:1464 +msgid "Fresh WP-Cached Files" +msgstr "" + +#: wp-cache.php:1465 wp-cache.php:1481 wp-cache.php:1497 wp-cache.php:1513 +msgid "URI" +msgstr "" + +#: wp-cache.php:1465 wp-cache.php:1481 +msgid "Key" +msgstr "" + +#: wp-cache.php:1465 wp-cache.php:1481 wp-cache.php:1497 wp-cache.php:1513 +msgid "Age" +msgstr "" + +#: wp-cache.php:1465 wp-cache.php:1481 wp-cache.php:1497 wp-cache.php:1513 +msgid "Delete" +msgstr "" + +#: wp-cache.php:1480 +msgid "Stale WP-Cached Files" +msgstr "" + +#: wp-cache.php:1496 +msgid "Fresh Super Cached Files" +msgstr "" + +#: wp-cache.php:1512 +msgid "Stale Super Cached Files" +msgstr "" + +#: wp-cache.php:1528 +msgid "Hide file list" +msgstr "" + +#: wp-cache.php:1530 +msgid "List all cached files" +msgstr "" + +#: wp-cache.php:1536 +#, php-format +msgid "" +"Garbage Collection
      Last GC was %s " +"minutes ago
      " +msgstr "" + +#: wp-cache.php:1537 +#, php-format +msgid "Next GC in %s minutes" +msgstr "" + +#: wp-cache.php:1540 +#, php-format +msgid "" +"Expired files are files older than %s seconds. They are still used by the " +"plugin and are deleted periodically." +msgstr "" + +#: wp-cache.php:1543 +msgid "Delete Expired" +msgstr "" + +#: wp-cache.php:1549 wp-cache.php:1563 wp-cache.php:1719 +msgid "Delete Cache" +msgstr "" + +#: wp-cache.php:1563 +msgid "Delete Super Cache cached files (opens in new window)" +msgstr "" + +#: wp-cache.php:1695 +#, php-format +msgid "%1$s is Digg proof thanks to caching by %2$s" +msgstr "" + +#: wp-cache.php:1728 +#, php-format +msgid "" +"WP Super Cache must be configured. Go to the admin page " +"to enable and configure the plugin." +msgstr "" + +#: wp-cache.php:1734 +msgid "Settings" +msgstr "" + +#: wp-cache.php:1744 +#, php-format +msgid "" +"WP Super Cache is disabled. Please go to the plugin admin " +"page to enable caching." +msgstr "" + +#: wp-cache.php:1763 +#, php-format +msgid "[%s] Front page is gzipped! Please clear cache!" +msgstr "" + +#: wp-cache.php:1763 +#, php-format +msgid "" +"Please visit %s to clear the cache as the front page of your site is now " +"downloading!" +msgstr "" + +#: wp-cache.php:1766 +#, php-format +msgid "[%s] Front page is gzipped! Cache Cleared!" +msgstr "" + +#: wp-cache.php:1766 +#, php-format +msgid "" +"The cache on your blog has been cleared because the front page of your site " +"is now downloading. Please visit %s to verify the cache has been cleared." +msgstr "" + +#: wp-cache.php:1773 +#, php-format +msgid "[%s] Front page is not correct! Please clear cache!" +msgstr "" + +#: wp-cache.php:1773 +#, php-format +msgid "" +"Please visit %1$s to clear the cache as the front page of your site is not " +"correct and missing the text, \"%2$s\"!" +msgstr "" + +#: wp-cache.php:1776 +#, php-format +msgid "[%s] Front page is not correct! Cache Cleared!" +msgstr "" + +#: wp-cache.php:1776 +#, php-format +msgid "" +"The cache on your blog has been cleared because the front page of your site " +"is missing the text \"%2$s\". Please visit %1$s to verify the cache has been " +"cleared." +msgstr "" + +#: wp-cache.php:1781 +#, php-format +msgid "[%s] Front page check!" +msgstr "" + +#: wp-cache.php:1781 +#, php-format +msgid "" +"WP Super Cache has checked the front page of your blog. Please visit %s if " +"you would like to disable this." +msgstr "" diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/zdmultilang/flags/ar.png Binary file web/wp-content/plugins/zdmultilang/flags/ar.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/zdmultilang/flags/be_BY.png Binary file web/wp-content/plugins/zdmultilang/flags/be_BY.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/zdmultilang/flags/bg_BG.png Binary file web/wp-content/plugins/zdmultilang/flags/bg_BG.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/zdmultilang/flags/bn_BD.png Binary file web/wp-content/plugins/zdmultilang/flags/bn_BD.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/zdmultilang/flags/ca.png Binary file web/wp-content/plugins/zdmultilang/flags/ca.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/zdmultilang/flags/cy.png Binary file web/wp-content/plugins/zdmultilang/flags/cy.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/zdmultilang/flags/cz_CZ.png Binary file web/wp-content/plugins/zdmultilang/flags/cz_CZ.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/zdmultilang/flags/da_DK.png Binary file web/wp-content/plugins/zdmultilang/flags/da_DK.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/zdmultilang/flags/de_DE.png Binary file web/wp-content/plugins/zdmultilang/flags/de_DE.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/zdmultilang/flags/el.png Binary file web/wp-content/plugins/zdmultilang/flags/el.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/zdmultilang/flags/en_GB.png Binary file web/wp-content/plugins/zdmultilang/flags/en_GB.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/zdmultilang/flags/en_US.png Binary file web/wp-content/plugins/zdmultilang/flags/en_US.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/zdmultilang/flags/eo.png Binary file web/wp-content/plugins/zdmultilang/flags/eo.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/zdmultilang/flags/es_ES.png Binary file web/wp-content/plugins/zdmultilang/flags/es_ES.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/zdmultilang/flags/et.png Binary file web/wp-content/plugins/zdmultilang/flags/et.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/zdmultilang/flags/eu.png Binary file web/wp-content/plugins/zdmultilang/flags/eu.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/zdmultilang/flags/fi_FI.png Binary file web/wp-content/plugins/zdmultilang/flags/fi_FI.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/zdmultilang/flags/fo.png Binary file web/wp-content/plugins/zdmultilang/flags/fo.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/zdmultilang/flags/fr_FR.png Binary file web/wp-content/plugins/zdmultilang/flags/fr_FR.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/zdmultilang/flags/gl_ES.png Binary file web/wp-content/plugins/zdmultilang/flags/gl_ES.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/zdmultilang/flags/he_IL.png Binary file web/wp-content/plugins/zdmultilang/flags/he_IL.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/zdmultilang/flags/hr.png Binary file web/wp-content/plugins/zdmultilang/flags/hr.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/zdmultilang/flags/hu_HU.png Binary file web/wp-content/plugins/zdmultilang/flags/hu_HU.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/zdmultilang/flags/id_ID.png Binary file web/wp-content/plugins/zdmultilang/flags/id_ID.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/zdmultilang/flags/is_IS.png Binary file web/wp-content/plugins/zdmultilang/flags/is_IS.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/zdmultilang/flags/it_IT.png Binary file web/wp-content/plugins/zdmultilang/flags/it_IT.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/zdmultilang/flags/ja.png Binary file web/wp-content/plugins/zdmultilang/flags/ja.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/zdmultilang/flags/km_KH.png Binary file web/wp-content/plugins/zdmultilang/flags/km_KH.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/zdmultilang/flags/ko_KR.png Binary file web/wp-content/plugins/zdmultilang/flags/ko_KR.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/zdmultilang/flags/ku.png Binary file web/wp-content/plugins/zdmultilang/flags/ku.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/zdmultilang/flags/lt.png Binary file web/wp-content/plugins/zdmultilang/flags/lt.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/zdmultilang/flags/lv.png Binary file web/wp-content/plugins/zdmultilang/flags/lv.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/zdmultilang/flags/mg_MG.png Binary file web/wp-content/plugins/zdmultilang/flags/mg_MG.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/zdmultilang/flags/mk_MK.png Binary file web/wp-content/plugins/zdmultilang/flags/mk_MK.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/zdmultilang/flags/ms_MY.png Binary file web/wp-content/plugins/zdmultilang/flags/ms_MY.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/zdmultilang/flags/nb_NO.png Binary file web/wp-content/plugins/zdmultilang/flags/nb_NO.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/zdmultilang/flags/nl_NL.png Binary file web/wp-content/plugins/zdmultilang/flags/nl_NL.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/zdmultilang/flags/pl_PL.png Binary file web/wp-content/plugins/zdmultilang/flags/pl_PL.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/zdmultilang/flags/pt_BR.png Binary file web/wp-content/plugins/zdmultilang/flags/pt_BR.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/zdmultilang/flags/pt_PT.png Binary file web/wp-content/plugins/zdmultilang/flags/pt_PT.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/zdmultilang/flags/ro.png Binary file web/wp-content/plugins/zdmultilang/flags/ro.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/zdmultilang/flags/ru_RU.png Binary file web/wp-content/plugins/zdmultilang/flags/ru_RU.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/zdmultilang/flags/si_LK.png Binary file web/wp-content/plugins/zdmultilang/flags/si_LK.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/zdmultilang/flags/sk.png Binary file web/wp-content/plugins/zdmultilang/flags/sk.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/zdmultilang/flags/sl_SI.png Binary file web/wp-content/plugins/zdmultilang/flags/sl_SI.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/zdmultilang/flags/sr_RS.png Binary file web/wp-content/plugins/zdmultilang/flags/sr_RS.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/zdmultilang/flags/sv_SE.png Binary file web/wp-content/plugins/zdmultilang/flags/sv_SE.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/zdmultilang/flags/th.png Binary file web/wp-content/plugins/zdmultilang/flags/th.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/zdmultilang/flags/tr.png Binary file web/wp-content/plugins/zdmultilang/flags/tr.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/zdmultilang/flags/ua_UA.png Binary file web/wp-content/plugins/zdmultilang/flags/ua_UA.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/zdmultilang/flags/uz_UZ.png Binary file web/wp-content/plugins/zdmultilang/flags/uz_UZ.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/zdmultilang/flags/vi_VN.png Binary file web/wp-content/plugins/zdmultilang/flags/vi_VN.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/zdmultilang/flags/zh_CN.png Binary file web/wp-content/plugins/zdmultilang/flags/zh_CN.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/zdmultilang/flags/zh_HK.png Binary file web/wp-content/plugins/zdmultilang/flags/zh_HK.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/zdmultilang/flags/zh_TW.png Binary file web/wp-content/plugins/zdmultilang/flags/zh_TW.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/zdmultilang/images/add.png Binary file web/wp-content/plugins/zdmultilang/images/add.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/zdmultilang/images/edit.png Binary file web/wp-content/plugins/zdmultilang/images/edit.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/zdmultilang/lang/zd_multilang-es_ES.mo Binary file web/wp-content/plugins/zdmultilang/lang/zd_multilang-es_ES.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/zdmultilang/lang/zd_multilang-es_ES.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/zdmultilang/lang/zd_multilang-es_ES.po Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,174 @@ +# +# +# Nina Morawietz < >, 2008. +msgid "" +msgstr "" +"Project-Id-Version: ZdMultilang\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2008-05-02 14:06+0200\n" +"PO-Revision-Date: 2008-08-01 23:35+0100\n" +"Last-Translator: Guillermo Lpez \n" +"Language-Team: en_US \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=iso-8859-1\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: zd_multilang.php:205 +msgid "Languages" +msgstr "Idiomas" + +#: zd_multilang.php:toto +msgid "Posts & Pages" +msgstr "Posts & Pginas" + +msgid "Translations" +msgstr "Traducciones" + +msgid "General Options" +msgstr "Opciones generales" + +msgid "Options" +msgstr "Opciones" + +msgid "Options updated" +msgstr "Opciones actualizadas" + +msgid "Default Language" +msgstr "Idioma por defecto" + +msgid "Show Language Switcher in post" +msgstr "Mostrar es selector de idioma en los posts" + +msgid "Show" +msgstr "Mostrar" + +msgid "Hide" +msgstr "Ocultar" + +msgid "Language Switcher Position" +msgstr "Posicin del selector de idioma" + +msgid "Top" +msgstr "Arriba" + +msgid "Bottom" +msgstr "Abajo" + +msgid "Show Language names in switcher" +msgstr "Mostrar los nombres de los idiomas en el selector" + +msgid "Show Flags in switcher" +msgstr "Mostrar las banderas en el selector" + +msgid "Language Switcher CSS class" +msgstr "Clase CSS del selector de idiomas" + +msgid "Update options" +msgstr "Actualizar opciones" + +msgid "Language Edited" +msgstr "Idioma modificado" + +msgid "Edit Language" +msgstr "Editar Idioma" + +msgid "Language Name" +msgstr "Nombre del Idioma" + +msgid "Language Permalink" +msgstr "Enlace permanente del idioma" + +msgid "Language Added" +msgstr "Idioma aadido" + +msgid "Action" +msgstr "Accin" + +msgid "Language Code" +msgstr "Codigo del Idioma" + +msgid "Permalink" +msgstr "Enlace permanente" + +msgid "Default" +msgstr "por defecto" + +msgid "Edit" +msgstr "Editar" + +msgid "Delete" +msgstr "Suprimir" + +msgid "Add Language" +msgstr "Aadir Idioma" + +msgid "Language deleted" +msgstr "Idioma suprimido" + +msgid "No languages defined, please define some first" +msgstr "Ningn idoma definido, por favor define uno" + +msgid "Post or Page updated" +msgstr "Posts o pginas actualizados" + +msgid "Title" +msgstr "Ttulo" + +msgid "Update" +msgstr "Actualizar" + +msgid "Original title" +msgstr "Ttulo original" + +msgid "Published date" +msgstr "Fecha de publicacion" + +msgid "%d posts or pages are translated" +msgstr "%d de posts o pginas estan traducidos" + +msgid "Categories" +msgstr "Categorias" + +msgid "Tags" +msgstr "Tags" + +msgid "Link Categories" +msgstr "Categorias de los enlaces" + +msgid "Original Term" +msgstr "Termino original" + +msgid "Update Translation" +msgstr "Actualizar traduccin" + +msgid "Translate" +msgstr "Traducir" + +msgid "Only use this option if you want to switch old default language with new one. This will exchange translations between them" +msgstr "Solamente husa esta opcion si quieres cambiar tu idioma por defecto por uno nuevo. Esto las intercambiara entre ellas" + +msgid "Exchange Languages" +msgstr "Intercambiar los idiomas" + +msgid "Default Languages Exchanged" +msgstr "Idiomas por defecto intercambiados" + +msgid "Yes" +msgstr "Si" + +msgid "No" +msgstr "No" + +msgid "Generate permalink for Default language" +msgstr "Generar los enlaces permanentes para el idioma por defecto" + +msgid "Language Switcher" +msgstr "Selector de idiomas" + +msgid "Display untranslated posts" +msgstr "Mostrar posts sin traducir" + +msgid "If Yes, display link \"Translate Original post with Google Translate\"" +msgstr "Activar si para mostrar el enlace \"Traducir el post con Google Translate\"" + diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/zdmultilang/lang/zd_multilang-fr_FR.mo Binary file web/wp-content/plugins/zdmultilang/lang/zd_multilang-fr_FR.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/zdmultilang/lang/zd_multilang-fr_FR.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/zdmultilang/lang/zd_multilang-fr_FR.po Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,263 @@ +msgid "" +msgstr "" +"Project-Id-Version: ZdMultilang\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: \n" +"PO-Revision-Date: \n" +"Last-Translator: Nina Morawietz < >\n" +"Language-Team: Zen-Dreams \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" + +msgid "Translate" +msgstr "Traduire" + +msgid "Translations" +msgstr "Traductions" + +msgid "Posts" +msgstr "Articles" + +msgid "Pages" +msgstr "Pages" + +msgid "Categories" +msgstr "Catégories" + +msgid "Tags" +msgstr "Etiquettes" + +msgid "Links" +msgstr "Liens" + +msgid "Link Categories" +msgstr "Catégories de liens" + +msgid "Languages" +msgstr "Langues" + +msgid "Options" +msgstr "Options" + +msgid "Language Dashboard" +msgstr "Panneau d'administration des traductions" + +msgid "Translate posts" +msgstr "Traduire les articles" + +msgid "Translate pages" +msgstr "Traduire les pages" + +msgid "Translate categories" +msgstr "Traduire les catégories" + +msgid "Translate tags" +msgstr "Traduire les étiquettes" + +msgid "Translate links" +msgstr "Traduire les liens" + +msgid "Translate link categories" +msgstr "Traduire les catégories de liens" + +msgid "Define languages" +msgstr "Définir les langues" + +msgid "Manage options" +msgstr "Gérer les options" + +msgid "Default Languages Exchanged" +msgstr "Langues par défaut échangées" + +msgid "Options updated" +msgstr "Options mises à jour" + +msgid "General Options" +msgstr "Options générales" + +msgid "Default Language" +msgstr "Langue par défaut" + +msgid "Exchange Languages" +msgstr "Echange des Langues" + +msgid "Only use this option if you want to switch old default language with new one. This will exchange translations between them" +msgstr "N'utilisez cette option que si vous voulez exchanger l'ancienne langue par defaut avec celle-ci. Cela permuttera les traductions entre les langues." + +msgid "Generate permalink for Default language" +msgstr "Générer les permaliens pour la langue par défaut" + +msgid "Yes" +msgstr "Oui" + +msgid "No" +msgstr "Non" + +msgid "Display untranslated posts" +msgstr "Afficher les articles non traduits" + +msgid "Show" +msgstr "Affiché" + +msgid "Hide" +msgstr "Masqué" + +msgid "If Yes, display link \"Translate Original post with Google Translate\"" +msgstr "Si Oui, afficher un lien \"Traduire l'article original avec Google Translate\"" + +msgid "Language Switcher" +msgstr "Selecteur de langues" + +msgid "Show Language Switcher in post" +msgstr "Affiche le selecteur de langue dans les articles" + +msgid "Language Switcher Position" +msgstr "Position du selecteur de langue" + +msgid "Top" +msgstr "Haut" + +msgid "Bottom" +msgstr "Bas" + +msgid "Show Language names in switcher" +msgstr "Affiche les noms de langues dans le selecteur" + +msgid "Show Flags in switcher" +msgstr "Affiche les drapeaux dans le selecteur" + +msgid "Language Switcher CSS class" +msgstr "Classe CSS du selecteur de langue" + +msgid "Update options" +msgstr "Mets à jour les options" + +msgid "Language Edited" +msgstr "Langue modifiée" + +msgid "Language Name" +msgstr "Nom de la langue" + +msgid "Language Permalink" +msgstr "Permalien de la langue" + +msgid "Blog name" +msgstr "Nom du blog" + +msgid "Blog description" +msgstr "Description du blog" + +msgid "Edit Language" +msgstr "Editer Langue" + +msgid "Language Added" +msgstr "Langue ajoutée" + +msgid "Action" +msgstr "Action" + +msgid "Language Code" +msgstr "Code de Langue" + +msgid "Permalink" +msgstr "Permalien" + +msgid "Default" +msgstr "par défaut" + +msgid "Edit" +msgstr "Editer" + +msgid "Delete" +msgstr "Supprimer" + +msgid "Add Language" +msgstr "Ajouter une Langue" + +msgid "Show/Hide Available default codes" +msgstr "Afficher/masquer les définitions de langues" + +msgid "Language deleted" +msgstr "Langue supprimée" + +msgid "Posts & Pages" +msgstr "Articles & Pages" + +msgid "No languages defined, please define some first" +msgstr "Aucune langue n'est définie, veuillez en créer avant de continuer" + +msgid "Post or Page updated" +msgstr "Articles ou Pages mise à jour" + +msgid "Translation Status" +msgstr "Etat de la traduction" + +msgid "Actions" +msgstr "Actions" + +msgid "See Original post" +msgstr "Afifche l'article original" + +msgid "Import translation from Google Translate (may not work)" +msgstr "Importer depuis Google Translate (peut ne pas fonctionner)" + +msgid "See translation in Google Translate (if previous link do not work)" +msgstr "Afficher la traduction dans Google Translate (si le lien ci-dessus ne fonctionne pas)" + +msgid "Title" +msgstr "Titre" + +msgid "Excerpt" +msgstr "Extrait" + +msgid "Original title" +msgstr "Titre original" + +msgid "%d posts or pages are translated" +msgstr "%d articles ou pages ont été traduites" + +msgid "Name" +msgstr "Nom" + +msgid "URL" +msgstr "URL" + +msgid "Description" +msgstr "Description" + +msgid "Original Link" +msgstr "Lien original" + +msgid "Original Term" +msgstr "Term original" + +msgid "Update Translation" +msgstr "Modifie la traduction" + +msgid "Language" +msgstr "Langues" + +msgid "Display Languages Name" +msgstr "Affiche les noms de langues" + +msgid "Published date" +msgstr "Date de publication" + +msgid "Published" +msgstr "Publié" + +msgid "Draft" +msgstr "Brouillon" + +msgid "published" +msgstr "publié" + +msgid "draft" +msgstr "brouillon" + +#~ msgid "Update" +#~ msgstr "Mets à jour" + diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/zdmultilang/lang/zd_multilang-pt_BR.mo Binary file web/wp-content/plugins/zdmultilang/lang/zd_multilang-pt_BR.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/zdmultilang/lang/zd_multilang-pt_BR.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/zdmultilang/lang/zd_multilang-pt_BR.po Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,264 @@ +msgid "" +msgstr "" +"Project-Id-Version: zdMultilang\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: \n" +"PO-Revision-Date: \n" +"Last-Translator: Dionizio Bonfim Bach \n" +"Language-Team: Dionizio Bonfim Bach \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: s\n" +"X-Poedit-Language: Portuguese\n" +"X-Poedit-Country: BRAZIL\n" + +msgid "Translate" +msgstr "Traduzir" + +msgid "Translations" +msgstr "Traduções" + +msgid "Posts" +msgstr "Posts" + +msgid "Pages" +msgstr "Páginas" + +msgid "Categories" +msgstr "Categorias" + +msgid "Tags" +msgstr "Tags" + +msgid "Links" +msgstr "Links" + +msgid "Link Categories" +msgstr "Categorias de Links" + +msgid "Languages" +msgstr "Idiomas" + +msgid "Options" +msgstr "Opções" + +msgid "Language Dashboard" +msgstr "Painel do Idioma" + +msgid "Translate posts" +msgstr "Traduzir posts" + +msgid "Translate pages" +msgstr "Traduzir páginas" + +msgid "Translate categories" +msgstr "Traduzir categorias" + +msgid "Translate tags" +msgstr "Traduzir tags" + +msgid "Translate links" +msgstr "Traduzir links" + +msgid "Translate link categories" +msgstr "Traduzir categorias de link" + +msgid "Define languages" +msgstr "Definir idiomas" + +msgid "Manage options" +msgstr "Gerenciar opções" + +msgid "Default Languages Exchanged" +msgstr "Idiomas Padrão foram trocados" + +msgid "Options updated" +msgstr "Opções atualizadas" + +msgid "General Options" +msgstr "Opções Gerais" + +msgid "Default Language" +msgstr "Idioma Padrão" + +msgid "Exchange Languages" +msgstr "Trocar Idiomas" + +msgid "Only use this option if you want to switch old default language with new one. This will exchange translations between them" +msgstr "Somente use esta opção se você deseja alterar o idioma padrão antigo por este novo. Isto trocará as traduções entre eles" + +msgid "Generate permalink for Default language" +msgstr "Gerar Link Permanente para o Idioma Padrão" + +msgid "Yes" +msgstr "Sim" + +msgid "No" +msgstr "Não" + +msgid "Display untranslated posts" +msgstr "Exibir artigos sem tradução" + +msgid "Show" +msgstr "Mostrar" + +msgid "Hide" +msgstr "Esconder" + +msgid "If Yes, display link \"Translate Original post with Google Translate\"" +msgstr "Se Sim, mostrar link \"Traduzir artigo original usando o Tradutor do Google\"" + +msgid "Language Switcher" +msgstr "Troca de Idioma" + +msgid "Show Language Switcher in post" +msgstr "Mostrar Troca de Idioma no artigo" + +msgid "Language Switcher Position" +msgstr "Posição da Troca de Idioma" + +msgid "Top" +msgstr "No topo" + +msgid "Bottom" +msgstr "Abaixo" + +msgid "Show Language names in switcher" +msgstr "Mostrar nomes na Troca de Idioma" + +msgid "Show Flags in switcher" +msgstr "Mostrar bandeiras na Troca de Idioma" + +msgid "Language Switcher CSS class" +msgstr "Classe CSS da Troca de Idioma" + +msgid "Update options" +msgstr "Atualizar opções" + +msgid "Language Edited" +msgstr "Idioma Editado" + +msgid "Language Name" +msgstr "Nome do Idioma" + +msgid "Language Permalink" +msgstr "Link Permanente do Idioma" + +msgid "Blog name" +msgstr "Nome do Site" + +msgid "Blog description" +msgstr "Descrição do Site" + +msgid "Edit Language" +msgstr "Editar Idioma" + +msgid "Language Added" +msgstr "Idioma Adicionado" + +msgid "Action" +msgstr "Ação" + +msgid "Language Code" +msgstr "Código do Idioma" + +msgid "Permalink" +msgstr "Link Permanente" + +msgid "Default" +msgstr "Padrão" + +msgid "Edit" +msgstr "Editar" + +msgid "Delete" +msgstr "Remover" + +msgid "Add Language" +msgstr "Adicionar Idioma" + +msgid "Show/Hide Available default codes" +msgstr "Mostrar/Ocultar códigos disponíveis" + +msgid "Language deleted" +msgstr "Idioma removido" + +msgid "Posts & Pages" +msgstr "Artigos & Páginas" + +msgid "No languages defined, please define some first" +msgstr "Nenhum Idioma definido, favor definir alguns antes de prossegir" + +msgid "Post or Page updated" +msgstr "Artigo ou Página atualizado(a)" + +msgid "Translation Status" +msgstr "Estado das traduções" + +msgid "Actions" +msgstr "Ações" + +msgid "See Original post" +msgstr "Ver Post original" + +msgid "Import translation from Google Translate (may not work)" +msgstr "Importar tradução do Google Translate (pode não funcionar)" + +msgid "See translation in Google Translate (if previous link do not work)" +msgstr "Ver tradução no Google Translate (se o link anterior não funcionar)" + +msgid "Title" +msgstr "Título" + +msgid "Excerpt" +msgstr "Resumo" + +msgid "Original title" +msgstr "Título original" + +msgid "%d posts or pages are translated" +msgstr "%d artigos ou páginas estão traduzidos" + +msgid "Name" +msgstr "Nome" + +msgid "URL" +msgstr "URL" + +msgid "Description" +msgstr "Descrição" + +msgid "Original Link" +msgstr "Link Original" + +msgid "Original Term" +msgstr "Termo Original" + +msgid "Update Translation" +msgstr "Atualizar Tradução" + +msgid "Language" +msgstr "Idioma" + +msgid "Display Languages Name" +msgstr "Mostrar Nome dos Idiomas" + +msgid "Published date" +msgstr "Data de publicação" + +msgid "Published" +msgstr "Publicado" + +msgid "Draft" +msgstr "Rascunho" + +msgid "published" +msgstr "publicado" + +msgid "draft" +msgstr "rascunho" + +#~ msgid "Update" +#~ msgstr "Atualizar" + diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/zdmultilang/lang/zd_multilang.pot --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/zdmultilang/lang/zd_multilang.pot Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,257 @@ +"Project-Id-Version: ZdMultilanguage" +"Report-Msgid-Bugs-To: " +"POT-Creation-Date: 2008-05-02 14:06+0200" +"PO-Revision-Date: " +"Last-Translator: Anthony " +"Language-Team: " +"MIME-Version: 1.0" +"Content-Type: text/plain; charset=UTF-8" +"Content-Transfer-Encoding: 8bit" +"X-Poedit-KeywordsList: __;_e" +"X-Poedit-Basepath: ." +"X-Poedit-SearchPath-0: ." +msgid "Translate" +msgstr "" + +msgid "Translations" +msgstr "" + +msgid "Posts" +msgstr "" + +msgid "Pages" +msgstr "" + +msgid "Categories" +msgstr "" + +msgid "Tags" +msgstr "" + +msgid "Links" +msgstr "" + +msgid "Link Categories" +msgstr "" + +msgid "Languages" +msgstr "" + +msgid "Options" +msgstr "" + +msgid "Language Dashboard" +msgstr "" + +msgid "Translate posts" +msgstr "" + +msgid "Translate pages" +msgstr "" + +msgid "Translate categories" +msgstr "" + +msgid "Translate tags" +msgstr "" + +msgid "Translate links" +msgstr "" + +msgid "Translate link categories" +msgstr "" + +msgid "Define languages" +msgstr "" + +msgid "Manage options" +msgstr "" + +msgid "Default Languages Exchanged" +msgstr "" + +msgid "Options updated" +msgstr "" + +msgid "General Options" +msgstr "" + +msgid "Default Language" +msgstr "" + +msgid "Exchange Languages" +msgstr "" + +msgid "Only use this option if you want to switch old default language with new one. This will exchange translations between them" +msgstr "" + +msgid "Generate permalink for Default language" +msgstr "" + +msgid "Yes" +msgstr "" + +msgid "No" +msgstr "" + +msgid "Display untranslated posts" +msgstr "" + +msgid "Show" +msgstr "" + +msgid "Hide" +msgstr "" + +msgid "If Yes, display link \"Translate Original post with Google Translate\"" +msgstr "" + +msgid "Language Switcher" +msgstr "" + +msgid "Show Language Switcher in post" +msgstr "" + +msgid "Language Switcher Position" +msgstr "" + +msgid "Top" +msgstr "" + +msgid "Bottom" +msgstr "" + +msgid "Show Language names in switcher" +msgstr "" + +msgid "Show Flags in switcher" +msgstr "" + +msgid "Language Switcher CSS class" +msgstr "" + +msgid "Update options" +msgstr "" + +msgid "Language Edited" +msgstr "" + +msgid "Language Name" +msgstr "" + +msgid "Language Permalink" +msgstr "" + +msgid "Blog name" +msgstr "" + +msgid "Blog description" +msgstr "" + +msgid "Edit Language" +msgstr "" + +msgid "Language Added" +msgstr "" + +msgid "Action" +msgstr "" + +msgid "Language Code" +msgstr "" + +msgid "Permalink" +msgstr "" + +msgid "Default" +msgstr "" + +msgid "Edit" +msgstr "" + +msgid "Delete" +msgstr "" + +msgid "Add Language" +msgstr "" + +msgid "Show/Hide Available default codes" +msgstr "" + +msgid "Language deleted" +msgstr "" + +msgid "Posts & Pages" +msgstr "" + +msgid "No languages defined, please define some first" +msgstr "" + +msgid "Post or Page updated" +msgstr "" + +msgid "Translation Status" +msgstr "" + +msgid "Actions" +msgstr "" + +msgid "See Original post" +msgstr "" + +msgid "Import translation from Google Translate (may not work)" +msgstr "" + +msgid "See translation in Google Translate (if previous link do not work)" +msgstr "" + +msgid "Title" +msgstr "" + +msgid "Excerpt" +msgstr "" + +msgid "Original title" +msgstr "" + +msgid "%d posts or pages are translated" +msgstr "" + +msgid "Name" +msgstr "" + +msgid "URL" +msgstr "" + +msgid "Description" +msgstr "" + +msgid "Original Link" +msgstr "" + +msgid "Original Term" +msgstr "" + +msgid "Update Translation" +msgstr "" + +msgid "Language" +msgstr "" + +msgid "Display Languages Name" +msgstr "" + +msgid "Published date" +msgstr "" + +msgid "Published" +msgstr "" + +msgid "Draft" +msgstr "" + +msgid "published" +msgstr "" + +msgid "draft" +msgstr "" \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/zdmultilang/readme.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/zdmultilang/readme.txt Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,97 @@ +=== ZdMultiLang === +Contributors: ZenDreams, PauSanchez +Donate link: http://blog.zen-dreams.com/en/wordpress/zdmultilang/#donate +Tags: Multi language, Wordpress, Zen-Dreams +Requires at least: 2.5.0 +Tested up to: 2.8.6 +Stable tag: 1.2.5 + +ZdMultiLang is a multilingual plugin for wordpress + +== Description == + +ZdMultiLang is a wordpress plugin allowing you to blog in multiple languages. + +Here is a list of functions : + +* Translate posts ang pages +* Translate categories and tags +* Switch blog language +* Widget to change currently viewed language + +== Changelog == + +v1.2.5: + +* The most expected feature is now working. You can have static pages as a frontpage ! +* Updated a bug with translation icon in the page while the page has never been saved +* Added options to hide the flag in the widget +* function zd_multilang_menu now takes two paramaters : zd_multilang_menu (show_language_name, show_language_flag) by default these are true +* Added an option to display original post while translating +* Added a donate button if you want to support development of the plugin +* Added an option to select who can translate things +* Added an option to keep comments separated - work by Pau Sanchez +* Added an autosave feature, can be enabled/disabled from the option page. It will autosave every 5 minutes unless the status is published + +v1.2.4: + +* Update for Wordpress 2.8 : Media Upload fix + Save button fix + +v1.2.1: + +* Updated a variable used to make translations, a bug prevented to translate posts/pages. This has been corrected. + +v1.2.0: + +* Completely redesigned the editor page +* Added import from google feature +* Won't display flags for current language +* Added draft feature for translations +* Added term descriptions +* Added link descriptions and translations, Blog name, Blog description +* Better definition of Languages +* Compatible with Wordpress 2.7 + +v1.1.1: + +* Added the media bar in the html editor +* Found the reason why the editor didn't work : csforms2 is breaking the tiny_mce editor, to fix it, just disable the WP Editor Button support in your general settings. + +v1.1.0: + +* Added the possibility to switch default languages (meaning: exchange original posts/tags/cats with translated ones) +* Added translate links directly into the manage pages & into the Media zone of page/posts edition +* Added an option to generate permalinks for default language (ex-default behavior was always yes) +* Changed default character set as UTF-8 +* Added an option to add "Translate with Google Translate" to untranslated posts +* Added an option to hide untranslated posts if they exists (ex-default : show all posts) + +v1.0.1: + +* Updated all database queries, reduced the numbers of queries executed per page (about 200 queries less) via caching methods. The plugin should now require something like 9 queries per page (which is huge i Know, but to translate a blog, this is "necessary"). + +== Installation == + +1. Setup is very simple, just unzip the archive in your wp-content/plugins folder +2. You can now activate the plugin and change the options. +3. Setup languages and start to translate stuffs + +More on [Official Zdmultilang Page](http://blog.zen-dreams.com/en/zdmultilang "Official Zdmultilang Page") + +== Frequently Asked Questions == +See [Official FAQ](http://blog.zen-dreams.com/en/zdmultilang "Official FAQ") + += I would like to have separated comments for each language. = +In order to have comments tracked separatly for each language, you will have to change your comments.php template file like this: +From this: + +action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" + +to this: + +action="<?php echo get\_option('siteurl'); ?>/wp-comments-post.php?lang=<?php echo zd_multilang\_get\_locale(); ?>" + + + +== Screenshots == +You can check [this page](http://blog.zen-dreams.com/en/zdmultilang "ZdMultilang Screencast") diff -r 000000000000 -r 03b0d1493584 web/wp-content/plugins/zdmultilang/zd_multilang.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/plugins/zdmultilang/zd_multilang.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,1835 @@ + $LanguageID) { + if ($LanguageID!=$ZdmlCache['DefLang']) echo ''.$LanguageID.' '; + } + } +} + +function zd_media_button() { + global $ZdmlCache, $PluginDIR; + $id=$_GET['post']; + if ($id) { + $BaseURL='admin.php?page='.plugin_basename (__FILE__); + if ($ZdmlCache['Languages']) foreach ($ZdmlCache['Languages'] as $Permalink => $LanguageID) { + if ($LanguageID!=$ZdmlCache['DefLang']) echo ''.$LanguageID.''; + } + } +} + +function zd_multilang_where_filter($filter) { + global $ZdmlCache, $locale,$display_untranslated, $wpdb, $wp_query; + + if ((get_option('show_on_front')=='page')&&(is_array($wp_query->query))&&(count($wp_query->query)<=1)&&(isset($wp_query->query['lang']))) { + $lang=$WP->query['lang']; + $filter=" AND ".$wpdb->posts.".ID = ".get_option('page_on_front'); + $wp_query->is_page=1; + $wp_query->is_home=0; + } + + if ($locale==$ZdmlCache['DefLang']) return $filter; + if (get_option($display_untranslated)=="hide") { + $filter.=" AND ".$wpdb->posts.".ID in (".$ZdmlCache['TranslatedPosts'][$locale].')'; + } + return $filter; +} + +function zd_multilang_np_where_filter($filter) { + global $ZdmlCache, $locale,$display_untranslated, $wpdb; + if ($locale==$ZdmlCache['DefLang']) return $filter; + if (get_option($display_untranslated)=="hide") { + $filter.=" AND p.ID in (".$ZdmlCache['TranslatedPosts'][$locale].')'; + } + return $filter; +} + +function zd_multilang_set_locale($WP) { + global $wp_query,$wpdb, $wp_rewrite,$default_language_option,$locale,$CurrentLanguagePermalink,$CurrentLang; + global $ZdmlCache; + + $language_table=$wpdb->prefix.'zd_ml_langs'; + $termtrans=$wpdb->prefix.'zd_ml_termtrans'; + $posttrans=$wpdb->prefix.'zd_ml_trans'; + $linktrans=$wpdb->prefix.'zd_ml_linktrans'; + + $ZdmlCache['DefLang']=get_option("zd_multilang_defaultlanguage"); + $ZdmlCache['InsertInPosts']=get_option("zd_multilang_lang_switcher"); + $ZdmlCache['ShowLanguages']=get_option("zd_multilang_langnames"); + $ZdmlCache['ShowFlags']=get_option("zd_multilang_show_flags"); + $ZdmlCache['SwitcherPosition']=get_option('zd_multilang_position'); + $ZdmlCache['Lang_Switch_Class']=(get_option("zd_multilang_switcher_class")!="") ? get_option("zd_multilang_switcher_class") : "lang_switch"; + + $TheLocale=$ZdmlCache['DefLang']; + + if (!isset($ZdmlCache['Languages'])) { + $query="SELECT * FROM $language_table ORDER BY LanguageName"; + $results=$wpdb->get_results($query, ARRAY_A); + if ($results) { + foreach ($results as $ID => $V) { + $ZdmlCache['Languages'][$V['LangPermalink']]=$V['LanguageID']; + $ZdmlCache['LanguageNames'][$V['LangPermalink']]=$V['LanguageName']; + $ZdmlCache['Options'][$V['LanguageID']]['blogname']=$V['BlogName']; + $ZdmlCache['Options'][$V['LanguageID']]['blogdescription']=$V['BlogDescription']; + } + } + } + else { + foreach ($ZdmlCache['Languages'] as $Permalink => $LangID) { + $results[$i]['LangPermalink']=$Permalink; + $results[$i]['LanguageID']=$LangID; + $i++; + } + } + + if ($_SERVER['HTTPS']) $QUERY="https://".$_SERVER['HTTP_HOST']; + else $QUERY="http://".$_SERVER['HTTP_HOST']; + $QUERY.=$_SERVER['REQUEST_URI']; + + if ($results) { + foreach ($results as $ID => $Lang) { + $regexp.=$Lang['LangPermalink']."|"; + } + $regexp=substr($regexp, 0, -1); + } + if (strstr($QUERY,"?")) $RegularExpression="`".get_bloginfo('url')."\/.*lang=($regexp)(.*)?`U"; + else $RegularExpression="`".get_bloginfo('url')."\/($regexp)\/(.*)?`U"; + + if (preg_match($RegularExpression,$QUERY,$res)==TRUE) { + $Lang=$res[1]; + $CurrentLanguagePermalink=$res[1]; + foreach ($ZdmlCache['Languages'] as $Permalink => $LangFound) { + if ($Permalink==$Lang) { + $Language= $LangFound; + break; + } + } + $CurrentLang=$Language; + if ($Language) $TheLocale=$Language; + } + $locale=$TheLocale; + + if (!isset($ZdmlCache['Terms'])) { + $query="SELECT tt.LanguageID, tt.name as t_name, tt.description as description, t.* FROM $termtrans tt RIGHT JOIN ".$wpdb->prefix."terms t on (tt.term_id=t.term_id)"; + $term=$wpdb->get_results($query, ARRAY_A); + foreach ($term as $ID => $Value) { + if ($Value['t_name']!=NULL) $ZdmlCache['Terms'][$Value['term_id']][$Value['LanguageID']]['name']=$Value['t_name']; + else $ZdmlCache['Terms'][$Value['term_id']][$Value['LanguageID']]['name']=$Value['name']; + $ZdmlCache['Terms'][$Value['term_id']][$Value['LanguageID']]['o_name']=$Value['name']; + $ZdmlCache['Terms'][$Value['term_id']][$Value['LanguageID']]['description']=$Value['description']; + } + } + + if (!isset($ZdmlCache['Links'])) { + $query="SELECT * from $linktrans"; + $links=$wpdb->get_results($query); + foreach ($links as $id => $Values) { + $ZdmlCache['Links'][$Values->link_id][$Values->LanguageID]['name']=$Values->link_name; + $ZdmlCache['Links'][$Values->link_id][$Values->LanguageID]['url']=$Values->link_url; + $ZdmlCache['Links'][$Values->link_id][$Values->LanguageID]['description']=$Values->link_description; + } + } + + if (!isset($ZdmlCache['TranslatedPosts'])) { + if ($ZdmlCache['Languages']) foreach ($ZdmlCache['Languages'] as $Permalink => $LangID) { + if ($LangID!=$ZdmlCache['DefLang']) { + $query="SELECT ID from $posttrans WHERE LanguageID='$LangID' and post_status='published'"; + $res=$wpdb->get_results($query, ARRAY_A); + if ($res) { + $ZdmlCache['TranslatedPosts'][$LangID]=""; + foreach ($res as $key => $V) { + $ZdmlCache['TranslatedPosts'][$LangID].=$V['ID'].","; + } + $ZdmlCache['TranslatedPosts'][$LangID]=substr($ZdmlCache['TranslatedPosts'][$LangID],0,-1); + } + } + } + } + + return $WP; +} + +function zd_multilang_permalink($permalink) { + global $wpdb, $wp_rewrite,$default_language_option, $CurrentLanguagePermalink,$CurrentLang,$permalink_default, $locale, $wp_query; + global $ZdmlCache; + $langstable=$wpdb->prefix.'zd_ml_langs'; + + $Lang=$CurrentLanguagePermalink; + if ($Lang=="") { + $CurrentLang=$ZdmlCache['DefLang']; + $query="SELECT LangPermalink FROM $langstable where LanguageID='$CurrentLang'"; + $CurrentLanguagePermalink=$wpdb->get_var($query); + $Lang=$CurrentLanguagePermalink; + } + $link=$permalink; + + $PermalinkDef=get_option($permalink_default); + if (($PermalinkDef=="no")&&($ZdmlCache['DefLang']==$locale)) return $link; + + if ($wp_rewrite->using_permalinks()) { + $url=get_bloginfo('url'); + $end=substr($link,strlen($url)); + if ($Lang=="") $link=$url.$end; + else $link=$url.'/'.$Lang.$end; + } else if ($Lang) $link.= ((!strpos($link,'?'))? '?': '') ."&lang=".$Lang; + + return $link; +} + +function zd_multilang_rewrite($permalink_structure) { + global $ZdmlCache; + global $wpdb, $wp_rewrite; + $langs=$wpdb->prefix.'zd_ml_langs'; + + $query="SELECT * FROM $langs order by LanguageID"; + $Lines=$wpdb->get_results($query, ARRAY_A); + if ($Lines) { + $regexp='('; + foreach ($Lines as $Value) { + $regexp.=$Value['LangPermalink'].'|'; + } + $regexp=substr($regexp,0,-1); + $regexp.=')'; + + if ($permalink_structure) foreach ($permalink_structure as $Rule => $Definition) { + $def=explode('?',$Definition); + $rule=$Definition; + if (preg_match_all('/(.*matches)\[([0-9]+)\]/U',$rule,$res)) { + $rule=""; + foreach ($res[1] as $index => $text) { + $rule.=$text.'['.($index+2).']'; + } + } + $rule.='&lang=$matches[1]'; + $new_rules[$regexp.'/'.$Rule]=$rule; + } + $new_rules2[$regexp.'/?']='index.php?lang=$matches[1]'; + if ($permalink_structure) $permalink_structure = $new_rules+ $new_rules2 + $permalink_structure; + } + return $permalink_structure; +} + +function zd_multilang_is_translated($id, $lang) { + global $ZdmlCache, $locale; + if ($lang==$ZdmlCache['DefLang']) return TRUE; + $Posts=explode(',',$ZdmlCache['TranslatedPosts'][$lang]); + foreach ($Posts as $key => $ID) { + if ($ID==$id) { + return TRUE; + } + } + return FALSE; +} + +function zd_multilang_install() { + global $ZdmlCache; + global $wpdb; + $termtrans=$wpdb->prefix.'zd_ml_termtrans'; + $langs=$wpdb->prefix.'zd_ml_langs'; + $posttrans=$wpdb->prefix.'zd_ml_trans'; + $linktrans=$wpdb->prefix.'zd_ml_linktrans'; + $commenttrans=$wpdb->prefix.'zd_ml_comments'; + + $dbversion=get_option('zd_multilang_dbschema'); + if ($dbversion<"125") { + $sql="CREATE TABLE $langs ( + LanguageID varchar(5) NOT NULL, + LanguageName varchar(100) character set utf8 NOT NULL, + LangPermalink varchar(50) NOT NULL UNIQUE, + BlogName longtext, + BlogDescription longtext, + primary key (LanguageID) + );"; + require_once(ABSPATH . 'wp-admin/includes/upgrade.php'); + dbDelta($sql); + + $sql="CREATE TABLE $termtrans ( + term_id varchar(5) NOT NULL, + LanguageID varchar(5) NOT NULL, + name varchar(255) character set utf8 NOT NULL, + description longtext NOT NULL, + primary key (term_id,LanguageID) + );"; + require_once(ABSPATH . 'wp-admin/includes/upgrade.php'); + dbDelta($sql); + + $sql="CREATE TABLE $posttrans ( + ID BIGINT(20) NOT NULL, + LanguageID varchar(5), + post_content longtext character set utf8, + post_excerpt text character set utf8, + post_title text character set utf8 NOT NULL, + post_status varchar(10), + primary key (ID, LanguageID) + );"; + require_once(ABSPATH . 'wp-admin/includes/upgrade.php'); + dbDelta($sql); + + $sql="CREATE TABLE $linktrans ( + link_id BIGINT(20) NOT NULL, + LanguageID varchar(5), + link_url varchar(255), + link_name varchar(255) character set utf8, + link_description varchar(255) character set utf8, + primary key (link_id, LanguageID) + );"; + require_once(ABSPATH . 'wp-admin/includes/upgrade.php'); + dbDelta($sql); + + $sql="UPDATE $posttrans set post_status='published' where post_status is NULL"; + $wpdb->query($sql); + + // Comment translations only should keep track of the language where a single comment has been submitted + $sql="CREATE TABLE $commenttrans ( + comment_id BIGINT(20) UNSIGNED NOT NULL, + post_id BIGINT(20) UNSIGNED NOT NULL, + LanguageID varchar(5), + primary key (comment_id) + );"; + require_once(ABSPATH . 'wp-admin/includes/upgrade.php'); + dbDelta($sql); + + update_option('zd_multilang_dbschema',125); + update_option('zd_multilang_access',10); + } +} + +function zd_multilang_add_pages() { + global $Allowed_Access; + $Allowed_Access_Level=get_option($Allowed_Access); + add_menu_page('Zd_MultiLang', __('Translations','zd_multilang'), $Allowed_Access_Level, __FILE__, 'zd_multilang_page'); + add_submenu_page(__FILE__,__('Posts','zd_multilang'),__('Posts','zd_multilang'),$Allowed_Access_Level,__FILE__.'&fct=posts&tr=posts','zd_multilang_page'); + add_submenu_page(__FILE__,__('Pages','zd_multilang'),__('Pages','zd_multilang'),$Allowed_Access_Level,__FILE__.'&fct=posts&tr=pages','zd_multilang_page'); + add_submenu_page(__FILE__,__('Categories','zd_multilang'),__('Categories','zd_multilang'),$Allowed_Access_Level,__FILE__.'&fct=translations&tr=cat','zd_multilang_page'); + add_submenu_page(__FILE__,__('Tags','zd_multilang'),__('Tags','zd_multilang'),$Allowed_Access_Level,__FILE__.'&fct=translations&tr=tags','zd_multilang_page'); + add_submenu_page(__FILE__,__('Links','zd_multilang'),__('Links','zd_multilang'),$Allowed_Access_Level,__FILE__.'&fct=links','zd_multilang_page'); + add_submenu_page(__FILE__,__('Link Categories','zd_multilang'),__('Link Categories','zd_multilang'),$Allowed_Access_Level,__FILE__.'&fct=translations&tr=linkcat','zd_multilang_page'); + add_submenu_page(__FILE__,__('Languages','zd_multilang'),__('Languages','zd_multilang'),'manage_options',__FILE__.'&fct=languages','zd_multilang_page'); + add_submenu_page(__FILE__,__('Options','zd_multilang'),__('Options','zd_multilang'),'manage_options',__FILE__.'&fct=options','zd_multilang_page'); +} + +function zd_multilang_page() { + global $BaseURL, $current_user; + get_currentuserinfo(); + echo "\n".'

      '; + if ($_POST['fct']) $_GET['fct']=$_POST['fct']; + switch ($_GET['fct']) { + case 'options': + if ($current_user->allcaps['manage_options']==1) + zd_multilang_options(); + else { + echo '

      Only the administrator can edit the options

      '; + zd_multilang_dashboard(); + } + break; + case 'edit': + if ($current_user->allcaps['manage_options']==1) + zd_multilang_edit_language(); + else { + echo '

      Only the administrator can edit the options

      '; + zd_multilang_dashboard(); + } + break; + case 'delete': + if ($current_user->allcaps['manage_options']==1) + zd_multilang_delete_language(); + else { + echo '

      Only the administrator can edit the options

      '; + zd_multilang_dashboard(); + } + break; + case 'posts': + zd_multilang_post_translations(); + break; + case 'translations'; + zd_multilang_term_translations(); + break; + case 'languages': + if ($current_user->allcaps['manage_options']==1) + zd_multilang_languages(); + else { + echo '

      Only the administrator can edit the options

      '; + zd_multilang_dashboard(); + } + break; + case 'links': + zd_multilang_link_translations(); + break; + default: + zd_multilang_dashboard(); + break; + } + echo "\n
      "; +} + +function zd_multilang_dashboard() { + global $BaseURL, $current_user; + get_currentuserinfo();; + echo '

      '.__('Language Dashboard','zd_multilang').'

      '; + echo ''; + echo '
      + + + + +
      '; +} + +function zd_multilang_options() { + global $wpdb, $BaseURL,$default_language_option,$insert_lang_switch_option,$show_flags_option,$display_google_translate; + global $show_languages_option,$lang_switcher_class_option,$permalink_default,$display_untranslated, $display_original_option,$keep_separate_comments, $Allowed_Access,$Autosave_Option; + global $ZdmlCache; + + $language_table=$wpdb->prefix.'zd_ml_langs'; + $termtrans=$wpdb->prefix.'zd_ml_termtrans'; + $posttrans=$wpdb->prefix.'zd_ml_trans'; + $hidden_field="zd_multilang_update_options"; + $language_table= $wpdb->prefix.'zd_ml_langs'; + + echo '
      + + + + +
      '; + + if ($_POST[$hidden_field]) { + $OldLang=get_option($default_language_option); + $DefLang=$_POST['def_lang']; + $DisplayOriginal=$_POST['display_original']; + $InsertInPosts=$_POST['show_language_switcher']; + $Show_Languages=$_POST['show_languages']; + $Show_Flags=$_POST['show_flags']; + $Lang_Switch_Class=$_POST['lang_switch_class']; + $SwitcherPosition=$_POST['language_switcher_position']; + $KeepSeparateComments=$_POST['keep_separate_comments']; + $PermalinkDef=$_POST['permalink_for_default']; + $Exchange=$_POST['exchange_lang']; + $DisplayUntranslated=$_POST['display_untranslated']; + $DisplayGLink=$_POST['display_glink']; + $Allowed_Access_Level=$_POST['access_level']; + $Autosave=$_POST['autosave']; + + update_option('zd_multilang_position',$SwitcherPosition); + update_option($default_language_option,$DefLang); + update_option($display_original_option, $DisplayOriginal); + update_option($insert_lang_switch_option,$InsertInPosts); + update_option($show_languages_option,$Show_Languages); + update_option($show_flags_option,$Show_Flags); + update_option($lang_switcher_class_option,$Lang_Switch_Class); + update_option($permalink_default, $PermalinkDef); + update_option($display_untranslated,$DisplayUntranslated); + update_option($display_google_translate,$DisplayGLink); + update_option($keep_separate_comments, $KeepSeparateComments); + update_option($Allowed_Access,$Allowed_Access_Level); + update_option($Autosave_Option,$Autosave); + + echo '
      '; + if ($Exchange=="on") { + $query="SELECT * FROM $posttrans where LanguageID='$DefLang'"; + $TrPosts=$wpdb->get_results($query, ARRAY_A); + $query="SELECT * FROM $termtrans where LanguageID='$DefLang'"; + $TrTerms=$wpdb->get_results($query, ARRAY_A); + + if ($TrPosts) foreach ($TrPosts as $key => $V) { + $query="SELECT * from ".$wpdb->posts." WHERE ID=".$V['ID']; + $res=$wpdb->get_row($query); + $OriginalTitle=$res->post_title; + $OriginalContent=$wpdb->escape($res->post_content); + $NewContent=$wpdb->escape($V['post_content']); + $NewTitle=$V['post_title']; + $q1="UPDATE ".$wpdb->posts." set post_title='$NewTitle', post_content='$NewContent' WHERE ID=".$V['ID']; + $wpdb->query($q1); + $q1="UPDATE $posttrans set post_title='$OriginalTitle', post_content='$OriginalContent', LanguageID='$OldLang' WHERE ID=".$V['ID']." and LanguageID='$DefLang'"; + $wpdb->query($q1); + } + if ($TrTerms) foreach ($TrTerms as $key => $V) { + $query="SELECT * from ".$wpdb->terms." WHERE term_id=".$V['term_id']; + $res=$wpdb->get_row($query); + $OriginalTerm=$res->name; + $NewTerm=$V['name']; + $q1="UPDATE ".$wpdb->terms." SET name='$NewTerm' WHERE term_id=".$V['term_id']; + $wpdb->query($q1); + $q1="UPDATE $termtrans SET name='$OriginalTerm', LanguageID='$OldLang' WHERE LanguageID='$DefLang' and term_id=".$V['term_id']; + + $wpdb->query($q1); + } + echo '

      '.__('Default Languages Exchanged','zd_multilang').'

      '; + } + echo '

      '.__('Options updated','zd_multilang').'

      '; + echo '
      '; + } + $query="SELECT * FROM $language_table order by LanguageName"; + $Languages=$wpdb->get_results($query, ARRAY_A); + $DefaultLanguage=get_option($default_language_option); + $InsertInPosts=get_option($insert_lang_switch_option); + $ShowLanguages=get_option($show_languages_option); + $ShowFlags=get_option($show_flags_option); + $SwitcherPosition=get_option('zd_multilang_position'); + $DisplayUntranslated=get_option($display_untranslated); + $DisplayGlink=get_option($display_google_translate); + $DisplayOriginal=get_option($display_original_option); + $Lang_Switch_Class=(get_option($lang_switcher_class_option)!="") ? get_option($lang_switcher_class_option) : "lang_switch"; + $Allowed_Access_Level=get_option($Allowed_Access); + $Autosave=get_option($Autosave_Option); + + echo ''; + + echo "\n\t

      ".__('General Options','zd_multilang')."

      "; + echo "\n\t".'
      '; + echo "\n\t".''; + echo "\n\t".''; + echo "\n\t".''; + echo "\n\t\t"; + echo "\n\t\t"; + echo "\n\t\t"; + echo "\n\t\t"; + echo "\n\t\t"; + echo "\n\t\t"; + echo "\n\t\t"; + echo "\n\t\t"; + echo "\n\t\t"; + echo '
      ".__('Level required to translate items','zd_multilang').""; + echo ''; + echo "
      ".__('Default Language','zd_multilang').""; + echo ''; + echo "
      ".__('Exchange Languages','zd_multilang')."
      ".__('Only use this option if you want to switch old default language with new one. This will exchange translations between them','zd_multilang')."
      "; + echo ''; + echo "
      ".__('Display Original post while translating','zd_multilang').""; + echo ''; + echo "
      ".__('Automatically save translation every 5 minutes','zd_multilang').""; + echo ''; + echo "
      ".__('Generate permalink for Default language','zd_multilang').""; + echo ''; + echo "
      ".__('Keep separate comments for each language','zd_multilang').""; + echo ''; + echo "
      ".__('Display untranslated posts','zd_multilang').""; + echo ''; + echo "
      ".__('If Yes, display link "Translate Original post with Google Translate"','zd_multilang').""; + echo ''; + echo "
      '; + echo '

      '.__('Language Switcher','zd_multilang').'

      '; + echo "\n\t".''; + echo "\n\t\t"; + echo "\n\t\t"; + echo "\n\t\t"; + echo "\n\t\t"; echo "\n\t\t"; + echo "\n\t".'
      ".__('Show Language Switcher in post','zd_multilang').""; + echo ''; + echo "
      ".__('Language Switcher Position','zd_multilang').""; + echo ''; + echo "
      ".__('Show Language names in switcher','zd_multilang').""; + echo ''; + echo "
      ".__('Show Flags in switcher','zd_multilang').""; + echo ''; + echo "
      ".__('Language Switcher CSS class','zd_multilang').""; + echo ''; + echo "
      '; + echo "\n\t".'

      '; + echo "\n".'
      '; +} + +function zd_multilang_edit_language() { + global $wpdb, $BaseURL,$default_language_option, $BaseURL, $PluginDIR, $wp_rewrite; + global $ZdmlCache; + $language_table= $wpdb->prefix.'zd_ml_langs'; + $hidden_field="zd_multilang_edit_language"; + + + if ($_POST[$hidden_field]) { + $Action=$_POST[$hidden_field]; + $LangCode=$_POST['lang_code']; + $LangName=$_POST['lang_name']; + $LangPermalink=$_POST['lang_permalink']; + $BlogName=$_POST['blog_name']; + $BlogDesc=$_POST['blog_description']; + echo '

      '; + if ($Action=="edit") { + $query="UPDATE $language_table set LanguageName='$LangName',LangPermalink='$LangPermalink', BlogName='$BlogName', BlogDescription='$BlogDesc' WHERE LanguageID='$LangCode'"; + $wpdb->query($query); + if ($_POST['def_lang']=="on") update_option($default_language_option,$LangCode); + echo __('Language Edited','zd_multilang'); + } + echo '

      '; + zd_multilang_languages(); + return; + } + $DefaultLanguage=$ZdmlCache['DefLang']; + $Code=$_GET['lang']; + $query="SELECT * FROM $language_table where LanguageID='$Code'"; + $row=$wpdb->get_row($query, ARRAY_A); + + echo "

      ".__('Languages','zd_multilang').'


      '; + echo "

      ".__('Edit Language','zd_multi').' '.$_GET['lang'].'

      '; + echo "\n\t".'
      '; + echo "\n\t".''; + echo "\n\t".''; + echo "\n\t".''; + echo "\n\t".''; + echo "\n\t\t"; + echo "\n\t\t"; + echo "\n\t\t"; + echo "\n\t\t"; + echo "\n\t\t"; + echo "\n\t".'
      ".__('Language Name','zd_multilang').""; + echo ''; + echo "
      ".__('Language Permalink','zd_multilang').""; + echo ''; + echo "
      ".__('Blog name','zd_multilang').""; + echo ''; + echo "
      ".__('Blog description','zd_multilang').""; + echo ''; + echo "
      ".__('Default Language','zd_multilang')." ?"; + if ($row['LanguageID']==$DefaultLanguage) $selected='checked="on"'; + else $selected=""; + echo ''; + echo "
      '; + echo "\n\t".'

      '; + echo "\n\t
      "; +} + +function zd_multilang_languages() { + global $ZdmlCache; + global $wpdb, $BaseURL,$default_language_option, $BaseURL, $PluginDIR, $wp_rewrite; + $language_table= $wpdb->prefix.'zd_ml_langs'; + + $hidden_field="zd_multilang_add_language"; + + echo "

      ".__('Languages','zd_multilang').'


      '; + + if ($_POST[$hidden_field]) { + $Action=$_POST[$hidden_field]; + $LangCode=$_POST['lang_code']; + $LangName=$_POST['lang_name']; + $LangPermalink=$_POST['lang_permalink']; + echo '

      '; + if ($Action=="add") { + $query="INSERT INTO $language_table VALUES ('$LangCode','$LangName','$LangPermalink',NULL,NULL)"; + $wpdb->query($query); + if ($_POST['def_lang']=="on") update_option($default_language_option,$LangCode); + echo __('Language Added','zd_multilang'); + } + echo '


      '; + } + + $DefaultLanguage=$ZdmlCache['DefLang']; + $query="SELECT * FROM $language_table order by LanguageName"; + $Languages=$wpdb->get_results($query, ARRAY_A); + if ($Languages) { + echo ''; + echo ''; + foreach ($Languages as $Index => $Values) { + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + } + echo '
      '.__('Action','zd_multilang').''.__('Language Name','zd_multilang').''.__('Language Code','zd_multilang').''.__('Permalink','zd_multilang').''.__('Default','zd_multilang').'
      '.__('Edit','zd_multilang').' - '.__('Delete','zd_multilang').' '.$Values['LanguageName'].''.$Values['LanguageID'].''.$Values['LangPermalink'].' '; + if ($Values['LanguageID']==$DefaultLanguage) echo "".__('Default Language', 'zd_multilang').""; + echo '
      '; + } + + echo "

      ".__('Add Language','zd_multilang').'

      '; + echo "\n\t".'
      '; + echo "\n\t".''; + echo "\n\t".''; + echo "\n\t".''; + echo "\n\t\t"; + echo "\n\t\t"; + echo "\n\t\t"; + echo "\n\t\t"; + echo "\n\t".'
      ".__('Language Name','zd_multilang').""; + echo ''; + echo "
      ".__('Language Code','zd_multilang').""; + echo ''; + echo "
      ".__('Language Permalink','zd_multilang').""; + echo ''; + echo "
      ".__('Default Language','zd_multilang')." ?"; + echo ''; + echo "
      '; + echo "\n\t".'

      '; + echo "\n\t

      ".__('Show/Hide Available default codes','zd_multilang')."

      "; + + $DefaultLanguagesCodes=array ( + 'ar' => array ('Arabian', 'ar'),'bn_BD' => array ('Bengali','bn'),'be_BY' => array ('Belarusian','be'), + 'bg_BG' => array ('Bulgarian','bg'),'ca' => array ('Catalan','ca'),'zh_CN' => array ('Chinese','cn'), + 'zh_HK' => array ('Hong Kong','hk'),'zh_TW' => array ('Taiwan','tw'),'hr' => array ('Croatian','hr'), + 'cz_CZ' => array ('Czech','cz'),'da_DK' => array ('Danish','dk'),'nl_NL' => array ('Dutch','nl'), + 'en_US' => array ('English','en'),'eu' => array ('Euskadi','eu'),'eo' => array ('Esperanto','eo'), + 'et' => array ('Estonian','et'),'fo' => array ('Faroe','fo'),'fi_FI' => array ('Finnish','fi'), + 'fr_FR' => array ('French','fr'),'gl_ES' => array ('Galician','gl'),'de_DE' => array ('German','de'), + 'el' => array ('Greek','gr'),'he_IL' => array ('Hebrew','il'),'hu_HU' => array ('Hungarian','hu'), + 'is_IS' => array ('Icelandic','is'),'id_ID' => array ('Indonesian','id'),'it_IT' => array ('Italian','it'), + 'ja' => array ('Japanese','jp'),'km_KH' => array ('Khmer','km'),'ko_KR' => array ('Korean','ko'), + 'ku' => array ('Kurdish','ku'),'lv' => array ('Latvian','lv'),'lt' => array ('Lithuanian','lt'), + 'mk_MK' => array ('Macedonian','mk'),'mg_MG' => array ('Malgasy','mg'),'ms_MY' => array ('Malay','my'), + 'nb_NO' => array ('Norwegian','no'),'pl_PL' => array ('Polish','pl'),'pt_BR' => array ('Brazilian Portuguese','br'), + 'pt_PT' => array ('European Portuguese','pt'),'ro' => array ('Romanian','ro'),'ru_RU' => array ('Russian','ru'), + 'sr_RS' => array ('Serbian','sr'),'si_LK' => array ('Sinhala','lk'),'sl_SI' => array ('Slovenian','sl'), + 'sk' => array ('Slovak','sk'),'es_ES' => array ('Spanish','es'),'sv_SE' => array ('Swedish','se'), + 'th' => array ('Thai','th'),'tr' => array ('Turkish','tr'),'ua_UA' => array ('Ukrainian','ua'), + 'uz_UZ' => array ('Uzbek','uz'),'vi_VN' => array ('Vietnamse','vn'),'cy' => array ('Welsh','cy') + ); + + echo ' +'; + + $wp_rewrite->flush_rules(); +} + +function zd_multilang_delete_language() { + global $ZdmlCache; + global $BaseURL, $wpdb,$default_language_option; + $DefaultLanguage=$ZdmlCache['DefLang']; + + $language_table= $wpdb->prefix.'zd_ml_langs';$termtrans_table = $wpdb->prefix.'zd_ml_termtrans'; + $LangCode=$_GET['lang']; + $query="DELETE FROM $language_table WHERE LanguageID='$LangCode'"; + $wpdb->query($query); + $query="DELETE FROM $termtrans_table WHERE LanguageID='$LangCode'"; + $wpdb->query($query); + + echo '

      '; + echo __('Language deleted','zd_multilang'); + echo '

      '; + zd_multilang_languages(); +} + +function zd_multilang_post_translations() { + global $ZdmlCache; + global $BaseURL, $wpdb,$default_language_option,$PluginDIR, $display_original_option; + $language_table= $wpdb->prefix.'zd_ml_langs'; + $termtrans_table = $wpdb->prefix.'zd_ml_termtrans'; + $posttrans=$wpdb->prefix.'zd_ml_trans'; + $hidden_field="zd_multilang_edit_translation"; + + $Autosave=get_option('zdmultilang_autosave'); + + echo "

      ".__('Posts & Pages','zd_multilang').'

      '; + + $query="SELECT * FROM $language_table order by LanguageName"; + $Languages=$wpdb->get_results($query, ARRAY_A); + if (!$Languages) { + echo '

      '.__('No languages defined, please define some first','zd_multilang').'

      '; + return; + } + $DefaultLanguage=$ZdmlCache['DefLang']; + + if ($_POST['id']) { + list($ID, $Lang) = split("\.",$_POST['id']); + $Content=$_POST['content']; + $Title=$_POST['post_title']; + $Status=$_POST['post_status']; + $Excerpt=$_POST['post_excerpt']; + $var=$wpdb->get_var("SELECT ID from $posttrans WHERE ID='$ID' and LanguageID='$Lang'"); + if ($var==$ID) { + $query="UPDATE $posttrans set post_content='$Content', post_title='$Title', post_status='$Status', post_excerpt='$Excerpt' WHERE ID='$ID' and LanguageID='$Lang'"; + } else $query="INSERT INTO $posttrans (`ID`, `LanguageID`, `post_content`, `post_title`, `post_status`, `post_excerpt`) values ('$ID', '$Lang', '$Content', '$Title','$Status', '$Excerpt')"; + $wpdb->query($query); + echo '

      '; + echo __('Post or Page updated','zd_multilang'); + echo '


      '; + $_GET['id']=$_POST['id']; + } + if ($_GET['id']) { + list($ID, $Lang) = split('\.', $_GET['id']); + $query='SELECT * FROM '.$wpdb->prefix.'posts WHERE ID='.$ID; + $res=$wpdb->get_results($query); + $OriginalText=str_replace(array("\r","\n"),array ("",""), strip_tags($res[0]->post_content)); + $OriginalPost=$res[0]->post_content; + echo '
      '; + $query="SELECT * FROM $posttrans WHERE LanguageID='$Lang' and ID=".$ID; + $res=$wpdb->get_results($query, ARRAY_A); + + if ($res[0]['post_status']==NULL) $res[0]['post_status']='draft'; + + $From=array_search($DefaultLanguage,$ZdmlCache['Languages']); + $To=array_search($Lang,$ZdmlCache['Languages']); + + echo '
      '; + echo ''; + echo ''; + echo '
      '; + echo '
      +
      +
      +

      +

      + +

      + +
      +

      + +
      +

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

      '.__('Title','zd_multilang').'

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

      '.__('Translations','zd_multilang').'

      '; + echo ''; + the_editor($res[0]['post_content']); + echo '
      '; + echo '

      '.__('Excerpt','zd_multilang').'

      +
      + +
      '; + $DisplayOriginal=get_option($display_original_option); + if ($DisplayOriginal=='yes') { + $OriginalPost = apply_filters('the_content', $OriginalPost); + $OriginalPost = str_replace(']]>', ']]>', $OriginalPost); + echo '

      '.__('Original post','zd_multilang').'

      +
      '.$OriginalPost.'
      '; + } + echo '
      '; + echo '
      '; + if ($Autosave=='yes') { + wp_print_scripts('sack'); + echo ''; + } + echo '
      +
      '; + echo ''; + } else if ($_GET['tr']) { + switch ($_GET['tr']) { + case 'posts': + $query='SELECT * FROM '.$wpdb->prefix.'posts WHERE post_type="post" order by post_status, post_date desc'; + break; + case 'pages': + $query='SELECT * FROM '.$wpdb->prefix.'posts WHERE post_type="page" order by post_status, post_date desc'; + break; + default: + $query=""; + break; + } + + $q="SELECT * from $posttrans order by ID"; + $Translated=$wpdb->get_results($q, ARRAY_A); + if ($Translated) foreach ($Translated as $Idx => $Row) { + $Posts[$Row['ID']][$Row['LanguageID']]=$Row['post_status']; + } + + $results=$wpdb->get_results($query, ARRAY_A); + if ($results) { + echo ''; + echo ''; + foreach ($Languages as $Lang) { + if ($Lang['LanguageID']!=$DefaultLanguage) echo ''; + } + echo ''; + foreach ($results as $ID => $row) { + echo ''; + echo ''; + echo ''; + foreach ($Languages as $Lang) { + if ($Lang['LanguageID']!=$DefaultLanguage) { + echo ''; + } + } + echo ''; + } + echo '
      '.__('Original title','zd_multilang').''.__('Published date', 'zd_multilang').''.$Lang['LanguageName'].'
      '.$row['post_title'].''.date_i18n(get_option('date_format').' - '.get_option('time_format'),strtotime($row['post_date'])).''; + if ($Posts[$row['ID']][$Lang['LanguageID']]) echo ' '.__($Posts[$row['ID']][$Lang['LanguageID']],'zd_multilang'); + else echo ' '.__('Translate','zd_multilang'); + echo '
      '; + } + } else { + $query="SELECT distinct(ID) from $posttrans"; + $res=$wpdb->get_results($query); + foreach ($res as $Line) { + $count++; + } + printf(__('%d posts or pages are translated','zd_multilang'),$count); + } +} + +function zd_multilang_autosave() { + global $wpdb; + $posttrans=$wpdb->prefix.'zd_ml_trans'; + list($ID, $Lang) = split("\.",$_POST['id']); + $Content=$_POST['content']; + $Title=$_POST['post_title']; + $Status=$_POST['post_status']; + $Excerpt=$_POST['post_excerpt']; + $var=$wpdb->get_var("SELECT ID from $posttrans WHERE ID='$ID' and LanguageID='$Lang'"); + if ($var==$ID) { + $query="UPDATE $posttrans set post_content='$Content', post_title='$Title', post_status='$Status', post_excerpt='$Excerpt' WHERE ID='$ID' and LanguageID='$Lang'"; + } else $query="INSERT INTO $posttrans (`ID`, `LanguageID`, `post_content`, `post_title`, `post_status`, `post_excerpt`) values ('$ID', '$Lang', '$Content', '$Title','$Status', '$Excerpt')"; + $wpdb->query($query); + die ('jQuery(\'#autosave_status\').html("Transaltion has been automatically saved at '.strftime("%H:%M on %Y/%m/%d").'"); + jQuery(\'#autosave_status\').show();'); +} + +function zd_multilang_link_translations() { + global $ZdmlCache, $locale; + global $BaseURL, $wpdb,$default_language_option,$PluginDIR; + $language_table= $wpdb->prefix.'zd_ml_langs'; + $termtrans_table = $wpdb->prefix.'zd_ml_termtrans'; + $linktrans=$wpdb->prefix.'zd_ml_linktrans'; + $hidden_field="zd_multilang_edit_link"; + + echo "

      ".__('Links','zd_multilang').'

      '; + $DefLang=get_option($default_language_option); + if (isset($_POST['link_id'])) { + $_GET['link_id']=$_POST['link_id']; + $url=$_POST['link_url']; + $name=$_POST['link_name']; + $description=$_POST['link_description']; + $Language=$_POST['lng']; + $link_id=$_POST['link_id']; + $check="SELECT count(*) from $linktrans where link_id=$link_id and LanguageID='$Language'"; + $res=$wpdb->get_var($check); + if ($res) $query="UPDATE $linktrans set link_name='$name', link_url='$url', link_description='$description' WHERE link_id=$link_id and LanguageID='$Language'"; + else $query="INSERT INTO $linktrans VALUES ($link_id, '$Language', '$url', '$name', '$description')"; + $wpdb->query($query); + } + if (isset($_GET['link_id'])) { + $Language=$_GET['lng']; + $link_id=$_GET['link_id']; + $query="SELECT l.link_id, lt.link_url, lt.link_name, lt.link_description, lt.LanguageID, l.link_url o_url, l.link_name o_name, l.link_description o_desc FROM $linktrans lt RIGHT JOIN $wpdb->links l on (l.link_id=lt.link_id) where l.link_id=$link_id"; + $results=$wpdb->get_results($query); + $found=0; + if ($results) { + foreach ($results as $Link) { + if ($Link->LanguageID==$Language) { + $found=1; + break; + } + } + if (!$found) { + $Link->link_name=""; + $Link->link_url=""; + $Link->link_description=""; + } + echo ' + + + + + + +
      '.$Link->o_name.''.$Link->o_url.''.$Link->o_desc.'
      '; + echo '
      + + + + + +

      +
      '; + } + } else { + $query="SELECT l.link_id, lt.LanguageID, lt.link_name, l.link_url o_url, l.link_name o_name FROM $linktrans lt RIGHT JOIN $wpdb->links l on (l.link_id=lt.link_id)"; + $results=$wpdb->get_results($query); + if ($results) + foreach ($results as $row) { + $Link[$row->link_id]['name_'.$row->LanguageID]=$row->link_name; + $Link[$row->link_id]['o_name']=$row->o_name; + $Link[$row->link_id]['o_url']=$row->o_url; + } + + echo ''; + echo ''; + foreach ($ZdmlCache['Languages'] as $LanguageID => $Lang) { + if ($Lang!=$DefLang) echo ''; + } + echo ''; + if ($Link) + foreach ($Link as $link_id => $L) { + echo ''; + echo ''; + foreach ($ZdmlCache['Languages'] as $LanguageID => $Lang) { + if ($Lang!=$DefLang) echo ''; + } + echo ''; + } + echo '
      '.__('Original Link','zd_multilang').' '.$ZdmlCache['LanguageNames'][$LanguageID].'
      '.$L['o_name'].' '.__('Translate','zd_multilang').'
      '; + } +} + +function zd_multilang_term_translations() { + global $ZdmlCache; + global $BaseURL, $wpdb,$default_language_option,$PluginDIR; + $language_table= $wpdb->prefix.'zd_ml_langs'; + $termtrans_table = $wpdb->prefix.'zd_ml_termtrans'; + $hidden_field="zd_multilang_edit_translation"; + + echo "

      ".__('Translations','zd_multilang').'

      '; + $Option=$_GET['tr']; + $DefaultLanguage=$ZdmlCache['DefLang']; + + $query="SELECT * FROM $language_table order by LanguageName"; + $Languages=$wpdb->get_results($query, ARRAY_A); + if (!$Languages) { + echo '

      '.__('No languages defined, please define some first','zd_multilang').'

      '; + return; + } + + if ($_POST[$hidden_field]=="update") { + $termid=$_POST['term_id']; + $Option=$_POST['tr']; + foreach ($Languages as $Lang) { + if ($Lang['LanguageID']!=$DefaultLanguage) { + $LangID=$Lang['LanguageID']; + $Translation=$_POST[$termid."_".$LangID]; + $Desc=$_POST['desc_'.$termid."_".$LangID]; + $query="SELECT name FROM $termtrans_table WHERE LanguageID='$LangID' and term_id='$termid' "; + $oldvalue=$wpdb->get_var($query); + if ($oldvalue) { + $query="UPDATE $termtrans_table set name='$Translation', description='$Desc' where term_id=$termid and LanguageID='$LangID'"; + } else { + if ($Translation) $query="INSERT INTO $termtrans_table VALUES ('$termid','$LangID','$Translation', '$Desc')"; + } + $wpdb->query($query); + $_GET['id']=$termid; + } + } + } + + if ($_GET['id']) { + $term_id=$_GET['id']; + $query="SELECT t.name, tt.term_id, tt.description FROM ".$wpdb->prefix."term_taxonomy tt, ".$wpdb->prefix."terms t WHERE t.term_id=tt.term_id and t.term_id=".$term_id." order by name"; + $res=$wpdb->get_row($query, ARRAY_A); + + $query="SELECT * FROM $termtrans_table WHERE term_id=$term_id"; + $Trans=$wpdb->get_results($query, ARRAY_A); + if ($Trans) foreach ($Trans as $Values) { + $Translations[$Values['LanguageID']]['term']=$Values['name']; + $Translations[$Values['LanguageID']]['desc']=$Values['description']; + } + + echo '
      '; + echo "\n\t".''; + echo "\n\t".''; + echo "\n\t".''; + echo "\n\t".''; + + echo "\n\t".''; + echo ''; + foreach ($Languages as $Lang) { + if ($Lang['LanguageID']!=$DefaultLanguage) { + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + } + } + echo '
      '.__('Original Term','zd_multilang').''.$res['name'].''.$res['description'].'
      '.$Lang['LanguageName'].'
      '; + echo "\n\t".'

      '; + echo "
      "; + } else { + switch ($Option) { + default: + $Option="cat"; + case 'cat': + $query="SELECT t.name, tt.term_id FROM ".$wpdb->prefix."term_taxonomy tt, ".$wpdb->prefix."terms t WHERE t.term_id=tt.term_id and taxonomy='category' order by name"; + $Results=$wpdb->get_results($query, ARRAY_A); + break; + case 'tags': + $query="SELECT t.name, tt.term_id FROM ".$wpdb->prefix."term_taxonomy tt, ".$wpdb->prefix."terms t WHERE t.term_id=tt.term_id and taxonomy='post_tag' order by name"; + $Results=$wpdb->get_results($query, ARRAY_A); + break; + case 'linkcat': + $query="SELECT t.name, tt.term_id FROM ".$wpdb->prefix."term_taxonomy tt, ".$wpdb->prefix."terms t WHERE t.term_id=tt.term_id and taxonomy='link_category' order by name"; + $Results=$wpdb->get_results($query, ARRAY_A); + break; + } + if ($Results) { + foreach ($Results as $Line) { + $in.=$Line['term_id'].","; + } + $in=substr($in, 0, -1); + $query="SELECT * FROM $termtrans_table WHERE term_id in ($in)"; + $Trans=$wpdb->get_results($query, ARRAY_A); + if ($Trans) foreach ($Trans as $Values) { + $Translations[$Values["term_id"]][$Values['LanguageID']]=$Values['name']; + } + echo ''; + echo ''; + foreach ($Languages as $Lang) { + if ($Lang['LanguageID']!=$DefaultLanguage) echo ''; + } + echo ''; + foreach ($Results as $Id => $Value) { + $term_id=$Value['term_id']; + echo ''; + foreach ($Languages as $Lang) { + if ($Lang['LanguageID']!=$DefaultLanguage) echo ''; + } + echo ''; + } + echo '
       '.__('Original Term','zd_multilang').' '.$Lang['LanguageName'].'
      '.$Value['name'].''.$Translations[$term_id][$Lang['LanguageID']].'
      '; + } + } +} + +function zd_multilang_translate_term($args="", $taxonomy="") { + global $ZdmlCache, $locale; + global $BaseURL, $wpdb,$default_language_option,$PluginDIR,$CurrentLanguagePermalink,$CurrentLang; + + if ($ZdmlCache['DefLang']==$locale) return $args; + + if ($ZdmlCache['Terms']) { + if ($ZdmlCache['Terms'][$args->term_id][$locale]) { + $args->cat_name=$ZdmlCache['Terms'][$args->term_id][$locale]['name']; + $args->name=$ZdmlCache['Terms'][$args->term_id][$locale]['name']; + $args->description=$ZdmlCache['Terms'][$args->term_id][$locale]['description']; + } + } + return $args; +} + +function zd_multilang_translate_link_cat($terms="") { + global $ZdmlCache, $locale; + global $BaseURL, $wpdb,$default_language_option,$PluginDIR,$CurrentLanguagePermalink,$CurrentLang; + $language_table= $wpdb->prefix.'zd_ml_langs'; + $termtrans_table = $wpdb->prefix.'zd_ml_termtrans'; + $DefaultLanguage=$ZdmlCache['DefLang']; + + if ($ZdmlCache['DefLang']==$locale) return $terms; + + $termes=explode("\n",$terms); + $term_list=""; + foreach ($termes as $ID => $term) { + preg_match_all("|(.*)(.*)(.*)|i", $term,$res); + $t=""; + foreach ($ZdmlCache['Terms'] as $termid => $Values) { + foreach ($Values as $LangID => $V) { + if (($t=="")&&($LangID==$locale)&&($V['o_name']==$res[2][0])) { + $t=$V['name']; + } + } + } + if ($t=="") $term_list.=$res[0][0]."\n"; + else $term_list.=$res[1][0].$t.$res[3][0]."\n"; + echo $res[3][0]; + } + return $term_list."\n"; +} + +function zd_multilang_postlink($arg) { + global $locale, $ZdmlCache, $wpdb; + $posttrans=$wpdb->prefix.'zd_ml_trans'; + + preg_match_all("|(.*)(.*)(.*)|ms",$arg,$res); + $postname=$res[2][0]; + + $query="SELECT pt.post_title FROM $posttrans pt, $wpdb->posts p WHERE pt.ID=p.ID and LanguageID='".$locale."' AND p.post_title='$postname' and pt.post_status='published'"; + $title=$wpdb->get_var($query); + $link=$res[1][0]; + if ($title) return $link.$title.$res[3][0]; + return $arg; +} + +function zd_multilang_translate_cat($term="") { + global $ZdmlCache, $locale; + global $BaseURL, $wpdb,$default_language_option,$PluginDIR,$CurrentLanguagePermalink,$CurrentLang; + $language_table= $wpdb->prefix.'zd_ml_langs'; + $termtrans_table = $wpdb->prefix.'zd_ml_termtrans'; + $DefaultLanguage=$ZdmlCache['DefLang']; + + if ($ZdmlCache['DefLang']==$locale) return $term; + + if ($ZdmlCache['Terms']) { + foreach ($ZdmlCache['Terms'] as $TermID => $V) { + foreach ($ZdmlCache['Terms'][$TermID] as $Language => $V) { + if (($Language==$locale)&&($V['o_name']==$term)) { + return $V['name']; + } + } + } + } + return $term; +} + +function zd_multilang_cat($arg) { + global $ZdmlCache, $locale; + $termid=$arg->term_id; + + if (isset($ZdmlCache['Terms'][$termid][$locale])) { + $arg->name=$ZdmlCache['Terms'][$termid][$locale]['name']; + $arg->description=$ZdmlCache['Terms'][$termid][$locale]['description']; + $arg->category_description=$ZdmlCache['Terms'][$termid][$locale]['description']; + } + return $arg; +} + +function zd_multilang_cat_desc($arg, $arg2) { + if (is_object($arg2)) { + $cat=zd_multilang_cat($arg2); + return $cat->description; + } + return $arg; +} + +function zd_multilang_translate_bookmarks($links) { + global $ZdmlCache, $locale; + if (!is_admin()) { + foreach ($links as $Idx => $Datas) { + $termid=$Datas->term_taxonomy_id; + $linkid=$Datas->link_id; + if ($ZdmlCache['Terms'][$termid][$locale]['description']) $links[$Idx]->description=$ZdmlCache['Terms'][$termid][$locale]['description']; + if ($ZdmlCache['Links'][$linkid][$locale]['description']) $links[$Idx]->link_description=$ZdmlCache['Links'][$linkid][$locale]['description']; + if ($ZdmlCache['Links'][$linkid][$locale]['name']) $links[$Idx]->link_name=$ZdmlCache['Links'][$linkid][$locale]['name']; + if ($ZdmlCache['Links'][$linkid][$locale]['url']) $links[$Idx]->link_url=$ZdmlCache['Links'][$linkid][$locale]['url']; + } + } + return $links; +} + +function zd_multilang_translate_list_bookmarks($bm) { + global $ZdmlCache, $locale; + $bookmarks=explode("\n",$bm); + $bm_return=array(); + foreach ($bookmarks as $line) { + if (preg_match_all('|()(.*)()|U',$line,$res)) { + $bm_return[]=$res[1][0].zd_multilang_translate_cat($res[2][0]).$res[3][0]; + } else { + $bm_return[]=$line; + } + } + return implode("\n",$bm_return); +} + +function zd_multilang_translate_post($posts) { + global $ZdmlCache; + global $BaseURL, $wpdb,$default_language_option, $wp_query, $wp_rewrite,$insert_lang_switch_option,$CurrentLanguagePermalink,$CurrentLang; + global $locale, $display_google_translate; + $language_table= $wpdb->prefix.'zd_ml_langs'; + $termtrans_table = $wpdb->prefix.'zd_ml_termtrans'; + $posttrans=$wpdb->prefix.'zd_ml_trans'; + + $Lang = $CurrentLanguagePermalink; + if ($Lang=="") $Language=$ZdmlCache['DefLang']; + $Language=$CurrentLang; + + if ($ZdmlCache['DefLang']!=$CurrentLang) { + foreach ($posts as $Idc => $Post) { + $post_list.=$Post->ID.','; + } + $post_list=substr($post_list,0, -1); + $query="SELECT post_content, post_title, ID, post_excerpt FROM $posttrans WHERE LanguageID='".$Language."' AND ID in (".$post_list.") AND post_status='published'"; + $rows=$wpdb->get_results($query, ARRAY_A); + if ($rows) foreach ($rows as $Id => $P) { + $row[$P['ID']]->post_content=$P['post_content']; + $row[$P['ID']]->post_title=$P['post_title']; + $row[$P['ID']]->post_excerpt=$P['post_excerpt']; + } + } + + foreach ($posts as $Idx => $Post) { + $postid=$Post->ID; + if ($row[$Post->ID]) { + $posts[$Idx]->post_content=$row[$Post->ID]->post_content; + $posts[$Idx]->post_excerpt=$row[$Post->ID]->post_excerpt; + if ($ZdmlCache['SwitcherPosition']=="footer") $posts[$Idx]->post_content.=zd_multilang_lang_switcher($posts[$Idx]->ID); + else $posts[$Idx]->post_content=zd_multilang_lang_switcher($posts[$Idx]->ID).$posts[$Idx]->post_content; + $posts[$Idx]->post_title=$row[$Post->ID]->post_title; + } else { + if ((!zd_multilang_is_translated($postid,$Language))&&($ZdmlCache['DefLang']!=$locale)&&(get_option($display_google_translate)=="show")) { + $posts[$Idx]->post_content="

      ".__('Translate original post with Google Translate',"zd_multilang").'

      ' + .$posts[$Idx]->post_content; + } + if ($ZdmlCache['SwitcherPosition']=="footer") $posts[$Idx]->post_content.=zd_multilang_lang_switcher($posts[$Idx]->ID); + else $posts[$Idx]->post_content=zd_multilang_lang_switcher($posts[$Idx]->ID).$posts[$Idx]->post_content; + } + // always get the appropriate number of comments (otherwise it won't work with default language) + $comment_count = zd_multilang_get_comment_count ($Post->ID, $Post); + if ($comment_count !== false) + $posts[$Idx]->comment_count = $comment_count; + } + return $posts; +} + +function zd_multilang_translate_tags($Tags) { + global $ZdmlCache; + global $BaseURL, $wpdb,$default_language_option,$PluginDIR,$CurrentLanguagePermalink,$CurrentLang; + $language_table= $wpdb->prefix.'zd_ml_langs'; + $termtrans_table = $wpdb->prefix.'zd_ml_termtrans'; + + $Lang = $CurrentLanguagePermalink; + if ($Lang=="") $Language=$ZdmlCache['DefLang']; + $Language=$CurrentLang; + + if ($ZdmlCache['DefLang']==$CurrentLang) return $Tags; + + foreach ($Tags as $ID => $args) { + if ($ZdmlCache['Terms']) { + foreach ($ZdmlCache['Terms'] as $TermID => $V) { + if (($TermID==$args->term_id) and ($V['LanguageID']==$Language)) + $Tags[$ID]->name=$V['name']; + } + } + } + return $Tags; +} + +function zd_multilang_lang_switcher($post_id) { + global $ZdmlCache; + global $wpdb,$wp_rewrite,$display_untranslated; + global $insert_lang_switch_option,$insert_lang_switch_option,$show_flags_option,$show_languages_option,$lang_switcher_class_option,$permalink_default, $locale; + + if (get_option($insert_lang_switch_option)=="show") { + $PluginDIR = get_bloginfo('wpurl').'/'.PLUGINDIR . '/' . dirname(plugin_basename (__FILE__)); + $language_table= $wpdb->prefix.'zd_ml_langs'; + + $langswitch_class=get_option($lang_switcher_class_option); + if ($langswitch_class) $class=' class="'.$langswitch_class.'"'; + $retour=""; + + if (!isset($ZdmlCache['Languages'])) { + $query="SELECT * FROM $language_table ORDER BY LanguageName"; + $results=$wpdb->get_results($query, ARRAY_A); + if ($results) { + foreach ($results as $ID => $V) + $ZdmlCache['Languages'][$V['LangPermalink']]=$V['LanguageID']; + } + } + else { + foreach ($ZdmlCache['Languages'] as $Permalink => $LangID) { + $results[$i]['LangPermalink']=$Permalink; + $results[$i]['LanguageID']=$LangID; + $i++; + } + } + if ($results) { + foreach ($results as $ID => $Lang) { + $regexp.=$Lang['LangPermalink']."|"; + } + $regexp=substr($regexp, 0, -1); + } + $QUERY=get_permalink($post_id); + if ($results) foreach ($results as $ID => $row) { + if (get_option($permalink_default)=="no") { + $regexp=""; + if ($results) { + foreach ($results as $ID => $Lang) { + if ($Lang['LanguageID']!=$ZdmlCache['DefLang']) $regexp.=$Lang['LangPermalink']."|"; + } + $regexp=substr($regexp, 0, -1); + } + if ($wp_rewrite->using_permalinks()) { + if ($ZdmlCache['DefLang']==$row['LanguageID']) $QUERY=preg_replace("`".get_bloginfo('url')."\/($regexp)\/(.*)`U",get_bloginfo('url')."/${3}",$QUERY); + else { + if ($locale==$ZdmlCache['DefLang']) { + $QUERY=preg_replace("`".get_bloginfo('url')."\/(.*)`U",get_bloginfo('url').'/'.$row['LangPermalink']."/${2}",$QUERY); + } else $QUERY=preg_replace("`".get_bloginfo('url')."\/($regexp)\/(.*)`U",get_bloginfo('url').'/'.$row['LangPermalink']."/${3}",$QUERY); + } + } else { + if ($ZdmlCache['DefLang']==$row['LanguageID']) $QUERY=preg_replace("`(".get_bloginfo('url')."\/.*)&lang=($regexp)(.*)`U",'${1}'."${3}",$QUERY); + else { + if ($locale==$ZdmlCache['DefLang']) { + $QUERY=preg_replace("`(".get_bloginfo('url')."\/.*)$`U",'${1}&lang='.$row['LangPermalink'],$QUERY); + } else $QUERY=preg_replace("`(".get_bloginfo('url')."\/.*lang=)($regexp)(.*)`U",'${1}'.$row['LangPermalink']."${3}",$QUERY); + } + } + } else { + if ($wp_rewrite->using_permalinks()) { + if ($QUERY!=get_bloginfo('url').'/') $QUERY=preg_replace("`".get_bloginfo('url')."\/($regexp)\/(.*)`U",get_bloginfo('url').'/'.$row['LangPermalink']."/${3}",$QUERY); + else $QUERY.=$row['LangPermalink'].'/'; + } else { + $QUERY=preg_replace("`(".get_bloginfo('url')."\/.*lang=)($regexp)(.*)`U",'${1}'.$row['LangPermalink']."${3}",$QUERY); + } + } + if ((zd_multilang_is_translated($post_id,$row['LanguageID']))&&($locale!=$row['LanguageID'])) { + $retour.=""; + $retour.=''; + if (get_option($show_flags_option)=="show") $retour.=''.$ZdmlCache['LanguageNames'][$row['LangPermalink']].''; + if (get_option($show_languages_option)=="show") $retour.=$ZdmlCache['LanguageNames'][$row['LangPermalink']]; + $retour.=''; + $retour.=''; + } + } + $retour.=''; + return $retour; + } + return ""; +} + +/******** Short Circuit Options ********/ +function zd_multilang_blogname($value) { + $v=zd_multilang_option("blogname"); + if ($v) return $v; + return $value; +} +function zd_multilang_blogdescription($value) { + $v=zd_multilang_option("blogdescription"); + if ($v) return $v; + return $value; +} + +function zd_multilang_option($optionname) { + global $locale, $ZdmlCache; + return $ZdmlCache['Options'][$locale][$optionname]; +} + + +/******* Widgets *******/ + +function zd_multilang_menu($show_name=true, $show_flags=true) { + global $wpdb,$wp_rewrite,$locale; // ... MG - Oct. 27, 2008 - need locale for check below ... + $PluginDIR = get_bloginfo('wpurl').'/'.PLUGINDIR . '/' . dirname(plugin_basename (__FILE__)); + $language_table= $wpdb->prefix.'zd_ml_langs'; + + $query="SELECT * FROM $language_table ORDER BY LanguageName"; + $results=$wpdb->get_results($query, ARRAY_A); + + if ($results) { + foreach ($results as $ID => $Lang) { + $regexp.=$Lang['LangPermalink']."|"; + } + $regexp=substr($regexp, 0, -1); + } + $retour=""; + if ($results) foreach ($results as $ID => $row) { + if ($wp_rewrite->using_permalinks()) { // ... MG - Oct. 27, 2008 - not on the home page when switching language - deal with it ... + if ( is_front_page() && !is_paged() ) $QUERY=get_bloginfo('url').'/'.$row['LangPermalink'].'/'; + else $QUERY=str_replace('/'.substr($locale,0,2).'/', '/'.$row['LangPermalink'].'/', $_SERVER['REQUEST_URI']); + } else { + if ( is_front_page() && !is_paged() ) $QUERY=get_bloginfo('url').'/?lang='.$row['LangPermalink']; + else $QUERY=str_replace('lang='.substr($locale,0,2), 'lang='.$row['LangPermalink'], $_SERVER['REQUEST_URI']); + } + if ( $locale != $row['LanguageID'] ) {// ... MG - Oct. 27, 2008 - no need to display the flag for active language ... + $retour.='
    11. '; + if ($show_flags) $retour.=''; + if ($show_name) $retour.=' '.$row['LanguageName']; + $retour.='
    12. '; + } + } + return $retour; +} + +function zd_multilang_widget($args) { + global $ZdmlCache; + global $wpdb,$wp_rewrite; + global $insert_lang_switch_option,$insert_lang_switch_option,$show_flags_option,$show_languages_option,$lang_switcher_class_option,$permalink_default, $locale; + $PluginDIR = get_bloginfo('wpurl').'/'.PLUGINDIR . '/' . dirname(plugin_basename (__FILE__)); + $language_table= $wpdb->prefix.'zd_ml_langs'; + + extract($args); + $WidgetTitle=get_option('zdml_widget_title'); + $WidgetOptions=get_option('zdml_widget_options'); + if (!$WidgetTitle) echo $before_widget.$before_title.__('Language','zd_multilang').$after_title; + else echo $before_widget.$before_title.$WidgetTitle.$after_title; + + echo '
        '; + echo zd_multilang_menu($WidgetOptions,get_option('zdml_widget_options_flag')); + echo '
      '; + + echo $after_widget; +} + +function zd_multilang_widget_options() { + global $ZdmlCache; + global $wpdb; + if ((isset($_POST['zdml_widget_title']))||(isset($_POST['zdml_sname']))) { + update_option('zdml_widget_title',$_POST['zdml_widget_title']); + $Options=($_POST['zdml_sname']=='on') ? '1' : '0'; + update_option('zdml_widget_options',$Options); + $Options=($_POST['zdml_sflag']=='on') ? '1' : '0'; + update_option('zdml_widget_options_flag',$Options); + } + $WidgetTitle=get_option('zdml_widget_title'); + $WidgetOptions=(get_option('zdml_widget_options')==1)? 'checked="checked"': ''; + $WidgetFlagOptions=(get_option('zdml_widget_options_flag')==1)? 'checked="checked"': ''; + echo '

      '; + echo '

      '; + echo '

      '; +} + + +/** comments */ +/** Author of this section Pau Sanchez **/ + + /** + * When a new comment is created, we should add it to the database, no matter if it has been approved or not + */ + function zd_multilang_insert_comment ($comment_id, $comment) { + global $locale, $wpdb; + $commenttrans=$wpdb->prefix.'zd_ml_comments'; + + // escape comment pulled from DB + $post_id = $comment->comment_post_ID; + + $wpdb->query( $wpdb->prepare("INSERT INTO $commenttrans (comment_id, post_id, LanguageID) VALUES (%d, %d, %s)", $comment_id, $post_id, $locale) ); + return true; + } + + /** + * When the post is deleted, we should delete it from the database + */ + function zd_multilang_delete_comment ($comment_id) { + global $locale, $wpdb; + $commenttrans=$wpdb->prefix.'zd_ml_comments'; + $wpdb->query( $wpdb->prepare("DELETE FROM $commenttrans WHERE comment_ID = %d LIMIT 1", $comment_id) ); + return true; + } + + /** + * Filter comments for the wp-content themes only (for the current language), not for the admin + */ + function zd_multilang_comments_array ($comments, $post_id) + { + global $locale, $wpdb, $keep_separate_comments; + + if (empty ($comments) || !is_array ($comments) || (get_option($keep_separate_comments) != 'yes')) + return $comments; + + $commenttrans=$wpdb->prefix.'zd_ml_comments'; + + // get ALL comments for current post, no matter the language + // this is to allow compability with old posts before installing the plugin + $query=$wpdb->prepare ("SELECT * FROM $commenttrans WHERE post_id = %d", $post_id); + $results=$wpdb->get_results($query, ARRAY_A); + + // no i18n comments? + if ($results === NULL) + return $comments; + + // create a map of comment IDs written in current language + // and another list of comments written in any other language (it will make sense later) + $commentsInLocale = array(); + $commentsNotInLocale = array(); + foreach ($results as $row) { + if (strcasecmp ($row['LanguageID'], $locale) == 0) + $commentsInLocale[] = $row ['comment_id']; + else + $commentsNotInLocale[] = $row ['comment_id']; + } + + // now generate the new list of commets (please note that comments is an array of objects) + $oldComments = $comments; + $comments = array (); + + foreach ($oldComments as $comment) + { + // if the comment is written in the current $locale OR we have no information + // about which language was used (not in our table), display comment + if ( + in_array ($comment->comment_ID, $commentsInLocale) || + !in_array ($comment->comment_ID, $commentsNotInLocale) // this makes the plugin compatible with old comments + ) + { + $comments [] = $comment; + } + } + + // intersect posts in current language with comments provided + return $comments; + } + + /** + * This is an internal function, be careful to avoid calling this function if it's not needed + * Returns the number of comments in current locale or FALSE if it could not retrieve the number of comments + * (only when keep_separate_comments = false and no $Post is passed) + */ + function zd_multilang_get_comment_count ($post_id, $Post = NULL) + { + global $locale, $wpdb, $keep_separate_comments; + + // do not keep separate comments + if (get_option($keep_separate_comments) != 'yes') { + if ($Post !== NULL) { + return $Post->comment_count; + } + + // in theory this should never happen + return false; + } + + $commenttrans = $wpdb->prefix.'zd_ml_comments'; + + // check if it's the admin interface => in the admin interface show the actual number of comments (no matter the language) + $isAdminInterface = (strpos ($_SERVER['PHP_SELF'], '/wp-admin/') !== false); + if ($isAdminInterface) { + if ($Post === NULL) { + $Post = get_post ($post_id); + if ($Post === NULL) + return 0; + } + return $Post->comment_count; + } + + // this is a bit tricky, it could be optimized, but will be clearer if left seprate + $comment_count = 0; + + // 1st sum all comments in current language + $query=$wpdb->prepare ("SELECT COUNT(*) AS total FROM $commenttrans WHERE post_id = %d AND LanguageID = %s", $post_id, $locale); + $results=$wpdb->get_results($query, ARRAY_A); + if ($results !== NULL) + $comment_count += $results[0]['total']; + + // 2nd sum all comments that are not available in any language + $query=$wpdb->prepare ( + "SELECT COUNT(*) AS total FROM wp_comments AS c1 WHERE (comment_post_ID = %d) AND NOT EXISTS (SELECT * FROM wp_zd_ml_comments AS c2 WHERE c1.comment_ID = c2.comment_id)", + $post_id + ); + $results=$wpdb->get_results($query, ARRAY_A); + if ($results !== NULL) + $comment_count += $results[0]['total']; + + return $comment_count; + } + + // filter that returns the appropriate number of comments (themes usually use comments_number function) + function zd_multilang_get_comments_number($count) + { + global $id; + $comment_count = zd_multilang_get_comment_count($id); + return ($comment_count === false ? $count : $comment_count); + } + + /** misc */ + + // function to return the current locale (to avoid using global variables) + function zd_multilang_get_locale () { + global $locale; + return $locale; + } + +function zd_multilang_initwidget() { + global $ZdmlCache; + if ( !function_exists('register_sidebar_widget') || !function_exists('register_widget_control') ) + return; + register_sidebar_widget(array('Zd Multilang','widgets'),'zd_multilang_widget'); + register_widget_control(array('Zd Multilang', 'widgets'), 'zd_multilang_widget_options'); +} +add_action('widgets_init', 'zd_multilang_initwidget'); + +?> diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/404.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/IRI-Theme/404.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,15 @@ + +
      +
      +

      Error 404 - Not Found

      + +

      Yikes. Something went wrong! Either the page you are looking for doesn't exist or you might have mistyped.

      +

      You can use the search box at the top right to find what you are looking for.

      +
      +
      +
      + +
      +
      + + \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/archive.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/IRI-Theme/archive.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,49 @@ + +
      +
      + + + + + + + + + +

      Archive for

      + +

      Archive for

      + +

      Archive for

      + +

      Author Archive

      + +

      Blog Archives

      + + + +
       
      + + + + + +

      Not Found

      + + +
      +
      +
      + +
      +
      + + \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/archives.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/IRI-Theme/archives.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,24 @@ + + +
      +
      +

      Archives by Month:

      +
        + +
      +

      Archive for the "" Category

      +
        + +
      +
      +
      +
      + +
      +
      + + \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/attachment.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/IRI-Theme/attachment.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,48 @@ + +
      + + +ID, true, array(450, 800)); // This also populates the iconsize for the next line ?> +ID); $classname = ($_post->iconsize[0] <= 128 ? 'small' : '') . 'attachment'; // This lets us style narrow icons specially ?> +
      +

      post_parent); ?> »

      +
      +


      guid); ?>

      + Read the rest of this entry »

      '); ?> + '

      Pages: ', 'after' => '

      ', 'next_or_number' => 'number')); ?> + +
      +
      + + +

      Sorry, no attachments matched your criteria.

      + +
      + diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/author.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/IRI-Theme/author.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,63 @@ + +
      +
      + + +
      +

      About: nickname; ?>

      +<?php echo $curauth->nickname; ?> +
      Profile:
      +

      user_description; ?>

      +
      Website
      +

      user_url; ?>

      +
      Contact:
      +

      Email nickname; ?>

      +
      +
      Posts by nickname; ?>
      + + + + +
      Department
      + +
      Entries from
      + +

      Search Results

      + + +
      +

      + +
      + +
      + +
      + +
      Read | | Tags:
      +
      +
      +
      + + +

      Welp, we couldn't find that...try again?

      +
      + +
      + + + +
      +
      +
      + +
      +
      + + \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/comments-popup.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/IRI-Theme/comments-popup.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,98 @@ + + + + + <?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:

      + +post_password) && $_COOKIE['wp-postpass_'. COOKIEHASH] != $post->post_password) { // and it doesn't match the cookie + echo(get_the_password_form()); +} else { ?> + +
        + +
      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 . Logout »

      + +

      + + + + " /> +

      +

      + + +

      +

      + + +

      + +

      + +
      + +

      +

      + +

      + ID); ?> +
      + +

      Sorry, the comment form is closed at this time.

      + + + + + +

      Powered by Wordpress

      + + + + diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/comments.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/IRI-Theme/comments.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,71 @@ +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.

      + + + +

      +
      + + ping_status) { ?>Trackback Address +
      +
        + +
      1. id="comment-"> + says: + comment_approved == '0') : ?> + Your comment is awaiting moderation. + +
        +

        at (#)

        + +
      2. + + +
      + + comment_status) : ?> + + + + + + +comment_status) : ?> +

      Leave a Response

      + +

      You must be logged in to post a comment.

      + +
      + +

      Logged in as . Logout »

      + +

      +

      +

      +

      +

      +

      + + +

      +

      + +

      +ID); ?> +
      + + diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/css/blueprint-license.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/IRI-Theme/css/blueprint-license.txt Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,1 @@ +Copyright (c) 2007 Olav Bjorkoy (http://bjorkoy.com) 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, sub-license, 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 every other copyright notice found in this software, and all the attributions in every file, 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 NON-INFRINGEMENT. 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. \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/css/blueprint-readme.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/IRI-Theme/css/blueprint-readme.txt Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,1 @@ +Blueprint CSS framework (http://bjorkoy.com/blueprint) ---------------------------------------------------------------- Welcome to Blueprint! This is a CSS framework designed to cut down on your CSS development time. It gives you a solid foundation to build your own CSS on. Here are some of the features BP provides out-of-the-box: * An easily customizable grid * Sensible default typography * A typographic baseline * Perfected browser CSS reset * A stylesheet for printing * Absolutely no bloat Setup instructions ---------------------------------------------------------------- Here's how you set up Blueprint on your site. 1) Upload BP to your server, and place it in whatever folder you'd like. A good choice would be your CSS folder. 2) Add the following lines to every section of your site. Make sure the link path is correct (here, BP is in my CSS folder): 3) That's it! Blueprint is now ready to shine. How to use Blueprint ---------------------------------------------------------------- Here's a quick primer on how to use BP: http://code.google.com/p/blueprintcss/wiki/Tutorial Each file is also heavily commented, so you'll learn a lot by reading through them. Files in Blueprint ---------------------------------------------------------------- The framework has a few files you should check out. Every file contains lots of (hopefully) clarifying comments. * screen.css This is the main file of the framework. It imports other CSS files from the "lib" directory, and should be included on every page. * print.css This file sets some default print rules, so that printed versions of your site looks better than they usually would. It should be included on every page. * lib/grid.css This file sets up the grid (it's true). It has a lot of classes you apply to divs to set up any sort of column-based grid. * lib/typography.css This file sets some default typography. It also has a few methods for some really fancy stuff to do with your text. * lib/reset.css This file resets CSS values that browsers tend to set for you. Credits ---------------------------------------------------------------- Many parts of BP are directly inspired by other peoples work. You may thank them for their brilliance. However, *do not* ask them for support or any kind of help with BP. * Jeff Croft [jeffcroft.com] * Nathan Borror [playgroundblues.com] * Christian Metts [mintchaos.com] * Wilson Miner [wilsonminer.com] * The Typogrify Project [code.google.com/p/typogrify] * Eric Meyer [meyerweb.com/eric] * Angus Turnbull [twinhelix.com] * Khoi Vinh [subtraction.com] Questions, comments, suggestions or bug reports all go to olav at bjorkoy dot com. Thanks for your interest! == By Olav Bjorkoy == http://bjorkoy.com \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/css/compressed/print.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/IRI-Theme/css/compressed/print.css Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,1 @@ +body { line-height:1.5; font-family:"Helvetica Neue", "Lucida Grande", Arial, Verdana, sans-serif; color:#000; background:none; font-size:10pt; } .container { background:none; } h1,h2,h3,h4,h5,h6 { font-family:"Helvetica Neue", Arial, "Lucida Grande", sans-serif; } code { font:.9em "Courier New", Monaco, Courier, monospace; } img { float:left; margin:1.5em 1.5em 1.5em 0; } a img { border:none; } p img.top { margin-top:0; } hr { background:#ccc; color:#ccc; width:100%; height:2px; border:none; margin:2em 0; padding:0; } blockquote { font-style:italic; font-size:.9em; margin:1.5em; padding:1em; } .small { font-size:.9em; } .large { font-size:1.1em; } .quiet { color:#999; } .hide { display:none; } a:link,a:visited { background:transparent; font-weight:700; text-decoration:underline; } a:link:after,a:visited:after { content:" (" attr(href) ") "; font-size:90%; } \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/css/compressed/screen.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/IRI-Theme/css/compressed/screen.css Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,1 @@ +html,body,div,span,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,code,del,dfn,em,img,q,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td { border:0; font-weight:inherit; font-style:inherit; font-size:100%; font-family:inherit; vertical-align:baseline; margin:0; padding:0; } body { line-height:1.5; background:#fff; font-size:75%; color:#222; font-family:"Helvetica Neue", "Lucida Grande", Helvetica, Arial, Verdana, sans-serif; margin:1.5em 0; } table { border-collapse:separate; border-spacing:0; margin-bottom:1.4em; } caption,th,td { text-align:left; font-weight:400; } blockquote:before,blockquote:after,q:before,q:after { content:""; } blockquote,q { quotes:; } a img { border:none; } h1,h2,h3,h4,h5,h6 { color:#111; font-family:"Helvetica Neue", Helvetica, Arial, sans-serif; font-weight:400; } h1 { font-size:3em; line-height:1; margin-bottom:.5em; } h2 { font-size:2em; margin-bottom:.75em; } h3 { font-size:1.5em; line-height:1; margin-bottom:1em; } h4 { font-size:1.2em; line-height:1.25; margin-bottom:1.25em; } h5 { font-size:1em; font-weight:700; margin-bottom:1.5em; } h6 { font-size:1em; font-weight:700; } p.last { margin-bottom:0; } p img { float:left; margin:1.5em 1.5em 1.5em 0; padding:0; } p img.top { margin-top:0; } ul,ol { margin:0 1.5em 1.5em; } ul { list-style-type:circle; } ol { list-style-type:decimal; } dd { margin-left:1.5em; } abbr,acronym { border-bottom:1px dotted #666; } address { margin-top:1.5em; font-style:italic; } a:focus,a:hover { color:#000; } a { color:#009; text-decoration:underline; } blockquote { color:#666; font-style:italic; margin:1.5em; } em,dfn { font-style:italic; background:#ffc; } pre,code { white-space:pre; margin:1.5em 0; } pre,code,tt { font:1em 'andale mono', monotype.com, 'lucida console', monospace; line-height:1.5; } tt { display:block; line-height:1.5; margin:1.5em 0; } th { border-bottom:2px solid #ccc; font-weight:700; } td { border-bottom:1px solid #ddd; } th,td { padding:4px 10px 4px 0; } tfoot { font-style:italic; } caption { background:#ffc; } table .last { padding-right:0; } .small { font-size:.8em; margin-bottom:1.875em; line-height:1.875em; } .large { font-size:1.2em; line-height:2.5em; margin-bottom:1.25em; } .hide { display:none; } .highlight { background:#ff0; } .added { color:#060; } .removed { color:#900; } .top { margin-top:0; padding-top:0; } .bottom { margin-bottom:0; padding-bottom:0; } .container { width:950px; margin:0 auto; } .column { float:left; margin-right:10px; } .last { margin-right:0; } .span-1 { width:30px; } .span-2 { width:70px; } .span-3 { width:110px; } .span-4 { width:150px; } .span-5 { width:190px; } .span-6 { width:230px; } .span-7 { width:270px; } .span-8 { width:310px; } .span-9 { width:350px; } .span-10 { width:390px; } .span-11 { width:430px; } .span-12 { width:470px; } .span-13 { width:510px; } .span-14 { width:550px; } .span-15 { width:590px; } .span-16 { width:630px; } .span-17 { width:670px; } .span-18 { width:710px; } .span-19 { width:750px; } .span-20 { width:790px; } .span-21 { width:830px; } .span-22 { width:870px; } .span-23 { width:910px; } .span-24 { width:950px; margin:0; } .append-1 { padding-right:40px; } .append-2 { padding-right:80px; } .append-3 { padding-right:120px; } .append-4 { padding-right:160px; } .append-5 { padding-right:200px; } .append-6 { padding-right:240px; } .append-7 { padding-right:280px; } .append-8 { padding-right:320px; } .append-9 { padding-right:360px; } .append-10 { padding-right:400px; } .append-11 { padding-right:440px; } .append-12 { padding-right:480px; } .append-13 { padding-right:520px; } .append-14 { padding-right:560px; } .append-15 { padding-right:600px; } .append-16 { padding-right:640px; } .append-17 { padding-right:680px; } .append-18 { padding-right:720px; } .append-19 { padding-right:760px; } .append-20 { padding-right:800px; } .append-21 { padding-right:840px; } .append-22 { padding-right:880px; } .append-23 { padding-right:920px; } .prepend-1 { padding-left:40px; } .prepend-2 { padding-left:80px; } .prepend-3 { padding-left:120px; } .prepend-4 { padding-left:160px; } .prepend-5 { padding-left:200px; } .prepend-6 { padding-left:240px; } .prepend-7 { padding-left:280px; } .prepend-8 { padding-left:320px; } .prepend-9 { padding-left:360px; } .prepend-10 { padding-left:400px; } .prepend-11 { padding-left:440px; } .prepend-12 { padding-left:480px; } .prepend-13 { padding-left:520px; } .prepend-14 { padding-left:560px; } .prepend-15 { padding-left:600px; } .prepend-16 { padding-left:640px; } .prepend-17 { padding-left:680px; } .prepend-18 { padding-left:720px; } .prepend-19 { padding-left:760px; } .prepend-20 { padding-left:800px; } .prepend-21 { padding-left:840px; } .prepend-22 { padding-left:880px; } .prepend-23 { padding-left:920px; } .border { padding-right:4px; margin-right:5px; border-right:1px solid #eee; } .colborder { padding-right:24px; margin-right:25px; border-right:1px solid #eee; } .pull-1 { margin-left:-40px; } .pull-2 { margin-left:-80px; } .pull-3 { margin-left:-120px; } .pull-4 { margin-left:-160px; } .push-0 { margin:0 0 0 18px; } .push-1 { margin:0 -40px 0 18px; } .push-2 { margin:0 -80px 0 18px; } .push-3 { margin:0 -120px 0 18px; } .push-4 { margin:0 -160px 0 18px; } .push-0,.push-1,.push-2,.push-3,.push-4 { float:right; } .box { margin-bottom:1.5em; background:#eee; padding:1.5em; } hr { background:#ddd; color:#ddd; clear:both; float:none; width:100%; height:.1em; border:none; margin:0 0 1.4em; } hr.space { background:#fff; color:#fff; } .clear { display:block; } .clear:after,.container:after { content:"."; display:block; height:0; clear:both; visibility:hidden; } * html .clear { height:1%; } fieldset { border:1px solid #ccc; margin:0 0 1.5em; padding:1.4em; } legend { font-weight:700; font-size:1.2em; } input.text,input.title { width:300px; border:1px solid #bbb; background:#f6f6f6; margin:.5em .5em .5em 0; padding:5px; } input.title { font-size:1.5em; } textarea { width:400px; height:250px; border:1px solid #bbb; background:#eee; margin:.5em .5em .5em 0; padding:5px; } select { border:1px solid #ccc; background:#f6f6f6; width:200px; } .error,.notice,.success { margin-bottom:1em; border:2px solid #ddd; padding:.8em; } .error { background:#FBE3E4; color:#D12F19; border-color:#FBC2C4; } .notice { background:#FFF6BF; color:#817134; border-color:#FFD324; } .success { background:#E6EFC2; color:#529214; border-color:#C6D880; } .error a { color:#D12F19; } .notice a { color:#817134; } .success a { color:#529214; } p,img,dl { margin:0 0 1.5em; } dl dt,strong,dfn,label { font-weight:700; } del,.quiet { color:#666; } input.text:focus,input.title:focus,textarea:focus,select:focus { background:#fff; border:1px solid #999; } \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/css/lib/forms.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/IRI-Theme/css/lib/forms.css Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,1 @@ +/* -------------------------------------------------------------- forms.css * Sets up some default styling for forms * Gives you classes to enhance your forms Usage: * For text fields, use class .title or .text -------------------------------------------------------------- */ label { font-weight: bold; } /* Fieldsets */ fieldset { padding:1.4em; margin: 0 0 1.5em 0; border: 1px solid #ccc; } legend { font-weight: bold; font-size:1.2em; } /* Text fields */ input.text, input.title { width: 300px; margin:0.5em 0.5em 0.5em 0; } input.text, input.title { border:1px solid #bbb; background:#f6f6f6; padding:5px; } input.text:focus, input.title:focus { border:1px solid #999; background:#fff; } input.title { font-size:1.5em; } /* Textareas */ textarea { width: 400px; height: 250px; margin:0.5em 0.5em 0.5em 0; } textarea { border:1px solid #bbb; background:#eee; padding:5px; } textarea:focus { border:1px solid #999; background:#fff; } /* Select fields */ select { border:1px solid #ccc; background:#f6f6f6; width:200px; } select:focus { border:1px solid #999; background:#fff; } /* Success, error & notice boxes for messages and errors. */ .error, .notice, .success { padding: .8em; margin-bottom: 1em; border: 2px solid #ddd; } .error { background: #FBE3E4; color: #D12F19; border-color: #FBC2C4; } .notice { background: #FFF6BF; color: #817134; border-color: #FFD324; } .success { background: #E6EFC2; color: #529214; border-color: #C6D880; } .error a { color: #D12F19; } .notice a { color: #817134; } .success a { color: #529214; } \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/css/lib/grid.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/IRI-Theme/css/lib/grid.css Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,1 @@ +/* -------------------------------------------------------------- grid.css * Sets up an easy-to-use grid of 24 columns. Based on work by: * Nathan Borror [playgroundblues.com] * Jeff Croft [jeffcroft.com] * Christian Metts [mintchaos.com] * Khoi Vinh [subtraction.com] By default, the grid is 950px wide, with 24 columns spanning 30px, and a 10px margin between columns. If you need fewer or more columns, use this formula to find the new total width: Total width = (columns * 40) - 10 Read more about using a grid here: * subtraction.com/archives/2007/0318_oh_yeeaahh.php -------------------------------------------------------------- */ /* A container should group all your columns. */ .container { width: 950px; margin: 0 auto; } /* Columns -------------------------------------------------------------- */ /* Use this class together with the .span-x classes to create any composition of columns in a layout. */ .column { float: left; margin-right: 10px; } /* The last column in a row needs this class. */ .last { margin-right: 0; } /* Use these classes to set the width of a column. */ .span-1 { width: 30px; } .span-2 { width: 70px; } .span-3 { width: 110px; } .span-4 { width: 150px; } .span-5 { width: 190px; } .span-6 { width: 230px; } .span-7 { width: 270px; } .span-8 { width: 310px; } .span-9 { width: 350px; } .span-10 { width: 390px; } .span-11 { width: 430px; } .span-12 { width: 470px; } .span-13 { width: 510px; } .span-14 { width: 550px; } .span-15 { width: 590px; } .span-16 { width: 630px; } .span-17 { width: 670px; } .span-18 { width: 710px; } .span-19 { width: 750px; } .span-20 { width: 790px; } .span-21 { width: 830px; } .span-22 { width: 870px; } .span-23 { width: 910px; } .span-24 { width: 950px; margin: 0; } /* Add these to a column to append empty cols. */ .append-1 { padding-right: 40px; } .append-2 { padding-right: 80px; } .append-3 { padding-right: 120px; } .append-4 { padding-right: 160px; } .append-5 { padding-right: 200px; } .append-6 { padding-right: 240px; } .append-7 { padding-right: 280px; } .append-8 { padding-right: 320px; } .append-9 { padding-right: 360px; } .append-10 { padding-right: 400px; } .append-11 { padding-right: 440px; } .append-12 { padding-right: 480px; } .append-13 { padding-right: 520px; } .append-14 { padding-right: 560px; } .append-15 { padding-right: 600px; } .append-16 { padding-right: 640px; } .append-17 { padding-right: 680px; } .append-18 { padding-right: 720px; } .append-19 { padding-right: 760px; } .append-20 { padding-right: 800px; } .append-21 { padding-right: 840px; } .append-22 { padding-right: 880px; } .append-23 { padding-right: 920px; } /* Add these to a column to prepend empty cols. */ .prepend-1 { padding-left: 40px; } .prepend-2 { padding-left: 80px; } .prepend-3 { padding-left: 120px; } .prepend-4 { padding-left: 160px; } .prepend-5 { padding-left: 200px; } .prepend-6 { padding-left: 240px; } .prepend-7 { padding-left: 280px; } .prepend-8 { padding-left: 320px; } .prepend-9 { padding-left: 360px; } .prepend-10 { padding-left: 400px; } .prepend-11 { padding-left: 440px; } .prepend-12 { padding-left: 480px; } .prepend-13 { padding-left: 520px; } .prepend-14 { padding-left: 560px; } .prepend-15 { padding-left: 600px; } .prepend-16 { padding-left: 640px; } .prepend-17 { padding-left: 680px; } .prepend-18 { padding-left: 720px; } .prepend-19 { padding-left: 760px; } .prepend-20 { padding-left: 800px; } .prepend-21 { padding-left: 840px; } .prepend-22 { padding-left: 880px; } .prepend-23 { padding-left: 920px; } /* Border on right hand side of a column. */ .border { padding-right: 4px; margin-right: 5px; border-right: 1px solid #eee; } /* Border with more whitespace, spans one column. */ .colborder { padding-right: 24px; margin-right: 25px; border-right: 1px solid #eee; } /* Use these classes on an element to push it into the next column, or to pull it into the previous column. */ .pull-1 { margin-left: -40px; } .pull-2 { margin-left: -80px; } .pull-3 { margin-left: -120px; } .pull-4 { margin-left: -160px; } .push-0 { margin: 0 0 0 18px; } .push-1 { margin: 0 -40px 0 18px; } .push-2 { margin: 0 -80px 0 18px; } .push-3 { margin: 0 -120px 0 18px; } .push-4 { margin: 0 -160px 0 18px; } .push-0, .push-1, .push-2, .push-3, .push-4 { float: right; } /* Misc classes and elements -------------------------------------------------------------- */ /* Use a .box to create a padded box inside a column. */ .box { padding: 1.5em; margin-bottom: 1.5em; background: #eee; } /* Use this to create a horizontal ruler across a column. */ hr { background: #ddd; color: #ddd; clear: both; float: none; width: 100%; height: .1em; margin: 0 0 1.4em; border: none; } hr.space { background: #fff; color: #fff; } /* Clearing floats without extra markup Based on How To Clear Floats Without Structural Markup by PiE [http://www.positioniseverything.net/easyclearing.html] */ .clear { display: inline-block; } .clear:after, .container:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } * html .clear { height: 1%; } .clear { display: block; } \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/css/lib/grid.css.old --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/IRI-Theme/css/lib/grid.css.old Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,1 @@ +/* -------------------------------------------------------------- grid.css * Sets up an easy-to-use grid of 24 columns. Based on work by: * Nathan Borror [playgroundblues.com] * Jeff Croft [jeffcroft.com] * Christian Metts [mintchaos.com] * Khoi Vinh [subtraction.com] By default, the grid is 950px wide, with 24 columns spanning 30px, and a 10px margin between columns. If you need fewer or more columns, use this formula to find the new total width: Total width = (columns * 40) - 10 Read more about using a grid here: * subtraction.com/archives/2007/0318_oh_yeeaahh.php -------------------------------------------------------------- */ /* A container should group all your columns. */ .container { width: 950px; margin: 0 auto; } /* Columns -------------------------------------------------------------- */ /* Use this class together with the .span-x classes to create any composition of columns in a layout. */ .column { float: left; margin-right: 10px; } /* The last column in a row needs this class. */ .last { margin-right: 0; } /* Use these classes to set the width of a column. */ .span-1 { width: 30px; } .span-2 { width: 70px; } .span-3 { width: 110px; } .span-4 { width: 150px; } .span-5 { width: 190px; } .span-6 { width: 230px; } .span-7 { width: 270px; } .span-8 { width: 310px; } .span-9 { width: 350px; } .span-10 { width: 390px; } .span-11 { width: 430px; } .span-12 { width: 470px; } .span-13 { width: 510px; } .span-14 { width: 550px; } .span-15 { width: 590px; } .span-16 { width: 630px; } .span-17 { width: 670px; } .span-18 { width: 710px; } .span-19 { width: 750px; } .span-20 { width: 790px; } .span-21 { width: 830px; } .span-22 { width: 870px; } .span-23 { width: 910px; } .span-24 { width: 950px; margin: 0; } /* Add these to a column to append empty cols. */ .append-1 { padding-right: 40px; } .append-2 { padding-right: 80px; } .append-3 { padding-right: 120px; } .append-4 { padding-right: 160px; } .append-5 { padding-right: 200px; } .append-6 { padding-right: 240px; } .append-7 { padding-right: 280px; } .append-8 { padding-right: 320px; } .append-9 { padding-right: 360px; } .append-10 { padding-right: 400px; } .append-11 { padding-right: 440px; } .append-12 { padding-right: 480px; } .append-13 { padding-right: 520px; } .append-14 { padding-right: 560px; } .append-15 { padding-right: 600px; } .append-16 { padding-right: 640px; } .append-17 { padding-right: 680px; } .append-18 { padding-right: 720px; } .append-19 { padding-right: 760px; } .append-20 { padding-right: 800px; } .append-21 { padding-right: 840px; } .append-22 { padding-right: 880px; } .append-23 { padding-right: 920px; } /* Add these to a column to prepend empty cols. */ .prepend-1 { padding-left: 40px; } .prepend-2 { padding-left: 80px; } .prepend-3 { padding-left: 120px; } .prepend-4 { padding-left: 160px; } .prepend-5 { padding-left: 200px; } .prepend-6 { padding-left: 240px; } .prepend-7 { padding-left: 280px; } .prepend-8 { padding-left: 320px; } .prepend-9 { padding-left: 360px; } .prepend-10 { padding-left: 400px; } .prepend-11 { padding-left: 440px; } .prepend-12 { padding-left: 480px; } .prepend-13 { padding-left: 520px; } .prepend-14 { padding-left: 560px; } .prepend-15 { padding-left: 600px; } .prepend-16 { padding-left: 640px; } .prepend-17 { padding-left: 680px; } .prepend-18 { padding-left: 720px; } .prepend-19 { padding-left: 760px; } .prepend-20 { padding-left: 800px; } .prepend-21 { padding-left: 840px; } .prepend-22 { padding-left: 880px; } .prepend-23 { padding-left: 920px; } /* Border on right hand side of a column. */ .border { padding-right: 4px; margin-right: 5px; border-right: 1px solid #eee; } /* Border with more whitespace, spans one column. */ .colborder { padding-right: 24px; margin-right: 25px; border-right: 1px solid #eee; } /* Use these classes on an element to push it into the next column, or to pull it into the previous column. */ .pull-1 { margin-left: -40px; } .pull-2 { margin-left: -80px; } .pull-3 { margin-left: -120px; } .pull-4 { margin-left: -160px; } .push-0 { margin: 0 0 0 18px; } .push-1 { margin: 0 -40px 0 18px; } .push-2 { margin: 0 -80px 0 18px; } .push-3 { margin: 0 -120px 0 18px; } .push-4 { margin: 0 -160px 0 18px; } .push-0, .push-1, .push-2, .push-3, .push-4 { float: right; } /* Misc classes and elements -------------------------------------------------------------- */ /* Use a .box to create a padded box inside a column. */ .box { padding: 1.5em; margin-bottom: 1.5em; background: #eee; } /* Use this to create a horizontal ruler across a column. */ hr { background: #ddd; color: #ddd; clear: both; float: none; width: 100%; height: .1em; margin: 0 0 1.4em; border: none; } hr.space { background: #fff; color: #fff; } /* Clearing floats without extra markup Based on How To Clear Floats Without Structural Markup by PiE [http://www.positioniseverything.net/easyclearing.html] */ .clear { display: inline-block; } .clear:after, .container:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } * html .clear { height: 1%; } .clear { display: block; } \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/css/lib/grid.png Binary file web/wp-content/themes/IRI-Theme/css/lib/grid.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/css/lib/ie.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/IRI-Theme/css/lib/ie.css Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,1 @@ +/* -------------------------------------------------------------- ie.css Contains every hack for Internet Explorer versions prior to IE7, so that our core files stay sweet and nimble. -------------------------------------------------------------- */ /* Make sure the layout is centered in IE5 */ body { text-align: center; } .container { text-align: left; } /* This fixes the problem where IE6 adds an extra 3px margin to two columns that are floated up against each other. */ * html .column { overflow-x: hidden; } /* IE6 fix */ .pull-1, .pull-2, .pull-3, .pull-4, .push-1, .push-2, .push-3, .push-4, ul, ol { position: relative; /* Keeps IE6 from cutting pulled/pushed images */ } /* Fixes incorrect styling of legend in IE6 fieldsets. */ legend { margin-bottom:1.4em; } /* Fixes incorrect placement of numbers in ol's in IE6/7 */ ol { margin-left:2em; } \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/css/lib/reset.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/IRI-Theme/css/lib/reset.css Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,1 @@ +/* -------------------------------------------------------------- reset.css * Resets default browser CSS. Based on work by Eric Meyer: * meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/ -------------------------------------------------------------- */ html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, code, del, dfn, em, img, q, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td { margin: 0; padding: 0; border: 0; font-weight: inherit; font-style: inherit; font-size: 100%; font-family: inherit; vertical-align: baseline; } body { line-height: 1.5; background: #fff; margin:1.5em 0; } /* Tables still need 'cellspacing="0"' in the markup. */ table { border-collapse: separate; border-spacing: 0; } caption, th, td { text-align: left; font-weight:400; } /* Remove possible quote marks (") from ,
      . */ blockquote:before, blockquote:after, q:before, q:after { content: ""; } blockquote, q { quotes: "" ""; } a img { border: none; } \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/css/lib/typography.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/IRI-Theme/css/lib/typography.css Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,1 @@ +/* -------------------------------------------------------------- typography.css * Sets up some sensible default typography. Based on work by: * Nathan Borror [playgroundblues.com] * Jeff Croft [jeffcroft.com] * Christian Metts [mintchaos.com] * Wilson Miner [wilsonminer.com] * Richard Rutter [clagnut.com] Read more about using a baseline here: * alistapart.com/articles/settingtypeontheweb -------------------------------------------------------------- */ /* This is where you set your desired font size. The line-heights and vertical margins are automatically calculated from this. The percentage is of 16px (0.75 * 16px = 12px). */ body { font-size: 75%; } /* Default fonts and colors. If you prefer serif fonts, remove the font-family on the headings, and apply this one to the body: font: 1em Georgia, "lucida bright", "times new roman", serif; */ body { color: #222; font-family: "Helvetica Neue", "Lucida Grande", Helvetica, Arial, Verdana, sans-serif; } h1,h2,h3,h4,h5,h6 { color: #111; font-family: Georgia; } /* Headings -------------------------------------------------------------- */ h1,h2,h3,h4,h5,h6 { font-weight: normal; } h1 { font-size: 3em; line-height: 1; margin-bottom: 0.5em; } h2 { font-size: 2em; margin-bottom: 0.75em; } h3 { font-size: 1.5em; line-height: 1; margin-bottom: 1em; } h4 { font-size: 1.2em; line-height: 1.25; margin-bottom: 1.25em; } h5 { font-size: 1em; font-weight: bold; margin-bottom: 1.5em; } h6 { font-size: 1em; font-weight: bold; } /* Text elements -------------------------------------------------------------- */ p { margin: 0 0 1.5em; } p.last { margin-bottom: 0; } p img { float: left; margin: 1em 1em 1em 0; padding: 0; } p img.top { margin-top: 0; } /* Use this if the image is at the top of the

      . */ img { margin: 0 0 1.5em; } ul, ol { margin:0 1.5em 1.5em 1.5em; } ul { list-style-type: circle; } ol { list-style-type: decimal; } dl { margin: 0 0 1.5em 0; } dl dt { font-weight: bold; } dd { margin-left: 1.5em;} abbr, acronym { border-bottom: 1px dotted #666; } address { margin-top: 1.5em; font-style: italic; } del { color:#666; } a:focus, a:hover { color: #000; } a { color: #009; text-decoration: underline; } blockquote { margin: 1.5em; color: #666; font-style: italic; } strong { font-weight: bold; } em,dfn { font-style: italic; background: #ffc; } dfn { font-weight: bold; } pre,code { margin: 1.5em 0; white-space: pre; } pre,code,tt { font: 1em 'andale mono', 'monotype.com', 'lucida console', monospace; line-height: 1.5; } tt { display: block; margin: 1.5em 0; line-height: 1.5; } /* Tables -------------------------------------------------------------- */ table { margin-bottom: 1.4em; } th { border-bottom: 2px solid #ccc; font-weight: bold; } td { border-bottom: 1px solid #ddd; } th,td { padding: 4px 10px 4px 0; } tfoot { font-style: italic; } caption { background: #ffc; } /* Use this if you use span-x classes on th/td. */ table .last { padding-right: 0; } /* Some default classes -------------------------------------------------------------- */ .small { font-size: .8em; margin-bottom: 1.875em; line-height: 1.875em; } .large { font-size: 1.2em; line-height: 2.5em; margin-bottom: 1.25em; } .quiet { color: #ccc; } .hide { display: none; } .highlight { background:#ff0; } .added { color:#060; } .removed { color:#900; } .dotted {border-bottom: 1px dotted;} .top { margin-top:0; padding-top:0; } .bottom { margin-bottom:0; padding-bottom:0; } \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/css/lib/typography.css.old --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/IRI-Theme/css/lib/typography.css.old Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,1 @@ +/* -------------------------------------------------------------- typography.css * Sets up some sensible default typography. Based on work by: * Nathan Borror [playgroundblues.com] * Jeff Croft [jeffcroft.com] * Christian Metts [mintchaos.com] * Wilson Miner [wilsonminer.com] * Richard Rutter [clagnut.com] Customised by: * Samuel Huron [cybunk.com] Read more about using a baseline here: * alistapart.com/articles/settingtypeontheweb -------------------------------------------------------------- */ /* This is where you set your desired font size. The line-heights and vertical margins are automatically calculated from this. The percentage is of 16px (0.75 * 16px = 12px). */ body { font-size: 75%; } /* Default fonts and colors. If you prefer serif fonts, remove the font-family on the headings, and apply this one to the body: font: 1em Georgia, "lucida bright", "times new roman", serif; */ body { color: #222; font-family: "Helvetica Neue", "Lucida Grande", Helvetica, Arial, Verdana, sans-serif; } h1,h2,h3,h4,h5,h6 { color: #161619; font-family: Georgia; } /* Headings -------------------------------------------------------------- */ h1,h2,h3,h4,h5,h6 { font-weight: normal; } h1 { font-size: 3em; line-height: 1; margin-bottom: 0.5em; } h2 { font-size: 2em; margin-bottom: 0.75em; } h3 { font-size: 1.5em; line-height: 1; margin-bottom: 1em; } h4 { font-size: 1.2em; line-height: 1.25; margin-bottom: 1.25em; } h5 { font-size: 1em; font-weight: bold; margin-bottom: 1.5em; } h6 { font-size: 1em; font-weight: bold; } /* Text elements -------------------------------------------------------------- */ p { margin: 0 0 1.5em; } p.last { margin-bottom: 0; } p img { float: left; margin: 1em 1em 1em 0; padding: 0; } p img.top { margin-top: 0; } /* Use this if the image is at the top of the

      . */ img { margin: 0 0 1.5em; } ul, ol { margin:0 1.5em 1.5em 1.5em; } ul { list-style-type: circle; } ol { list-style-type: decimal; } dl { margin: 0 0 1.5em 0; } dl dt { font-weight: bold; } dd { margin-left: 1.5em;} abbr, acronym { border-bottom: 1px dotted #666; } address { margin-top: 1.5em; font-style: italic; } del { color:#666; } a:focus, a:hover { color: #000; } a { color: #009; text-decoration: underline; } blockquote { margin: 1.5em; color: #666; font-style: italic; } strong { font-weight: bold; } em,dfn { font-style: italic; background: #ffc; } dfn { font-weight: bold; } pre,code { margin: 1.5em 0; white-space: pre; } pre,code,tt { font: 1em 'andale mono', 'monotype.com', 'lucida console', monospace; line-height: 1.5; } tt { display: block; margin: 1.5em 0; line-height: 1.5; } /* Tables -------------------------------------------------------------- */ table { margin-bottom: 1.4em; } th { border-bottom: 1px solid #ccc; font-weight: bold; } td { border-bottom: 1px solid #ddd; } th,td { padding: 4px 10px 4px 0; } tfoot { font-style: italic; } caption { background: #ffc; } /* Use this if you use span-x classes on th/td. */ table .last { padding-right: 0; } /* Some default classes -------------------------------------------------------------- */ .small { font-size: .8em; margin-bottom: 1.875em; line-height: 1.875em; } .large { font-size: 1.2em; line-height: 2.5em; margin-bottom: 1.25em; } .quiet { color: #ccc; } .hide { display: none; } .highlight { background:#ff0; } .added { color:#060; } .removed { color:#900; } .dotted {border-bottom: 1px dotted;} .top { margin-top:0; padding-top:0; } .bottom { margin-bottom:0; padding-bottom:0; } \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/css/plugins/buttons/Readme --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/IRI-Theme/css/plugins/buttons/Readme Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,31 @@ +Buttons +* Gives you great looking CSS buttons, for both and + + + Change Password + + + + Cancel + diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/css/plugins/buttons/buttons.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/IRI-Theme/css/plugins/buttons/buttons.css Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,1 @@ +/* -------------------------------------------------------------- buttons.css * Gives you some great CSS-only buttons. Created by Kevin Hale [particletree.com] * particletree.com/features/rediscovering-the-button-element See Readme.txt in this folder for instructions. -------------------------------------------------------------- */ a.button, button { display:block; float:left; margin:0 0.583em 0.667em 0; padding:5px 10px 5px 7px; /* Links */ border:1px solid #dedede; border-top:1px solid #eee; border-left:1px solid #eee; background-color:#f5f5f5; font-family:"Lucida Grande", Tahoma, Arial, Verdana, sans-serif; font-size:100%; line-height:130%; text-decoration:none; font-weight:bold; color:#565656; cursor:pointer; } button { width:auto; overflow:visible; padding:4px 10px 3px 7px; /* IE6 */ } button[type] { padding:4px 10px 4px 7px; /* Firefox */ line-height:17px; /* Safari */ } *:first-child+html button[type] { padding:4px 10px 3px 7px; /* IE7 */ } button img, a.button img{ margin:0 3px -3px 0 !important; padding:0; border:none; width:16px; height:16px; float:none; } /* Button colors -------------------------------------------------------------- */ /* Standard */ button:hover, a.button:hover{ background-color:#dff4ff; border:1px solid #c2e1ef; color:#336699; } a.button:active{ background-color:#6299c5; border:1px solid #6299c5; color:#fff; } /* Positive */ body .positive { color:#529214; } a.positive:hover, button.positive:hover { background-color:#E6EFC2; border:1px solid #C6D880; color:#529214; } a.positive:active { background-color:#529214; border:1px solid #529214; color:#fff; } /* Negative */ body .negative { color:#d12f19; } a.negative:hover, button.negative:hover { background:#fbe3e4; border:1px solid #fbc2c4; color:#d12f19; } a.negative:active { background-color:#d12f19; border:1px solid #d12f19; color:#fff; } \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/css/plugins/buttons/icons/cross.png Binary file web/wp-content/themes/IRI-Theme/css/plugins/buttons/icons/cross.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/css/plugins/buttons/icons/key.png Binary file web/wp-content/themes/IRI-Theme/css/plugins/buttons/icons/key.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/css/plugins/buttons/icons/tick.png Binary file web/wp-content/themes/IRI-Theme/css/plugins/buttons/icons/tick.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/css/plugins/css-classes/Readme --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/IRI-Theme/css/plugins/css-classes/Readme Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,14 @@ +CSS Development Classes Plugin + +Sets up some classes to use in CSS development + +This is an experimental plugin, and the tools it provides +are not exactly semantically correct, so use with care, +and preferably only in development. :) + + +Usage +---------------------------------------------------------------- + +1) Add this line to "blueprint/screen.css", and you're done: + @import 'plugins/css-classes/css-classes.css'; diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/css/plugins/css-classes/css-classes.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/IRI-Theme/css/plugins/css-classes/css-classes.css Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,1 @@ +/* -------------------------------------------------------------- css-classes.css * Classes for CSS development See the Readme file in this directory for further instructions. -------------------------------------------------------------- */ .left { float:left; } .right { float:right; } .hide { display:none; } .reset-margin { margin:0; } .reset-padding { padding:0; } .reset { margin:0; padding:0; } .align-justify { text-align:justify; } .align-left { text-align:left; } .align-center { text-align:center; } .align-right { text-align:right; } \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/css/plugins/fancy-type/Readme --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/IRI-Theme/css/plugins/fancy-type/Readme Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,22 @@ +Fancy Type +* Gives you classes to use if you'd like some + extra fancy typography. + +Credits and instructions are specified above each class +in the fancy-type.css file in this directory. + + +Usage +---------------------------------------------------------------- + +1) Add this line to "blueprint/screen.css", and you're done: + @import 'plugins/fancy-type/fancy-type-compressed.css'; + +Note that this uses the compressed version of the CSS file, +as the original file contains a lot of instructing comments. + +Remember to re-compress (or change) the compressed file +if you make any changes to the original CSS file. + +Here's a pretty good CSS compressor: +http://teenage.cz/acidofil/tools/cssformat.php diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/css/plugins/fancy-type/fancy-type-compressed.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/IRI-Theme/css/plugins/fancy-type/fancy-type-compressed.css Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,1 @@ +p + p { text-indent:2em; margin-top:-1.5em; } .alt{color:#666;font-family:"Warnock Pro","Goudy Old Style","Palatino","Book Antiqua",Georgia,serif;font-size:1.2em;line-height:80%;font-style:italic;} .dquo{margin-left:-.5em;} p.incr,.incr p{font-size:10px;line-height:1.44em;margin-bottom:1.5em;} .caps{font-variant:small-caps;letter-spacing:1px;text-transform:lowercase;font-size:1.2em;line-height:1%;font-weight:bold;} \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/css/plugins/fancy-type/fancy-type.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/IRI-Theme/css/plugins/fancy-type/fancy-type.css Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,1 @@ +/* -------------------------------------------------------------- fancy-type.css * Lots of pretty advanced classes for manipulating text. See the Readme file in this folder for additional instructions. -------------------------------------------------------------- */ /* Indentation instead of line shifts for sibling paragraphs. */ p + p { text-indent:2em; margin-top:-1.5em; } /* Ornaments on first paragraph. Commented out by default. Use with care. p:before { content: "\2767"; padding-right: 0.4em; } p + p:before { content: ""; padding:0; } */ /* For great looking type, use this code instead of asdf: asdf Best used on prepositions and ampersands. */ .alt { color: #666; font-family: "Warnock Pro", "Goudy Old Style","Palatino","Book Antiqua", Georgia, serif; font-style: italic; font-weight: normal; } /* For great looking quote marks in titles, replace "asdf" with: asdf” (That is, when the title starts with a quote mark). (You may have to change this value depending on your font size). */ .dquo { margin-left: -.5em; } /* Reduced size type with incremental leading (http://www.markboulton.co.uk/journal/comments/incremental_leading/) This could be used for side notes. For smaller type, you don't necessarily want to follow the 1.5x vertical rhythm -- the line-height is too much. Using this class, it reduces your font size and line-height so that for every four lines of normal sized type, there is five lines of the sidenote. eg: New type size in em's: 10px (wanted side note size) / 12px (existing base size) = 0.8333 (new type size in ems) New line-height value: 12px x 1.5 = 18px (old line-height) 18px x 4 = 72px 72px / 5 = 14.4px (new line height) 14.4px / 10px = 1.44 (new line height in em's) */ p.incr, .incr p { font-size: 10px; line-height: 1.44em; margin-bottom: 1.5em; } /* Surround uppercase words and abbreviations with this class. Based on work by Jørgen Arnor Gårdsø Lom [http://twistedintellect.com/] */ .caps { font-variant: small-caps; letter-spacing: 1px; text-transform: lowercase; font-size:1.2em; line-height:1%; font-weight:bold; padding:0 2px; } \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/css/print.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/IRI-Theme/css/print.css Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,1 @@ +/* -------------------------------------------------------------- Blueprint CSS Framework Print Styles * Gives you some sensible styles for printing pages. See Readme file in this directory for further instructions. Some additions you'll want to make, customized to your markup: #header, #footer, #navigation { display:none; } -------------------------------------------------------------- */ body { line-height: 1.5; font-family: "Helvetica Neue", "Lucida Grande", Arial, Verdana, sans-serif; color:#000; background: none; font-size: 10pt; } .container { background: none; } h1,h2,h3,h4,h5,h6 { font-family: "Helvetica Neue", Arial, "Lucida Grande", sans-serif; } code { font:.9em "Courier New", Monaco, Courier, monospace; } img { float:left; margin:1.5em 1.5em 1.5em 0; } a img { border:none; } p img.top { margin-top: 0; } hr { background:#ccc; color:#ccc; width:100%; height:2px; margin:2em 0; padding:0; border:none; } blockquote { margin:1.5em; padding:1em; font-style:italic; font-size:.9em; } .small { font-size: .9em; } .large { font-size: 1.1em; } .quiet { color: #999; } .hide { display:none; } a:link, a:visited { background: transparent; font-weight:700; text-decoration: underline; } a:link:after, a:visited:after { content: " (" attr(href) ") "; font-size: 90%; } /* If you're having trouble printing relative links, uncomment and customize this: (note: This is valid CSS3, but it still won't go through the W3C CSS Validator) */ /* a[href^="/"]:after { content: " (http://www.yourdomain.com" attr(href) ") "; } */ \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/css/print.css.old --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/IRI-Theme/css/print.css.old Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,1 @@ +/* -------------------------------------------------------------- Blueprint CSS Framework Print Styles * Gives you some sensible styles for printing pages. See Readme file in this directory for further instructions. Some additions you'll want to make, customized to your markup: #header, #footer, #navigation { display:none; } -------------------------------------------------------------- */ body { line-height: 1.5; font-family: "Helvetica Neue", "Lucida Grande", Arial, Verdana, sans-serif; color:#000; background: none; font-size: 10pt; } .container { background: none; } h1,h2,h3,h4,h5,h6 { font-family: "Helvetica Neue", Arial, "Lucida Grande", sans-serif; } code { font:.9em "Courier New", Monaco, Courier, monospace; } img { float:left; margin:1.5em 1.5em 1.5em 0; } a img { border:none; } p img.top { margin-top: 0; } hr { background:#ccc; color:#ccc; width:100%; height:2px; margin:2em 0; padding:0; border:none; } blockquote { margin:1.5em; padding:1em; font-style:italic; font-size:.9em; } .small { font-size: .9em; } .large { font-size: 1.1em; } .quiet { color: #999; } .hide { display:none; } a:link, a:visited { background: transparent; font-weight:700; text-decoration: underline; } a:link:after, a:visited:after { content: " (" attr(href) ") "; font-size: 90%; } /* If you're having trouble printing relative links, uncomment and customize this: (note: This is valid CSS3, but it still won't go through the W3C CSS Validator) */ /* a[href^="/"]:after { content: " (http://www.yourdomain.com" attr(href) ") "; } */ \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/css/screen.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/IRI-Theme/css/screen.css Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,1 @@ +/* -------------------------------------------------------------- Blueprint CSS Framework Screen Styles * Version: 0.6 (21.9.2007) * Website: http://code.google.com/p/blueprintcss/ See Readme file in this directory for further instructions. -------------------------------------------------------------- */ @import 'lib/reset.css'; @import 'lib/typography.css'; @import 'lib/grid.css'; @import 'lib/forms.css'; /* Plugins: Additional functionality can be found in the plugins directory. See the readme files for each plugin. Example: @import 'plugins/buttons/buttons.css'; */ /* See the grid: Uncomment the line below to see the grid and baseline. .container { background: url(lib/grid.png); } */ \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/css/screen.css.old --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/IRI-Theme/css/screen.css.old Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,1 @@ +/* -------------------------------------------------------------- Blueprint CSS Framework Screen Styles * Version: 0.6 (21.9.2007) * Website: http://code.google.com/p/blueprintcss/ See Readme file in this directory for further instructions. -------------------------------------------------------------- */ @import 'lib/reset.css'; @import 'lib/typography.css'; @import 'lib/grid.css'; @import 'lib/forms.css'; /* Plugins: Additional functionality can be found in the plugins directory. See the readme files for each plugin. Example: @import 'plugins/buttons/buttons.css'; */ /* See the grid: Uncomment the line below to see the grid and baseline. .container { background: url(lib/grid.png); } */ \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/footer.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/IRI-Theme/footer.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,24 @@ +


      +
      +
        +
      • logo centre prompidou
      • +
      • logo CCCB
      • +
      • logo microsoft
      • +
      • logo goldsmith college
      • +
      • logo universit de tokyo
      • +
      • logo Institut telecom
      • +
      • logo ensci
      • +
      +
      +
      + +
      + + + diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/functions.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/IRI-Theme/functions.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,283 @@ + 'Sidebar-Single', + 'before_widget' => '
      ', + 'after_widget' => '
      ', + 'before_title' => '

      ', + 'after_title' => '

      ', + ) + ); + register_sidebar + ( array + ( + 'name' => 'Sidebar-Single-home', + 'before_widget' => '
      ', + 'after_widget' => '
      ', + 'before_title' => '

      ', + 'after_title' => '

      ', + ) + ); + register_sidebar + ( array + ( + 'name' => 'Bottom-Left', + 'before_widget' => '
      ', + 'after_widget' => '
      ', + 'before_title' => '

      ', + 'after_title' => '

      ', + ) + ); + register_sidebar + ( array + ( + 'name' => 'Bottom-Middle', + 'before_widget' => '
      ', + 'after_widget' => '
      ', + 'before_title' => '

      ', + 'after_title' => '

      ', + ) + ); + register_sidebar + ( array + ( + 'name' => 'Bottom-Right', + 'before_widget' => '
      ', + 'after_widget' => '
      ', + 'before_title' => '

      ', + 'after_title' => '

      ', + ) + ); +} + + + +# Displays a list of categories +function cy_list_categories($Eparam='') { + + $categories = get_categories('hide_empty=1'.$Eparam); + $first = true; $count = 0; + foreach ($categories as $category) { + $count++; if ($count>6) break; // limit to 5 + if ($category->parent<1) { + if ($first) { $first = false; $f = ' class="f"'; } else { $f = ''; } + + echo ('
    13. '); + echo (''.$category->name.' '.$raquo.''); + + + echo '
        '; + $category_posts=get_posts('category='.$category->cat_ID); + $count2=0; + foreach($category_posts as $post) { + $count2++; if ($count2>6) break; + echo '
      • '.$post->post_title.'
      • '; + }; + echo "
    14. "; + + + } + } +} + +# Displays a list of categories +function dp_list_categories($Eparam='') { + + $categories = get_categories('hide_empty=1'.$Eparam); + $first = true; $count = 0; + foreach ($categories as $category) { + $count++; if ($count>6) break; // limit to 5 + if ($category->parent<1) { + // if ($first) { $first = false; $f = ' class="f"'; } else { $f = ''; } + + echo ('"; + + + } + } +} + +function dp_list_posts($Eparam='') { + + $category_posts = get_posts($Eparam); + + foreach($category_posts as $post) { + echo '
    15. '.$post->post_title.'
    16. '; + }; +} + + +/* +Plugin Name: Get The Image +Plugin URI: http://justintadlock.com/archives/2008/05/27/get-the-image-wordpress-plugin +Description: This is a highly intuitive script that gets an image either by custom field input or post attachment. +Version: 0.1 Beta +Author: Justin Tadlock +Author URI: http://justintadlock.com +License: GPL +*/ + +/*********************************************************** +Catchall function for getting images +***********************************************************/ +function get_the_image($arr = false, $default_size = 'medium', $default_img = false) { + global $post; + $cf_array = load_the_image($arr, $post, $default_size); + $image = display_the_image($cf_array, $post, $default_size, $default_img); + if($image == false) $image = ''; + return $image; +} + +/*********************************************************** +Catchall function for getting images with a link +***********************************************************/ +function get_the_image_link($arr = false, $default_size = 'medium', $default_img = false) { + global $post; + $cf_array = load_the_image($arr, $post, $default_size); + $image = display_the_image($cf_array, $post, $default_size, $default_img); + + if($image == false) : + $image_link = ''; + else : + $post_perm = get_permalink($post->ID); + $image_link = "post_title\">$image"; + endif; + return $image_link; +} + +/*********************************************************** +Function for loading an image +***********************************************************/ +function load_the_image($custom_fields = false, $en_post, $default_size) { + +// Checks only if there are custom fields to check for + if(isset($custom_fields)) { + + // Loop through the custom fields, checking for images or video + $i = 0; + while(strcmp($image[0],'') == 0 && $i <= sizeof($custom_fields)) { + + // Check custom field values for image, image alt text, and image class + $image = get_post_custom_values($key = $custom_fields[$i]); + $image_alt = get_post_custom_values($key = $custom_fields[$i] . ' Alt'); + $image_class = get_post_custom_values($key = $custom_fields[$i] . ' Class'); + // Convert custom field key name to image class + $img_class = $custom_fields[$i]; + $img_class = strtolower($img_class); + $img_class = str_replace (" ", "-", $img_class); + + // Add space to image class if user inputs an extra class + if($image_class == true) $image_class .= ' '; + + // Add user image class to default image classes + if($default_size == 'thumbnail' && $img_class == 'thumbnail') $image_class .= $default_size; + elseif($default_size == 'medium' && $img_class == 'medium') $image_class .= $default_size; + elseif($default_size == 'full' && $img_class == 'full') $image_class .= $default_size; + else $image_class .= $img_class . ' ' . $default_size; + + $i++; + } // End while loop + } // End check for custom field image + +// If there is no image set through custom fields, check post attachments + if($image == false && $default_size == true) { + $img_att_arr = find_attachment_image($custom_fields[0], $en_post, $default_size); + if(strcmp($image_att_arr[0],'') == 0) : + $image = $img_att_arr[0]; + $image_class = $img_att_arr[1]; + $image_alt = false; + else : + $image = false; $image_alt = false; $image_class = false; + endif; + } + +// Return array with an image, image alt, and image class + return array($image, $image_alt, $image_class); +} + +/*********************************************************** +Function for displaying an image +***********************************************************/ +function display_the_image($cf_array = false, $en_post = false, $default_size = false, $default_img = false) { + +// Set nice names for image info + if($cf_array[0] == false && $default_img == true) : + $image[0] = $default_img; + $image_class = $default_size; + else : + $image = $cf_array[0]; + $image_alt = $cf_array[1]; + $image_class = $cf_array[2]; + endif; + +// If there's any kind of image for this post + if(isset($image[0]) && strcmp($image[0],'') != 0) : + // Open img tag + $output = 'post_title; + // Image class + $output .= '" class="'; + if(isset($image_class[0])) $output .= $image_class; + else $output .= 'left'; + // Close img tag + $output .= '" />'; +// If there's no image + else : + $output = false; + endif; +// Return the image + return $output; +} + +/*********************************************************** +Function for finding an attachment image. +Only called if no custom field images are set. +***********************************************************/ +function find_attachment_image($custom_fields = false, $en_post = false, $default_size = 'medium') { + + $custom = $custom_fields; + $custom = strtolower($custom); + $custom = str_replace (" ", "-", $custom); +// Don't repeat the same class name + if($custom == 'thumbnail' || $custom == 'medium' || $custom == 'full') $img_class = $default_size; + else $img_class = $custom . ' ' . $default_size; + + $attachments = get_children("post_parent=$en_post->ID&post_type=attachment&post_mime_type=image&orderby=\"menu_order ASC, ID ASC\"&numberposts=1"); + if($attachments == true) : + foreach($attachments as $id => $attachment) : + $img = wp_get_attachment_image_src($id, $default_size); + $img_arr[0] = $img; + endforeach; + $img_arr[1] = $img_class; + else : + $img_arr = false; + endif; + return $img_arr; +} +?> \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/header.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/IRI-Theme/header.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,97 @@ + +> + + + + <?php wp_title(''); ?> <?php if ( !(is_404()) && (is_single()) or (is_page()) or (is_archive()) ) { ?> :: <?php } ?> <?php bloginfo('name'); ?> + + + + + + + + + + + + + + + + + + + + + + + +
      + + + + + + \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/home.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/IRI-Theme/home.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,61 @@ + + +
      + + + +
      +
      +
      +
      + +
      +
      +
      +
      + +
      + + +
      +
      + + + + +
      +

      Actualités [+]

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

      Agenda

      + + + + + + +
      +
      +
      + + + \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/home.php.old --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/IRI-Theme/home.php.old Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,51 @@ + + +
      + + + +
      +
      +
      +
      + +
      +
      +
      +
      + +
      + + +
      +
      + + + + +

      Actualités

      + + +
      +
      +
      + +
      +
      + + + + +
      +
      +
      + + + \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/images/bgd_nav.gif Binary file web/wp-content/themes/IRI-Theme/images/bgd_nav.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/images/bgd_nav_over.gif Binary file web/wp-content/themes/IRI-Theme/images/bgd_nav_over.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/images/bgd_nav_top.gif Binary file web/wp-content/themes/IRI-Theme/images/bgd_nav_top.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/images/download_g.jpg Binary file web/wp-content/themes/IRI-Theme/images/download_g.jpg has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/images/get.png Binary file web/wp-content/themes/IRI-Theme/images/get.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/images/icons/feed.png Binary file web/wp-content/themes/IRI-Theme/images/icons/feed.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/images/icons/feed_small.png Binary file web/wp-content/themes/IRI-Theme/images/icons/feed_small.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/images/icons/li.png Binary file web/wp-content/themes/IRI-Theme/images/icons/li.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/images/icons/rss.png Binary file web/wp-content/themes/IRI-Theme/images/icons/rss.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/images/icons/search_black.gif Binary file web/wp-content/themes/IRI-Theme/images/icons/search_black.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/images/icons/search_grey.gif Binary file web/wp-content/themes/IRI-Theme/images/icons/search_grey.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/images/icons/search_grey.png Binary file web/wp-content/themes/IRI-Theme/images/icons/search_grey.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/images/logo-iri-petit.png Binary file web/wp-content/themes/IRI-Theme/images/logo-iri-petit.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/images/partenaires/cccb.gif Binary file web/wp-content/themes/IRI-Theme/images/partenaires/cccb.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/images/partenaires/centre-pompidou.gif Binary file web/wp-content/themes/IRI-Theme/images/partenaires/centre-pompidou.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/images/partenaires/ensci.gif Binary file web/wp-content/themes/IRI-Theme/images/partenaires/ensci.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/images/partenaires/goldsmiths.gif Binary file web/wp-content/themes/IRI-Theme/images/partenaires/goldsmiths.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/images/partenaires/iii-u-tokyo.gif Binary file web/wp-content/themes/IRI-Theme/images/partenaires/iii-u-tokyo.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/images/partenaires/institut-telecom.gif Binary file web/wp-content/themes/IRI-Theme/images/partenaires/institut-telecom.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/images/partenaires/microsoft.gif Binary file web/wp-content/themes/IRI-Theme/images/partenaires/microsoft.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/images/quote.png Binary file web/wp-content/themes/IRI-Theme/images/quote.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/index.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/IRI-Theme/index.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,30 @@ + +
      +
      + have_posts()) : $my_query->the_post(); + + // Don't show featured item + //if ($post->ID == $featuredID) continue; + + while (have_posts()) : the_post(); + + ?> + + + + + +
      +
      +
      +
      + +
      + +
      +
      + + \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/js/dhtml.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/IRI-Theme/js/dhtml.js Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,1 @@ +navHover = function() { var lis = document.getElementById("navmenu-h").getElementsByTagName("LI"); for (var i=0; i + ***********************************************************/ +function clearInput(field_id, term_to_clear) { + + // Clear input if it matches default value + if (document.getElementById(field_id).value == term_to_clear ) { + document.getElementById(field_id).value = ''; + } + + // If the value is blank, then put back term + else if (document.getElementById(field_id).value == '' ) { + document.getElementById(field_id).value = term_to_clear; + } +} // end clearSearch() \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/js/jquery-1.1.3.1.pack.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/IRI-Theme/js/jquery-1.1.3.1.pack.js Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/js/jquery-1.3.2.min.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/IRI-Theme/js/jquery-1.3.2.min.js Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/js/jquery-ui-1.7.2.custom.max.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/IRI-Theme/js/jquery-ui-1.7.2.custom.max.js Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,298 @@ +/* + * jQuery UI 1.7.2 + * + * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI + */ +jQuery.ui||(function(c){var i=c.fn.remove,d=c.browser.mozilla&&(parseFloat(c.browser.version)<1.9);c.ui={version:"1.7.2",plugin:{add:function(k,l,n){var m=c.ui[k].prototype;for(var j in n){m.plugins[j]=m.plugins[j]||[];m.plugins[j].push([l,n[j]])}},call:function(j,l,k){var n=j.plugins[l];if(!n||!j.element[0].parentNode){return}for(var m=0;m0){return true}m[j]=1;l=(m[j]>0);m[j]=0;return l},isOverAxis:function(k,j,l){return(k>j)&&(k<(j+l))},isOver:function(o,k,n,m,j,l){return c.ui.isOverAxis(o,n,j)&&c.ui.isOverAxis(k,m,l)},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};if(d){var f=c.attr,e=c.fn.removeAttr,h="http://www.w3.org/2005/07/aaa",a=/^aria-/,b=/^wairole:/;c.attr=function(k,j,l){var m=l!==undefined;return(j=="role"?(m?f.call(this,k,j,"wairole:"+l):(f.apply(this,arguments)||"").replace(b,"")):(a.test(j)?(m?k.setAttributeNS(h,j.replace(a,"aaa:"),l):f.call(this,k,j.replace(a,"aaa:"))):f.apply(this,arguments)))};c.fn.removeAttr=function(j){return(a.test(j)?this.each(function(){this.removeAttributeNS(h,j.replace(a,""))}):e.call(this,j))}}c.fn.extend({remove:function(){c("*",this).add(this).each(function(){c(this).triggerHandler("remove")});return i.apply(this,arguments)},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","").unbind("selectstart.ui")},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return false})},scrollParent:function(){var j;if((c.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){j=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(c.curCSS(this,"position",1))&&(/(auto|scroll)/).test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0)}else{j=this.parents().filter(function(){return(/(auto|scroll)/).test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!j.length?c(document):j}});c.extend(c.expr[":"],{data:function(l,k,j){return !!c.data(l,j[3])},focusable:function(k){var l=k.nodeName.toLowerCase(),j=c.attr(k,"tabindex");return(/input|select|textarea|button|object/.test(l)?!k.disabled:"a"==l||"area"==l?k.href||!isNaN(j):!isNaN(j))&&!c(k)["area"==l?"parents":"closest"](":hidden").length},tabbable:function(k){var j=c.attr(k,"tabindex");return(isNaN(j)||j>=0)&&c(k).is(":focusable")}});function g(m,n,o,l){function k(q){var p=c[m][n][q]||[];return(typeof p=="string"?p.split(/,?\s+/):p)}var j=k("getter");if(l.length==1&&typeof l[0]=="string"){j=j.concat(k("getterSetter"))}return(c.inArray(o,j)!=-1)}c.widget=function(k,j){var l=k.split(".")[0];k=k.split(".")[1];c.fn[k]=function(p){var n=(typeof p=="string"),o=Array.prototype.slice.call(arguments,1);if(n&&p.substring(0,1)=="_"){return this}if(n&&g(l,k,p,o)){var m=c.data(this[0],k);return(m?m[p].apply(m,o):undefined)}return this.each(function(){var q=c.data(this,k);(!q&&!n&&c.data(this,k,new c[l][k](this,p))._init());(q&&n&&c.isFunction(q[p])&&q[p].apply(q,o))})};c[l]=c[l]||{};c[l][k]=function(o,n){var m=this;this.namespace=l;this.widgetName=k;this.widgetEventPrefix=c[l][k].eventPrefix||k;this.widgetBaseClass=l+"-"+k;this.options=c.extend({},c.widget.defaults,c[l][k].defaults,c.metadata&&c.metadata.get(o)[k],n);this.element=c(o).bind("setData."+k,function(q,p,r){if(q.target==o){return m._setData(p,r)}}).bind("getData."+k,function(q,p){if(q.target==o){return m._getData(p)}}).bind("remove",function(){return m.destroy()})};c[l][k].prototype=c.extend({},c.widget.prototype,j);c[l][k].getterSetter="option"};c.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").removeAttr("aria-disabled")},option:function(l,m){var k=l,j=this;if(typeof l=="string"){if(m===undefined){return this._getData(l)}k={};k[l]=m}c.each(k,function(n,o){j._setData(n,o)})},_getData:function(j){return this.options[j]},_setData:function(j,k){this.options[j]=k;if(j=="disabled"){this.element[k?"addClass":"removeClass"](this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").attr("aria-disabled",k)}},enable:function(){this._setData("disabled",false)},disable:function(){this._setData("disabled",true)},_trigger:function(l,m,n){var p=this.options[l],j=(l==this.widgetEventPrefix?l:this.widgetEventPrefix+l);m=c.Event(m);m.type=j;if(m.originalEvent){for(var k=c.event.props.length,o;k;){o=c.event.props[--k];m[o]=m.originalEvent[o]}}this.element.trigger(m,n);return !(c.isFunction(p)&&p.call(this.element[0],m,n)===false||m.isDefaultPrevented())}};c.widget.defaults={disabled:false};c.ui.mouse={_mouseInit:function(){var j=this;this.element.bind("mousedown."+this.widgetName,function(k){return j._mouseDown(k)}).bind("click."+this.widgetName,function(k){if(j._preventClickEvent){j._preventClickEvent=false;k.stopImmediatePropagation();return false}});if(c.browser.msie){this._mouseUnselectable=this.element.attr("unselectable");this.element.attr("unselectable","on")}this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);(c.browser.msie&&this.element.attr("unselectable",this._mouseUnselectable))},_mouseDown:function(l){l.originalEvent=l.originalEvent||{};if(l.originalEvent.mouseHandled){return}(this._mouseStarted&&this._mouseUp(l));this._mouseDownEvent=l;var k=this,m=(l.which==1),j=(typeof this.options.cancel=="string"?c(l.target).parents().add(l.target).filter(this.options.cancel).length:false);if(!m||j||!this._mouseCapture(l)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){k.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(l)&&this._mouseDelayMet(l)){this._mouseStarted=(this._mouseStart(l)!==false);if(!this._mouseStarted){l.preventDefault();return true}}this._mouseMoveDelegate=function(n){return k._mouseMove(n)};this._mouseUpDelegate=function(n){return k._mouseUp(n)};c(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);(c.browser.safari||l.preventDefault());l.originalEvent.mouseHandled=true;return true},_mouseMove:function(j){if(c.browser.msie&&!j.button){return this._mouseUp(j)}if(this._mouseStarted){this._mouseDrag(j);return j.preventDefault()}if(this._mouseDistanceMet(j)&&this._mouseDelayMet(j)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,j)!==false);(this._mouseStarted?this._mouseDrag(j):this._mouseUp(j))}return !this._mouseStarted},_mouseUp:function(j){c(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=(j.target==this._mouseDownEvent.target);this._mouseStop(j)}return false},_mouseDistanceMet:function(j){return(Math.max(Math.abs(this._mouseDownEvent.pageX-j.pageX),Math.abs(this._mouseDownEvent.pageY-j.pageY))>=this.options.distance)},_mouseDelayMet:function(j){return this.mouseDelayMet},_mouseStart:function(j){},_mouseDrag:function(j){},_mouseStop:function(j){},_mouseCapture:function(j){return true}};c.ui.mouse.defaults={cancel:null,distance:1,delay:0}})(jQuery);;/* + * jQuery UI Draggable 1.7.2 + * + * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Draggables + * + * Depends: + * ui.core.js + */ +(function(a){a.widget("ui.draggable",a.extend({},a.ui.mouse,{_init:function(){if(this.options.helper=="original"&&!(/^(?:r|a|f)/).test(this.element.css("position"))){this.element[0].style.position="relative"}(this.options.addClasses&&this.element.addClass("ui-draggable"));(this.options.disabled&&this.element.addClass("ui-draggable-disabled"));this._mouseInit()},destroy:function(){if(!this.element.data("draggable")){return}this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy()},_mouseCapture:function(b){var c=this.options;if(this.helper||c.disabled||a(b.target).is(".ui-resizable-handle")){return false}this.handle=this._getHandle(b);if(!this.handle){return false}return true},_mouseStart:function(b){var c=this.options;this.helper=this._createHelper(b);this._cacheHelperProportions();if(a.ui.ddmanager){a.ui.ddmanager.current=this}this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};a.extend(this.offset,{click:{left:b.pageX-this.offset.left,top:b.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(b);this.originalPageX=b.pageX;this.originalPageY=b.pageY;if(c.cursorAt){this._adjustOffsetFromHelper(c.cursorAt)}if(c.containment){this._setContainment()}this._trigger("start",b);this._cacheHelperProportions();if(a.ui.ddmanager&&!c.dropBehaviour){a.ui.ddmanager.prepareOffsets(this,b)}this.helper.addClass("ui-draggable-dragging");this._mouseDrag(b,true);return true},_mouseDrag:function(b,d){this.position=this._generatePosition(b);this.positionAbs=this._convertPositionTo("absolute");if(!d){var c=this._uiHash();this._trigger("drag",b,c);this.position=c.position}if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"}if(a.ui.ddmanager){a.ui.ddmanager.drag(this,b)}return false},_mouseStop:function(c){var d=false;if(a.ui.ddmanager&&!this.options.dropBehaviour){d=a.ui.ddmanager.drop(this,c)}if(this.dropped){d=this.dropped;this.dropped=false}if((this.options.revert=="invalid"&&!d)||(this.options.revert=="valid"&&d)||this.options.revert===true||(a.isFunction(this.options.revert)&&this.options.revert.call(this.element,d))){var b=this;a(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){b._trigger("stop",c);b._clear()})}else{this._trigger("stop",c);this._clear()}return false},_getHandle:function(b){var c=!this.options.handle||!a(this.options.handle,this.element).length?true:false;a(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==b.target){c=true}});return c},_createHelper:function(c){var d=this.options;var b=a.isFunction(d.helper)?a(d.helper.apply(this.element[0],[c])):(d.helper=="clone"?this.element.clone():this.element);if(!b.parents("body").length){b.appendTo((d.appendTo=="parent"?this.element[0].parentNode:d.appendTo))}if(b[0]!=this.element[0]&&!(/(fixed|absolute)/).test(b.css("position"))){b.css("position","absolute")}return b},_adjustOffsetFromHelper:function(b){if(b.left!=undefined){this.offset.click.left=b.left+this.margins.left}if(b.right!=undefined){this.offset.click.left=this.helperProportions.width-b.right+this.margins.left}if(b.top!=undefined){this.offset.click.top=b.top+this.margins.top}if(b.bottom!=undefined){this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])){b.left+=this.scrollParent.scrollLeft();b.top+=this.scrollParent.scrollTop()}if((this.offsetParent[0]==document.body)||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie)){b={top:0,left:0}}return{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var b=this.element.position();return{top:b.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:b.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:(parseInt(this.element.css("marginLeft"),10)||0),top:(parseInt(this.element.css("marginTop"),10)||0)}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e=this.options;if(e.containment=="parent"){e.containment=this.helper[0].parentNode}if(e.containment=="document"||e.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(e.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a(e.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!(/^(document|window|parent)$/).test(e.containment)&&e.containment.constructor!=Array){var c=a(e.containment)[0];if(!c){return}var d=a(e.containment).offset();var b=(a(c).css("overflow")!="hidden");this.containment=[d.left+(parseInt(a(c).css("borderLeftWidth"),10)||0)+(parseInt(a(c).css("paddingLeft"),10)||0)-this.margins.left,d.top+(parseInt(a(c).css("borderTopWidth"),10)||0)+(parseInt(a(c).css("paddingTop"),10)||0)-this.margins.top,d.left+(b?Math.max(c.scrollWidth,c.offsetWidth):c.offsetWidth)-(parseInt(a(c).css("borderLeftWidth"),10)||0)-(parseInt(a(c).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,d.top+(b?Math.max(c.scrollHeight,c.offsetHeight):c.offsetHeight)-(parseInt(a(c).css("borderTopWidth"),10)||0)-(parseInt(a(c).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}else{if(e.containment.constructor==Array){this.containment=e.containment}}},_convertPositionTo:function(f,h){if(!h){h=this.position}var c=f=="absolute"?1:-1;var e=this.options,b=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,g=(/(html|body)/i).test(b[0].tagName);return{top:(h.top+this.offset.relative.top*c+this.offset.parent.top*c-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():(g?0:b.scrollTop()))*c)),left:(h.left+this.offset.relative.left*c+this.offset.parent.left*c-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():g?0:b.scrollLeft())*c))}},_generatePosition:function(e){var h=this.options,b=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,i=(/(html|body)/i).test(b[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()}var d=e.pageX;var c=e.pageY;if(this.originalPosition){if(this.containment){if(e.pageX-this.offset.click.leftthis.containment[2]){d=this.containment[2]+this.offset.click.left}if(e.pageY-this.offset.click.top>this.containment[3]){c=this.containment[3]+this.offset.click.top}}if(h.grid){var g=this.originalPageY+Math.round((c-this.originalPageY)/h.grid[1])*h.grid[1];c=this.containment?(!(g-this.offset.click.topthis.containment[3])?g:(!(g-this.offset.click.topthis.containment[2])?f:(!(f-this.offset.click.left
      ').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1000}).css(a(this).offset()).appendTo("body")})},stop:function(b,c){a("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}});a.ui.plugin.add("draggable","opacity",{start:function(c,d){var b=a(d.helper),e=a(this).data("draggable").options;if(b.css("opacity")){e._opacity=b.css("opacity")}b.css("opacity",e.opacity)},stop:function(b,c){var d=a(this).data("draggable").options;if(d._opacity){a(c.helper).css("opacity",d._opacity)}}});a.ui.plugin.add("draggable","scroll",{start:function(c,d){var b=a(this).data("draggable");if(b.scrollParent[0]!=document&&b.scrollParent[0].tagName!="HTML"){b.overflowOffset=b.scrollParent.offset()}},drag:function(d,e){var c=a(this).data("draggable"),f=c.options,b=false;if(c.scrollParent[0]!=document&&c.scrollParent[0].tagName!="HTML"){if(!f.axis||f.axis!="x"){if((c.overflowOffset.top+c.scrollParent[0].offsetHeight)-d.pageY=0;v--){var s=g.snapElements[v].left,n=s+g.snapElements[v].width,m=g.snapElements[v].top,A=m+g.snapElements[v].height;if(!((s-y=p&&n<=k)||(m>=p&&m<=k)||(nk))&&((e>=g&&e<=c)||(d>=g&&d<=c)||(ec));break;default:return false;break}};a.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(e,g){var b=a.ui.ddmanager.droppables[e.options.scope];var f=g?g.type:null;var h=(e.currentItem||e.element).find(":data(droppable)").andSelf();droppablesLoop:for(var d=0;d
      ').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=j.handles||(!c(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all"){this.handles="n,e,s,w,se,sw,ne,nw"}var k=this.handles.split(",");this.handles={};for(var f=0;f
    ');if(/sw|se|ne|nw/.test(h)){g.css({zIndex:++j.zIndex})}if("se"==h){g.addClass("ui-icon ui-icon-gripsmall-diagonal-se")}this.handles[h]=".ui-resizable-"+h;this.element.append(g)}}this._renderAxis=function(p){p=p||this.element;for(var m in this.handles){if(this.handles[m].constructor==String){this.handles[m]=c(this.handles[m],this.element).show()}if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var n=c(this.handles[m],this.element),o=0;o=/sw|ne|nw|se|n|s/.test(m)?n.outerHeight():n.outerWidth();var l=["padding",/ne|nw|n/.test(m)?"Top":/se|sw|s/.test(m)?"Bottom":/^e$/.test(m)?"Right":"Left"].join("");p.css(l,o);this._proportionallyResize()}if(!c(this.handles[m]).length){continue}}};this._renderAxis(this.element);this._handles=c(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!e.resizing){if(this.className){var i=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}e.axis=i&&i[1]?i[1]:"se"}});if(j.autoHide){this._handles.hide();c(this.element).addClass("ui-resizable-autohide").hover(function(){c(this).removeClass("ui-resizable-autohide");e._handles.show()},function(){if(!e.resizing){c(this).addClass("ui-resizable-autohide");e._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var d=function(f){c(f).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){d(this.element);var e=this.element;e.parent().append(this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")})).end().remove()}this.originalElement.css("resize",this.originalResizeStyle);d(this.originalElement)},_mouseCapture:function(e){var f=false;for(var d in this.handles){if(c(this.handles[d])[0]==e.target){f=true}}return this.options.disabled||!!f},_mouseStart:function(f){var i=this.options,e=this.element.position(),d=this.element;this.resizing=true;this.documentScroll={top:c(document).scrollTop(),left:c(document).scrollLeft()};if(d.is(".ui-draggable")||(/absolute/).test(d.css("position"))){d.css({position:"absolute",top:e.top,left:e.left})}if(c.browser.opera&&(/relative/).test(d.css("position"))){d.css({position:"relative",top:"auto",left:"auto"})}this._renderProxy();var j=b(this.helper.css("left")),g=b(this.helper.css("top"));if(i.containment){j+=c(i.containment).scrollLeft()||0;g+=c(i.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:j,top:g};this.size=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalSize=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalPosition={left:j,top:g};this.sizeDiff={width:d.outerWidth()-d.width(),height:d.outerHeight()-d.height()};this.originalMousePosition={left:f.pageX,top:f.pageY};this.aspectRatio=(typeof i.aspectRatio=="number")?i.aspectRatio:((this.originalSize.width/this.originalSize.height)||1);var h=c(".ui-resizable-"+this.axis).css("cursor");c("body").css("cursor",h=="auto"?this.axis+"-resize":h);d.addClass("ui-resizable-resizing");this._propagate("start",f);return true},_mouseDrag:function(d){var g=this.helper,f=this.options,l={},p=this,i=this.originalMousePosition,m=this.axis;var q=(d.pageX-i.left)||0,n=(d.pageY-i.top)||0;var h=this._change[m];if(!h){return false}var k=h.apply(this,[d,q,n]),j=c.browser.msie&&c.browser.version<7,e=this.sizeDiff;if(this._aspectRatio||d.shiftKey){k=this._updateRatio(k,d)}k=this._respectSize(k,d);this._propagate("resize",d);g.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});if(!this._helper&&this._proportionallyResizeElements.length){this._proportionallyResize()}this._updateCache(k);this._trigger("resize",d,this.ui());return false},_mouseStop:function(g){this.resizing=false;var h=this.options,l=this;if(this._helper){var f=this._proportionallyResizeElements,d=f.length&&(/textarea/i).test(f[0].nodeName),e=d&&c.ui.hasScroll(f[0],"left")?0:l.sizeDiff.height,j=d?0:l.sizeDiff.width;var m={width:(l.size.width-j),height:(l.size.height-e)},i=(parseInt(l.element.css("left"),10)+(l.position.left-l.originalPosition.left))||null,k=(parseInt(l.element.css("top"),10)+(l.position.top-l.originalPosition.top))||null;if(!h.animate){this.element.css(c.extend(m,{top:k,left:i}))}l.helper.height(l.size.height);l.helper.width(l.size.width);if(this._helper&&!h.animate){this._proportionallyResize()}}c("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",g);if(this._helper){this.helper.remove()}return false},_updateCache:function(d){var e=this.options;this.offset=this.helper.offset();if(a(d.left)){this.position.left=d.left}if(a(d.top)){this.position.top=d.top}if(a(d.height)){this.size.height=d.height}if(a(d.width)){this.size.width=d.width}},_updateRatio:function(g,f){var h=this.options,i=this.position,e=this.size,d=this.axis;if(g.height){g.width=(e.height*this.aspectRatio)}else{if(g.width){g.height=(e.width/this.aspectRatio)}}if(d=="sw"){g.left=i.left+(e.width-g.width);g.top=null}if(d=="nw"){g.top=i.top+(e.height-g.height);g.left=i.left+(e.width-g.width)}return g},_respectSize:function(k,f){var i=this.helper,h=this.options,q=this._aspectRatio||f.shiftKey,p=this.axis,s=a(k.width)&&h.maxWidth&&(h.maxWidthk.width),r=a(k.height)&&h.minHeight&&(h.minHeight>k.height);if(g){k.width=h.minWidth}if(r){k.height=h.minHeight}if(s){k.width=h.maxWidth}if(l){k.height=h.maxHeight}var e=this.originalPosition.left+this.originalSize.width,n=this.position.top+this.size.height;var j=/sw|nw|w/.test(p),d=/nw|ne|n/.test(p);if(g&&j){k.left=e-h.minWidth}if(s&&j){k.left=e-h.maxWidth}if(r&&d){k.top=n-h.minHeight}if(l&&d){k.top=n-h.maxHeight}var m=!k.width&&!k.height;if(m&&!k.left&&k.top){k.top=null}else{if(m&&!k.top&&k.left){k.left=null}}return k},_proportionallyResize:function(){var j=this.options;if(!this._proportionallyResizeElements.length){return}var f=this.helper||this.element;for(var e=0;e
    ');var d=c.browser.msie&&c.browser.version<7,f=(d?1:0),g=(d?2:-1);this.helper.addClass(this._helper).css({width:this.element.outerWidth()+g,height:this.element.outerHeight()+g,position:"absolute",left:this.elementOffset.left-f+"px",top:this.elementOffset.top-f+"px",zIndex:++h.zIndex});this.helper.appendTo("body").disableSelection()}else{this.helper=this.element}},_change:{e:function(f,e,d){return{width:this.originalSize.width+e}},w:function(g,e,d){var i=this.options,f=this.originalSize,h=this.originalPosition;return{left:h.left+e,width:f.width-e}},n:function(g,e,d){var i=this.options,f=this.originalSize,h=this.originalPosition;return{top:h.top+d,height:f.height-d}},s:function(f,e,d){return{height:this.originalSize.height+d}},se:function(f,e,d){return c.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[f,e,d]))},sw:function(f,e,d){return c.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[f,e,d]))},ne:function(f,e,d){return c.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[f,e,d]))},nw:function(f,e,d){return c.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[f,e,d]))}},_propagate:function(e,d){c.ui.plugin.call(this,e,[d,this.ui()]);(e!="resize"&&this._trigger(e,d,this.ui()))},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}));c.extend(c.ui.resizable,{version:"1.7.2",eventPrefix:"resize",defaults:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,cancel:":input,option",containment:false,delay:0,distance:1,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1000}});c.ui.plugin.add("resizable","alsoResize",{start:function(e,f){var d=c(this).data("resizable"),g=d.options;_store=function(h){c(h).each(function(){c(this).data("resizable-alsoresize",{width:parseInt(c(this).width(),10),height:parseInt(c(this).height(),10),left:parseInt(c(this).css("left"),10),top:parseInt(c(this).css("top"),10)})})};if(typeof(g.alsoResize)=="object"&&!g.alsoResize.parentNode){if(g.alsoResize.length){g.alsoResize=g.alsoResize[0];_store(g.alsoResize)}else{c.each(g.alsoResize,function(h,i){_store(h)})}}else{_store(g.alsoResize)}},resize:function(f,h){var e=c(this).data("resizable"),i=e.options,g=e.originalSize,k=e.originalPosition;var j={height:(e.size.height-g.height)||0,width:(e.size.width-g.width)||0,top:(e.position.top-k.top)||0,left:(e.position.left-k.left)||0},d=function(l,m){c(l).each(function(){var p=c(this),q=c(this).data("resizable-alsoresize"),o={},n=m&&m.length?m:["width","height","top","left"];c.each(n||["width","height","top","left"],function(r,t){var s=(q[t]||0)+(j[t]||0);if(s&&s>=0){o[t]=s||null}});if(/relative/.test(p.css("position"))&&c.browser.opera){e._revertToRelativePosition=true;p.css({position:"absolute",top:"auto",left:"auto"})}p.css(o)})};if(typeof(i.alsoResize)=="object"&&!i.alsoResize.nodeType){c.each(i.alsoResize,function(l,m){d(l,m)})}else{d(i.alsoResize)}},stop:function(e,f){var d=c(this).data("resizable");if(d._revertToRelativePosition&&c.browser.opera){d._revertToRelativePosition=false;el.css({position:"relative"})}c(this).removeData("resizable-alsoresize-start")}});c.ui.plugin.add("resizable","animate",{stop:function(h,m){var n=c(this).data("resizable"),i=n.options;var g=n._proportionallyResizeElements,d=g.length&&(/textarea/i).test(g[0].nodeName),e=d&&c.ui.hasScroll(g[0],"left")?0:n.sizeDiff.height,k=d?0:n.sizeDiff.width;var f={width:(n.size.width-k),height:(n.size.height-e)},j=(parseInt(n.element.css("left"),10)+(n.position.left-n.originalPosition.left))||null,l=(parseInt(n.element.css("top"),10)+(n.position.top-n.originalPosition.top))||null;n.element.animate(c.extend(f,l&&j?{top:l,left:j}:{}),{duration:i.animateDuration,easing:i.animateEasing,step:function(){var o={width:parseInt(n.element.css("width"),10),height:parseInt(n.element.css("height"),10),top:parseInt(n.element.css("top"),10),left:parseInt(n.element.css("left"),10)};if(g&&g.length){c(g[0]).css({width:o.width,height:o.height})}n._updateCache(o);n._propagate("resize",h)}})}});c.ui.plugin.add("resizable","containment",{start:function(e,q){var s=c(this).data("resizable"),i=s.options,k=s.element;var f=i.containment,j=(f instanceof c)?f.get(0):(/parent/.test(f))?k.parent().get(0):f;if(!j){return}s.containerElement=c(j);if(/document/.test(f)||f==document){s.containerOffset={left:0,top:0};s.containerPosition={left:0,top:0};s.parentData={element:c(document),left:0,top:0,width:c(document).width(),height:c(document).height()||document.body.parentNode.scrollHeight}}else{var m=c(j),h=[];c(["Top","Right","Left","Bottom"]).each(function(p,o){h[p]=b(m.css("padding"+o))});s.containerOffset=m.offset();s.containerPosition=m.position();s.containerSize={height:(m.innerHeight()-h[3]),width:(m.innerWidth()-h[1])};var n=s.containerOffset,d=s.containerSize.height,l=s.containerSize.width,g=(c.ui.hasScroll(j,"left")?j.scrollWidth:l),r=(c.ui.hasScroll(j)?j.scrollHeight:d);s.parentData={element:j,left:n.left,top:n.top,width:g,height:r}}},resize:function(f,p){var s=c(this).data("resizable"),h=s.options,e=s.containerSize,n=s.containerOffset,l=s.size,m=s.position,q=s._aspectRatio||f.shiftKey,d={top:0,left:0},g=s.containerElement;if(g[0]!=document&&(/static/).test(g.css("position"))){d=n}if(m.left<(s._helper?n.left:0)){s.size.width=s.size.width+(s._helper?(s.position.left-n.left):(s.position.left-d.left));if(q){s.size.height=s.size.width/h.aspectRatio}s.position.left=h.helper?n.left:0}if(m.top<(s._helper?n.top:0)){s.size.height=s.size.height+(s._helper?(s.position.top-n.top):s.position.top);if(q){s.size.width=s.size.height*h.aspectRatio}s.position.top=s._helper?n.top:0}s.offset.left=s.parentData.left+s.position.left;s.offset.top=s.parentData.top+s.position.top;var k=Math.abs((s._helper?s.offset.left-d.left:(s.offset.left-d.left))+s.sizeDiff.width),r=Math.abs((s._helper?s.offset.top-d.top:(s.offset.top-n.top))+s.sizeDiff.height);var j=s.containerElement.get(0)==s.element.parent().get(0),i=/relative|absolute/.test(s.containerElement.css("position"));if(j&&i){k-=s.parentData.left}if(k+s.size.width>=s.parentData.width){s.size.width=s.parentData.width-k;if(q){s.size.height=s.size.width/s.aspectRatio}}if(r+s.size.height>=s.parentData.height){s.size.height=s.parentData.height-r;if(q){s.size.width=s.size.height*s.aspectRatio}}},stop:function(e,m){var p=c(this).data("resizable"),f=p.options,k=p.position,l=p.containerOffset,d=p.containerPosition,g=p.containerElement;var i=c(p.helper),q=i.offset(),n=i.outerWidth()-p.sizeDiff.width,j=i.outerHeight()-p.sizeDiff.height;if(p._helper&&!f.animate&&(/relative/).test(g.css("position"))){c(this).css({left:q.left-d.left-l.left,width:n,height:j})}if(p._helper&&!f.animate&&(/static/).test(g.css("position"))){c(this).css({left:q.left-d.left-l.left,width:n,height:j})}}});c.ui.plugin.add("resizable","ghost",{start:function(f,g){var d=c(this).data("resizable"),h=d.options,e=d.size;d.ghost=d.originalElement.clone();d.ghost.css({opacity:0.25,display:"block",position:"relative",height:e.height,width:e.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof h.ghost=="string"?h.ghost:"");d.ghost.appendTo(d.helper)},resize:function(e,f){var d=c(this).data("resizable"),g=d.options;if(d.ghost){d.ghost.css({position:"relative",height:d.size.height,width:d.size.width})}},stop:function(e,f){var d=c(this).data("resizable"),g=d.options;if(d.ghost&&d.helper){d.helper.get(0).removeChild(d.ghost.get(0))}}});c.ui.plugin.add("resizable","grid",{resize:function(d,l){var n=c(this).data("resizable"),g=n.options,j=n.size,h=n.originalSize,i=n.originalPosition,m=n.axis,k=g._aspectRatio||d.shiftKey;g.grid=typeof g.grid=="number"?[g.grid,g.grid]:g.grid;var f=Math.round((j.width-h.width)/(g.grid[0]||1))*(g.grid[0]||1),e=Math.round((j.height-h.height)/(g.grid[1]||1))*(g.grid[1]||1);if(/^(se|s|e)$/.test(m)){n.size.width=h.width+f;n.size.height=h.height+e}else{if(/^(ne)$/.test(m)){n.size.width=h.width+f;n.size.height=h.height+e;n.position.top=i.top-e}else{if(/^(sw)$/.test(m)){n.size.width=h.width+f;n.size.height=h.height+e;n.position.left=i.left-f}else{n.size.width=h.width+f;n.size.height=h.height+e;n.position.top=i.top-e;n.position.left=i.left-f}}}}});var b=function(d){return parseInt(d,10)||0};var a=function(d){return !isNaN(parseInt(d,10))}})(jQuery);;/* + * jQuery UI Selectable 1.7.2 + * + * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Selectables + * + * Depends: + * ui.core.js + */ +(function(a){a.widget("ui.selectable",a.extend({},a.ui.mouse,{_init:function(){var b=this;this.element.addClass("ui-selectable");this.dragged=false;var c;this.refresh=function(){c=a(b.options.filter,b.element[0]);c.each(function(){var d=a(this);var e=d.offset();a.data(this,"selectable-item",{element:this,$element:d,left:e.left,top:e.top,right:e.left+d.outerWidth(),bottom:e.top+d.outerHeight(),startselected:false,selected:d.hasClass("ui-selected"),selecting:d.hasClass("ui-selecting"),unselecting:d.hasClass("ui-unselecting")})})};this.refresh();this.selectees=c.addClass("ui-selectee");this._mouseInit();this.helper=a(document.createElement("div")).css({border:"1px dotted black"}).addClass("ui-selectable-helper")},destroy:function(){this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");this._mouseDestroy()},_mouseStart:function(d){var b=this;this.opos=[d.pageX,d.pageY];if(this.options.disabled){return}var c=this.options;this.selectees=a(c.filter,this.element[0]);this._trigger("start",d);a(c.appendTo).append(this.helper);this.helper.css({"z-index":100,position:"absolute",left:d.clientX,top:d.clientY,width:0,height:0});if(c.autoRefresh){this.refresh()}this.selectees.filter(".ui-selected").each(function(){var e=a.data(this,"selectable-item");e.startselected=true;if(!d.metaKey){e.$element.removeClass("ui-selected");e.selected=false;e.$element.addClass("ui-unselecting");e.unselecting=true;b._trigger("unselecting",d,{unselecting:e.element})}});a(d.target).parents().andSelf().each(function(){var e=a.data(this,"selectable-item");if(e){e.$element.removeClass("ui-unselecting").addClass("ui-selecting");e.unselecting=false;e.selecting=true;e.selected=true;b._trigger("selecting",d,{selecting:e.element});return false}})},_mouseDrag:function(i){var c=this;this.dragged=true;if(this.options.disabled){return}var e=this.options;var d=this.opos[0],h=this.opos[1],b=i.pageX,g=i.pageY;if(d>b){var f=b;b=d;d=f}if(h>g){var f=g;g=h;h=f}this.helper.css({left:d,top:h,width:b-d,height:g-h});this.selectees.each(function(){var j=a.data(this,"selectable-item");if(!j||j.element==c.element[0]){return}var k=false;if(e.tolerance=="touch"){k=(!(j.left>b||j.rightg||j.bottomd&&j.righth&&j.bottom=0;b--){this.items[b].item.removeData("sortable-item")}},_mouseCapture:function(e,f){if(this.reverting){return false}if(this.options.disabled||this.options.type=="static"){return false}this._refreshItems(e);var d=null,c=this,b=a(e.target).parents().each(function(){if(a.data(this,"sortable-item")==c){d=a(this);return false}});if(a.data(e.target,"sortable-item")==c){d=a(e.target)}if(!d){return false}if(this.options.handle&&!f){var g=false;a(this.options.handle,d).find("*").andSelf().each(function(){if(this==e.target){g=true}});if(!g){return false}}this.currentItem=d;this._removeCurrentsFromItems();return true},_mouseStart:function(e,f,b){var g=this.options,c=this;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(e);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");a.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(e);this.originalPageX=e.pageX;this.originalPageY=e.pageY;if(g.cursorAt){this._adjustOffsetFromHelper(g.cursorAt)}this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};if(this.helper[0]!=this.currentItem[0]){this.currentItem.hide()}this._createPlaceholder();if(g.containment){this._setContainment()}if(g.cursor){if(a("body").css("cursor")){this._storedCursor=a("body").css("cursor")}a("body").css("cursor",g.cursor)}if(g.opacity){if(this.helper.css("opacity")){this._storedOpacity=this.helper.css("opacity")}this.helper.css("opacity",g.opacity)}if(g.zIndex){if(this.helper.css("zIndex")){this._storedZIndex=this.helper.css("zIndex")}this.helper.css("zIndex",g.zIndex)}if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){this.overflowOffset=this.scrollParent.offset()}this._trigger("start",e,this._uiHash());if(!this._preserveHelperProportions){this._cacheHelperProportions()}if(!b){for(var d=this.containers.length-1;d>=0;d--){this.containers[d]._trigger("activate",e,c._uiHash(this))}}if(a.ui.ddmanager){a.ui.ddmanager.current=this}if(a.ui.ddmanager&&!g.dropBehaviour){a.ui.ddmanager.prepareOffsets(this,e)}this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(e);return true},_mouseDrag:function(f){this.position=this._generatePosition(f);this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs){this.lastPositionAbs=this.positionAbs}if(this.options.scroll){var g=this.options,b=false;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){if((this.overflowOffset.top+this.scrollParent[0].offsetHeight)-f.pageY=0;d--){var e=this.items[d],c=e.item[0],h=this._intersectsWithPointer(e);if(!h){continue}if(c!=this.currentItem[0]&&this.placeholder[h==1?"next":"prev"]()[0]!=c&&!a.ui.contains(this.placeholder[0],c)&&(this.options.type=="semi-dynamic"?!a.ui.contains(this.element[0],c):true)){this.direction=h==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(e)){this._rearrange(f,e)}else{break}this._trigger("change",f,this._uiHash());break}}this._contactContainers(f);if(a.ui.ddmanager){a.ui.ddmanager.drag(this,f)}this._trigger("sort",f,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(c,d){if(!c){return}if(a.ui.ddmanager&&!this.options.dropBehaviour){a.ui.ddmanager.drop(this,c)}if(this.options.revert){var b=this;var e=b.placeholder.offset();b.reverting=true;a(this.helper).animate({left:e.left-this.offset.parent.left-b.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:e.top-this.offset.parent.top-b.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){b._clear(c)})}else{this._clear(c,d)}return false},cancel:function(){var b=this;if(this.dragging){this._mouseUp();if(this.options.helper=="original"){this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else{this.currentItem.show()}for(var c=this.containers.length-1;c>=0;c--){this.containers[c]._trigger("deactivate",null,b._uiHash(this));if(this.containers[c].containerCache.over){this.containers[c]._trigger("out",null,b._uiHash(this));this.containers[c].containerCache.over=0}}}if(this.placeholder[0].parentNode){this.placeholder[0].parentNode.removeChild(this.placeholder[0])}if(this.options.helper!="original"&&this.helper&&this.helper[0].parentNode){this.helper.remove()}a.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null});if(this.domPosition.prev){a(this.domPosition.prev).after(this.currentItem)}else{a(this.domPosition.parent).prepend(this.currentItem)}return true},serialize:function(d){var b=this._getItemsAsjQuery(d&&d.connected);var c=[];d=d||{};a(b).each(function(){var e=(a(d.item||this).attr(d.attribute||"id")||"").match(d.expression||(/(.+)[-=_](.+)/));if(e){c.push((d.key||e[1]+"[]")+"="+(d.key&&d.expression?e[1]:e[2]))}});return c.join("&")},toArray:function(d){var b=this._getItemsAsjQuery(d&&d.connected);var c=[];d=d||{};b.each(function(){c.push(a(d.item||this).attr(d.attribute||"id")||"")});return c},_intersectsWith:function(m){var e=this.positionAbs.left,d=e+this.helperProportions.width,k=this.positionAbs.top,j=k+this.helperProportions.height;var f=m.left,c=f+m.width,n=m.top,i=n+m.height;var o=this.offset.click.top,h=this.offset.click.left;var g=(k+o)>n&&(k+o)f&&(e+h)m[this.floating?"width":"height"])){return g}else{return(f0?"down":"up")},_getDragHorizontalDirection:function(){var b=this.positionAbs.left-this.lastPositionAbs.left;return b!=0&&(b>0?"right":"left")},refresh:function(b){this._refreshItems(b);this.refreshPositions()},_connectWith:function(){var b=this.options;return b.connectWith.constructor==String?[b.connectWith]:b.connectWith},_getItemsAsjQuery:function(b){var l=this;var g=[];var e=[];var h=this._connectWith();if(h&&b){for(var d=h.length-1;d>=0;d--){var k=a(h[d]);for(var c=k.length-1;c>=0;c--){var f=a.data(k[c],"sortable");if(f&&f!=this&&!f.options.disabled){e.push([a.isFunction(f.options.items)?f.options.items.call(f.element):a(f.options.items,f.element).not(".ui-sortable-helper"),f])}}}}e.push([a.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):a(this.options.items,this.element).not(".ui-sortable-helper"),this]);for(var d=e.length-1;d>=0;d--){e[d][0].each(function(){g.push(this)})}return a(g)},_removeCurrentsFromItems:function(){var d=this.currentItem.find(":data(sortable-item)");for(var c=0;c=0;e--){var m=a(l[e]);for(var d=m.length-1;d>=0;d--){var g=a.data(m[d],"sortable");if(g&&g!=this&&!g.options.disabled){f.push([a.isFunction(g.options.items)?g.options.items.call(g.element[0],b,{item:this.currentItem}):a(g.options.items,g.element),g]);this.containers.push(g)}}}}for(var e=f.length-1;e>=0;e--){var k=f[e][1];var c=f[e][0];for(var d=0,n=c.length;d=0;d--){var e=this.items[d];if(e.instance!=this.currentContainer&&this.currentContainer&&e.item[0]!=this.currentItem[0]){continue}var c=this.options.toleranceElement?a(this.options.toleranceElement,e.item):e.item;if(!b){e.width=c.outerWidth();e.height=c.outerHeight()}var f=c.offset();e.left=f.left;e.top=f.top}if(this.options.custom&&this.options.custom.refreshContainers){this.options.custom.refreshContainers.call(this)}else{for(var d=this.containers.length-1;d>=0;d--){var f=this.containers[d].element.offset();this.containers[d].containerCache.left=f.left;this.containers[d].containerCache.top=f.top;this.containers[d].containerCache.width=this.containers[d].element.outerWidth();this.containers[d].containerCache.height=this.containers[d].element.outerHeight()}}},_createPlaceholder:function(d){var b=d||this,e=b.options;if(!e.placeholder||e.placeholder.constructor==String){var c=e.placeholder;e.placeholder={element:function(){var f=a(document.createElement(b.currentItem[0].nodeName)).addClass(c||b.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];if(!c){f.style.visibility="hidden"}return f},update:function(f,g){if(c&&!e.forcePlaceholderSize){return}if(!g.height()){g.height(b.currentItem.innerHeight()-parseInt(b.currentItem.css("paddingTop")||0,10)-parseInt(b.currentItem.css("paddingBottom")||0,10))}if(!g.width()){g.width(b.currentItem.innerWidth()-parseInt(b.currentItem.css("paddingLeft")||0,10)-parseInt(b.currentItem.css("paddingRight")||0,10))}}}}b.placeholder=a(e.placeholder.element.call(b.element,b.currentItem));b.currentItem.after(b.placeholder);e.placeholder.update(b,b.placeholder)},_contactContainers:function(d){for(var c=this.containers.length-1;c>=0;c--){if(this._intersectsWith(this.containers[c].containerCache)){if(!this.containers[c].containerCache.over){if(this.currentContainer!=this.containers[c]){var h=10000;var g=null;var e=this.positionAbs[this.containers[c].floating?"left":"top"];for(var b=this.items.length-1;b>=0;b--){if(!a.ui.contains(this.containers[c].element[0],this.items[b].item[0])){continue}var f=this.items[b][this.containers[c].floating?"left":"top"];if(Math.abs(f-e)this.containment[2]){d=this.containment[2]+this.offset.click.left}if(e.pageY-this.offset.click.top>this.containment[3]){c=this.containment[3]+this.offset.click.top}}if(h.grid){var g=this.originalPageY+Math.round((c-this.originalPageY)/h.grid[1])*h.grid[1];c=this.containment?(!(g-this.offset.click.topthis.containment[3])?g:(!(g-this.offset.click.topthis.containment[2])?f:(!(f-this.offset.click.left=0;c--){if(a.ui.contains(this.containers[c].element[0],this.currentItem[0])&&!e){f.push((function(g){return function(h){g._trigger("receive",h,this._uiHash(this))}}).call(this,this.containers[c]));f.push((function(g){return function(h){g._trigger("update",h,this._uiHash(this))}}).call(this,this.containers[c]))}}}for(var c=this.containers.length-1;c>=0;c--){if(!e){f.push((function(g){return function(h){g._trigger("deactivate",h,this._uiHash(this))}}).call(this,this.containers[c]))}if(this.containers[c].containerCache.over){f.push((function(g){return function(h){g._trigger("out",h,this._uiHash(this))}}).call(this,this.containers[c]));this.containers[c].containerCache.over=0}}if(this._storedCursor){a("body").css("cursor",this._storedCursor)}if(this._storedOpacity){this.helper.css("opacity",this._storedOpacity)}if(this._storedZIndex){this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex)}this.dragging=false;if(this.cancelHelperRemoval){if(!e){this._trigger("beforeStop",d,this._uiHash());for(var c=0;c *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1000}})})(jQuery);;/* + * jQuery UI Accordion 1.7.2 + * + * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Accordion + * + * Depends: + * ui.core.js + */ +(function(a){a.widget("ui.accordion",{_init:function(){var d=this.options,b=this;this.running=0;if(d.collapsible==a.ui.accordion.defaults.collapsible&&d.alwaysOpen!=a.ui.accordion.defaults.alwaysOpen){d.collapsible=!d.alwaysOpen}if(d.navigation){var c=this.element.find("a").filter(d.navigationFilter);if(c.length){if(c.filter(d.header).length){this.active=c}else{this.active=c.parent().parent().prev();c.addClass("ui-accordion-content-active")}}}this.element.addClass("ui-accordion ui-widget ui-helper-reset");if(this.element[0].nodeName=="UL"){this.element.children("li").addClass("ui-accordion-li-fix")}this.headers=this.element.find(d.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){a(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){a(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){a(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){a(this).removeClass("ui-state-focus")});this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");this.active=this._findActive(this.active||d.active).toggleClass("ui-state-default").toggleClass("ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");this.active.next().addClass("ui-accordion-content-active");a("").addClass("ui-icon "+d.icons.header).prependTo(this.headers);this.active.find(".ui-icon").toggleClass(d.icons.header).toggleClass(d.icons.headerSelected);if(a.browser.msie){this.element.find("a").css("zoom","1")}this.resize();this.element.attr("role","tablist");this.headers.attr("role","tab").bind("keydown",function(e){return b._keydown(e)}).next().attr("role","tabpanel");this.headers.not(this.active||"").attr("aria-expanded","false").attr("tabIndex","-1").next().hide();if(!this.active.length){this.headers.eq(0).attr("tabIndex","0")}else{this.active.attr("aria-expanded","true").attr("tabIndex","0")}if(!a.browser.safari){this.headers.find("a").attr("tabIndex","-1")}if(d.event){this.headers.bind((d.event)+".accordion",function(e){return b._clickHandler.call(b,e,this)})}},destroy:function(){var c=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role").unbind(".accordion").removeData("accordion");this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("tabindex");this.headers.find("a").removeAttr("tabindex");this.headers.children(".ui-icon").remove();var b=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active");if(c.autoHeight||c.fillHeight){b.css("height","")}},_setData:function(b,c){if(b=="alwaysOpen"){b="collapsible";c=!c}a.widget.prototype._setData.apply(this,arguments)},_keydown:function(e){var g=this.options,f=a.ui.keyCode;if(g.disabled||e.altKey||e.ctrlKey){return}var d=this.headers.length;var b=this.headers.index(e.target);var c=false;switch(e.keyCode){case f.RIGHT:case f.DOWN:c=this.headers[(b+1)%d];break;case f.LEFT:case f.UP:c=this.headers[(b-1+d)%d];break;case f.SPACE:case f.ENTER:return this._clickHandler({target:e.target},e.target)}if(c){a(e.target).attr("tabIndex","-1");a(c).attr("tabIndex","0");c.focus();return false}return true},resize:function(){var e=this.options,d;if(e.fillSpace){if(a.browser.msie){var b=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}d=this.element.parent().height();if(a.browser.msie){this.element.parent().css("overflow",b)}this.headers.each(function(){d-=a(this).outerHeight()});var c=0;this.headers.next().each(function(){c=Math.max(c,a(this).innerHeight()-a(this).height())}).height(Math.max(0,d-c)).css("overflow","auto")}else{if(e.autoHeight){d=0;this.headers.next().each(function(){d=Math.max(d,a(this).outerHeight())}).height(d)}}},activate:function(b){var c=this._findActive(b)[0];this._clickHandler({target:c},c)},_findActive:function(b){return b?typeof b=="number"?this.headers.filter(":eq("+b+")"):this.headers.not(this.headers.not(b)):b===false?a([]):this.headers.filter(":eq(0)")},_clickHandler:function(b,f){var d=this.options;if(d.disabled){return false}if(!b.target&&d.collapsible){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").find(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header);this.active.next().addClass("ui-accordion-content-active");var h=this.active.next(),e={options:d,newHeader:a([]),oldHeader:d.active,newContent:a([]),oldContent:h},c=(this.active=a([]));this._toggle(c,h,e);return false}var g=a(b.currentTarget||f);var i=g[0]==this.active[0];if(this.running||(!d.collapsible&&i)){return false}this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").find(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header);this.active.next().addClass("ui-accordion-content-active");if(!i){g.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").find(".ui-icon").removeClass(d.icons.header).addClass(d.icons.headerSelected);g.next().addClass("ui-accordion-content-active")}var c=g.next(),h=this.active.next(),e={options:d,newHeader:i&&d.collapsible?a([]):g,oldHeader:this.active,newContent:i&&d.collapsible?a([]):c.find("> *"),oldContent:h.find("> *")},j=this.headers.index(this.active[0])>this.headers.index(g[0]);this.active=i?a([]):g;this._toggle(c,h,e,i,j);return false},_toggle:function(b,i,g,j,k){var d=this.options,m=this;this.toShow=b;this.toHide=i;this.data=g;var c=function(){if(!m){return}return m._completed.apply(m,arguments)};this._trigger("changestart",null,this.data);this.running=i.size()===0?b.size():i.size();if(d.animated){var f={};if(d.collapsible&&j){f={toShow:a([]),toHide:i,complete:c,down:k,autoHeight:d.autoHeight||d.fillSpace}}else{f={toShow:b,toHide:i,complete:c,down:k,autoHeight:d.autoHeight||d.fillSpace}}if(!d.proxied){d.proxied=d.animated}if(!d.proxiedDuration){d.proxiedDuration=d.duration}d.animated=a.isFunction(d.proxied)?d.proxied(f):d.proxied;d.duration=a.isFunction(d.proxiedDuration)?d.proxiedDuration(f):d.proxiedDuration;var l=a.ui.accordion.animations,e=d.duration,h=d.animated;if(!l[h]){l[h]=function(n){this.slide(n,{easing:h,duration:e||700})}}l[h](f)}else{if(d.collapsible&&j){b.toggle()}else{i.hide();b.show()}c(true)}i.prev().attr("aria-expanded","false").attr("tabIndex","-1").blur();b.prev().attr("aria-expanded","true").attr("tabIndex","0").focus()},_completed:function(b){var c=this.options;this.running=b?0:--this.running;if(this.running){return}if(c.clearStyle){this.toShow.add(this.toHide).css({height:"",overflow:""})}this._trigger("change",null,this.data)}});a.extend(a.ui.accordion,{version:"1.7.2",defaults:{active:null,alwaysOpen:true,animated:"slide",autoHeight:true,clearStyle:false,collapsible:false,event:"click",fillSpace:false,header:"> li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:false,navigationFilter:function(){return this.href.toLowerCase()==location.href.toLowerCase()}},animations:{slide:function(j,h){j=a.extend({easing:"swing",duration:300},j,h);if(!j.toHide.size()){j.toShow.animate({height:"show"},j);return}if(!j.toShow.size()){j.toHide.animate({height:"hide"},j);return}var c=j.toShow.css("overflow"),g,d={},f={},e=["height","paddingTop","paddingBottom"],b;var i=j.toShow;b=i[0].style.width;i.width(parseInt(i.parent().width(),10)-parseInt(i.css("paddingLeft"),10)-parseInt(i.css("paddingRight"),10)-(parseInt(i.css("borderLeftWidth"),10)||0)-(parseInt(i.css("borderRightWidth"),10)||0));a.each(e,function(k,m){f[m]="hide";var l=(""+a.css(j.toShow[0],m)).match(/^([\d+-.]+)(.*)$/);d[m]={value:l[1],unit:l[2]||"px"}});j.toShow.css({height:0,overflow:"hidden"}).show();j.toHide.filter(":hidden").each(j.complete).end().filter(":visible").animate(f,{step:function(k,l){if(l.prop=="height"){g=(l.now-l.start)/(l.end-l.start)}j.toShow[0].style[l.prop]=(g*d[l.prop].value)+d[l.prop].unit},duration:j.duration,easing:j.easing,complete:function(){if(!j.autoHeight){j.toShow.css("height","")}j.toShow.css("width",b);j.toShow.css({overflow:c});j.complete()}})},bounceslide:function(b){this.slide(b,{easing:b.down?"easeOutBounce":"swing",duration:b.down?1000:200})},easeslide:function(b){this.slide(b,{easing:"easeinout",duration:700})}}})})(jQuery);;/* + * jQuery UI Dialog 1.7.2 + * + * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Dialog + * + * Depends: + * ui.core.js + * ui.draggable.js + * ui.resizable.js + */ +(function(c){var b={dragStart:"start.draggable",drag:"drag.draggable",dragStop:"stop.draggable",maxHeight:"maxHeight.resizable",minHeight:"minHeight.resizable",maxWidth:"maxWidth.resizable",minWidth:"minWidth.resizable",resizeStart:"start.resizable",resize:"drag.resizable",resizeStop:"stop.resizable"},a="ui-dialog ui-widget ui-widget-content ui-corner-all ";c.widget("ui.dialog",{_init:function(){this.originalTitle=this.element.attr("title");var l=this,m=this.options,j=m.title||this.originalTitle||" ",e=c.ui.dialog.getTitleId(this.element),k=(this.uiDialog=c("
    ")).appendTo(document.body).hide().addClass(a+m.dialogClass).css({position:"absolute",overflow:"hidden",zIndex:m.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(n){(m.closeOnEscape&&n.keyCode&&n.keyCode==c.ui.keyCode.ESCAPE&&l.close(n))}).attr({role:"dialog","aria-labelledby":e}).mousedown(function(n){l.moveToTop(false,n)}),g=this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(k),f=(this.uiDialogTitlebar=c("
    ")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(k),i=c('').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){i.addClass("ui-state-hover")},function(){i.removeClass("ui-state-hover")}).focus(function(){i.addClass("ui-state-focus")}).blur(function(){i.removeClass("ui-state-focus")}).mousedown(function(n){n.stopPropagation()}).click(function(n){l.close(n);return false}).appendTo(f),h=(this.uiDialogTitlebarCloseText=c("")).addClass("ui-icon ui-icon-closethick").text(m.closeText).appendTo(i),d=c("").addClass("ui-dialog-title").attr("id",e).html(j).prependTo(f);f.find("*").add(f).disableSelection();(m.draggable&&c.fn.draggable&&this._makeDraggable());(m.resizable&&c.fn.resizable&&this._makeResizable());this._createButtons(m.buttons);this._isOpen=false;(m.bgiframe&&c.fn.bgiframe&&k.bgiframe());(m.autoOpen&&this.open())},destroy:function(){(this.overlay&&this.overlay.destroy());this.uiDialog.hide();this.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");this.uiDialog.remove();(this.originalTitle&&this.element.attr("title",this.originalTitle))},close:function(f){var d=this;if(false===d._trigger("beforeclose",f)){return}(d.overlay&&d.overlay.destroy());d.uiDialog.unbind("keypress.ui-dialog");(d.options.hide?d.uiDialog.hide(d.options.hide,function(){d._trigger("close",f)}):d.uiDialog.hide()&&d._trigger("close",f));c.ui.dialog.overlay.resize();d._isOpen=false;if(d.options.modal){var e=0;c(".ui-dialog").each(function(){if(this!=d.uiDialog[0]){e=Math.max(e,c(this).css("z-index"))}});c.ui.dialog.maxZ=e}},isOpen:function(){return this._isOpen},moveToTop:function(f,e){if((this.options.modal&&!f)||(!this.options.stack&&!this.options.modal)){return this._trigger("focus",e)}if(this.options.zIndex>c.ui.dialog.maxZ){c.ui.dialog.maxZ=this.options.zIndex}(this.overlay&&this.overlay.$el.css("z-index",c.ui.dialog.overlay.maxZ=++c.ui.dialog.maxZ));var d={scrollTop:this.element.attr("scrollTop"),scrollLeft:this.element.attr("scrollLeft")};this.uiDialog.css("z-index",++c.ui.dialog.maxZ);this.element.attr(d);this._trigger("focus",e)},open:function(){if(this._isOpen){return}var e=this.options,d=this.uiDialog;this.overlay=e.modal?new c.ui.dialog.overlay(this):null;(d.next().length&&d.appendTo("body"));this._size();this._position(e.position);d.show(e.show);this.moveToTop(true);(e.modal&&d.bind("keypress.ui-dialog",function(h){if(h.keyCode!=c.ui.keyCode.TAB){return}var g=c(":tabbable",this),i=g.filter(":first")[0],f=g.filter(":last")[0];if(h.target==f&&!h.shiftKey){setTimeout(function(){i.focus()},1)}else{if(h.target==i&&h.shiftKey){setTimeout(function(){f.focus()},1)}}}));c([]).add(d.find(".ui-dialog-content :tabbable:first")).add(d.find(".ui-dialog-buttonpane :tabbable:first")).add(d).filter(":first").focus();this._trigger("open");this._isOpen=true},_createButtons:function(g){var f=this,d=false,e=c("
    ").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix");this.uiDialog.find(".ui-dialog-buttonpane").remove();(typeof g=="object"&&g!==null&&c.each(g,function(){return !(d=true)}));if(d){c.each(g,function(h,i){c('').addClass("ui-state-default ui-corner-all").text(h).click(function(){i.apply(f.element[0],arguments)}).hover(function(){c(this).addClass("ui-state-hover")},function(){c(this).removeClass("ui-state-hover")}).focus(function(){c(this).addClass("ui-state-focus")}).blur(function(){c(this).removeClass("ui-state-focus")}).appendTo(e)});e.appendTo(this.uiDialog)}},_makeDraggable:function(){var d=this,f=this.options,e;this.uiDialog.draggable({cancel:".ui-dialog-content",handle:".ui-dialog-titlebar",containment:"document",start:function(){e=f.height;c(this).height(c(this).height()).addClass("ui-dialog-dragging");(f.dragStart&&f.dragStart.apply(d.element[0],arguments))},drag:function(){(f.drag&&f.drag.apply(d.element[0],arguments))},stop:function(){c(this).removeClass("ui-dialog-dragging").height(e);(f.dragStop&&f.dragStop.apply(d.element[0],arguments));c.ui.dialog.overlay.resize()}})},_makeResizable:function(g){g=(g===undefined?this.options.resizable:g);var d=this,f=this.options,e=typeof g=="string"?g:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",alsoResize:this.element,maxWidth:f.maxWidth,maxHeight:f.maxHeight,minWidth:f.minWidth,minHeight:f.minHeight,start:function(){c(this).addClass("ui-dialog-resizing");(f.resizeStart&&f.resizeStart.apply(d.element[0],arguments))},resize:function(){(f.resize&&f.resize.apply(d.element[0],arguments))},handles:e,stop:function(){c(this).removeClass("ui-dialog-resizing");f.height=c(this).height();f.width=c(this).width();(f.resizeStop&&f.resizeStop.apply(d.element[0],arguments));c.ui.dialog.overlay.resize()}}).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_position:function(i){var e=c(window),f=c(document),g=f.scrollTop(),d=f.scrollLeft(),h=g;if(c.inArray(i,["center","top","right","bottom","left"])>=0){i=[i=="right"||i=="left"?i:"center",i=="top"||i=="bottom"?i:"middle"]}if(i.constructor!=Array){i=["center","middle"]}if(i[0].constructor==Number){d+=i[0]}else{switch(i[0]){case"left":d+=0;break;case"right":d+=e.width()-this.uiDialog.outerWidth();break;default:case"center":d+=(e.width()-this.uiDialog.outerWidth())/2}}if(i[1].constructor==Number){g+=i[1]}else{switch(i[1]){case"top":g+=0;break;case"bottom":g+=e.height()-this.uiDialog.outerHeight();break;default:case"middle":g+=(e.height()-this.uiDialog.outerHeight())/2}}g=Math.max(g,h);this.uiDialog.css({top:g,left:d})},_setData:function(e,f){(b[e]&&this.uiDialog.data(b[e],f));switch(e){case"buttons":this._createButtons(f);break;case"closeText":this.uiDialogTitlebarCloseText.text(f);break;case"dialogClass":this.uiDialog.removeClass(this.options.dialogClass).addClass(a+f);break;case"draggable":(f?this._makeDraggable():this.uiDialog.draggable("destroy"));break;case"height":this.uiDialog.height(f);break;case"position":this._position(f);break;case"resizable":var d=this.uiDialog,g=this.uiDialog.is(":data(resizable)");(g&&!f&&d.resizable("destroy"));(g&&typeof f=="string"&&d.resizable("option","handles",f));(g||this._makeResizable(f));break;case"title":c(".ui-dialog-title",this.uiDialogTitlebar).html(f||" ");break;case"width":this.uiDialog.width(f);break}c.widget.prototype._setData.apply(this,arguments)},_size:function(){var e=this.options;this.element.css({height:0,minHeight:0,width:"auto"});var d=this.uiDialog.css({height:"auto",width:e.width}).height();this.element.css({minHeight:Math.max(e.minHeight-d,0),height:e.height=="auto"?"auto":Math.max(e.height-d,0)})}});c.extend(c.ui.dialog,{version:"1.7.2",defaults:{autoOpen:true,bgiframe:false,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false,position:"center",resizable:true,show:null,stack:true,title:"",width:300,zIndex:1000},getter:"isOpen",uuid:0,maxZ:0,getTitleId:function(d){return"ui-dialog-title-"+(d.attr("id")||++this.uuid)},overlay:function(d){this.$el=c.ui.dialog.overlay.create(d)}});c.extend(c.ui.dialog.overlay,{instances:[],maxZ:0,events:c.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(d){return d+".dialog-overlay"}).join(" "),create:function(e){if(this.instances.length===0){setTimeout(function(){if(c.ui.dialog.overlay.instances.length){c(document).bind(c.ui.dialog.overlay.events,function(f){var g=c(f.target).parents(".ui-dialog").css("zIndex")||0;return(g>c.ui.dialog.overlay.maxZ)})}},1);c(document).bind("keydown.dialog-overlay",function(f){(e.options.closeOnEscape&&f.keyCode&&f.keyCode==c.ui.keyCode.ESCAPE&&e.close(f))});c(window).bind("resize.dialog-overlay",c.ui.dialog.overlay.resize)}var d=c("
    ").appendTo(document.body).addClass("ui-widget-overlay").css({width:this.width(),height:this.height()});(e.options.bgiframe&&c.fn.bgiframe&&d.bgiframe());this.instances.push(d);return d},destroy:function(d){this.instances.splice(c.inArray(this.instances,d),1);if(this.instances.length===0){c([document,window]).unbind(".dialog-overlay")}d.remove();var e=0;c.each(this.instances,function(){e=Math.max(e,this.css("z-index"))});this.maxZ=e},height:function(){if(c.browser.msie&&c.browser.version<7){var e=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);var d=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);if(e
    ");if(!c.values){c.values=[this._valueMin(),this._valueMin()]}if(c.values.length&&c.values.length!=2){c.values=[c.values[0],c.values[0]]}}else{this.range=a("
    ")}this.range.appendTo(this.element).addClass("ui-slider-range");if(c.range=="min"||c.range=="max"){this.range.addClass("ui-slider-range-"+c.range)}this.range.addClass("ui-widget-header")}if(a(".ui-slider-handle",this.element).length==0){a('
    ').appendTo(this.element).addClass("ui-slider-handle")}if(c.values&&c.values.length){while(a(".ui-slider-handle",this.element).length').appendTo(this.element).addClass("ui-slider-handle")}}this.handles=a(".ui-slider-handle",this.element).addClass("ui-state-default ui-corner-all");this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(d){d.preventDefault()}).hover(function(){if(!c.disabled){a(this).addClass("ui-state-hover")}},function(){a(this).removeClass("ui-state-hover")}).focus(function(){if(!c.disabled){a(".ui-slider .ui-state-focus").removeClass("ui-state-focus");a(this).addClass("ui-state-focus")}else{a(this).blur()}}).blur(function(){a(this).removeClass("ui-state-focus")});this.handles.each(function(d){a(this).data("index.ui-slider-handle",d)});this.handles.keydown(function(i){var f=true;var e=a(this).data("index.ui-slider-handle");if(b.options.disabled){return}switch(i.keyCode){case a.ui.keyCode.HOME:case a.ui.keyCode.END:case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:f=false;if(!b._keySliding){b._keySliding=true;a(this).addClass("ui-state-active");b._start(i,e)}break}var g,d,h=b._step();if(b.options.values&&b.options.values.length){g=d=b.values(e)}else{g=d=b.value()}switch(i.keyCode){case a.ui.keyCode.HOME:d=b._valueMin();break;case a.ui.keyCode.END:d=b._valueMax();break;case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:if(g==b._valueMax()){return}d=g+h;break;case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:if(g==b._valueMin()){return}d=g-h;break}b._slide(i,e,d);return f}).keyup(function(e){var d=a(this).data("index.ui-slider-handle");if(b._keySliding){b._stop(e,d);b._change(e,d);b._keySliding=false;a(this).removeClass("ui-state-active")}});this._refreshValue()},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");this._mouseDestroy()},_mouseCapture:function(d){var e=this.options;if(e.disabled){return false}this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();var h={x:d.pageX,y:d.pageY};var j=this._normValueFromMouse(h);var c=this._valueMax()-this._valueMin()+1,f;var k=this,i;this.handles.each(function(l){var m=Math.abs(j-k.values(l));if(c>m){c=m;f=a(this);i=l}});if(e.range==true&&this.values(1)==e.min){f=a(this.handles[++i])}this._start(d,i);k._handleIndex=i;f.addClass("ui-state-active").focus();var g=f.offset();var b=!a(d.target).parents().andSelf().is(".ui-slider-handle");this._clickOffset=b?{left:0,top:0}:{left:d.pageX-g.left-(f.width()/2),top:d.pageY-g.top-(f.height()/2)-(parseInt(f.css("borderTopWidth"),10)||0)-(parseInt(f.css("borderBottomWidth"),10)||0)+(parseInt(f.css("marginTop"),10)||0)};j=this._normValueFromMouse(h);this._slide(d,i,j);return true},_mouseStart:function(b){return true},_mouseDrag:function(d){var b={x:d.pageX,y:d.pageY};var c=this._normValueFromMouse(b);this._slide(d,this._handleIndex,c);return false},_mouseStop:function(b){this.handles.removeClass("ui-state-active");this._stop(b,this._handleIndex);this._change(b,this._handleIndex);this._handleIndex=null;this._clickOffset=null;return false},_detectOrientation:function(){this.orientation=this.options.orientation=="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(d){var c,h;if("horizontal"==this.orientation){c=this.elementSize.width;h=d.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{c=this.elementSize.height;h=d.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}var f=(h/c);if(f>1){f=1}if(f<0){f=0}if("vertical"==this.orientation){f=1-f}var e=this._valueMax()-this._valueMin(),i=f*e,b=i%this.options.step,g=this._valueMin()+i-b;if(b>(this.options.step/2)){g+=this.options.step}return parseFloat(g.toFixed(5))},_start:function(d,c){var b={handle:this.handles[c],value:this.value()};if(this.options.values&&this.options.values.length){b.value=this.values(c);b.values=this.values()}this._trigger("start",d,b)},_slide:function(f,e,d){var g=this.handles[e];if(this.options.values&&this.options.values.length){var b=this.values(e?0:1);if((this.options.values.length==2&&this.options.range===true)&&((e==0&&d>b)||(e==1&&d1){this.options.values[b]=e;this._refreshValue(c);if(!d){this._change(null,b)}}if(arguments.length){if(this.options.values&&this.options.values.length){return this._values(b)}else{return this.value()}}else{return this._values()}},_setData:function(b,d,c){a.widget.prototype._setData.apply(this,arguments);switch(b){case"disabled":if(d){this.handles.filter(".ui-state-focus").blur();this.handles.removeClass("ui-state-hover");this.handles.attr("disabled","disabled")}else{this.handles.removeAttr("disabled")}case"orientation":this._detectOrientation();this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue(c);break;case"value":this._refreshValue(c);break}},_step:function(){var b=this.options.step;return b},_value:function(){var b=this.options.value;if(bthis._valueMax()){b=this._valueMax()}return b},_values:function(b){if(arguments.length){var c=this.options.values[b];if(cthis._valueMax()){c=this._valueMax()}return c}else{return this.options.values}},_valueMin:function(){var b=this.options.min;return b},_valueMax:function(){var b=this.options.max;return b},_refreshValue:function(c){var f=this.options.range,d=this.options,l=this;if(this.options.values&&this.options.values.length){var i,h;this.handles.each(function(p,n){var o=(l.values(p)-l._valueMin())/(l._valueMax()-l._valueMin())*100;var m={};m[l.orientation=="horizontal"?"left":"bottom"]=o+"%";a(this).stop(1,1)[c?"animate":"css"](m,d.animate);if(l.options.range===true){if(l.orientation=="horizontal"){(p==0)&&l.range.stop(1,1)[c?"animate":"css"]({left:o+"%"},d.animate);(p==1)&&l.range[c?"animate":"css"]({width:(o-lastValPercent)+"%"},{queue:false,duration:d.animate})}else{(p==0)&&l.range.stop(1,1)[c?"animate":"css"]({bottom:(o)+"%"},d.animate);(p==1)&&l.range[c?"animate":"css"]({height:(o-lastValPercent)+"%"},{queue:false,duration:d.animate})}}lastValPercent=o})}else{var j=this.value(),g=this._valueMin(),k=this._valueMax(),e=k!=g?(j-g)/(k-g)*100:0;var b={};b[l.orientation=="horizontal"?"left":"bottom"]=e+"%";this.handle.stop(1,1)[c?"animate":"css"](b,d.animate);(f=="min")&&(this.orientation=="horizontal")&&this.range.stop(1,1)[c?"animate":"css"]({width:e+"%"},d.animate);(f=="max")&&(this.orientation=="horizontal")&&this.range[c?"animate":"css"]({width:(100-e)+"%"},{queue:false,duration:d.animate});(f=="min")&&(this.orientation=="vertical")&&this.range.stop(1,1)[c?"animate":"css"]({height:e+"%"},d.animate);(f=="max")&&(this.orientation=="vertical")&&this.range[c?"animate":"css"]({height:(100-e)+"%"},{queue:false,duration:d.animate})}}}));a.extend(a.ui.slider,{getter:"value values",version:"1.7.2",eventPrefix:"slide",defaults:{animate:false,delay:0,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null}})})(jQuery);;/* + * jQuery UI Tabs 1.7.2 + * + * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Tabs + * + * Depends: + * ui.core.js + */ +(function(a){a.widget("ui.tabs",{_init:function(){if(this.options.deselectable!==undefined){this.options.collapsible=this.options.deselectable}this._tabify(true)},_setData:function(b,c){if(b=="selected"){if(this.options.collapsible&&c==this.options.selected){return}this.select(c)}else{this.options[b]=c;if(b=="deselectable"){this.options.collapsible=c}this._tabify()}},_tabId:function(b){return b.title&&b.title.replace(/\s/g,"_").replace(/[^A-Za-z0-9\-_:\.]/g,"")||this.options.idPrefix+a.data(b)},_sanitizeSelector:function(b){return b.replace(/:/g,"\\:")},_cookie:function(){var b=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+a.data(this.list[0]));return a.cookie.apply(null,[b].concat(a.makeArray(arguments)))},_ui:function(c,b){return{tab:c,panel:b,index:this.anchors.index(c)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var b=a(this);b.html(b.data("label.tabs")).removeData("label.tabs")})},_tabify:function(n){this.list=this.element.children("ul:first");this.lis=a("li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return a("a",this)[0]});this.panels=a([]);var p=this,d=this.options;var c=/^#.+/;this.anchors.each(function(r,o){var q=a(o).attr("href");var s=q.split("#")[0],u;if(s&&(s===location.toString().split("#")[0]||(u=a("base")[0])&&s===u.href)){q=o.hash;o.href=q}if(c.test(q)){p.panels=p.panels.add(p._sanitizeSelector(q))}else{if(q!="#"){a.data(o,"href.tabs",q);a.data(o,"load.tabs",q.replace(/#.*$/,""));var w=p._tabId(o);o.href="#"+w;var v=a("#"+w);if(!v.length){v=a(d.panelTemplate).attr("id",w).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(p.panels[r-1]||p.list);v.data("destroy.tabs",true)}p.panels=p.panels.add(v)}else{d.disabled.push(r)}}});if(n){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all");this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(d.selected===undefined){if(location.hash){this.anchors.each(function(q,o){if(o.hash==location.hash){d.selected=q;return false}})}if(typeof d.selected!="number"&&d.cookie){d.selected=parseInt(p._cookie(),10)}if(typeof d.selected!="number"&&this.lis.filter(".ui-tabs-selected").length){d.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}d.selected=d.selected||0}else{if(d.selected===null){d.selected=-1}}d.selected=((d.selected>=0&&this.anchors[d.selected])||d.selected<0)?d.selected:0;d.disabled=a.unique(d.disabled.concat(a.map(this.lis.filter(".ui-state-disabled"),function(q,o){return p.lis.index(q)}))).sort();if(a.inArray(d.selected,d.disabled)!=-1){d.disabled.splice(a.inArray(d.selected,d.disabled),1)}this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active");if(d.selected>=0&&this.anchors.length){this.panels.eq(d.selected).removeClass("ui-tabs-hide");this.lis.eq(d.selected).addClass("ui-tabs-selected ui-state-active");p.element.queue("tabs",function(){p._trigger("show",null,p._ui(p.anchors[d.selected],p.panels[d.selected]))});this.load(d.selected)}a(window).bind("unload",function(){p.lis.add(p.anchors).unbind(".tabs");p.lis=p.anchors=p.panels=null})}else{d.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}this.element[d.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");if(d.cookie){this._cookie(d.selected,d.cookie)}for(var g=0,m;(m=this.lis[g]);g++){a(m)[a.inArray(g,d.disabled)!=-1&&!a(m).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled")}if(d.cache===false){this.anchors.removeData("cache.tabs")}this.lis.add(this.anchors).unbind(".tabs");if(d.event!="mouseover"){var f=function(o,i){if(i.is(":not(.ui-state-disabled)")){i.addClass("ui-state-"+o)}};var j=function(o,i){i.removeClass("ui-state-"+o)};this.lis.bind("mouseover.tabs",function(){f("hover",a(this))});this.lis.bind("mouseout.tabs",function(){j("hover",a(this))});this.anchors.bind("focus.tabs",function(){f("focus",a(this).closest("li"))});this.anchors.bind("blur.tabs",function(){j("focus",a(this).closest("li"))})}var b,h;if(d.fx){if(a.isArray(d.fx)){b=d.fx[0];h=d.fx[1]}else{b=h=d.fx}}function e(i,o){i.css({display:""});if(a.browser.msie&&o.opacity){i[0].style.removeAttribute("filter")}}var k=h?function(i,o){a(i).closest("li").removeClass("ui-state-default").addClass("ui-tabs-selected ui-state-active");o.hide().removeClass("ui-tabs-hide").animate(h,h.duration||"normal",function(){e(o,h);p._trigger("show",null,p._ui(i,o[0]))})}:function(i,o){a(i).closest("li").removeClass("ui-state-default").addClass("ui-tabs-selected ui-state-active");o.removeClass("ui-tabs-hide");p._trigger("show",null,p._ui(i,o[0]))};var l=b?function(o,i){i.animate(b,b.duration||"normal",function(){p.lis.removeClass("ui-tabs-selected ui-state-active").addClass("ui-state-default");i.addClass("ui-tabs-hide");e(i,b);p.element.dequeue("tabs")})}:function(o,i,q){p.lis.removeClass("ui-tabs-selected ui-state-active").addClass("ui-state-default");i.addClass("ui-tabs-hide");p.element.dequeue("tabs")};this.anchors.bind(d.event+".tabs",function(){var o=this,r=a(this).closest("li"),i=p.panels.filter(":not(.ui-tabs-hide)"),q=a(p._sanitizeSelector(this.hash));if((r.hasClass("ui-tabs-selected")&&!d.collapsible)||r.hasClass("ui-state-disabled")||r.hasClass("ui-state-processing")||p._trigger("select",null,p._ui(this,q[0]))===false){this.blur();return false}d.selected=p.anchors.index(this);p.abort();if(d.collapsible){if(r.hasClass("ui-tabs-selected")){d.selected=-1;if(d.cookie){p._cookie(d.selected,d.cookie)}p.element.queue("tabs",function(){l(o,i)}).dequeue("tabs");this.blur();return false}else{if(!i.length){if(d.cookie){p._cookie(d.selected,d.cookie)}p.element.queue("tabs",function(){k(o,q)});p.load(p.anchors.index(this));this.blur();return false}}}if(d.cookie){p._cookie(d.selected,d.cookie)}if(q.length){if(i.length){p.element.queue("tabs",function(){l(o,i)})}p.element.queue("tabs",function(){k(o,q)});p.load(p.anchors.index(this))}else{throw"jQuery UI Tabs: Mismatching fragment identifier."}if(a.browser.msie){this.blur()}});this.anchors.bind("click.tabs",function(){return false})},destroy:function(){var b=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var c=a.data(this,"href.tabs");if(c){this.href=c}var d=a(this).unbind(".tabs");a.each(["href","load","cache"],function(e,f){d.removeData(f+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){if(a.data(this,"destroy.tabs")){a(this).remove()}else{a(this).removeClass(["ui-state-default","ui-corner-top","ui-tabs-selected","ui-state-active","ui-state-hover","ui-state-focus","ui-state-disabled","ui-tabs-panel","ui-widget-content","ui-corner-bottom","ui-tabs-hide"].join(" "))}});if(b.cookie){this._cookie(null,b.cookie)}},add:function(e,d,c){if(c===undefined){c=this.anchors.length}var b=this,g=this.options,i=a(g.tabTemplate.replace(/#\{href\}/g,e).replace(/#\{label\}/g,d)),h=!e.indexOf("#")?e.replace("#",""):this._tabId(a("a",i)[0]);i.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var f=a("#"+h);if(!f.length){f=a(g.panelTemplate).attr("id",h).data("destroy.tabs",true)}f.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(c>=this.lis.length){i.appendTo(this.list);f.appendTo(this.list[0].parentNode)}else{i.insertBefore(this.lis[c]);f.insertBefore(this.panels[c])}g.disabled=a.map(g.disabled,function(k,j){return k>=c?++k:k});this._tabify();if(this.anchors.length==1){i.addClass("ui-tabs-selected ui-state-active");f.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){b._trigger("show",null,b._ui(b.anchors[0],b.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[c],this.panels[c]))},remove:function(b){var d=this.options,e=this.lis.eq(b).remove(),c=this.panels.eq(b).remove();if(e.hasClass("ui-tabs-selected")&&this.anchors.length>1){this.select(b+(b+1=b?--g:g});this._tabify();this._trigger("remove",null,this._ui(e.find("a")[0],c[0]))},enable:function(b){var c=this.options;if(a.inArray(b,c.disabled)==-1){return}this.lis.eq(b).removeClass("ui-state-disabled");c.disabled=a.grep(c.disabled,function(e,d){return e!=b});this._trigger("enable",null,this._ui(this.anchors[b],this.panels[b]))},disable:function(c){var b=this,d=this.options;if(c!=d.selected){this.lis.eq(c).addClass("ui-state-disabled");d.disabled.push(c);d.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[c],this.panels[c]))}},select:function(b){if(typeof b=="string"){b=this.anchors.index(this.anchors.filter("[href$="+b+"]"))}else{if(b===null){b=-1}}if(b==-1&&this.options.collapsible){b=this.options.selected}this.anchors.eq(b).trigger(this.options.event+".tabs")},load:function(e){var c=this,g=this.options,b=this.anchors.eq(e)[0],d=a.data(b,"load.tabs");this.abort();if(!d||this.element.queue("tabs").length!==0&&a.data(b,"cache.tabs")){this.element.dequeue("tabs");return}this.lis.eq(e).addClass("ui-state-processing");if(g.spinner){var f=a("span",b);f.data("label.tabs",f.html()).html(g.spinner)}this.xhr=a.ajax(a.extend({},g.ajaxOptions,{url:d,success:function(i,h){a(c._sanitizeSelector(b.hash)).html(i);c._cleanup();if(g.cache){a.data(b,"cache.tabs",true)}c._trigger("load",null,c._ui(c.anchors[e],c.panels[e]));try{g.ajaxOptions.success(i,h)}catch(j){}c.element.dequeue("tabs")}}))},abort:function(){this.element.queue([]);this.panels.stop(false,true);if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup()},url:function(c,b){this.anchors.eq(c).removeData("cache.tabs").data("load.tabs",b)},length:function(){return this.anchors.length}});a.extend(a.ui.tabs,{version:"1.7.2",getter:"length",defaults:{ajaxOptions:null,cache:false,cookie:null,collapsible:false,disabled:[],event:"click",fx:null,idPrefix:"ui-tabs-",panelTemplate:"
    ",spinner:"Loading…",tabTemplate:'
  • #{label}
  • '}});a.extend(a.ui.tabs.prototype,{rotation:null,rotate:function(d,f){var b=this,g=this.options;var c=b._rotate||(b._rotate=function(h){clearTimeout(b.rotation);b.rotation=setTimeout(function(){var i=g.selected;b.select(++i')}$.extend(Datepicker.prototype,{markerClassName:"hasDatepicker",log:function(){if(this.debug){console.log.apply("",arguments)}},setDefaults:function(settings){extendRemove(this._defaults,settings||{});return this},_attachDatepicker:function(target,settings){var inlineSettings=null;for(var attrName in this._defaults){var attrValue=target.getAttribute("date:"+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}}var nodeName=target.nodeName.toLowerCase();var inline=(nodeName=="div"||nodeName=="span");if(!target.id){target.id="dp"+(++this.uuid)}var inst=this._newInst($(target),inline);inst.settings=$.extend({},settings||{},inlineSettings||{});if(nodeName=="input"){this._connectDatepicker(target,inst)}else{if(inline){this._inlineDatepicker(target,inst)}}},_newInst:function(target,inline){var id=target[0].id.replace(/([:\[\]\.])/g,"\\\\$1");return{id:id,input:target,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:inline,dpDiv:(!inline?this.dpDiv:$('
    '))}},_connectDatepicker:function(target,inst){var input=$(target);inst.append=$([]);inst.trigger=$([]);if(input.hasClass(this.markerClassName)){return}var appendText=this._get(inst,"appendText");var isRTL=this._get(inst,"isRTL");if(appendText){inst.append=$(''+appendText+"");input[isRTL?"before":"after"](inst.append)}var showOn=this._get(inst,"showOn");if(showOn=="focus"||showOn=="both"){input.focus(this._showDatepicker)}if(showOn=="button"||showOn=="both"){var buttonText=this._get(inst,"buttonText");var buttonImage=this._get(inst,"buttonImage");inst.trigger=$(this._get(inst,"buttonImageOnly")?$("").addClass(this._triggerClass).attr({src:buttonImage,alt:buttonText,title:buttonText}):$('').addClass(this._triggerClass).html(buttonImage==""?buttonText:$("").attr({src:buttonImage,alt:buttonText,title:buttonText})));input[isRTL?"before":"after"](inst.trigger);inst.trigger.click(function(){if($.datepicker._datepickerShowing&&$.datepicker._lastInput==target){$.datepicker._hideDatepicker()}else{$.datepicker._showDatepicker(target)}return false})}input.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value}).bind("getData.datepicker",function(event,key){return this._get(inst,key)});$.data(target,PROP_NAME,inst)},_inlineDatepicker:function(target,inst){var divSpan=$(target);if(divSpan.hasClass(this.markerClassName)){return}divSpan.addClass(this.markerClassName).append(inst.dpDiv).bind("setData.datepicker",function(event,key,value){inst.settings[key]=value}).bind("getData.datepicker",function(event,key){return this._get(inst,key)});$.data(target,PROP_NAME,inst);this._setDate(inst,this._getDefaultDate(inst));this._updateDatepicker(inst);this._updateAlternate(inst)},_dialogDatepicker:function(input,dateText,onSelect,settings,pos){var inst=this._dialogInst;if(!inst){var id="dp"+(++this.uuid);this._dialogInput=$('');this._dialogInput.keydown(this._doKeyDown);$("body").append(this._dialogInput);inst=this._dialogInst=this._newInst(this._dialogInput,false);inst.settings={};$.data(this._dialogInput[0],PROP_NAME,inst)}extendRemove(inst.settings,settings||{});this._dialogInput.val(dateText);this._pos=(pos?(pos.length?pos:[pos.pageX,pos.pageY]):null);if(!this._pos){var browserWidth=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;var browserHeight=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;var scrollX=document.documentElement.scrollLeft||document.body.scrollLeft;var scrollY=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[(browserWidth/2)-100+scrollX,(browserHeight/2)-150+scrollY]}this._dialogInput.css("left",this._pos[0]+"px").css("top",this._pos[1]+"px");inst.settings.onSelect=onSelect;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);if($.blockUI){$.blockUI(this.dpDiv)}$.data(this._dialogInput[0],PROP_NAME,inst);return this},_destroyDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();$.removeData(target,PROP_NAME);if(nodeName=="input"){inst.append.remove();inst.trigger.remove();$target.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress)}else{if(nodeName=="div"||nodeName=="span"){$target.removeClass(this.markerClassName).empty()}}},_enableDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();if(nodeName=="input"){target.disabled=false;inst.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else{if(nodeName=="div"||nodeName=="span"){var inline=$target.children("."+this._inlineClass);inline.children().removeClass("ui-state-disabled")}}this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value)})},_disableDatepicker:function(target){var $target=$(target);var inst=$.data(target,PROP_NAME);if(!$target.hasClass(this.markerClassName)){return}var nodeName=target.nodeName.toLowerCase();if(nodeName=="input"){target.disabled=true;inst.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else{if(nodeName=="div"||nodeName=="span"){var inline=$target.children("."+this._inlineClass);inline.children().addClass("ui-state-disabled")}}this._disabledInputs=$.map(this._disabledInputs,function(value){return(value==target?null:value)});this._disabledInputs[this._disabledInputs.length]=target},_isDisabledDatepicker:function(target){if(!target){return false}for(var i=0;i-1)}},_showDatepicker:function(input){input=input.target||input;if(input.nodeName.toLowerCase()!="input"){input=$("input",input.parentNode)[0]}if($.datepicker._isDisabledDatepicker(input)||$.datepicker._lastInput==input){return}var inst=$.datepicker._getInst(input);var beforeShow=$.datepicker._get(inst,"beforeShow");extendRemove(inst.settings,(beforeShow?beforeShow.apply(input,[input,inst]):{}));$.datepicker._hideDatepicker(null,"");$.datepicker._lastInput=input;$.datepicker._setDateFromField(inst);if($.datepicker._inDialog){input.value=""}if(!$.datepicker._pos){$.datepicker._pos=$.datepicker._findPos(input);$.datepicker._pos[1]+=input.offsetHeight}var isFixed=false;$(input).parents().each(function(){isFixed|=$(this).css("position")=="fixed";return !isFixed});if(isFixed&&$.browser.opera){$.datepicker._pos[0]-=document.documentElement.scrollLeft;$.datepicker._pos[1]-=document.documentElement.scrollTop}var offset={left:$.datepicker._pos[0],top:$.datepicker._pos[1]};$.datepicker._pos=null;inst.rangeStart=null;inst.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});$.datepicker._updateDatepicker(inst);offset=$.datepicker._checkOffset(inst,offset,isFixed);inst.dpDiv.css({position:($.datepicker._inDialog&&$.blockUI?"static":(isFixed?"fixed":"absolute")),display:"none",left:offset.left+"px",top:offset.top+"px"});if(!inst.inline){var showAnim=$.datepicker._get(inst,"showAnim")||"show";var duration=$.datepicker._get(inst,"duration");var postProcess=function(){$.datepicker._datepickerShowing=true;if($.browser.msie&&parseInt($.browser.version,10)<7){$("iframe.ui-datepicker-cover").css({width:inst.dpDiv.width()+4,height:inst.dpDiv.height()+4})}};if($.effects&&$.effects[showAnim]){inst.dpDiv.show(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess)}else{inst.dpDiv[showAnim](duration,postProcess)}if(duration==""){postProcess()}if(inst.input[0].type!="hidden"){inst.input[0].focus()}$.datepicker._curInst=inst}},_updateDatepicker:function(inst){var dims={width:inst.dpDiv.width()+4,height:inst.dpDiv.height()+4};var self=this;inst.dpDiv.empty().append(this._generateHTML(inst)).find("iframe.ui-datepicker-cover").css({width:dims.width,height:dims.height}).end().find("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a").bind("mouseout",function(){$(this).removeClass("ui-state-hover");if(this.className.indexOf("ui-datepicker-prev")!=-1){$(this).removeClass("ui-datepicker-prev-hover")}if(this.className.indexOf("ui-datepicker-next")!=-1){$(this).removeClass("ui-datepicker-next-hover")}}).bind("mouseover",function(){if(!self._isDisabledDatepicker(inst.inline?inst.dpDiv.parent()[0]:inst.input[0])){$(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");$(this).addClass("ui-state-hover");if(this.className.indexOf("ui-datepicker-prev")!=-1){$(this).addClass("ui-datepicker-prev-hover")}if(this.className.indexOf("ui-datepicker-next")!=-1){$(this).addClass("ui-datepicker-next-hover")}}}).end().find("."+this._dayOverClass+" a").trigger("mouseover").end();var numMonths=this._getNumberOfMonths(inst);var cols=numMonths[1];var width=17;if(cols>1){inst.dpDiv.addClass("ui-datepicker-multi-"+cols).css("width",(width*cols)+"em")}else{inst.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("")}inst.dpDiv[(numMonths[0]!=1||numMonths[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");inst.dpDiv[(this._get(inst,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");if(inst.input&&inst.input[0].type!="hidden"&&inst==$.datepicker._curInst){$(inst.input[0]).focus()}},_checkOffset:function(inst,offset,isFixed){var dpWidth=inst.dpDiv.outerWidth();var dpHeight=inst.dpDiv.outerHeight();var inputWidth=inst.input?inst.input.outerWidth():0;var inputHeight=inst.input?inst.input.outerHeight():0;var viewWidth=(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)+$(document).scrollLeft();var viewHeight=(window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)+$(document).scrollTop();offset.left-=(this._get(inst,"isRTL")?(dpWidth-inputWidth):0);offset.left-=(isFixed&&offset.left==inst.input.offset().left)?$(document).scrollLeft():0;offset.top-=(isFixed&&offset.top==(inst.input.offset().top+inputHeight))?$(document).scrollTop():0;offset.left-=(offset.left+dpWidth>viewWidth&&viewWidth>dpWidth)?Math.abs(offset.left+dpWidth-viewWidth):0;offset.top-=(offset.top+dpHeight>viewHeight&&viewHeight>dpHeight)?Math.abs(offset.top+dpHeight+inputHeight*2-viewHeight):0;return offset},_findPos:function(obj){while(obj&&(obj.type=="hidden"||obj.nodeType!=1)){obj=obj.nextSibling}var position=$(obj).offset();return[position.left,position.top]},_hideDatepicker:function(input,duration){var inst=this._curInst;if(!inst||(input&&inst!=$.data(input,PROP_NAME))){return}if(inst.stayOpen){this._selectDate("#"+inst.id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear))}inst.stayOpen=false;if(this._datepickerShowing){duration=(duration!=null?duration:this._get(inst,"duration"));var showAnim=this._get(inst,"showAnim");var postProcess=function(){$.datepicker._tidyDialog(inst)};if(duration!=""&&$.effects&&$.effects[showAnim]){inst.dpDiv.hide(showAnim,$.datepicker._get(inst,"showOptions"),duration,postProcess)}else{inst.dpDiv[(duration==""?"hide":(showAnim=="slideDown"?"slideUp":(showAnim=="fadeIn"?"fadeOut":"hide")))](duration,postProcess)}if(duration==""){this._tidyDialog(inst)}var onClose=this._get(inst,"onClose");if(onClose){onClose.apply((inst.input?inst.input[0]:null),[(inst.input?inst.input.val():""),inst])}this._datepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if($.blockUI){$.unblockUI();$("body").append(this.dpDiv)}}this._inDialog=false}this._curInst=null},_tidyDialog:function(inst){inst.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(event){if(!$.datepicker._curInst){return}var $target=$(event.target);if(($target.parents("#"+$.datepicker._mainDivId).length==0)&&!$target.hasClass($.datepicker.markerClassName)&&!$target.hasClass($.datepicker._triggerClass)&&$.datepicker._datepickerShowing&&!($.datepicker._inDialog&&$.blockUI)){$.datepicker._hideDatepicker(null,"")}},_adjustDate:function(id,offset,period){var target=$(id);var inst=this._getInst(target[0]);if(this._isDisabledDatepicker(target[0])){return}this._adjustInstDate(inst,offset+(period=="M"?this._get(inst,"showCurrentAtPos"):0),period);this._updateDatepicker(inst)},_gotoToday:function(id){var target=$(id);var inst=this._getInst(target[0]);if(this._get(inst,"gotoCurrent")&&inst.currentDay){inst.selectedDay=inst.currentDay;inst.drawMonth=inst.selectedMonth=inst.currentMonth;inst.drawYear=inst.selectedYear=inst.currentYear}else{var date=new Date();inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear()}this._notifyChange(inst);this._adjustDate(target)},_selectMonthYear:function(id,select,period){var target=$(id);var inst=this._getInst(target[0]);inst._selectingMonthYear=false;inst["selected"+(period=="M"?"Month":"Year")]=inst["draw"+(period=="M"?"Month":"Year")]=parseInt(select.options[select.selectedIndex].value,10);this._notifyChange(inst);this._adjustDate(target)},_clickMonthYear:function(id){var target=$(id);var inst=this._getInst(target[0]);if(inst.input&&inst._selectingMonthYear&&!$.browser.msie){inst.input[0].focus()}inst._selectingMonthYear=!inst._selectingMonthYear},_selectDay:function(id,month,year,td){var target=$(id);if($(td).hasClass(this._unselectableClass)||this._isDisabledDatepicker(target[0])){return}var inst=this._getInst(target[0]);inst.selectedDay=inst.currentDay=$("a",td).html();inst.selectedMonth=inst.currentMonth=month;inst.selectedYear=inst.currentYear=year;if(inst.stayOpen){inst.endDay=inst.endMonth=inst.endYear=null}this._selectDate(id,this._formatDate(inst,inst.currentDay,inst.currentMonth,inst.currentYear));if(inst.stayOpen){inst.rangeStart=this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay));this._updateDatepicker(inst)}},_clearDate:function(id){var target=$(id);var inst=this._getInst(target[0]);inst.stayOpen=false;inst.endDay=inst.endMonth=inst.endYear=inst.rangeStart=null;this._selectDate(target,"")},_selectDate:function(id,dateStr){var target=$(id);var inst=this._getInst(target[0]);dateStr=(dateStr!=null?dateStr:this._formatDate(inst));if(inst.input){inst.input.val(dateStr)}this._updateAlternate(inst);var onSelect=this._get(inst,"onSelect");if(onSelect){onSelect.apply((inst.input?inst.input[0]:null),[dateStr,inst])}else{if(inst.input){inst.input.trigger("change")}}if(inst.inline){this._updateDatepicker(inst)}else{if(!inst.stayOpen){this._hideDatepicker(null,this._get(inst,"duration"));this._lastInput=inst.input[0];if(typeof(inst.input[0])!="object"){inst.input[0].focus()}this._lastInput=null}}},_updateAlternate:function(inst){var altField=this._get(inst,"altField");if(altField){var altFormat=this._get(inst,"altFormat")||this._get(inst,"dateFormat");var date=this._getDate(inst);dateStr=this.formatDate(altFormat,date,this._getFormatConfig(inst));$(altField).each(function(){$(this).val(dateStr)})}},noWeekends:function(date){var day=date.getDay();return[(day>0&&day<6),""]},iso8601Week:function(date){var checkDate=new Date(date.getFullYear(),date.getMonth(),date.getDate());var firstMon=new Date(checkDate.getFullYear(),1-1,4);var firstDay=firstMon.getDay()||7;firstMon.setDate(firstMon.getDate()+1-firstDay);if(firstDay<4&&checkDatenew Date(checkDate.getFullYear(),12-1,28)){firstDay=new Date(checkDate.getFullYear()+1,1-1,4).getDay()||7;if(firstDay>4&&(checkDate.getDay()||7)0&&iValue="0"&&value.charAt(iValue)<="9"){num=num*10+parseInt(value.charAt(iValue++),10);size--}if(size==origSize){throw"Missing number at position "+iValue}return num};var getName=function(match,shortNames,longNames){var names=(lookAhead(match)?longNames:shortNames);var size=0;for(var j=0;j0&&iValue-1){month=1;day=doy;do{var dim=this._getDaysInMonth(year,month-1);if(day<=dim){break}month++;day-=dim}while(true)}var date=this._daylightSavingAdjust(new Date(year,month-1,day));if(date.getFullYear()!=year||date.getMonth()+1!=month||date.getDate()!=day){throw"Invalid date"}return date},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TIMESTAMP:"@",W3C:"yy-mm-dd",formatDate:function(format,date,settings){if(!date){return""}var dayNamesShort=(settings?settings.dayNamesShort:null)||this._defaults.dayNamesShort;var dayNames=(settings?settings.dayNames:null)||this._defaults.dayNames;var monthNamesShort=(settings?settings.monthNamesShort:null)||this._defaults.monthNamesShort;var monthNames=(settings?settings.monthNames:null)||this._defaults.monthNames;var lookAhead=function(match){var matches=(iFormat+1=0;m--){doy+=this._getDaysInMonth(date.getFullYear(),m)}output+=formatNumber("o",doy,3);break;case"m":output+=formatNumber("m",date.getMonth()+1,2);break;case"M":output+=formatName("M",date.getMonth(),monthNamesShort,monthNames);break;case"y":output+=(lookAhead("y")?date.getFullYear():(date.getYear()%100<10?"0":"")+date.getYear()%100);break;case"@":output+=date.getTime();break;case"'":if(lookAhead("'")){output+="'"}else{literal=true}break;default:output+=format.charAt(iFormat)}}}}return output},_possibleChars:function(format){var chars="";var literal=false;for(var iFormat=0;iFormatmaxDate?maxDate:date);return date},_determineDate:function(date,defaultDate){var offsetNumeric=function(offset){var date=new Date();date.setDate(date.getDate()+offset);return date};var offsetString=function(offset,getDaysInMonth){var date=new Date();var year=date.getFullYear();var month=date.getMonth();var day=date.getDate();var pattern=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g;var matches=pattern.exec(offset);while(matches){switch(matches[2]||"d"){case"d":case"D":day+=parseInt(matches[1],10);break;case"w":case"W":day+=parseInt(matches[1],10)*7;break;case"m":case"M":month+=parseInt(matches[1],10);day=Math.min(day,getDaysInMonth(year,month));break;case"y":case"Y":year+=parseInt(matches[1],10);day=Math.min(day,getDaysInMonth(year,month));break}matches=pattern.exec(offset)}return new Date(year,month,day)};date=(date==null?defaultDate:(typeof date=="string"?offsetString(date,this._getDaysInMonth):(typeof date=="number"?(isNaN(date)?defaultDate:offsetNumeric(date)):date)));date=(date&&date.toString()=="Invalid Date"?defaultDate:date);if(date){date.setHours(0);date.setMinutes(0);date.setSeconds(0);date.setMilliseconds(0)}return this._daylightSavingAdjust(date)},_daylightSavingAdjust:function(date){if(!date){return null}date.setHours(date.getHours()>12?date.getHours()+2:0);return date},_setDate:function(inst,date,endDate){var clear=!(date);var origMonth=inst.selectedMonth;var origYear=inst.selectedYear;date=this._determineDate(date,new Date());inst.selectedDay=inst.currentDay=date.getDate();inst.drawMonth=inst.selectedMonth=inst.currentMonth=date.getMonth();inst.drawYear=inst.selectedYear=inst.currentYear=date.getFullYear();if(origMonth!=inst.selectedMonth||origYear!=inst.selectedYear){this._notifyChange(inst)}this._adjustInstDate(inst);if(inst.input){inst.input.val(clear?"":this._formatDate(inst))}},_getDate:function(inst){var startDate=(!inst.currentYear||(inst.input&&inst.input.val()=="")?null:this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));return startDate},_generateHTML:function(inst){var today=new Date();today=this._daylightSavingAdjust(new Date(today.getFullYear(),today.getMonth(),today.getDate()));var isRTL=this._get(inst,"isRTL");var showButtonPanel=this._get(inst,"showButtonPanel");var hideIfNoPrevNext=this._get(inst,"hideIfNoPrevNext");var navigationAsDateFormat=this._get(inst,"navigationAsDateFormat");var numMonths=this._getNumberOfMonths(inst);var showCurrentAtPos=this._get(inst,"showCurrentAtPos");var stepMonths=this._get(inst,"stepMonths");var stepBigMonths=this._get(inst,"stepBigMonths");var isMultiMonth=(numMonths[0]!=1||numMonths[1]!=1);var currentDate=this._daylightSavingAdjust((!inst.currentDay?new Date(9999,9,9):new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));var minDate=this._getMinMaxDate(inst,"min",true);var maxDate=this._getMinMaxDate(inst,"max");var drawMonth=inst.drawMonth-showCurrentAtPos;var drawYear=inst.drawYear;if(drawMonth<0){drawMonth+=12;drawYear--}if(maxDate){var maxDraw=this._daylightSavingAdjust(new Date(maxDate.getFullYear(),maxDate.getMonth()-numMonths[1]+1,maxDate.getDate()));maxDraw=(minDate&&maxDrawmaxDraw){drawMonth--;if(drawMonth<0){drawMonth=11;drawYear--}}}inst.drawMonth=drawMonth;inst.drawYear=drawYear;var prevText=this._get(inst,"prevText");prevText=(!navigationAsDateFormat?prevText:this.formatDate(prevText,this._daylightSavingAdjust(new Date(drawYear,drawMonth-stepMonths,1)),this._getFormatConfig(inst)));var prev=(this._canAdjustMonth(inst,-1,drawYear,drawMonth)?''+prevText+"":(hideIfNoPrevNext?"":''+prevText+""));var nextText=this._get(inst,"nextText");nextText=(!navigationAsDateFormat?nextText:this.formatDate(nextText,this._daylightSavingAdjust(new Date(drawYear,drawMonth+stepMonths,1)),this._getFormatConfig(inst)));var next=(this._canAdjustMonth(inst,+1,drawYear,drawMonth)?''+nextText+"":(hideIfNoPrevNext?"":''+nextText+""));var currentText=this._get(inst,"currentText");var gotoDate=(this._get(inst,"gotoCurrent")&&inst.currentDay?currentDate:today);currentText=(!navigationAsDateFormat?currentText:this.formatDate(currentText,gotoDate,this._getFormatConfig(inst)));var controls=(!inst.inline?'":"");var buttonPanel=(showButtonPanel)?'
    '+(isRTL?controls:"")+(this._isInRange(inst,gotoDate)?'":"")+(isRTL?"":controls)+"
    ":"";var firstDay=parseInt(this._get(inst,"firstDay"),10);firstDay=(isNaN(firstDay)?0:firstDay);var dayNames=this._get(inst,"dayNames");var dayNamesShort=this._get(inst,"dayNamesShort");var dayNamesMin=this._get(inst,"dayNamesMin");var monthNames=this._get(inst,"monthNames");var monthNamesShort=this._get(inst,"monthNamesShort");var beforeShowDay=this._get(inst,"beforeShowDay");var showOtherMonths=this._get(inst,"showOtherMonths");var calculateWeek=this._get(inst,"calculateWeek")||this.iso8601Week;var endDate=inst.endDay?this._daylightSavingAdjust(new Date(inst.endYear,inst.endMonth,inst.endDay)):currentDate;var defaultDate=this._getDefaultDate(inst);var html="";for(var row=0;row'+(/all|left/.test(cornerClass)&&row==0?(isRTL?next:prev):"")+(/all|right/.test(cornerClass)&&row==0?(isRTL?prev:next):"")+this._generateMonthYearHeader(inst,drawMonth,drawYear,minDate,maxDate,selectedDate,row>0||col>0,monthNames,monthNamesShort)+'';var thead="";for(var dow=0;dow<7;dow++){var day=(dow+firstDay)%7;thead+="=5?' class="ui-datepicker-week-end"':"")+'>'+dayNamesMin[day]+""}calender+=thead+"";var daysInMonth=this._getDaysInMonth(drawYear,drawMonth);if(drawYear==inst.selectedYear&&drawMonth==inst.selectedMonth){inst.selectedDay=Math.min(inst.selectedDay,daysInMonth)}var leadDays=(this._getFirstDayOfMonth(drawYear,drawMonth)-firstDay+7)%7;var numRows=(isMultiMonth?6:Math.ceil((leadDays+daysInMonth)/7));var printDate=this._daylightSavingAdjust(new Date(drawYear,drawMonth,1-leadDays));for(var dRow=0;dRow";var tbody="";for(var dow=0;dow<7;dow++){var daySettings=(beforeShowDay?beforeShowDay.apply((inst.input?inst.input[0]:null),[printDate]):[true,""]);var otherMonth=(printDate.getMonth()!=drawMonth);var unselectable=otherMonth||!daySettings[0]||(minDate&&printDatemaxDate);tbody+='";printDate.setDate(printDate.getDate()+1);printDate=this._daylightSavingAdjust(printDate)}calender+=tbody+""}drawMonth++;if(drawMonth>11){drawMonth=0;drawYear++}calender+="
    =currentDate.getTime()&&printDate.getTime()<=endDate.getTime()?" "+this._currentClass:"")+(printDate.getTime()==today.getTime()?" ui-datepicker-today":""))+'"'+((!otherMonth||showOtherMonths)&&daySettings[2]?' title="'+daySettings[2]+'"':"")+(unselectable?"":" onclick=\"DP_jQuery.datepicker._selectDay('#"+inst.id+"',"+drawMonth+","+drawYear+', this);return false;"')+">"+(otherMonth?(showOtherMonths?printDate.getDate():" "):(unselectable?''+printDate.getDate()+"":'=currentDate.getTime()&&printDate.getTime()<=endDate.getTime()?" ui-state-active":"")+'" href="#">'+printDate.getDate()+""))+"
    "+(isMultiMonth?""+((numMonths[0]>0&&col==numMonths[1]-1)?'
    ':""):"");group+=calender}html+=group}html+=buttonPanel+($.browser.msie&&parseInt($.browser.version,10)<7&&!inst.inline?'':"");inst._keyEvent=false;return html},_generateMonthYearHeader:function(inst,drawMonth,drawYear,minDate,maxDate,selectedDate,secondary,monthNames,monthNamesShort){minDate=(inst.rangeStart&&minDate&&selectedDate "}else{var inMinYear=(minDate&&minDate.getFullYear()==drawYear);var inMaxYear=(maxDate&&maxDate.getFullYear()==drawYear);monthHtml+='"}if(!showMonthAfterYear){html+=monthHtml+((secondary||changeMonth||changeYear)&&(!(changeMonth&&changeYear))?" ":"")}if(secondary||!changeYear){html+=''+drawYear+""}else{var years=this._get(inst,"yearRange").split(":");var year=0;var endYear=0;if(years.length!=2){year=drawYear-10;endYear=drawYear+10}else{if(years[0].charAt(0)=="+"||years[0].charAt(0)=="-"){year=drawYear+parseInt(years[0],10);endYear=drawYear+parseInt(years[1],10)}else{year=parseInt(years[0],10);endYear=parseInt(years[1],10)}}year=(minDate?Math.max(year,minDate.getFullYear()):year);endYear=(maxDate?Math.min(endYear,maxDate.getFullYear()):endYear);html+='"}if(showMonthAfterYear){html+=(secondary||changeMonth||changeYear?" ":"")+monthHtml}html+="";return html},_adjustInstDate:function(inst,offset,period){var year=inst.drawYear+(period=="Y"?offset:0);var month=inst.drawMonth+(period=="M"?offset:0);var day=Math.min(inst.selectedDay,this._getDaysInMonth(year,month))+(period=="D"?offset:0);var date=this._daylightSavingAdjust(new Date(year,month,day));var minDate=this._getMinMaxDate(inst,"min",true);var maxDate=this._getMinMaxDate(inst,"max");date=(minDate&&datemaxDate?maxDate:date);inst.selectedDay=date.getDate();inst.drawMonth=inst.selectedMonth=date.getMonth();inst.drawYear=inst.selectedYear=date.getFullYear();if(period=="M"||period=="Y"){this._notifyChange(inst)}},_notifyChange:function(inst){var onChange=this._get(inst,"onChangeMonthYear");if(onChange){onChange.apply((inst.input?inst.input[0]:null),[inst.selectedYear,inst.selectedMonth+1,inst])}},_getNumberOfMonths:function(inst){var numMonths=this._get(inst,"numberOfMonths");return(numMonths==null?[1,1]:(typeof numMonths=="number"?[1,numMonths]:numMonths))},_getMinMaxDate:function(inst,minMax,checkRange){var date=this._determineDate(this._get(inst,minMax+"Date"),null);return(!checkRange||!inst.rangeStart?date:(!date||inst.rangeStart>date?inst.rangeStart:date))},_getDaysInMonth:function(year,month){return 32-new Date(year,month,32).getDate()},_getFirstDayOfMonth:function(year,month){return new Date(year,month,1).getDay()},_canAdjustMonth:function(inst,offset,curYear,curMonth){var numMonths=this._getNumberOfMonths(inst);var date=this._daylightSavingAdjust(new Date(curYear,curMonth+(offset<0?offset:numMonths[1]),1));if(offset<0){date.setDate(this._getDaysInMonth(date.getFullYear(),date.getMonth()))}return this._isInRange(inst,date)},_isInRange:function(inst,date){var newMinDate=(!inst.rangeStart?null:this._daylightSavingAdjust(new Date(inst.selectedYear,inst.selectedMonth,inst.selectedDay)));newMinDate=(newMinDate&&inst.rangeStart=minDate)&&(!maxDate||date<=maxDate))},_getFormatConfig:function(inst){var shortYearCutoff=this._get(inst,"shortYearCutoff");shortYearCutoff=(typeof shortYearCutoff!="string"?shortYearCutoff:new Date().getFullYear()%100+parseInt(shortYearCutoff,10));return{shortYearCutoff:shortYearCutoff,dayNamesShort:this._get(inst,"dayNamesShort"),dayNames:this._get(inst,"dayNames"),monthNamesShort:this._get(inst,"monthNamesShort"),monthNames:this._get(inst,"monthNames")}},_formatDate:function(inst,day,month,year){if(!day){inst.currentDay=inst.selectedDay;inst.currentMonth=inst.selectedMonth;inst.currentYear=inst.selectedYear}var date=(day?(typeof day=="object"?day:this._daylightSavingAdjust(new Date(year,month,day))):this._daylightSavingAdjust(new Date(inst.currentYear,inst.currentMonth,inst.currentDay)));return this.formatDate(this._get(inst,"dateFormat"),date,this._getFormatConfig(inst))}});function extendRemove(target,props){$.extend(target,props);for(var name in props){if(props[name]==null||props[name]==undefined){target[name]=props[name]}}return target}function isArray(a){return(a&&(($.browser.safari&&typeof a=="object"&&a.length)||(a.constructor&&a.constructor.toString().match(/\Array\(\)/))))}$.fn.datepicker=function(options){if(!$.datepicker.initialized){$(document).mousedown($.datepicker._checkExternalClick).find("body").append($.datepicker.dpDiv);$.datepicker.initialized=true}var otherArgs=Array.prototype.slice.call(arguments,1);if(typeof options=="string"&&(options=="isDisabled"||options=="getDate")){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs))}if(options=="option"&&arguments.length==2&&typeof arguments[1]=="string"){return $.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this[0]].concat(otherArgs))}return this.each(function(){typeof options=="string"?$.datepicker["_"+options+"Datepicker"].apply($.datepicker,[this].concat(otherArgs)):$.datepicker._attachDatepicker(this,options)})};$.datepicker=new Datepicker();$.datepicker.initialized=false;$.datepicker.uuid=new Date().getTime();$.datepicker.version="1.7.2";window.DP_jQuery=$})(jQuery);;/* + * jQuery UI Progressbar 1.7.2 + * + * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Progressbar + * + * Depends: + * ui.core.js + */ +(function(a){a.widget("ui.progressbar",{_init:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this._valueMin(),"aria-valuemax":this._valueMax(),"aria-valuenow":this._value()});this.valueDiv=a('
    ').appendTo(this.element);this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow").removeData("progressbar").unbind(".progressbar");this.valueDiv.remove();a.widget.prototype.destroy.apply(this,arguments)},value:function(b){if(b===undefined){return this._value()}this._setData("value",b);return this},_setData:function(b,c){switch(b){case"value":this.options.value=c;this._refreshValue();this._trigger("change",null,{});break}a.widget.prototype._setData.apply(this,arguments)},_value:function(){var b=this.options.value;if(bthis._valueMax()){b=this._valueMax()}return b},_valueMin:function(){var b=0;return b},_valueMax:function(){var b=100;return b},_refreshValue:function(){var b=this.value();this.valueDiv[b==this._valueMax()?"addClass":"removeClass"]("ui-corner-right");this.valueDiv.width(b+"%");this.element.attr("aria-valuenow",b)}});a.extend(a.ui.progressbar,{version:"1.7.2",defaults:{value:0}})})(jQuery);;/* + * jQuery UI Effects 1.7.2 + * + * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Effects/ + */ +jQuery.effects||(function(d){d.effects={version:"1.7.2",save:function(g,h){for(var f=0;f');var j=f.parent();if(f.css("position")=="static"){j.css({position:"relative"});f.css({position:"relative"})}else{var i=f.css("top");if(isNaN(parseInt(i,10))){i="auto"}var h=f.css("left");if(isNaN(parseInt(h,10))){h="auto"}j.css({position:f.css("position"),top:i,left:h,zIndex:f.css("z-index")}).show();f.css({position:"relative",top:0,left:0})}j.css(g);return j},removeWrapper:function(f){if(f.parent().is(".ui-effects-wrapper")){return f.parent().replaceWith(f)}return f},setTransition:function(g,i,f,h){h=h||{};d.each(i,function(k,j){unit=g.cssUnit(j);if(unit[0]>0){h[j]=unit[0]*f+unit[1]}});return h},animateClass:function(h,i,k,j){var f=(typeof k=="function"?k:(j?j:null));var g=(typeof k=="string"?k:null);return this.each(function(){var q={};var o=d(this);var p=o.attr("style")||"";if(typeof p=="object"){p=p.cssText}if(h.toggle){o.hasClass(h.toggle)?h.remove=h.toggle:h.add=h.toggle}var l=d.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(h.add){o.addClass(h.add)}if(h.remove){o.removeClass(h.remove)}var m=d.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(h.add){o.removeClass(h.add)}if(h.remove){o.addClass(h.remove)}for(var r in m){if(typeof m[r]!="function"&&m[r]&&r.indexOf("Moz")==-1&&r.indexOf("length")==-1&&m[r]!=l[r]&&(r.match(/color/i)||(!r.match(/color/i)&&!isNaN(parseInt(m[r],10))))&&(l.position!="static"||(l.position=="static"&&!r.match(/left|top|bottom|right/)))){q[r]=m[r]}}o.animate(q,i,g,function(){if(typeof d(this).attr("style")=="object"){d(this).attr("style")["cssText"]="";d(this).attr("style")["cssText"]=p}else{d(this).attr("style",p)}if(h.add){d(this).addClass(h.add)}if(h.remove){d(this).removeClass(h.remove)}if(f){f.apply(this,arguments)}})})}};function c(g,f){var i=g[1]&&g[1].constructor==Object?g[1]:{};if(f){i.mode=f}var h=g[1]&&g[1].constructor!=Object?g[1]:(i.duration?i.duration:g[2]);h=d.fx.off?0:typeof h==="number"?h:d.fx.speeds[h]||d.fx.speeds._default;var j=i.callback||(d.isFunction(g[1])&&g[1])||(d.isFunction(g[2])&&g[2])||(d.isFunction(g[3])&&g[3]);return[g[0],i,h,j]}d.fn.extend({_show:d.fn.show,_hide:d.fn.hide,__toggle:d.fn.toggle,_addClass:d.fn.addClass,_removeClass:d.fn.removeClass,_toggleClass:d.fn.toggleClass,effect:function(g,f,h,i){return d.effects[g]?d.effects[g].call(this,{method:g,options:f||{},duration:h,callback:i}):null},show:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))){return this._show.apply(this,arguments)}else{return this.effect.apply(this,c(arguments,"show"))}},hide:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))){return this._hide.apply(this,arguments)}else{return this.effect.apply(this,c(arguments,"hide"))}},toggle:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))||(d.isFunction(arguments[0])||typeof arguments[0]=="boolean")){return this.__toggle.apply(this,arguments)}else{return this.effect.apply(this,c(arguments,"toggle"))}},addClass:function(g,f,i,h){return f?d.effects.animateClass.apply(this,[{add:g},f,i,h]):this._addClass(g)},removeClass:function(g,f,i,h){return f?d.effects.animateClass.apply(this,[{remove:g},f,i,h]):this._removeClass(g)},toggleClass:function(g,f,i,h){return((typeof f!=="boolean")&&f)?d.effects.animateClass.apply(this,[{toggle:g},f,i,h]):this._toggleClass(g,f)},morph:function(f,h,g,j,i){return d.effects.animateClass.apply(this,[{add:h,remove:f},g,j,i])},switchClass:function(){return this.morph.apply(this,arguments)},cssUnit:function(f){var g=this.css(f),h=[];d.each(["em","px","%","pt"],function(j,k){if(g.indexOf(k)>0){h=[parseFloat(g),k]}});return h}});d.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","outlineColor"],function(g,f){d.fx.step[f]=function(h){if(h.state==0){h.start=e(h.elem,f);h.end=b(h.end)}h.elem.style[f]="rgb("+[Math.max(Math.min(parseInt((h.pos*(h.end[0]-h.start[0]))+h.start[0],10),255),0),Math.max(Math.min(parseInt((h.pos*(h.end[1]-h.start[1]))+h.start[1],10),255),0),Math.max(Math.min(parseInt((h.pos*(h.end[2]-h.start[2]))+h.start[2],10),255),0)].join(",")+")"}});function b(g){var f;if(g&&g.constructor==Array&&g.length==3){return g}if(f=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(g)){return[parseInt(f[1],10),parseInt(f[2],10),parseInt(f[3],10)]}if(f=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(g)){return[parseFloat(f[1])*2.55,parseFloat(f[2])*2.55,parseFloat(f[3])*2.55]}if(f=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(g)){return[parseInt(f[1],16),parseInt(f[2],16),parseInt(f[3],16)]}if(f=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(g)){return[parseInt(f[1]+f[1],16),parseInt(f[2]+f[2],16),parseInt(f[3]+f[3],16)]}if(f=/rgba\(0, 0, 0, 0\)/.exec(g)){return a.transparent}return a[d.trim(g).toLowerCase()]}function e(h,f){var g;do{g=d.curCSS(h,f);if(g!=""&&g!="transparent"||d.nodeName(h,"body")){break}f="backgroundColor"}while(h=h.parentNode);return b(g)}var a={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]};d.easing.jswing=d.easing.swing;d.extend(d.easing,{def:"easeOutQuad",swing:function(g,h,f,j,i){return d.easing[d.easing.def](g,h,f,j,i)},easeInQuad:function(g,h,f,j,i){return j*(h/=i)*h+f},easeOutQuad:function(g,h,f,j,i){return -j*(h/=i)*(h-2)+f},easeInOutQuad:function(g,h,f,j,i){if((h/=i/2)<1){return j/2*h*h+f}return -j/2*((--h)*(h-2)-1)+f},easeInCubic:function(g,h,f,j,i){return j*(h/=i)*h*h+f},easeOutCubic:function(g,h,f,j,i){return j*((h=h/i-1)*h*h+1)+f},easeInOutCubic:function(g,h,f,j,i){if((h/=i/2)<1){return j/2*h*h*h+f}return j/2*((h-=2)*h*h+2)+f},easeInQuart:function(g,h,f,j,i){return j*(h/=i)*h*h*h+f},easeOutQuart:function(g,h,f,j,i){return -j*((h=h/i-1)*h*h*h-1)+f},easeInOutQuart:function(g,h,f,j,i){if((h/=i/2)<1){return j/2*h*h*h*h+f}return -j/2*((h-=2)*h*h*h-2)+f},easeInQuint:function(g,h,f,j,i){return j*(h/=i)*h*h*h*h+f},easeOutQuint:function(g,h,f,j,i){return j*((h=h/i-1)*h*h*h*h+1)+f},easeInOutQuint:function(g,h,f,j,i){if((h/=i/2)<1){return j/2*h*h*h*h*h+f}return j/2*((h-=2)*h*h*h*h+2)+f},easeInSine:function(g,h,f,j,i){return -j*Math.cos(h/i*(Math.PI/2))+j+f},easeOutSine:function(g,h,f,j,i){return j*Math.sin(h/i*(Math.PI/2))+f},easeInOutSine:function(g,h,f,j,i){return -j/2*(Math.cos(Math.PI*h/i)-1)+f},easeInExpo:function(g,h,f,j,i){return(h==0)?f:j*Math.pow(2,10*(h/i-1))+f},easeOutExpo:function(g,h,f,j,i){return(h==i)?f+j:j*(-Math.pow(2,-10*h/i)+1)+f},easeInOutExpo:function(g,h,f,j,i){if(h==0){return f}if(h==i){return f+j}if((h/=i/2)<1){return j/2*Math.pow(2,10*(h-1))+f}return j/2*(-Math.pow(2,-10*--h)+2)+f},easeInCirc:function(g,h,f,j,i){return -j*(Math.sqrt(1-(h/=i)*h)-1)+f},easeOutCirc:function(g,h,f,j,i){return j*Math.sqrt(1-(h=h/i-1)*h)+f},easeInOutCirc:function(g,h,f,j,i){if((h/=i/2)<1){return -j/2*(Math.sqrt(1-h*h)-1)+f}return j/2*(Math.sqrt(1-(h-=2)*h)+1)+f},easeInElastic:function(g,i,f,m,l){var j=1.70158;var k=0;var h=m;if(i==0){return f}if((i/=l)==1){return f+m}if(!k){k=l*0.3}if(h").css({position:"absolute",visibility:"visible",left:-d*(g/e),top:-f*(c/k)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:g/e,height:c/k,left:l.left+d*(g/e)+(b.options.mode=="show"?(d-Math.floor(e/2))*(g/e):0),top:l.top+f*(c/k)+(b.options.mode=="show"?(f-Math.floor(k/2))*(c/k):0),opacity:b.options.mode=="show"?0:1}).animate({left:l.left+d*(g/e)+(b.options.mode=="show"?0:(d-Math.floor(e/2))*(g/e)),top:l.top+f*(c/k)+(b.options.mode=="show"?0:(f-Math.floor(k/2))*(c/k)),opacity:b.options.mode=="show"?1:0},b.duration||500)}}setTimeout(function(){b.options.mode=="show"?h.css({visibility:"visible"}):h.css({visibility:"visible"}).hide();if(b.callback){b.callback.apply(h[0])}h.dequeue();a("div.ui-effects-explode").remove()},b.duration||500)})}})(jQuery);;/* + * jQuery UI Effects Fold 1.7.2 + * + * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Effects/Fold + * + * Depends: + * effects.core.js + */ +(function(a){a.effects.fold=function(b){return this.queue(function(){var e=a(this),k=["position","top","left"];var h=a.effects.setMode(e,b.options.mode||"hide");var o=b.options.size||15;var n=!(!b.options.horizFirst);var g=b.duration?b.duration/2:a.fx.speeds._default/2;a.effects.save(e,k);e.show();var d=a.effects.createWrapper(e).css({overflow:"hidden"});var i=((h=="show")!=n);var f=i?["width","height"]:["height","width"];var c=i?[d.width(),d.height()]:[d.height(),d.width()];var j=/([0-9]+)%/.exec(o);if(j){o=parseInt(j[1],10)/100*c[h=="hide"?0:1]}if(h=="show"){d.css(n?{height:0,width:o}:{height:o,width:0})}var m={},l={};m[f[0]]=h=="show"?c[0]:o;l[f[1]]=h=="show"?c[1]:0;d.animate(m,g,b.options.easing).animate(l,g,b.options.easing,function(){if(h=="hide"){e.hide()}a.effects.restore(e,k);a.effects.removeWrapper(e);if(b.callback){b.callback.apply(e[0],arguments)}e.dequeue()})})}})(jQuery);;/* + * jQuery UI Effects Highlight 1.7.2 + * + * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Effects/Highlight + * + * Depends: + * effects.core.js + */ +(function(a){a.effects.highlight=function(b){return this.queue(function(){var e=a(this),d=["backgroundImage","backgroundColor","opacity"];var h=a.effects.setMode(e,b.options.mode||"show");var c=b.options.color||"#ffff99";var g=e.css("backgroundColor");a.effects.save(e,d);e.show();e.css({backgroundImage:"none",backgroundColor:c});var f={backgroundColor:g};if(h=="hide"){f.opacity=0}e.animate(f,{queue:false,duration:b.duration,easing:b.options.easing,complete:function(){if(h=="hide"){e.hide()}a.effects.restore(e,d);if(h=="show"&&a.browser.msie){this.style.removeAttribute("filter")}if(b.callback){b.callback.apply(this,arguments)}e.dequeue()}})})}})(jQuery);;/* + * jQuery UI Effects Pulsate 1.7.2 + * + * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Effects/Pulsate + * + * Depends: + * effects.core.js + */ +(function(a){a.effects.pulsate=function(b){return this.queue(function(){var d=a(this);var g=a.effects.setMode(d,b.options.mode||"show");var f=b.options.times||5;var e=b.duration?b.duration/2:a.fx.speeds._default/2;if(g=="hide"){f--}if(d.is(":hidden")){d.css("opacity",0);d.show();d.animate({opacity:1},e,b.options.easing);f=f-2}for(var c=0;c').appendTo(document.body).addClass(b.options.className).css({top:d.top,left:d.left,height:f.innerHeight(),width:f.innerWidth(),position:"absolute"}).animate(g,b.duration,b.options.easing,function(){c.remove();(b.callback&&b.callback.apply(f[0],arguments));f.dequeue()})})}})(jQuery);; \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/js/jquery-ui-1.7.2.custom.min.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/IRI-Theme/js/jquery-ui-1.7.2.custom.min.js Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,201 @@ +/* + * jQuery UI 1.7.2 + * + * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI + */ +jQuery.ui||(function(c){var i=c.fn.remove,d=c.browser.mozilla&&(parseFloat(c.browser.version)<1.9);c.ui={version:"1.7.2",plugin:{add:function(k,l,n){var m=c.ui[k].prototype;for(var j in n){m.plugins[j]=m.plugins[j]||[];m.plugins[j].push([l,n[j]])}},call:function(j,l,k){var n=j.plugins[l];if(!n||!j.element[0].parentNode){return}for(var m=0;m0){return true}m[j]=1;l=(m[j]>0);m[j]=0;return l},isOverAxis:function(k,j,l){return(k>j)&&(k<(j+l))},isOver:function(o,k,n,m,j,l){return c.ui.isOverAxis(o,n,j)&&c.ui.isOverAxis(k,m,l)},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};if(d){var f=c.attr,e=c.fn.removeAttr,h="http://www.w3.org/2005/07/aaa",a=/^aria-/,b=/^wairole:/;c.attr=function(k,j,l){var m=l!==undefined;return(j=="role"?(m?f.call(this,k,j,"wairole:"+l):(f.apply(this,arguments)||"").replace(b,"")):(a.test(j)?(m?k.setAttributeNS(h,j.replace(a,"aaa:"),l):f.call(this,k,j.replace(a,"aaa:"))):f.apply(this,arguments)))};c.fn.removeAttr=function(j){return(a.test(j)?this.each(function(){this.removeAttributeNS(h,j.replace(a,""))}):e.call(this,j))}}c.fn.extend({remove:function(){c("*",this).add(this).each(function(){c(this).triggerHandler("remove")});return i.apply(this,arguments)},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","").unbind("selectstart.ui")},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return false})},scrollParent:function(){var j;if((c.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){j=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(c.curCSS(this,"position",1))&&(/(auto|scroll)/).test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0)}else{j=this.parents().filter(function(){return(/(auto|scroll)/).test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!j.length?c(document):j}});c.extend(c.expr[":"],{data:function(l,k,j){return !!c.data(l,j[3])},focusable:function(k){var l=k.nodeName.toLowerCase(),j=c.attr(k,"tabindex");return(/input|select|textarea|button|object/.test(l)?!k.disabled:"a"==l||"area"==l?k.href||!isNaN(j):!isNaN(j))&&!c(k)["area"==l?"parents":"closest"](":hidden").length},tabbable:function(k){var j=c.attr(k,"tabindex");return(isNaN(j)||j>=0)&&c(k).is(":focusable")}});function g(m,n,o,l){function k(q){var p=c[m][n][q]||[];return(typeof p=="string"?p.split(/,?\s+/):p)}var j=k("getter");if(l.length==1&&typeof l[0]=="string"){j=j.concat(k("getterSetter"))}return(c.inArray(o,j)!=-1)}c.widget=function(k,j){var l=k.split(".")[0];k=k.split(".")[1];c.fn[k]=function(p){var n=(typeof p=="string"),o=Array.prototype.slice.call(arguments,1);if(n&&p.substring(0,1)=="_"){return this}if(n&&g(l,k,p,o)){var m=c.data(this[0],k);return(m?m[p].apply(m,o):undefined)}return this.each(function(){var q=c.data(this,k);(!q&&!n&&c.data(this,k,new c[l][k](this,p))._init());(q&&n&&c.isFunction(q[p])&&q[p].apply(q,o))})};c[l]=c[l]||{};c[l][k]=function(o,n){var m=this;this.namespace=l;this.widgetName=k;this.widgetEventPrefix=c[l][k].eventPrefix||k;this.widgetBaseClass=l+"-"+k;this.options=c.extend({},c.widget.defaults,c[l][k].defaults,c.metadata&&c.metadata.get(o)[k],n);this.element=c(o).bind("setData."+k,function(q,p,r){if(q.target==o){return m._setData(p,r)}}).bind("getData."+k,function(q,p){if(q.target==o){return m._getData(p)}}).bind("remove",function(){return m.destroy()})};c[l][k].prototype=c.extend({},c.widget.prototype,j);c[l][k].getterSetter="option"};c.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").removeAttr("aria-disabled")},option:function(l,m){var k=l,j=this;if(typeof l=="string"){if(m===undefined){return this._getData(l)}k={};k[l]=m}c.each(k,function(n,o){j._setData(n,o)})},_getData:function(j){return this.options[j]},_setData:function(j,k){this.options[j]=k;if(j=="disabled"){this.element[k?"addClass":"removeClass"](this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").attr("aria-disabled",k)}},enable:function(){this._setData("disabled",false)},disable:function(){this._setData("disabled",true)},_trigger:function(l,m,n){var p=this.options[l],j=(l==this.widgetEventPrefix?l:this.widgetEventPrefix+l);m=c.Event(m);m.type=j;if(m.originalEvent){for(var k=c.event.props.length,o;k;){o=c.event.props[--k];m[o]=m.originalEvent[o]}}this.element.trigger(m,n);return !(c.isFunction(p)&&p.call(this.element[0],m,n)===false||m.isDefaultPrevented())}};c.widget.defaults={disabled:false};c.ui.mouse={_mouseInit:function(){var j=this;this.element.bind("mousedown."+this.widgetName,function(k){return j._mouseDown(k)}).bind("click."+this.widgetName,function(k){if(j._preventClickEvent){j._preventClickEvent=false;k.stopImmediatePropagation();return false}});if(c.browser.msie){this._mouseUnselectable=this.element.attr("unselectable");this.element.attr("unselectable","on")}this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);(c.browser.msie&&this.element.attr("unselectable",this._mouseUnselectable))},_mouseDown:function(l){l.originalEvent=l.originalEvent||{};if(l.originalEvent.mouseHandled){return}(this._mouseStarted&&this._mouseUp(l));this._mouseDownEvent=l;var k=this,m=(l.which==1),j=(typeof this.options.cancel=="string"?c(l.target).parents().add(l.target).filter(this.options.cancel).length:false);if(!m||j||!this._mouseCapture(l)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){k.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(l)&&this._mouseDelayMet(l)){this._mouseStarted=(this._mouseStart(l)!==false);if(!this._mouseStarted){l.preventDefault();return true}}this._mouseMoveDelegate=function(n){return k._mouseMove(n)};this._mouseUpDelegate=function(n){return k._mouseUp(n)};c(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);(c.browser.safari||l.preventDefault());l.originalEvent.mouseHandled=true;return true},_mouseMove:function(j){if(c.browser.msie&&!j.button){return this._mouseUp(j)}if(this._mouseStarted){this._mouseDrag(j);return j.preventDefault()}if(this._mouseDistanceMet(j)&&this._mouseDelayMet(j)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,j)!==false);(this._mouseStarted?this._mouseDrag(j):this._mouseUp(j))}return !this._mouseStarted},_mouseUp:function(j){c(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=(j.target==this._mouseDownEvent.target);this._mouseStop(j)}return false},_mouseDistanceMet:function(j){return(Math.max(Math.abs(this._mouseDownEvent.pageX-j.pageX),Math.abs(this._mouseDownEvent.pageY-j.pageY))>=this.options.distance)},_mouseDelayMet:function(j){return this.mouseDelayMet},_mouseStart:function(j){},_mouseDrag:function(j){},_mouseStop:function(j){},_mouseCapture:function(j){return true}};c.ui.mouse.defaults={cancel:null,distance:1,delay:0}})(jQuery);;/* + * jQuery UI Accordion 1.7.2 + * + * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Accordion + * + * Depends: + * ui.core.js + */ +(function(a){a.widget("ui.accordion",{_init:function(){var d=this.options,b=this;this.running=0;if(d.collapsible==a.ui.accordion.defaults.collapsible&&d.alwaysOpen!=a.ui.accordion.defaults.alwaysOpen){d.collapsible=!d.alwaysOpen}if(d.navigation){var c=this.element.find("a").filter(d.navigationFilter);if(c.length){if(c.filter(d.header).length){this.active=c}else{this.active=c.parent().parent().prev();c.addClass("ui-accordion-content-active")}}}this.element.addClass("ui-accordion ui-widget ui-helper-reset");if(this.element[0].nodeName=="UL"){this.element.children("li").addClass("ui-accordion-li-fix")}this.headers=this.element.find(d.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){a(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){a(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){a(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){a(this).removeClass("ui-state-focus")});this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");this.active=this._findActive(this.active||d.active).toggleClass("ui-state-default").toggleClass("ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");this.active.next().addClass("ui-accordion-content-active");a("").addClass("ui-icon "+d.icons.header).prependTo(this.headers);this.active.find(".ui-icon").toggleClass(d.icons.header).toggleClass(d.icons.headerSelected);if(a.browser.msie){this.element.find("a").css("zoom","1")}this.resize();this.element.attr("role","tablist");this.headers.attr("role","tab").bind("keydown",function(e){return b._keydown(e)}).next().attr("role","tabpanel");this.headers.not(this.active||"").attr("aria-expanded","false").attr("tabIndex","-1").next().hide();if(!this.active.length){this.headers.eq(0).attr("tabIndex","0")}else{this.active.attr("aria-expanded","true").attr("tabIndex","0")}if(!a.browser.safari){this.headers.find("a").attr("tabIndex","-1")}if(d.event){this.headers.bind((d.event)+".accordion",function(e){return b._clickHandler.call(b,e,this)})}},destroy:function(){var c=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role").unbind(".accordion").removeData("accordion");this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("tabindex");this.headers.find("a").removeAttr("tabindex");this.headers.children(".ui-icon").remove();var b=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active");if(c.autoHeight||c.fillHeight){b.css("height","")}},_setData:function(b,c){if(b=="alwaysOpen"){b="collapsible";c=!c}a.widget.prototype._setData.apply(this,arguments)},_keydown:function(e){var g=this.options,f=a.ui.keyCode;if(g.disabled||e.altKey||e.ctrlKey){return}var d=this.headers.length;var b=this.headers.index(e.target);var c=false;switch(e.keyCode){case f.RIGHT:case f.DOWN:c=this.headers[(b+1)%d];break;case f.LEFT:case f.UP:c=this.headers[(b-1+d)%d];break;case f.SPACE:case f.ENTER:return this._clickHandler({target:e.target},e.target)}if(c){a(e.target).attr("tabIndex","-1");a(c).attr("tabIndex","0");c.focus();return false}return true},resize:function(){var e=this.options,d;if(e.fillSpace){if(a.browser.msie){var b=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}d=this.element.parent().height();if(a.browser.msie){this.element.parent().css("overflow",b)}this.headers.each(function(){d-=a(this).outerHeight()});var c=0;this.headers.next().each(function(){c=Math.max(c,a(this).innerHeight()-a(this).height())}).height(Math.max(0,d-c)).css("overflow","auto")}else{if(e.autoHeight){d=0;this.headers.next().each(function(){d=Math.max(d,a(this).outerHeight())}).height(d)}}},activate:function(b){var c=this._findActive(b)[0];this._clickHandler({target:c},c)},_findActive:function(b){return b?typeof b=="number"?this.headers.filter(":eq("+b+")"):this.headers.not(this.headers.not(b)):b===false?a([]):this.headers.filter(":eq(0)")},_clickHandler:function(b,f){var d=this.options;if(d.disabled){return false}if(!b.target&&d.collapsible){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").find(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header);this.active.next().addClass("ui-accordion-content-active");var h=this.active.next(),e={options:d,newHeader:a([]),oldHeader:d.active,newContent:a([]),oldContent:h},c=(this.active=a([]));this._toggle(c,h,e);return false}var g=a(b.currentTarget||f);var i=g[0]==this.active[0];if(this.running||(!d.collapsible&&i)){return false}this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").find(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header);this.active.next().addClass("ui-accordion-content-active");if(!i){g.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").find(".ui-icon").removeClass(d.icons.header).addClass(d.icons.headerSelected);g.next().addClass("ui-accordion-content-active")}var c=g.next(),h=this.active.next(),e={options:d,newHeader:i&&d.collapsible?a([]):g,oldHeader:this.active,newContent:i&&d.collapsible?a([]):c.find("> *"),oldContent:h.find("> *")},j=this.headers.index(this.active[0])>this.headers.index(g[0]);this.active=i?a([]):g;this._toggle(c,h,e,i,j);return false},_toggle:function(b,i,g,j,k){var d=this.options,m=this;this.toShow=b;this.toHide=i;this.data=g;var c=function(){if(!m){return}return m._completed.apply(m,arguments)};this._trigger("changestart",null,this.data);this.running=i.size()===0?b.size():i.size();if(d.animated){var f={};if(d.collapsible&&j){f={toShow:a([]),toHide:i,complete:c,down:k,autoHeight:d.autoHeight||d.fillSpace}}else{f={toShow:b,toHide:i,complete:c,down:k,autoHeight:d.autoHeight||d.fillSpace}}if(!d.proxied){d.proxied=d.animated}if(!d.proxiedDuration){d.proxiedDuration=d.duration}d.animated=a.isFunction(d.proxied)?d.proxied(f):d.proxied;d.duration=a.isFunction(d.proxiedDuration)?d.proxiedDuration(f):d.proxiedDuration;var l=a.ui.accordion.animations,e=d.duration,h=d.animated;if(!l[h]){l[h]=function(n){this.slide(n,{easing:h,duration:e||700})}}l[h](f)}else{if(d.collapsible&&j){b.toggle()}else{i.hide();b.show()}c(true)}i.prev().attr("aria-expanded","false").attr("tabIndex","-1").blur();b.prev().attr("aria-expanded","true").attr("tabIndex","0").focus()},_completed:function(b){var c=this.options;this.running=b?0:--this.running;if(this.running){return}if(c.clearStyle){this.toShow.add(this.toHide).css({height:"",overflow:""})}this._trigger("change",null,this.data)}});a.extend(a.ui.accordion,{version:"1.7.2",defaults:{active:null,alwaysOpen:true,animated:"slide",autoHeight:true,clearStyle:false,collapsible:false,event:"click",fillSpace:false,header:"> li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:false,navigationFilter:function(){return this.href.toLowerCase()==location.href.toLowerCase()}},animations:{slide:function(j,h){j=a.extend({easing:"swing",duration:300},j,h);if(!j.toHide.size()){j.toShow.animate({height:"show"},j);return}if(!j.toShow.size()){j.toHide.animate({height:"hide"},j);return}var c=j.toShow.css("overflow"),g,d={},f={},e=["height","paddingTop","paddingBottom"],b;var i=j.toShow;b=i[0].style.width;i.width(parseInt(i.parent().width(),10)-parseInt(i.css("paddingLeft"),10)-parseInt(i.css("paddingRight"),10)-(parseInt(i.css("borderLeftWidth"),10)||0)-(parseInt(i.css("borderRightWidth"),10)||0));a.each(e,function(k,m){f[m]="hide";var l=(""+a.css(j.toShow[0],m)).match(/^([\d+-.]+)(.*)$/);d[m]={value:l[1],unit:l[2]||"px"}});j.toShow.css({height:0,overflow:"hidden"}).show();j.toHide.filter(":hidden").each(j.complete).end().filter(":visible").animate(f,{step:function(k,l){if(l.prop=="height"){g=(l.now-l.start)/(l.end-l.start)}j.toShow[0].style[l.prop]=(g*d[l.prop].value)+d[l.prop].unit},duration:j.duration,easing:j.easing,complete:function(){if(!j.autoHeight){j.toShow.css("height","")}j.toShow.css("width",b);j.toShow.css({overflow:c});j.complete()}})},bounceslide:function(b){this.slide(b,{easing:b.down?"easeOutBounce":"swing",duration:b.down?1000:200})},easeslide:function(b){this.slide(b,{easing:"easeinout",duration:700})}}})})(jQuery);;/* + * jQuery UI Dialog 1.7.2 + * + * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Dialog + * + * Depends: + * ui.core.js + * ui.draggable.js + * ui.resizable.js + */ +(function(c){var b={dragStart:"start.draggable",drag:"drag.draggable",dragStop:"stop.draggable",maxHeight:"maxHeight.resizable",minHeight:"minHeight.resizable",maxWidth:"maxWidth.resizable",minWidth:"minWidth.resizable",resizeStart:"start.resizable",resize:"drag.resizable",resizeStop:"stop.resizable"},a="ui-dialog ui-widget ui-widget-content ui-corner-all ";c.widget("ui.dialog",{_init:function(){this.originalTitle=this.element.attr("title");var l=this,m=this.options,j=m.title||this.originalTitle||" ",e=c.ui.dialog.getTitleId(this.element),k=(this.uiDialog=c("
    ")).appendTo(document.body).hide().addClass(a+m.dialogClass).css({position:"absolute",overflow:"hidden",zIndex:m.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(n){(m.closeOnEscape&&n.keyCode&&n.keyCode==c.ui.keyCode.ESCAPE&&l.close(n))}).attr({role:"dialog","aria-labelledby":e}).mousedown(function(n){l.moveToTop(false,n)}),g=this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(k),f=(this.uiDialogTitlebar=c("
    ")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(k),i=c('').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){i.addClass("ui-state-hover")},function(){i.removeClass("ui-state-hover")}).focus(function(){i.addClass("ui-state-focus")}).blur(function(){i.removeClass("ui-state-focus")}).mousedown(function(n){n.stopPropagation()}).click(function(n){l.close(n);return false}).appendTo(f),h=(this.uiDialogTitlebarCloseText=c("")).addClass("ui-icon ui-icon-closethick").text(m.closeText).appendTo(i),d=c("").addClass("ui-dialog-title").attr("id",e).html(j).prependTo(f);f.find("*").add(f).disableSelection();(m.draggable&&c.fn.draggable&&this._makeDraggable());(m.resizable&&c.fn.resizable&&this._makeResizable());this._createButtons(m.buttons);this._isOpen=false;(m.bgiframe&&c.fn.bgiframe&&k.bgiframe());(m.autoOpen&&this.open())},destroy:function(){(this.overlay&&this.overlay.destroy());this.uiDialog.hide();this.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");this.uiDialog.remove();(this.originalTitle&&this.element.attr("title",this.originalTitle))},close:function(f){var d=this;if(false===d._trigger("beforeclose",f)){return}(d.overlay&&d.overlay.destroy());d.uiDialog.unbind("keypress.ui-dialog");(d.options.hide?d.uiDialog.hide(d.options.hide,function(){d._trigger("close",f)}):d.uiDialog.hide()&&d._trigger("close",f));c.ui.dialog.overlay.resize();d._isOpen=false;if(d.options.modal){var e=0;c(".ui-dialog").each(function(){if(this!=d.uiDialog[0]){e=Math.max(e,c(this).css("z-index"))}});c.ui.dialog.maxZ=e}},isOpen:function(){return this._isOpen},moveToTop:function(f,e){if((this.options.modal&&!f)||(!this.options.stack&&!this.options.modal)){return this._trigger("focus",e)}if(this.options.zIndex>c.ui.dialog.maxZ){c.ui.dialog.maxZ=this.options.zIndex}(this.overlay&&this.overlay.$el.css("z-index",c.ui.dialog.overlay.maxZ=++c.ui.dialog.maxZ));var d={scrollTop:this.element.attr("scrollTop"),scrollLeft:this.element.attr("scrollLeft")};this.uiDialog.css("z-index",++c.ui.dialog.maxZ);this.element.attr(d);this._trigger("focus",e)},open:function(){if(this._isOpen){return}var e=this.options,d=this.uiDialog;this.overlay=e.modal?new c.ui.dialog.overlay(this):null;(d.next().length&&d.appendTo("body"));this._size();this._position(e.position);d.show(e.show);this.moveToTop(true);(e.modal&&d.bind("keypress.ui-dialog",function(h){if(h.keyCode!=c.ui.keyCode.TAB){return}var g=c(":tabbable",this),i=g.filter(":first")[0],f=g.filter(":last")[0];if(h.target==f&&!h.shiftKey){setTimeout(function(){i.focus()},1)}else{if(h.target==i&&h.shiftKey){setTimeout(function(){f.focus()},1)}}}));c([]).add(d.find(".ui-dialog-content :tabbable:first")).add(d.find(".ui-dialog-buttonpane :tabbable:first")).add(d).filter(":first").focus();this._trigger("open");this._isOpen=true},_createButtons:function(g){var f=this,d=false,e=c("
    ").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix");this.uiDialog.find(".ui-dialog-buttonpane").remove();(typeof g=="object"&&g!==null&&c.each(g,function(){return !(d=true)}));if(d){c.each(g,function(h,i){c('').addClass("ui-state-default ui-corner-all").text(h).click(function(){i.apply(f.element[0],arguments)}).hover(function(){c(this).addClass("ui-state-hover")},function(){c(this).removeClass("ui-state-hover")}).focus(function(){c(this).addClass("ui-state-focus")}).blur(function(){c(this).removeClass("ui-state-focus")}).appendTo(e)});e.appendTo(this.uiDialog)}},_makeDraggable:function(){var d=this,f=this.options,e;this.uiDialog.draggable({cancel:".ui-dialog-content",handle:".ui-dialog-titlebar",containment:"document",start:function(){e=f.height;c(this).height(c(this).height()).addClass("ui-dialog-dragging");(f.dragStart&&f.dragStart.apply(d.element[0],arguments))},drag:function(){(f.drag&&f.drag.apply(d.element[0],arguments))},stop:function(){c(this).removeClass("ui-dialog-dragging").height(e);(f.dragStop&&f.dragStop.apply(d.element[0],arguments));c.ui.dialog.overlay.resize()}})},_makeResizable:function(g){g=(g===undefined?this.options.resizable:g);var d=this,f=this.options,e=typeof g=="string"?g:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",alsoResize:this.element,maxWidth:f.maxWidth,maxHeight:f.maxHeight,minWidth:f.minWidth,minHeight:f.minHeight,start:function(){c(this).addClass("ui-dialog-resizing");(f.resizeStart&&f.resizeStart.apply(d.element[0],arguments))},resize:function(){(f.resize&&f.resize.apply(d.element[0],arguments))},handles:e,stop:function(){c(this).removeClass("ui-dialog-resizing");f.height=c(this).height();f.width=c(this).width();(f.resizeStop&&f.resizeStop.apply(d.element[0],arguments));c.ui.dialog.overlay.resize()}}).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_position:function(i){var e=c(window),f=c(document),g=f.scrollTop(),d=f.scrollLeft(),h=g;if(c.inArray(i,["center","top","right","bottom","left"])>=0){i=[i=="right"||i=="left"?i:"center",i=="top"||i=="bottom"?i:"middle"]}if(i.constructor!=Array){i=["center","middle"]}if(i[0].constructor==Number){d+=i[0]}else{switch(i[0]){case"left":d+=0;break;case"right":d+=e.width()-this.uiDialog.outerWidth();break;default:case"center":d+=(e.width()-this.uiDialog.outerWidth())/2}}if(i[1].constructor==Number){g+=i[1]}else{switch(i[1]){case"top":g+=0;break;case"bottom":g+=e.height()-this.uiDialog.outerHeight();break;default:case"middle":g+=(e.height()-this.uiDialog.outerHeight())/2}}g=Math.max(g,h);this.uiDialog.css({top:g,left:d})},_setData:function(e,f){(b[e]&&this.uiDialog.data(b[e],f));switch(e){case"buttons":this._createButtons(f);break;case"closeText":this.uiDialogTitlebarCloseText.text(f);break;case"dialogClass":this.uiDialog.removeClass(this.options.dialogClass).addClass(a+f);break;case"draggable":(f?this._makeDraggable():this.uiDialog.draggable("destroy"));break;case"height":this.uiDialog.height(f);break;case"position":this._position(f);break;case"resizable":var d=this.uiDialog,g=this.uiDialog.is(":data(resizable)");(g&&!f&&d.resizable("destroy"));(g&&typeof f=="string"&&d.resizable("option","handles",f));(g||this._makeResizable(f));break;case"title":c(".ui-dialog-title",this.uiDialogTitlebar).html(f||" ");break;case"width":this.uiDialog.width(f);break}c.widget.prototype._setData.apply(this,arguments)},_size:function(){var e=this.options;this.element.css({height:0,minHeight:0,width:"auto"});var d=this.uiDialog.css({height:"auto",width:e.width}).height();this.element.css({minHeight:Math.max(e.minHeight-d,0),height:e.height=="auto"?"auto":Math.max(e.height-d,0)})}});c.extend(c.ui.dialog,{version:"1.7.2",defaults:{autoOpen:true,bgiframe:false,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false,position:"center",resizable:true,show:null,stack:true,title:"",width:300,zIndex:1000},getter:"isOpen",uuid:0,maxZ:0,getTitleId:function(d){return"ui-dialog-title-"+(d.attr("id")||++this.uuid)},overlay:function(d){this.$el=c.ui.dialog.overlay.create(d)}});c.extend(c.ui.dialog.overlay,{instances:[],maxZ:0,events:c.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(d){return d+".dialog-overlay"}).join(" "),create:function(e){if(this.instances.length===0){setTimeout(function(){if(c.ui.dialog.overlay.instances.length){c(document).bind(c.ui.dialog.overlay.events,function(f){var g=c(f.target).parents(".ui-dialog").css("zIndex")||0;return(g>c.ui.dialog.overlay.maxZ)})}},1);c(document).bind("keydown.dialog-overlay",function(f){(e.options.closeOnEscape&&f.keyCode&&f.keyCode==c.ui.keyCode.ESCAPE&&e.close(f))});c(window).bind("resize.dialog-overlay",c.ui.dialog.overlay.resize)}var d=c("
    ").appendTo(document.body).addClass("ui-widget-overlay").css({width:this.width(),height:this.height()});(e.options.bgiframe&&c.fn.bgiframe&&d.bgiframe());this.instances.push(d);return d},destroy:function(d){this.instances.splice(c.inArray(this.instances,d),1);if(this.instances.length===0){c([document,window]).unbind(".dialog-overlay")}d.remove();var e=0;c.each(this.instances,function(){e=Math.max(e,this.css("z-index"))});this.maxZ=e},height:function(){if(c.browser.msie&&c.browser.version<7){var e=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);var d=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);if(e
    ");if(!c.values){c.values=[this._valueMin(),this._valueMin()]}if(c.values.length&&c.values.length!=2){c.values=[c.values[0],c.values[0]]}}else{this.range=a("
    ")}this.range.appendTo(this.element).addClass("ui-slider-range");if(c.range=="min"||c.range=="max"){this.range.addClass("ui-slider-range-"+c.range)}this.range.addClass("ui-widget-header")}if(a(".ui-slider-handle",this.element).length==0){a('
    ').appendTo(this.element).addClass("ui-slider-handle")}if(c.values&&c.values.length){while(a(".ui-slider-handle",this.element).length').appendTo(this.element).addClass("ui-slider-handle")}}this.handles=a(".ui-slider-handle",this.element).addClass("ui-state-default ui-corner-all");this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(d){d.preventDefault()}).hover(function(){if(!c.disabled){a(this).addClass("ui-state-hover")}},function(){a(this).removeClass("ui-state-hover")}).focus(function(){if(!c.disabled){a(".ui-slider .ui-state-focus").removeClass("ui-state-focus");a(this).addClass("ui-state-focus")}else{a(this).blur()}}).blur(function(){a(this).removeClass("ui-state-focus")});this.handles.each(function(d){a(this).data("index.ui-slider-handle",d)});this.handles.keydown(function(i){var f=true;var e=a(this).data("index.ui-slider-handle");if(b.options.disabled){return}switch(i.keyCode){case a.ui.keyCode.HOME:case a.ui.keyCode.END:case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:f=false;if(!b._keySliding){b._keySliding=true;a(this).addClass("ui-state-active");b._start(i,e)}break}var g,d,h=b._step();if(b.options.values&&b.options.values.length){g=d=b.values(e)}else{g=d=b.value()}switch(i.keyCode){case a.ui.keyCode.HOME:d=b._valueMin();break;case a.ui.keyCode.END:d=b._valueMax();break;case a.ui.keyCode.UP:case a.ui.keyCode.RIGHT:if(g==b._valueMax()){return}d=g+h;break;case a.ui.keyCode.DOWN:case a.ui.keyCode.LEFT:if(g==b._valueMin()){return}d=g-h;break}b._slide(i,e,d);return f}).keyup(function(e){var d=a(this).data("index.ui-slider-handle");if(b._keySliding){b._stop(e,d);b._change(e,d);b._keySliding=false;a(this).removeClass("ui-state-active")}});this._refreshValue()},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");this._mouseDestroy()},_mouseCapture:function(d){var e=this.options;if(e.disabled){return false}this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();var h={x:d.pageX,y:d.pageY};var j=this._normValueFromMouse(h);var c=this._valueMax()-this._valueMin()+1,f;var k=this,i;this.handles.each(function(l){var m=Math.abs(j-k.values(l));if(c>m){c=m;f=a(this);i=l}});if(e.range==true&&this.values(1)==e.min){f=a(this.handles[++i])}this._start(d,i);k._handleIndex=i;f.addClass("ui-state-active").focus();var g=f.offset();var b=!a(d.target).parents().andSelf().is(".ui-slider-handle");this._clickOffset=b?{left:0,top:0}:{left:d.pageX-g.left-(f.width()/2),top:d.pageY-g.top-(f.height()/2)-(parseInt(f.css("borderTopWidth"),10)||0)-(parseInt(f.css("borderBottomWidth"),10)||0)+(parseInt(f.css("marginTop"),10)||0)};j=this._normValueFromMouse(h);this._slide(d,i,j);return true},_mouseStart:function(b){return true},_mouseDrag:function(d){var b={x:d.pageX,y:d.pageY};var c=this._normValueFromMouse(b);this._slide(d,this._handleIndex,c);return false},_mouseStop:function(b){this.handles.removeClass("ui-state-active");this._stop(b,this._handleIndex);this._change(b,this._handleIndex);this._handleIndex=null;this._clickOffset=null;return false},_detectOrientation:function(){this.orientation=this.options.orientation=="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(d){var c,h;if("horizontal"==this.orientation){c=this.elementSize.width;h=d.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{c=this.elementSize.height;h=d.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}var f=(h/c);if(f>1){f=1}if(f<0){f=0}if("vertical"==this.orientation){f=1-f}var e=this._valueMax()-this._valueMin(),i=f*e,b=i%this.options.step,g=this._valueMin()+i-b;if(b>(this.options.step/2)){g+=this.options.step}return parseFloat(g.toFixed(5))},_start:function(d,c){var b={handle:this.handles[c],value:this.value()};if(this.options.values&&this.options.values.length){b.value=this.values(c);b.values=this.values()}this._trigger("start",d,b)},_slide:function(f,e,d){var g=this.handles[e];if(this.options.values&&this.options.values.length){var b=this.values(e?0:1);if((this.options.values.length==2&&this.options.range===true)&&((e==0&&d>b)||(e==1&&d1){this.options.values[b]=e;this._refreshValue(c);if(!d){this._change(null,b)}}if(arguments.length){if(this.options.values&&this.options.values.length){return this._values(b)}else{return this.value()}}else{return this._values()}},_setData:function(b,d,c){a.widget.prototype._setData.apply(this,arguments);switch(b){case"disabled":if(d){this.handles.filter(".ui-state-focus").blur();this.handles.removeClass("ui-state-hover");this.handles.attr("disabled","disabled")}else{this.handles.removeAttr("disabled")}case"orientation":this._detectOrientation();this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue(c);break;case"value":this._refreshValue(c);break}},_step:function(){var b=this.options.step;return b},_value:function(){var b=this.options.value;if(bthis._valueMax()){b=this._valueMax()}return b},_values:function(b){if(arguments.length){var c=this.options.values[b];if(cthis._valueMax()){c=this._valueMax()}return c}else{return this.options.values}},_valueMin:function(){var b=this.options.min;return b},_valueMax:function(){var b=this.options.max;return b},_refreshValue:function(c){var f=this.options.range,d=this.options,l=this;if(this.options.values&&this.options.values.length){var i,h;this.handles.each(function(p,n){var o=(l.values(p)-l._valueMin())/(l._valueMax()-l._valueMin())*100;var m={};m[l.orientation=="horizontal"?"left":"bottom"]=o+"%";a(this).stop(1,1)[c?"animate":"css"](m,d.animate);if(l.options.range===true){if(l.orientation=="horizontal"){(p==0)&&l.range.stop(1,1)[c?"animate":"css"]({left:o+"%"},d.animate);(p==1)&&l.range[c?"animate":"css"]({width:(o-lastValPercent)+"%"},{queue:false,duration:d.animate})}else{(p==0)&&l.range.stop(1,1)[c?"animate":"css"]({bottom:(o)+"%"},d.animate);(p==1)&&l.range[c?"animate":"css"]({height:(o-lastValPercent)+"%"},{queue:false,duration:d.animate})}}lastValPercent=o})}else{var j=this.value(),g=this._valueMin(),k=this._valueMax(),e=k!=g?(j-g)/(k-g)*100:0;var b={};b[l.orientation=="horizontal"?"left":"bottom"]=e+"%";this.handle.stop(1,1)[c?"animate":"css"](b,d.animate);(f=="min")&&(this.orientation=="horizontal")&&this.range.stop(1,1)[c?"animate":"css"]({width:e+"%"},d.animate);(f=="max")&&(this.orientation=="horizontal")&&this.range[c?"animate":"css"]({width:(100-e)+"%"},{queue:false,duration:d.animate});(f=="min")&&(this.orientation=="vertical")&&this.range.stop(1,1)[c?"animate":"css"]({height:e+"%"},d.animate);(f=="max")&&(this.orientation=="vertical")&&this.range[c?"animate":"css"]({height:(100-e)+"%"},{queue:false,duration:d.animate})}}}));a.extend(a.ui.slider,{getter:"value values",version:"1.7.2",eventPrefix:"slide",defaults:{animate:false,delay:0,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null}})})(jQuery);;/* + * jQuery UI Tabs 1.7.2 + * + * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + * + * http://docs.jquery.com/UI/Tabs + * + * Depends: + * ui.core.js + */ +(function(a){a.widget("ui.tabs",{_init:function(){if(this.options.deselectable!==undefined){this.options.collapsible=this.options.deselectable}this._tabify(true)},_setData:function(b,c){if(b=="selected"){if(this.options.collapsible&&c==this.options.selected){return}this.select(c)}else{this.options[b]=c;if(b=="deselectable"){this.options.collapsible=c}this._tabify()}},_tabId:function(b){return b.title&&b.title.replace(/\s/g,"_").replace(/[^A-Za-z0-9\-_:\.]/g,"")||this.options.idPrefix+a.data(b)},_sanitizeSelector:function(b){return b.replace(/:/g,"\\:")},_cookie:function(){var b=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+a.data(this.list[0]));return a.cookie.apply(null,[b].concat(a.makeArray(arguments)))},_ui:function(c,b){return{tab:c,panel:b,index:this.anchors.index(c)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var b=a(this);b.html(b.data("label.tabs")).removeData("label.tabs")})},_tabify:function(n){this.list=this.element.children("ul:first");this.lis=a("li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return a("a",this)[0]});this.panels=a([]);var p=this,d=this.options;var c=/^#.+/;this.anchors.each(function(r,o){var q=a(o).attr("href");var s=q.split("#")[0],u;if(s&&(s===location.toString().split("#")[0]||(u=a("base")[0])&&s===u.href)){q=o.hash;o.href=q}if(c.test(q)){p.panels=p.panels.add(p._sanitizeSelector(q))}else{if(q!="#"){a.data(o,"href.tabs",q);a.data(o,"load.tabs",q.replace(/#.*$/,""));var w=p._tabId(o);o.href="#"+w;var v=a("#"+w);if(!v.length){v=a(d.panelTemplate).attr("id",w).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(p.panels[r-1]||p.list);v.data("destroy.tabs",true)}p.panels=p.panels.add(v)}else{d.disabled.push(r)}}});if(n){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all");this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(d.selected===undefined){if(location.hash){this.anchors.each(function(q,o){if(o.hash==location.hash){d.selected=q;return false}})}if(typeof d.selected!="number"&&d.cookie){d.selected=parseInt(p._cookie(),10)}if(typeof d.selected!="number"&&this.lis.filter(".ui-tabs-selected").length){d.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}d.selected=d.selected||0}else{if(d.selected===null){d.selected=-1}}d.selected=((d.selected>=0&&this.anchors[d.selected])||d.selected<0)?d.selected:0;d.disabled=a.unique(d.disabled.concat(a.map(this.lis.filter(".ui-state-disabled"),function(q,o){return p.lis.index(q)}))).sort();if(a.inArray(d.selected,d.disabled)!=-1){d.disabled.splice(a.inArray(d.selected,d.disabled),1)}this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active");if(d.selected>=0&&this.anchors.length){this.panels.eq(d.selected).removeClass("ui-tabs-hide");this.lis.eq(d.selected).addClass("ui-tabs-selected ui-state-active");p.element.queue("tabs",function(){p._trigger("show",null,p._ui(p.anchors[d.selected],p.panels[d.selected]))});this.load(d.selected)}a(window).bind("unload",function(){p.lis.add(p.anchors).unbind(".tabs");p.lis=p.anchors=p.panels=null})}else{d.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"))}this.element[d.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");if(d.cookie){this._cookie(d.selected,d.cookie)}for(var g=0,m;(m=this.lis[g]);g++){a(m)[a.inArray(g,d.disabled)!=-1&&!a(m).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled")}if(d.cache===false){this.anchors.removeData("cache.tabs")}this.lis.add(this.anchors).unbind(".tabs");if(d.event!="mouseover"){var f=function(o,i){if(i.is(":not(.ui-state-disabled)")){i.addClass("ui-state-"+o)}};var j=function(o,i){i.removeClass("ui-state-"+o)};this.lis.bind("mouseover.tabs",function(){f("hover",a(this))});this.lis.bind("mouseout.tabs",function(){j("hover",a(this))});this.anchors.bind("focus.tabs",function(){f("focus",a(this).closest("li"))});this.anchors.bind("blur.tabs",function(){j("focus",a(this).closest("li"))})}var b,h;if(d.fx){if(a.isArray(d.fx)){b=d.fx[0];h=d.fx[1]}else{b=h=d.fx}}function e(i,o){i.css({display:""});if(a.browser.msie&&o.opacity){i[0].style.removeAttribute("filter")}}var k=h?function(i,o){a(i).closest("li").removeClass("ui-state-default").addClass("ui-tabs-selected ui-state-active");o.hide().removeClass("ui-tabs-hide").animate(h,h.duration||"normal",function(){e(o,h);p._trigger("show",null,p._ui(i,o[0]))})}:function(i,o){a(i).closest("li").removeClass("ui-state-default").addClass("ui-tabs-selected ui-state-active");o.removeClass("ui-tabs-hide");p._trigger("show",null,p._ui(i,o[0]))};var l=b?function(o,i){i.animate(b,b.duration||"normal",function(){p.lis.removeClass("ui-tabs-selected ui-state-active").addClass("ui-state-default");i.addClass("ui-tabs-hide");e(i,b);p.element.dequeue("tabs")})}:function(o,i,q){p.lis.removeClass("ui-tabs-selected ui-state-active").addClass("ui-state-default");i.addClass("ui-tabs-hide");p.element.dequeue("tabs")};this.anchors.bind(d.event+".tabs",function(){var o=this,r=a(this).closest("li"),i=p.panels.filter(":not(.ui-tabs-hide)"),q=a(p._sanitizeSelector(this.hash));if((r.hasClass("ui-tabs-selected")&&!d.collapsible)||r.hasClass("ui-state-disabled")||r.hasClass("ui-state-processing")||p._trigger("select",null,p._ui(this,q[0]))===false){this.blur();return false}d.selected=p.anchors.index(this);p.abort();if(d.collapsible){if(r.hasClass("ui-tabs-selected")){d.selected=-1;if(d.cookie){p._cookie(d.selected,d.cookie)}p.element.queue("tabs",function(){l(o,i)}).dequeue("tabs");this.blur();return false}else{if(!i.length){if(d.cookie){p._cookie(d.selected,d.cookie)}p.element.queue("tabs",function(){k(o,q)});p.load(p.anchors.index(this));this.blur();return false}}}if(d.cookie){p._cookie(d.selected,d.cookie)}if(q.length){if(i.length){p.element.queue("tabs",function(){l(o,i)})}p.element.queue("tabs",function(){k(o,q)});p.load(p.anchors.index(this))}else{throw"jQuery UI Tabs: Mismatching fragment identifier."}if(a.browser.msie){this.blur()}});this.anchors.bind("click.tabs",function(){return false})},destroy:function(){var b=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var c=a.data(this,"href.tabs");if(c){this.href=c}var d=a(this).unbind(".tabs");a.each(["href","load","cache"],function(e,f){d.removeData(f+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){if(a.data(this,"destroy.tabs")){a(this).remove()}else{a(this).removeClass(["ui-state-default","ui-corner-top","ui-tabs-selected","ui-state-active","ui-state-hover","ui-state-focus","ui-state-disabled","ui-tabs-panel","ui-widget-content","ui-corner-bottom","ui-tabs-hide"].join(" "))}});if(b.cookie){this._cookie(null,b.cookie)}},add:function(e,d,c){if(c===undefined){c=this.anchors.length}var b=this,g=this.options,i=a(g.tabTemplate.replace(/#\{href\}/g,e).replace(/#\{label\}/g,d)),h=!e.indexOf("#")?e.replace("#",""):this._tabId(a("a",i)[0]);i.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var f=a("#"+h);if(!f.length){f=a(g.panelTemplate).attr("id",h).data("destroy.tabs",true)}f.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(c>=this.lis.length){i.appendTo(this.list);f.appendTo(this.list[0].parentNode)}else{i.insertBefore(this.lis[c]);f.insertBefore(this.panels[c])}g.disabled=a.map(g.disabled,function(k,j){return k>=c?++k:k});this._tabify();if(this.anchors.length==1){i.addClass("ui-tabs-selected ui-state-active");f.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){b._trigger("show",null,b._ui(b.anchors[0],b.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[c],this.panels[c]))},remove:function(b){var d=this.options,e=this.lis.eq(b).remove(),c=this.panels.eq(b).remove();if(e.hasClass("ui-tabs-selected")&&this.anchors.length>1){this.select(b+(b+1=b?--g:g});this._tabify();this._trigger("remove",null,this._ui(e.find("a")[0],c[0]))},enable:function(b){var c=this.options;if(a.inArray(b,c.disabled)==-1){return}this.lis.eq(b).removeClass("ui-state-disabled");c.disabled=a.grep(c.disabled,function(e,d){return e!=b});this._trigger("enable",null,this._ui(this.anchors[b],this.panels[b]))},disable:function(c){var b=this,d=this.options;if(c!=d.selected){this.lis.eq(c).addClass("ui-state-disabled");d.disabled.push(c);d.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[c],this.panels[c]))}},select:function(b){if(typeof b=="string"){b=this.anchors.index(this.anchors.filter("[href$="+b+"]"))}else{if(b===null){b=-1}}if(b==-1&&this.options.collapsible){b=this.options.selected}this.anchors.eq(b).trigger(this.options.event+".tabs")},load:function(e){var c=this,g=this.options,b=this.anchors.eq(e)[0],d=a.data(b,"load.tabs");this.abort();if(!d||this.element.queue("tabs").length!==0&&a.data(b,"cache.tabs")){this.element.dequeue("tabs");return}this.lis.eq(e).addClass("ui-state-processing");if(g.spinner){var f=a("span",b);f.data("label.tabs",f.html()).html(g.spinner)}this.xhr=a.ajax(a.extend({},g.ajaxOptions,{url:d,success:function(i,h){a(c._sanitizeSelector(b.hash)).html(i);c._cleanup();if(g.cache){a.data(b,"cache.tabs",true)}c._trigger("load",null,c._ui(c.anchors[e],c.panels[e]));try{g.ajaxOptions.success(i,h)}catch(j){}c.element.dequeue("tabs")}}))},abort:function(){this.element.queue([]);this.panels.stop(false,true);if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup()},url:function(c,b){this.anchors.eq(c).removeData("cache.tabs").data("load.tabs",b)},length:function(){return this.anchors.length}});a.extend(a.ui.tabs,{version:"1.7.2",getter:"length",defaults:{ajaxOptions:null,cache:false,cookie:null,collapsible:false,disabled:[],event:"click",fx:null,idPrefix:"ui-tabs-",panelTemplate:"
    ",spinner:"Loading…",tabTemplate:'
  • #{label}
  • '}});a.extend(a.ui.tabs.prototype,{rotation:null,rotate:function(d,f){var b=this,g=this.options;var c=b._rotate||(b._rotate=function(h){clearTimeout(b.rotation);b.rotation=setTimeout(function(){var i=g.selected;b.select(++i');var j=f.parent();if(f.css("position")=="static"){j.css({position:"relative"});f.css({position:"relative"})}else{var i=f.css("top");if(isNaN(parseInt(i,10))){i="auto"}var h=f.css("left");if(isNaN(parseInt(h,10))){h="auto"}j.css({position:f.css("position"),top:i,left:h,zIndex:f.css("z-index")}).show();f.css({position:"relative",top:0,left:0})}j.css(g);return j},removeWrapper:function(f){if(f.parent().is(".ui-effects-wrapper")){return f.parent().replaceWith(f)}return f},setTransition:function(g,i,f,h){h=h||{};d.each(i,function(k,j){unit=g.cssUnit(j);if(unit[0]>0){h[j]=unit[0]*f+unit[1]}});return h},animateClass:function(h,i,k,j){var f=(typeof k=="function"?k:(j?j:null));var g=(typeof k=="string"?k:null);return this.each(function(){var q={};var o=d(this);var p=o.attr("style")||"";if(typeof p=="object"){p=p.cssText}if(h.toggle){o.hasClass(h.toggle)?h.remove=h.toggle:h.add=h.toggle}var l=d.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(h.add){o.addClass(h.add)}if(h.remove){o.removeClass(h.remove)}var m=d.extend({},(document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle));if(h.add){o.removeClass(h.add)}if(h.remove){o.addClass(h.remove)}for(var r in m){if(typeof m[r]!="function"&&m[r]&&r.indexOf("Moz")==-1&&r.indexOf("length")==-1&&m[r]!=l[r]&&(r.match(/color/i)||(!r.match(/color/i)&&!isNaN(parseInt(m[r],10))))&&(l.position!="static"||(l.position=="static"&&!r.match(/left|top|bottom|right/)))){q[r]=m[r]}}o.animate(q,i,g,function(){if(typeof d(this).attr("style")=="object"){d(this).attr("style")["cssText"]="";d(this).attr("style")["cssText"]=p}else{d(this).attr("style",p)}if(h.add){d(this).addClass(h.add)}if(h.remove){d(this).removeClass(h.remove)}if(f){f.apply(this,arguments)}})})}};function c(g,f){var i=g[1]&&g[1].constructor==Object?g[1]:{};if(f){i.mode=f}var h=g[1]&&g[1].constructor!=Object?g[1]:(i.duration?i.duration:g[2]);h=d.fx.off?0:typeof h==="number"?h:d.fx.speeds[h]||d.fx.speeds._default;var j=i.callback||(d.isFunction(g[1])&&g[1])||(d.isFunction(g[2])&&g[2])||(d.isFunction(g[3])&&g[3]);return[g[0],i,h,j]}d.fn.extend({_show:d.fn.show,_hide:d.fn.hide,__toggle:d.fn.toggle,_addClass:d.fn.addClass,_removeClass:d.fn.removeClass,_toggleClass:d.fn.toggleClass,effect:function(g,f,h,i){return d.effects[g]?d.effects[g].call(this,{method:g,options:f||{},duration:h,callback:i}):null},show:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))){return this._show.apply(this,arguments)}else{return this.effect.apply(this,c(arguments,"show"))}},hide:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))){return this._hide.apply(this,arguments)}else{return this.effect.apply(this,c(arguments,"hide"))}},toggle:function(){if(!arguments[0]||(arguments[0].constructor==Number||(/(slow|normal|fast)/).test(arguments[0]))||(d.isFunction(arguments[0])||typeof arguments[0]=="boolean")){return this.__toggle.apply(this,arguments)}else{return this.effect.apply(this,c(arguments,"toggle"))}},addClass:function(g,f,i,h){return f?d.effects.animateClass.apply(this,[{add:g},f,i,h]):this._addClass(g)},removeClass:function(g,f,i,h){return f?d.effects.animateClass.apply(this,[{remove:g},f,i,h]):this._removeClass(g)},toggleClass:function(g,f,i,h){return((typeof f!=="boolean")&&f)?d.effects.animateClass.apply(this,[{toggle:g},f,i,h]):this._toggleClass(g,f)},morph:function(f,h,g,j,i){return d.effects.animateClass.apply(this,[{add:h,remove:f},g,j,i])},switchClass:function(){return this.morph.apply(this,arguments)},cssUnit:function(f){var g=this.css(f),h=[];d.each(["em","px","%","pt"],function(j,k){if(g.indexOf(k)>0){h=[parseFloat(g),k]}});return h}});d.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","outlineColor"],function(g,f){d.fx.step[f]=function(h){if(h.state==0){h.start=e(h.elem,f);h.end=b(h.end)}h.elem.style[f]="rgb("+[Math.max(Math.min(parseInt((h.pos*(h.end[0]-h.start[0]))+h.start[0],10),255),0),Math.max(Math.min(parseInt((h.pos*(h.end[1]-h.start[1]))+h.start[1],10),255),0),Math.max(Math.min(parseInt((h.pos*(h.end[2]-h.start[2]))+h.start[2],10),255),0)].join(",")+")"}});function b(g){var f;if(g&&g.constructor==Array&&g.length==3){return g}if(f=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(g)){return[parseInt(f[1],10),parseInt(f[2],10),parseInt(f[3],10)]}if(f=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(g)){return[parseFloat(f[1])*2.55,parseFloat(f[2])*2.55,parseFloat(f[3])*2.55]}if(f=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(g)){return[parseInt(f[1],16),parseInt(f[2],16),parseInt(f[3],16)]}if(f=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(g)){return[parseInt(f[1]+f[1],16),parseInt(f[2]+f[2],16),parseInt(f[3]+f[3],16)]}if(f=/rgba\(0, 0, 0, 0\)/.exec(g)){return a.transparent}return a[d.trim(g).toLowerCase()]}function e(h,f){var g;do{g=d.curCSS(h,f);if(g!=""&&g!="transparent"||d.nodeName(h,"body")){break}f="backgroundColor"}while(h=h.parentNode);return b(g)}var a={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]};d.easing.jswing=d.easing.swing;d.extend(d.easing,{def:"easeOutQuad",swing:function(g,h,f,j,i){return d.easing[d.easing.def](g,h,f,j,i)},easeInQuad:function(g,h,f,j,i){return j*(h/=i)*h+f},easeOutQuad:function(g,h,f,j,i){return -j*(h/=i)*(h-2)+f},easeInOutQuad:function(g,h,f,j,i){if((h/=i/2)<1){return j/2*h*h+f}return -j/2*((--h)*(h-2)-1)+f},easeInCubic:function(g,h,f,j,i){return j*(h/=i)*h*h+f},easeOutCubic:function(g,h,f,j,i){return j*((h=h/i-1)*h*h+1)+f},easeInOutCubic:function(g,h,f,j,i){if((h/=i/2)<1){return j/2*h*h*h+f}return j/2*((h-=2)*h*h+2)+f},easeInQuart:function(g,h,f,j,i){return j*(h/=i)*h*h*h+f},easeOutQuart:function(g,h,f,j,i){return -j*((h=h/i-1)*h*h*h-1)+f},easeInOutQuart:function(g,h,f,j,i){if((h/=i/2)<1){return j/2*h*h*h*h+f}return -j/2*((h-=2)*h*h*h-2)+f},easeInQuint:function(g,h,f,j,i){return j*(h/=i)*h*h*h*h+f},easeOutQuint:function(g,h,f,j,i){return j*((h=h/i-1)*h*h*h*h+1)+f},easeInOutQuint:function(g,h,f,j,i){if((h/=i/2)<1){return j/2*h*h*h*h*h+f}return j/2*((h-=2)*h*h*h*h+2)+f},easeInSine:function(g,h,f,j,i){return -j*Math.cos(h/i*(Math.PI/2))+j+f},easeOutSine:function(g,h,f,j,i){return j*Math.sin(h/i*(Math.PI/2))+f},easeInOutSine:function(g,h,f,j,i){return -j/2*(Math.cos(Math.PI*h/i)-1)+f},easeInExpo:function(g,h,f,j,i){return(h==0)?f:j*Math.pow(2,10*(h/i-1))+f},easeOutExpo:function(g,h,f,j,i){return(h==i)?f+j:j*(-Math.pow(2,-10*h/i)+1)+f},easeInOutExpo:function(g,h,f,j,i){if(h==0){return f}if(h==i){return f+j}if((h/=i/2)<1){return j/2*Math.pow(2,10*(h-1))+f}return j/2*(-Math.pow(2,-10*--h)+2)+f},easeInCirc:function(g,h,f,j,i){return -j*(Math.sqrt(1-(h/=i)*h)-1)+f},easeOutCirc:function(g,h,f,j,i){return j*Math.sqrt(1-(h=h/i-1)*h)+f},easeInOutCirc:function(g,h,f,j,i){if((h/=i/2)<1){return -j/2*(Math.sqrt(1-h*h)-1)+f}return j/2*(Math.sqrt(1-(h-=2)*h)+1)+f},easeInElastic:function(g,i,f,m,l){var j=1.70158;var k=0;var h=m;if(i==0){return f}if((i/=l)==1){return f+m}if(!k){k=l*0.3}if(h').appendTo(document.body).addClass(b.options.className).css({top:d.top,left:d.left,height:f.innerHeight(),width:f.innerWidth(),position:"absolute"}).animate(g,b.duration,b.options.easing,function(){c.remove();(b.callback&&b.callback.apply(f[0],arguments));f.dequeue()})})}})(jQuery);; \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/js/jquery.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/IRI-Theme/js/jquery.js Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,11 @@ +/* + * jQuery 1.2.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-09-16 23:42:06 -0400 (Sun, 16 Sep 2007) $ + * $Rev: 3353 $ + */ +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}('(G(){9(1m E!="W")H w=E;H E=18.15=G(a,b){I 6 7u E?6.5N(a,b):1u E(a,b)};9(1m $!="W")H D=$;18.$=E;H u=/^[^<]*(<(.|\\s)+>)[^>]*$|^#(\\w+)$/;E.1b=E.3A={5N:G(c,a){c=c||U;9(1m c=="1M"){H m=u.2S(c);9(m&&(m[1]||!a)){9(m[1])c=E.4D([m[1]],a);J{H b=U.3S(m[3]);9(b)9(b.22!=m[3])I E().1Y(c);J{6[0]=b;6.K=1;I 6}J c=[]}}J I 1u E(a).1Y(c)}J 9(E.1n(c))I 1u E(U)[E.1b.2d?"2d":"39"](c);I 6.6v(c.1c==1B&&c||(c.4c||c.K&&c!=18&&!c.1y&&c[0]!=W&&c[0].1y)&&E.2h(c)||[c])},4c:"1.2.1",7Y:G(){I 6.K},K:0,21:G(a){I a==W?E.2h(6):6[a]},2o:G(a){H b=E(a);b.4Y=6;I b},6v:G(a){6.K=0;1B.3A.1a.16(6,a);I 6},N:G(a,b){I E.N(6,a,b)},4I:G(a){H b=-1;6.N(G(i){9(6==a)b=i});I b},1x:G(f,d,e){H c=f;9(f.1c==3X)9(d==W)I 6.K&&E[e||"1x"](6[0],f)||W;J{c={};c[f]=d}I 6.N(G(a){L(H b 1i c)E.1x(e?6.R:6,b,E.1e(6,c[b],e,a,b))})},17:G(b,a){I 6.1x(b,a,"3C")},2g:G(e){9(1m e!="5i"&&e!=S)I 6.4n().3g(U.6F(e));H t="";E.N(e||6,G(){E.N(6.3j,G(){9(6.1y!=8)t+=6.1y!=1?6.6x:E.1b.2g([6])})});I t},5m:G(b){9(6[0])E(b,6[0].3H).6u().3d(6[0]).1X(G(){H a=6;1W(a.1w)a=a.1w;I a}).3g(6);I 6},8m:G(a){I 6.N(G(){E(6).6q().5m(a)})},8d:G(a){I 6.N(G(){E(6).5m(a)})},3g:G(){I 6.3z(1q,Q,1,G(a){6.58(a)})},6j:G(){I 6.3z(1q,Q,-1,G(a){6.3d(a,6.1w)})},6g:G(){I 6.3z(1q,P,1,G(a){6.12.3d(a,6)})},50:G(){I 6.3z(1q,P,-1,G(a){6.12.3d(a,6.2q)})},2D:G(){I 6.4Y||E([])},1Y:G(t){H b=E.1X(6,G(a){I E.1Y(t,a)});I 6.2o(/[^+>] [^+>]/.14(t)||t.1g("..")>-1?E.4V(b):b)},6u:G(e){H f=6.1X(G(){I 6.67?E(6.67)[0]:6.4R(Q)});H d=f.1Y("*").4O().N(G(){9(6[F]!=W)6[F]=S});9(e===Q)6.1Y("*").4O().N(G(i){H c=E.M(6,"2P");L(H a 1i c)L(H b 1i c[a])E.1j.1f(d[i],a,c[a][b],c[a][b].M)});I f},1E:G(t){I 6.2o(E.1n(t)&&E.2W(6,G(b,a){I t.16(b,[a])})||E.3m(t,6))},5V:G(t){I 6.2o(t.1c==3X&&E.3m(t,6,Q)||E.2W(6,G(a){I(t.1c==1B||t.4c)?E.2A(a,t)<0:a!=t}))},1f:G(t){I 6.2o(E.1R(6.21(),t.1c==3X?E(t).21():t.K!=W&&(!t.11||E.11(t,"2Y"))?t:[t]))},3t:G(a){I a?E.3m(a,6).K>0:P},7c:G(a){I 6.3t("."+a)},3i:G(b){9(b==W){9(6.K){H c=6[0];9(E.11(c,"24")){H e=c.4Z,a=[],Y=c.Y,2G=c.O=="24-2G";9(e<0)I S;L(H i=2G?e:0,33=2G?e+1:Y.K;i<33;i++){H d=Y[i];9(d.26){H b=E.V.1h&&!d.9V["1Q"].9L?d.2g:d.1Q;9(2G)I b;a.1a(b)}}I a}J I 6[0].1Q.1p(/\\r/g,"")}}J I 6.N(G(){9(b.1c==1B&&/4k|5j/.14(6.O))6.2Q=(E.2A(6.1Q,b)>=0||E.2A(6.2H,b)>=0);J 9(E.11(6,"24")){H a=b.1c==1B?b:[b];E("9h",6).N(G(){6.26=(E.2A(6.1Q,a)>=0||E.2A(6.2g,a)>=0)});9(!a.K)6.4Z=-1}J 6.1Q=b})},4o:G(a){I a==W?(6.K?6[0].3O:S):6.4n().3g(a)},6H:G(a){I 6.50(a).28()},6E:G(i){I 6.2J(i,i+1)},2J:G(){I 6.2o(1B.3A.2J.16(6,1q))},1X:G(b){I 6.2o(E.1X(6,G(a,i){I b.2O(a,i,a)}))},4O:G(){I 6.1f(6.4Y)},3z:G(f,d,g,e){H c=6.K>1,a;I 6.N(G(){9(!a){a=E.4D(f,6.3H);9(g<0)a.8U()}H b=6;9(d&&E.11(6,"1I")&&E.11(a[0],"4m"))b=6.4l("1K")[0]||6.58(U.5B("1K"));E.N(a,G(){H a=c?6.4R(Q):6;9(!5A(0,a))e.2O(b,a)})})}};G 5A(i,b){H a=E.11(b,"1J");9(a){9(b.3k)E.3G({1d:b.3k,3e:P,1V:"1J"});J E.5f(b.2g||b.6s||b.3O||"");9(b.12)b.12.3b(b)}J 9(b.1y==1)E("1J",b).N(5A);I a}E.1k=E.1b.1k=G(){H c=1q[0]||{},a=1,2c=1q.K,5e=P;9(c.1c==8o){5e=c;c=1q[1]||{}}9(2c==1){c=6;a=0}H b;L(;a<2c;a++)9((b=1q[a])!=S)L(H i 1i b){9(c==b[i])6r;9(5e&&1m b[i]==\'5i\'&&c[i])E.1k(c[i],b[i]);J 9(b[i]!=W)c[i]=b[i]}I c};H F="15"+(1u 3D()).3B(),6p=0,5c={};E.1k({8a:G(a){18.$=D;9(a)18.15=w;I E},1n:G(a){I!!a&&1m a!="1M"&&!a.11&&a.1c!=1B&&/G/i.14(a+"")},4a:G(a){I a.2V&&!a.1G||a.37&&a.3H&&!a.3H.1G},5f:G(a){a=E.36(a);9(a){9(18.6l)18.6l(a);J 9(E.V.1N)18.56(a,0);J 3w.2O(18,a)}},11:G(b,a){I b.11&&b.11.27()==a.27()},1L:{},M:G(c,d,b){c=c==18?5c:c;H a=c[F];9(!a)a=c[F]=++6p;9(d&&!E.1L[a])E.1L[a]={};9(b!=W)E.1L[a][d]=b;I d?E.1L[a][d]:a},30:G(c,b){c=c==18?5c:c;H a=c[F];9(b){9(E.1L[a]){2E E.1L[a][b];b="";L(b 1i E.1L[a])1T;9(!b)E.30(c)}}J{2a{2E c[F]}29(e){9(c.53)c.53(F)}2E E.1L[a]}},N:G(a,b,c){9(c){9(a.K==W)L(H i 1i a)b.16(a[i],c);J L(H i=0,48=a.K;i<48;i++)9(b.16(a[i],c)===P)1T}J{9(a.K==W)L(H i 1i a)b.2O(a[i],i,a[i]);J L(H i=0,48=a.K,3i=a[0];i<48&&b.2O(3i,i,3i)!==P;3i=a[++i]){}}I a},1e:G(c,b,d,e,a){9(E.1n(b))b=b.2O(c,[e]);H f=/z-?4I|7T-?7Q|1r|69|7P-?1H/i;I b&&b.1c==4W&&d=="3C"&&!f.14(a)?b+"2T":b},1o:{1f:G(b,c){E.N((c||"").2l(/\\s+/),G(i,a){9(!E.1o.3K(b.1o,a))b.1o+=(b.1o?" ":"")+a})},28:G(b,c){b.1o=c!=W?E.2W(b.1o.2l(/\\s+/),G(a){I!E.1o.3K(c,a)}).66(" "):""},3K:G(t,c){I E.2A(c,(t.1o||t).3s().2l(/\\s+/))>-1}},2k:G(e,o,f){L(H i 1i o){e.R["3r"+i]=e.R[i];e.R[i]=o[i]}f.16(e,[]);L(H i 1i o)e.R[i]=e.R["3r"+i]},17:G(e,p){9(p=="1H"||p=="2N"){H b={},42,41,d=["7J","7I","7G","7F"];E.N(d,G(){b["7C"+6]=0;b["7B"+6+"5Z"]=0});E.2k(e,b,G(){9(E(e).3t(\':3R\')){42=e.7A;41=e.7w}J{e=E(e.4R(Q)).1Y(":4k").5W("2Q").2D().17({4C:"1P",2X:"4F",19:"2Z",7o:"0",1S:"0"}).5R(e.12)[0];H a=E.17(e.12,"2X")||"3V";9(a=="3V")e.12.R.2X="7g";42=e.7e;41=e.7b;9(a=="3V")e.12.R.2X="3V";e.12.3b(e)}});I p=="1H"?42:41}I E.3C(e,p)},3C:G(h,j,i){H g,2w=[],2k=[];G 3n(a){9(!E.V.1N)I P;H b=U.3o.3Z(a,S);I!b||b.4y("3n")==""}9(j=="1r"&&E.V.1h){g=E.1x(h.R,"1r");I g==""?"1":g}9(j.1t(/4u/i))j=y;9(!i&&h.R[j])g=h.R[j];J 9(U.3o&&U.3o.3Z){9(j.1t(/4u/i))j="4u";j=j.1p(/([A-Z])/g,"-$1").2p();H d=U.3o.3Z(h,S);9(d&&!3n(h))g=d.4y(j);J{L(H a=h;a&&3n(a);a=a.12)2w.4w(a);L(a=0;a<2w.K;a++)9(3n(2w[a])){2k[a]=2w[a].R.19;2w[a].R.19="2Z"}g=j=="19"&&2k[2w.K-1]!=S?"2s":U.3o.3Z(h,S).4y(j)||"";L(a=0;a<2k.K;a++)9(2k[a]!=S)2w[a].R.19=2k[a]}9(j=="1r"&&g=="")g="1"}J 9(h.3Q){H f=j.1p(/\\-(\\w)/g,G(m,c){I c.27()});g=h.3Q[j]||h.3Q[f];9(!/^\\d+(2T)?$/i.14(g)&&/^\\d/.14(g)){H k=h.R.1S;H e=h.4v.1S;h.4v.1S=h.3Q.1S;h.R.1S=g||0;g=h.R.71+"2T";h.R.1S=k;h.4v.1S=e}}I g},4D:G(a,e){H r=[];e=e||U;E.N(a,G(i,d){9(!d)I;9(d.1c==4W)d=d.3s();9(1m d=="1M"){d=d.1p(/(<(\\w+)[^>]*?)\\/>/g,G(m,a,b){I b.1t(/^(70|6Z|6Y|9Q|4t|9N|9K|3a|9G|9E)$/i)?m:a+">"});H s=E.36(d).2p(),1s=e.5B("1s"),2x=[];H c=!s.1g("<9y")&&[1,"<24>",""]||!s.1g("<9w")&&[1,"<6T>",""]||s.1t(/^<(9u|1K|9t|9r|9p)/)&&[1,"<1I>",""]||!s.1g("<4m")&&[2,"<1I><1K>",""]||(!s.1g("<9m")||!s.1g("<9k"))&&[3,"<1I><1K><4m>",""]||!s.1g("<6Y")&&[2,"<1I><1K><6L>",""]||E.V.1h&&[1,"1s<1s>",""]||[0,"",""];1s.3O=c[1]+d+c[2];1W(c[0]--)1s=1s.5p;9(E.V.1h){9(!s.1g("<1I")&&s.1g("<1K")<0)2x=1s.1w&&1s.1w.3j;J 9(c[1]=="<1I>"&&s.1g("<1K")<0)2x=1s.3j;L(H n=2x.K-1;n>=0;--n)9(E.11(2x[n],"1K")&&!2x[n].3j.K)2x[n].12.3b(2x[n]);9(/^\\s/.14(d))1s.3d(e.6F(d.1t(/^\\s*/)[0]),1s.1w)}d=E.2h(1s.3j)}9(0===d.K&&(!E.11(d,"2Y")&&!E.11(d,"24")))I;9(d[0]==W||E.11(d,"2Y")||d.Y)r.1a(d);J r=E.1R(r,d)});I r},1x:G(c,d,a){H e=E.4a(c)?{}:E.5o;9(d=="26"&&E.V.1N)c.12.4Z;9(e[d]){9(a!=W)c[e[d]]=a;I c[e[d]]}J 9(E.V.1h&&d=="R")I E.1x(c.R,"9e",a);J 9(a==W&&E.V.1h&&E.11(c,"2Y")&&(d=="9d"||d=="9a"))I c.97(d).6x;J 9(c.37){9(a!=W){9(d=="O"&&E.11(c,"4t")&&c.12)6G"O 94 93\'t 92 91";c.90(d,a)}9(E.V.1h&&/6C|3k/.14(d)&&!E.4a(c))I c.4p(d,2);I c.4p(d)}J{9(d=="1r"&&E.V.1h){9(a!=W){c.69=1;c.1E=(c.1E||"").1p(/6O\\([^)]*\\)/,"")+(3I(a).3s()=="8S"?"":"6O(1r="+a*6A+")")}I c.1E?(3I(c.1E.1t(/1r=([^)]*)/)[1])/6A).3s():""}d=d.1p(/-([a-z])/8Q,G(z,b){I b.27()});9(a!=W)c[d]=a;I c[d]}},36:G(t){I(t||"").1p(/^\\s+|\\s+$/g,"")},2h:G(a){H r=[];9(1m a!="8P")L(H i=0,2c=a.K;i<2c;i++)r.1a(a[i]);J r=a.2J(0);I r},2A:G(b,a){L(H i=0,2c=a.K;i<2c;i++)9(a[i]==b)I i;I-1},1R:G(a,b){9(E.V.1h){L(H i=0;b[i];i++)9(b[i].1y!=8)a.1a(b[i])}J L(H i=0;b[i];i++)a.1a(b[i]);I a},4V:G(b){H r=[],2f={};2a{L(H i=0,6y=b.K;i<6y;i++){H a=E.M(b[i]);9(!2f[a]){2f[a]=Q;r.1a(b[i])}}}29(e){r=b}I r},2W:G(b,a,c){9(1m a=="1M")a=3w("P||G(a,i){I "+a+"}");H d=[];L(H i=0,4g=b.K;i<4g;i++)9(!c&&a(b[i],i)||c&&!a(b[i],i))d.1a(b[i]);I d},1X:G(c,b){9(1m b=="1M")b=3w("P||G(a){I "+b+"}");H d=[];L(H i=0,4g=c.K;i<4g;i++){H a=b(c[i],i);9(a!==S&&a!=W){9(a.1c!=1B)a=[a];d=d.8M(a)}}I d}});H v=8K.8I.2p();E.V={4s:(v.1t(/.+(?:8F|8E|8C|8B)[\\/: ]([\\d.]+)/)||[])[1],1N:/6w/.14(v),34:/34/.14(v),1h:/1h/.14(v)&&!/34/.14(v),35:/35/.14(v)&&!/(8z|6w)/.14(v)};H y=E.V.1h?"4h":"5h";E.1k({5g:!E.V.1h||U.8y=="8x",4h:E.V.1h?"4h":"5h",5o:{"L":"8w","8v":"1o","4u":y,5h:y,4h:y,3O:"3O",1o:"1o",1Q:"1Q",3c:"3c",2Q:"2Q",8u:"8t",26:"26",8s:"8r"}});E.N({1D:"a.12",8q:"15.4e(a,\'12\')",8p:"15.2I(a,2,\'2q\')",8n:"15.2I(a,2,\'4d\')",8l:"15.4e(a,\'2q\')",8k:"15.4e(a,\'4d\')",8j:"15.5d(a.12.1w,a)",8i:"15.5d(a.1w)",6q:"15.11(a,\'8h\')?a.8f||a.8e.U:15.2h(a.3j)"},G(i,n){E.1b[i]=G(a){H b=E.1X(6,n);9(a&&1m a=="1M")b=E.3m(a,b);I 6.2o(E.4V(b))}});E.N({5R:"3g",8c:"6j",3d:"6g",8b:"50",89:"6H"},G(i,n){E.1b[i]=G(){H a=1q;I 6.N(G(){L(H j=0,2c=a.K;j<2c;j++)E(a[j])[n](6)})}});E.N({5W:G(a){E.1x(6,a,"");6.53(a)},88:G(c){E.1o.1f(6,c)},87:G(c){E.1o.28(6,c)},86:G(c){E.1o[E.1o.3K(6,c)?"28":"1f"](6,c)},28:G(a){9(!a||E.1E(a,[6]).r.K){E.30(6);6.12.3b(6)}},4n:G(){E("*",6).N(G(){E.30(6)});1W(6.1w)6.3b(6.1w)}},G(i,n){E.1b[i]=G(){I 6.N(n,1q)}});E.N(["85","5Z"],G(i,a){H n=a.2p();E.1b[n]=G(h){I 6[0]==18?E.V.1N&&3y["84"+a]||E.5g&&38.33(U.2V["5a"+a],U.1G["5a"+a])||U.1G["5a"+a]:6[0]==U?38.33(U.1G["6n"+a],U.1G["6m"+a]):h==W?(6.K?E.17(6[0],n):S):6.17(n,h.1c==3X?h:h+"2T")}});H C=E.V.1N&&3x(E.V.4s)<83?"(?:[\\\\w*57-]|\\\\\\\\.)":"(?:[\\\\w\\82-\\81*57-]|\\\\\\\\.)",6k=1u 47("^>\\\\s*("+C+"+)"),6i=1u 47("^("+C+"+)(#)("+C+"+)"),6h=1u 47("^([#.]?)("+C+"*)");E.1k({55:{"":"m[2]==\'*\'||15.11(a,m[2])","#":"a.4p(\'22\')==m[2]",":":{80:"im[3]-0",2I:"m[3]-0==i",6E:"m[3]-0==i",3v:"i==0",3u:"i==r.K-1",6f:"i%2==0",6e:"i%2","3v-46":"a.12.4l(\'*\')[0]==a","3u-46":"15.2I(a.12.5p,1,\'4d\')==a","7X-46":"!15.2I(a.12.5p,2,\'4d\')",1D:"a.1w",4n:"!a.1w",7W:"(a.6s||a.7V||15(a).2g()||\'\').1g(m[3])>=0",3R:\'"1P"!=a.O&&15.17(a,"19")!="2s"&&15.17(a,"4C")!="1P"\',1P:\'"1P"==a.O||15.17(a,"19")=="2s"||15.17(a,"4C")=="1P"\',7U:"!a.3c",3c:"a.3c",2Q:"a.2Q",26:"a.26||15.1x(a,\'26\')",2g:"\'2g\'==a.O",4k:"\'4k\'==a.O",5j:"\'5j\'==a.O",54:"\'54\'==a.O",52:"\'52\'==a.O",51:"\'51\'==a.O",6d:"\'6d\'==a.O",6c:"\'6c\'==a.O",2r:\'"2r"==a.O||15.11(a,"2r")\',4t:"/4t|24|6b|2r/i.14(a.11)",3K:"15.1Y(m[3],a).K",7S:"/h\\\\d/i.14(a.11)",7R:"15.2W(15.32,G(1b){I a==1b.T;}).K"}},6a:[/^(\\[) *@?([\\w-]+) *([!*$^~=]*) *(\'?"?)(.*?)\\4 *\\]/,/^(:)([\\w-]+)\\("?\'?(.*?(\\(.*?\\))?[^(]*?)"?\'?\\)/,1u 47("^([:.#]*)("+C+"+)")],3m:G(a,c,b){H d,2b=[];1W(a&&a!=d){d=a;H f=E.1E(a,c,b);a=f.t.1p(/^\\s*,\\s*/,"");2b=b?c=f.r:E.1R(2b,f.r)}I 2b},1Y:G(t,o){9(1m t!="1M")I[t];9(o&&!o.1y)o=S;o=o||U;H d=[o],2f=[],3u;1W(t&&3u!=t){H r=[];3u=t;t=E.36(t);H l=P;H g=6k;H m=g.2S(t);9(m){H p=m[1].27();L(H i=0;d[i];i++)L(H c=d[i].1w;c;c=c.2q)9(c.1y==1&&(p=="*"||c.11.27()==p.27()))r.1a(c);d=r;t=t.1p(g,"");9(t.1g(" ")==0)6r;l=Q}J{g=/^([>+~])\\s*(\\w*)/i;9((m=g.2S(t))!=S){r=[];H p=m[2],1R={};m=m[1];L(H j=0,31=d.K;j<31;j++){H n=m=="~"||m=="+"?d[j].2q:d[j].1w;L(;n;n=n.2q)9(n.1y==1){H h=E.M(n);9(m=="~"&&1R[h])1T;9(!p||n.11.27()==p.27()){9(m=="~")1R[h]=Q;r.1a(n)}9(m=="+")1T}}d=r;t=E.36(t.1p(g,""));l=Q}}9(t&&!l){9(!t.1g(",")){9(o==d[0])d.44();2f=E.1R(2f,d);r=d=[o];t=" "+t.68(1,t.K)}J{H k=6i;H m=k.2S(t);9(m){m=[0,m[2],m[3],m[1]]}J{k=6h;m=k.2S(t)}m[2]=m[2].1p(/\\\\/g,"");H f=d[d.K-1];9(m[1]=="#"&&f&&f.3S&&!E.4a(f)){H q=f.3S(m[2]);9((E.V.1h||E.V.34)&&q&&1m q.22=="1M"&&q.22!=m[2])q=E(\'[@22="\'+m[2]+\'"]\',f)[0];d=r=q&&(!m[3]||E.11(q,m[3]))?[q]:[]}J{L(H i=0;d[i];i++){H a=m[1]=="#"&&m[3]?m[3]:m[1]!=""||m[0]==""?"*":m[2];9(a=="*"&&d[i].11.2p()=="5i")a="3a";r=E.1R(r,d[i].4l(a))}9(m[1]==".")r=E.4X(r,m[2]);9(m[1]=="#"){H e=[];L(H i=0;r[i];i++)9(r[i].4p("22")==m[2]){e=[r[i]];1T}r=e}d=r}t=t.1p(k,"")}}9(t){H b=E.1E(t,r);d=r=b.r;t=E.36(b.t)}}9(t)d=[];9(d&&o==d[0])d.44();2f=E.1R(2f,d);I 2f},4X:G(r,m,a){m=" "+m+" ";H c=[];L(H i=0;r[i];i++){H b=(" "+r[i].1o+" ").1g(m)>=0;9(!a&&b||a&&!b)c.1a(r[i])}I c},1E:G(t,r,h){H d;1W(t&&t!=d){d=t;H p=E.6a,m;L(H i=0;p[i];i++){m=p[i].2S(t);9(m){t=t.7O(m[0].K);m[2]=m[2].1p(/\\\\/g,"");1T}}9(!m)1T;9(m[1]==":"&&m[2]=="5V")r=E.1E(m[3],r,Q).r;J 9(m[1]==".")r=E.4X(r,m[2],h);J 9(m[1]=="["){H g=[],O=m[3];L(H i=0,31=r.K;i<31;i++){H a=r[i],z=a[E.5o[m[2]]||m[2]];9(z==S||/6C|3k|26/.14(m[2]))z=E.1x(a,m[2])||\'\';9((O==""&&!!z||O=="="&&z==m[5]||O=="!="&&z!=m[5]||O=="^="&&z&&!z.1g(m[5])||O=="$="&&z.68(z.K-m[5].K)==m[5]||(O=="*="||O=="~=")&&z.1g(m[5])>=0)^h)g.1a(a)}r=g}J 9(m[1]==":"&&m[2]=="2I-46"){H e={},g=[],14=/(\\d*)n\\+?(\\d*)/.2S(m[3]=="6f"&&"2n"||m[3]=="6e"&&"2n+1"||!/\\D/.14(m[3])&&"n+"+m[3]||m[3]),3v=(14[1]||1)-0,d=14[2]-0;L(H i=0,31=r.K;i<31;i++){H j=r[i],12=j.12,22=E.M(12);9(!e[22]){H c=1;L(H n=12.1w;n;n=n.2q)9(n.1y==1)n.4U=c++;e[22]=Q}H b=P;9(3v==1){9(d==0||j.4U==d)b=Q}J 9((j.4U+d)%3v==0)b=Q;9(b^h)g.1a(j)}r=g}J{H f=E.55[m[1]];9(1m f!="1M")f=E.55[m[1]][m[2]];f=3w("P||G(a,i){I "+f+"}");r=E.2W(r,f,h)}}I{r:r,t:t}},4e:G(b,c){H d=[];H a=b[c];1W(a&&a!=U){9(a.1y==1)d.1a(a);a=a[c]}I d},2I:G(a,e,c,b){e=e||1;H d=0;L(;a;a=a[c])9(a.1y==1&&++d==e)1T;I a},5d:G(n,a){H r=[];L(;n;n=n.2q){9(n.1y==1&&(!a||n!=a))r.1a(n)}I r}});E.1j={1f:G(g,e,c,h){9(E.V.1h&&g.4j!=W)g=18;9(!c.2u)c.2u=6.2u++;9(h!=W){H d=c;c=G(){I d.16(6,1q)};c.M=h;c.2u=d.2u}H i=e.2l(".");e=i[0];c.O=i[1];H b=E.M(g,"2P")||E.M(g,"2P",{});H f=E.M(g,"2t",G(){H a;9(1m E=="W"||E.1j.4T)I a;a=E.1j.2t.16(g,1q);I a});H j=b[e];9(!j){j=b[e]={};9(g.4S)g.4S(e,f,P);J g.7N("43"+e,f)}j[c.2u]=c;6.1Z[e]=Q},2u:1,1Z:{},28:G(d,c,b){H e=E.M(d,"2P"),2L,4I;9(1m c=="1M"){H a=c.2l(".");c=a[0]}9(e){9(c&&c.O){b=c.4Q;c=c.O}9(!c){L(c 1i e)6.28(d,c)}J 9(e[c]){9(b)2E e[c][b.2u];J L(b 1i e[c])9(!a[1]||e[c][b].O==a[1])2E e[c][b];L(2L 1i e[c])1T;9(!2L){9(d.4P)d.4P(c,E.M(d,"2t"),P);J d.7M("43"+c,E.M(d,"2t"));2L=S;2E e[c]}}L(2L 1i e)1T;9(!2L){E.30(d,"2P");E.30(d,"2t")}}},1F:G(d,b,e,c,f){b=E.2h(b||[]);9(!e){9(6.1Z[d])E("*").1f([18,U]).1F(d,b)}J{H a,2L,1b=E.1n(e[d]||S),4N=!b[0]||!b[0].2M;9(4N)b.4w(6.4M({O:d,2m:e}));b[0].O=d;9(E.1n(E.M(e,"2t")))a=E.M(e,"2t").16(e,b);9(!1b&&e["43"+d]&&e["43"+d].16(e,b)===P)a=P;9(4N)b.44();9(f&&f.16(e,b)===P)a=P;9(1b&&c!==P&&a!==P&&!(E.11(e,\'a\')&&d=="4L")){6.4T=Q;e[d]()}6.4T=P}I a},2t:G(d){H a;d=E.1j.4M(d||18.1j||{});H b=d.O.2l(".");d.O=b[0];H c=E.M(6,"2P")&&E.M(6,"2P")[d.O],3q=1B.3A.2J.2O(1q,1);3q.4w(d);L(H j 1i c){3q[0].4Q=c[j];3q[0].M=c[j].M;9(!b[1]||c[j].O==b[1]){H e=c[j].16(6,3q);9(a!==P)a=e;9(e===P){d.2M();d.3p()}}}9(E.V.1h)d.2m=d.2M=d.3p=d.4Q=d.M=S;I a},4M:G(c){H a=c;c=E.1k({},a);c.2M=G(){9(a.2M)a.2M();a.7L=P};c.3p=G(){9(a.3p)a.3p();a.7K=Q};9(!c.2m&&c.65)c.2m=c.65;9(E.V.1N&&c.2m.1y==3)c.2m=a.2m.12;9(!c.4K&&c.4J)c.4K=c.4J==c.2m?c.7H:c.4J;9(c.64==S&&c.63!=S){H e=U.2V,b=U.1G;c.64=c.63+(e&&e.2R||b.2R||0);c.7E=c.7D+(e&&e.2B||b.2B||0)}9(!c.3Y&&(c.61||c.60))c.3Y=c.61||c.60;9(!c.5F&&c.5D)c.5F=c.5D;9(!c.3Y&&c.2r)c.3Y=(c.2r&1?1:(c.2r&2?3:(c.2r&4?2:0)));I c}};E.1b.1k({3W:G(c,a,b){I c=="5Y"?6.2G(c,a,b):6.N(G(){E.1j.1f(6,c,b||a,b&&a)})},2G:G(d,b,c){I 6.N(G(){E.1j.1f(6,d,G(a){E(6).5X(a);I(c||b).16(6,1q)},c&&b)})},5X:G(a,b){I 6.N(G(){E.1j.28(6,a,b)})},1F:G(c,a,b){I 6.N(G(){E.1j.1F(c,a,6,Q,b)})},7x:G(c,a,b){9(6[0])I E.1j.1F(c,a,6[0],P,b)},25:G(){H a=1q;I 6.4L(G(e){6.4H=0==6.4H?1:0;e.2M();I a[6.4H].16(6,[e])||P})},7v:G(f,g){G 4G(e){H p=e.4K;1W(p&&p!=6)2a{p=p.12}29(e){p=6};9(p==6)I P;I(e.O=="4x"?f:g).16(6,[e])}I 6.4x(4G).5U(4G)},2d:G(f){5T();9(E.3T)f.16(U,[E]);J E.3l.1a(G(){I f.16(6,[E])});I 6}});E.1k({3T:P,3l:[],2d:G(){9(!E.3T){E.3T=Q;9(E.3l){E.N(E.3l,G(){6.16(U)});E.3l=S}9(E.V.35||E.V.34)U.4P("5S",E.2d,P);9(!18.7t.K)E(18).39(G(){E("#4E").28()})}}});E.N(("7s,7r,39,7q,6n,5Y,4L,7p,"+"7n,7m,7l,4x,5U,7k,24,"+"51,7j,7i,7h,3U").2l(","),G(i,o){E.1b[o]=G(f){I f?6.3W(o,f):6.1F(o)}});H x=P;G 5T(){9(x)I;x=Q;9(E.V.35||E.V.34)U.4S("5S",E.2d,P);J 9(E.V.1h){U.7f("<7d"+"7y 22=4E 7z=Q "+"3k=//:><\\/1J>");H a=U.3S("4E");9(a)a.62=G(){9(6.2C!="1l")I;E.2d()};a=S}J 9(E.V.1N)E.4B=4j(G(){9(U.2C=="5Q"||U.2C=="1l"){4A(E.4B);E.4B=S;E.2d()}},10);E.1j.1f(18,"39",E.2d)}E.1b.1k({39:G(g,d,c){9(E.1n(g))I 6.3W("39",g);H e=g.1g(" ");9(e>=0){H i=g.2J(e,g.K);g=g.2J(0,e)}c=c||G(){};H f="4z";9(d)9(E.1n(d)){c=d;d=S}J{d=E.3a(d);f="5P"}H h=6;E.3G({1d:g,O:f,M:d,1l:G(a,b){9(b=="1C"||b=="5O")h.4o(i?E("<1s/>").3g(a.40.1p(/<1J(.|\\s)*?\\/1J>/g,"")).1Y(i):a.40);56(G(){h.N(c,[a.40,b,a])},13)}});I 6},7a:G(){I E.3a(6.5M())},5M:G(){I 6.1X(G(){I E.11(6,"2Y")?E.2h(6.79):6}).1E(G(){I 6.2H&&!6.3c&&(6.2Q||/24|6b/i.14(6.11)||/2g|1P|52/i.14(6.O))}).1X(G(i,c){H b=E(6).3i();I b==S?S:b.1c==1B?E.1X(b,G(a,i){I{2H:c.2H,1Q:a}}):{2H:c.2H,1Q:b}}).21()}});E.N("5L,5K,6t,5J,5I,5H".2l(","),G(i,o){E.1b[o]=G(f){I 6.3W(o,f)}});H B=(1u 3D).3B();E.1k({21:G(d,b,a,c){9(E.1n(b)){a=b;b=S}I E.3G({O:"4z",1d:d,M:b,1C:a,1V:c})},78:G(b,a){I E.21(b,S,a,"1J")},77:G(c,b,a){I E.21(c,b,a,"45")},76:G(d,b,a,c){9(E.1n(b)){a=b;b={}}I E.3G({O:"5P",1d:d,M:b,1C:a,1V:c})},75:G(a){E.1k(E.59,a)},59:{1Z:Q,O:"4z",2z:0,5G:"74/x-73-2Y-72",6o:Q,3e:Q,M:S},49:{},3G:G(s){H f,2y=/=(\\?|%3F)/g,1v,M;s=E.1k(Q,s,E.1k(Q,{},E.59,s));9(s.M&&s.6o&&1m s.M!="1M")s.M=E.3a(s.M);9(s.1V=="4b"){9(s.O.2p()=="21"){9(!s.1d.1t(2y))s.1d+=(s.1d.1t(/\\?/)?"&":"?")+(s.4b||"5E")+"=?"}J 9(!s.M||!s.M.1t(2y))s.M=(s.M?s.M+"&":"")+(s.4b||"5E")+"=?";s.1V="45"}9(s.1V=="45"&&(s.M&&s.M.1t(2y)||s.1d.1t(2y))){f="4b"+B++;9(s.M)s.M=s.M.1p(2y,"="+f);s.1d=s.1d.1p(2y,"="+f);s.1V="1J";18[f]=G(a){M=a;1C();1l();18[f]=W;2a{2E 18[f]}29(e){}}}9(s.1V=="1J"&&s.1L==S)s.1L=P;9(s.1L===P&&s.O.2p()=="21")s.1d+=(s.1d.1t(/\\?/)?"&":"?")+"57="+(1u 3D()).3B();9(s.M&&s.O.2p()=="21"){s.1d+=(s.1d.1t(/\\?/)?"&":"?")+s.M;s.M=S}9(s.1Z&&!E.5b++)E.1j.1F("5L");9(!s.1d.1g("8g")&&s.1V=="1J"){H h=U.4l("9U")[0];H g=U.5B("1J");g.3k=s.1d;9(!f&&(s.1C||s.1l)){H j=P;g.9R=g.62=G(){9(!j&&(!6.2C||6.2C=="5Q"||6.2C=="1l")){j=Q;1C();1l();h.3b(g)}}}h.58(g);I}H k=P;H i=18.6X?1u 6X("9P.9O"):1u 6W();i.9M(s.O,s.1d,s.3e);9(s.M)i.5C("9J-9I",s.5G);9(s.5y)i.5C("9H-5x-9F",E.49[s.1d]||"9D, 9C 9B 9A 5v:5v:5v 9z");i.5C("X-9x-9v","6W");9(s.6U)s.6U(i);9(s.1Z)E.1j.1F("5H",[i,s]);H c=G(a){9(!k&&i&&(i.2C==4||a=="2z")){k=Q;9(d){4A(d);d=S}1v=a=="2z"&&"2z"||!E.6S(i)&&"3U"||s.5y&&E.6R(i,s.1d)&&"5O"||"1C";9(1v=="1C"){2a{M=E.6Q(i,s.1V)}29(e){1v="5k"}}9(1v=="1C"){H b;2a{b=i.5s("6P-5x")}29(e){}9(s.5y&&b)E.49[s.1d]=b;9(!f)1C()}J E.5r(s,i,1v);1l();9(s.3e)i=S}};9(s.3e){H d=4j(c,13);9(s.2z>0)56(G(){9(i){i.9q();9(!k)c("2z")}},s.2z)}2a{i.9o(s.M)}29(e){E.5r(s,i,S,e)}9(!s.3e)c();I i;G 1C(){9(s.1C)s.1C(M,1v);9(s.1Z)E.1j.1F("5I",[i,s])}G 1l(){9(s.1l)s.1l(i,1v);9(s.1Z)E.1j.1F("6t",[i,s]);9(s.1Z&&!--E.5b)E.1j.1F("5K")}},5r:G(s,a,b,e){9(s.3U)s.3U(a,b,e);9(s.1Z)E.1j.1F("5J",[a,s,e])},5b:0,6S:G(r){2a{I!r.1v&&9n.9l=="54:"||(r.1v>=6N&&r.1v<9j)||r.1v==6M||E.V.1N&&r.1v==W}29(e){}I P},6R:G(a,c){2a{H b=a.5s("6P-5x");I a.1v==6M||b==E.49[c]||E.V.1N&&a.1v==W}29(e){}I P},6Q:G(r,b){H c=r.5s("9i-O");H d=b=="6K"||!b&&c&&c.1g("6K")>=0;H a=d?r.9g:r.40;9(d&&a.2V.37=="5k")6G"5k";9(b=="1J")E.5f(a);9(b=="45")a=3w("("+a+")");I a},3a:G(a){H s=[];9(a.1c==1B||a.4c)E.N(a,G(){s.1a(3f(6.2H)+"="+3f(6.1Q))});J L(H j 1i a)9(a[j]&&a[j].1c==1B)E.N(a[j],G(){s.1a(3f(j)+"="+3f(6))});J s.1a(3f(j)+"="+3f(a[j]));I s.66("&").1p(/%20/g,"+")}});E.1b.1k({1A:G(b,a){I b?6.1U({1H:"1A",2N:"1A",1r:"1A"},b,a):6.1E(":1P").N(G(){6.R.19=6.3h?6.3h:"";9(E.17(6,"19")=="2s")6.R.19="2Z"}).2D()},1z:G(b,a){I b?6.1U({1H:"1z",2N:"1z",1r:"1z"},b,a):6.1E(":3R").N(G(){6.3h=6.3h||E.17(6,"19");9(6.3h=="2s")6.3h="2Z";6.R.19="2s"}).2D()},6J:E.1b.25,25:G(a,b){I E.1n(a)&&E.1n(b)?6.6J(a,b):a?6.1U({1H:"25",2N:"25",1r:"25"},a,b):6.N(G(){E(6)[E(6).3t(":1P")?"1A":"1z"]()})},9c:G(b,a){I 6.1U({1H:"1A"},b,a)},9b:G(b,a){I 6.1U({1H:"1z"},b,a)},99:G(b,a){I 6.1U({1H:"25"},b,a)},98:G(b,a){I 6.1U({1r:"1A"},b,a)},96:G(b,a){I 6.1U({1r:"1z"},b,a)},95:G(c,a,b){I 6.1U({1r:a},c,b)},1U:G(k,i,h,g){H j=E.6D(i,h,g);I 6[j.3L===P?"N":"3L"](G(){j=E.1k({},j);H f=E(6).3t(":1P"),3y=6;L(H p 1i k){9(k[p]=="1z"&&f||k[p]=="1A"&&!f)I E.1n(j.1l)&&j.1l.16(6);9(p=="1H"||p=="2N"){j.19=E.17(6,"19");j.2U=6.R.2U}}9(j.2U!=S)6.R.2U="1P";j.3M=E.1k({},k);E.N(k,G(c,a){H e=1u E.2j(3y,j,c);9(/25|1A|1z/.14(a))e[a=="25"?f?"1A":"1z":a](k);J{H b=a.3s().1t(/^([+-]=)?([\\d+-.]+)(.*)$/),1O=e.2b(Q)||0;9(b){H d=3I(b[2]),2i=b[3]||"2T";9(2i!="2T"){3y.R[c]=(d||1)+2i;1O=((d||1)/e.2b(Q))*1O;3y.R[c]=1O+2i}9(b[1])d=((b[1]=="-="?-1:1)*d)+1O;e.3N(1O,d,2i)}J e.3N(1O,a,"")}});I Q})},3L:G(a,b){9(E.1n(a)){b=a;a="2j"}9(!a||(1m a=="1M"&&!b))I A(6[0],a);I 6.N(G(){9(b.1c==1B)A(6,a,b);J{A(6,a).1a(b);9(A(6,a).K==1)b.16(6)}})},9f:G(){H a=E.32;I 6.N(G(){L(H i=0;i-8O?r:3I(E.17(6.T,6.1e))||0},3N:G(c,b,e){6.5u=(1u 3D()).3B();6.1O=c;6.2D=b;6.2i=e||6.2i||"2T";6.2v=6.1O;6.4q=6.4i=0;6.4r();H f=6;G t(){I f.2F()}t.T=6.T;E.32.1a(t);9(E.32.K==1){H d=4j(G(){H a=E.32;L(H i=0;i6.Y.2e+6.5u){6.2v=6.2D;6.4q=6.4i=1;6.4r();6.Y.3M[6.1e]=Q;H a=Q;L(H i 1i 6.Y.3M)9(6.Y.3M[i]!==Q)a=P;9(a){9(6.Y.19!=S){6.T.R.2U=6.Y.2U;6.T.R.19=6.Y.19;9(E.17(6.T,"19")=="2s")6.T.R.19="2Z"}9(6.Y.1z)6.T.R.19="2s";9(6.Y.1z||6.Y.1A)L(H p 1i 6.Y.3M)E.1x(6.T.R,p,6.Y.3P[p])}9(a&&E.1n(6.Y.1l))6.Y.1l.16(6.T);I P}J{H n=t-6.5u;6.4i=n/6.Y.2e;6.4q=E.3J[6.Y.3J||(E.3J.5q?"5q":"6B")](6.4i,n,0,1,6.Y.2e);6.2v=6.1O+((6.2D-6.1O)*6.4q);6.4r()}I Q}};E.2j.2F={2R:G(a){a.T.2R=a.2v},2B:G(a){a.T.2B=a.2v},1r:G(a){E.1x(a.T.R,"1r",a.2v)},6z:G(a){a.T.R[a.1e]=a.2v+a.2i}};E.1b.6m=G(){H c=0,3E=0,T=6[0],5t;9(T)8L(E.V){H b=E.17(T,"2X")=="4F",1D=T.12,23=T.23,2K=T.3H,4f=1N&&3x(4s)<8J;9(T.6V){5w=T.6V();1f(5w.1S+38.33(2K.2V.2R,2K.1G.2R),5w.3E+38.33(2K.2V.2B,2K.1G.2B));9(1h){H d=E("4o").17("8H");d=(d=="8G"||E.5g&&3x(4s)>=7)&&2||d;1f(-d,-d)}}J{1f(T.5l,T.5z);1W(23){1f(23.5l,23.5z);9(35&&/^t[d|h]$/i.14(1D.37)||!4f)d(23);9(4f&&!b&&E.17(23,"2X")=="4F")b=Q;23=23.23}1W(1D.37&&!/^1G|4o$/i.14(1D.37)){9(!/^8D|1I-9S.*$/i.14(E.17(1D,"19")))1f(-1D.2R,-1D.2B);9(35&&E.17(1D,"2U")!="3R")d(1D);1D=1D.12}9(4f&&b)1f(-2K.1G.5l,-2K.1G.5z)}5t={3E:3E,1S:c}}I 5t;G d(a){1f(E.17(a,"9T"),E.17(a,"8A"))}G 1f(l,t){c+=3x(l)||0;3E+=3x(t)||0}}})();',62,616,'||||||this|||if|||||||||||||||||||||||||||||||||function|var|return|else|length|for|data|each|type|false|true|style|null|elem|document|browser|undefined||options|||nodeName|parentNode||test|jQuery|apply|css|window|display|push|fn|constructor|url|prop|add|indexOf|msie|in|event|extend|complete|typeof|isFunction|className|replace|arguments|opacity|div|match|new|status|firstChild|attr|nodeType|hide|show|Array|success|parent|filter|trigger|body|height|table|script|tbody|cache|string|safari|start|hidden|value|merge|left|break|animate|dataType|while|map|find|global||get|id|offsetParent|select|toggle|selected|toUpperCase|remove|catch|try|cur|al|ready|duration|done|text|makeArray|unit|fx|swap|split|target||pushStack|toLowerCase|nextSibling|button|none|handle|guid|now|stack|tb|jsre|timeout|inArray|scrollTop|readyState|end|delete|step|one|name|nth|slice|doc|ret|preventDefault|width|call|events|checked|scrollLeft|exec|px|overflow|documentElement|grep|position|form|block|removeData|rl|timers|max|opera|mozilla|trim|tagName|Math|load|param|removeChild|disabled|insertBefore|async|encodeURIComponent|append|oldblock|val|childNodes|src|readyList|multiFilter|color|defaultView|stopPropagation|args|old|toString|is|last|first|eval|parseInt|self|domManip|prototype|getTime|curCSS|Date|top||ajax|ownerDocument|parseFloat|easing|has|queue|curAnim|custom|innerHTML|orig|currentStyle|visible|getElementById|isReady|error|static|bind|String|which|getComputedStyle|responseText|oWidth|oHeight|on|shift|json|child|RegExp|ol|lastModified|isXMLDoc|jsonp|jquery|previousSibling|dir|safari2|el|styleFloat|state|setInterval|radio|getElementsByTagName|tr|empty|html|getAttribute|pos|update|version|input|float|runtimeStyle|unshift|mouseover|getPropertyValue|GET|clearInterval|safariTimer|visibility|clean|__ie_init|absolute|handleHover|lastToggle|index|fromElement|relatedTarget|click|fix|evt|andSelf|removeEventListener|handler|cloneNode|addEventListener|triggered|nodeIndex|unique|Number|classFilter|prevObject|selectedIndex|after|submit|password|removeAttribute|file|expr|setTimeout|_|appendChild|ajaxSettings|client|active|win|sibling|deep|globalEval|boxModel|cssFloat|object|checkbox|parsererror|offsetLeft|wrapAll|dequeue|props|lastChild|swing|handleError|getResponseHeader|results|startTime|00|box|Modified|ifModified|offsetTop|evalScript|createElement|setRequestHeader|ctrlKey|callback|metaKey|contentType|ajaxSend|ajaxSuccess|ajaxError|ajaxStop|ajaxStart|serializeArray|init|notmodified|POST|loaded|appendTo|DOMContentLoaded|bindReady|mouseout|not|removeAttr|unbind|unload|Width|keyCode|charCode|onreadystatechange|clientX|pageX|srcElement|join|outerHTML|substr|zoom|parse|textarea|reset|image|odd|even|before|quickClass|quickID|prepend|quickChild|execScript|offset|scroll|processData|uuid|contents|continue|textContent|ajaxComplete|clone|setArray|webkit|nodeValue|fl|_default|100|linear|href|speed|eq|createTextNode|throw|replaceWith|splice|_toggle|xml|colgroup|304|200|alpha|Last|httpData|httpNotModified|httpSuccess|fieldset|beforeSend|getBoundingClientRect|XMLHttpRequest|ActiveXObject|col|br|abbr|pixelLeft|urlencoded|www|application|ajaxSetup|post|getJSON|getScript|elements|serialize|clientWidth|hasClass|scr|clientHeight|write|relative|keyup|keypress|keydown|change|mousemove|mouseup|mousedown|right|dblclick|resize|focus|blur|frames|instanceof|hover|offsetWidth|triggerHandler|ipt|defer|offsetHeight|border|padding|clientY|pageY|Left|Right|toElement|Bottom|Top|cancelBubble|returnValue|detachEvent|attachEvent|substring|line|weight|animated|header|font|enabled|innerText|contains|only|size|gt|lt|uFFFF|u0128|417|inner|Height|toggleClass|removeClass|addClass|replaceAll|noConflict|insertAfter|prependTo|wrap|contentWindow|contentDocument|http|iframe|children|siblings|prevAll|nextAll|wrapInner|prev|Boolean|next|parents|maxLength|maxlength|readOnly|readonly|class|htmlFor|CSS1Compat|compatMode|compatible|borderTopWidth|ie|ra|inline|it|rv|medium|borderWidth|userAgent|522|navigator|with|concat|1px|10000|array|ig|PI|NaN|400|reverse|fast|600|slow|Function|Object|setAttribute|changed|be|can|property|fadeTo|fadeOut|getAttributeNode|fadeIn|slideToggle|method|slideUp|slideDown|action|cssText|stop|responseXML|option|content|300|th|protocol|td|location|send|cap|abort|colg|cos|tfoot|thead|With|leg|Requested|opt|GMT|1970|Jan|01|Thu|area|Since|hr|If|Type|Content|meta|specified|open|link|XMLHTTP|Microsoft|img|onload|row|borderLeftWidth|head|attributes'.split('|'),0,{})) \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/js/pngfix.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/IRI-Theme/js/pngfix.js Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,39 @@ +/* + +Correctly handle PNG transparency in Win IE 5.5 & 6. +http://homepage.ntlworld.com/bobosola. Updated 18-Jan-2006. + +Use in with DEFER keyword wrapped in conditional comments: + + +*/ + +var arVersion = navigator.appVersion.split("MSIE") +var version = parseFloat(arVersion[1]) + +if ((version >= 5.5) && (document.body.filters)) +{ + for(var i=0; i
    " + img.outerHTML = strNewHTML + i = i-1 + } + } +} diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/links.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/IRI-Theme/links.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,13 @@ + + +
    +

    Links:

    +
      + +
    +
    + diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/page-wide.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/IRI-Theme/page-wide.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,21 @@ + + +
    + +
    +

    +
    + Read the rest of this page »

    '); ?> + '

    Pages: ', 'after' => '

    ', 'next_or_number' => 'number')); ?> +
    +
    + + [ ', ' ]

    '); ?> +
    +
    + + \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/page.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/IRI-Theme/page.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,21 @@ + +
    +
    + +
    +

    +
    + Read the rest of this page »

    '); ?> + '

    Pages: ', 'after' => '

    ', 'next_or_number' => 'number')); ?> +
    +
    + + [ ', ' ]

    '); ?> +
    +
    +
    + +
    +
    + + \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/post.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/IRI-Theme/post.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,22 @@ + +
    +

    +

    +  |  + + comment_count > 0) { + echo '  |  '; + comments_popup_link('', '1 Comment', '% Comments'); + } + + edit_post_link('Edit', '  |  ', ''); + ?> +

    +
    + +
    +
    diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/screenshot.png Binary file web/wp-content/themes/IRI-Theme/screenshot.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/search.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/IRI-Theme/search.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,57 @@ + +
    +
    + +

    + + + + + + + +
    + +
    +

    + +

    +  |  + + Published in + comment_count > 0) { + echo '  |  '; + comments_popup_link('', '1 Comment', '% Comments'); + } + ?> +

    + +
    + +
    + + + +

    + + +
    +
    +
    + +
    +
    + + \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/searchform.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/IRI-Theme/searchform.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,29 @@ + + +
    +
    +
    + + +
    +
    +
    \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/sidebar.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/IRI-Theme/sidebar.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,12 @@ +
    + + +
    +
    + + +
    +
    + + +
    diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/sidebar_home.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/IRI-Theme/sidebar_home.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,2 @@ + + diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/sidebar_single.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/IRI-Theme/sidebar_single.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,2 @@ + + diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/sidebar_single_home.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/IRI-Theme/sidebar_single_home.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,2 @@ + + diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/single.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/IRI-Theme/single.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,50 @@ + +
    +
    + + +
    +

    +

    +  |  + + + comment_count > 0) { + echo '  |  '; + if($post->comment_count > 1) { + echo '' . $post->comment_count . ' Comments'; + } else { + echo '1 Comment'; + } + } + edit_post_link('Edit', '  |  ', ''); + ?> +

    + +
    + Read the rest of this entry »

    '); ?> + '

    Pages: ', 'after' => '

    ', 'next_or_number' => 'number')); ?> + +
    +
    + + +

    + + + '; if( function_exists('ADDTOANY_SHARE_SAVE_ICONS') ) ADDTOANY_SHARE_SAVE_ICONS( array("html_wrap_open" => "
  • ", "html_wrap_close" => "
  • ") ); if( function_exists('ADDTOANY_SHARE_SAVE_BUTTON') ) ADDTOANY_SHARE_SAVE_BUTTON( array("html_wrap_open" => "
  • ", "html_wrap_close" => "
  • ") ); echo ''; ?> + +
    +
    +
    + +
    +
    + + \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/style.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/IRI-Theme/style.css Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,717 @@ +/* +Theme Name: test IRI sam +Theme URI: http://www.cybunk.com/ +Description: A Wordpress magazine theme adaptation for IRI +Version: 0.1 +Author: cybunk +Author URI: http://www.cybunk.com/ +Credits: http://code.google.com/p/blueprintcss/ +*/ + +/* IMPORTANT - PLEASE READ +This theme uses the Blueprint CSS framework for +default positioning, typography, form styling, etc. +The styles below are specific for this theme +only. Feel free to edit them as necessary. Generally +speaking, you will will likely never need to edit +the Blueprint CSS stylesheets, which are located in: +wp-content/themes/name-of-this-theme/css/ + +*/ + +body +{ + margin-bottom: 0; + margin-top: 10px; + /*background: url('images/gridline.gif') top repeat-x;*/ +} +#outside { background: url('images/get.png') top left no-repeat; } +blockquote +{ + font-style: normal; + padding: 0 0 0 0; + color: #000; + background: url('images/quote.png') .5em top no-repeat; +} +h1 a, h2 a, h3 a, h4 a, h5 a, h6 a { color: #000; } +a +{ + color: #2C80AF; + text-decoration: none; +} +a:active, h2 a:active, h3 a:active +{ + color: #5fbcde; + text-decoration: none; +} +a:hover, h2 a:hover, h3 a:hover +{ + color: #3466fe; + text-decoration: none; +} +a:visited +{ + color: #5fbcde; + text-decoration: none; +} +h2 a:visited, h3 a:hover +{ + color: #3466fe; + text-decoration: none; +} +blockquote p { padding: 0 20px 0 30px; } +hr +{ + background: #CCC; + height: 1px; +} +img { margin: 0; } +.photo_align_left +{ + float: left; + padding: 0 1.5em 1.5em 0; +} +a.button { float: left; } +/* Fix for buttons */ +input +{ + padding-left: 0; + border: 1px solid #CCCCCC; +} +ol { margin-left: 35px; } +label { font-weight: normal; } +textarea +{ + height: 200px; + width: 500px; +} +.small { font-size: .9em; } +.nomargin { margin: 0; } +a.button, button { font-weight: normal; } +dl.small dd { font-size: .9em; } +span.meta_align_right +{ + color: #ccc; + font-size: .6em; + float: right; +} +span.meta_align_right a { color: #ccc; } +span.meta_align_right a:hover { color: #000; } +.meta +{ + color: #ccc; + font-size: .8em; + line-height: 1.875em; + font-family: Georgia; +} +.meta a { color: #ccc; } +.meta a:hover { color: #000; } +.byline +{ + color: #ccc; + font-size: .8em; + line-height: 1.875em; +} +.byline a +{ + color: #FF3706; + text-decoration: none; + line-height: 1.875em; +} +.byline a:hover { color: #000; } +.five_posts h6 a, .five_posts h4 a, .five_posts h3 a +{ + text-decoration: none; + margin-bottom: 0; +} +.advanced-recent-posts{ + +} +#maincontent h2 +{ + color: #2C8084; + border-bottom: 1px dotted #AAA; + margin-bottom: 15px; +} +h2 a +{ + color: #2C8084; + text-decoration: none; +} +#maincontent .post h2 { margin-bottom: 5px; } +#maincontent .contentHome{ padding: 25px 30px 20px 48px; } +#maincontent .content { padding: 0px 30px 20px 48px; } +#feature h3 +{ + margin-bottom: 0; + padding: 0; +} +#feature p img { margin: 7px 0 2em 0; } +.feature_text { margin-top: 2em; } +#home_right { padding: 0; } +#home_right .entry { padding: 0 0 2em 0; } +.author +{ + padding: 1.5em; + margin-bottom: 1.5em; + background: #eee; +} +.author img +{ + float: left; + padding: 0 1em 1em 0; +} +.author p { margin-left: 8em; } +.author h6 +{ + margin-left: 7em; + border-bottom: 1px #000 dotted; +} +.navigation, +.navigation a { color: #AAA; width:100%; } +.alignright { float: right; } +.alignleft { float: left; } +.post { margin-bottom: 10px; } +.entry { padding-bottom: 15px; } +/* HEADER */ +#header +{ + height: 67px; + width: 950px; + padding: 0px 0 10px 0; +} +#header h1, #header .description +{ + padding: 0; + margin: 0; + line-height: 1em; +} +/* NAVIGATION IN POSTS */ +.entry #nav .content +{ + padding: 0; + margin: auto; +} +.entry #nav +{ + margin-bottom: 15px; + background: #FFF; +} +.entry #nav li a +{ + color: #FFF; + border-right: 1px solid #AAA; + background: #666; +} +.entry #nav li.last a { border-right: none; } +.entry #nav li a:hover +{ + background: #333; + color: #FFF; +} + + +/* + ?????????????????????????????? + SEARCH +*/ +#search { float: left; } +#search #s +{ + background: transparent url('images/icons/search_grey.gif') 0px center no-repeat; + padding: 2px 0 2px 17px; + background-color:#FFF; + width: 135px; + color: #CCCCCC; + font-size: 0.9em; + margin-right: 0px; + margin-top: 10px; +} +#search #s:hover { + color: #000; + border: 1px solid #000; +} + + +#searchB { float: left; } +#searchB #s +{ + background: transparent url('images/icons/search_grey.png') 0px center no-repeat; + background-color:#333333; + padding: 2px 0 2px 17px; + width: 135px; + color: #FFF; + font-size: 0.8em; + border: 1px solid #151515; + margin-top: 3px; + /*For IE*/ + +} +#searchB #s:hover { + color: #000; + border: 1px solid #333333; + background-color:#b8b8b8; +} + +.search-excerpt { margin: 0; } +/* COMMENTS */ +.commentlist li { padding: 8px 15px; } +.comments-alt { background: #EEE; } +/* LISTS */ +.bottombar { } +.bottombar h2 +{ + font-size: 1em; + font-weight: bold; + line-height: 1em; + margin: 1em 0 1em; + z-index:-1; +} +ul +{ + list-style-type: none; + margin-left: 1em; + padding: 0; +} +ul li +{ + list-style-image: url('images/icons/li.png'); + background-repeat: no-repeat; + border-top: 1px dotted #e5e5e5; + line-height: 2em; + margin: 0 0 0 1em; + padding: 0; +} +ul li a { color: #666; } +/* COMMENT STYLES */ +#comments { width: 100%; } +dl#comment_list { margin: 0 0 0 0; } +dl#comment_list dt +{ + padding: 0 0 33px 0; + background: url('images/comment_top.gif') 0 100% no-repeat; + font-size: 1.1em; + line-height: 1.8182em; + color: #999; +} +dl#comment_list dt.author { background: url('images/comment_author_top.gif') 0 100% no-repeat; } +dl#comment_list dt .comment_num { padding: 0 0.3636em 0 0; } +dl#comment_list dt .comment_num a, dl#comment_list dt .comment_num a:visited { color: #999; } +dl#comment_list dt .comment_num a:hover { color: #a90000; } +dl#comment_list dt strong +{ + font-size: 1.4545em; + color: #000; +} +dl#comment_list dt strong a, dl#comment_list dt strong a:visited +{ + color: #000; + border-bottom: 1px dotted #999; +} +dl#comment_list dt strong a:hover +{ + color: #000; + border-bottom: 1px solid #a90000; +} +dl#comment_list dd +{ + padding: 20px; + margin: 0 0 1.5385em; + background: #dfdfdf; +} +dl#comment_list dd.author { background: #0099cc url('images/comment_author_bottom.gif') 0 100% no-repeat; } +dl#comment_list dd.entry p, dl#comment_list dd.entry ul, dl#comment_list dd.entry ol, dl#comment_list dd.entry blockquote { margin-bottom: 1.1538em; } +/* COMMENT FORM */ +#comment_form +{ + width: 46.8em; + margin: 0 0 4.0em 0; +} +#comment_form a:hover { text-decoration: underline; } +#comment_form p { padding: 0.7692em 0; } +#comment_form label +{ + padding: 0 0 0 0.83333em; + font-size: 1.2em; +} +#comment_form .text_input +{ + width: 15.3846em; + padding: 0.23077em; + color: #a90000; + font: bold 1.3em Verdana, sans-serif; + border-top: 0.15385em solid #999; + border-left: 0.15385em solid #999; + border-right: 0.07692em solid #eee; + border-bottom: 0.07692em solid #eee; +} +#comment_form .text_input:focus +{ + border-top-color: #666; + border-left-color: #666; + border-right-color: #ddd; + border-bottom-color: #ddd; +} +#comment_form .text_area { width: 32.9231em; } +#comment_form p.subscribe-to-comments { font-size: 1.3em; } +#comment_form p.subscribe-to-comments label { font-size: 1.0em; } +#comment_form .form_submit +{ + padding: 0.5em; + background: url('images/submit_bg.gif') repeat-x; + color: #000; + border: 0.21429em double #999; + border-top-color: #ccc; + border-left-color: #ccc; + font: bold 1.4em/1.0em "Helvetica Neue", Helvetica, Arial, sans-serif; + cursor: pointer; +} +#comment_form .form_submit:hover { color: #0099cc; } +/* Root = Horizontal, Secondary = Vertical */ +#navmenu-h { background: #000; } +#navmenu-h li.alignright { float: right; } +ul#navmenu-h +{ + margin: 0 0 1em 0; + border: 0 none; + padding: 0; + width: 950px; + /*For KHTML*/ + list-style: none; + height: 26px; +} +ul#navmenu-h li +{ + margin: 0; + border: 0 none; + padding: 0; + float: left; + /*For Gecko*/ + display: inline; + list-style: none; + position: relative; + height: 26px; +} +ul#navmenu-h ul +{ + margin: 0; + border: 0 none; + padding: 0; + width: 160px; + list-style: none; + display: none; + position: absolute; + top: 26px; + left: 0; +} +ul#navmenu-h ul:after /*From IE 7 lack of compliance*/ +{ + clear: both; + display: block; + font: 1px/0px serif; + content: "."; + height: 0; + visibility: hidden; +} +ul#navmenu-h ul li +{ + width: 160px; + float: left; + /*For IE 7 lack of compliance*/ + display: block !important; + /*For IE*/ + z-index:5; + +} +/* Root Menu */ +ul#navmenu-h a +{ + padding: 1px 20px 3px 20px; + float: none !important; + /*For Opera*/ + /*For IE*/ + display: block; + background: #000; + color: #ccc; + font: 13px/22px Helvetica; + text-decoration: none; + height: auto !important; + /*For IE*/ +} +/* Root Menu Hover Persistence */ +ul#navmenu-h a:hover, +ul#navmenu-h li:hover a, +ul#navmenu-h li.iehover a +{ + background: #333; + color: #FFF; +} +/* 2nd Menu */ +ul#navmenu-h li:hover li a, +ul#navmenu-h li.iehover li a +{ + float: none; + background: #000; + color: #ccc; + width: 260px; +} +/* 2nd Menu Hover Persistence */ +ul#navmenu-h li:hover li a:hover, +ul#navmenu-h li:hover li:hover a, +ul#navmenu-h li.iehover li a:hover, +ul#navmenu-h li.iehover li.iehover a +{ + background: #333; + color: #FFF; +} +/* 3rd Menu */ +ul#navmenu-h li:hover li:hover li a, +ul#navmenu-h li.iehover li.iehover li a +{ + background: #000; + color: #ccc; +} +/* 3rd Menu Hover Persistence */ +ul#navmenu-h li:hover li:hover li a:hover, +ul#navmenu-h li:hover li:hover li:hover a, +ul#navmenu-h li.iehover li.iehover li a:hover, +ul#navmenu-h li.iehover li.iehover li.iehover a +{ + background: #CCC; + color: #FFF; +} +/* 4th Menu */ +ul#navmenu-h li:hover li:hover li:hover li a, +ul#navmenu-h li.iehover li.iehover li.iehover li a +{ + background: #EEE; + color: #666; +} +/* 4th Menu Hover */ +ul#navmenu-h li:hover li:hover li:hover li a:hover, +ul#navmenu-h li.iehover li.iehover li.iehover li a:hover +{ + background: #CCC; + color: #FFF; +} +ul#navmenu-h ul ul, +ul#navmenu-h ul ul ul +{ + display: none; + position: absolute; + top: 0; + left: 160px; +} +/* Do Not Move - Must Come Before display:block for Gecko */ +ul#navmenu-h li:hover ul ul, +ul#navmenu-h li:hover ul ul ul, +ul#navmenu-h li.iehover ul ul, +ul#navmenu-h li.iehover ul ul ul { display: none; } +ul#navmenu-h li:hover ul, +ul#navmenu-h ul li:hover ul, +ul#navmenu-h ul ul li:hover ul, +ul#navmenu-h li.iehover ul, +ul#navmenu-h ul li.iehover ul, +ul#navmenu-h ul ul li.iehover ul { display: block; } + +#themes h6 +{ + float: right; + padding-right: 1em; +} +ul#themeswitcher +{ + list-style-type: none; + margin: 0; + padding: 0; + float: right; +} +ul#themeswitcher li +{ + list-style-image: none; + list-style-type: none; + margin: 0; + padding: 0; +} + +/* FOOTER */ +#footer +{ + text-align: center; + font-size: .9em; + margin: 0; + width:950px; +} +#footer a { text-decoration: none; } + +ul#footer +{ + text-align: center; + margin: 0 0 1em 0; + border: 0 none; + padding: 0; + width: 950px; + /*For KHTML*/ + list-style: none; + height: 15px; +} +ul#footer li +{ + margin: 0; + border: 0 none; + padding: 0; + float: right; + /*For Gecko*/ + display: :inline-block; + list-style: none; + position: relative; + border-right:solid 1px #CCC; + text-align: center; +} + +ul#footer ul +{ + margin: 0; + border: 0 none; + padding: 0; + width: 160px; + list-style-type: none; + position: absolute; + top: 24px; + left: 0; + text-align: center; +} +ul#footer ul:after /*From IE 7 lack of compliance*/ +{ + clear: both; + display: block; + font: 1px/0px serif; + content: "."; + height: 0; + visibility: hidden; +} +ul#footer ul li +{ + width: 160px; + float: left; + /*For IE 7 lack of compliance*/ + display: inline !important; + /*For IE*/ +} +/* Root Menu */ +ul#footer a +{ + padding: 0px 20px 0 20px; + float: none !important; + /*For Opera*/ + /*For IE*/ + display: block; + color: #000; + font: 11px/22px Helvetica; + text-decoration: none; + height: auto !important; + /*For IE*/ +} +/* Root Menu Hover Persistence */ +ul#footer a:hover, +ul#footer li:hover a, +ul#footer li.iehover a +{ + color: #CCC; +} + +/* Partenaires */ +#partenaire +{ + text-align: center; + font-size: .9em; + margin: 0; + width:950px; +} +#partenaire a { text-decoration: none; } + +ul#partenaire +{ + text-align: center; + margin: 0 0 1em 0; + border: 0 none; + padding: 0; + width: 950px; + /*For KHTML*/ + list-style: none; + height: 15px; +} +ul#partenaire li +{ + margin: 0 0 10px 0; + border: 0 none; + padding: 0; + float: left; + /*For Gecko*/ + list-style: none; + position: relative; + border-right:solid 1px #CCC; + text-align: center; +} + +ul#partenaire ul +{ + display: :table; + width: 100%; + table-layout: fixed; + margin: 0; + border: 0 none; + padding: 0; + width: 160px; + list-style-type: none; + position: absolute; + top: 24px; + left: 0; + text-align: center; +} +ul#partenaire ul:after /*From IE 7 lack of compliance*/ +{ + clear: both; + display: block; + font: 1px/0px serif; + content: "."; + height: 0; + visibility: hidden; +} +ul#partenaire ul li +{ + width: 160px; + float: left; + /*For IE 7 lack of compliance*/ + display: inline !important; + /*For IE*/ +} +/* Root Menu */ +ul#partenaire a +{ + padding: 0px 18px 0 18px; + float: none !important; + /*For Opera*/ + /*For IE*/ + display: block; + color: #000; + font: 11px/22px Helvetica; + text-decoration: none; + height: auto !important; + /*For IE*/ +} +/* Root Menu Hover Persistence */ +ul#partenaire a:hover, +ul#partenaire li:hover a, +ul#partenaire li.iehover a +{ + color: #CCC; +} +.cleaner { + clear:both; +} + +/*****Accordion Styles*****/ +ul#accordion, ul#accordion ul { list-style: none; } + + diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/IRI-Theme/styleB.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/IRI-Theme/styleB.css Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,508 @@ +/* +Theme Name: test IRI sam +Theme URI: http://www.cybunk.com/ +Description: A Wordpress magazine theme adaptation for IRI +Version: 0.1 +Author: cybunk adaptation Thad Allender for Graph Paper Press +Author URI: http://www.cybunk.com/ +Credits: http://code.google.com/p/blueprintcss/ +*/ + +/* IMPORTANT - PLEASE READ +This theme uses the Blueprint CSS framework for +default positioning, typography, form styling, etc. +The styles below are specific for this theme +only. Feel free to edit them as necessary. Generally +speaking, you will will likely never need to edit +the Blueprint CSS stylesheets, which are located in: +wp-content/themes/name-of-this-theme/css/ + + 3B4a25 -> 2b63FF + 2C80AF bleu clair + 61bc61 vert clair + +*/ + +body +{ + margin-bottom: 0; + margin-top: 10px; + /*background: url('images/gridline.gif') top repeat-x;*/ +} +#outside { background: url('images/get.png') top left no-repeat; } +blockquote +{ + font-style: normal; + padding: 0 0 0 0; + color: #000; + background: url('images/quote.png') .5em top no-repeat; +} +h1 a, h2 a, h3 a, h4 a, h5 a, h6 a { color: #000; } +a +{ + color: #2C80AF; + text-decoration: none; +} +a:active, h2 a:active, h3 a:active +{ + color: #61bc61; + text-decoration: none; +} +a:hover, h2 a:hover, h3 a:hover +{ + color: #61bc61; + text-decoration: none; +} +a:visited +{ + color: #61bc61; + text-decoration: none; +} +h2 a:visited, h3 a:hover +{ + color: #2C80AF; + text-decoration: none; +} +blockquote p { padding: 0 20px 0 30px; } +hr +{ + background: #CCC; + height: 1px; +} +img { margin: 0; } +.photo_align_left +{ + float: left; + padding: 0 1.5em 1.5em 0; +} +a.button { float: left; } +/* Fix for buttons */ +input +{ + padding-left: 0; + border: 1px solid #CCCCCC; +} +ol { margin-left: 35px; } +label { font-weight: normal; } +textarea +{ + height: 200px; + width: 500px; +} +.small { font-size: .9em; } +.nomargin { margin: 0; } +a.button, button { font-weight: normal; } +dl.small dd { font-size: .9em; } +span.meta_align_right +{ + color: #ccc; + font-size: .6em; + float: right; +} +span.meta_align_right a { color: #ccc; } +span.meta_align_right a:hover { color: #000; } +.meta +{ + color: #ccc; + font-size: .8em; + line-height: 1.875em; + font-family: Georgia; +} +.meta a { color: #ccc; } +.meta a:hover { color: #000; } +.byline +{ + color: #ccc; + font-size: .8em; + line-height: 1.875em; +} +.byline a +{ + color: #FF3706; + text-decoration: none; + line-height: 1.875em; +} +.byline a:hover { color: #000; } +.five_posts h6 a, .five_posts h4 a, .five_posts h3 a +{ + text-decoration: none; + margin-bottom: 0; +} +#maincontent h2 +{ + color: #2C8084; + border-bottom: 1px dotted #AAA; + margin-bottom: 15px; +} +h2 a +{ + color: #2C8084; + text-decoration: none; +} +#maincontent .post h2 { margin-bottom: 5px; } +#maincontent .content { padding: 25px 30px 20px 48px; } +#feature h3 +{ + margin-bottom: 0; + padding: 0; +} +#feature p img { margin: 7px 0 2em 0; } +.feature_text { margin-top: 2em; } +#home_right { padding: 0; } +#home_right .entry { padding: 0 0 2em 0; } +.author +{ + padding: 1.5em; + margin-bottom: 1.5em; + background: #eee; +} +.author img +{ + float: left; + padding: 0 1em 1em 0; +} +.author p { margin-left: 8em; } +.author h6 +{ + margin-left: 7em; + border-bottom: 1px #000 dotted; +} +.navigation, +.navigation a { color: #AAA; } +.alignright { float: right; } +.alignleft { float: left; } +.post { margin-bottom: 10px; } +.entry { padding-bottom: 15px; } +/* HEADER */ +#header +{ + height: 67px; + width: 950px; + padding: 0px 0 4px 0; +} +#header h1, #header .description +{ + padding: 0; + margin: 0; + line-height: 1em; +} +/* NAVIGATION IN POSTS */ +.entry #nav .content +{ + padding: 0; + margin: auto; +} +.entry #nav +{ + margin-bottom: 15px; + background: #FFF; +} +.entry #nav li a +{ + color: #FFF; + border-right: 1px solid #AAA; + background: #666; +} +.entry #nav li.last a { border-right: none; } +.entry #nav li a:hover +{ + background: #333; + color: #FFF; +} +/* FOOTER */ +#footer +{ + text-align: center; + font-size: .9em; + margin: 0; +} +#footer a { text-decoration: none; } +/* SEARCH */ +#search { float: right; } +#search #s +{ + background: transparent url('images/icons/search_grey.gif') 0px center no-repeat; + padding: 2px 0 2px 17px; + width: 135px; + color: #CCCCCC; + font-size: 0.9em; + margin-right: 0px; + margin-top: 10px; +} +#search #s:hover { color: #000; } +.search-excerpt { margin: 0; } +/* COMMENTS */ +.commentlist li { padding: 8px 15px; } +.comments-alt { background: #EEE; } +/* LISTS */ +.bottombar { } +.bottombar h2 +{ + font-size: 1em; + font-weight: bold; + line-height: 1em; + margin: 1em 0 1em; +} +ul +{ + list-style-type: none; + margin-left: 1em; + padding: 0; +} +ul li +{ + list-style-image: url('images/icons/li.png'); + background-repeat: no-repeat; + border-top: 1px dotted #e5e5e5; + line-height: 2em; + margin: 0 0 0 1em; + padding: 0; +} +ul li a { color: #666; } +/* COMMENT STYLES */ +#comments { width: 100%; } +dl#comment_list { margin: 0 0 0 0; } +dl#comment_list dt +{ + padding: 0 0 33px 0; + background: url('images/comment_top.gif') 0 100% no-repeat; + font-size: 1.1em; + line-height: 1.8182em; + color: #999; +} +dl#comment_list dt.author { background: url('images/comment_author_top.gif') 0 100% no-repeat; } +dl#comment_list dt .comment_num { padding: 0 0.3636em 0 0; } +dl#comment_list dt .comment_num a, dl#comment_list dt .comment_num a:visited { color: #999; } +dl#comment_list dt .comment_num a:hover { color: #a90000; } +dl#comment_list dt strong +{ + font-size: 1.4545em; + color: #000; +} +dl#comment_list dt strong a, dl#comment_list dt strong a:visited +{ + color: #000; + border-bottom: 1px dotted #999; +} +dl#comment_list dt strong a:hover +{ + color: #000; + border-bottom: 1px solid #a90000; +} +dl#comment_list dd +{ + padding: 20px; + margin: 0 0 1.5385em; + background: #dfdfdf; +} +dl#comment_list dd.author { background: #0099cc url('images/comment_author_bottom.gif') 0 100% no-repeat; } +dl#comment_list dd.entry p, dl#comment_list dd.entry ul, dl#comment_list dd.entry ol, dl#comment_list dd.entry blockquote { margin-bottom: 1.1538em; } +/* COMMENT FORM */ +#comment_form +{ + width: 46.8em; + margin: 0 0 4.0em 0; +} +#comment_form a:hover { text-decoration: underline; } +#comment_form p { padding: 0.7692em 0; } +#comment_form label +{ + padding: 0 0 0 0.83333em; + font-size: 1.2em; +} +#comment_form .text_input +{ + width: 15.3846em; + padding: 0.23077em; + color: #a90000; + font: bold 1.3em Verdana, sans-serif; + border-top: 0.15385em solid #999; + border-left: 0.15385em solid #999; + border-right: 0.07692em solid #eee; + border-bottom: 0.07692em solid #eee; +} +#comment_form .text_input:focus +{ + border-top-color: #666; + border-left-color: #666; + border-right-color: #ddd; + border-bottom-color: #ddd; +} +#comment_form .text_area { width: 32.9231em; } +#comment_form p.subscribe-to-comments { font-size: 1.3em; } +#comment_form p.subscribe-to-comments label { font-size: 1.0em; } +#comment_form .form_submit +{ + padding: 0.5em; + background: url('images/submit_bg.gif') repeat-x; + color: #000; + border: 0.21429em double #999; + border-top-color: #ccc; + border-left-color: #ccc; + font: bold 1.4em/1.0em "Helvetica Neue", Helvetica, Arial, sans-serif; + cursor: pointer; +} +#comment_form .form_submit:hover { color: #0099cc; } +/* Root = Horizontal, Secondary = Vertical */ +#navmenu-h { background: #000; } +#navmenu-h li.alignright { float: right; } +ul#navmenu-h +{ + margin: 0 0 1em 0; + border: 0 none; + padding: 0; + width: 950px; + /*For KHTML*/ + list-style: none; + height: 37px; +} +ul#navmenu-h li +{ + margin: 0; + border: 0 none; + padding: 0; + float: left; + /*For Gecko*/ + display: inline; + list-style: none; + position: relative; + height: 37px; +} +ul#navmenu-h ul +{ + margin: 0; + border: 0 none; + padding: 0; + width: 160px; + list-style: none; + display: none; + position: absolute; + top: 37px; + left: 0; +} +ul#navmenu-h ul:after /*From IE 7 lack of compliance*/ +{ + clear: both; + display: block; + font: 1px/0px serif; + content: "."; + height: 0; + visibility: hidden; +} +ul#navmenu-h ul li +{ + width: 160px; + float: left; + /*For IE 7 lack of compliance*/ + display: block !important; + /*For IE*/ +} +/* Root Menu */ +ul#navmenu-h a +{ + border-right: 1px solid #fff; + padding: 8px 20px 7px 20px; + float: none !important; + /*For Opera*/ + /*For IE*/ + display: block; + background: #000; + color: #ccc; + font: 12px/22px Helvetica; + text-decoration: none; + height: auto !important; + /*For IE*/ +} +/* Root Menu Hover Persistence */ +ul#navmenu-h a:hover, +ul#navmenu-h li:hover a, +ul#navmenu-h li.iehover a +{ + background: #333; + color: #FFF; +} +/* 2nd Menu */ +ul#navmenu-h li:hover li a, +ul#navmenu-h li.iehover li a +{ + float: none; + background: #000; + color: #ccc; +} +/* 2nd Menu Hover Persistence */ +ul#navmenu-h li:hover li a:hover, +ul#navmenu-h li:hover li:hover a, +ul#navmenu-h li.iehover li a:hover, +ul#navmenu-h li.iehover li.iehover a +{ + background: #333; + color: #FFF; +} +/* 3rd Menu */ +ul#navmenu-h li:hover li:hover li a, +ul#navmenu-h li.iehover li.iehover li a +{ + background: #000; + color: #ccc; +} +/* 3rd Menu Hover Persistence */ +ul#navmenu-h li:hover li:hover li a:hover, +ul#navmenu-h li:hover li:hover li:hover a, +ul#navmenu-h li.iehover li.iehover li a:hover, +ul#navmenu-h li.iehover li.iehover li.iehover a +{ + background: #CCC; + color: #FFF; +} +/* 4th Menu */ +ul#navmenu-h li:hover li:hover li:hover li a, +ul#navmenu-h li.iehover li.iehover li.iehover li a +{ + background: #EEE; + color: #666; +} +/* 4th Menu Hover */ +ul#navmenu-h li:hover li:hover li:hover li a:hover, +ul#navmenu-h li.iehover li.iehover li.iehover li a:hover +{ + background: #CCC; + color: #FFF; +} +ul#navmenu-h ul ul, +ul#navmenu-h ul ul ul +{ + display: none; + position: absolute; + top: 0; + left: 160px; +} +/* Do Not Move - Must Come Before display:block for Gecko */ +ul#navmenu-h li:hover ul ul, +ul#navmenu-h li:hover ul ul ul, +ul#navmenu-h li.iehover ul ul, +ul#navmenu-h li.iehover ul ul ul { display: none; } +ul#navmenu-h li:hover ul, +ul#navmenu-h ul li:hover ul, +ul#navmenu-h ul ul li:hover ul, +ul#navmenu-h li.iehover ul, +ul#navmenu-h ul li.iehover ul, +ul#navmenu-h ul ul li.iehover ul { display: block; } +#themes h6 +{ + float: right; + padding-right: 1em; +} +ul#themeswitcher +{ + list-style-type: none; + margin: 0; + padding: 0; + float: right; +} +ul#themeswitcher li +{ + list-style-image: none; + list-style-type: none; + margin: 0; + padding: 0; +} diff -r 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,17 @@ + '
  • ', + 'after_widget' => '
  • ', + 'before_title' => '', + 'after_title' => '', + )); + +?> diff -r 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,30 @@ + + +> + + + + + <?php wp_title('«', true, 'right'); ?> <?php bloginfo('name'); ?> + + + + + + + + + +> +
    +

    + +
    + diff -r 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,36 @@ + + + + +',''); ?> + +
    id="post-"> +

    +
    @
    + +
    + +
    + + + +
    + + + + +

    + + + + + diff -r 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 web/wp-content/themes/classic/screenshot.png Binary file web/wp-content/themes/classic/screenshot.png has changed diff -r 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,47 @@ + + + + diff -r 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,18 @@ + + +
    + +

    + +
    + + + + diff -r 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,75 @@ + + +
    + + + + + +

    + +

    + +

    + +

    + +

    + +

    + +

    + + + + + + +
    > +

    + + +
    + +
    + + + +
    + + + + + ".__("Sorry, but there aren't any posts in the %s category yet.", 'kubrick').'', 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.", 'kubrick').'

    '); + } 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.", 'kubrick')."

    ", $userdata->display_name); + } else { + echo("

    ".__('No posts found.', 'kubrick').'

    '); + } + get_search_form(); + endif; +?> +
    + + + + diff -r 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,29 @@ + + + + +
    + + + +

    +
      + +
    + +

    +
      + +
    + +
    + + diff -r 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,124 @@ + + + + <?php printf(__('%1$s - Comments on %2$s', 'kubrick'), get_option('blogname'), the_title('','',false)); ?> + + + + + + + +

    + + +

    + +

    RSS feed for comments on this post.', 'kubrick'); ?>

    + + +

    URL to TrackBack this entry is: %s', 'kubrick'), get_trackback_url()); ?>

    + + + + + +
      + +
    1. + +

      %4$s', 'kubrick'), get_comment_author_link(), get_comment_date(), get_comment_ID(), get_comment_time()); ?>

      +
    2. + + +
    + +

    + + + +

    +

    HTML allowed: %s', 'kubrick'), allowed_tags()); ?>

    + +
    + +

    %2$s. Log out »', 'kubrick'), get_option('siteurl') . '/wp-admin/profile.php', $user_identity, wp_logout_url()); ?>

    + +

    + + +

    + +

    + + +

    + +

    + + +

    + + +

    + +
    + +

    + +

    + + " /> + +

    + ID); ?> +
    + +

    + + +
    + + +

    + + + +

    WordPress', 'kubrick'), 'http://wordpress.org/'); ?>

    + + + + diff -r 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,96 @@ + +

    + + + + + +

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

    + + + + + + + +
    + +

    + +
    + +
    + + +

    logged in to post a comment.', 'kubrick'), wp_login_url( get_permalink() )); ?>

    + + +
    + + + +

    %2$s.', 'kubrick'), get_option('siteurl') . '/wp-admin/profile.php', $user_identity); ?>

    + + + +

    /> +

    + +

    /> +

    + +

    +

    + + + + + +

    + +

    + +

    +ID); ?> + +
    + + +
    + + diff -r 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,25 @@ + + +
    + +
    + + + + + + + diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/default/fr_FR.mo Binary file web/wp-content/themes/default/fr_FR.mo has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/default/fr_FR.po --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/default/fr_FR.po Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,647 @@ +# kubrick theme pot file. +# Copyright (C) 2008 WordPress +# This file is distributed under the same license as the kubrick theme package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: 1.6\n" +"Report-Msgid-Bugs-To: http://wordpress.org/tag/theme\n" +"POT-Creation-Date: 2009-05-18 17:54+0300\n" +"PO-Revision-Date: 2009-06-11 09:38+0100\n" +"Last-Translator: Amaury BALMER \n" +"Language-Team: French (France) \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" + +#: 404.php:12 +msgid "Error 404 - Not Found" +msgstr "Erreur 404 - Aucun fichier trouvé" + +#: archive.php:16 +#, php-format +msgid "Archive for the ‘%s’ Category" +msgstr "Archive pour la catégorie ‘%s’" + +#: archive.php:18 +#, php-format +msgid "Posts Tagged ‘%s’" +msgstr "Articles avec le tag ‘%s’" + +#: archive.php:20 +#, php-format +msgid "Archive for %s|Daily archive page" +msgstr "Archive pour le %s" + +#: archive.php:20 +#: index.php:17 +msgid "F jS, Y" +msgstr "j F Y" + +#: archive.php:22 +#, php-format +msgid "Archive for %s|Monthly archive page" +msgstr "Archive pour %s" + +#: archive.php:22 +#: sidebar.php:33 +msgid "F, Y" +msgstr "F Y" + +#: archive.php:24 +#, php-format +msgid "Archive for %s|Yearly archive page" +msgstr "Archive pour %s" + +#: archive.php:24 +msgid "Y" +msgstr "Y" + +#: archive.php:26 +msgid "Author Archive" +msgstr "Archives d’un auteur" + +#: archive.php:28 +msgid "Blog Archives" +msgstr "Archives du blog" + +#: archive.php:33 +#: archive.php:53 +#: index.php:29 +#: search.php:16 +#: search.php:33 +msgid "« Older Entries" +msgstr "« Entrées plus anciennes" + +#: archive.php:34 +#: archive.php:54 +#: index.php:30 +#: search.php:17 +#: search.php:34 +msgid "Newer Entries »" +msgstr "Entrée plus récentes »" + +#: archive.php:39 +#: index.php:16 +#: search.php:24 +#, php-format +msgid "Permanent Link to %s" +msgstr "Lien permanent vers %s" + +#: archive.php:40 +#: sidebar.php:30 +#: single.php:34 +msgid "l, F jS, Y" +msgstr "l j F Y" + +#: archive.php:46 +#: index.php:23 +#: search.php:27 +#: single.php:26 +msgid "Tags:" +msgstr "Tags :" + +#: archive.php:46 +#: index.php:23 +#: search.php:27 +#, php-format +msgid "Posted in %s" +msgstr "Publié dans %s" + +#: archive.php:46 +#: index.php:23 +#: search.php:27 +msgid "Edit" +msgstr "Modifier" + +#: archive.php:46 +#: index.php:23 +#: search.php:27 +msgid "No Comments »" +msgstr "Aucun commentaire »" + +#: archive.php:46 +#: index.php:23 +#: search.php:27 +msgid "1 Comment »" +msgstr "1 commentaire »" + +#: archive.php:46 +#: index.php:23 +#: search.php:27 +msgid "% Comments »" +msgstr "% commentaires »" + +#: archive.php:46 +#: index.php:23 +#: search.php:27 +msgid "Comments Closed" +msgstr "Commentaires fermés" + +#: archive.php:59 +#, php-format +msgid "Sorry, but there aren't any posts in the %s category yet." +msgstr "Désolé, mais il n'y a pas encore d'article dans la catégorie %s." + +#: archive.php:61 +msgid "Sorry, but there aren't any posts with this date." +msgstr "Désolé, aucun article ne correspond à cette date." + +#: archive.php:64 +#, php-format +msgid "Sorry, but there aren't any posts by %s yet." +msgstr "Désolé, il n'y a pas encore d'article par %s." + +#: archive.php:66 +msgid "No posts found." +msgstr "Aucun article trouvé." + +#: archives.php:17 +msgid "Archives by Month:" +msgstr "Archives par mois :" + +#: archives.php:22 +msgid "Archives by Subject:" +msgstr "Archives par sujets :" + +#: comments-popup.php:9 +#, php-format +msgid "%1$s - Comments on %2$s" +msgstr "%1$s - Commentaires sur %2$s" + +#: comments-popup.php:28 +msgid "Comments" +msgstr "Commentaires" + +#: comments-popup.php:30 +msgid "RSS feed for comments on this post." +msgstr "Flux RSSpour les commentaires de cet article." + +#: comments-popup.php:33 +#, php-format +msgid "The URL to TrackBack this entry is: %s" +msgstr "L'URL pour faire un rétrolien vers cette entrée est : %s" + +#: comments-popup.php:51 +msgid "Comment" +msgstr "Commentaire" + +#: comments-popup.php:51 +msgid "Trackback" +msgstr "Rétrolien" + +#: comments-popup.php:51 +msgid "Pingback" +msgstr "Ping" + +#: comments-popup.php:51 +#, php-format +msgid "by %1$s — %2$s @ %4$s" +msgstr "par %1$s — %2$s à %4$s" + +#: comments-popup.php:57 +msgid "No comments yet." +msgstr "Aucune commentaire pour le moment." + +#: comments-popup.php:61 +msgid "Leave a comment" +msgstr "Laisser un commentaire" + +#: comments-popup.php:62 +#, php-format +msgid "Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: %s" +msgstr "Les retours à la ligne et les paragraphes sont gérés automatiquement, les adresses courriel ne sont jamais affichées, quelques balises HTML sont autorisées : %s" + +#: comments-popup.php:66 +#, php-format +msgid "Logged in as %2$s. Log out »" +msgstr "Connecté en tant que %2$s. Se déconnecter »" + +#: comments-popup.php:70 +#: comments.php:72 +msgid "Name" +msgstr "Nom" + +#: comments-popup.php:75 +msgid "E-mail" +msgstr "Courriel" + +#: comments-popup.php:80 +msgid "URL" +msgstr "URL" + +#: comments-popup.php:85 +msgid "Your Comment" +msgstr "Votre commentaire" + +#: comments-popup.php:93 +msgid "Say It!" +msgstr "Dites-le !" + +#: comments-popup.php:98 +msgid "Sorry, the comment form is closed at this time." +msgstr "Désolé, le formulaire de commentaire est fermé pour le moment." + +#: comments-popup.php:103 +msgid "Close this window." +msgstr "Fermer cette fenêtre." + +#: comments-popup.php:109 +#: single.php:65 +msgid "Sorry, no posts matched your criteria." +msgstr "Désolé, aucun article ne correspond à vos critères." + +#: comments-popup.php:113 +#, php-format +msgid "Powered by WordPress" +msgstr "Propulsé par WordPress" + +#: comments.php:12 +msgid "This post is password protected. Enter the password to view comments." +msgstr "Cet article est protégé par un mot de passe. Entrez-le pour lire le commentaires." + +#: comments.php:21 +msgid "No Responses" +msgstr "Aucune réponse" + +#: comments.php:21 +msgid "One Response" +msgstr "Une réponse" + +#: comments.php:21 +msgid "% Responses" +msgstr "% réponses" + +#: comments.php:21 +#, php-format +msgid "to “%s”" +msgstr "à “%s”" + +#: comments.php:43 +msgid "Comments are closed." +msgstr "Les commentaires sont fermés." + +#: comments.php:53 +msgid "Leave a Reply" +msgstr "Laisser un commentaire" + +#: comments.php:53 +#, php-format +msgid "Leave a Reply for %s" +msgstr "Laisser une réponse à %s" + +#: comments.php:60 +#, php-format +msgid "You must be logged in to post a comment." +msgstr "Vous devez être connecté pour publier un commentaire." + +#: comments.php:67 +#, php-format +msgid "Logged in as %2$s." +msgstr "Connecté en tant que %2$s." + +#: comments.php:67 +msgid "Log out of this account" +msgstr "Se déconnecter de ce compte." + +#: comments.php:67 +msgid "Log out »" +msgstr "Se déconnecter »" + +#: comments.php:72 +#: comments.php:75 +msgid "(required)" +msgstr "(obligatoire)" + +#: comments.php:75 +msgid "Mail (will not be published)" +msgstr "Courriel (ne sera pas publié)" + +#: comments.php:78 +msgid "Website" +msgstr "Site Web" + +#: comments.php:82 +#, php-format +msgid "XHTML: You can use these tags: %s" +msgstr "XHTML : Vous pouvez utiliser les balises suivantes  : %s" + +#: comments.php:86 +msgid "Submit Comment" +msgstr "Envoyer le commentaire" + +#: footer.php:12 +#, php-format +msgid "%1$s is proudly powered by %2$s" +msgstr "%1$s est fièrement propulsé par %2$s" + +#: footer.php:14 +#, php-format +msgid "%1$s and %2$s." +msgstr "%1$s et %2$s." + +#: footer.php:14 +msgid "Entries (RSS)" +msgstr "Flux RSS des entrées" + +#: footer.php:14 +msgid "Comments (RSS)" +msgstr "Flux RSS des commentaires" + +#: footer.php:15 +#, php-format +msgid "%d queries. %s seconds." +msgstr "%d requêtes. %s secondes." + +#: functions.php:156 +msgid "Custom Header" +msgstr "En-tête personalisée" + +#: functions.php:169 +msgid "Close Color Picker" +msgstr "Fermer le sélecteur de couleur" + +#: functions.php:366 +msgid "Options saved." +msgstr "Options enregistrées." + +#: functions.php:369 +msgid "Customize Header" +msgstr "Personaliser l’en-tête" + +#: functions.php:383 +#: functions.php:390 +msgid "Save" +msgstr "Enregistrer" + +#: functions.php:384 +msgid "Font Color:" +msgstr "Couleur de police :" + +#: functions.php:384 +#, php-format +msgid "Any CSS color (%s or %s or %s)" +msgstr "N’importe quelle couleur CSS (%s ou %s ou %s)" + +#: functions.php:385 +msgid "Upper Color:" +msgstr "Couleur du haut :" + +#: functions.php:385 +#: functions.php:386 +#, php-format +msgid "HEX only (%s or %s)" +msgstr "Héxadécimel seul (%s ou %s)" + +#: functions.php:386 +msgid "Lower Color:" +msgstr "Couleur du bas :" + +#: functions.php:388 +msgid "Toggle Text" +msgstr "Inverser le texte" + +#: functions.php:389 +msgid "Use Defaults" +msgstr "Utiliser les couleurs par défaut" + +#: functions.php:398 +msgid "Font Color" +msgstr "Couleur du texte" + +#: functions.php:399 +msgid "Upper Color" +msgstr "Couleur du haut" + +#: functions.php:400 +msgid "Lower Color" +msgstr "Couleur du bas" + +#: functions.php:401 +msgid "Revert" +msgstr "Annuler" + +#: functions.php:402 +msgid "Advanced" +msgstr "Avancé" + +#: functions.php:409 +msgid "Update Header" +msgstr "Mettre à jour l’en-tête" + +#: functions.php:415 +msgid "Font Color (CSS):" +msgstr "Couleur du texte (CSS) :" + +#: functions.php:416 +msgid "Upper Color (HEX):" +msgstr "Couleur du haut (hexa) :" + +#: functions.php:417 +msgid "Lower Color (HEX):" +msgstr "Couleur du bas (hexa) :" + +#: functions.php:418 +msgid "Select Default Colors" +msgstr "Sélectionner les couleurs par défaut" + +#: functions.php:419 +msgid "Toggle Text Display" +msgstr "Afficher/masquer le texte" + +#: index.php:20 +#: single.php:23 +msgid "Read the rest of this entry »" +msgstr "Lire la suite de cette entrée »" + +#: index.php:35 +msgid "Not Found" +msgstr "Rien de trouvé" + +#: index.php:36 +msgid "Sorry, but you are looking for something that isn’t here." +msgstr "Désolé, mais vous cherchez quelque chose qui n’est pas ici." + +#: links.php:16 +msgid "Links:" +msgstr "Liens :" + +#: page.php:15 +msgid "Read the rest of this page »" +msgstr "Lire le reste de cette page »" + +#: page.php:17 +#: single.php:25 +msgid "Pages:" +msgstr "Pages :" + +#: page.php:22 +msgid "Edit this entry." +msgstr "Modifier cette entrée." + +#: search.php:13 +msgid "Search Results" +msgstr "Résultats de recherche" + +#: search.php:39 +msgid "No posts found. Try a different search?" +msgstr "Aucun article trouvé. Peut-être avec une autre recherche ?" + +#: sidebar.php:16 +msgid "Author" +msgstr "Auteur" + +#: sidebar.php:27 +#, php-format +msgid "You are currently browsing the archives for the %s category." +msgstr "Vous parcourez actuellement les archives de la catégorie %s." + +#: sidebar.php:30 +#, php-format +msgid "You are currently browsing the %2$s blog archives for the day %3$s." +msgstr "Vous parcourez actuellement les archives du blog %2$s pour la journée du %3$s." + +#: sidebar.php:33 +#, php-format +msgid "You are currently browsing the %2$s blog archives for %3$s." +msgstr "Vous parcourez actuellement les archives du blog %2$s pour %3$s." + +#: sidebar.php:36 +#, php-format +msgid "You are currently browsing the %2$s blog archives for the year %3$s." +msgstr "Vous parcourez actuellement les archives du blog %2$s pour l'année %3$s." + +#: sidebar.php:39 +#, php-format +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 "Vous avez lancé une recherche dans les archives du blog %2$s avec la requête ‘%3$s’. Si les résultats ne vous conviennent pas, vous pouvez essayer l’un de ces liens." + +#: sidebar.php:42 +#, php-format +msgid "You are currently browsing the %2$s blog archives." +msgstr "Vous parcourez actuellement les archives du blog %2$s." + +#: sidebar.php:50 +msgid "Pages" +msgstr "Pages" + +#: sidebar.php:52 +msgid "Archives" +msgstr "Archives" + +#: sidebar.php:58 +msgid "Categories" +msgstr "Catégories" + +#: sidebar.php:64 +msgid "Meta" +msgstr "Méta" + +#: sidebar.php:68 +msgid "This page validates as XHTML 1.0 Transitional" +msgstr "Cette page est valide en XHTML 1.0 Transitional" + +#: sidebar.php:68 +msgid "Valid XHTML" +msgstr "XHTML valide" + +#: sidebar.php:69 +msgid "XHTML Friends Network" +msgstr "XHTML Friends Network" + +#: sidebar.php:69 +msgid "XFN" +msgstr "XFN" + +#: sidebar.php:70 +msgid "Powered by WordPress, state-of-the-art semantic personal publishing platform." +msgstr "Propulsé par WordPress, une plate-forme de publication personnelle à la pointe de la sémantique." + +#: single.php:34 +#, php-format +msgid "This entry was posted %1$s on %2$s at %3$s and is filed under %4$s." +msgstr "Cette entrée a été publiée %1$s le %2$s à %3$s, et rangée dans %4$s." + +#: single.php:35 +#, php-format +msgid "You can follow any responses to this entry through the RSS 2.0 feed." +msgstr "Vous pouvez suivre les réponses à cette entrée via son flux RSS 2.0." + +#: single.php:39 +#, php-format +msgid "You can leave a response, or trackback from your own site." +msgstr "Vous pouvez laisser un commentaire, ou faire un rétrolien depuis votre site." + +#: single.php:43 +#, php-format +msgid "Responses are currently closed, but you can trackback from your own site." +msgstr "Les commentaires sont fermés actuellement, mais vous pouvez toujours faire un rétrolien depuis votre site." + +#: single.php:47 +msgid "You can skip to the end and leave a response. Pinging is currently not allowed." +msgstr "Vous pouvez sauter à la fin, et laisser directement un commentaire. L’envoi de ping est n’est pas pour le moment autorisé." + +#: single.php:51 +msgid "Both comments and pings are currently closed." +msgstr "Les commentaires et les pings sont pour le moment fermés." + +#: single.php:53 +msgid "Edit this entry" +msgstr "Modifier cette entrée" + +#. Theme Name of an extension +msgid "WordPress Default" +msgstr "Réglage par défaut de WordPress" + +#. Theme URI of an extension +msgid "http://wordpress.org/" +msgstr "http://fr.wordpress.org/" + +#. Description of an extension +msgid "The default WordPress theme based on the famous Kubrick." +msgstr "Le thème par défaut de WordPress, basé sur le célèbre thème Kubrick (traduction par WordPress-Francophone: http://www.wordpress-fr.net/ )" + +#. Author of an extension +msgid "Michael Heilemann" +msgstr "Michael Heilemann" + +#. Author URI of an extension +msgid "http://binarybonsai.com/" +msgstr "http://binarybonsai.com/" + +#. Tags of an extension +msgid "blue, custom header, fixed width, two columns, widgets" +msgstr "blue, custom header, fixed width, two columns, widgets" + +#~ msgid "Header Image and Color" +#~ msgstr "Image et couleurs de l’en-tête" +#~ msgid "%s RSS Feed" +#~ msgstr "%s flux RSS" +#~ msgid "%s Atom Feed" +#~ msgstr "%s flux Atom" +#~ msgid "This entry was posted on %1$s at %2$s and is filed under %3$s." +#~ msgstr "Cette entrée a été publiée le %1$s à %2$s, et est rangée dans %3$s." +#~ msgid "Search for:" +#~ msgstr "Recherche sur :" +#~ msgid "Search" +#~ msgstr "Recherche" +#~ msgid "Permanent Link: %s" +#~ msgstr "Lien permanent : %s" +#~ msgid "Sorry, no attachments matched your criteria." +#~ msgstr "Désolé, aucun fichier attaché ne correspond à vos critères." +#~ msgid "%s Says:" +#~ msgstr "%s écrit :" +#~ msgid "Your comment is awaiting moderation." +#~ msgstr "Votre commentaire est en attente de validation." +#~ msgid "%1$s at %2$s" +#~ msgstr "%1$s à %2$s" +#~ msgid "edit" +#~ msgstr "modifier" +#~ msgid "» Blog Archive" +#~ msgstr "» Archive du blog" + diff -r 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,427 @@ + '
  • ', + '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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,45 @@ + + +> + + + + +<?php wp_title('«', true, 'right'); ?> <?php bloginfo('name'); ?> + + + + + + + + + + +> +
    + + + +
    diff -r 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 web/wp-content/themes/default/images/audio.jpg Binary file web/wp-content/themes/default/images/audio.jpg has changed diff -r 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 web/wp-content/themes/default/images/kubrickbg-ltr.jpg Binary file web/wp-content/themes/default/images/kubrickbg-ltr.jpg has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/default/images/kubrickbg-rtl.jpg Binary file web/wp-content/themes/default/images/kubrickbg-rtl.jpg has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/default/images/kubrickbgcolor.jpg Binary file web/wp-content/themes/default/images/kubrickbgcolor.jpg has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/default/images/kubrickbgwide.jpg Binary file web/wp-content/themes/default/images/kubrickbgwide.jpg has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/default/images/kubrickfooter.jpg Binary file web/wp-content/themes/default/images/kubrickfooter.jpg has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/default/images/kubrickheader.jpg Binary file web/wp-content/themes/default/images/kubrickheader.jpg has changed diff -r 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,45 @@ + + +
    + + + + + +
    id="post-"> +

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

    +

    + + + + +
    + + + + diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/default/kubrick.pot --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/default/kubrick.pot Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,612 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Michael Heilemann +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: WordPress Default 1.6\n" +"Report-Msgid-Bugs-To: http://wordpress.org/tag/theme\n" +"POT-Creation-Date: 2009-05-18 17:54+0300\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: 404.php:12 +msgid "Error 404 - Not Found" +msgstr "" + +#: archive.php:16 +#, php-format +msgid "Archive for the ‘%s’ Category" +msgstr "" + +#: archive.php:18 +#, php-format +msgid "Posts Tagged ‘%s’" +msgstr "" + +#: archive.php:20 +#, php-format +msgid "Archive for %s|Daily archive page" +msgstr "" + +#: archive.php:20 index.php:17 +msgid "F jS, Y" +msgstr "" + +#: archive.php:22 +#, php-format +msgid "Archive for %s|Monthly archive page" +msgstr "" + +#: archive.php:22 sidebar.php:33 +msgid "F, Y" +msgstr "" + +#: archive.php:24 +#, php-format +msgid "Archive for %s|Yearly archive page" +msgstr "" + +#: archive.php:24 +msgid "Y" +msgstr "" + +#: archive.php:26 +msgid "Author Archive" +msgstr "" + +#: archive.php:28 +msgid "Blog Archives" +msgstr "" + +#: archive.php:33 archive.php:53 index.php:29 search.php:16 search.php:33 +msgid "« Older Entries" +msgstr "" + +#: archive.php:34 archive.php:54 index.php:30 search.php:17 search.php:34 +msgid "Newer Entries »" +msgstr "" + +#: archive.php:39 index.php:16 search.php:24 +#, php-format +msgid "Permanent Link to %s" +msgstr "" + +#: archive.php:40 sidebar.php:30 single.php:34 +msgid "l, F jS, Y" +msgstr "" + +#: archive.php:46 index.php:23 search.php:27 single.php:26 +msgid "Tags:" +msgstr "" + +#: archive.php:46 index.php:23 search.php:27 +#, php-format +msgid "Posted in %s" +msgstr "" + +#: archive.php:46 index.php:23 search.php:27 +msgid "Edit" +msgstr "" + +#: archive.php:46 index.php:23 search.php:27 +msgid "No Comments »" +msgstr "" + +#: archive.php:46 index.php:23 search.php:27 +msgid "1 Comment »" +msgstr "" + +#: archive.php:46 index.php:23 search.php:27 +msgid "% Comments »" +msgstr "" + +#: archive.php:46 index.php:23 search.php:27 +msgid "Comments Closed" +msgstr "" + +#: archive.php:59 +#, php-format +msgid "Sorry, but there aren't any posts in the %s category yet." +msgstr "" + +#: archive.php:61 +msgid "Sorry, but there aren't any posts with this date." +msgstr "" + +#: archive.php:64 +#, php-format +msgid "Sorry, but there aren't any posts by %s yet." +msgstr "" + +#: archive.php:66 +msgid "No posts found." +msgstr "" + +#: archives.php:17 +msgid "Archives by Month:" +msgstr "" + +#: archives.php:22 +msgid "Archives by Subject:" +msgstr "" + +#: comments-popup.php:9 +#, php-format +msgid "%1$s - Comments on %2$s" +msgstr "" + +#: comments-popup.php:28 +msgid "Comments" +msgstr "" + +#: comments-popup.php:30 +msgid "" +"RSS feed for comments on " +"this post." +msgstr "" + +#: comments-popup.php:33 +#, php-format +msgid "" +"The URL to TrackBack this " +"entry is: %s" +msgstr "" + +#: comments-popup.php:51 +msgid "Comment" +msgstr "" + +#: comments-popup.php:51 +msgid "Trackback" +msgstr "" + +#: comments-popup.php:51 +msgid "Pingback" +msgstr "" + +#: comments-popup.php:51 +#, php-format +msgid "by %1$s — %2$s @ %4$s" +msgstr "" + +#: comments-popup.php:57 +msgid "No comments yet." +msgstr "" + +#: comments-popup.php:61 +msgid "Leave a comment" +msgstr "" + +#: comments-popup.php:62 +#, php-format +msgid "" +"Line and paragraph breaks automatic, e-mail address never displayed, " +"HTML allowed: %" +"s" +msgstr "" + +#: comments-popup.php:66 +#, php-format +msgid "" +"Logged in as %2$s. Log out »" +msgstr "" + +#: comments-popup.php:70 comments.php:72 +msgid "Name" +msgstr "" + +#: comments-popup.php:75 +msgid "E-mail" +msgstr "" + +#: comments-popup.php:80 +msgid "URL" +msgstr "" + +#: comments-popup.php:85 +msgid "Your Comment" +msgstr "" + +#: comments-popup.php:93 +msgid "Say It!" +msgstr "" + +#: comments-popup.php:98 +msgid "Sorry, the comment form is closed at this time." +msgstr "" + +#: comments-popup.php:103 +msgid "Close this window." +msgstr "" + +#: comments-popup.php:109 single.php:65 +msgid "Sorry, no posts matched your criteria." +msgstr "" + +#: comments-popup.php:113 +#, php-format +msgid "" +"Powered by WordPress" +msgstr "" + +#: comments.php:12 +msgid "This post is password protected. Enter the password to view comments." +msgstr "" + +#: comments.php:21 +msgid "No Responses" +msgstr "" + +#: comments.php:21 +msgid "One Response" +msgstr "" + +#: comments.php:21 +msgid "% Responses" +msgstr "" + +#: comments.php:21 +#, php-format +msgid "to “%s”" +msgstr "" + +#: comments.php:43 +msgid "Comments are closed." +msgstr "" + +#: comments.php:53 +msgid "Leave a Reply" +msgstr "" + +#: comments.php:53 +#, php-format +msgid "Leave a Reply for %s" +msgstr "" + +#: comments.php:60 +#, php-format +msgid "You must be logged in to post a comment." +msgstr "" + +#: comments.php:67 +#, php-format +msgid "Logged in as %2$s." +msgstr "" + +#: comments.php:67 +msgid "Log out of this account" +msgstr "" + +#: comments.php:67 +msgid "Log out »" +msgstr "" + +#: comments.php:72 comments.php:75 +msgid "(required)" +msgstr "" + +#: comments.php:75 +msgid "Mail (will not be published)" +msgstr "" + +#: comments.php:78 +msgid "Website" +msgstr "" + +#: comments.php:82 +#, php-format +msgid "XHTML: You can use these tags: %s" +msgstr "" + +#: comments.php:86 +msgid "Submit Comment" +msgstr "" + +#: footer.php:12 +#, php-format +msgid "%1$s is proudly powered by %2$s" +msgstr "" + +#: footer.php:14 +#, php-format +msgid "%1$s and %2$s." +msgstr "" + +#: footer.php:14 +msgid "Entries (RSS)" +msgstr "" + +#: footer.php:14 +msgid "Comments (RSS)" +msgstr "" + +#: footer.php:15 +#, php-format +msgid "%d queries. %s seconds." +msgstr "" + +#: functions.php:156 +msgid "Custom Header" +msgstr "" + +#: functions.php:169 +msgid "Close Color Picker" +msgstr "" + +#: functions.php:366 +msgid "Options saved." +msgstr "" + +#: functions.php:369 +msgid "Customize Header" +msgstr "" + +#: functions.php:383 functions.php:390 +msgid "Save" +msgstr "" + +#: functions.php:384 +msgid "Font Color:" +msgstr "" + +#: functions.php:384 +#, php-format +msgid "Any CSS color (%s or %s or %s)" +msgstr "" + +#: functions.php:385 +msgid "Upper Color:" +msgstr "" + +#: functions.php:385 functions.php:386 +#, php-format +msgid "HEX only (%s or %s)" +msgstr "" + +#: functions.php:386 +msgid "Lower Color:" +msgstr "" + +#: functions.php:388 +msgid "Toggle Text" +msgstr "" + +#: functions.php:389 +msgid "Use Defaults" +msgstr "" + +#: functions.php:398 +msgid "Font Color" +msgstr "" + +#: functions.php:399 +msgid "Upper Color" +msgstr "" + +#: functions.php:400 +msgid "Lower Color" +msgstr "" + +#: functions.php:401 +msgid "Revert" +msgstr "" + +#: functions.php:402 +msgid "Advanced" +msgstr "" + +#: functions.php:409 +msgid "Update Header" +msgstr "" + +#: functions.php:415 +msgid "Font Color (CSS):" +msgstr "" + +#: functions.php:416 +msgid "Upper Color (HEX):" +msgstr "" + +#: functions.php:417 +msgid "Lower Color (HEX):" +msgstr "" + +#: functions.php:418 +msgid "Select Default Colors" +msgstr "" + +#: functions.php:419 +msgid "Toggle Text Display" +msgstr "" + +#: index.php:20 single.php:23 +msgid "Read the rest of this entry »" +msgstr "" + +#: index.php:35 +msgid "Not Found" +msgstr "" + +#: index.php:36 +msgid "Sorry, but you are looking for something that isn’t here." +msgstr "" + +#: links.php:16 +msgid "Links:" +msgstr "" + +#: page.php:15 +msgid "Read the rest of this page »" +msgstr "" + +#: page.php:17 single.php:25 +msgid "Pages:" +msgstr "" + +#: page.php:22 +msgid "Edit this entry." +msgstr "" + +#: search.php:13 +msgid "Search Results" +msgstr "" + +#: search.php:39 +msgid "No posts found. Try a different search?" +msgstr "" + +#: sidebar.php:16 +msgid "Author" +msgstr "" + +#: sidebar.php:27 +#, php-format +msgid "You are currently browsing the archives for the %s category." +msgstr "" + +#: sidebar.php:30 +#, php-format +msgid "" +"You are currently browsing the %2$s blog archives for " +"the day %3$s." +msgstr "" + +#: sidebar.php:33 +#, php-format +msgid "" +"You are currently browsing the %2$s blog archives for %" +"3$s." +msgstr "" + +#: sidebar.php:36 +#, php-format +msgid "" +"You are currently browsing the %2$s blog archives for " +"the year %3$s." +msgstr "" + +#: sidebar.php:39 +#, php-format +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 "" + +#: sidebar.php:42 +#, php-format +msgid "" +"You are currently browsing the %2$s blog archives." +msgstr "" + +#: sidebar.php:50 +msgid "Pages" +msgstr "" + +#: sidebar.php:52 +msgid "Archives" +msgstr "" + +#: sidebar.php:58 +msgid "Categories" +msgstr "" + +#: sidebar.php:64 +msgid "Meta" +msgstr "" + +#: sidebar.php:68 +msgid "This page validates as XHTML 1.0 Transitional" +msgstr "" + +#: sidebar.php:68 +msgid "Valid XHTML" +msgstr "" + +#: sidebar.php:69 +msgid "XHTML Friends Network" +msgstr "" + +#: sidebar.php:69 +msgid "XFN" +msgstr "" + +#: sidebar.php:70 +msgid "" +"Powered by WordPress, state-of-the-art semantic personal publishing platform." +msgstr "" + +#: single.php:34 +#, php-format +msgid "This entry was posted %1$s on %2$s at %3$s and is filed under %4$s." +msgstr "" + +#: single.php:35 +#, php-format +msgid "" +"You can follow any responses to this entry through the RSS 2.0 feed." +msgstr "" + +#: single.php:39 +#, php-format +msgid "" +"You can leave a response, or trackback from your own site." +msgstr "" + +#: single.php:43 +#, php-format +msgid "" +"Responses are currently closed, but you can trackback from your own site." +msgstr "" + +#: single.php:47 +msgid "" +"You can skip to the end and leave a response. Pinging is currently not " +"allowed." +msgstr "" + +#: single.php:51 +msgid "Both comments and pings are currently closed." +msgstr "" + +#: single.php:53 +msgid "Edit this entry" +msgstr "" + +#. Theme Name of an extension +msgid "WordPress Default" +msgstr "" + +#. Theme URI of an extension +msgid "http://wordpress.org/" +msgstr "" + +#. Description of an extension +msgid "" +"The default WordPress theme based on the famous Kubrick." +msgstr "" + +#. Author of an extension +msgid "Michael Heilemann" +msgstr "" + +#. Author URI of an extension +msgid "http://binarybonsai.com/" +msgstr "" + +#. Tags of an extension +msgid "blue, custom header, fixed width, two columns, widgets" +msgstr "" diff -r 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,23 @@ + + + + +
    + +

    +
      + +
    + +
    + + diff -r 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,27 @@ + + +
    + + +
    +

    +
    + ' . __('Read the rest of this page »', 'kubrick') . '

    '); ?> + + '

    ' . __('Pages:', 'kubrick') . ' ', 'after' => '

    ', 'next_or_number' => 'number')); ?> + +
    +
    + + ', '

    '); ?> +
    + + + + diff -r 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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; +} diff -r 000000000000 -r 03b0d1493584 web/wp-content/themes/default/screenshot.png Binary file web/wp-content/themes/default/screenshot.png has changed diff -r 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,48 @@ + + +
    + + + +

    + + + + + + +
    > +

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

    + + + + +
    + + + + diff -r 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,79 @@ + + + diff -r 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,71 @@ + + +
    + + + + + +
    id="post-"> +

    + +
    + ' . __('Read the rest of this entry »', 'kubrick') . '

    '); ?> + + '

    ' . __('Pages:', 'kubrick') . ' ', 'after' => '

    ', 'next_or_number' => 'number')); ?> + ' . __('Tags:', 'kubrick') . ' ', ', ', '

    '); ?> + + + +
    +
    + + + + + +

    + + + +
    + + diff -r 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,719 @@ +/* +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 +Text Domain: kubrick + + 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 000000000000 -r 03b0d1493584 web/wp-content/themes/index.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-content/themes/index.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,3 @@ + \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-content/uploads/2009/12/0151-150x150.jpg Binary file web/wp-content/uploads/2009/12/0151-150x150.jpg has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/uploads/2009/12/0151.jpg Binary file web/wp-content/uploads/2009/12/0151.jpg has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/uploads/2009/12/TdS-Screen-150x150.jpg Binary file web/wp-content/uploads/2009/12/TdS-Screen-150x150.jpg has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/uploads/2009/12/TdS-Screen-300x201.jpg Binary file web/wp-content/uploads/2009/12/TdS-Screen-300x201.jpg has changed diff -r 000000000000 -r 03b0d1493584 web/wp-content/uploads/2009/12/TdS-Screen.jpg Binary file web/wp-content/uploads/2009/12/TdS-Screen.jpg has changed diff -r 000000000000 -r 03b0d1493584 web/wp-cron.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-cron.php Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 web/wp-feed.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-feed.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,12 @@ + \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-includes/Text/Diff.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/Text/Diff.php Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 web/wp-includes/atomlib.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/atomlib.php Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 web/wp-includes/author-template.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/author-template.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,341 @@ +display_name); +} + +/** + * 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); +} + +/** + * 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)); +} + +/** + * 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; + printf( + '%3$s', + get_author_posts_url( $authordata->ID, $authordata->user_nicename ), + esc_attr( sprintf( __( 'Posts by %s' ), get_the_author() ) ), + get_the_author() + ); +} + +/** + * 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 000000000000 -r 03b0d1493584 web/wp-includes/bookmark-template.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/bookmark-template.php Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 web/wp-includes/bookmark.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/bookmark.php Wed Dec 23 17:55:33 2009 +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 (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 000000000000 -r 03b0d1493584 web/wp-includes/cache.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/cache.php Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 web/wp-includes/canonical.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/canonical.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,339 @@ + $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_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_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']) ) { + $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 000000000000 -r 03b0d1493584 web/wp-includes/capabilities.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/capabilities.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,993 @@ + + * 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. + * + * @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. + * @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 preforming 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 = ''; + + /** + * 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(); + } + + /** + * 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 ); + } + $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[] = '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 ( $user_id == $page_author_data->ID ) { + // If the page is published... + if ( $page->post_status == 'publish' ) + $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'; + 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'; + 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 ); +} + +/** + * 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 000000000000 -r 03b0d1493584 web/wp-includes/category-template.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/category-template.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,958 @@ +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 ); + $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', '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 ) ); +} + +/** + * 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 done + * by the 'orderby' argument; passed to the filter: $tags array and $args array. + * + * 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', 'orderby' => 'name', 'order' => 'ASC', + 'topic_count_text_callback' => 'default_topic_count_text', + '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; + + // 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);') ); + + $tags = apply_filters( 'tag_cloud_sort', $tags, $args ); + + if ( 'DESC' == $order ) + $tags = array_reverse( $tags, true ); + elseif ( 'RAND' == $order ) { + $keys = (array) array_rand( $tags, count( $tags ) ); + $temp = array(); + foreach ( $keys as $key ) + $temp[$key] = $tags[$key]; + + $tags = $temp; + $temp = null; + unset( $temp ); + } + + if ( $number > 0 ) + $tags = array_slice($tags, 0, $number); + + $counts = array(); + foreach ( (array) $tags as $key => $tag ) + $counts[ $key ] = $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(); + + $rel = ( is_object( $wp_rewrite ) && $wp_rewrite->using_permalinks() ) ? ' rel="tag"' : ''; + + foreach ( $tags as $key => $tag ) { + $count = $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( "\n", $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 && ! in_the_loop() ) + return false; // in-the-loop function + + if ( !$id ) + $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 terms as a list with specified format. + * + * @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 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 = '' ) { + $return = get_the_term_list( $id, $taxonomy, $before, $sep, $after ); + if ( is_wp_error( $return ) ) + return false; + else + echo $return; +} + +/** + * 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 000000000000 -r 03b0d1493584 web/wp-includes/category.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/category.php Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 web/wp-includes/class-IXR.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/class-IXR.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,900 @@ +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->message = preg_replace('/<\?xml.*?\?'.'>/', '', $this->message); + 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'); + if (!xml_parse($this->_parser, $this->message)) { + /* die(sprintf('XML error: %s at line %d', + xml_error_string(xml_get_error_code($this->_parser)), + xml_get_current_line_number($this->_parser))); */ + return false; + } + 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 000000000000 -r 03b0d1493584 web/wp-includes/class-feed.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/class-feed.php Wed Dec 23 17:55:33 2009 +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); + } + + 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 000000000000 -r 03b0d1493584 web/wp-includes/class-phpass.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/class-phpass.php Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 web/wp-includes/class-phpmailer.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/class-phpmailer.php Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 web/wp-includes/class-pop3.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/class-pop3.php Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 web/wp-includes/class-simplepie.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/class-simplepie.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,13641 @@ +' . 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); + +/** + * 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 + * @version "Razzleberry" + * @copyright 2004-2007 Ryan Parman, Geoffrey Sneddon + * @author Ryan Parman + * @author Geoffrey Sneddon + * @todo Option for type of fetching (cache, not modified header, fetch, etc.) + */ +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 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() + { + if ((function_exists('version_compare') && version_compare(PHP_VERSION, '4.3.0', '<')) || !extension_loaded('xml') || !extension_loaded('pcre')) + { + return false; + } + if (isset($_GET[$this->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(''); +} + 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) + { + $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)) + { + if ($cache) + { + $this->data = array('url' => $this->feed_url, 'feed_url' => $file->url, 'build' => SIMPLEPIE_BUILD); + if (!$cache->save($this)) + { + trigger_error("$cache->name 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; + } + } + } + } + // We have an error, just set SimplePie::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()); + 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']['']['rss'])) + { + $this->data['type'] &= SIMPLEPIE_TYPE_RSS_ALL; + if (isset($this->data['child']['']['rss'][0]['attribs']['']['version'])) + { + switch (trim($this->data['child']['']['rss'][0]['attribs']['']['version'])) + { + case '0.91': + $this->data['type'] &= SIMPLEPIE_TYPE_RSS_091; + if (isset($this->data['child']['']['rss'][0]['child']['']['skiphours']['hour'][0]['data'])) + { + switch (trim($this->data['child']['']['rss'][0]['child']['']['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->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); + } + } + } + } + } + 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 'outlook' . $this->sanitize(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 = $this->sanitize($feed_url, SIMPLEPIE_CONSTRUCT_IRI) . rawurlencode($this->feed_url); + if ($site_url !== null && $this->get_link() !== null) + { + $return .= $this->sanitize($site_url, SIMPLEPIE_CONSTRUCT_IRI) . rawurlencode($this->get_link()); + } + return $return; + } + else + { + return null; + } + } + + function subscribe_aol() + { + return $this->subscribe_service('http://feeds.my.aol.com/add.jsp?url='); + } + + function subscribe_bloglines() + { + return urldecode($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']['']['rss'][0]['child'][$namespace][$tag])) + { + return $this->data['child']['']['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('', '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('', '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('', '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('', 'category') 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_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('', '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_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('', 'description')) + { + 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, '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('', '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('', '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('', '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('', '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('', '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('', 'width')) + { + return round($return[0]['data']); + } + elseif ($this->get_type() & SIMPLEPIE_TYPE_RSS_SYNDICATION && $this->get_image_tags('', 'url')) + { + return 88.0; + } + else + { + return null; + } + } + + function get_image_height() + { + if ($return = $this->get_image_tags('', 'height')) + { + return round($return[0]['data']); + } + elseif ($this->get_type() & SIMPLEPIE_TYPE_RSS_SYNDICATION && $this->get_image_tags('', 'url')) + { + return 31.0; + } + else + { + return null; + } + } + + function get_item_quantity($max = 0) + { + $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 (!empty($this->multifeed_objects)) + { + return SimplePie::merge_items($this->multifeed_objects, $start, $end, $this->item_limit); + } + elseif (!isset($this->data['items'])) + { + 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('', '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) + { + 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(); + } + } + + function sort_items($a, $b) + { + return $a->get_date('U') <= $b->get_date('U'); + } + + 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('', '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('', '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('', '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('', 'category') 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_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; + } + } + + /** + * @todo Atom inheritance (item author, source author, feed author) + */ + 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('', '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('', '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('', 'link')) + { + $this->data['links']['alternate'][] = $this->sanitize($links[0]['data'], SIMPLEPIE_CONSTRUCT_IRI, $this->get_base($links[0])); + } + if ($links = $this->get_item_tags('', '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('', '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 = $this->sanitize($item_url, SIMPLEPIE_CONSTRUCT_IRI) . rawurlencode($this->get_permalink()); + if ($title_url !== null && $this->get_title() !== null) + { + $return .= $this->sanitize($title_url, SIMPLEPIE_CONSTRUCT_IRI) . rawurlencode($this->get_title()); + } + if ($summary_url !== null && $this->get_description() !== null) + { + $return .= $this->sanitize($summary_url, SIMPLEPIE_CONSTRUCT_IRI) . rawurlencode($this->get_description()); + } + return $return; + } + 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('', '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('', 'category') 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_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('', '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('', '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('', '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('', '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 (($this->status_code == 300 || $this->status_code == 301 || $this->status_code == 302 || $this->status_code == 303 || $this->status_code == 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 (($this->status_code == 300 || $this->status_code == 301 || $this->status_code == 302 || $this->status_code == 303 || $this->status_code == 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 = strspn($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 = strspn($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) + { + 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 = rawurlencode($filename); + $this->extension = rawurlencode($extension); + $this->name = "$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_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) + { + if ($relative !== '') + { + $relative = SimplePie_Misc::parse_url($relative); + if ($relative['scheme'] !== '') + { + $target = $relative; + } + elseif ($base !== '') + { + $base = SimplePie_Misc::parse_url($base); + $target = SimplePie_Misc::parse_url(''); + if ($relative['authority'] !== '') + { + $target = $relative; + $target['scheme'] = $base['scheme']; + } + else + { + $target['scheme'] = $base['scheme']; + $target['authority'] = $base['authority']; + if ($relative['path'] !== '') + { + if (strpos($relative['path'], '/') === 0) + { + $target['path'] = $relative['path']; + } + elseif ($base['authority'] !== '' && $base['path'] === '') + { + $target['path'] = '/' . $relative['path']; + } + elseif (($last_segment = strrpos($base['path'], '/')) !== false) + { + $target['path'] = substr($base['path'], 0, $last_segment + 1) . $relative['path']; + } + else + { + $target['path'] = $relative['path']; + } + $target['query'] = $relative['query']; + } + else + { + $target['path'] = $base['path']; + if ($relative['query'] !== '') + { + $target['query'] = $relative['query']; + } + elseif ($base['query'] !== '') + { + $target['query'] = $base['query']; + } + } + } + $target['fragment'] = $relative['fragment']; + } + else + { + // No base URL, just return the relative URL + $target = $relative; + } + $return = SimplePie_Misc::compress_parse_url($target['scheme'], $target['authority'], $target['path'], $target['query'], $target['fragment']); + } + else + { + $return = $base; + } + $return = SimplePie_Misc::normalize_url($return); + return $return; + } + + 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) + { + 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) + { + preg_match('/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/', $url, $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]); + } + + function compress_parse_url($scheme = '', $authority = '', $path = '', $query = '', $fragment = '') + { + $return = ''; + if ($scheme !== '') + { + $return .= "$scheme:"; + } + if ($authority !== '') + { + $return .= "//$authority"; + } + if ($path !== '') + { + $return .= $path; + } + if ($query !== '') + { + $return .= "?$query"; + } + if ($fragment !== '') + { + $return .= "#$fragment"; + } + return $return; + } + + function normalize_url($url) + { + $url = preg_replace_callback('/%([0-9A-Fa-f]{2})/', array('SimplePie_Misc', 'percent_encoding_normalization'), $url); + $url = SimplePie_Misc::parse_url($url); + $url['scheme'] = strtolower($url['scheme']); + if ($url['authority'] !== '') + { + $url['authority'] = strtolower($url['authority']); + $url['path'] = SimplePie_Misc::remove_dot_segments($url['path']); + } + return SimplePie_Misc::compress_parse_url($url['scheme'], $url['authority'], $url['path'], $url['query'], $url['fragment']); + } + + 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 + elseif (function_exists('mb_convert_encoding') && ($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) + { + /* Character sets are case-insensitive, and also need some further + normalization in the real world (though we'll return them in the form given + in their registration). */ + switch (strtolower(preg_replace('/[\x09-\x0D\x20-\x2F\x3A-\x40\x5B-\x60\x7B-\x7E]/', '', $charset))) + { + case 'adobestandardencoding': + case 'csadobestandardencoding': + return 'Adobe-Standard-Encoding'; + + case 'adobesymbolencoding': + case 'cshppsmath': + return 'Adobe-Symbol-Encoding'; + + case 'ami1251': + case 'ami1251': + case 'amiga1251': + 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 'isoir89': + case 'iso9036': + 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 'isoir4': + case 'iso646gb': + 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 'isoir121': + case 'iso646ca': + return 'CSA_Z243.4-1985-1'; + + case 'csa72': + case 'csaz243419852': + case 'csiso122canadian2': + case 'isoir122': + case 'iso646ca2': + 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 'isoir21': + case 'iso646de': + return 'DIN_66003'; + + case 'csdkus': + case 'dkus': + return 'dk-us'; + + case 'csiso646danish': + case 'dk': + case 'ds2089': + 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 'isoir17': + case 'iso646es': + return 'ES'; + + case 'csiso85spanish2': + case 'es2': + case 'isoir85': + case 'iso646es2': + 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 'cp936': + case 'gbk': + case 'ms936': + case 'windows936': + case 'csgb2312': + case 'gb2312': + case 'chinese': + case 'csiso58gb231280': + case 'gb231280': + case 'isoir58': + return 'GBK'; + + case 'cn': + case 'csiso57gb1988': + case 'gb198880': + case 'isoir57': + case 'iso646cn': + 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 'ccsid00858': + case 'cp00858': + case 'ibm00858': + case 'pcmultilingual850euro': + return 'IBM00858'; + + case 'ccsid00924': + case 'cp00924': + case 'ebcdiclatin9euro': + case 'ibm00924': + return 'IBM00924'; + + case 'ccsid01140': + case 'cp01140': + case 'ebcdicus37euro': + case 'ibm01140': + return 'IBM01140'; + + case 'ccsid01141': + case 'cp01141': + case 'ebcdicde273euro': + case 'ibm01141': + return 'IBM01141'; + + case 'ccsid01142': + case 'cp01142': + case 'ebcdicdk277euro': + case 'ebcdicno277euro': + case 'ibm01142': + return 'IBM01142'; + + case 'ccsid01143': + case 'cp01143': + case 'ebcdicfi278euro': + case 'ebcdicse278euro': + case 'ibm01143': + return 'IBM01143'; + + case 'ccsid01144': + case 'cp01144': + case 'ebcdicit280euro': + case 'ibm01144': + return 'IBM01144'; + + case 'ccsid01145': + case 'cp01145': + case 'ebcdices284euro': + case 'ibm01145': + return 'IBM01145'; + + case 'ccsid01146': + case 'cp01146': + case 'ebcdicgb285euro': + case 'ibm01146': + return 'IBM01146'; + + case 'ccsid01147': + case 'cp01147': + case 'ebcdicfr297euro': + case 'ibm01147': + return 'IBM01147'; + + case 'ccsid01148': + case 'cp01148': + case 'ebcdicinternational500euro': + case 'ibm01148': + return 'IBM01148'; + + case 'ccsid01149': + case 'cp01149': + case 'ebcdicis871euro': + case 'ibm01149': + return 'IBM01149'; + + case 'cp037': + case 'csibm037': + case 'ebcdiccpca': + case 'ebcdiccpnl': + case 'ebcdiccpus': + case 'ebcdiccpwt': + case 'ibm037': + return 'IBM037'; + + case 'cp038': + case 'csibm038': + case 'ebcdicint': + case 'ibm038': + 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 'cpis': + case 'cp861': + 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 'cpar': + case 'cp868': + case 'csibm868': + case 'ibm868': + return 'IBM868'; + + case '869': + case 'cpgr': + case 'cp869': + 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': + 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 'isoir101': + case 'iso88592': + case 'iso885921987': + case 'l2': + case 'latin2': + return 'ISO-8859-2'; + + case 'cswindows31latin2': + case 'iso88592windowslatin2': + return 'ISO-8859-2-Windows-Latin-2'; + + case 'csisolatin3': + case 'iso88593': + case 'isoir109': + case 'iso88593': + case 'iso885931988': + case 'l3': + case 'latin3': + return 'ISO-8859-3'; + + case 'csisolatin4': + case 'iso88594': + case 'isoir110': + case 'iso88594': + case 'iso885941988': + case 'l4': + case 'latin4': + return 'ISO-8859-4'; + + case 'csisolatincyrillic': + case 'cyrillic': + case 'iso88595': + case 'isoir144': + case 'iso88595': + case 'iso885951988': + return 'ISO-8859-5'; + + case 'arabic': + case 'asmo708': + case 'csisolatinarabic': + case 'ecma114': + case 'iso88596': + case 'isoir127': + case 'iso88596': + case 'iso885961987': + return 'ISO-8859-6'; + + case 'csiso88596e': + case 'iso88596e': + case 'iso88596e': + return 'ISO-8859-6-E'; + + case 'csiso88596i': + case 'iso88596i': + case 'iso88596i': + return 'ISO-8859-6-I'; + + case 'csisolatingreek': + case 'ecma118': + case 'elot928': + case 'greek': + case 'greek8': + case 'iso88597': + case 'isoir126': + case 'iso88597': + case 'iso885971987': + return 'ISO-8859-7'; + + case 'csisolatinhebrew': + case 'hebrew': + case 'iso88598': + case 'isoir138': + case 'iso88598': + case 'iso885981988': + return 'ISO-8859-8'; + + case 'csiso88598e': + case 'iso88598e': + case 'iso88598e': + return 'ISO-8859-8-E'; + + case 'csiso88598i': + case 'iso88598i': + case 'iso88598i': + return 'ISO-8859-8-I'; + + case 'cswindows31latin5': + case 'iso88599windowslatin5': + return 'ISO-8859-9-Windows-Latin-5'; + + case 'csisolatin6': + case 'iso885910': + case 'isoir157': + case 'iso8859101992': + case 'l6': + case 'latin6': + return 'ISO-8859-10'; + + case 'iso885913': + return 'ISO-8859-13'; + + case 'iso885914': + case 'isoceltic': + case 'isoir199': + case 'iso885914': + case 'iso8859141998': + case 'l8': + case 'latin8': + return 'ISO-8859-14'; + + case 'iso885915': + case 'iso885915': + case 'latin9': + return 'ISO-8859-15'; + + case 'iso885916': + case 'isoir226': + case 'iso885916': + case 'iso8859162001': + 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 '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 'isoir2': + case 'iso646irv1983': + return 'ISO_646.irv:1983'; + + case 'csiso2033': + case 'e13b': + case 'isoir98': + case 'iso20331983': + return 'ISO_2033-1983'; + + case 'csiso5427cyrillic': + case 'isoir37': + case 'iso5427': + return 'ISO_5427'; + + case 'isoir54': + case 'iso5427cyrillic1981': + case 'iso54271981': + return 'ISO_5427:1981'; + + case 'csiso5428greek': + case 'isoir55': + case 'iso54281980': + return 'ISO_5428:1980'; + + case 'csiso6937add': + case 'isoir152': + case 'iso6937225': + return 'ISO_6937-2-25'; + + case 'csisotextcomm': + case 'isoir142': + case 'iso69372add': + return 'ISO_6937-2-add'; + + case 'csiso8859supp': + case 'isoir154': + case 'iso8859supp': + case 'latin125': + return 'ISO_8859-supp'; + + case 'csiso10367box': + case 'isoir155': + case 'iso10367box': + return 'ISO_10367-box'; + + case 'csiso15italian': + case 'isoir15': + case 'iso646it': + case 'it': + return 'IT'; + + case 'csiso13jisc6220jp': + case 'isoir13': + case 'jisc62201969': + case 'jisc62201969jp': + case 'katakana': + case 'x02017': + return 'JIS_C6220-1969-jp'; + + case 'csiso14jisc6220ro': + case 'isoir14': + case 'iso646jp': + case 'jisc62201969ro': + case 'jp': + return 'JIS_C6220-1969-ro'; + + case 'csiso42jisc62261978': + case 'isoir42': + case 'jisc62261978': + return 'JIS_C6226-1978'; + + case 'csiso87jisx0208': + case 'isoir87': + case 'jisc62261983': + case 'jisx02081983': + case 'x0208': + return 'JIS_C6226-1983'; + + case 'csiso91jisc62291984a': + case 'isoir91': + case 'jisc62291984a': + case 'jpocra': + return 'JIS_C6229-1984-a'; + + case 'csiso92jisc62991984b': + case 'isoir92': + case 'iso646jpocrb': + 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 'jisx0201': + case 'x0201': + return 'JIS_X0201'; + + case 'csiso159jisx02121990': + case 'isoir159': + case 'jisx02121990': + case 'x0212': + return 'JIS_X0212-1990'; + + case 'csiso141jusib1002': + case 'isoir141': + case 'iso646yu': + 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 'isoir86': + case 'iso646hu': + 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 'isoir151': + case 'iso646cu': + case 'ncnc001081': + return 'NC_NC00-10:81'; + + case 'csiso69french': + case 'fr': + case 'isoir69': + case 'iso646fr': + case 'nfz62010': + return 'NF_Z_62-010'; + + case 'csiso25french': + case 'isoir25': + case 'iso646fr1': + case 'nfz620101973': + return 'NF_Z_62-010_(1973)'; + + case 'csiso60danishnorwegian': + case 'csiso60norwegian1': + case 'isoir60': + case 'iso646no': + case 'no': + case 'ns45511': + return 'NS_4551-1'; + + case 'csiso61norwegian2': + case 'isoir61': + case 'iso646no2': + case 'no2': + case 'ns45512': + return 'NS_4551-2'; + + case 'osdebcdicdf03irv': + return 'OSD_EBCDIC_DF03_IRV'; + + case 'osdebcdicdf041': + return 'OSD_EBCDIC_DF04_1'; + + case 'osdebcdicdf0415': + return 'OSD_EBCDIC_DF04_15'; + + case 'cspc8danishnorwegian': + case 'pc8danishnorwegian': + return 'PC8-Danish-Norwegian'; + + case 'cspc8turkish': + case 'pc8turkish': + return 'PC8-Turkish'; + + case 'csiso16portuguese': + case 'isoir16': + case 'iso646pt': + case 'pt': + return 'PT'; + + case 'csiso84portuguese2': + case 'isoir84': + case 'iso646pt2': + 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 'isoir10': + case 'iso646fi': + case 'iso646se': + case 'se': + case 'sen850200b': + return 'SEN_850200_B'; + + case 'csiso11swedishfornames': + case 'isoir11': + case 'iso646se2': + 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 'isoir6': + case 'iso646us': + case 'iso646irv1991': + 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 'euckr': + case 'windows949': + case 'csksc56011987': + case 'isoir149': + case 'korean': + case 'ksc5601': + case 'ksc56011987': + case 'ksc56011989': + return 'Windows-949'; + + case 'windows1250': + return 'windows-1250'; + + case 'windows1251': + return 'windows-1251'; + + case 'cp819': + case 'csisolatin1': + case 'ibm819': + case 'iso88591': + case 'isoir100': + case 'iso885911987': + case 'l1': + case 'latin1': + case 'windows1252': + return 'Windows-1252'; + + case 'windows1252': + return 'windows-1252'; + + case 'windows1253': + return 'windows-1253'; + + case 'csisolatin5': + case 'iso88599': + case 'isoir148': + case 'iso885991989': + case 'l5': + case 'latin5': + case 'windows1254': + return 'Windows-1254'; + + 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; + } +} + +/** + * Decode HTML Entities + * + * This implements HTML5 as of revision 967 (2007-06-28) + * + * @package SimplePie + */ +class SimplePie_Decode_HTML_Entities +{ + /** + * Data to be parsed + * + * @access private + * @var string + */ + var $data = ''; + + /** + * Currently consumed bytes + * + * @access private + * @var string + */ + var $consumed = ''; + + /** + * Position of the current byte being parsed + * + * @access private + * @var int + */ + var $position = 0; + + /** + * Create an instance of the class with the input data + * + * @access public + * @param string $data Input data + */ + function SimplePie_Decode_HTML_Entities($data) + { + $this->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 + { + $this->consumed = false; + 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 + { + $this->consumed = false; + 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 ($this->consume() != ';') + { + $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; + } + } +} + +/** + * 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) + { + 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; + } + + 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(); + 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')))) + { + $this->checked_feeds++; + $feed =& new $this->file_class($href, $this->timeout, 5, null, $this->useragent); + if ($this->is_feed($feed)) + { + return $feed; + } + } + $done[] = $href; + } + } + 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 ($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 ($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 $feed = false; + 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; + } + } + + // Work around libxml bug + $data = str_replace('<', '<', $data); + $data = str_replace('>', '>', $data); + $data = str_replace('&', '&', $data); + $data = str_replace(''', ''', $data); + $data = str_replace('"', '"', $data); + + $return = true; + + // Create the parser + $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; + } + + 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) + { + if ($this->feed === 0) + { + return; + } + elseif ($this->feed == false) + { + if (in_array($tag, array( + SIMPLEPIE_NAMESPACE_ATOM_10 . $this->separator . 'feed', + SIMPLEPIE_NAMESPACE_ATOM_03 . $this->separator . 'feed', + 'rss', + SIMPLEPIE_NAMESPACE_RDF . $this->separator . 'RDF' + ))) + { + $this->feed = 1; + } + } + else + { + $this->feed++; + } + + 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); + } + elseif ($this->feed > 1) + { + $this->data['data'] .= $cdata; + } + } + + function tag_close($parser, $tag) + { + if (!$this->feed) + { + return; + } + + 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[$this->feed]; + 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); + $this->feed--; + } + + 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->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("$cache->name 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 000000000000 -r 03b0d1493584 web/wp-includes/class-smtp.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/class-smtp.php Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 web/wp-includes/class-snoopy.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/class-snoopy.php Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,239 @@ +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 ) + unset( $this->queue[$handle] ); + } + + 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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 web/wp-includes/classes.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/classes.php Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 web/wp-includes/comment-template.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/comment-template.php Wed Dec 23 17:55:33 2009 +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); +} + +/** + * 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); +} + +/** + * 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) ) + 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 000000000000 -r 03b0d1493584 web/wp-includes/comment.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/comment.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,1645 @@ +]*[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; + + 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)); + 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'"; + 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; +} + +/** + * 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_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 ( $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 + if ( $lasttime = $wpdb->get_var( $wpdb->prepare("SELECT comment_date_gmt FROM $wpdb->comments WHERE comment_author_IP = %s OR comment_author_email = %s ORDER BY comment_date DESC LIMIT 1", $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); + + if ( preg_match_all('/&#(\d+);/', $comment . $author . $url, $chars) ) { + foreach ( (array) $chars[1] as $char ) { + // If it's an encoded char in the normal ASCII set, reject + if ( 38 == $char ) + continue; // Unless it's & + if ( $char < 128 ) + return true; + } + } + + $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'); + $known_types = array_keys( $approved ); + foreach( (array) $count as $row_num => $row ) { + $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 '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; + do_action('delete_comment', $comment_id); + + $comment = get_comment($comment_id); + + if ( ! $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->comments WHERE comment_ID = %d LIMIT 1", $comment_id) ) ) + return false; + + // 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); + } + + $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; +} + +/** + * The status of a comment by ID. + * + * @since 1.0.0 + * + * @param int $comment_id Comment ID + * @return string|bool Status might be 'deleted', '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 'deleted'; + elseif ( $approved == '1' ) + return 'approved'; + elseif ( $approved == '0' ) + return 'unapproved'; + elseif ( $approved == 'spam' ) + return 'spam'; + 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) { + $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']; + $commentdata['user_ID'] = (int) $commentdata['user_ID']; + + $commentdata['comment_parent'] = absint($commentdata['comment_parent']); + $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'] = $_SERVER['HTTP_USER_AGENT']; + + $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': + $status = '0'; + break; + case 'approve': + $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 'delete': + return wp_delete_comment($comment_id); + break; + default: + return false; + } + + 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->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 = $wpdb->escape($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")) { + $wpdb->query("DELETE FROM {$wpdb->postmeta} WHERE post_id = {$ping->ID} AND meta_key = '_pingme';"); + 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")) { + $wpdb->query( $wpdb->prepare("DELETE FROM {$wpdb->postmeta} WHERE post_id = %d AND meta_key = '_encloseme';", $enclosure->ID) ); + 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 .= ' -- WordPress/' . $wp_version; + + // 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 000000000000 -r 03b0d1493584 web/wp-includes/compat.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/compat.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,118 @@ + $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) { + $packs = array('md5' => 'H32', 'sha1' => 'H40'); + + if ( !isset($packs[$algo]) ) + return false; + + $pack = $packs[$algo]; + + if (strlen($key) > 64) + $key = pack($pack, $algo($key)); + else if (strlen($key) < 64) + $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)); + + return $algo($opad . pack($pack, $algo($ipad . $data))); +} +endif; + +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 ); + } +} + +?> diff -r 000000000000 -r 03b0d1493584 web/wp-includes/cron.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/cron.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,397 @@ + 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 000000000000 -r 03b0d1493584 web/wp-includes/default-filters.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/default-filters.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,212 @@ + diff -r 000000000000 -r 03b0d1493584 web/wp-includes/default-widgets.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/default-widgets.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,1107 @@ + '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']); + $text = apply_filters( 'widget_text', $instance['text'] ); + 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 = (bool) $instance['count']; + $hierarchical = (bool) $instance['hierarchical']; + $dropdown = (bool) $instance['dropdown']; +?> +

    +

    + +

    /> +
    + + /> +
    + + /> +

    + '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 = esc_attr($instance['title']); + if ( !$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( 'wp_set_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 * FROM $wpdb->comments WHERE comment_approved = '1' 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 Custom / SAM') ); + $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 = "$title"; + + echo $before_widget; + if ( $title ) + echo $before_title . $title . $after_title; + wp_widget_rss_output( $rss, $instance ); + echo $after_widget; + } + + 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 ); + } +} + + +/** + * RSS widget class + * + * @since 2.8.0 + */ +class WP_Widget_RSS extends WP_Widget { + + function WP_Widget_RSS() { + $widget_ops = array( 'description' => __('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; + } + + 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.' ) . '
    '; + 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 '
    '; +} + + + +/** + * 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); + } + } + + 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'); +} + +?> \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 web/wp-includes/feed-atom.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/feed-atom.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,55 @@ +'; ?> + + > + <?php bloginfo_rss('name'); wp_title_rss(); ?> + + + + + + + + + + + + + + + + + + + <![CDATA[<?php the_title_rss() ?>]]> + + + + + + ]]> + + ]]> + + + + + + + + + diff -r 000000000000 -r 03b0d1493584 web/wp-includes/feed-rdf.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/feed-rdf.php Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 web/wp-includes/feed-rss.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/feed-rss.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,36 @@ +'; ?> + + + + <?php bloginfo_rss('name'); wp_title_rss(); ?> + + + + http://backend.userland.com/rss092 + + + + + + <?php the_title_rss() ?> + + ]]> + + + + + + + + + diff -r 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 web/wp-includes/feed-rss2.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/feed-rss2.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,61 @@ +'; ?> + + +> + + + <?php bloginfo_rss('name'); wp_title_rss(); ?> + + + + + + + + + + + + <?php the_title_rss() ?> + + + + + + + + + ]]> + + ]]> + post_content ) > 0 ) : ?> + ]]> + + ]]> + + + + + + + + + + diff -r 000000000000 -r 03b0d1493584 web/wp-includes/feed.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/feed.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,561 @@ +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(); +} + +/** + * 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. + * + * @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) { + $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; +} + +/** + * 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 'rss'. Either 'rss', 'atom', or 'rdf'. + * @return string All of the post categories for displaying in the feed. + */ +function get_the_category_rss($type = 'rss') { + $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 'rss'. Either 'rss', 'atom', or 'rdf'. + */ +function the_category_rss($type = 'rss') { + 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 000000000000 -r 03b0d1493584 web/wp-includes/formatting.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/formatting.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,2712 @@ + + * '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; + $output = ''; + $curl = ''; + $textarr = preg_split('/(<.*>|\[.*\])/Us', $text, -1, PREG_SPLIT_DELIM_CAPTURE); + $stop = count($textarr); + + /* translators: opening curly quote */ + $opening_quote = _x('“', 'opening curly quote'); + /* translators: closing curly quote */ + $closing_quote = _x('”', 'closing curly quote'); + + $no_texturize_tags = apply_filters('no_texturize_tags', array('pre', 'code', 'kbd', 'style', 'script', 'tt')); + $no_texturize_shortcodes = apply_filters('no_texturize_shortcodes', array('code')); + $no_texturize_tags_stack = array(); + $no_texturize_shortcodes_stack = array(); + + // 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'); + + 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)) { // If it's not a tag + // static strings + $curl = str_replace($static_characters, $static_replacements, $curl); + // regular expressions + $curl = preg_replace($dynamic_characters, $dynamic_replacements, $curl); + } else { + wptexturize_pushpop_element($curl, $no_texturize_tags_stack, $no_texturize_tags, '<', '>'); + 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; +} + +function wptexturize_pushpop_element($text, &$stack, $disabled_elements, $opening = '<', $closing = '>') { + $o = preg_quote($opening, '/'); + $c = preg_quote($closing, '/'); + foreach($disabled_elements as $element) { + if (preg_match('/^'.$o.$element.'\b/', $text)) array_push($stack, $element); + if (preg_match('/^'.$o.'\/'.$element.$c.'/', $text)) { + $last = array_pop($stack); + // disable 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 texturized + if ($last != $element) 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)'; + $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 ); + $pee = preg_replace('/

    \s*?(' . get_shortcode_regex() . ')\s*<\/p>/s', '$1', $pee); // don't auto-p wrap shortcodes that stand alone + + 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 = strip_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 $wpdb->escape($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<])|(?(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 = $wpdb->escape($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); + + return " <img src='$siteurl/wp-includes/images/smilies/$img' 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. + * + * @since 1.5.0 + * + * @param string $text The exerpt. 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); + $words = explode(' ', $text, $excerpt_length + 1); + if (count($words) > $excerpt_length) { + array_pop($words); + array_push($words, '[...]'); + $text = implode(' ', $words); + } + } + 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, specialchar double quotes, and fix line endings. + * + * 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 = preg_replace( "/\r?\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 ); + return $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 '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': + $value = abs((int) $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 = strip_tags( $str ); + $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; +} + +?> diff -r 000000000000 -r 03b0d1493584 web/wp-includes/functions.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/functions.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,3358 @@ +<?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 = $wpdb->escape( $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 ); + + $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 ); + 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 = $wpdb->escape( $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'; + + 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->insert($wpdb->options, array('option_name' => $name, 'option_value' => $value, 'autoload' => $autoload) ); + + do_action( "add_option_{$name}", $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 option_id, autoload FROM $wpdb->options WHERE option_name = '$name'" ); + if ( is_null($option) || !$option->option_id ) + return false; + // 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' ); + } + 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_' . $wpdb->escape($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_' . $wpdb->escape($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_' . $wpdb->escape($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 = $wpdb->escape($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; +} + +/** + * 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 + * + * @param string $content Content to get links + * @return string HTML stripped out of content with links at the bottom. + */ +function make_url_footnote( $content ) { + preg_match_all( '/<a(.+?)href=\"(.+?)\"(.*?)>(.+?)<\/a>/', $content, $matches ); + $links_summary = "\n"; + for ( $i=0; $i<count($matches[0]); $i++ ) { + $link_match = $matches[0][$i]; + $link_number = '['.($i+1).']'; + $link_url = $matches[2][$i]; + $link_text = $matches[4][$i]; + $content = str_replace( $link_match, $link_text . ' ' . $link_number, $content ); + $link_url = ( ( strtolower( substr( $link_url, 0, 7 ) ) != 'http://' ) && ( strtolower( substr( $link_url, 0, 8 ) ) != 'https://' ) ) ? get_option( 'home' ) . $link_url : $link_url; + $links_summary .= "\n" . $link_number . ' ' . $link_url; + } + $content = strip_tags( $content ); + $content .= $links_summary; + return $content; +} + +/** + * 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 + $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->postmeta WHERE post_id = %d AND meta_key = 'enclosure' AND meta_value LIKE (%s)", $post_ID, $link_test . '%') ); + } + } + + 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) ); + } + } + } + } +} + +/** + * 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] = $wpdb->escape( $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 ); + + return $installed; +} + +/** + * 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; + + // $dir is absolute, $path is (maybe) relative to ABSPATH + $dir = path_join( ABSPATH, $dir ); + + if ( !$url = get_option( 'upload_url_path' ) ) { + if ( empty($upload_path) or ( $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 = ''; + + if ( !empty( $ext ) ) + $ext = ".$ext"; + + 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', + '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?' ), $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 ( wp_get_referer() ) + $html .= "</p><p><a href='" . esc_url( remove_query_arg( 'updated', wp_get_referer() ) ) . "'>" . __( 'Please try again.' ) . "</a>"; + elseif ( 'log-out' == $action ) + $html .= "</p><p>" . sprintf( __( "Do you really want to <a href='%s'>log out</a>?"), wp_logout_url() ); + + wp_die( $html, $title); +} + +/** + * 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"> +<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 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 defined and + * 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( defined('WP_DEBUG') && ( true === 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 (':' == substr( $file, 1, 1 )) + return 2; + + if (!empty ( $allowed_files ) && (!in_array( $file, $allowed_files ) ) ) + return 3; + + 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 = '') { + static $forced; + + if ( '' != $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 = '') { + static $forced; + + if ( '' != $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 ) { + return get_option($key, $default); +} + +// expects $key, $value not to be SQL escaped +function add_site_option( $key, $value ) { + return add_option($key, $value); +} + +// expects $key, $value not to be SQL escaped +function update_site_option( $key, $value ) { + return update_option($key, $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', 'Etc' ); + + // 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; + } + if ( 'Etc' === $zone[0] && in_array( $zone[1], array( 'UCT', 'GMT', 'GMT0', 'GMT+0', 'GMT-0', 'Greenwich', 'Universal', 'Zulu' ) ) ) { + 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 = ( 'Etc' === $zone['continent'] ) ? __( 'Manual offsets' ) : $zone['t_continent']; + $structure[] = ''; + } + + // Add the city to the value + $value[] = $zone['city']; + if ( 'Etc' === $zone['continent'] ) { + if ( 'UTC' === $zone['city'] ) { + $display = ''; + } else { + $display = str_replace( 'GMT', '', $zone['city'] ); + $display = strtr( $display, '+-', '-+' ) . ':00'; + } + $display = sprintf( __( 'UTC %s' ), $display ); + } else { + $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[] = ''; + } + } + + 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)); +} +?> diff -r 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 web/wp-includes/general-template.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/general-template.php Wed Dec 23 17:55:33 2009 +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'] = $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 ); + $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' ); +add_action( 'update_option_start_of_week', '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 ); +} + +?> diff -r 000000000000 -r 03b0d1493584 web/wp-includes/gettext.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/gettext.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,400 @@ +. + Copyright (c) 2005 Nico Kaiser + + This file is part of PHP-gettext. + + PHP-gettext 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. + + PHP-gettext 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 PHP-gettext; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +*/ + +/** + * Provides a simple gettext replacement that works independently from + * the system's gettext abilities. + * It can read MO files and use them for translating strings. + * The files are passed to gettext_reader as a Stream (see streams.php) + * + * This version has the ability to cache all strings and translations to + * speed up the string lookup. + * While the cache is enabled by default, it can be switched off with the + * second parameter in the constructor (e.g. whenusing very large MO files + * that you don't want to keep in memory) + */ +class gettext_reader { + //public: + var $error = 0; // public variable that holds error code (0 if no error) + + //private: + var $BYTEORDER = 0; // 0: low endian, 1: big endian + var $STREAM = NULL; + var $short_circuit = false; + var $enable_cache = false; + var $originals = NULL; // offset of original table + var $translations = NULL; // offset of translation table + var $pluralheader = NULL; // cache header field for plural forms + var $select_string_function = NULL; // cache function, which chooses plural forms + var $total = 0; // total string count + var $table_originals = NULL; // table for original strings (offsets) + var $table_translations = NULL; // table for translated strings (offsets) + var $cache_translations = NULL; // original -> translation mapping + + + /* Methods */ + + + /** + * Reads a 32bit Integer from the Stream + * + * @access private + * @return Integer from the Stream + */ + function readint() { + if ($this->BYTEORDER == 0) { + // low endian + $low_end = unpack('V', $this->STREAM->read(4)); + return array_shift($low_end); + } else { + // big endian + $big_end = unpack('N', $this->STREAM->read(4)); + return array_shift($big_end); + } + } + + /** + * Reads an array of Integers from the Stream + * + * @param int count How many elements should be read + * @return Array of Integers + */ + function readintarray($count) { + if ($this->BYTEORDER == 0) { + // low endian + return unpack('V'.$count, $this->STREAM->read(4 * $count)); + } else { + // big endian + return unpack('N'.$count, $this->STREAM->read(4 * $count)); + } + } + + /** + * Constructor + * + * @param object Reader the StreamReader object + * @param boolean enable_cache Enable or disable caching of strings (default on) + */ + function gettext_reader($Reader, $enable_cache = true) { + // If there isn't a StreamReader, turn on short circuit mode. + if (! $Reader || isset($Reader->error) ) { + $this->short_circuit = true; + return; + } + + // Caching can be turned off + $this->enable_cache = $enable_cache; + + // $MAGIC1 = (int)0x950412de; //bug in PHP 5.0.2, see https://savannah.nongnu.org/bugs/?func=detailitem&item_id=10565 + $MAGIC1 = (int) - 1794895138; + // $MAGIC2 = (int)0xde120495; //bug + $MAGIC2 = (int) - 569244523; + // 64-bit fix + $MAGIC3 = (int) 2500072158; + + $this->STREAM = $Reader; + $magic = $this->readint(); + if ($magic == $MAGIC1 || $magic == $MAGIC3) { // to make sure it works for 64-bit platforms + $this->BYTEORDER = 0; + } elseif ($magic == ($MAGIC2 & 0xFFFFFFFF)) { + $this->BYTEORDER = 1; + } else { + $this->error = 1; // not MO file + return false; + } + + // FIXME: Do we care about revision? We should. + $revision = $this->readint(); + + $this->total = $this->readint(); + $this->originals = $this->readint(); + $this->translations = $this->readint(); + } + + /** + * Loads the translation tables from the MO file into the cache + * If caching is enabled, also loads all strings into a cache + * to speed up translation lookups + * + * @access private + */ + function load_tables() { + if (is_array($this->cache_translations) && + is_array($this->table_originals) && + is_array($this->table_translations)) + return; + + /* get original and translations tables */ + $this->STREAM->seekto($this->originals); + $this->table_originals = $this->readintarray($this->total * 2); + $this->STREAM->seekto($this->translations); + $this->table_translations = $this->readintarray($this->total * 2); + + if ($this->enable_cache) { + $this->cache_translations = array (); + /* read all strings in the cache */ + for ($i = 0; $i < $this->total; $i++) { + $this->STREAM->seekto($this->table_originals[$i * 2 + 2]); + $original = $this->STREAM->read($this->table_originals[$i * 2 + 1]); + $this->STREAM->seekto($this->table_translations[$i * 2 + 2]); + $translation = $this->STREAM->read($this->table_translations[$i * 2 + 1]); + $this->cache_translations[$original] = $translation; + } + } + } + + /** + * Returns a string from the "originals" table + * + * @access private + * @param int num Offset number of original string + * @return string Requested string if found, otherwise '' + */ + function get_original_string($num) { + $length = $this->table_originals[$num * 2 + 1]; + $offset = $this->table_originals[$num * 2 + 2]; + if (! $length) + return ''; + $this->STREAM->seekto($offset); + $data = $this->STREAM->read($length); + return (string)$data; + } + + /** + * Returns a string from the "translations" table + * + * @access private + * @param int num Offset number of original string + * @return string Requested string if found, otherwise '' + */ + function get_translation_string($num) { + $length = $this->table_translations[$num * 2 + 1]; + $offset = $this->table_translations[$num * 2 + 2]; + if (! $length) + return ''; + $this->STREAM->seekto($offset); + $data = $this->STREAM->read($length); + return (string)$data; + } + + /** + * Binary search for string + * + * @access private + * @param string string + * @param int start (internally used in recursive function) + * @param int end (internally used in recursive function) + * @return int string number (offset in originals table) + */ + function find_string($string, $start = -1, $end = -1) { + if (($start == -1) or ($end == -1)) { + // find_string is called with only one parameter, set start end end + $start = 0; + $end = $this->total; + } + if (abs($start - $end) <= 1) { + // We're done, now we either found the string, or it doesn't exist + $txt = $this->get_original_string($start); + if ($string == $txt) + return $start; + else + return -1; + } else if ($start > $end) { + // start > end -> turn around and start over + return $this->find_string($string, $end, $start); + } else { + // Divide table in two parts + $half = (int)(($start + $end) / 2); + $cmp = strcmp($string, $this->get_original_string($half)); + if ($cmp == 0) + // string is exactly in the middle => return it + return $half; + else if ($cmp < 0) + // The string is in the upper half + return $this->find_string($string, $start, $half); + else + // The string is in the lower half + return $this->find_string($string, $half, $end); + } + } + + /** + * Translates a string + * + * @access public + * @param string string to be translated + * @return string translated string (or original, if not found) + */ + function translate($string) { + if ($this->short_circuit) + return $string; + $this->load_tables(); + + if ($this->enable_cache) { + // Caching enabled, get translated string from cache + if (array_key_exists($string, $this->cache_translations)) + return $this->cache_translations[$string]; + else + return $string; + } else { + // Caching not enabled, try to find string + $num = $this->find_string($string); + if ($num == -1) + return $string; + else + return $this->get_translation_string($num); + } + } + + /** + * Get possible plural forms from MO header + * + * @access private + * @return string plural form header + */ + function get_plural_forms() { + // lets assume message number 0 is header + // this is true, right? + $this->load_tables(); + + // cache header field for plural forms + if (! is_string($this->pluralheader)) { + if ($this->enable_cache) { + $header = $this->cache_translations[""]; + } else { + $header = $this->get_translation_string(0); + } + $header .= "\n"; //make sure our regex matches + if (eregi("plural-forms: ([^\n]*)\n", $header, $regs)) + $expr = $regs[1]; + else + $expr = "nplurals=2; plural=n == 1 ? 0 : 1;"; + + // add parentheses + // important since PHP's ternary evaluates from left to right + $expr.= ';'; + $res= ''; + $p= 0; + for ($i= 0; $i < strlen($expr); $i++) { + $ch= $expr[$i]; + switch ($ch) { + case '?': + $res.= ' ? ('; + $p++; + break; + case ':': + $res.= ') : ('; + break; + case ';': + $res.= str_repeat( ')', $p) . ';'; + $p= 0; + break; + default: + $res.= $ch; + } + } + $this->pluralheader = $res; + } + + return $this->pluralheader; + } + + /** + * Detects which plural form to take + * + * @access private + * @param n count + * @return int array index of the right plural form + */ + function select_string($n) { + if (is_null($this->select_string_function)) { + $string = $this->get_plural_forms(); + if (preg_match("/nplurals\s*=\s*(\d+)\s*\;\s*plural\s*=\s*(.*?)\;+/", $string, $matches)) { + $nplurals = $matches[1]; + $expression = $matches[2]; + $expression = str_replace("n", '$n', $expression); + } else { + $nplurals = 2; + $expression = ' $n == 1 ? 0 : 1 '; + } + $func_body = " + \$plural = ($expression); + return (\$plural <= $nplurals)? \$plural : \$plural - 1;"; + $this->select_string_function = create_function('$n', $func_body); + } + return call_user_func($this->select_string_function, $n); + } + + /** + * Plural version of gettext + * + * @access public + * @param string single + * @param string plural + * @param string number + * @return translated plural form + */ + function ngettext($single, $plural, $number) { + if ($this->short_circuit) { + if ($number != 1) + return $plural; + else + return $single; + } + + // find out the appropriate form + $select = $this->select_string($number); + + // this should contains all strings separated by NULLs + $key = $single.chr(0).$plural; + + + if ($this->enable_cache) { + if (! array_key_exists($key, $this->cache_translations)) { + return ($number != 1) ? $plural : $single; + } else { + $result = $this->cache_translations[$key]; + $list = explode(chr(0), $result); + return $list[$select]; + } + } else { + $num = $this->find_string($key); + if ($num == -1) { + return ($number != 1) ? $plural : $single; + } else { + $result = $this->get_translation_string($num); + $list = explode(chr(0), $result); + return $list[$select]; + } + } + } + +} + +?> \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-includes/http.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/http.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,2054 @@ + + */ + +/** + * 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]; + } + } + + if ( has_filter('http_transport_get_debug') ) + 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]; + } + } + + if ( has_filter('http_transport_post_debug') ) + 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 + * + * @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 ); + + $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 ( is_null($r['body']) ) { + // Some servers fail when sending content without the content-length + // header being set. + $r['headers']['Content-Length'] = 0; + $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']); + + $transports = WP_Http::_postTransport($r); + } + + if ( has_action('http_api_debug') ) + 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); + + if ( has_action('http_api_debug') ) + do_action( 'http_api_debug', $response, 'response', get_class($transport) ); + + if ( ! is_wp_error($response) ) + return $response; + } + + 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; + } + } + + // 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 ( !defined('WP_DEBUG') || ( defined('WP_DEBUG') && false === 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); + + stream_set_timeout($handle, $r['timeout'] ); + + 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 ( !defined('WP_DEBUG') || ( defined('WP_DEBUG') && false === 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)); + + stream_set_timeout($handle, $r['timeout'] ); + + 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 ( ! defined('WP_DEBUG') || ( defined('WP_DEBUG') && false === 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)); + + // WordPress supports PHP 4.3, which has this function. Removed sanity checking for + // performance reasons. + stream_set_timeout($handle, $r['timeout'] ); + + 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 '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); + + $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 ( !defined('WP_DEBUG') || ( defined('WP_DEBUG') && false === 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 ( !defined('WP_DEBUG') || ( defined('WP_DEBUG') && false === 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 ); + + // cURL extension will sometimes fail when the timeout is less than 1 as it may round down + // to 0, which gives it unlimited timeout. + if ( $r['timeout'] > 0 && $r['timeout'] < 1 ) + $r['timeout'] = 1; + + $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); + + 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_CONNECTTIMEOUT, $r['timeout'] ); + curl_setopt( $handle, CURLOPT_TIMEOUT, $r['timeout'] ); + 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; + } + + 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) ) { + $parts = explode("\r\n\r\n", $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 ) { + $decompressed = gzinflate( $compressed ); + + if ( false !== $decompressed ) + return $decompressed; + + $decompressed = gzuncompress( $compressed ); + + if ( false !== $decompressed ) + return $decompressed; + + if ( function_exists('gzdecode') ) { + $decompressed = gzdecode( $compressed ); + + if ( false !== $decompressed ) + return $decompressed; + } + + return $compressed; + } + + /** + * 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 000000000000 -r 03b0d1493584 web/wp-includes/images/blank.gif Binary file web/wp-includes/images/blank.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-includes/images/crystal/archive.png Binary file web/wp-includes/images/crystal/archive.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-includes/images/crystal/audio.png Binary file web/wp-includes/images/crystal/audio.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-includes/images/crystal/code.png Binary file web/wp-includes/images/crystal/code.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-includes/images/crystal/default.png Binary file web/wp-includes/images/crystal/default.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-includes/images/crystal/document.png Binary file web/wp-includes/images/crystal/document.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-includes/images/crystal/interactive.png Binary file web/wp-includes/images/crystal/interactive.png has changed diff -r 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 web/wp-includes/images/crystal/spreadsheet.png Binary file web/wp-includes/images/crystal/spreadsheet.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-includes/images/crystal/text.png Binary file web/wp-includes/images/crystal/text.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-includes/images/crystal/video.png Binary file web/wp-includes/images/crystal/video.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-includes/images/rss.png Binary file web/wp-includes/images/rss.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-includes/images/smilies/icon_arrow.gif Binary file web/wp-includes/images/smilies/icon_arrow.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-includes/images/smilies/icon_biggrin.gif Binary file web/wp-includes/images/smilies/icon_biggrin.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-includes/images/smilies/icon_confused.gif Binary file web/wp-includes/images/smilies/icon_confused.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-includes/images/smilies/icon_cool.gif Binary file web/wp-includes/images/smilies/icon_cool.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-includes/images/smilies/icon_cry.gif Binary file web/wp-includes/images/smilies/icon_cry.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-includes/images/smilies/icon_eek.gif Binary file web/wp-includes/images/smilies/icon_eek.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-includes/images/smilies/icon_evil.gif Binary file web/wp-includes/images/smilies/icon_evil.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-includes/images/smilies/icon_exclaim.gif Binary file web/wp-includes/images/smilies/icon_exclaim.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-includes/images/smilies/icon_idea.gif Binary file web/wp-includes/images/smilies/icon_idea.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-includes/images/smilies/icon_lol.gif Binary file web/wp-includes/images/smilies/icon_lol.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-includes/images/smilies/icon_mad.gif Binary file web/wp-includes/images/smilies/icon_mad.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-includes/images/smilies/icon_mrgreen.gif Binary file web/wp-includes/images/smilies/icon_mrgreen.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-includes/images/smilies/icon_neutral.gif Binary file web/wp-includes/images/smilies/icon_neutral.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-includes/images/smilies/icon_question.gif Binary file web/wp-includes/images/smilies/icon_question.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-includes/images/smilies/icon_razz.gif Binary file web/wp-includes/images/smilies/icon_razz.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-includes/images/smilies/icon_redface.gif Binary file web/wp-includes/images/smilies/icon_redface.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-includes/images/smilies/icon_rolleyes.gif Binary file web/wp-includes/images/smilies/icon_rolleyes.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-includes/images/smilies/icon_sad.gif Binary file web/wp-includes/images/smilies/icon_sad.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-includes/images/smilies/icon_smile.gif Binary file web/wp-includes/images/smilies/icon_smile.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-includes/images/smilies/icon_surprised.gif Binary file web/wp-includes/images/smilies/icon_surprised.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-includes/images/smilies/icon_twisted.gif Binary file web/wp-includes/images/smilies/icon_twisted.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-includes/images/smilies/icon_wink.gif Binary file web/wp-includes/images/smilies/icon_wink.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-includes/images/upload.png Binary file web/wp-includes/images/upload.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-includes/images/wlw/wp-comments.png Binary file web/wp-includes/images/wlw/wp-comments.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-includes/images/wlw/wp-icon.png Binary file web/wp-includes/images/wlw/wp-icon.png has changed diff -r 000000000000 -r 03b0d1493584 web/wp-includes/images/wlw/wp-watermark.png Binary file web/wp-includes/images/wlw/wp-watermark.png has changed diff -r 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,261 @@ +var autosave, autosaveLast = '', autosavePeriodical, autosaveOldMessage = '', autosaveDelayPreview = false, notSaved = true; + +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); }); + + $('.submitbox input[type="submit"], .submitbox a.submitdelete').click(function(){window.onbeforeunload = null;}); + + 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; + } + } + }); + } +}); + +function autosave_parse_response(response) { + var res = wpAjax.parseAjaxResponse(response, 'autosave'), message = '', postID; + + 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 ) { + if ( 'disable' == res.responses[0].supplemental['disable_autosave'] ) { + autosave = function() {}; + res = { errors: true }; + } + jQuery.each(res.responses[0].supplemental, 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); + autosave_enable_buttons(); // re-enable disabled form buttons + }); + jQuery('#hiddenaction').val('editpost'); + } +} + +function autosave_update_slug(post_id) { + // create slug area only if not already there + if ( jQuery.isFunction(make_slugedit_clickable) && !jQuery('#edit-slug-box > *').size() ) { + jQuery.post( + slugL10n.requestFile, + { + action: 'sample-permalink', + post_id: post_id, + new_title: jQuery('#title').val(), + samplepermalinknonce: jQuery('#samplepermalinknonce').val() + }, + function(data) { + jQuery('#edit-slug-box').html(data); + make_slugedit_clickable(); + } + ); + } +} + +function autosave_loading() { + jQuery('#autosave').html(autosaveL10n.savingText); +} + +function autosave_enable_buttons() { + jQuery(".submitbox :button:disabled, .submitbox :submit:disabled").attr('disabled', ''); +} + +function autosave_disable_buttons() { + jQuery(".submitbox :button:enabled, .submitbox :submit:enabled").attr('disabled', 'disabled'); + // Re-enable 5 sec later. Just gives autosave a head start to avoid collisions. + setTimeout(autosave_enable_buttons, 5000); +} + +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; + + post_data = { + action: "autosave", + post_ID: jQuery("#post_ID").val() || 0, + post_title: jQuery("#title").val() || "", + autosavenonce: jQuery('#autosavenonce').val(), + //tags_input: jQuery("#tags-input").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 ) { + ed = tinyMCE.activeEditor; + 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; + } + + autosave_disable_buttons(); + + origStatus = jQuery('#original_post_status').val(); + + autosaveLast = jQuery("#title").val()+jQuery("#content").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(); + + // Don't run while the TinyMCE spellcheck is on. It resets all found words. + if ( rich && tinyMCE.activeEditor.plugins.spellchecker && tinyMCE.activeEditor.plugins.spellchecker.active ) { + doAutoSave = false; + } + + 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 + } + + if ( !doAutoSave ) { + post_data['autosave'] = 0; + } + + autosaveOldMessage = jQuery('#autosave').html(); + + jQuery.ajax({ + data: post_data, + beforeSend: doAutoSave ? autosave_loading : null, + type: "POST", + url: autosaveL10n.requestFile, + success: successCallback + }); +} diff -r 000000000000 -r 03b0d1493584 web/wp-includes/js/autosave.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/autosave.js Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,1 @@ +var autosave,autosaveLast="",autosavePeriodical,autosaveOldMessage="",autosaveDelayPreview=false,notSaved=true;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('.submitbox input[type="submit"], .submitbox a.submitdelete').click(function(){window.onbeforeunload=null});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}}})}});function autosave_parse_response(b){var c=wpAjax.parseAjaxResponse(b,"autosave"),d="",a;if(c&&c.responses&&c.responses.length){d=c.responses[0].data;if(c.responses[0].supplemental){if("disable"==c.responses[0].supplemental.disable_autosave){autosave=function(){};c={errors:true}}jQuery.each(c.responses[0].supplemental,function(e,f){if(e.match(/^replace-/)){jQuery("#"+e.replace("replace-","")).val(f)}})}if(!c.errors){a=parseInt(c.responses[0].id,10);if(!isNaN(a)&&a>0){autosave_update_slug(a)}}}if(d){jQuery("#autosave").html(d)}else{if(autosaveOldMessage&&c){jQuery("#autosave").html(autosaveOldMessage)}}return c}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);autosave_enable_buttons()});jQuery("#hiddenaction").val("editpost")}}function autosave_update_slug(a){if(jQuery.isFunction(make_slugedit_clickable)&&!jQuery("#edit-slug-box > *").size()){jQuery.post(slugL10n.requestFile,{action:"sample-permalink",post_id:a,new_title:jQuery("#title").val(),samplepermalinknonce:jQuery("#samplepermalinknonce").val()},function(b){jQuery("#edit-slug-box").html(b);make_slugedit_clickable()})}}function autosave_loading(){jQuery("#autosave").html(autosaveL10n.savingText)}function autosave_enable_buttons(){jQuery(".submitbox :button:disabled, .submitbox :submit:disabled").attr("disabled","")}function autosave_disable_buttons(){jQuery(".submitbox :button:enabled, .submitbox :submit:enabled").attr("disabled","disabled");setTimeout(autosave_enable_buttons,5000)}autosave=function(){var c=(typeof tinyMCE!="undefined")&&tinyMCE.activeEditor&&!tinyMCE.activeEditor.isHidden(),d,f,b,e,a;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){b=tinyMCE.activeEditor;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}autosave_disable_buttons();e=jQuery("#original_post_status").val();autosaveLast=jQuery("#title").val()+jQuery("#content").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(c&&tinyMCE.activeEditor.plugins.spellchecker&&tinyMCE.activeEditor.plugins.spellchecker.active){f=false}if(parseInt(d.post_ID,10)<1){d.temp_ID=d.post_ID;a=autosave_saved_new}else{a=autosave_saved}if(!f){d.autosave=0}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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,35 @@ + + + + CodePress - Real Time Syntax Highlighting Editor written in JavaScript + + + + + + + + + diff -r 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 web/wp-includes/js/codepress/engines/khtml.js diff -r 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 web/wp-includes/js/codepress/engines/older.js diff -r 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 web/wp-includes/js/codepress/images/line-numbers.png Binary file web/wp-includes/js/codepress/images/line-numbers.png has changed diff -r 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,5 @@ +/* + * CodePress color styles for Text syntax highlighting + */ + +/* do nothing as expected */ diff -r 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,9 @@ +/* + * CodePress regular expressions for Text syntax highlighting + */ + +// plain text +Language.syntax = [] +Language.snippets = [] +Language.complete = [] +Language.shortcuts = [] diff -r 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 web/wp-includes/js/colorpicker.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/colorpicker.js Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 web/wp-includes/js/crop/marqueeHoriz.gif Binary file web/wp-includes/js/crop/marqueeHoriz.gif has changed diff -r 000000000000 -r 03b0d1493584 web/wp-includes/js/crop/marqueeVert.gif Binary file web/wp-includes/js/crop/marqueeVert.gif has changed diff -r 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 web/wp-includes/js/hoverIntent.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/hoverIntent.js Wed Dec 23 17:55:33 2009 +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)) + * 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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 web/wp-includes/js/swfobject.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/js/swfobject.js Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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("simple")}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 000000000000 -r 03b0d1493584 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 000000000000 -r 03b0d1493584 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 000000000000 -r 03b0d1493584 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 000000000000 -r 03b0d1493584 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 000000000000 -r 03b0d1493584 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 000000000000 -r 03b0d1493584 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 000000000000 -r 03b0d1493584 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 000000000000 -r 03b0d1493584 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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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.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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,21 @@ + + +blank_page + + + + + + + + diff -r 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 k=c.dom,j={content:i};e.onPreProcess.dispatch(e,j);j.node=k.create("div",0,j.content);e.onPostProcess.dispatch(e,j);j.content=c.serializer.serialize(j.node,{getInner:1});if(/<(p|h[1-6]|ul|ol)/.test(j.content)){e._insertBlockContent(c,k,j.content)}else{e._insert(j.content)}}c.addCommand("mceInsertClipboardContent",function(i,h){g(h)});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"}," ");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);g(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 r=o.get("_mcePaste"),q;r.id="_mceRemoved";o.remove(r);r=o.get("_mcePaste")||r;q=(o.select("> span.Apple-style-span div",r)[0]||o.select("> span.Apple-style-span",r)[0]||r).innerHTML;o.remove(r);if(k){j.setRng(k)}g(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,g){var b=this.editor,c=g.content,f,e;function f(h){a(h,function(i){if(i.constructor==RegExp){c=c.replace(i,"")}else{c=c.replace(i[0],i[1])}})}f([/^\s*( )+/g,/( |]*>)+\s*$/g]);if(/(class=\"?Mso|style=\"[^\"]*\bmso\-|w:WordDocument)/.test(c)){g.wordContent=true;if(b.getParam("paste_convert_middot_lists",true)){f([[//gi,"$&__MCE_ITEM__"],[/(]+:\s*symbol[^>]+>)/gi,"$1__MCE_ITEM__"],[/(]+mso-list:[^>]+>)/gi,"$1__MCE_ITEM__"]])}f([//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")){f([/<\/?(span)[^>]*>/gi])}}e=b.getParam("paste_strip_class_attributes","all");if(e!="none"){if(e=="all"){f([/ class=\"([^\"]*)\"/gi,/ class=(\w+)/gi])}else{f([/ class=\"(mso[^\"]*)\"/gi,/ class=(mso\w+)/gi])}}if(b.getParam("paste_remove_spans")){f([/<\/?(span)[^>]*>/gi])}g.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");if(c){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, 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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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, h); + 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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,33 @@ + + + {#paste.paste_text_desc} + + + + + +
    +
    {#paste.paste_text_desc}
    + +
    + +
    + +
    + +
    {#paste_dlg.text_title}
    + + + +
    +
    + +
    + +
    + +
    +
    +
    + + diff -r 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,27 @@ + + + + {#paste.paste_word_desc} + + + + +
    +
    {#paste.paste_word_desc}
    + +
    {#paste_dlg.word_title}
    + +
    + +
    +
    + +
    + +
    + +
    +
    +
    + + diff -r 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,1 @@ + \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,28 @@ + diff -r 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,1 @@ +.mceItemHiddenSpellWord {background:url(../img/wline.gif) repeat-x bottom left; cursor:default;} diff -r 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,15 @@ + +.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; +} \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,297 @@ +/** + * WordPress plugin. + */ + +(function() { + var DOM = tinymce.DOM; + + tinymce.create('tinymce.plugins.WordPress', { + 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() { + if ( ed.getParam('wordpress_adv_hidden', 1) ) { + DOM.hide(ed.controlManager.get(tbId).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 id = ed.controlManager.get(tbId).id, cm = ed.controlManager; + + 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) { + if ( 'mceFullScreen' != cmd ) return; + if ( 'mce_fullscreen' != ed.id ) + 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; + }); + }; + + // 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'); + } + }, + + getInfo : function() { + return { + longname : 'WordPress Plugin', + author : 'WordPress', // add Moxiecode? + authorurl : 'http://wordpress.org', + infourl : 'http://wordpress.org', + version : '3.0' + }; + }, + + // Internal functions + 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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,1 @@ +(function(){var a=tinymce.DOM;tinymce.create("tinymce.plugins.WordPress",{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(){if(c.getParam("wordpress_adv_hidden",1)){a.hide(c.controlManager.get(h).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 j=c.controlManager.get(h).id,i=c.controlManager;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,k,j,l){if("mceFullScreen"!=k){return}if("mce_fullscreen"!=i.id){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})}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")}},getInfo:function(){return{longname:"WordPress Plugin",author:"WordPress",authorurl:"http://wordpress.org",infourl:"http://wordpress.org",version:"3.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 000000000000 -r 03b0d1493584 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 000000000000 -r 03b0d1493584 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 000000000000 -r 03b0d1493584 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 000000000000 -r 03b0d1493584 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 000000000000 -r 03b0d1493584 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 000000000000 -r 03b0d1493584 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 000000000000 -r 03b0d1493584 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 000000000000 -r 03b0d1493584 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 000000000000 -r 03b0d1493584 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 000000000000 -r 03b0d1493584 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 000000000000 -r 03b0d1493584 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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,243 @@ + +(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.getWin(), 'scroll', function(e) { + ed.plugins.wpeditimage.hideButtons(); + }); + }); + + ed.onBeforeExecCommand.add(function(ed, cmd, ui, val) { + ed.plugins.wpeditimage.hideButtons(); + }); + + ed.onSaveContent.add(function(ed, o) { + ed.plugins.wpeditimage.hideButtons(); + }); + + ed.onMouseUp.add(function(ed, e) { + var n, DL; + + if ( tinymce.isOpera ) { + if ( e.target.nodeName == 'IMG' ) + ed.plugins.wpeditimage.showButtons(e.target); + } else if ( ! tinymce.isWebKit ) { + n = ed.selection.getNode(); + + if ( n.nodeName == 'IMG' && (DL = ed.dom.getParent(n, 'DL')) ) { + window.setTimeout(function(){ + var ed = tinyMCE.activeEditor, n = ed.selection.getNode(), DL = ed.dom.getParent(n, 'DL'); + + if ( n.width != (parseInt(ed.dom.getStyle(DL, 'width')) - 10) ) { + ed.dom.setStyle(DL, 'width', parseInt(n.width)+10); + ed.execCommand('mceRepaint'); + } + }, 100); + } + } + }); + + ed.onMouseDown.add(function(ed, e) { + if ( tinymce.isOpera || e.target.nodeName != 'IMG' ) { + t.hideButtons(); + return; + } + ed.plugins.wpeditimage.showButtons(e.target); + }); + + ed.onKeyPress.add(function(ed, e) { + var DL, DIV, P; + + if ( e.keyCode == 13 && (DL = ed.dom.getParent(ed.selection.getNode(), 'DL')) ) { + P = ed.dom.create('p', {}, ' '); + if ( (DIV = DL.parentNode) && DIV.nodeName == 'DIV' ) + ed.dom.insertAfter( P, DIV ); + else ed.dom.insertAfter( P, DL ); + + tinymce.dom.Event.cancel(e); + ed.selection.select(P); + 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]'; + }); + }, + + showButtons : function(n) { + var t = this, ed = tinyMCE.activeEditor, p1, p2, vp, DOM = tinymce.DOM, X, Y, cls = ed.dom.getAttrib(n, 'class'); + + if ( cls.indexOf('mceItem') != -1 || cls.indexOf('wpGallery') != -1 ) + return; + + 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('wp_editbtns', { + 'top' : Y+5+'px', + 'left' : X+5+'px', + 'display' : 'block' + }); + + t.btnsTout = window.setTimeout( function(){ed.plugins.wpeditimage.hideButtons();}, 5000 ); + }, + + hideButtons : function() { + if ( tinymce.DOM.isHidden('wp_editbtns') ) return; + + tinymce.DOM.hide('wp_editbtns'); + window.clearTimeout(this.btnsTout); + }, + + _createButtons : function() { + var t = this, ed = tinyMCE.activeEditor, DOM = tinymce.DOM, wp_editbtns, wp_editimgbtn, wp_delimgbtn; + + DOM.remove('wp_editbtns'); + + wp_editbtns = DOM.add(document.body, 'div', { + id : 'wp_editbtns', + style : 'display:none;' + }); + + wp_editimgbtn = DOM.add('wp_editbtns', 'img', { + src : t.url+'/img/image.png', + id : 'wp_editimgbtn', + width : '24', + height : '24', + title : ed.getLang('wpeditimage.edit_img') + }); + + wp_editimgbtn.onmousedown = function(e) { + var ed = tinyMCE.activeEditor; + ed.windowManager.bookmark = ed.selection.getBookmark('simple'); + ed.execCommand("WP_EditImage"); + this.parentNode.style.display = 'none'; + }; + + wp_delimgbtn = DOM.add('wp_editbtns', 'img', { + src : t.url+'/img/delete.png', + id : 'wp_delimgbtn', + width : '24', + height : '24', + title : ed.getLang('wpeditimage.del_img') + }); + + wp_delimgbtn.onmousedown = 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); + + this.parentNode.style.display = 'none'; + 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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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]"})},showButtons:function(d){var j=this,e=tinyMCE.activeEditor,g,f,a,i=tinymce.DOM,c,b,h=e.dom.getAttrib(d,"class");if(h.indexOf("mceItem")!=-1||h.indexOf("wpGallery")!=-1){return}a=e.dom.getViewPort(e.getWin());g=i.getPos(e.getContentAreaContainer());f=e.dom.getPos(d);c=Math.max(f.x-a.x,0)+g.x;b=Math.max(f.y-a.y,0)+g.y;i.setStyles("wp_editbtns",{top:b+5+"px",left:c+5+"px",display:"block"});j.btnsTout=window.setTimeout(function(){e.plugins.wpeditimage.hideButtons()},5000)},hideButtons:function(){if(tinymce.DOM.isHidden("wp_editbtns")){return}tinymce.DOM.hide("wp_editbtns");window.clearTimeout(this.btnsTout)},_createButtons:function(){var d=this,b=tinyMCE.activeEditor,e=tinymce.DOM,a,c,f;e.remove("wp_editbtns");a=e.add(document.body,"div",{id:"wp_editbtns",style:"display:none;"});c=e.add("wp_editbtns","img",{src:d.url+"/img/image.png",id:"wp_editimgbtn",width:"24",height:"24",title:b.getLang("wpeditimage.edit_img")});c.onmousedown=function(h){var g=tinyMCE.activeEditor;g.windowManager.bookmark=g.selection.getBookmark("simple");g.execCommand("WP_EditImage");this.parentNode.style.display="none"};f=e.add("wp_editbtns","img",{src:d.url+"/img/delete.png",id:"wp_delimgbtn",width:"24",height:"24",title:b.getLang("wpeditimage.del_img")});f.onmousedown=function(j){var g=tinyMCE.activeEditor,h=g.selection.getNode(),i;if(h.nodeName=="IMG"&&g.dom.getAttrib(h,"class").indexOf("mceItem")==-1){if((i=g.dom.getParent(h,"div"))&&g.dom.hasClass(i,"mceTemp")){g.dom.remove(i)}else{if((i=g.dom.getParent(h,"A"))&&i.childNodes.length==1){g.dom.remove(i)}else{g.dom.remove(h)}}this.parentNode.style.display="none";g.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 000000000000 -r 03b0d1493584 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 000000000000 -r 03b0d1493584 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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,174 @@ + +(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.onInit.add(function(ed) { + tinymce.dom.Event.add(ed.getWin(), 'scroll', function(e) { + ed.plugins.wpgallery.hideButtons(); + }); + }); + + ed.onBeforeExecCommand.add(function(ed, cmd, ui, val) { + ed.plugins.wpgallery.hideButtons(); + }); + + ed.onSaveContent.add(function(ed, o) { + ed.plugins.wpgallery.hideButtons(); + }); + + ed.onMouseUp.add(function(ed, e) { + if ( tinymce.isOpera ) { + if ( e.target.nodeName == 'IMG' ) + ed.plugins.wpgallery.showButtons(e.target); + } + + }); + + ed.onMouseDown.add(function(ed, e) { + if ( tinymce.isOpera || e.target.nodeName != 'IMG' ) { + t.hideButtons(); + return; + } + ed.plugins.wpgallery.showButtons(e.target); + }); + + 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; + }); + }, + + showButtons : function(n) { + var t = this, ed = tinyMCE.activeEditor, p1, p2, vp, DOM = tinymce.DOM, X, Y; + + if (ed.dom.getAttrib(n, 'class').indexOf('wpGallery') == -1) + return; + + 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('wp_gallerybtns', { + 'top' : Y+5+'px', + 'left' : X+5+'px', + 'display' : 'block' + }); + + t.btnsTout = window.setTimeout( function(){ed.plugins.wpgallery.hideButtons();}, 5000 ); + }, + + hideButtons : function() { + if ( tinymce.DOM.isHidden('wp_gallerybtns') ) return; + + tinymce.DOM.hide('wp_gallerybtns'); + window.clearTimeout(this.btnsTout); + }, + + _createButtons : function() { + var t = this, ed = tinyMCE.activeEditor, DOM = tinymce.DOM, wp_gallerybtns, wp_editgallery, wp_delgallery; + + DOM.remove('wp_gallerybtns'); + + wp_gallerybtns = DOM.add(document.body, 'div', { + id : 'wp_gallerybtns', + style : 'display:none;' + }); + + wp_editgallery = DOM.add('wp_gallerybtns', 'img', { + src : t.url+'/img/edit.png', + id : 'wp_editgallery', + width : '24', + height : '24', + title : ed.getLang('wordpress.editgallery') + }); + + wp_editgallery.onmousedown = function(e) { + var ed = tinyMCE.activeEditor; + ed.windowManager.bookmark = ed.selection.getBookmark('simple'); + ed.execCommand("WP_Gallery"); + this.parentNode.style.display = 'none'; + }; + + wp_delgallery = DOM.add('wp_gallerybtns', 'img', { + src : t.url+'/img/delete.png', + id : 'wp_delgallery', + width : '24', + height : '24', + title : ed.getLang('wordpress.delgallery') + }); + + wp_delgallery.onmousedown = function(e) { + var ed = tinyMCE.activeEditor, el = ed.selection.getNode(); + + if ( el.nodeName == 'IMG' && ed.dom.getAttrib(el, 'class').indexOf('wpGallery') != -1 ) { + ed.dom.remove(el); + + this.parentNode.style.display = 'none'; + 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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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})},showButtons:function(d){var i=this,e=tinyMCE.activeEditor,g,f,a,h=tinymce.DOM,c,b;if(e.dom.getAttrib(d,"class").indexOf("wpGallery")==-1){return}a=e.dom.getViewPort(e.getWin());g=h.getPos(e.getContentAreaContainer());f=e.dom.getPos(d);c=Math.max(f.x-a.x,0)+g.x;b=Math.max(f.y-a.y,0)+g.y;h.setStyles("wp_gallerybtns",{top:b+5+"px",left:c+5+"px",display:"block"});i.btnsTout=window.setTimeout(function(){e.plugins.wpgallery.hideButtons()},5000)},hideButtons:function(){if(tinymce.DOM.isHidden("wp_gallerybtns")){return}tinymce.DOM.hide("wp_gallerybtns");window.clearTimeout(this.btnsTout)},_createButtons:function(){var d=this,b=tinyMCE.activeEditor,e=tinymce.DOM,c,f,a;e.remove("wp_gallerybtns");c=e.add(document.body,"div",{id:"wp_gallerybtns",style:"display:none;"});f=e.add("wp_gallerybtns","img",{src:d.url+"/img/edit.png",id:"wp_editgallery",width:"24",height:"24",title:b.getLang("wordpress.editgallery")});f.onmousedown=function(h){var g=tinyMCE.activeEditor;g.windowManager.bookmark=g.selection.getBookmark("simple");g.execCommand("WP_Gallery");this.parentNode.style.display="none"};a=e.add("wp_gallerybtns","img",{src:d.url+"/img/delete.png",id:"wp_delgallery",width:"24",height:"24",title:b.getLang("wordpress.delgallery")});a.onmousedown=function(i){var g=tinyMCE.activeEditor,h=g.selection.getNode();if(h.nodeName=="IMG"&&g.dom.getAttrib(h,"class").indexOf("wpGallery")!=-1){g.dom.remove(h);this.parentNode.style.display="none";g.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 000000000000 -r 03b0d1493584 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 000000000000 -r 03b0d1493584 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 000000000000 -r 03b0d1493584 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 000000000000 -r 03b0d1493584 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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,31 @@ + + + + {#advanced_dlg.anchor_title} + + + + +
    + + + + + + + + +
    {#advanced_dlg.anchor_title}
    {#advanced_dlg.anchor_name}:
    + +
    +
    + +
    + +
    + +
    +
    +
    + + diff -r 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,53 @@ + + + + {#advanced_dlg.charmap_title} + + + + + + + + + + + + + + + + +
    {#advanced_dlg.charmap_title}
    + + + + + + + + + +
     
     
    +
    + + + + + + + + + + + + + + + + +
    HTML-Code
     
     
    NUM-Code
     
    +
    + + + diff -r 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,89 @@ + + + + {#advanced_dlg.image_title} + + + + + + +
    + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + +
     
    + x +
    +
    +
    + +
    +
    + +
    + +
    + +
    +
    +
    + + diff -r 000000000000 -r 03b0d1493584 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 000000000000 -r 03b0d1493584 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 000000000000 -r 03b0d1493584 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 000000000000 -r 03b0d1493584 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 000000000000 -r 03b0d1493584 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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 ? f.target_list.options[f.target_list.selectedIndex].value : null, + 'class' : f.class_list ? f.class_list.options[f.class_list.selectedIndex].value : null + }); + } + }); + } else { + ed.dom.setAttribs(e, { + href : f.href.value, + title : f.linktitle.value, + target : f.target_list ? f.target_list.options[f.target_list.selectedIndex].value : null, + 'class' : f.class_list ? f.class_list.options[f.class_list.selectedIndex].value : 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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,63 @@ + + + + {#advanced_dlg.link_title} + + + + + + + +
    + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + +
    + + + + +
     
    +
    +
    + +
    +
    + +
    + +
    + +
    +
    +
    + + diff -r 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 000000000000 -r 03b0d1493584 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 000000000000 -r 03b0d1493584 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 000000000000 -r 03b0d1493584 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 000000000000 -r 03b0d1493584 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 000000000000 -r 03b0d1493584 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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 000000000000 -r 03b0d1493584 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 000000000000 -r 03b0d1493584 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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,92 @@ +/* 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; +} + +img.wpGallery { + border: 1px dotted #cc0000; + background: #ffffcc url("../../../../plugins/wpgallery/img/gallery.png") no-repeat scroll center center; + width: 99%; + height: 250px; +} + +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 000000000000 -r 03b0d1493584 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 000000000000 -r 03b0d1493584 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 000000000000 -r 03b0d1493584 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 000000000000 -r 03b0d1493584 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 000000000000 -r 03b0d1493584 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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,31 @@ + + + + {#advanced_dlg.code_title} + + + + +
    +
    {#advanced_dlg.code_title}
    + +
    + +
    + +
    + + + +
    +
    + +
    + +
    + +
    +
    +
    + + diff -r 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,1 @@ +var tinymce={majorVersion:"3",minorVersion:"2.4.1",releaseDate:"2009-05-25",_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}g.push(f[c])}c=e.length-b;if(c<=0){return"/"+g.reverse().join("/")+d}return"/"+e.slice(0,c).join("/")+"/"+g.reverse().join("/")+d},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.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}},is:function(g,f){return c.dom.Sizzle.matches(f,g.nodeType?[g]:g).length>0},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},select:function(h,g){var f=this;return c.dom.Sizzle(h,f.get(g)||f.get(f.settings.root_element)||f.doc,[])},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(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(/

    ]+)>|

    /g,'

    ');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>/g,function(h,l,k){if(!l){l=' type="text/javascript"'}l=l.replace(/(type|language)=\"?/,"$&mce-");l=l.replace(/src=\"([^\"]+)\"?/,function(m,n){if(i.url_converter){n=g.encode(i.url_converter.call(i.url_converter_scope||g,g.decode(n),"src","script"))}return'mce_src="'+n+'"'});if(c.trim(k)){k=""}return""+k+""});j=j.replace(/]+|)>([\s\S]*?)<\/style>/g,function(h,l,k){if(k){k=""}return""+k+""})}j=j.replace(//g,"");j=j.replace(/<([\w:]+) [^>]*(src|href|style|shape|coords)[^>]*>/gi,function(h,l){function k(o,n,q){var p=q;if(h.indexOf("mce_"+n)!=-1){return o}if(n=="style"){if(g._isRes(q)){return o}if(i.hex_colors){p=p.replace(/rgb\([^\)]+\)/g,function(m){return g.toHex(m)})}if(i.url_converter){p=p.replace(/url\([\'\"]?([^\)\'\"]+)\)/g,function(m,r){return"url("+g.encode(i.url_converter.call(i.url_converter_scope||g,g.decode(r),n,l))+")"})}}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,l))}}}return" "+n+'="'+q+'" mce_'+n+'="'+p+'"'}h=h.replace(/ (src|href|style|coords|shape)=[\"]([^\"]+)[\"]/gi,k);h=h.replace(/ (src|href|style|coords|shape)=[\']([^\']+)[\']/gi,k);return h.replace(/ (src|href|style|coords|shape)=([^\s\"\'>]+)/gi,k)})}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(i,g,j){var f=this;return this.run(i,function(h){var l,k;h=f.get(h);j=j||h.ownerDocument||f.doc;if(a&&h.nodeType==1){h.outerHTML=g}else{k=j.createElement("body");k.innerHTML=g;l=k.lastChild;while(l){f.insertAfter(l.cloneNode(true),h);l=l.previousSibling}f.remove(h)}})},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|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}g.cloneNode(false).outerHTML.replace(/([a-z0-9\:\-_]+)=/gi,function(i,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)},_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.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)})}});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=="simple"){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){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_)/,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",bool_attrs:/(checked|disabled|readonly|selected|nowrap)/,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;p1){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]*>)(.*?)(<\/script>)/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,"");j=j.replace(/(type|language)=\"mce-/g,'$1="');if(k.entity_encoding=="raw"){j=j.replace(/

     <\/p>|]+)> <\/p>/g,"\u00a0

    ")}}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);if(document.domain&&j.hostname!=document.domain){f.relaxedDomain=document.domain}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);if(f.inArray(l,"compat2x")!=-1){b.load("compat2x","plugins/compat2x/editor_plugin"+f.suffix+".js")}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){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.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';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 000000000000 -r 03b0d1493584 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 Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,28 @@ +//core +var tinymce={majorVersion:"3",minorVersion:"2.4.1",releaseDate:"2009-05-25",_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}g.push(f[c])}c=e.length-b;if(c<=0){return"/"+g.reverse().join("/")+d}return"/"+e.slice(0,c).join("/")+"/"+g.reverse().join("/")+d},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.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}},is:function(g,f){return c.dom.Sizzle.matches(f,g.nodeType?[g]:g).length>0},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},select:function(h,g){var f=this;return c.dom.Sizzle(h,f.get(g)||f.get(f.settings.root_element)||f.doc,[])},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(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(/

    ]+)>|

    /g,'

    ');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>/g,function(h,l,k){if(!l){l=' type="text/javascript"'}l=l.replace(/(type|language)=\"?/,"$&mce-");l=l.replace(/src=\"([^\"]+)\"?/,function(m,n){if(i.url_converter){n=g.encode(i.url_converter.call(i.url_converter_scope||g,g.decode(n),"src","script"))}return'mce_src="'+n+'"'});if(c.trim(k)){k=""}return""+k+""});j=j.replace(/]+|)>([\s\S]*?)<\/style>/g,function(h,l,k){if(k){k=""}return""+k+""})}j=j.replace(//g,"");j=j.replace(/<([\w:]+) [^>]*(src|href|style|shape|coords)[^>]*>/gi,function(h,l){function k(o,n,q){var p=q;if(h.indexOf("mce_"+n)!=-1){return o}if(n=="style"){if(g._isRes(q)){return o}if(i.hex_colors){p=p.replace(/rgb\([^\)]+\)/g,function(m){return g.toHex(m)})}if(i.url_converter){p=p.replace(/url\([\'\"]?([^\)\'\"]+)\)/g,function(m,r){return"url("+g.encode(i.url_converter.call(i.url_converter_scope||g,g.decode(r),n,l))+")"})}}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,l))}}}return" "+n+'="'+q+'" mce_'+n+'="'+p+'"'}h=h.replace(/ (src|href|style|coords|shape)=[\"]([^\"]+)[\"]/gi,k);h=h.replace(/ (src|href|style|coords|shape)=[\']([^\']+)[\']/gi,k);return h.replace(/ (src|href|style|coords|shape)=([^\s\"\'>]+)/gi,k)})}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(i,g,j){var f=this;return this.run(i,function(h){var l,k;h=f.get(h);j=j||h.ownerDocument||f.doc;if(a&&h.nodeType==1){h.outerHTML=g}else{k=j.createElement("body");k.innerHTML=g;l=k.lastChild;while(l){f.insertAfter(l.cloneNode(true),h);l=l.previousSibling}f.remove(h)}})},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|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}g.cloneNode(false).outerHTML.replace(/([a-z0-9\:\-_]+)=/gi,function(i,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)},_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.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)})}});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=="simple"){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){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_)/,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",bool_attrs:/(checked|disabled|readonly|selected|nowrap)/,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;p1){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]*>)(.*?)(<\/script>)/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,"");j=j.replace(/(type|language)=\"mce-/g,'$1="');if(k.entity_encoding=="raw"){j=j.replace(/

     <\/p>|]+)> <\/p>/g,"\u00a0

    ")}}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);if(document.domain&&j.hostname!=document.domain){f.relaxedDomain=document.domain}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);if(f.inArray(l,"compat2x")!=-1){b.load("compat2x","plugins/compat2x/editor_plugin"+f.suffix+".js")}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){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.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';F.iframeHTML+='';if(n.relaxedDomain){F.iframeHTML+='\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 000000000000 -r 03b0d1493584 web/wp-includes/shortcodes.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/shortcodes.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,297 @@ + + * $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) ); + + 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', '', $content); +} + +add_filter('the_content', 'do_shortcode', 11); // AFTER wpautop() + +?> \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-includes/streams.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/streams.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,191 @@ +. + + This file is part of PHP-gettext. + + PHP-gettext 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. + + PHP-gettext 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 PHP-gettext; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + */ + + +// Simple class to wrap file streams, string streams, etc. +// seek is essential, and it should be byte stream +class StreamReader { + // should return a string [FIXME: perhaps return array of bytes?] + function read($bytes) { + return false; + } + + // should return new position + function seekto($position) { + return false; + } + + // returns current position + function currentpos() { + return false; + } + + // returns length of entire stream (limit for seekto()s) + function length() { + return false; + } +} + +class StringReader { + var $_pos; + var $_str; + + function StringReader($str='') { + $this->_str = $str; + $this->_pos = 0; + // If string functions are overloaded, we need to use the mb versions + $this->is_overloaded = ((ini_get("mbstring.func_overload") & 2) != 0) && function_exists('mb_substr'); + } + + 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 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 currentpos() { + return $this->_pos; + } + + function length() { + return $this->_strlen($this->_str); + } +} + + +class FileReader { + var $_pos; + var $_fd; + var $_length; + + function FileReader($filename) { + if (file_exists($filename)) { + + $this->_length=filesize($filename); + $this->_pos = 0; + $this->_fd = fopen($filename,'rb'); + if (!$this->_fd) { + $this->error = 3; // Cannot read file, probably permissions + return false; + } + } else { + $this->error = 2; // File doesn't exist + return false; + } + } + + function read($bytes) { + if ($bytes) { + fseek($this->_fd, $this->_pos); + + // PHP 5.1.1 does not read more than 8192 bytes in one fread() + // the discussions at PHP Bugs suggest it's the intended behaviour + while ($bytes > 0) { + $chunk = fread($this->_fd, $bytes); + $data .= $chunk; + $bytes -= strlen($chunk); + } + $this->_pos = ftell($this->_fd); + + return $data; + } else return ''; + } + + function seekto($pos) { + fseek($this->_fd, $pos); + $this->_pos = ftell($this->_fd); + return $this->_pos; + } + + function currentpos() { + return $this->_pos; + } + + function length() { + return $this->_length; + } + + function close() { + fclose($this->_fd); + } + +} + +// Preloads entire file in memory first, then creates a StringReader +// over it (it assumes knowledge of StringReader internals) +class CachedFileReader extends StringReader { + function CachedFileReader($filename) { + parent::StringReader(); + + if (file_exists($filename)) { + + $length=filesize($filename); + $fd = fopen($filename,'rb'); + + if (!$fd) { + $this->error = 3; // Cannot read file, probably permissions + return false; + } + $this->_str = fread($fd, $length); + fclose($fd); + + } else { + $this->error = 2; // File doesn't exist + return false; + } + } +} + + +?> diff -r 000000000000 -r 03b0d1493584 web/wp-includes/taxonomy.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/taxonomy.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,2352 @@ + 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; + + 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) ); + 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) . "'"; + $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->term_relationships WHERE object_id = %d AND term_taxonomy_id IN ($in_tt_ids)", $object_id) ); + 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; + + $wpdb->update( $wpdb->term_taxonomy, compact( 'parent' ), array( 'parent' => $term_obj->term_id) + compact( 'taxonomy' ) ); + } + + $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); + } + + $wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->term_taxonomy WHERE term_taxonomy_id = %d", $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; + $wpdb->update($wpdb->terms, compact('term_group'), array('term_id' => $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); + $wpdb->update( $wpdb->terms, compact( 'slug' ), compact( '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); + 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); + 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; + $wpdb->insert( $wpdb->term_relationships, array( 'object_id' => $object_id, 'term_taxonomy_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) . "'"; + $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->term_relationships WHERE object_id = %d AND term_taxonomy_id IN ($in_delete_terms)", $object_id) ); + 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); + 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; + $wpdb->update( $wpdb->terms, compact('term_group'), array( 'term_id' => $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)); + } + + $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' ) ); + } + + $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) ); + + $wpdb->update( $wpdb->term_taxonomy, compact( 'term_id', 'taxonomy', 'description', 'parent' ), array( 'term_taxonomy_id' => $tt_id ) ); + + do_action("edit_term", $term_id, $tt_id); + 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); + 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) ); + $wpdb->update( $wpdb->term_taxonomy, compact( 'count' ), array( 'term_taxonomy_id' => $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 ) ); + $wpdb->update( $wpdb->term_taxonomy, compact( 'count' ), array( 'term_taxonomy_id' => $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 = 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 000000000000 -r 03b0d1493584 web/wp-includes/template-loader.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/template-loader.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,78 @@ + \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-includes/theme.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/theme.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,1155 @@ +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(); + $template_dir = get_theme_root() . "/$template"; + return apply_filters('template_directory', $template_dir, $template); +} + +/** + * 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(); + $template_dir_uri = get_theme_root_uri() . "/$template"; + return apply_filters('template_directory_uri', $template_dir_uri, $template); +} + +/** + * 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 ) { + $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 = implode( '', file( $theme_file ) ); + $theme_data = str_replace ( '\r', '\n', $theme_data ); + if ( preg_match( '|Theme Name:(.*)$|mi', $theme_data, $theme_name ) ) + $name = $theme = wp_kses( _cleanup_header_comment($theme_name[1]), $themes_allowed_tags ); + else + $name = $theme = ''; + + if ( preg_match( '|Theme URI:(.*)$|mi', $theme_data, $theme_uri ) ) + $theme_uri = esc_url( _cleanup_header_comment($theme_uri[1]) ); + else + $theme_uri = ''; + + if ( preg_match( '|Description:(.*)$|mi', $theme_data, $description ) ) + $description = wptexturize( wp_kses( _cleanup_header_comment($description[1]), $themes_allowed_tags ) ); + else + $description = ''; + + if ( preg_match( '|Author URI:(.*)$|mi', $theme_data, $author_uri ) ) + $author_uri = esc_url( _cleanup_header_comment($author_uri[1]) ); + else + $author_uri = ''; + + if ( preg_match( '|Template:(.*)$|mi', $theme_data, $template ) ) + $template = wp_kses( _cleanup_header_comment($template[1]), $themes_allowed_tags ); + else + $template = ''; + + if ( preg_match( '|Version:(.*)|i', $theme_data, $version ) ) + $version = wp_kses( _cleanup_header_comment($version[1]), $themes_allowed_tags ); + else + $version = ''; + + if ( preg_match('|Status:(.*)|i', $theme_data, $status) ) + $status = wp_kses( _cleanup_header_comment($status[1]), $themes_allowed_tags ); + else + $status = 'publish'; + + if ( preg_match('|Tags:(.*)|i', $theme_data, $tags) ) + $tags = array_map( 'trim', explode( ',', wp_kses( _cleanup_header_comment($tags[1]), array() ) ) ); + else + $tags = array(); + + if ( preg_match( '|Author:(.*)$|mi', $theme_data, $author_name ) ) { + if ( empty( $author_uri ) ) { + $author = wp_kses( _cleanup_header_comment($author_name[1]), $themes_allowed_tags ); + } else { + $author = sprintf( '%3$s', $author_uri, __( 'Visit author homepage' ), wp_kses( _cleanup_header_comment($author_name[1]), $themes_allowed_tags ) ); + } + } else { + $author = __('Anonymous'); + } + + return array( 'Name' => $name, 'Title' => $theme, 'URI' => $theme_uri, 'Description' => $description, 'Author' => $author, 'Version' => $version, 'Template' => $template, 'Status' => $status, 'Tags' => $tags ); +} + +/** + * 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; + + $themes = array(); + $wp_broken_themes = array(); + $theme_loc = $theme_root = get_theme_root(); + if ( '/' != WP_CONTENT_DIR ) // don't want to replace all forward slashes, see Trac #4541 + $theme_loc = str_replace(WP_CONTENT_DIR, '', $theme_root); + + // Files in wp-content/themes 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 == '..' || $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 . '/' . $theme_file; + $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_subdir = @ opendir( $subdir ); + while ( ($theme_dir = readdir($theme_subdir)) !== false ) { + if ( is_dir( $subdir . '/' . $theme_dir) && is_readable($subdir . '/' . $theme_dir) ) { + if ( $theme_dir{0} == '.' || $theme_dir == '..' || $theme_dir == 'CVS' ) + continue; + $stylish_dir = @ opendir($subdir . '/' . $theme_dir); + $found_stylesheet = false; + while ( ($theme_file = readdir($stylish_dir)) !== false ) { + if ( $theme_file == 'style.css' ) { + $theme_files[] = $subdir_name . '/' . $theme_dir . '/' . $theme_file; + $found_stylesheet = true; + break; + } + } + @closedir($stylish_dir); + } + } + @closedir($theme_subdir); + $wp_broken_themes[$theme_dir] = array('Name' => $theme_dir, 'Title' => $theme_dir, 'Description' => __('Stylesheet is missing.')); + } + } + } + if ( is_dir( $theme_dir ) ) + @closedir( $theme_dir ); + + if ( !$themes_dir || !$theme_files ) + return $themes; + + sort($theme_files); + + foreach ( (array) $theme_files as $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(dirname("$theme_root/$theme_file/index.php")) ) + $template = dirname($theme_file); + 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"; + } else { + $wp_broken_themes[$name] = array('Name' => $name, 'Title' => $title, 'Description' => __('Template is missing.')); + continue; + } + } + + $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_loc/$stylesheet/$file"; + elseif ( preg_match('|\.php$|', $file) ) + $template_files[] = "$theme_loc/$stylesheet/$file"; + } + } + @ $stylesheet_dir->close(); + } + + $template_dir = @ dir("$theme_root/$template"); + if ( $template_dir ) { + while ( ($file = $template_dir->read()) !== false ) { + if ( preg_match('|^\.+$|', $file) ) + continue; + if ( preg_match('|\.php$|', $file) ) { + $template_files[] = "$theme_loc/$template/$file"; + } elseif ( is_dir("$theme_root/$template/$file") ) { + $template_subdir = @ dir("$theme_root/$template/$file"); + while ( ($subfile = $template_subdir->read()) !== false ) { + if ( preg_match('|^\.+$|', $subfile) ) + continue; + if ( preg_match('|\.php$|', $subfile) ) + $template_files[] = "$theme_loc/$template/$file/$subfile"; + } + @ $template_subdir->close(); + } + } + @ $template_dir->close(); + } + + $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($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 = $themes[$name]['Stylesheet']; + $new_name = "$name/$suffix"; + $themes[$new_name] = $themes[$name]; + $themes[$new_name]['Name'] = $new_name; + } else { + $name = "$name/$stylesheet"; + } + } + + $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']); + } + + // Resolve theme dependencies. + $theme_names = array_keys($themes); + + foreach ( (array) $theme_names as $theme_name ) { + $themes[$theme_name]['Parent Theme'] = ''; + if ( $themes[$theme_name]['Stylesheet'] != $themes[$theme_name]['Template'] ) { + foreach ( (array) $theme_names as $parent_theme_name ) { + if ( ($themes[$parent_theme_name]['Stylesheet'] == $themes[$parent_theme_name]['Template']) && ($themes[$parent_theme_name]['Template'] == $themes[$theme_name]['Template']) ) { + $themes[$theme_name]['Parent Theme'] = $themes[$parent_theme_name]['Name']; + break; + } + } + } + } + + $wp_themes = $themes; + + return $themes; +} + +/** + * 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; +} + +/** + * Retrieve path to themes directory. + * + * Does not have trailing slash. + * + * @since 1.5.0 + * @uses apply_filters() Calls 'theme_root' filter on path. + * + * @return string Theme path. + */ +function get_theme_root() { + return apply_filters('theme_root', WP_CONTENT_DIR . "/themes"); +} + +/** + * Retrieve URI for themes directory. + * + * Does not have trailing slash. + * + * @since 1.5.0 + * + * @return string Themes URI. + */ +function get_theme_root_uri() { + return apply_filters('theme_root_uri', content_url('themes'), get_option('siteurl')); +} + +/** + * 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 retrieving the current category ID, for example 'category-1.php' and + * will fallback to category.php template, if the ID category file doesn't + * exist. + * + * @since 1.5.0 + * @uses apply_filters() Calls 'category_template' on file path of category template. + * + * @return string + */ +function get_category_template() { + $template = locate_template(array("category-" . absint( get_query_var('cat') ) . '.php', 'category.php')); + return apply_filters('category_template', $template); +} + +/** + * Retrieve path of tag template in current or parent template. + * + * Works by retrieving the current tag name, for example 'tag-wordpress.php' and will + * fallback to tag.php template, if the name tag file doesn't exist. + * + * @since 2.3.0 + * @uses apply_filters() Calls 'tag_template' on file path of tag template. + * + * @return string + */ +function get_tag_template() { + $template = locate_template(array("tag-" . get_query_var('tag') . '.php', 'tag.php')); + 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. + * + * First attempt is to look for the file in the '_wp_page_template' page meta + * data. The second attempt, if the first has a file and is not empty, is to + * look for '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); + + if ( 'default' == $template ) + $template = ''; + + $templates = array(); + if ( !empty($template) && !validate_file($template) ) + $templates[] = $template; + + $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.5.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 + * + * @return string + */ +function _preview_theme_template_filter() { + return isset($_GET['template']) ? $_GET['template'] : ''; +} + +/** + * Private function to modify the current stylesheet when previewing a theme + * + * @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 unknown + * @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 unknown + * @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')); +} + +?> diff -r 000000000000 -r 03b0d1493584 web/wp-includes/update.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/update.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,313 @@ +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($wpdb->users)); + 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' => 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' => 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 ); + + if( $time_not_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' ); + + $themes = array( ); + $themes['current_theme'] = (array) $current_theme; + foreach( (array) $installed_themes as $theme_title => $theme ) { + $themes[$theme['Stylesheet']] = array( ); + + foreach( (array) $theme as $key => $value ) { + $themes[$theme['Stylesheet']][$key] = $value; + } + } + + $options = array( + 'timeout' => 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->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( '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 000000000000 -r 03b0d1493584 web/wp-includes/user.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/user.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,603 @@ +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 = $wpdb->escape($_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 ); + + 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'); + + 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 ) + $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'); + + 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 $user_id Optional. User ID to setup global data. + */ +function setup_userdata($user_id = '') { + global $user_login, $userdata, $user_level, $user_ID, $user_email, $user_url, $user_pass_md5, $user_identity; + + if ( '' == $user_id ) + $user = wp_get_current_user(); + else + $user = new WP_User($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'); +} + +?> diff -r 000000000000 -r 03b0d1493584 web/wp-includes/vars.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/vars.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,84 @@ + \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-includes/version.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/version.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,34 @@ +' . __('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(); + + if ( empty($settings) ) { + // If there are none, we register the widget's existance with a + // generic template + $this->_set(1); + $this->_register_one(); + } elseif ( is_array($settings) ) { + foreach ( array_keys($settings) as $number ) { + if ( is_numeric($number) ) { + $this->_set($number); + $this->_register_one($number); + } + } + } + } + + 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", + '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'] ); +} + +/** + * 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']) ) + $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 000000000000 -r 03b0d1493584 web/wp-includes/wlwmanifest.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/wlwmanifest.xml Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,44 @@ + + + + + + WordPress + Yes + Yes + + + + WordPress + images/wlw/wp-icon.png + images/wlw/wp-watermark.png + View site + Dashboard + + + + + + + + + + + + + + + diff -r 000000000000 -r 03b0d1493584 web/wp-includes/wp-db.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/wp-db.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,1113 @@ + '%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; + + /** + * 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 ( defined('WP_DEBUG') and WP_DEBUG == true ) + $this->show_errors(); + + if ( defined('DB_CHARSET') ) + $this->charset = DB_CHARSET; + + if ( defined('DB_COLLATE') ) + $this->collate = DB_COLLATE; + + $this->dbh = @mysql_connect($dbhost, $dbuser, $dbpassword, true); + if (!$this->dbh) { + $this->bail(sprintf(/*WP_I18N_DB_CONN_ERROR*/' +

    Erreur lors de l’établissement de la connexion à la base de données

    +

    Cela signifie soit que l’identifiant et/ou le mot de passe indiqués dans votre fichier wp-config.php sont incorrects, ou que le serveur de base de données à l’adresse %s est inaccessible - ce qui implique que le serveur de base de données de votre hébergeur est sans doute défaillant.

    +
      +
    • Êtes-vous certain(e) d’avoir correctement indiqué votre identifiant et votre mot de passe ?
    • +
    • Êtes-vous certain(e) d’avoir entré le bon serveur de base de données ?
    • +
    • Êtes-vous certain(e) que le serveur de base de données fonctionne correctement ?
    • +
    +

    Si vous n’êtes pas sûr(e) de bien comprendre les mots de cette liste, vous devriez sans doute prendre contact avec votre hébergeur. Si malgré cela cette erreur s’affiche toujours, indiquez votre problème au forum d’entraide en français.

    +'/*/WP_I18N_DB_CONN_ERROR*/, $dbhost)); + return; + } + + $this->ready = true; + + if ( $this->has_cap( 'collation' ) ) { + if ( !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*/'Préfixe de la base de données invalide'/*/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*/' +

    Impossible de sélectionner la base de données

    +

    La connexion au serveur de base de données s’est bien faite (donc votre identifiant et votre mot de passe sont les bons), mais la base de données %1$s n’a pas pu être sélectionnée.

    +
      +
    • Êtes-vous certain(e) qu’elle existe ?
    • +
    • L’utilisateur %2$s a-t-il les droits pour utiliser la base de donné %1$s ?
    • +
    • Sur certains systèmes, le nom de votre base de données est préfixée de votre identifiant, donc son nom complet peut être identifiant_nomdelabase. Cela peut-il être la cause du problème&nbps;?
    • +
    +

    Si vous ne savez pas comment régler votre base de données, vous devriez prendre contact avec votre hébergeur. Si toutes vos tentatives échouent, peut-être trouverez-vous une réponse sur le forum d’entraide en français.

    '/*/WP_I18N_DB_SELECT_DB*/, $db, DB_USER)); + 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*/'Erreur de la base de données WordPress %1$s pour la requête %2$s faite par %3$s'/*/WP_I18N_DB_QUERY_ERROR_FULL*/, $str, $this->last_query, $caller); + else + $error_str = sprintf(/*WP_I18N_DB_QUERY_ERROR*/'Erreur de la base de données WordPress %1$s pour la requête %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) -- Le type de sortie doit être: 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 + * @return false|void + */ + function bail($message) { + if ( !$this->show_errors ) { + if ( class_exists('WP_Error') ) + $this->error = new WP_Error('500', $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.0 + if ( version_compare($this->db_version(), '4.0.0', '<') ) + return new WP_Error('database_version',sprintf(__('ERROR: WordPress %s requires MySQL 4.0.0 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 000000000000 -r 03b0d1493584 web/wp-includes/wp-diff.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-includes/wp-diff.php Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 web/wp-links-opml.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-links-opml.php Wed Dec 23 17:55:33 2009 +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 000000000000 -r 03b0d1493584 web/wp-load.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-load.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,54 @@ +wp-config.php. J’en ai besoin avant de lancer l’installation.
    Besoin d’aide ? En voici.

    Vous pouvez créer un fichier wp-config.php à l’aide de notre interface Web, mais ça ne marche pas pour toutes les configurations de serveur. La méthode la plus sûre reste de créer le fichier à la main.

    Créer le fichier de configuration'/*/WP_I18N_NO_CONFIG*/, $path), /*WP_I18N_ERROR_TITLE*/'WordPress » Erreur'/*/WP_I18N_ERROR_TITLE*/, array('text_direction' => $text_direction)); + +} + +?> diff -r 000000000000 -r 03b0d1493584 web/wp-login.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-login.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,556 @@ + 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; + + // 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"; + + $title = sprintf(__('[%s] Password Reset'), get_option('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"; + + $title = sprintf(__('[%s] Your new password'), get_option('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 ); + + 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')) && 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 the user can't edit posts, send them to their profile. + if ( !$user->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'); + + 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 000000000000 -r 03b0d1493584 web/wp-mail.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-mail.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,213 @@ + Writing + * + * @package WordPress + */ + +/** Make sure that the WordPress bootstrap has run before continuing. */ +require(dirname(__FILE__) . '/wp-load.php'); + +/** Get the POP3 class with which to access the mailbox. */ +require_once( ABSPATH . WPINC . '/class-pop3.php' ); + +$time_difference = get_option('gmt_offset') * 3600; + +$phone_delim = '::'; + +$pop3 = new POP3(); + +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 000000000000 -r 03b0d1493584 web/wp-pass.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-pass.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,19 @@ + \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-rdf.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-rdf.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,12 @@ + \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-register.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-register.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,15 @@ + \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-rss.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-rss.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,12 @@ + \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-rss2.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-rss2.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,12 @@ + \ No newline at end of file diff -r 000000000000 -r 03b0d1493584 web/wp-settings.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-settings.php Wed Dec 23 17:55:33 2009 +0000 @@ -0,0 +1,691 @@ + $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 ); + +// Force REQUEST to be GET + POST. If SERVER, COOKIE, or ENV are needed, use those superglobals directly. +$_REQUEST = array_merge($_GET, $_POST); + +/** + * 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*/'Votre serveur utilise la version %s de PHP mais WordPress nécéssite au moins la version 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' ); +?> + + + + + 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') and WP_DEBUG == true) { + error_reporting(E_ALL); +} else { + 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') ) + @include WP_CONTENT_DIR . '/advanced-cache.php'; + +/** + * 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*/'ERREUR: la ligne $table_prefix du fichier wp-config.php ne doit contenir que des chiffres, lettres ou le caractère souligné.'/*/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; +} + +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')); + 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 . '/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 ); + + +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 = 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); + +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'); + +/** + * 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 000000000000 -r 03b0d1493584 web/wp-trackback.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/wp-trackback.php Wed Dec 23 17:55:33 2009 +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 ( !$_GET['tb_id'] ) { + $tb_id = explode('/', $_SERVER['REQUEST_URI']); + $tb_id = intval( $tb_id[ count($tb_id) - 1 ] ); +} + +$tb_url = $_POST['url']; +$charset = $_POST['charset']; + +// These three are stripslashed here so that they can be properly escaped after mb_convert_encoding() +$title = stripslashes($_POST['title']); +$excerpt = stripslashes($_POST['excerpt']); +$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 ( !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 000000000000 -r 03b0d1493584 web/xmlrpc.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/xmlrpc.php Wed Dec 23 17:55:33 2009 +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); + $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' + ) + ); + + $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 = (int) $args[3]; + + 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'); + + $page_limit = 10; + if( isset( $num_pages ) ) { + $page_limit = $num_pages; + } + + $pages = get_posts( array('post_type' => 'page', 'post_status' => 'all', 'numberposts' => $page_limit) ); + $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( empty( $o_value ) ) + continue; + + 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 = apply_filters( 'content_save_pre', $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 = '-1' 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 = apply_filters( 'content_save_pre', $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 -1 + $post_id = -1; + $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(); + +?>