Added: web/php-wiki/trunk/dokuwiki/lib/plugins/include/COPYING =================================================================== --- web/php-wiki/trunk/dokuwiki/lib/plugins/include/COPYING (rev 0) +++ web/php-wiki/trunk/dokuwiki/lib/plugins/include/COPYING 2011-06-19 03:08:23 UTC (rev 312269) @@ -0,0 +1,340 @@ + 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) + + 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) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. Added: web/php-wiki/trunk/dokuwiki/lib/plugins/include/README =================================================================== --- web/php-wiki/trunk/dokuwiki/lib/plugins/include/README (rev 0) +++ web/php-wiki/trunk/dokuwiki/lib/plugins/include/README 2011-06-19 03:08:23 UTC (rev 312269) @@ -0,0 +1,11 @@ +====== Include Plugin for DokuWiki ====== + +All documentation for the Include Plugin is available online at: + + * http://dokuwiki.org/plugin:include + +(c) 2005 - 2007 by Esther Brunner and Christopher +Smith +(c) 2008 - 2009 by Gina Häußge, Michael Klier +(c) 2010 - 2011 by Michael Hamann , Gina Häußge and Michael Klier +See COPYING for license info. Added: web/php-wiki/trunk/dokuwiki/lib/plugins/include/_test/include.group.php =================================================================== --- web/php-wiki/trunk/dokuwiki/lib/plugins/include/_test/include.group.php (rev 0) +++ web/php-wiki/trunk/dokuwiki/lib/plugins/include/_test/include.group.php 2011-06-19 03:08:23 UTC (rev 312269) @@ -0,0 +1,9 @@ +addTestFile($dir . 'nested_include.test.php'); + } +} Property changes on: web/php-wiki/trunk/dokuwiki/lib/plugins/include/_test/include.group.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date LastChangedDate LastChangedRevision Author LastChangedBy HeadURL URL Added: svn:eol-style + native Added: web/php-wiki/trunk/dokuwiki/lib/plugins/include/_test/nested_include.test.php =================================================================== --- web/php-wiki/trunk/dokuwiki/lib/plugins/include/_test/nested_include.test.php (rev 0) +++ web/php-wiki/trunk/dokuwiki/lib/plugins/include/_test/nested_include.test.php 2011-06-19 03:08:23 UTC (rev 312269) @@ -0,0 +1,69 @@ +ids as $id) { + saveWikiText($id,'','deleted in tearDown()'); + @unlink(metaFN($id, '.meta')); + } + } + + public function setUp() { + saveWikiText('test:plugin_include:nested:start', + '====== Main Test Page ======'.DOKU_LF.DOKU_LF + .'Main Content'.DOKU_LF.DOKU_LF + .'{{page>second}}'.DOKU_LF, + 'setup for test'); + saveWikiText('test:plugin_include:nested:second', + '====== Second Test Page ======'.DOKU_LF.DOKU_LF + .'Second Content'.DOKU_LF.DOKU_LF + .'{{page>third}}'.DOKU_LF, + 'setup for test'); + saveWikiText('test:plugin_include:nested:third', + '====== Third Test Page ======'.DOKU_LF.DOKU_LF + .'Third Content'.DOKU_LF.DOKU_LF + .'{{page>third}}'.DOKU_LF, + 'setup for test'); + } + + public function testOuterToInner() { + $mainHTML = p_wiki_xhtml('test:plugin_include:nested:start'); + $secondHTML = p_wiki_xhtml('test:plugin_include:nested:second'); + $thirdHTML = p_wiki_xhtml('test:plugin_include:nested:third'); + $this->_validateContent($mainHTML, $secondHTML, $thirdHTML); + } + + public function testInnerToOuter() { + $thirdHTML = p_wiki_xhtml('test:plugin_include:nested:third'); + $secondHTML = p_wiki_xhtml('test:plugin_include:nested:second'); + $mainHTML = p_wiki_xhtml('test:plugin_include:nested:start'); + $this->_validateContent($mainHTML, $secondHTML, $thirdHTML); + } + + private function _validateContent($mainHTML, $secondHTML, $thirdHTML) { + $this->assertTrue(strpos($mainHTML, 'Main Content') !== false, 'Main content contains "Main Content"'); + $this->assertTrue($this->_matchHeader('1', 'Main Test Page', $mainHTML), 'Main page header is h1'); + $this->assertTrue(strpos($mainHTML, 'Second Content') !== false, 'Main content contains "Second Content"'); + $this->assertTrue($this->_matchHeader('2', 'Second Test Page', $mainHTML), 'Second page header on main page is h2'); + $this->assertTrue(strpos($mainHTML, 'Third Content') !== false, 'Main content contains "Third Content"'); + $this->assertTrue($this->_matchHeader('3', 'Third Test Page', $mainHTML), 'Third page header on main page is h3'); + $this->assertTrue(strpos($secondHTML, 'Second Content') !== false, 'Second content contains "Second Content"'); + $this->assertTrue($this->_matchHeader('1', 'Second Test Page', $secondHTML), 'Second page header on second page is h1'); + $this->assertTrue(strpos($secondHTML, 'Third Content') !== false, 'Second content contains "Third Content"'); + $this->assertTrue($this->_matchHeader('2', 'Third Test Page', $secondHTML), 'Third page header on second page is h2'); + $this->assertTrue(strpos($thirdHTML, 'Third Content') !== false, 'Third content contains "Third Content"'); + $this->assertTrue($this->_matchHeader('1', 'Third Test Page', $thirdHTML), 'Third page header on third page is h1'); + } + + private function _matchHeader($level, $text, $html) { + return preg_match('/]*>]*>'.$text.'/', $html) > 0; + } +} + Property changes on: web/php-wiki/trunk/dokuwiki/lib/plugins/include/_test/nested_include.test.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date LastChangedDate LastChangedRevision Author LastChangedBy HeadURL URL Added: svn:eol-style + native Added: web/php-wiki/trunk/dokuwiki/lib/plugins/include/action.php =================================================================== --- web/php-wiki/trunk/dokuwiki/lib/plugins/include/action.php (rev 0) +++ web/php-wiki/trunk/dokuwiki/lib/plugins/include/action.php 2011-06-19 03:08:23 UTC (rev 312269) @@ -0,0 +1,220 @@ + + * @author Michael Klier + */ +if(!defined('DOKU_INC')) die(); // no Dokuwiki, no go + +if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/'); +require_once(DOKU_PLUGIN.'action.php'); + +/** + * All DokuWiki plugins to extend the parser/rendering mechanism + * need to inherit from this class + */ +class action_plugin_include extends DokuWiki_Action_Plugin { + + var $supportedModes = array('xhtml', 'metadata'); + var $helper = null; + + function action_plugin_include() { + $this->helper = plugin_load('helper', 'include'); + } + + /** + * plugin should use this method to register its handlers with the dokuwiki's event controller + */ + function register(&$controller) { + $controller->register_hook('PARSER_CACHE_USE','BEFORE', $this, '_cache_prepare'); + $controller->register_hook('HTML_EDITFORM_OUTPUT', 'BEFORE', $this, 'handle_form'); + $controller->register_hook('HTML_CONFLICTFORM_OUTPUT', 'BEFORE', $this, 'handle_form'); + $controller->register_hook('HTML_DRAFTFORM_OUTPUT', 'BEFORE', $this, 'handle_form'); + $controller->register_hook('ACTION_SHOW_REDIRECT', 'BEFORE', $this, 'handle_redirect'); + $controller->register_hook('PARSER_HANDLER_DONE', 'BEFORE', $this, 'handle_parser'); + $controller->register_hook('PARSER_METADATA_RENDER', 'AFTER', $this, 'handle_metadata'); + $controller->register_hook('HTML_SECEDIT_BUTTON', 'BEFORE', $this, 'handle_secedit_button'); + } + + /** + * Used for debugging purposes only + */ + function handle_metadata(&$event, $param) { + global $conf; + if($conf['allowdebug']) { + dbglog('---- PLUGIN INCLUDE META DATA START ----'); + dbglog($event->data); + dbglog('---- PLUGIN INCLUDE META DATA END ----'); + } + } + + /** + * Supplies the current section level to the include syntax plugin + * + * @author Michael Klier + * @author Michael Hamann + */ + function handle_parser(&$event, $param) { + global $ID; + + $level = 0; + $ins =& $event->data->calls; + $num = count($ins); + for($i=0; $i<$num; $i++) { + switch($ins[$i][0]) { + case 'plugin': + switch($ins[$i][1][0]) { + case 'include_include': + $ins[$i][1][1][] = $level; + break; + /* FIXME: this doesn't work anymore that way with the new structure + // some plugins already close open sections + // so we need to make sure we don't close them twice + case 'box': + $this->helper->sec_close = false; + break; + */ + } + break; + case 'section_open': + $level = $ins[$i][1][0]; + break; + } + } + } + + /** + * Add a hidden input to the form to preserve the redirect_id + */ + function handle_form(&$event, $param) { + if (array_key_exists('redirect_id', $_REQUEST)) { + $event->data->addHidden('redirect_id', cleanID($_REQUEST['redirect_id'])); + } + } + + /** + * Modify the data for the redirect when there is a redirect_id set + */ + function handle_redirect(&$event, $param) { + if (array_key_exists('redirect_id', $_REQUEST)) { + // Render metadata when this is an older DokuWiki version where + // metadata is not automatically re-rendered as the page has probably + // been changed but is not directly displayed + $versionData = getVersionData(); + if ($versionData['date'] < '2010-11-23') { + p_set_metadata($event->data['id'], array(), true); + } + $event->data['id'] = cleanID($_REQUEST['redirect_id']); + $event->data['title'] = ''; + } + } + + /** + * prepare the cache object for default _useCache action + */ + function _cache_prepare(&$event, $param) { + global $conf; + + $cache =& $event->data; + + if(!isset($cache->page)) return; + if(!isset($cache->mode) || !in_array($cache->mode, $this->supportedModes)) return; + + $depends = p_get_metadata($cache->page, 'plugin_include'); + + if($conf['allowdebug']) { + dbglog('---- PLUGIN INCLUDE CACHE DEPENDS START ----'); + dbglog($depends); + dbglog('---- PLUGIN INCLUDE CACHE DEPENDS END ----'); + } + + if (!is_array($depends)) return; // nothing to do for us + + if (!is_array($depends['pages']) || + !is_array($depends['instructions']) || + $depends['pages'] != $this->helper->_get_included_pages_from_meta_instructions($depends['instructions']) || + // the include_content url parameter may change the behavior for included pages + $depends['include_content'] != isset($_REQUEST['include_content'])) { + + $cache->depends['purge'] = true; // included pages changed or old metadata - request purge. + if($conf['allowdebug']) { + dbglog('---- PLUGIN INCLUDE: REQUESTING CACHE PURGE ----'); + dbglog('---- PLUGIN INCLUDE CACHE PAGES FROM META START ----'); + dbglog($depends['pages']); + dbglog('---- PLUGIN INCLUDE CACHE PAGES FROM META END ----'); + dbglog('---- PLUGIN INCLUDE CACHE PAGES FROM META_INSTRUCTIONS START ----'); + dbglog($this->helper->_get_included_pages_from_meta_instructions($depends['instructions'])); + dbglog('---- PLUGIN INCLUDE CACHE PAGES FROM META_INSTRUCTIONS END ----'); + + } + } else { + // add plugin.info.txt to depends for nicer upgrades + $cache->depends['files'][] = dirname(__FILE__) . '/plugin.info.txt'; + foreach ($depends['pages'] as $page) { + if (!$page['exists']) continue; + $file = wikiFN($page['id']); + if (!in_array($file, $cache->depends['files'])) { + $cache->depends['files'][] = $file; + } + } + } + } + + /** + * Handle special section edit buttons for the include plugin to get the current page + * and replace normal section edit buttons when the current page is different from the + * global $ID. + */ + function handle_secedit_button(&$event, $params) { + // stack of included pages in the form ('id' => page, 'rev' => modification time, 'writable' => bool) + static $page_stack = array(); + + global $ID; + + $data = $event->data; + + if ($data['target'] == 'plugin_include_start' || $data['target'] == 'plugin_include_start_noredirect') { + // handle the "section edits" added by the include plugin + $fn = wikiFN($data['name']); + array_unshift($page_stack, array( + 'id' => $data['name'], + 'rev' => @filemtime($fn), + 'writable' => (is_writable($fn) && auth_quickaclcheck($data['name']) >= AUTH_EDIT), + 'redirect' => ($data['target'] == 'plugin_include_start'), + )); + } elseif ($data['target'] == 'plugin_include_end') { + array_shift($page_stack); + } elseif (!empty($page_stack)) { + if ($page_stack[0]['writable']) { + $name = $data['name']; + unset($data['name']); + + $secid = $data['secid']; + unset($data['secid']); + + if ($page_stack[0]['redirect']) + $data['redirect_id'] = $ID; + + $event->result = "
" . + html_btn('secedit', $page_stack[0]['id'], '', + array_merge(array('do' => 'edit', + 'rev' => $page_stack[0]['rev'], + 'summary' => '['.$name.'] '), $data), + 'post', $name) . '
'; + } else { + $event->result = ''; + } + } else { + return; // return so the event won't be stopped + } + + $event->preventDefault(); + $event->stopPropagation(); + } +} +// vim:ts=4:sw=4:et: Property changes on: web/php-wiki/trunk/dokuwiki/lib/plugins/include/action.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date LastChangedDate LastChangedRevision Author LastChangedBy HeadURL URL Added: svn:eol-style + native Added: web/php-wiki/trunk/dokuwiki/lib/plugins/include/conf/default.php =================================================================== --- web/php-wiki/trunk/dokuwiki/lib/plugins/include/conf/default.php (rev 0) +++ web/php-wiki/trunk/dokuwiki/lib/plugins/include/conf/default.php 2011-06-19 03:08:23 UTC (rev 312269) @@ -0,0 +1,21 @@ + + */ +$meta['firstseconly'] = array('onoff'); +$meta['showtaglogos'] = array('onoff'); +$meta['showfooter'] = array('onoff'); +$meta['showlink'] = array('onoff'); +$meta['showpermalink'] = array('onoff'); +$meta['showdate'] = array('onoff'); +$meta['showuser'] = array('onoff'); +$meta['showcomments'] = array('onoff'); +$meta['showlinkbacks'] = array('onoff'); +$meta['showtags'] = array('onoff'); +$meta['showeditbtn'] = array('onoff'); +$meta['doredirect'] = array('onoff'); +$meta['usernamespace'] = array('string'); +$meta['doindent'] = array('onoff'); +$meta['linkonly'] = array('onoff'); + +//Setup VIM: ex: et ts=2 : Property changes on: web/php-wiki/trunk/dokuwiki/lib/plugins/include/conf/metadata.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date LastChangedDate LastChangedRevision Author LastChangedBy HeadURL URL Added: svn:eol-style + native Added: web/php-wiki/trunk/dokuwiki/lib/plugins/include/helper.php =================================================================== --- web/php-wiki/trunk/dokuwiki/lib/plugins/include/helper.php (rev 0) +++ web/php-wiki/trunk/dokuwiki/lib/plugins/include/helper.php 2011-06-19 03:08:23 UTC (rev 312269) @@ -0,0 +1,592 @@ + + * @author Christopher Smith + * @author Gina Häußge, Michael Klier + */ + +// must be run within Dokuwiki +if (!defined('DOKU_INC')) die(); + +if (!defined('DOKU_LF')) define('DOKU_LF', "\n"); +if (!defined('DOKU_TAB')) define('DOKU_TAB', "\t"); +if (!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN', DOKU_INC.'lib/plugins/'); + +require_once(DOKU_INC.'inc/search.php'); + +class helper_plugin_include extends DokuWiki_Plugin { // DokuWiki_Helper_Plugin + + var $defaults = array(); + var $sec_close = true; + var $taghelper = null; + var $includes = array(); // deprecated - compatibility code for the blog plugin + + /** + * Constructor loads default config settings once + */ + function helper_plugin_include() { + $this->defaults['firstsec'] = $this->getConf('firstseconly'); + $this->defaults['editbtn'] = $this->getConf('showeditbtn'); + $this->defaults['taglogos'] = $this->getConf('showtaglogos'); + $this->defaults['footer'] = $this->getConf('showfooter'); + $this->defaults['redirect'] = $this->getConf('doredirect'); + $this->defaults['date'] = $this->getConf('showdate'); + $this->defaults['user'] = $this->getConf('showuser'); + $this->defaults['comments'] = $this->getConf('showcomments'); + $this->defaults['linkbacks'] = $this->getConf('showlinkbacks'); + $this->defaults['tags'] = $this->getConf('showtags'); + $this->defaults['link'] = $this->getConf('showlink'); + $this->defaults['permalink'] = $this->getConf('showpermalink'); + $this->defaults['indent'] = $this->getConf('doindent'); + $this->defaults['linkonly'] = $this->getConf('linkonly'); + $this->defaults['inline'] = false; + } + + /** + * Available methods for other plugins + */ + function getMethods() { + $result = array(); + $result[] = array( + 'name' => 'get_flags', + 'desc' => 'overrides standard values for showfooter and firstseconly settings', + 'params' => array('flags' => 'array'), + ); + return $result; + } + + /** + * Overrides standard values for showfooter and firstseconly settings + */ + function get_flags($setflags) { + // load defaults + $flags = array(); + $flags = $this->defaults; + foreach ($setflags as $flag) { + switch ($flag) { + case 'footer': + $flags['footer'] = 1; + break; + case 'nofooter': + $flags['footer'] = 0; + break; + case 'firstseconly': + case 'firstsectiononly': + $flags['firstsec'] = 1; + break; + case 'fullpage': + $flags['firstsec'] = 0; + break; + case 'noheader': + $flags['noheader'] = 1; + break; + case 'editbtn': + case 'editbutton': + $flags['editbtn'] = 1; + break; + case 'noeditbtn': + case 'noeditbutton': + $flags['editbtn'] = 0; + break; + case 'permalink': + $flags['permalink'] = 1; + break; + case 'nopermalink': + $flags['permalink'] = 0; + break; + case 'redirect': + $flags['redirect'] = 1; + break; + case 'noredirect': + $flags['redirect'] = 0; + break; + case 'link': + $flags['link'] = 1; + break; + case 'nolink': + $flags['link'] = 0; + break; + case 'user': + $flags['user'] = 1; + break; + case 'nouser': + $flags['user'] = 0; + break; + case 'comments': + $flags['comments'] = 1; + break; + case 'nocomments': + $flags['comments'] = 0; + break; + case 'linkbacks': + $flags['linkbacks'] = 1; + break; + case 'nolinkbacks': + $flags['linkbacks'] = 0; + break; + case 'tags': + $flags['tags'] = 1; + break; + case 'notags': + $flags['tags'] = 0; + break; + case 'date': + $flags['date'] = 1; + break; + case 'nodate': + $flags['date'] = 0; + break; + case 'indent': + $flags['indent'] = 1; + break; + case 'noindent': + $flags['indent'] = 0; + break; + case 'linkonly': + $flags['linkonly'] = 1; + break; + case 'nolinkonly': + case 'include_content': + $flags['linkonly'] = 0; + break; + case 'inline': + $flags['inline'] = 1; + break; + } + } + // the include_content URL parameter overrides flags + if (isset($_REQUEST['include_content'])) + $flags['linkonly'] = 0; + return $flags; + } + + /** + * Returns the converted instructions of a give page/section + * + * @author Michael Klier + * @author Michael Hamann + */ + function _get_instructions($page, $sect, $mode, $lvl, $flags, $root_id = null) { + $key = ($sect) ? $page . '#' . $sect : $page; + $this->includes[$key] = true; // legacy code for keeping compatibility with other plugins + + // keep compatibility with other plugins that don't know the $root_id parameter + if (is_null($root_id)) { + global $ID; + $root_id = $ID; + } + + if ($flags['linkonly']) { + $ins = array( + array('p_open', array()), + array('internallink', array(':'.$key)), + array('p_close', array()), + ); + } else { + if (page_exists($page)) { + $ins = p_cached_instructions(wikiFN($page)); + } else { + $ins = array(); + } + + $this->_convert_instructions($ins, $lvl, $page, $sect, $flags, $root_id); + } + return $ins; + } + + /** + * Converts instructions of the included page + * + * The funcion iterates over the given list of instructions and generates + * an index of header and section indicies. It also removes document + * start/end instructions, converts links, and removes unwanted + * instructions like tags, comments, linkbacks. + * + * Later all header/section levels are convertet to match the current + * inclusion level. + * + * @author Michael Klier + */ + function _convert_instructions(&$ins, $lvl, $page, $sect, $flags, $root_id) { + global $conf; + + // filter instructions if needed + if(!empty($sect)) { + $this->_get_section($ins, $sect); // section required + } + + if($flags['firstsec']) { + $this->_get_firstsec($ins, $page); // only first section + } + + $ns = getNS($page); + $num = count($ins); + + $conv_idx = array(); // conversion index + $lvl_max = false; // max level + $first_header = -1; + $no_header = false; + $sect_title = false; + + for($i=0; $i<$num; $i++) { + switch($ins[$i][0]) { + case 'document_start': + case 'document_end': + case 'section_edit': + unset($ins[$i]); + break; + case 'header': + // get section title of first section + if($sect && !$sect_title) { + $sect_title = $ins[$i][1][0]; + } + // check if we need to skip the first header + if((!$no_header) && $flags['noheader']) { + $no_header = true; + } + + $conv_idx[] = $i; + // get index of first header + if($first_header == -1) $first_header = $i; + // get max level of this instructions set + if(!$lvl_max || ($ins[$i][1][1] < $lvl_max)) { + $lvl_max = $ins[$i][1][1]; + } + break; + case 'section_open': + if ($flags['inline']) + unset($ins[$i]); + else + $conv_idx[] = $i; + break; + case 'section_close': + if ($flags['inline']) + unset($ins[$i]); + case 'internallink': + case 'internalmedia': + // make sure parameters aren't touched + $link_params = ''; + $link_id = $ins[$i][1][0]; + $link_parts = explode('?', $link_id, 2); + if (count($link_parts) === 2) { + $link_id = $link_parts[0]; + $link_params = $link_parts[1]; + } + // resolve the id without cleaning it + $link_id = resolve_id($ns, $link_id, false); + // this id is internal (i.e. absolute) now, add ':' to make resolve_id work again + if ($link_id{0} != ':') $link_id = ':'.$link_id; + // restore parameters + $ins[$i][1][0] = ($link_params != '') ? $link_id.'?'.$link_params : $link_id; + break; + case 'plugin': + // FIXME skip other plugins? + switch($ins[$i][1][0]) { + case 'tag_tag': // skip tags + case 'discussion_comments': // skip comments + case 'linkback': // skip linkbacks + case 'data_entry': // skip data plugin + case 'meta': // skip meta plugin + unset($ins[$i]); + break; + // adapt indentation level of nested includes + case 'include_include': + if (!$flags['inline'] && $flags['indent']) + $ins[$i][1][1][4] += $lvl; + break; + } + break; + default: + break; + } + } + + // calculate difference between header/section level and include level + $diff = 0; + if (!isset($lvl_max)) $lvl_max = 0; // if no level found in target, set to 0 + $diff = $lvl - $lvl_max + 1; + if ($no_header) $diff -= 1; // push up one level if "noheader" + + // convert headers and set footer/permalink + $hdr_deleted = false; + $has_permalink = false; + $footer_lvl = false; + $contains_secedit = false; + $section_close_at = false; + foreach($conv_idx as $idx) { + if($ins[$idx][0] == 'header') { + if ($section_close_at === false) { + // store the index of the first heading (the begin of the first section) + $section_close_at = $idx; + } + + if($no_header && !$hdr_deleted) { + unset ($ins[$idx]); + $hdr_deleted = true; + continue; + } + + if($flags['indent']) { + $lvl_new = (($ins[$idx][1][1] + $diff) > 5) ? 5 : ($ins[$idx][1][1] + $diff); + $ins[$idx][1][1] = $lvl_new; + } + + if($ins[$idx][1][1] <= $conf['maxseclevel']) + $contains_secedit = true; + + // set permalink + if($flags['link'] && !$has_permalink && ($idx == $first_header)) { + $this->_permalink($ins[$idx], $page, $sect, $flags); + $has_permalink = true; + } + + // set footer level + if(!$footer_lvl && ($idx == $first_header) && !$no_header) { + if($flags['indent']) { + $footer_lvl = $lvl_new; + } else { + $footer_lvl = $lvl_max; + } + } + } else { + // it's a section + if($flags['indent']) { + $lvl_new = (($ins[$idx][1][0] + $diff) > 5) ? 5 : ($ins[$idx][1][0] + $diff); + $ins[$idx][1][0] = $lvl_new; + } + + // check if noheader is used and set the footer level to the first section + if($no_header && !$footer_lvl) { + if($flags['indent']) { + $footer_lvl = $lvl_new; + } else { + $footer_lvl = $lvl_max; + } + } + } + } + + // close last open section of the included page if there is any + if ($contains_secedit) { + array_push($ins, array('plugin', array('include_close_last_secedit', array()))); + } + + // add edit button + if($flags['editbtn']) { + $perm = auth_quickaclcheck($page); + $can_edit = page_exists($page) ? $perm >= AUTH_EDIT : $perm >= AUTH_CREATE; + if ($can_edit) + $this->_editbtn($ins, $page, $sect, $sect_title, ($flags['redirect'] ? $root_id : false)); + } + + // add footer + if($flags['footer']) { + $ins[] = $this->_footer($page, $sect, $sect_title, $flags, $footer_lvl, $root_id); + } + + // wrap content at the beginning of the include that is not in a section in a section + if ($lvl > 0 && $section_close_at !== 0 && $flags['indent'] && !$flags['inline']) { + if ($section_close_at === false) { + $ins[] = array('section_close', array()); + array_unshift($ins, array('section_open', array($lvl))); + } else { + $section_close_idx = array_search($section_close_at, array_keys($ins)); + if ($section_close_idx > 0) { + $before_ins = array_slice($ins, 0, $section_close_idx); + $after_ins = array_slice($ins, $section_close_idx); + $ins = array_merge($before_ins, array(array('section_close', array())), $after_ins); + array_unshift($ins, array('section_open', array($lvl))); + } + } + } + + // add instructions entry wrapper + array_unshift($ins, array('plugin', array('include_wrap', array('open', $page, $flags['redirect'])))); + array_push($ins, array('plugin', array('include_wrap', array('close')))); + + // close previous section if any and re-open after inclusion + if($lvl != 0 && $this->sec_close && !$flags['inline']) { + array_unshift($ins, array('section_close', array())); + $ins[] = array('section_open', array($lvl)); + } + } + + /** + * Appends instruction item for the include plugin footer + * + * @author Michael Klier + */ + function _footer($page, $sect, $sect_title, $flags, $footer_lvl, $root_id) { + $footer = array(); + $footer[0] = 'plugin'; + $footer[1] = array('include_footer', array($page, $sect, $sect_title, $flags, $root_id, $footer_lvl)); + return $footer; + } + + /** + * Appends instruction item for an edit button + * + * @author Michael Klier + */ + function _editbtn(&$ins, $page, $sect, $sect_title, $root_id) { + $editbtn = array(); + $editbtn[0] = 'plugin'; + $editbtn[1] = array('include_editbtn', array($page, $sect, $sect_title, $root_id)); + $ins[] = $editbtn; + } + + /** + * Convert instruction item for a permalink header + * + * @author Michael Klier + */ + function _permalink(&$ins, $page, $sect, $flags) { + $ins[0] = 'plugin'; + $ins[1] = array('include_header', array($ins[1][0], $ins[1][1], $page, $sect, $flags)); + } + + /** + * Get a section including its subsections + * + * @author Michael Klier + */ + function _get_section(&$ins, $sect) { + $num = count($ins); + $offset = false; + $lvl = false; + $end = false; + + $check = array(); // used for sectionID() in order to get the same ids as the xhtml renderer + + for($i=0; $i<$num; $i++) { + if ($ins[$i][0] == 'header') { + + // found the right header + if (sectionID($ins[$i][1][0], $check) == $sect) { + $offset = $i; + $lvl = $ins[$i][1][1]; + } elseif ($offset && $lvl && ($ins[$i][1][1] <= $lvl)) { + $end = $i - $offset; + break; + } + } + } + $offset = $offset ? $offset : 0; + $end = $end ? $end : ($num - 1); + if(is_array($ins)) { + $ins = array_slice($ins, $offset, $end); + } + } + + /** + * Only display the first section of a page and a readmore link + * + * @author Michael Klier + */ + function _get_firstsec(&$ins, $page) { + $num = count($ins); + $first_sect = false; + for($i=0; $i<$num; $i++) { + if($ins[$i][0] == 'section_close') { + $first_sect = $i; + } + if(($first_sect) && ($ins[$i][0] == 'section_open')) { + $ins = array_slice($ins, 0, $first_sect); + $ins[] = array('p_open', array()); + $ins[] = array('internallink', array($page, $this->getLang('readmore'))); + $ins[] = array('p_close', array()); + $ins[] = array('section_close', array()); + return; + } + } + } + + /** + * Gives a list of pages for a given include statement + * + * @author Michael Hamann + */ + function _get_included_pages($mode, $page, $sect, $parent_id) { + global $conf; + $pages = array(); + switch($mode) { + case 'namespace': + $ns = str_replace(':', '/', cleanID($page)); + search($pagearrays, $conf['datadir'], 'search_list', '', $ns); + if (is_array($pagearrays)) { + foreach ($pagearrays as $pagearray) { + $pages[] = $pagearray['id']; + } + } + break; + case 'tagtopic': + if (!$this->taghelper) + $this->taghelper =& plugin_load('helper', 'tag'); + if(!$this->taghelper) { + msg('You have to install the tag plugin to use this functionality!', -1); + return array(); + } + $tag = $page; + $sect = ''; + $pagearrays = $this->taghelper->getTopic('', null, $tag); + foreach ($pagearrays as $pagearray) { + $pages[] = $pagearray['id']; + } + break; + default: + $page = $this->_apply_macro($page); + resolve_pageid(getNS($parent_id), $page, $exists); // resolve shortcuts and clean ID + if (auth_quickaclcheck($page) >= AUTH_READ) + $pages[] = $page; + } + + sort($pages); + + $result = array(); + foreach ($pages as $page) { + $perm = auth_quickaclcheck($page); + $exists = page_exists($page); + $result[] = array('id' => $page, 'exists' => $exists, 'can_edit' => ($perm >= AUTH_EDIT), 'parent_id' => $parent_id); + } + return $result; + } + + /** + * This function generates the list of all included pages from a list of metadata + * instructions. + */ + function _get_included_pages_from_meta_instructions($instructions) { + $pages = array(); + foreach ($instructions as $instruction) { + extract($instruction); + $pages = array_merge($pages, $this->_get_included_pages($mode, $page, $sect, $parent_id)); + } + return $pages; + } + + /** + * Makes user or date dependent includes possible + */ + function _apply_macro($id) { + global $INFO; + global $auth; + + // if we don't have an auth object, do nothing + if (!$auth) return $id; + + $user = $_SERVER['REMOTE_USER']; + $group = $INFO['userinfo']['grps'][0]; + + $replace = array( + '@USER@' => cleanID($user), + '@NAME@' => cleanID($INFO['userinfo']['name']), + '@GROUP@' => cleanID($group), + '@YEAR@' => date('Y'), + '@MONTH@' => date('m'), + '@DAY@' => date('d'), + ); + return str_replace(array_keys($replace), array_values($replace), $id); + } +} +// vim:ts=4:sw=4:et: Property changes on: web/php-wiki/trunk/dokuwiki/lib/plugins/include/helper.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date LastChangedDate LastChangedRevision Author LastChangedBy HeadURL URL Added: svn:eol-style + native Added: web/php-wiki/trunk/dokuwiki/lib/plugins/include/images/comment.gif =================================================================== (Binary files differ) Property changes on: web/php-wiki/trunk/dokuwiki/lib/plugins/include/images/comment.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: web/php-wiki/trunk/dokuwiki/lib/plugins/include/images/date.gif =================================================================== (Binary files differ) Property changes on: web/php-wiki/trunk/dokuwiki/lib/plugins/include/images/date.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: web/php-wiki/trunk/dokuwiki/lib/plugins/include/images/link.gif =================================================================== (Binary files differ) Property changes on: web/php-wiki/trunk/dokuwiki/lib/plugins/include/images/link.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: web/php-wiki/trunk/dokuwiki/lib/plugins/include/images/user.gif =================================================================== (Binary files differ) Property changes on: web/php-wiki/trunk/dokuwiki/lib/plugins/include/images/user.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/ar/lang.php =================================================================== --- web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/ar/lang.php (rev 0) +++ web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/ar/lang.php 2011-06-19 03:08:23 UTC (rev 312269) @@ -0,0 +1,12 @@ + +* http://www.hali-sy.com +*/ + +// custom language strings for the plugin +$lang['readmore'] = ' ←إقرأ المزيد... '; + Property changes on: web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/ar/lang.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date LastChangedDate LastChangedRevision Author LastChangedBy HeadURL URL Added: svn:eol-style + native Added: web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/ar/settings.php =================================================================== --- web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/ar/settings.php (rev 0) +++ web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/ar/settings.php 2011-06-19 03:08:23 UTC (rev 312269) @@ -0,0 +1,21 @@ + +* http://www.hali-sy.com +*/ + +// for the configuration manager +$lang['firstseconly'] = 'عرض القسم الأول من الصفحات المضمّنة'; +$lang['showtaglogos'] = 'عرض الصورة لأول قسم'; +$lang['showfooter'] = 'عرض معلومات الصفحة المضمّنة'; +$lang['showlink'] = 'عرض رابط التتبع للصفحة المضمّنة'; +$lang['showdate'] = 'عرض التاريخ للصفحة المضمّنة'; +$lang['showuser'] = 'عرض إسم المستخدم للصفحة المضمّنة'; +$lang['showcomments'] = 'عرض تعليقات الصفحة المضمّنة'; +$lang['showtags'] = 'عرض الأقسام أسف الصفحة المضمّنة'; +$lang['usernamespace'] = 'فضاء الأسماء لصفحات المستخدم'; + +//Setup VIM: ex: et ts=2 : \ No newline at end of file Property changes on: web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/ar/settings.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date LastChangedDate LastChangedRevision Author LastChangedBy HeadURL URL Added: svn:eol-style + native Added: web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/cs/lang.php =================================================================== --- web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/cs/lang.php (rev 0) +++ web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/cs/lang.php 2011-06-19 03:08:23 UTC (rev 312269) @@ -0,0 +1,12 @@ + + */ + +// custom language strings for the plugin +$lang['readmore'] = '→ Číst dále...'; + +//Setup VIM: ex: et ts=2 : Property changes on: web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/cs/lang.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date LastChangedDate LastChangedRevision Author LastChangedBy HeadURL URL Added: svn:eol-style + native Added: web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/cs/settings.php =================================================================== --- web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/cs/settings.php (rev 0) +++ web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/cs/settings.php 2011-06-19 03:08:23 UTC (rev 312269) @@ -0,0 +1,22 @@ + + */ + +// for the configuration manager +$lang['firstseconly'] = 'zobrazovat pouze první sekci vkládaných stránek'; +$lang['showtaglogos'] = 'zobrazovat obrázek prvních tagů'; +$lang['showfooter'] = 'zobrazovat dole info o vkládané stránce'; +$lang['showlink'] = 'zobrazovat dole permalinky vkládaných stránek'; +$lang['showdate'] = 'zobrazovat dole datum vkládané stránky'; +$lang['showuser'] = 'zobrazovat dole jméno uživatele vkládaných stránek'; +$lang['showcomments'] = 'zobrazovat dole komentář u vkládaných stránek vyžadován Discussion plugin)'; +$lang['showlinkbacks'] = 'zobrazovat dole zpětné odkazy vkládaných stránek (vyžadován Linkback plugin)'; +$lang['showtags'] = 'zobrazovat dole tagy vkládaných stránek (vyžadován Tag plugin)'; +$lang['showeditbtn'] = 'zobrazovat tlačítko pro editaci'; +$lang['usernamespace'] = 'jmenný prostor pro uživatelské stránky'; + +//Setup VIM: ex: et ts=2 : Property changes on: web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/cs/settings.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date LastChangedDate LastChangedRevision Author LastChangedBy HeadURL URL Added: svn:eol-style + native Added: web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/de/lang.php =================================================================== --- web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/de/lang.php (rev 0) +++ web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/de/lang.php 2011-06-19 03:08:23 UTC (rev 312269) @@ -0,0 +1,12 @@ + + */ + +// custom language strings for the plugin +$lang['readmore'] = '→ Weiter lesen...'; + +//Setup VIM: ex: et ts=2 : \ No newline at end of file Property changes on: web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/de/lang.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date LastChangedDate LastChangedRevision Author LastChangedBy HeadURL URL Added: svn:eol-style + native Added: web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/de/settings.php =================================================================== --- web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/de/settings.php (rev 0) +++ web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/de/settings.php 2011-06-19 03:08:23 UTC (rev 312269) @@ -0,0 +1,24 @@ + + */ + +// for the configuration manager +$lang['firstseconly'] = 'Nur erster Abschnitt von eingebundenen Seiten'; +$lang['showtaglogos'] = 'Bild für erstes Tag anzeigen'; +$lang['showfooter'] = 'Infos über eingebundene Seite darunter anzeigen'; +$lang['showlink'] = 'Permalink unter eingebunderer Seite anzeigen'; +$lang['showdate'] = 'Datum unter eingebunderer Seite anzeigen'; +$lang['showuser'] = 'Autorenname unter eingebunderer Seite anzeigen'; +$lang['showcomments'] = 'Kommentare unter eingebundener Seite anzeigen (Discussion Plugin wird benötigt)'; +$lang['showlinkbacks'] = 'Linkbacks unter eingebundener Seite anzeigen (Linkback Plugin wird benötigt)'; +$lang['showtags'] = 'Tags unter eingebundener Seite anzeigen (Tag Plugin wird benötigt)'; +$lang['showeditbtn'] = 'Bearbeiten-Tasten anzeigen'; +$lang['doredirect'] = 'Nach dem Bearbeiten der eingebundenen Seite zur ursprünglichen Seite weiterleiten'; +$lang['usernamespace'] = 'Namensraum für Benutzerseiten'; +$lang['linkonly'] = 'Nur einen Link anzeigen statt dem Inhalt der eingebundenen Seite'; + +//Setup VIM: ex: et ts=2 : Property changes on: web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/de/settings.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date LastChangedDate LastChangedRevision Author LastChangedBy HeadURL URL Added: svn:eol-style + native Added: web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/en/lang.php =================================================================== --- web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/en/lang.php (rev 0) +++ web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/en/lang.php 2011-06-19 03:08:23 UTC (rev 312269) @@ -0,0 +1,12 @@ + + */ + +// custom language strings for the plugin +$lang['readmore'] = '→ Read more...'; + +//Setup VIM: ex: et ts=2 : \ No newline at end of file Property changes on: web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/en/lang.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date LastChangedDate LastChangedRevision Author LastChangedBy HeadURL URL Added: svn:eol-style + native Added: web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/en/settings.php =================================================================== --- web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/en/settings.php (rev 0) +++ web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/en/settings.php 2011-06-19 03:08:23 UTC (rev 312269) @@ -0,0 +1,26 @@ + + */ + +// for the configuration manager +$lang['firstseconly'] = 'show only the first section of included pages'; +$lang['showtaglogos'] = 'show image for first tag'; +$lang['showfooter'] = 'show info about included page below'; +$lang['showlink'] = 'link first headline of included page'; +$lang['showpermalink'] = 'show permalinks below included page'; +$lang['showdate'] = 'show dates below included page'; +$lang['showuser'] = 'show usernames below included page'; +$lang['showcomments'] = 'show comments below included page (Discussion plugin needed)'; +$lang['showlinkbacks'] = 'show linkbacks below included page (Linkback Plugin needed)'; +$lang['showtags'] = 'show tags below included page (Tag Plugin needed)'; +$lang['showeditbtn'] = 'show edit button'; +$lang['doredirect'] = 'redirect to the original page after editing the included page'; +$lang['usernamespace'] = 'namespace for user pages'; +$lang['doindent'] = 'indent included pages relative to the page they get included in'; +$lang['linkonly'] = 'link only to the included page instead of showing the content'; + +//Setup VIM: ex: et ts=2 : Property changes on: web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/en/settings.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date LastChangedDate LastChangedRevision Author LastChangedBy HeadURL URL Added: svn:eol-style + native Added: web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/es/lang.php =================================================================== --- web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/es/lang.php (rev 0) +++ web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/es/lang.php 2011-06-19 03:08:23 UTC (rev 312269) @@ -0,0 +1,12 @@ + + */ + +// frases personalizadas en español para el plugin +$lang['readmore'] = 'Leer más...'; + +//Setup VIM: ex: et ts=2 : Property changes on: web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/es/lang.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date LastChangedDate LastChangedRevision Author LastChangedBy HeadURL URL Added: svn:eol-style + native Added: web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/es/settings.php =================================================================== --- web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/es/settings.php (rev 0) +++ web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/es/settings.php 2011-06-19 03:08:23 UTC (rev 312269) @@ -0,0 +1,20 @@ + + */ + +// para el gestor de configuraciones (configuration manager) +$lang['firstseconly'] = 'mostrar solamente la primera sección de las entradas al blog'; +$lang['showtaglogos'] = 'mostrar imagen para la primera etiqueta'; +$lang['showfooter'] = 'mostrar en la parte inferior información acerca de la entrada al blog'; +$lang['showlink'] = 'mostrar los enlaces a continuación de las entradas al blog'; +$lang['showdate'] = 'mostrar la fecha a continuación de las entradas al blog'; +$lang['showuser'] = 'mostrar los nombres de usuarios a continuación de las entradas al blog'; +$lang['showcomments'] = 'mostrar comentarios a continuación de las entradas al blog'; +$lang['showtags'] = 'mostrar etiquetas a continuación de la entrada al blog'; +$lang['usernamespace'] = 'namespace para las páginas de usuario'; + +//Setup VIM: ex: et ts=2 : Property changes on: web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/es/settings.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date LastChangedDate LastChangedRevision Author LastChangedBy HeadURL URL Added: svn:eol-style + native Added: web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/fr/lang.php =================================================================== --- web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/fr/lang.php (rev 0) +++ web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/fr/lang.php 2011-06-19 03:08:23 UTC (rev 312269) @@ -0,0 +1,12 @@ + + */ + +// custom language strings for the plugin +$lang['readmore'] = 'Lire la suite...'; + +//Setup VIM: ex: et ts=2 : \ No newline at end of file Property changes on: web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/fr/lang.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date LastChangedDate LastChangedRevision Author LastChangedBy HeadURL URL Added: svn:eol-style + native Added: web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/fr/settings.php =================================================================== --- web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/fr/settings.php (rev 0) +++ web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/fr/settings.php 2011-06-19 03:08:23 UTC (rev 312269) @@ -0,0 +1,17 @@ + + * @author Stanislas Reltgen + */ + +// for the configuration manager +$lang['firstseconly'] = 'afficher uniquement la premiere section des billets'; +$lang['showlink'] = 'afficher les permaliens sous les billets'; +$lang['showdate'] = 'afficher les dates sous les billets'; +$lang['showuser'] = "afficher le nom de l'utilisateur sous les billets"; +$lang['usernamespace'] = 'espace de nom pour les pages des utilisateurs'; + +//Setup VIM: ex: et ts=2 : \ No newline at end of file Property changes on: web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/fr/settings.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date LastChangedDate LastChangedRevision Author LastChangedBy HeadURL URL Added: svn:eol-style + native Added: web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/hu/lang.php =================================================================== --- web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/hu/lang.php (rev 0) +++ web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/hu/lang.php 2011-06-19 03:08:23 UTC (rev 312269) @@ -0,0 +1,12 @@ + + */ + +// custom language strings for the plugin +$lang['readmore'] = 'tovább...'; + +//Setup VIM: ex: et ts=2 : \ No newline at end of file Property changes on: web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/hu/lang.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date LastChangedDate LastChangedRevision Author LastChangedBy HeadURL URL Added: svn:eol-style + native Added: web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/hu/settings.php =================================================================== --- web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/hu/settings.php (rev 0) +++ web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/hu/settings.php 2011-06-19 03:08:23 UTC (rev 312269) @@ -0,0 +1,14 @@ + + */ + +// for the configuration manager +$lang['firstseconly'] = 'a blog bejegyzések első bekezdését mutassa'; +$lang['showdate'] = 'mutassa a dátumot a blog bejegyzések alatt'; +$lang['showuser'] = 'mutassa a felhasználónevet a blog bejegyzések alatt'; + +//Setup VIM: ex: et ts=2 : \ No newline at end of file Property changes on: web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/hu/settings.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date LastChangedDate LastChangedRevision Author LastChangedBy HeadURL URL Added: svn:eol-style + native Added: web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/it/lang.php =================================================================== --- web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/it/lang.php (rev 0) +++ web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/it/lang.php 2011-06-19 03:08:23 UTC (rev 312269) @@ -0,0 +1,12 @@ + + */ + +// custom language strings for the plugin +$lang['readmore'] = '→ Leggi tutto...'; + +//Setup VIM: ex: et ts=2 : Property changes on: web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/it/lang.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date LastChangedDate LastChangedRevision Author LastChangedBy HeadURL URL Added: svn:eol-style + native Added: web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/it/settings.php =================================================================== --- web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/it/settings.php (rev 0) +++ web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/it/settings.php 2011-06-19 03:08:23 UTC (rev 312269) @@ -0,0 +1,16 @@ + + */ + +// for the configuration manager +$lang['firstseconly'] = 'Mostra nel blog solo la prima sezione degli articoli'; +$lang['showlink'] = 'Mostra un link all\'articolo sotto le voci del blog'; +$lang['showdate'] = 'Mostra la data sotto le voci del blog'; +$lang['showuser'] = 'Mostra il nome dell\'autore sotto le voci del blog'; +$lang['usernamespace'] = 'Namespace per le pagine degli utenti'; + +//Setup VIM: ex: et ts=2 : Property changes on: web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/it/settings.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date LastChangedDate LastChangedRevision Author LastChangedBy HeadURL URL Added: svn:eol-style + native Added: web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/nl/lang.php =================================================================== --- web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/nl/lang.php (rev 0) +++ web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/nl/lang.php 2011-06-19 03:08:23 UTC (rev 312269) @@ -0,0 +1,12 @@ + + */ + +// custom language strings for the plugin +$lang['readmore'] = '→ Lees verder...'; + +//Setup VIM: ex: et ts=2 : \ No newline at end of file Property changes on: web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/nl/lang.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date LastChangedDate LastChangedRevision Author LastChangedBy HeadURL URL Added: svn:eol-style + native Added: web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/pt-br/lang.php =================================================================== --- web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/pt-br/lang.php (rev 0) +++ web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/pt-br/lang.php 2011-06-19 03:08:23 UTC (rev 312269) @@ -0,0 +1,12 @@ + + */ + +// custom language strings for the plugin +$lang['readmore'] = '→ leia mais...'; + +//Setup VIM: ex: et ts=2 : Property changes on: web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/pt-br/lang.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date LastChangedDate LastChangedRevision Author LastChangedBy HeadURL URL Added: svn:eol-style + native Added: web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/pt-br/settings.php =================================================================== --- web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/pt-br/settings.php (rev 0) +++ web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/pt-br/settings.php 2011-06-19 03:08:23 UTC (rev 312269) @@ -0,0 +1,14 @@ + + */ + +// for the configuration manager +$lang['firstseconly'] = 'mostrar apenas primeira seção de registros do blog'; +$lang['showdate'] = 'mostrar datas abaixo dos registros do blog'; +$lang['showuser'] = 'mostrar usernames abaixo dos registros do blog'; + +//Setup VIM: ex: et ts=2 : Property changes on: web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/pt-br/settings.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date LastChangedDate LastChangedRevision Author LastChangedBy HeadURL URL Added: svn:eol-style + native Added: web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/ru/lang.php =================================================================== --- web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/ru/lang.php (rev 0) +++ web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/ru/lang.php 2011-06-19 03:08:23 UTC (rev 312269) @@ -0,0 +1,13 @@ + + * @author Aleksandr Selivanov + */ + +// custom language strings for the plugin +$lang['readmore'] = '→ Читать дальше...'; + +//Setup VIM: ex: et ts=2 : Property changes on: web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/ru/lang.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date LastChangedDate LastChangedRevision Author LastChangedBy HeadURL URL Added: svn:eol-style + native Added: web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/ru/settings.php =================================================================== --- web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/ru/settings.php (rev 0) +++ web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/ru/settings.php 2011-06-19 03:08:23 UTC (rev 312269) @@ -0,0 +1,26 @@ + + * @author Aleksandr Selivanov + */ + +// for the configuration manager +$lang['firstseconly'] = 'Показывать только первую секцию внедряемой страницы'; +$lang['showtaglogos'] = 'Показывать изображение для первого тега'; +$lang['showfooter'] = 'Снизу показывать информацию о внедряемой странице'; +$lang['showlink'] = 'Снизу показывать статичную ссылку на внедряемую страницу'; +$lang['showpermalink'] = 'Снизу показывать пермассылку на внедряемую страницу'; +$lang['showdate'] = 'Снизу показывать дату создания внедряемой страницы'; +$lang['showuser'] = 'Снизу показывать имя пользователя'; +$lang['showcomments'] = 'Показывать комментарии ниже внедряемой страницы (требуется плагин «Обсуждение»)'; +$lang['showlinkbacks'] = 'Показывать обратные ссылки ниже внедряемой страницы (требуется плагин «Обратные ссылки»)'; +$lang['showtags'] = 'Показывать теги ниже внедряемой страницы (требуется плагин «Тег»)'; +$lang['showeditbtn'] = 'Показывать кнопку «Править»'; +$lang['doredirect'] = 'Переходить на оригинальную страницу после редактирования внедрённой страницы'; +$lang['usernamespace'] = 'Пространство имён для страниц пользователей'; +$lang['doindent'] = 'Создавать отступ для внедряемой страницы относительно основной страницы'; + +//Setup VIM: ex: et ts=2 : Property changes on: web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/ru/settings.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date LastChangedDate LastChangedRevision Author LastChangedBy HeadURL URL Added: svn:eol-style + native Added: web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/sl-si/lang.php =================================================================== --- web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/sl-si/lang.php (rev 0) +++ web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/sl-si/lang.php 2011-06-19 03:08:23 UTC (rev 312269) @@ -0,0 +1,12 @@ + + */ + +// custom language strings for the plugin +$lang['readmore'] = '→ Preberi več...'; + +//Setup VIM: ex: et ts=2 : \ No newline at end of file Property changes on: web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/sl-si/lang.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date LastChangedDate LastChangedRevision Author LastChangedBy HeadURL URL Added: svn:eol-style + native Added: web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/sl-si/settings.php =================================================================== --- web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/sl-si/settings.php (rev 0) +++ web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/sl-si/settings.php 2011-06-19 03:08:23 UTC (rev 312269) @@ -0,0 +1,18 @@ + + */ + +// for the configuration manager +$lang['firstseconly'] = 'prikaži samo prvo sekcijo blog vnosov'; + +$lang['showlink'] = 'prikaži permalinke pod blog vnosi'; +$lang['showdate'] = 'prikaži datume pod blog vnosi'; +$lang['showuser'] = 'prikaži uporabniška imena pod blog vnosi'; + +$lang['usernamespace'] = 'namespace za uporabniške strani'; + +//Setup VIM: ex: et ts=2 : \ No newline at end of file Property changes on: web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/sl-si/settings.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date LastChangedDate LastChangedRevision Author LastChangedBy HeadURL URL Added: svn:eol-style + native Added: web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/sv/lang.php =================================================================== --- web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/sv/lang.php (rev 0) +++ web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/sv/lang.php 2011-06-19 03:08:23 UTC (rev 312269) @@ -0,0 +1,12 @@ + + */ + +// custom language strings for the plugin +$lang['readmore'] = '→ Läs mer...'; + +//Setup VIM: ex: et ts=2 : \ No newline at end of file Property changes on: web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/sv/lang.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date LastChangedDate LastChangedRevision Author LastChangedBy HeadURL URL Added: svn:eol-style + native Added: web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/sv/settings.php =================================================================== --- web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/sv/settings.php (rev 0) +++ web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/sv/settings.php 2011-06-19 03:08:23 UTC (rev 312269) @@ -0,0 +1,16 @@ + + */ + +// for the configuration manager +$lang['firstseconly'] = 'visa endast första delen av inlägg'; +$lang['showlink'] = 'visa permalinks under inlägg'; +$lang['showdate'] = 'visa datum under inlägg'; +$lang['showuser'] = 'visa användarnamn under inlägg'; +$lang['usernamespace'] = 'vy för användarsidor'; + +//Setup VIM: ex: et ts=2 : \ No newline at end of file Property changes on: web/php-wiki/trunk/dokuwiki/lib/plugins/include/lang/sv/settings.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date LastChangedDate LastChangedRevision Author LastChangedBy HeadURL URL Added: svn:eol-style + native Added: web/php-wiki/trunk/dokuwiki/lib/plugins/include/plugin.info.txt =================================================================== --- web/php-wiki/trunk/dokuwiki/lib/plugins/include/plugin.info.txt (rev 0) +++ web/php-wiki/trunk/dokuwiki/lib/plugins/include/plugin.info.txt 2011-06-19 03:08:23 UTC (rev 312269) @@ -0,0 +1,7 @@ +base include +author Michael Hamann, Gina Häussge, Christopher Smith, Michael Klier, Esther Brunner +email plugin-include@content-space.de +date 2011-01-01 +name include plugin +desc Functions to include another page in a wiki page +url http://dokuwiki.org/plugin:include Property changes on: web/php-wiki/trunk/dokuwiki/lib/plugins/include/plugin.info.txt ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Added: svn:eol-style + native Added: web/php-wiki/trunk/dokuwiki/lib/plugins/include/script.js =================================================================== --- web/php-wiki/trunk/dokuwiki/lib/plugins/include/script.js (rev 0) +++ web/php-wiki/trunk/dokuwiki/lib/plugins/include/script.js 2011-06-19 03:08:23 UTC (rev 312269) @@ -0,0 +1,35 @@ +/** + * Javascript functionality for the include plugin + */ + +/** + * Highlight the included section when hovering over the appropriate include edit button + * + * @author Andreas Gohr + * @author Michael Klier + * @author Michael Hamann + */ +addInitEvent(function(){ + var btns = getElementsByClass('btn_incledit',document,'form'); + for(var i=0; i + */ + +if (!defined('DOKU_PLUGIN')) + define('DOKU_PLUGIN', DOKU_INC . 'lib/plugins/'); + +class syntax_plugin_include_close_last_secedit extends DokuWiki_Syntax_Plugin { + + function getType() { + return 'formatting'; + } + + function getSort() { + return 50; + } + + function handle($match, $state, $pos, &$handler) { + // this is a syntax plugin that doesn't offer any syntax, so there's nothing to handle by the parser + } + + /** + * Finishes the last open section edit + */ + function render($mode, &$renderer, $data) { + if ($mode == 'xhtml') { + $renderer->finishSectionEdit(); + return true; + } + return false; + } +} +// vim:ts=4:sw=4:et: Property changes on: web/php-wiki/trunk/dokuwiki/lib/plugins/include/syntax/close_last_secedit.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date LastChangedDate LastChangedRevision Author LastChangedBy HeadURL URL Added: svn:eol-style + native Added: web/php-wiki/trunk/dokuwiki/lib/plugins/include/syntax/editbtn.php =================================================================== --- web/php-wiki/trunk/dokuwiki/lib/plugins/include/syntax/editbtn.php (rev 0) +++ web/php-wiki/trunk/dokuwiki/lib/plugins/include/syntax/editbtn.php 2011-06-19 03:08:23 UTC (rev 312269) @@ -0,0 +1,58 @@ + + */ + +if (!defined('DOKU_INC')) + define('DOKU_INC', realpath(dirname(__FILE__) . '/../../') . '/'); +if (!defined('DOKU_PLUGIN')) + define('DOKU_PLUGIN', DOKU_INC . 'lib/plugins/'); +require_once (DOKU_PLUGIN . 'syntax.php'); + +class syntax_plugin_include_editbtn extends DokuWiki_Syntax_Plugin { + + function getType() { + return 'formatting'; + } + + function getSort() { + return 50; + } + + function handle($match, $state, $pos, &$handler) { + // this is a syntax plugin that doesn't offer any syntax, so there's nothing to handle by the parser + } + + /** + * Renders an include edit button + * + * @author Michael Klier + */ + function render($mode, &$renderer, $data) { + global $lang; + list($page, $sect, $sect_title, $redirect_id) = $data; + if ($mode == 'xhtml') { + $title = ($sect) ? $sect_title : $page; + $params = array('do' => 'edit', + 'id' => $page); + if ($redirect_id !== false) + $params['redirect_id'] = $redirect_id; + $xhtml .= '
' . DOKU_LF; + $xhtml .= '
' . DOKU_LF; + foreach($params as $key => $val) { + $xhtml .= ''; + } + $xhtml .= '' . DOKU_LF; + $xhtml .= '
' . DOKU_LF; + $xhtml .= '
' . DOKU_LF; + $renderer->doc .= $xhtml; + return true; + } + return false; + } +} +// vim:ts=4:sw=4:et: Property changes on: web/php-wiki/trunk/dokuwiki/lib/plugins/include/syntax/editbtn.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date LastChangedDate LastChangedRevision Author LastChangedBy HeadURL URL Added: svn:eol-style + native Added: web/php-wiki/trunk/dokuwiki/lib/plugins/include/syntax/footer.php =================================================================== --- web/php-wiki/trunk/dokuwiki/lib/plugins/include/syntax/footer.php (rev 0) +++ web/php-wiki/trunk/dokuwiki/lib/plugins/include/syntax/footer.php 2011-06-19 03:08:23 UTC (rev 312269) @@ -0,0 +1,135 @@ + + */ + +if (!defined('DOKU_INC')) + define('DOKU_INC', realpath(dirname(__FILE__) . '/../../') . '/'); +if (!defined('DOKU_PLUGIN')) + define('DOKU_PLUGIN', DOKU_INC . 'lib/plugins/'); +require_once (DOKU_PLUGIN . 'syntax.php'); + +class syntax_plugin_include_footer extends DokuWiki_Syntax_Plugin { + + function getType() { + return 'formatting'; + } + + function getSort() { + return 300; + } + + function handle($match, $state, $pos, &$handler) { + // this is a syntax plugin that doesn't offer any syntax, so there's nothing to handle by the parser + } + + /** + * Renders a permalink header. + * + * Code heavily copied from the header renderer from inc/parser/xhtml.php, just + * added an href parameter to the anchor tag linking to the wikilink. + */ + function render($mode, &$renderer, $data) { + + list($page, $sect, $sect_title, $flags, $redirect_id, $footer_lvl) = $data; + + if ($mode == 'xhtml') { + $renderer->doc .= $this->html_footer($page, $sect, $sect_title, $flags, $footer_lvl, $renderer); + return true; + } + return false; + } + + /** + * Returns the meta line below the included page + */ + function html_footer($page, $sect, $sect_title, $flags, $footer_lvl, &$renderer) { + global $conf, $ID; + + if(!$flags['footer']) return ''; + + $meta = p_get_metadata($page); + $xhtml = array(); + + // permalink + if ($flags['permalink']) { + $class = (page_exists($page) ? 'wikilink1' : 'wikilink2'); + $url = ($sect) ? wl($page) . '#' . $sect : wl($page); + $name = ($sect) ? $sect_title : $page; + $title = ($sect) ? $page . '#' . $sect : $page; + if (!$title) $title = str_replace('_', ' ', noNS($page)); + $link = array( + 'url' => $url, + 'title' => $title, + 'name' => $name, + 'target' => $conf['target']['wiki'], + 'class' => $class . ' permalink', + 'more' => 'rel="bookmark"', + ); + $xhtml[] = $renderer->_formatLink($link); + } + + // date + if ($flags['date']) { + $date = $meta['date']['created']; + if ($date) { + $xhtml[] = '' + . strftime($conf['dformat'], $date) + . ''; + } + } + + // author + if ($flags['user']) { + $author = $meta['creator']; + if ($author) { + $userpage = cleanID($this->getConf('usernamespace').':'.$author); + resolve_pageid(getNS($ID), $userpage, $exists); + $class = ($exists ? 'wikilink1' : 'wikilink2'); + $link = array( + 'url' => wl($userpage), + 'title' => $userpage, + 'name' => hsc($author), + 'target' => $conf['target']['wiki'], + 'class' => $class.' url fn', + 'pre' => '', + 'suf' => '', + ); + $xhtml[] = $renderer->_formatLink($link); + } + } + + // comments - let Discussion Plugin do the work for us + if (empty($sect) && $flags['comments'] && (!plugin_isdisabled('discussion')) && ($discussion =& plugin_load('helper', 'discussion'))) { + $disc = $discussion->td($page); + if ($disc) $xhtml[] = '' . $disc . ''; + } + + // linkbacks - let Linkback Plugin do the work for us + if (empty($sect) && $flags['linkbacks'] && (!plugin_isdisabled('linkback')) && ($linkback =& plugin_load('helper', 'linkback'))) { + $link = $linkback->td($page); + if ($link) $xhtml[] = '' . $link . ''; + } + + $xhtml = implode(DOKU_LF . DOKU_TAB . '· ', $xhtml); + + // tags - let Tag Plugin do the work for us + if (empty($sect) && $flags['tags'] && (!plugin_isdisabled('tag')) && ($tag =& plugin_load('helper', 'tag'))) { + $tags = $tag->td($page); + if($tags) { + $xhtml .= '
' . DOKU_LF + . DOKU_TAB . $tags . DOKU_LF + . DOKU_TAB . '
' . DOKU_LF; + } + } + + if (!$xhtml) $xhtml = ' '; + $class = 'inclmeta'; + $class .= ' level' . $footer_lvl; + return '
' . DOKU_LF . DOKU_TAB . $xhtml . DOKU_LF . '
' . DOKU_LF; + } +} +// vim:ts=4:sw=4:et: Property changes on: web/php-wiki/trunk/dokuwiki/lib/plugins/include/syntax/footer.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date LastChangedDate LastChangedRevision Author LastChangedBy HeadURL URL Added: svn:eol-style + native Added: web/php-wiki/trunk/dokuwiki/lib/plugins/include/syntax/header.php =================================================================== --- web/php-wiki/trunk/dokuwiki/lib/plugins/include/syntax/header.php (rev 0) +++ web/php-wiki/trunk/dokuwiki/lib/plugins/include/syntax/header.php 2011-06-19 03:08:23 UTC (rev 312269) @@ -0,0 +1,85 @@ + + * @author Michael Klier + */ + +if (!defined('DOKU_INC')) + define('DOKU_INC', realpath(dirname(__FILE__) . '/../../') . '/'); +if (!defined('DOKU_PLUGIN')) + define('DOKU_PLUGIN', DOKU_INC . 'lib/plugins/'); +require_once (DOKU_PLUGIN . 'syntax.php'); + +class syntax_plugin_include_header extends DokuWiki_Syntax_Plugin { + + function getType() { + return 'formatting'; + } + + function getSort() { + return 50; + } + + function handle($match, $state, $pos, &$handler) { + // this is a syntax plugin that doesn't offer any syntax, so there's nothing to handle by the parser + } + + /** + * Renders a permalink header. + * + * Code heavily copied from the header renderer from inc/parser/xhtml.php, just + * added an href parameter to the anchor tag linking to the wikilink. + */ + function render($mode, &$renderer, $data) { + list($headline, $lvl, $page, $sect, $flags) = $data; + $hid = $renderer->_headerToLink($headline); + if ($mode == 'xhtml') { + $renderer->toc_additem($hid, $headline, $lvl); + $url = ($sect) ? wl($page) . '#' . $sect : wl($page); + $renderer->doc .= DOKU_LF.'_get_firsttag($page); + if($tag) { + $renderer->doc .= ' class="include_firsttag__' . $tag . '"'; + } + } + $headline = $renderer->_xmlEntities($headline); + $renderer->doc .= '>'; + $renderer->doc .= $headline; + $renderer->doc .= '' . DOKU_LF; + return true; + } elseif($mode == 'metadata') { + $renderer->toc_additem($hid, $headline, $lvl); + return true; + } + return false; + } + + /** + * Optionally add a CSS class for the first tag + * + * @author Michael Klier + */ + function _get_firsttag($page) { + if(plugin_isdisabled('tag') || (!$taghelper =& plugin_load('helper', 'tag'))) { + return false; + } + $subject = p_get_metadata($page, 'subject'); + if (is_array($subject)) { + $tag = $subject[0]; + } else { + list($tag, $rest) = explode(' ', $subject, 2); + } + if($tag) { + return $tag; + } else { + return false; + } + } +} +// vim:ts=4:sw=4:et: Property changes on: web/php-wiki/trunk/dokuwiki/lib/plugins/include/syntax/header.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date LastChangedDate LastChangedRevision Author LastChangedBy HeadURL URL Added: svn:eol-style + native Added: web/php-wiki/trunk/dokuwiki/lib/plugins/include/syntax/include.php =================================================================== --- web/php-wiki/trunk/dokuwiki/lib/plugins/include/syntax/include.php (rev 0) +++ web/php-wiki/trunk/dokuwiki/lib/plugins/include/syntax/include.php 2011-06-19 03:08:23 UTC (rev 312269) @@ -0,0 +1,116 @@ +page}} for "page" in same namespace + * {{page>:page}} for "page" in top namespace + * {{page>namespace:page}} for "page" in namespace "namespace" + * {{page>.namespace:page}} for "page" in subnamespace "namespace" + * {{page>page#section}} for a section of "page" + * + * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) + * @author Esther Brunner + * @author Christopher Smith + * @author Gina Häußge, Michael Klier + */ + +if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../../').'/'); +if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/'); +require_once(DOKU_PLUGIN.'syntax.php'); + +/** + * All DokuWiki plugins to extend the parser/rendering mechanism + * need to inherit from this class + */ +class syntax_plugin_include_include extends DokuWiki_Syntax_Plugin { + + var $helper = null; + + function getType() { return 'substition'; } + function getSort() { return 303; } + function getPType() { return 'block'; } + + function connectTo($mode) { + $this->Lexer->addSpecialPattern("{{page>.+?}}", $mode, 'plugin_include_include'); + $this->Lexer->addSpecialPattern("{{section>.+?}}", $mode, 'plugin_include_include'); + $this->Lexer->addSpecialPattern("{{namespace>.+?}}", $mode, 'plugin_include_include'); + $this->Lexer->addSpecialPattern("{{tagtopic>.+?}}", $mode, 'plugin_include_include'); + } + + function handle($match, $state, $pos, &$handler) { + + $match = substr($match, 2, -2); // strip markup + list($match, $flags) = explode('&', $match, 2); + + // break the pattern up into its parts + list($mode, $page, $sect) = preg_split('/>|#/u', $match, 3); + $check = null; + if (isset($sect)) $sect = sectionID($sect, $check); + return array($mode, $page, $sect, explode('&', $flags)); + } + + /** + * Renders the included page(s) + * + * @author Michael Hamann + */ + function render($format, &$renderer, $data) { + global $ID, $conf; + + // static stack that records all ancestors of the child pages + static $page_stack = array(); + + // when there is no id just assume the global $ID is the current id + if (empty($page_stack)) $page_stack[] = $ID; + + $parent_id = $page_stack[count($page_stack)-1]; + $root_id = $page_stack[0]; + + list($mode, $page, $sect, $flags, $level) = $data; + + if (!$this->helper) + $this->helper =& plugin_load('helper', 'include'); + $flags = $this->helper->get_flags($flags); + + $pages = $this->helper->_get_included_pages($mode, $page, $sect, $parent_id); + + if ($format == 'metadata') { + + // remove old persistent metadata of previous versions of the include plugin + if (isset($renderer->persistent['plugin_include'])) { + unset($renderer->persistent['plugin_include']); + unset($renderer->meta['plugin_include']); + } + + $renderer->meta['plugin_include']['instructions'][] = compact('mode', 'page', 'sect', 'parent_id'); + if (!isset($renderer->meta['plugin_include']['pages'])) + $renderer->meta['plugin_include']['pages'] = array(); // add an array for array_merge + $renderer->meta['plugin_include']['pages'] = array_merge($renderer->meta['plugin_include']['pages'], $pages); + $renderer->meta['plugin_include']['include_content'] = isset($_REQUEST['include_content']); + } + + foreach ($pages as $page) { + extract($page); + + if (in_array($id, $page_stack)) continue; + array_push($page_stack, $id); + + // add references for backlink + if ($format == 'metadata') + $renderer->meta['relation']['references'][$id] = $exists; + + $instructions = $this->helper->_get_instructions($id, $sect, $mode, $level, $flags, $root_id); + + $renderer->nest($instructions); + + array_pop($page_stack); + } + + // When all includes have been handled remove the current id + // in order to allow the rendering of other pages + if (count($page_stack) == 1) array_pop($page_stack); + + return true; + } +} +// vim:ts=4:sw=4:et: Property changes on: web/php-wiki/trunk/dokuwiki/lib/plugins/include/syntax/include.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date LastChangedDate LastChangedRevision Author LastChangedBy HeadURL URL Added: svn:eol-style + native Added: web/php-wiki/trunk/dokuwiki/lib/plugins/include/syntax/wrap.php =================================================================== --- web/php-wiki/trunk/dokuwiki/lib/plugins/include/syntax/wrap.php (rev 0) +++ web/php-wiki/trunk/dokuwiki/lib/plugins/include/syntax/wrap.php 2011-06-19 03:08:23 UTC (rev 312269) @@ -0,0 +1,62 @@ + + * @author Michael Hamann + */ + +if (!defined('DOKU_INC')) + define('DOKU_INC', realpath(dirname(__FILE__) . '/../../') . '/'); +if (!defined('DOKU_PLUGIN')) + define('DOKU_PLUGIN', DOKU_INC . 'lib/plugins/'); +require_once (DOKU_PLUGIN . 'syntax.php'); + +class syntax_plugin_include_wrap extends DokuWiki_Syntax_Plugin { + + function getType() { + return 'formatting'; + } + + function getSort() { + return 50; + } + + function handle($match, $state, $pos, &$handler) { + // this is a syntax plugin that doesn't offer any syntax, so there's nothing to handle by the parser + } + + /** + * Wraps the included page in a div and writes section edits for the action component + * so it can detect where an included page starts/ends. + * + * @author Michael Klier + * @author Michael Hamann + */ + function render($mode, &$renderer, $data) { + if ($mode == 'xhtml') { + switch($data[0]) { + case 'open': + if ($data[2]) { // $data[2] = $flags['redirect'] + $renderer->startSectionEdit(0, 'plugin_include_start', $data[1]); + } else { + $renderer->startSectionEdit(0, 'plugin_include_start_noredirect', $data[1]); + } + $renderer->finishSectionEdit(); + // Start a new section with type != section so headers in the included page + // won't print section edit buttons of the parent page + $renderer->startSectionEdit(0, 'plugin_include_end', $data[1]); + $renderer->doc .= '
' . DOKU_LF; + break; + case 'close': + $renderer->finishSectionEdit(); + $renderer->doc .= '
' . DOKU_LF; + break; + } + return true; + } + return false; + } +} +// vim:ts=4:sw=4:et: Property changes on: web/php-wiki/trunk/dokuwiki/lib/plugins/include/syntax/wrap.php ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Date LastChangedDate LastChangedRevision Author LastChangedBy HeadURL URL Added: svn:eol-style + native