From: Michael J. Rubinsky Date: Thu, 24 Dec 2009 18:03:40 +0000 (-0500) Subject: Add agora to hatchery X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=8ddd5d24eee95ceb32c67aa0defe6a97a2679e53;p=horde.git Add agora to hatchery --- diff --git a/agora/COPYING b/agora/COPYING new file mode 100644 index 000000000..a6b67561a --- /dev/null +++ b/agora/COPYING @@ -0,0 +1,280 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright 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 diff --git a/agora/README b/agora/README new file mode 100755 index 000000000..787967920 --- /dev/null +++ b/agora/README @@ -0,0 +1,67 @@ +What is Agora? +-------------- + +Agora is a Horde-based forum program. + +This software is OSI Certified Open Source Software. +OSI Certified is a certification mark of the Open Source Initiative. + + +Obtaining Agora +--------------- + +Further information on Agora and the latest version can be obtained at + + http://www.horde.org/agora/ + + +Documentation +------------- + +The following documentation is available in the Agora distribution: + +README - This file +COPYING - Copyright and license information +docs/CHANGES - List of changes by release +docs/CREDITS - Who developed this +docs/INSTALL - Installation instructions + + +Installation +------------ + +Instructions for installing Agora can be found in the file INSTALL +in the docs/ directory of the Agora distribution. + + +Assistance +---------- + +If you encounter problems with Agora, help is available! + +The Horde Frequently Asked Questions List (FAQ), available on the Web +at + + http://www.horde.org/faq/ + +The Horde Project runs a number of mailing lists, for individual +applications and for issues relating to the project as a whole. +Information, archives, and subscription information can be found at + + http://www.horde.org/mail/ + +Lastly, Horde developers, contributors and users also make occasional +appearances on IRC, on the channel #horde on the Freenode Network +(irc.freenode.net). + + +Licensing +--------- + +For licensing and copyright information, please see the file COPYING +in the Agora distribution. + +Thanks, +The Agora team + +$Horde: agora/README,v 1.2 2007/04/22 04:51:51 chuck Exp $ diff --git a/agora/ban.php b/agora/ban.php new file mode 100644 index 000000000..ba6209fba --- /dev/null +++ b/agora/ban.php @@ -0,0 +1,75 @@ +push($forums->message, 'horde.error'); + header('Location: ' . Horde::applicationUrl('forums.php')); + exit; +} + +/* Check permissions */ +if (!$forums->hasPermission(Horde_Perms::DELETE)) { + $notification->push(sprintf(_("You don't have permissions to ban users from forum %s."), $forum_id), 'horde.warning'); + header('Location: ' . Horde::applicationUrl('forums.php')); + exit; +} + +/* Ban action */ +if (($action = Horde_Util::getFormData('action')) !== null) { + $user = Horde_Util::getFormData('user'); + $result = $forums->updateBan($user, $forum_id, $action); + if ($result instanceof PEAR_Error) { + $notification->push($result->getMessage(), 'horde.error'); + } + + $url = Agora::setAgoraId($forum_id, null, Horde::applicationUrl('ban.php'), $scope); + header('Location: ' . $url); + exit; +} + +/* Get the list of banned users. */ +$delete = Horde_Util::addParameter(Horde::applicationUrl('ban.php'), + array('action' => 'delete', + 'scope' => $scope, + 'forum_id' => $forum_id)); +$banned = $forums->getBanned(); +foreach ($banned as $user => $level) { + $banned[$user] = Horde::link(Horde_Util::addParameter($delete, 'user', $user), _("Delete")) . $user . ''; +} + +$title = _("Ban"); +$vars = Horde_Variables::getDefaultVariables(); +$form = new Horde_Form($vars, $title); +$form->addHidden('', 'scope', 'text', false); +$form->addHidden('', 'agora', 'text', false); +$form->addHidden('', 'action', 'text', false); +$vars->set('action', 'add'); +$form->addVariable(_("User"), 'user', 'text', true); + +$view = new Agora_View(); +$view->menu = Agora::getMenu('string'); +$view->formbox = Horde_Util::bufferOutput(array($form, 'renderActive'), null, null, 'ban.php', 'post'); +$view->notify = Horde_Util::bufferOutput(array($notification, 'notify'), array('listeners' => 'status')); +$view->banned = $banned; +$view->forum = $forums->getForum(); + +require AGORA_TEMPLATES . '/common-header.inc'; +echo $view->render('ban.html.php'); +require $registry->get('templates', 'horde') . '/common-footer.inc'; diff --git a/agora/config/.htaccess b/agora/config/.htaccess new file mode 100755 index 000000000..3a4288278 --- /dev/null +++ b/agora/config/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/agora/config/conf.xml b/agora/config/conf.xml new file mode 100755 index 000000000..5fc38edcd --- /dev/null +++ b/agora/config/conf.xml @@ -0,0 +1,83 @@ + + + + + + Forum Settings + + + 1 + 0 + -1 + + + false + + + /usr/share/games/figlet/fonts/big.flf + + + + + + Thread Settings + true + Thread Settings + false + + + + Menu Settings + + + + + + + + + Avatar Settings + + true + + gif;jpg;jpeg;png + true + + 5 + 3 + + + + true + true + true + + 80 + 80 + 8 + + + + + + + + + + diff --git a/agora/config/menu.php.dist b/agora/config/menu.php.dist new file mode 100755 index 000000000..ce53036ed --- /dev/null +++ b/agora/config/menu.php.dist @@ -0,0 +1,41 @@ + 'http://www.example.com/', + * 'text' => 'Example, Inc.', + * 'icon' => 'example.png', + * 'icon_path' => 'http://www.example.com/images/', + * 'target' => '_blank', + * 'onclick' => '' + * ); + * + * You can also add a "separator" (a spacer) between menu items. To add a + * separator, simply add a new string to the $_menu array set to the text + * 'separator'. It should look like this: + * + * $_menu[] = 'separator'; + */ + +$_menu = array(); + +/* Add your custom entries below this line. */ diff --git a/agora/config/prefs.php.dist b/agora/config/prefs.php.dist new file mode 100755 index 000000000..3b36f7b65 --- /dev/null +++ b/agora/config/prefs.php.dist @@ -0,0 +1,268 @@ + _("My Information"), + 'label' => _("Avatar"), + 'desc' => _("Set the avatar image that is shown with your posts."), + 'members' => array('avatar_path', 'avatarselect') + ); +} + +$prefGroups['display_forums'] = array( + 'column' => _("Display Options"), + 'label' => _("Forums View"), + 'desc' => _("Set your options for the forums view."), + 'members' => array('forums_sortby', 'forums_sortdir', 'forums_per_page') +); + +$prefGroups['display_threads'] = array( + 'column' => _("Display Options"), + 'label' => _("Threads View"), + 'desc' => _("Set your options for the threads view."), + 'members' => array('threads_sortby', 'threads_sortdir', 'threads_hot', 'threads_per_page') +); + +$prefGroups['display_thread'] = array( + 'column' => _("Display Options"), + 'label' => _("Single Thread View"), + 'desc' => _("Set your options for the single thread view."), + 'members' => array('thread_sortby', 'thread_sortdir', 'thread_view_bodies', + 'thread_per_page') +); + +$prefGroups['display_message'] = array( + 'column' => _("Display Options"), + 'label' => _("Message View"), + 'desc' => _("Set your options for the message view."), + 'members' => array('message_emoticons') +); + +$prefGroups['display_comments'] = array( + 'column' => _("Display Options"), + 'label' => _("Comments view"), + 'desc' => _("Set your options for the single thread view."), + 'members' => array('comments_sortby', 'comments_sortdir', 'comments_view_bodies', + 'comments_per_page') +); + +/* Avatar */ + +$_prefs['avatar_path'] = array( + 'value' => '', + 'locked' => false, + 'shared' => false, + 'type' => 'text', + 'desc' => _("The location of your avatar image.") +); +if ($GLOBALS['conf']['avatar']['allow_avatars'] && $GLOBALS['conf']['avatar']['enable_image_tests']) { + $_prefs['avatar_path']['desc'] .= ' ' . sprintf(_("Avatars must be smaller than %s by %s pixels and less than %sKb in size."), + $GLOBALS['conf']['avatar']['max_width'], + $GLOBALS['conf']['avatar']['max_height'], + $GLOBALS['conf']['avatar']['max_size']); +} + +$_prefs['avatarselect'] = array('type' => 'special'); + +/* Forums */ + +$_prefs['forums_sortby'] = array( + 'value' => 'forum_name', + 'locked' => false, + 'shared' => false, + 'type' => 'enum', + 'enum' => array('forum_name' => _("Forum"), + 'message_count' => _("Messages"), + 'message_subject' => _("Last Message"), + 'message_author' => _("Posted by"), + 'message_date' => _("Date")), + 'desc' => _("Default forums view sort:") +); + +$_prefs['forums_sortdir'] = array( + 'value' => 0, + 'locked' => false, + 'shared' => false, + 'type' => 'enum', + 'enum' => array(0 => _("Ascending"), + 1 => _("Descending")), + 'desc' => _("Default sorting direction:") +); + +$_prefs['forums_per_page'] = array( + 'value' => 20, + 'locked' => false, + 'shared' => false, + 'type' => 'enum', + 'enum' => array(5 => 5, 10 => 10, 15 => 15, 20 => 20, 25 => 25), + 'desc' => _("Number of forums to display on each page") +); + +/* Threads */ + +$_prefs['threads_sortby'] = array( + 'value' => 'message_modifystamp', + 'locked' => false, + 'shared' => false, + 'type' => 'enum', + 'enum' => array('message_thread' => _("Thread"), + 'message_subject' => _("Subject"), + 'message_author' => _("Posted by"), + 'message_seq' => _("Posts"), + 'message_timestamp' => _("Date"), + 'message_modifystamp' => _("Last post")), + 'desc' => _("Default threads view sort:") +); + +$_prefs['threads_sortdir'] = array( + 'value' => 1, + 'locked' => false, + 'shared' => false, + 'type' => 'enum', + 'enum' => array(0 => _("Ascending"), + 1 => _("Descending")), + 'desc' => _("Default sorting direction:") +); + +$_prefs['threads_hot'] = array( + 'value' => 20, + 'locked' => false, + 'shared' => false, + 'type' => 'number', + 'desc' => _("Number of views in 24hrs to trigger a 'hot-thread':") +); + +$_prefs['threads_per_page'] = array( + 'value' => 10, + 'locked' => false, + 'shared' => false, + 'type' => 'enum', + 'enum' => array(5 => 5, 10 => 10, 15 => 15, 20 => 20, 25 => 25), + 'desc' => _("Number of messages to display on each page") +); + +/* Thread */ + +$_prefs['thread_sortby'] = array( + 'value' => 'message_timestamp', + 'locked' => false, + 'shared' => false, + 'type' => 'enum', + 'enum' => array('message_thread' => _("Thread"), + 'message_subject' => _("Subject"), + 'message_author' => _("Posted by"), + 'message_timestamp' => _("Date")), + 'desc' => _("Default thread view sort:") +); + +$_prefs['thread_sortdir'] = array( + 'value' => 0, + 'locked' => false, + 'shared' => false, + 'type' => 'enum', + 'enum' => array(0 => _("Ascending"), + 1 => _("Descending")), + 'desc' => _("Default sorting direction:") +); + +$_prefs['thread_view_bodies'] = array( + 'value' => 0, + 'locked' => false, + 'shared' => false, + 'type' => 'enum', + 'enum' => array(0 => _("No"), + 1 => _("Yes"), + 2 => _("Yes, and don't thread them")), + 'desc' => _("Display full message bodies in the thread list view?") +); + +$_prefs['thread_per_page'] = array( + 'value' => 10, + 'locked' => false, + 'shared' => false, + 'type' => 'enum', + 'enum' => array(5 => 5, 10 => 10, 15 => 15, 20 => 20, 25 => 25), + 'desc' => _("Number of message to display on each page") +); + +$_prefs['message_emoticons'] = array( + 'value' => 1, + 'locked' => false, + 'shared' => false, + 'type' => 'enum', + 'enum' => array(0 => _("No graphical emoticons"), + 1 => _("Show graphical emoticons")), + 'desc' => _("Display graphical emoticons?") +); + +$_prefs['forums_block_display'] = array( + 'value' => 0, + 'type' => 'implicit' +); + +$_prefs['threads_block_display'] = array( + 'value' => 0, + 'type' => 'implicit' +); + +$_prefs['moderate_sortby'] = array( + 'value' => 'message_id', + 'locked' => false, + 'shared' => false, + 'type' => 'implicit' +); + +$_prefs['moderate_sortdir'] = array( + 'value' => 0, + 'locked' => false, + 'shared' => false, + 'type' => 'implicit' +); + + +/* Comments */ + +$_prefs['comments_view_bodies'] = array( + 'value' => 2, + 'locked' => false, + 'shared' => false, + 'type' => 'enum', + 'enum' => array(2 => _("Flat"), + 1 => _("Thread")), + 'desc' => _("Display full message bodies in the comments view?") +); + +$_prefs['comments_sortby'] = array( + 'value' => 'message_timestamp', + 'locked' => false, + 'shared' => false, + 'type' => 'enum', + 'enum' => array('message_subject' => _("Subject"), + 'message_author' => _("Posted by"), + 'message_timestamp' => _("Date")), + 'desc' => _("Default comments view sort:") +); + +$_prefs['comments_sortdir'] = array( + 'value' => 1, + 'locked' => false, + 'shared' => false, + 'type' => 'enum', + 'enum' => array(0 => _("Ascending"), + 1 => _("Descending")), + 'desc' => _("Default sorting direction:") +); + +$_prefs['comments_per_page'] = array( + 'value' => 20, + 'locked' => false, + 'shared' => false, + 'type' => 'enum', + 'enum' => array(5 => 5, 10 => 10, 15 => 15, 20 => 20, 25 => 25), + 'desc' => _("Number of messages to display on each page") +); \ No newline at end of file diff --git a/agora/deleteforum.php b/agora/deleteforum.php new file mode 100644 index 000000000..15ffdafb8 --- /dev/null +++ b/agora/deleteforum.php @@ -0,0 +1,84 @@ + + * @author Marko Djukic + */ + +define('AGORA_BASE', dirname(__FILE__)); +require_once AGORA_BASE . '/lib/base.php'; + +/* Set up the forums object. */ +$scope = Horde_Util::getFormData('scope', 'agora'); +$forums = &Agora_Messages::singleton($scope); +$url = Horde::applicationUrl('forums.php'); + +/* Check permissions */ +if (!$forums->hasPermission(Horde_Perms::DELETE)) { + $notification->push(sprintf(_("You don't have permissions to delete forums in %s"), $registry->get('name', $scope)), 'horde.warning'); + header('Location: ' . $url); + exit; +} + +/* Get forum. */ +list($forum_id) = Agora::getAgoraId(); +$forum = $forums->getForum($forum_id); +if ($forum instanceof PEAR_Error) { + $notification->push($forum->message, 'horde.error'); + header('Location: ' . $url); + exit; +} + +/* Prepare forum. */ +$vars = Horde_Variables::getDefaultVariables(); +$form = new Horde_Form($vars, _("Delete Forum")); + +$form->setButtons(array(_("Delete"), _("Cancel"))); +$form->addHidden('', 'forum_id', 'int', $forum_id); +$form->addHidden('', 'scope', 'text', $scope); +$form->addVariable(_("This will delete the forum, any subforums and all relative messages."), 'prompt', 'description', false); +$form->addVariable(_("Forum name"), 'forum_name', 'text', false, true); +$vars->set('forum_name', $forum['forum_name']); +$vars->set('forum_id', $forum_id); + +/* Get a list of available forums. */ +$forums_list = Agora::formatCategoryTree($forums->getForums($forum_id, false, null, null)); +if (!empty($forums_list)) { + $html = implode('
', $forums_list); + $form->addVariable(_("Subforums"), 'subforums', 'html', false, true); + $vars->set('subforums', $html); +} + +/* Process delete. */ +if ($form->validate()) { + if ($vars->get('submitbutton') == _("Delete")) { + $result = $forums->deleteForum($vars->get('forum_id')); + if ($result instanceof PEAR_Error) { + $notification->push(sprintf(_("Could not delete the forum. %s"), $result->message), 'horde.error'); + } else { + $notification->push(_("Forum deleted."), 'horde.success'); + } + } else { + $notification->push(_("Forum not deleted."), 'horde.message'); + } + header('Location: ' . $url); + exit; +} + +/* Set up template variables. */ +$view = new Agora_View(); +$view->menu = Agora::getMenu('string'); +$view->main = Horde_Util::bufferOutput(array($form, 'renderActive'), null, $vars, 'deleteforum.php', 'post'); +$view->notify = Horde_Util::bufferOutput(array($notification, 'notify'), array('listeners' => 'status')); + +require AGORA_TEMPLATES . '/common-header.inc'; +echo $view->render('main.html.php'); +require $registry->get('templates', 'horde') . '/common-footer.inc'; diff --git a/agora/docs/CHANGES b/agora/docs/CHANGES new file mode 100644 index 000000000..37e443fb4 --- /dev/null +++ b/agora/docs/CHANGES @@ -0,0 +1,47 @@ +-------- +v2.0-cvs +-------- + +[] Horde_Template to Horde_View (Duck ) +[] DB to MDB2 (Duck ) +[] Requires PHP5 (Duck ) + +-------- +v1.0-cvs +-------- + +[jan] Enable output compression. +[jan] Add Japanese translation (Takeshi Taguchi ). +[cjh] Merge Horde_Template_Compiling to stable Agora branch as Agora_Template. +[mjr] Added batch api methods for retrieving message counts and threads for + more than one forum at a time. +[jan] Add Hungarian translation (Garami Gábor ). +[cjh] Migrate from DataTree to local SQL usage (Duck ). +[jan] Add Slovenian translation (Duck ). +[jan] Allow to manage forums and messages added throught the comments API. +[jan] Add CAPTCHA test with Figlet fonts. +[jmf] Implement search page. +[jan] Use 'rel="nofollow"' link attributes to prevent spam if showing messages + through the API. +[cjh] Add avatar support (Andrew Hosie ). +[cjh] Use DataTree::sortByAttributes() to do more sorting in the database + and avoid loading excess objects (Duck ). +[cjh] Work around IE bugs for threaded message views by having columns + total 99% instead of 100% (Bug #1298). +[jan] Add Lithuanian translation (Vilius Sumskas ). +[mdj] Add attachments and moderation. +[mms] Allow user to specify how many forums/threads to display in the + block view. +[mms] Added paging of forum and thread pages. +[jan] Add Spanish translation (Manuel Perez Ayala ). +[jan] Add Traditional Chinese translation (Chih-Wei Yeh + ). +[jan] Add sorting by thread. +[jan] Quote replied messages. +[jan] Add Finnish translation (Petteri Karttunen ). +[cjh] Add deletion of messages. +[mdj] Add Romanian translation (Eugen Hoanca ). +[cjh] Fix permissions checking semantics. +[jan] Add German translation. +[jan] Add French translation (Florent Aide ). +[mdj] Initial import to CVS. diff --git a/agora/docs/CREDITS b/agora/docs/CREDITS new file mode 100755 index 000000000..8c26fd7e0 --- /dev/null +++ b/agora/docs/CREDITS @@ -0,0 +1,30 @@ +======================== + Agora Development Team +======================== + + +Core Developers +=============== + + + +Drivers +======= + + + +Localization +============ + +====================== =============================================== +Chinese (Traditional) Chih-Wei Yeh +Finnish Petteri Karttunen +French Florent Aide +German Jan Schneider +Hungarian Garami Gabor +Japanese Takeshi Taguchi +Lithuanian Vilius Å umskas +Romanian Eugen Hoanca +Slovenian Duck +Spanish Manuel Perez Ayala +====================== =============================================== diff --git a/agora/docs/INSTALL b/agora/docs/INSTALL new file mode 100755 index 000000000..376bc9d1f --- /dev/null +++ b/agora/docs/INSTALL @@ -0,0 +1,181 @@ +====================== + Installing Agora 0.1 +====================== + +:Last update: $Date: 2007/06/19 09:56:35 $ +:Revision: $Revision: 1.15 $ +:Contact: dev@lists.horde.org + +.. contents:: Contents +.. section-numbering:: + +This document contains instructions for installing the Agora forums +application on your system. + +For information on the capabilities and features of Agora, see the file +README_ in the top-level directory of the Agora distribution. + + +Obtaining Agora +=============== + +Agora is currently only available via CVS, since it is still in early +development. A packaged release will be made once it is ready for wider +testing. + +Bleeding-edge development versions of Agora are available via CVS; see the +file `docs/HACKING`_ in the Horde distribution for information on accessing +the Horde CVS repository. + + +Prerequisites +============= + +To function properly, Agora requires the following: + +1. A working Horde installation. + + Agora runs within the `Horde Application Framework`_, a set of common tools + for Web applications written in PHP. You must install Horde before + installing Agora. If you want to use the Text_Figlet_ support, you need at + least Horde Version 3.2. + + .. _`Horde Application Framework`: http://www.horde.org/horde/ + + The Horde Framework can be obtained from the Horde website and FTP server, + at + + http://www.horde.org/horde/ + + ftp://ftp.horde.org/pub/horde/ + + Many of Agora's prerequisites are also Horde prerequisites. Be sure to + have completed all of the steps in the INSTALL_ file for the Horde + Framework before installing Agora. + +2. A working Horde DataTree driver. + + Agora stores its data in the Horde DataTree system. You must have a + DataTree driver configured in Horde that supports persistant storage. + +3. The following PEAR modules: + (See `horde/docs/INSTALL`_ for instructions on installing PEAR modules) + + a. Text_Figlet [OPTIONAL] + + Text_Figlet is required if you want users to enter a verification string + if they are submitting a new message, to determine real users from spam + bots. Text_Figlet requires a Figlet_ font available on your local file + system. + + .. _Figlet: http://www.figlet.org/ + + +Installing Agora +================ + +To install the Agora application, checkout agora from the Horde CVS server +into your Horde directory and would then find Agora at the URL:: + + http://your-server/horde/agora/ + + +Configuring Agora +================= + +1. Configuring Horde for Agora + + a. Register the application + + In ``horde/config/registry.php``, find the ``applications['agora']`` + stanza. The ``status`` parameter should be marked ``'=> active'``. If + you have changed the location of Agora relative to Horde, either in the + URL or in the filesystem or both, you must update the ``fileroot`` and + ``webroot`` settings to their correct values. + + b. Configuring a DataTree backend + + Agora requires a permanent ``DataTree`` backend in Horde to manage + forums messages. If you didn't setup a DataTree backend yet, go to the + configuration interface, select Horde from the list of applications and + select a driver different than ``None`` on the ``DataTree System`` tab. + Make sure that you ran the necessary scripts to create a storage backend + for the DataTree system, e.g. one of the ``create.*.sql`` or + ``horde_datatree.*.sql`` SQL scripts in ``horde/scripts/sql/``. You + should have done this already during the installation of Horde. + +2. Configuring Agora + + To configure Agora, change to the ``config/`` directory of the installed + distribution, and make copies of all of the configuration ``dist`` files + without the ``dist`` suffix:: + + cd config/ + for foo in *.dist; do cp $foo `basename $foo .dist`; done + + Documentation on the format of those files can be found in each file. With + the exception of the ``conf.*`` files (see below), the other files in + ``config/`` need only be modified if you wish to customize Agora's + appearance or behavior, as the defaults will be correct for most sites. + + You must login to Horde as a Horde Administrator to finish the + configuration of Agora. Use the Horde ``Administration`` menu item to get + to the administration page, and then click on the ``Configuration`` icon to + get the configuration page. Select ``Forums`` from the selection list of + applications. Fill in or change any configuration values as needed. When + done click on ``Generate Forums Configuration`` to generate the + ``conf.php`` file. If your web server doesn't have write permissions to + the Agora configuration directory or file, it will not be able to write the + file. In this case, go back to ``Configuration`` and choose one of the + other methods to create the configuration file ``agora/config/conf.php``. + + Note for international users: Agora uses GNU gettext to provide local + translations of text displayed by applications; the translations are found + in the po/ directory. If a translation is not yet available for your + locale (and you wish to create one), see the ``horde/po/README`` file, or + if you're having trouble using a provided translation, please see the + `horde/docs/TRANSLATIONS`_ file for instructions. + +3. Testing Agora + + Use Agora to create forums and post in them. Test at least the following: + + - Create a new forum + - Edit a forum + - Post to a forum + - Reply to a message + + +Obtaining Support +================= + +If you encounter problems with Agora, help is available! + +The Horde Frequently Asked Questions List (FAQ), available on the Web at + + http://www.horde.org/faq/ + +The Horde Project runs a number of mailing lists, for individual applications +and for issues relating to the project as a whole. Information, archives, and +subscription information can be found at + + http://www.horde.org/mail/ + +Lastly, Horde developers, contributors and users may also be found on IRC, +on the channel #horde on the Freenode Network (irc.freenode.net). + +Please keep in mind that Agora is free software written by volunteers. For +information on reasonable support expectations, please read + + http://www.horde.org/support.php + +Thanks for using Agora! + +The Horde team + + +.. _README: ?f=README.html +.. _`docs/HACKING`: ../../horde/docs/?f=HACKING.html +.. _INSTALL: +.. _`horde/docs/INSTALL`: ../../horde/docs/?f=INSTALL.html +.. _`horde/docs/TRANSLATIONS`: ../../horde/docs/?f=TRANSLATIONS.html diff --git a/agora/docs/TODO b/agora/docs/TODO new file mode 100755 index 000000000..6e8b43bff --- /dev/null +++ b/agora/docs/TODO @@ -0,0 +1,22 @@ +============================= + Agora Development TODO List +============================= + +:Last update: $Date: 2007/12/17 11:49:15 $ +:Revision: $Revision: 1.20 $ +:Contact: dev@lists.horde.org + +- Add per-forum custom templates. + +- Write an agorad daemon that provided access to agora forums via NNTP, + possibly IMAP, etc. + +- Split threads per page in threaded view. + +- Add per-forum text filter settings. + +- Add permission management interface + +- Reduce number of loops in for thread display + +- AJAX reply submission \ No newline at end of file diff --git a/agora/editforum.php b/agora/editforum.php new file mode 100644 index 000000000..3944f4b43 --- /dev/null +++ b/agora/editforum.php @@ -0,0 +1,72 @@ + + */ + +define('AGORA_BASE', dirname(__FILE__)); +require_once AGORA_BASE . '/lib/base.php'; +require_once AGORA_BASE . '/lib/Forms/Forum.php'; + + +/* Set up the forums object. */ +$forums = &Agora_Messages::singleton(); + +list($forum_id, , $scope) = Agora::getAgoraId(); +$scope = Horde_Util::getGet('scope', 'agora'); +$title = $forum_id ? _("Edit Forum") : _("New Forum"); +$vars = Horde_Variables::getDefaultVariables(); +$vars->set('forum_id', $forum_id); + +/* Check permissions */ +if ($forum_id && !Horde_Auth::isAdmin('agora:admin')) { + $notification->push(sprintf(_("You don't have permissions to edit forum %s"), $registry->get('name', $scope)), 'horde.warning'); + header('Location: ' . Horde::applicationUrl('forums.php', true)); + exit; +} elseif (!Horde_Auth::isAdmin('agora:admin')) { + $notification->push(sprintf(_("You don't have permissions to create a new forum in %s"), $registry->get('name', $scope)), 'horde.warning'); + header('Location: ' . Horde::applicationUrl('forums.php', true)); + exit; +} + +$form = new ForumForm($vars, $title); +if ($form->validate()) { + $forum_id = $form->execute($vars); + if ($forum_id instanceof PEAR_Error) { + $notification->push(sprintf(_("Could not create the forum. %s"), $forum_id->message), 'horde.error'); + header('Location: ' . Horde::applicationUrl('forums.php', true)); + } else { + $notification->push($vars->get('forum_id') ? _("Forum Modified") : _("Forum created."), 'horde.success'); + header('Location: ' . Agora::setAgoraId($forum_id, null, Horde::applicationUrl('threads.php', true))); + } + exit; +} + +/* Check if a forum is being edited. */ +if ($forum_id) { + $forum = $forums->getForum($forum_id); + if (is_a($forum, 'PEAR_Error')) { + $notification->push($forum); + unset($forum); + } else { + $vars = new Horde_Variables($forums->getForum($forum_id)); + } +} + +/* Set up template variables. */ +$view = new Agora_View(); +$view->menu = Agora::getMenu('string'); +$view->main = Horde_Util::bufferOutput(array($form, 'renderActive'), null, null, 'editforum.php', 'post'); +$view->notify = Horde_Util::bufferOutput(array($notification, 'notify'), array('listeners' => 'status')); + +require AGORA_TEMPLATES . '/common-header.inc'; +echo $view->render('main.html.php'); +require $registry->get('templates', 'horde') . '/common-footer.inc'; diff --git a/agora/forums.php b/agora/forums.php new file mode 100644 index 000000000..42276a66f --- /dev/null +++ b/agora/forums.php @@ -0,0 +1,74 @@ + + * @author Marko Djukic + */ + +require_once dirname(__FILE__) . '/lib/base.php'; + +/* Set up the forums object. */ +$scope = Horde_Util::getGet('scope', 'agora'); +$forums = Agora_Messages::singleton($scope); + +/* Set up actions */ +if (Horde_Auth::isAdmin()) { + $url = Horde::applicationUrl('forums.php'); + foreach ($registry->listApps(array('hidden', 'notoolbar', 'active')) as $app) { + if ($registry->hasMethod('hasComments', $app) && + $registry->callByPackage($app, 'hasComments') === true) { + $app_name = $registry->get('name', $app); + $actions[] = Horde::link(Horde_Util::addParameter($url, 'scope', $app), $app_name) . $app_name . ''; + } + } +} + +/* Get the sorting. */ +$sort_by = Agora::getSortBy('forums'); +$sort_dir = Agora::getSortDir('forums'); + +/* Which forums page are we on? Default to page 0. */ +$forum_page = Horde_Util::getFormData('forum_page', 0); +$forums_per_page = $prefs->getValue('forums_per_page'); +$forum_start = $forum_page * $forums_per_page; + +/* Get the list of forums. */ +$forums_list = $forums->getForums(0, true, $sort_by, $sort_dir, true, $forum_start, $forums_per_page); +if ($forums_list instanceof PEAR_Error) { + Horde::fatal($forums_list, __FILE__, __LINE__); +} elseif (empty($forums_list)) { + $forums_count = 0; +} else { + $forums_count = $forums->countForums(); +} + +/* Set up the column headers. */ +$col_headers = array('forum_name' => _("Forum"), 'forum_description' => _("Description"), 'message_count' => _("Posts"), 'thread_count' => _("Threads"), 'message_timestamp' => _("Last Post"), 'message_author' => _("Posted by"), 'message_date' => _("Date")); +$col_headers = Agora::formatColumnHeaders($col_headers, $sort_by, $sort_dir, 'forums'); + +/* Set up the template tags. */ +$view = new Agora_View(); +$view->col_headers = $col_headers; +$view->forums_list = $forums_list; +$view->menu = Agora::getMenu('string'); +$view->notify = Horde_Util::bufferOutput(array($notification, 'notify'), array('listeners' => 'status')); +$view->actions = empty($actions) ? null : $actions; + +/* Set up pager. */ +$vars = Horde_Variables::getDefaultVariables(); +$pager_ob = new Horde_Ui_Pager('forum_page', $vars, array('num' => $forums_count, 'url' => 'forums.php', 'perpage' => $forums_per_page)); +$pager_ob->preserve('scope', $scope); +$view->pager_link = $pager_ob->render(); + +$title = _("All Forums"); +require AGORA_TEMPLATES . '/common-header.inc'; +echo $view->render('forums.html.php'); +require $registry->get('templates', 'horde') . '/common-footer.inc'; diff --git a/agora/index.php b/agora/index.php new file mode 100755 index 000000000..27f5cd40f --- /dev/null +++ b/agora/index.php @@ -0,0 +1,16 @@ + + * @package Agora + */ +class Agora { + + /** + * The virtual path to use for VFS data. + */ + const VFS_PATH = '.horde/agora/attachments/'; + const AVATAR_PATH = '.horde/agora/avatars/'; + + /** + * Determines the requested forum_id, message_id and application by + * checking first if they are passed as the single encoded var or + * individual vars. + * + * @return array Forum, message id and application. + */ + function getAgoraId() + { + if (($id = Horde_Util::getFormData('agora')) !== null) { + if (strstr($id, '.')) { + list($forum_id, $message_id) = explode('.', $id, 2); + } else { + $forum_id = $id; + $message_id = 0; + } + } else { + $forum_id = Horde_Util::getFormData('forum_id'); + $message_id = Horde_Util::getFormData('message_id'); + } + $scope = basename(Horde_Util::getFormData('scope', 'agora')); + + return array($forum_id, $message_id, $scope); + } + + /** + * Creates the Agora id. + * + * @return string If passed with the $url parameter, returns a completed + * url with the agora_id tacked on at the end, otherwise + * returns the simple agora_id. + */ + function setAgoraId($forum_id, $message_id, $url = '', $scope = null, $encode = false) + { + $agora_id = $forum_id . '.' . $message_id; + + if (!empty($url)) { + if ($scope) { + $url = Horde_Util::addParameter($url, 'scope', $scope, $encode); + } else { + $url = Horde_Util::addParameter($url, 'scope', Horde_Util::getGet('scope', 'agora'), $encode); + } + return Horde_Util::addParameter($url, 'agora', $agora_id, $encode); + } + + return $agora_id; + } + + /** + * Returns a new or the current CAPTCHA string. + * + * @param boolean $new If true, a new CAPTCHA is created and returned. + * The current, to-be-confirmed string otherwise. + * + * @return string A CAPTCHA string. + */ + function getCAPTCHA($new = false) + { + if ($new || empty($_SESSION['agora']['CAPTCHA'])) { + $_SESSION['agora']['CAPTCHA'] = ''; + for ($i = 0; $i < 5; $i++) { + $_SESSION['agora']['CAPTCHA'] .= chr(rand(65, 90)); + } + } + return $_SESSION['agora']['CAPTCHA']; + } + + /** + * Formats a list of forums, showing each child of a parent with + * appropriate indent using '.. ' as a leader. + * + * @param array $forums The list of forums to format. + * + * @return array Formatted forum list. + */ + function formatCategoryTree($forums) + { + foreach ($forums as $id => $forum) { + $levels = explode(':', $forum); + $forums[$id] = str_repeat('.. ', count($levels) - 1) . array_pop($levels); + } + return $forums; + } + + /** + * Returns the column to sort by, checking first if it is specified in the + * URL, then returning the value stored in prefs. + * + * @param string $view The view name, used to identify preference settings + * for sorting. + * + * @return string The column to sort by. + */ + function getSortBy($view) + { + global $prefs; + + if (($sortby = Horde_Util::getFormData($view . '_sortby')) !== null) { + $prefs->setValue($view . '_sortby', $sortby); + } + $sort_by = $prefs->getValue($view . '_sortby'); + + /* BC check for now invalid sort criteria. */ + if ($sort_by == 'message_date' || substr($sort_by, 0, 1) == 'l') { + $sort_by = $prefs->getDefault($view . '_sortby'); + $prefs->setValue($view . '_sortby', $sortby); + } + + return $sort_by; + } + + /** + * Returns the sort direction, checking first if it is specified in the URL, + * then returning the value stored in prefs. + * + * @param string $view The view name, used to identify preference settings + * for sorting. + * + * @return integer The sort direction, 0 = ascending, 1 = descending. + */ + function getSortDir($view) + { + global $prefs; + if (($sortdir = Horde_Util::getFormData($view . '_sortdir')) !== null) { + $prefs->setValue($view . '_sortdir', $sortdir); + } + return $prefs->getValue($view . '_sortdir'); + } + + /** + * Formats column headers have sort links and sort arrows. + * + * @param array $columns The columns to format. + * @param string $sort_by The current 'sort-by' column. + * @param string $sort_dir The current sort direction. + * @param string $view The view name, used to identify preference + * settings for sorting. + * + * @return array The formated column headers to be displayed. + */ + function formatColumnHeaders($columns, $sort_by, $sort_dir, $view) + { + /* Get the current url, remove any sorting parameters. */ + $url = Horde::selfUrl(true); + $url = Horde_Util::removeParameter($url, array($view . '_sortby', $view . '_sortdir')); + + /* Go through the column headers to format and add sorting links. */ + $headers = array(); + foreach ($columns as $col_name => $col_title) { + $extra = array(); + /* Is this a column with two headers? */ + if (is_array($col_title)) { + $keys = array_keys($col_title); + $extra_name = $keys[0]; + if ($sort_by == $keys[1]) { + $extra = array($keys[0] => $col_title[$keys[0]]); + $col_name = $keys[1]; + $col_title = $col_title[$keys[1]]; + } else { + $extra = array($keys[1] => $col_title[$keys[1]]); + $col_name = $keys[0]; + $col_title = $col_title[$keys[0]]; + } + } + if ($sort_by == $col_name) { + /* This column is currently sorted by, plain title and + * add sort direction arrow. */ + $sort_img = ($sort_dir ? 'za.png' : 'az.png'); + $sort_title = ($sort_dir ? _("Sort Ascending") : _("Sort Descending")); + $col_arrow = Horde::link(Horde_Util::addParameter($url, array($view . '_sortby' => $col_name, $view . '_sortdir' => $sort_dir ? 0 : 1)), $sort_title) . + Horde::img($sort_img, $sort_title, null, $GLOBALS['registry']->getImageDir('horde')) . ' '; + $col_class = 'selected'; + } else { + /* Column not currently sorted, add link to sort by + * this one and no sort arrow. */ + $col_arrow = ''; + $col_title = Horde::link(Horde_Util::addParameter($url, $view . '_sortby', $col_name), sprintf(_("Sort by %s"), $col_title)) . $col_title . ''; + $col_class = 'item'; + } + $col_class .= ' leftAlign'; + if (count($extra)) { + list($name, $title) = each($extra); + $col_title .= ' [' . + Horde::link(Horde_Util::addParameter($url, $view . '_sortby', $name), sprintf(_("Sort by %s"), $title)) . $title . '' . + ']'; + $col_name = $extra_name; + } + $headers[$col_name] = $col_arrow . $col_title; + $headers[$col_name . '_class_plain'] = $col_class; + $headers[$col_name . '_class'] = empty($col_class) ? '' : ' class="' . $col_class . '"'; + } + + return $headers; + } + + /** + * Returns a {@link VFS} instance. + * + * @return VFS A VFS instance. + */ + function getVFS() + { + global $conf; + + if (!isset($conf['vfs']['type'])) { + return PEAR::raiseError(_("The VFS backend needs to be configured to enable attachment uploads.")); + } + + require_once 'VFS.php'; + return VFS::singleton($conf['vfs']['type'], Horde::getDriverConfig('vfs')); + } + + function getMenu($returnType = 'object') + { + $menu = new Horde_Menu(); + $img_dir = $GLOBALS['registry']->getImageDir(); + $scope = Horde_Util::getGet('scope', 'agora'); + + /* Agora Home. */ + $url = Horde_Util::addParameter(Horde::applicationUrl('forums.php'), 'scope', $scope); + $menu->add($url, _("_Forums"), 'forums.png', $img_dir, null, null, + dirname($_SERVER['PHP_SELF']) == $GLOBALS['registry']->get('webroot') && basename($_SERVER['PHP_SELF']) == 'index.php' ? 'current' : null); + + /* Thread list, if applicable. */ + if (isset($GLOBALS['forum_id'])) { + $menu->add(Agora::setAgoraId($GLOBALS['forum_id'], null, Horde::applicationUrl('threads.php')), _("_Threads"), 'threads.png', $GLOBALS['registry']->getImageDir()); + if ($scope == 'agora' && Horde_Auth::getAuth()) { + $menu->add(Agora::setAgoraId($GLOBALS['forum_id'], null, Horde::applicationUrl('messages/edit.php')), _("New Thread"), 'newmessage.png', $GLOBALS['registry']->getImageDir()); + } + } + + if ($scope == 'agora' && Agora_Messages::hasPermission(Horde_Perms::DELETE, 0, $scope)) { + $menu->add(Horde::applicationUrl('editforum.php'), _("_New Forum"), 'newforum.png', $img_dir, null, null, Horde_Util::getFormData('agora') ? '__noselection' : null); + } + + if (Agora_Messages::hasPermission(Horde_Perms::DELETE, 0, $scope)) { + $url = Horde_Util::addParameter(Horde::applicationUrl('moderate.php'), 'scope', $scope); + $menu->add($url, _("_Moderate"), 'moderate.png', $img_dir); + } + + if (Horde_Auth::isAdmin()) { + $menu->add(Horde::applicationUrl('moderators.php'), _("_Moderators"), 'hot.png', $img_dir); + } + + $url = Horde_Util::addParameter(Horde::applicationUrl('search.php'), 'scope', $scope); + $menu->add($url, _("_Search"), 'search.png', $GLOBALS['registry']->getImageDir('horde')); + + if ($returnType == 'object') { + return $menu; + } else { + return $menu->render(); + } + } + + function validateAvatar($avatar_path) + { + if (!$GLOBALS['conf']['avatar']['allow_avatars'] || !$avatar_path) { + return false; + } + + preg_match('/^(http|vfs):\/\/(.*)\/(gallery|uploaded|.*)\/(.*\..*)/i', + $avatar_path, $matches); + + switch ($matches[1]) { + case 'http': + if (!$GLOBALS['conf']['avatar']['enable_external']) { + /* Avatar is external and external avatars have been + * disabled. */ + return false; + } + $dimensions = @getimagesize($avatar_path); + if (($dimensions === false) || + ($dimensions[0] > $GLOBALS['conf']['avatar']['max_width']) || + ($dimensions[1] > $GLOBALS['conf']['avatar']['max_height'])) { + /* Avatar is external and external avatars are + * enabled, but the image is too wide or high. */ + return false; + } else { + $avatar = null; + + $flock = fopen($avatar_path, 'r'); + while (!feof($flock)) { + $avatar .= fread($flock, 2048); + } + fclose($flock); + + if (strlen($avatar) > ($GLOBALS['conf']['avatar']['max_size'] * 1024)) { + /* Avatar is external and external avatars have + * been enabled, but the file is too large. */ + return false; + } + } + return true; + + case 'vfs': + switch ($matches[3]) { + case 'gallery': + /* Avatar is within the gallery. */ + return $GLOBALS['conf']['avatar']['enable_gallery']; + + case 'uploaded': + /* Avatar is within the uploaded avatar collection. */ + return $GLOBALS['conf']['avatar']['enable_uploads']; + + default: + /* Malformed URL. */ + return false; + } + break; + + default: + /* Malformed URL. */ + return false; + } + + return false; + } + + function getAvatarUrl($avatar_path, $scopeend_sid = true) + { + if (!$avatar_path) { + return PEAR::raiseError(_("Malformed avatar.")); + } + + preg_match('/^(http|vfs):\/\/(.*)\/(gallery|uploaded|.*)\/(.*\..*)/i', + $avatar_path, $matches); + + switch ($matches[1]) { + case 'http': + /* HTTP URL's are already "real" */ + break; + + case 'vfs': + /* We need to do some re-writing to VFS paths. */ + switch ($matches[3]) { + case 'gallery': + $avatar_collection_id = '1'; + break; + + case 'uploaded': + $avatar_collection_id = '2'; + break; + + default: + return PEAR::raiseError(_("Malformed database entry.")); + } + + $avatar_path = Horde::applicationUrl('avatars/?id=' . urlencode($matches[4]) . ':' . $avatar_collection_id, true, $scopeend_sid); + break; + } + + return $avatar_path; + } + + /** + * Send new posts to a distribution email address for a wider audience + * + * @param int $message_id Identifier of message to be distributed + * + * @return mixed Boolean true on success; PEAR_Error on failure + */ + function distribute($message_id) + { + global $conf; + + $storage = Agora_Messages::singleton(); + $message = $storage->getMessage($message_id); + $forum = $storage->getForum($message['forum_id']); + + if (empty($forum['forum_distribution_address'])) { + return false; + } + + require_once 'Mail.php'; + require_once 'Horde/MIME.php'; + require_once 'Horde/MIME/Headers.php'; + require_once 'Horde/MIME/Message.php'; + + $msg_headers = new MIME_Headers(); + $msg_headers->addMessageIdHeader(); + $msg_headers->addAgentHeader(); + $msg_headers->addHeader('Date', date('r')); + $msg_headers->addHeader('X-Horde-Agora-Post', $message_id); + + $msg_headers->addHeader('To', $forum['forum_distribution_address']); + $msg_headers->addHeader('From', $message['message_author']); + $msg_headers->addHeader('Subject', '[' . $forum['forum_name'] . '] ' . $message['message_subject']); + + $mime = new MIME_Message(); + $body = new MIME_Part('text/plain', $message['body'], + Horde_Nls::getCharset()); + $mime->addPart($body); + $msg_headers->addMIMEHeaders($mime); + $result = $mime->send($forum['forum_distribution_address'], $msg_headers, $conf['mailer']['type'], $conf['mailer']['params']); + if (is_a($result, 'PEAR_Error')) { + Horde::logMessage($result, __FILE__, __LINE__, PEAR_LOG_ERR); + } + } +} diff --git a/agora/lib/Api.php b/agora/lib/Api.php new file mode 100644 index 000000000..e837cdffd --- /dev/null +++ b/agora/lib/Api.php @@ -0,0 +1,821 @@ + + * @author Duck + * @package Agora + */ + +class Agora_Api extends Horde_Registry_Api +{ + /** + * Get back a list of available forums. + * + * @param integer $forum_id Supplying this parameter will return a list of + * child forums of the requested forum id. + * @param string $scope If set, limit the forums to requested application. + * + * @return array The list of available forums. + */ + public function listForums($forum_id = 0, $scope = null) + { + require_once dirname(__FILE__) . '/base.php'; + + $forums = &Agora_Messages::singleton($scope); + return $forums->getForums($forum_id, true, 'forum_name', 0, isset($scope)); + } + + /** + * Retrieve the name of a forum + * + * @param string $scope Scope which form belongs to + * @param integer $forum_id The forum id to fetch the name for. + * + * @return mixed The forum name | Pear_Error + */ + public function getForumName($scope, $forum_id) + { + require_once dirname(__FILE__) . '/base.php'; + + $forums = &Agora_Messages::singleton($scope); + $forum = $forums->getForum($forum_id); + if ($forum instanceof PEAR_Error) { + return $forum; + } + + return $forum['forum_name']; + } + + /** + * Create or modify an agora forum. This is used for apps to create + * forums for their own use. They will not show up in the regular + * agora forum view since they will be using a datatree group + * 'agora.forums.'. + * + * @param string $scope The Horde application that is saving this forum. + * @param string $parent The parent forum. + * @param array $info The forum information to save + */ + public function saveForum($scope, $parent, $info) + { + require_once dirname(__FILE__) . '/base.php'; + + $forums = &Agora_Messages::singleton($scope); + $forum_info = $this->prepareFormData($scope, $parent, $info); + if ($forum_info instanceof PEAR_Error) { + return $forum_info; + } + + return $forums->saveForum($forum_info); + } + + /** + * Allow other applications to delete forums. Used when an object that + * has been commented on has been deleted. + * + * @param string $scope The Horde application that the forum belongs to. + * @param string $forum_name The unique forum name to delete. + * + * @return boolean True on success. + */ + public function deleteForum($scope, $forum_name) + { + require_once dirname(__FILE__) . '/base.php'; + + $forums = &Agora_Messages::singleton($scope); + $id = $forums->getForumId($forum_name); + if ($id instanceof PEAR_Error) { + Horde::logMessage($id, __LINE__, __FILE__, PEAR_LOG_ERR); + return false; + } + + $forums = &Agora_Messages::singleton($scope, $id); + $result = $forums->deleteForum($id); + if ($result instanceof PEAR_Error) { + Horde::logMessage($result, __LINE__, __FILE__, PEAR_LOG_ERR); + return false; + } + return true; + } + + /** + * Returns all messages of a forum, in a threaded order. + * + * @param string $forum_name The unique name for the forum. + * @param boolean $bodies Whether to include message bodies in the view. + * @param string $sort_by Return messages sorted by this property. + * @param integer $sort_dir The direction by which to sort: + * 0 - ascending + * 1 - descending + * @param string $scope The application that the specified forum belongs + * to. + * @param string $base_url An alternate link where edit/delete/reply links + * point to. + * @param string $from The thread to begin listing at. + * @param string $count The number of threads to return. + * + * @return array All messages of the specified forum. + */ + public function getThreads($forum_name, $sort_by = 'message_timestamp', $sort_dir = 0, $bodies = false, + $scope = 'agora', $base_url = null, $from = 0, $count = 0) + { + require_once dirname(__FILE__) . '/base.php'; + + $forums = &Agora_Messages::singleton($scope); + if (empty($forum_name)) { + return $forums->getThreads(0, false, $sort_by, $sort_dir, true, '', $base_url, $from, $count); + } elseif (($forum_id = $forums->getForumId($forum_name)) instanceof PEAR_Error) { + return $forum_id; + } elseif (empty($forum_id)) { + return array(); + } + + $messages = &Agora_Messages::singleton($scope, $forum_id); + if ($messages instanceof PEAR_Error) { + return $messages; + } + + return $messages->getThreads(0, true, $sort_by, $sort_dir, true, '', $base_url, $from, $count); + } + + /** + * Returns all messages for the forums requested, in a threaded order. + * + * @param array $forum_names An array of unique forum names. + * @param boolean $bodies Whether to include message bodies in the view. + * @param string $sort_by Return messages sorted by this property. + * @param integer $sort_dir The direction by which to sort: + * 0 - ascending + * 1 - descending + * @param string $scope The application that the specified forum belongs + * to. + * @param string $base_url An alternate link where edit/delete/reply links + * point to. + * @param string $from The thread to begin listing at. + * @param string $count The number of threads to return. + * + * @return array An array of message arrays of the specified forum. + */ + public function getThreadsBatch($forum_names, $sort_by = 'message_timestamp', $sort_dir = 0, $bodies = false, + $scope = 'agora', $base_url = null, $from = 0, $count = 0) + { + require_once dirname(__FILE__) . '/base.php'; + + $results = array(); + $forums = &Agora_Messages::singleton($scope); + $results = array(); + foreach ($forum_names as $forum) { + $forum_id = $forums->getForumId($forum); + if ($forum_id instanceof PEAR_Error || empty($forum_id)) { + $results[$forum] = array(); + } else { + $messages = &Agora_Messages::singleton($scope, $forum_id); + if ($messages instanceof PEAR_Error) { + return $messages; + } + $results[$forum] = $messages->getThreads(0, true, $sort_by, $sort_dir, true, '', $base_url, $from, $count); + } + } + return $results; + } + + /** + * Returns all messages of a forum, in a threaded order. + * + * @param string $forum_owner Forum owner + * @param boolean $bodies Whether to include message bodies in the view. + * @param string $sort_by Return messages sorted by this property. + * @param integer $sort_dir The direction by which to sort: + * 0 - ascending + * 1 - descending + * @param string $scope The application that the specified forum belongs + * to. + * @param string $from The thread to begin listing at. + * @param string $count The number of threads to return. + * + * @return array All messages of the specified forum. + */ + public function getThreadsByForumOwner($owner, $sort_by = 'message_timestamp', $sort_dir = 0, $bodies = false, + $scope = 'agora', $from = 0, $count = 0) + { + require_once dirname(__FILE__) . '/base.php'; + + $forums = &Agora_Messages::singleton($scope); + + return $forums->getThreadsByForumOwner($owner, 0, true, $sort_by, $sort_dir, true, $from, $count); + } + + /** + * Returns the number of messages in a forum. + * + * @param string $forum_name The unique name for the forum. + * @param string $scope The application that the specified forum + * belongs to. + * @param int $thread_id The thread to count, if not supplied it + * will count all messages + * + * @return int The number of messages in the specified forum. + */ + public function numMessages($forum_name, $scope = 'agora', $thread_id = null) + { + require_once dirname(__FILE__) . '/base.php'; + + $forums = &Agora_Messages::singleton($scope); + + if (($forum_id = $forums->getForumId($forum_name)) instanceof PEAR_Error) { + return $forum_id; + } elseif (empty($forum_id)) { + return 0; + } + + $messages = Agora_Messages::singleton($scope, $forum_id); + if (is_a($messages, 'PEAR_Error')) { + return $messages; + } + return ($thread_id === null) ? $messages->_forum['message_count'] : $messages->countThreads($thread_id); + } + + /** + * Returns the number of messages for the requested forums. + * All requested forums must belong to the same scope. + * + * @param array $forum_name An array of unique forum names. + * @param string $scope The application that the specified forum + * belongs to. + * @param int $thread_id The thread to count, if not supplied it + * will count all messages + * + * @return mixed An array containing the message counts with the forum name as + * the key | PEAR_Error + */ + public function numMessagesBatch($forum_name, $scope = 'agora', $thread_id = null) + { + require_once dirname(__FILE__) . '/base.php'; + + $forums = &Agora_Messages::singleton($scope); + if ($forums instanceof PEAR_Error) { + return $forums; + } + + $results = array(); + foreach ($forum_name as $forum) { + if (($forum_id = $forums->getForumId($forum)) instanceof PEAR_Error) { + // In case of error, just return zero but log the error - so + // the calling app always gets an array with all the image ids. + Horde::logMessage($forum_id, __FILE__, __LINE__, 'PEAR_LOG_ERR'); + $results[$forum] = 0; + } elseif (empty($forum_id)) { + $results[$forum] = 0; + } else { + $messages = Agora_Messages::singleton($scope, $forum_id); + if ($messages instanceof PEAR_Error) { + return $messages; + } + $results[$forum] = ($thread_id === null) ? $messages->_forum['message_count'] : $messages->countThreads($thread_id); + } + } + return $results; + } + + /** + * Returns all threads of a forum in a threaded view. + * + * @param string $forum_name The unique name for the forum. + * @param boolean $bodies Whether to include message bodies in the view. + * @param string $scope The application that the specified forum belongs to. + * @param string $base_url An alternate link where edit/delete/reply links + * point to. + * @param string $template_file Template file to use. + * + * @return string The HTML code of the thread view. + */ + public function renderThreads($forum_name, $bodies = false, $scope = 'agora', $base_url = null, $template_file = false) + { + /* An agora parameter may already be present. If so it would + * interfere; remove it. */ + if ($base_url) { + $base_url = Horde_Util::removeParameter($base_url, array('agora', 'message_parent_id', 'delete')); + } + + $threads = $this->getThreads($forum_name, 'message_thread', 0, $bodies, $scope, $base_url); + if (!count($threads)) { + return ''; + } + + $col_headers = array('message_thread' => _("Subject"), + 'message_thread_class_plain' => '', + 'message_author' => _("Posted by"), + 'message_author_class_plain' => '', + 'message_timestamp' => _("Date"), + 'message_timestamp_class_plain' => ''); + + $forums = &Agora_Messages::singleton($scope); + $forum_id = $forums->getForumId($forum_name); + + $messages = &Agora_Messages::singleton($scope, $forum_id); + if ($messages instanceof PEAR_Error) { + return $messages; + } + return '

' . _("Comments") . '

' . + $messages->getThreadsUI($threads, $col_headers, $bodies, $template_file); + } + + + /** + * Allows other Horde apps to add/edit messages. + * + * The forum name is constructed by just the $forum_name variable + * under the data root 'agora.forums.'. It is up to the apps + * themselves to make sure that the forum name is unique. + * + * If the forum does not exist, it will be automatically created by + * Agora. + * + * @access private + * + * @param string $scope The application which is posting this message. + * @param string $forum_name The unique name for the forum. + * @param string $callback A callback method of the specified application + * that gets called to make sure that posting to + * this forum is allowed. + * @param array $params Any parameters for the forum message posting. + *
+     * message_id        - An existing message to edit
+     * message_parent_id - The ID of the parent message
+     * message_body      - Message body
+     * 
+ * + * @return mixed Returns message id if the message was posted + * or PEAR_Error object on error + */ + public function addMessage($scope, $forum_name, $callback, $params = array()) + { + global $registry; + + /* Check if adding messages is allowed. */ + $check = $registry->callByPackage($scope, $callback, array($forum_name)); + if ($check instanceof PEAR_Error || !$check) { + return ''; + } + + require_once dirname(__FILE__) . '/base.php'; + + /* Check if the forum exists and fetch the ID, or create a new one. */ + $forums = &Agora_Messages::singleton($scope); + if (($params['forum_id'] = $forums->getForumId($forum_name)) instanceof PEAR_Error) { + return $params['forum_id']; + } elseif (empty($params['forum_id'])) { + $forum_info = $this->prepareFormData($scope, false, array('forum_name' => $forum_name), $callback); + if ($forum_info instanceof PEAR_Error) { + return $forum_info; + } + $params['forum_id'] = $forums->saveForum($forum_info); + if ($params['forum_id'] instanceof PEAR_Error) { + return $params['forum_id']; + } + } + + /* Set up the messages control object. */ + $messages = &Agora_Messages::singleton($scope, $params['forum_id']); + if ($messages instanceof PEAR_Error) { + return $messages; + } + + return $messages->saveMessage($params); + } + + /** + * Allows other Horde apps to post messages. + * + * The forum name is constructed by just the $forum_name variable under the + * data root 'agora.forums.'. It is up to the apps themselves to make + * sure that the forum name is unique. + * + * If the forum does not exist, it will be automatically created by Agora. + * + * @access private + * + * @param string $scope The application which is posting this message. + * @param string $forum_name The unique name for the forum. + * @param string $callback A callback method of the specified application + * that gets called to make sure that posting to + * this forum is allowed. + * @param array $params Any parameters for the forum message posting. + *
+     * message_id        - An existing message to edit
+     * message_parent_id - The ID of the parent message
+     * title             - Posting title
+     * 
+ * @param string $url If specified, the form gets submitted to this URL + * instead of the current page. + * @param array $variables A hash with all variables of a submitted form + * generated by this method. + * + * @return mixed Returns either the rendered Horde_Form for posting a message + * or PEAR_Error object on error, or true in case of a + * successful post. + */ + public function postMessage($scope, $forum_name, $callback, $params = array(), + $url = null, $variables = null) + { + global $registry; + + /* Check if posting messages is allowed. */ + $check = $registry->callByPackage($scope, $callback, array($forum_name)); + if ($check instanceof PEAR_Error || !$check) { + return ''; + } + + require_once dirname(__FILE__) . '/base.php'; + + /* Create a separate notification queue. */ + $queue = Horde_Notification::singleton('agoraPostMessage'); + $queue->attach('status'); + + /* Set up the forums object. */ + $forums = &Agora_Messages::singleton($scope); + + /* Set up form variables. */ + $vars = Horde_Variables::getDefaultVariables(); + if (is_array($variables)) { + foreach ($variables as $varname => $value) { + $vars->add($varname, $value); + } + } + $formname = $vars->get('formname'); + + /* Check if the forum exists and fetch the ID. */ + $params['forum_id'] = $forums->getForumId($forum_name); + if ($params['forum_id'] === null) { + $vars->set('new_forum', $forum_name); + } else { + $vars->set('forum_id', $params['forum_id']); + } + + /* Set up the messages control object. */ + $messages = &Agora_Messages::singleton($scope, $params['forum_id']); + if ($messages instanceof PEAR_Error) { + $queue->push(_("Could not post the message: ") . $messages->getMessage(), 'horde.error'); + return Horde_Util::bufferOutput(array($queue, 'notify'), array('listeners' => 'status')); + } + + /* Check post permissions. */ + if (!$messages->hasPermission(Horde_Perms::EDIT)) { + $message = sprintf(_("You don't have permission to post messages in forum %s."), $params['forum_id']); + if (!empty($GLOBALS['conf']['hooks']['permsdenied'])) { + $message = Horde::callHook('perms_denied', array('agora'), 'horde', $message); + } + return $message; + } + + if (isset($params['message_id'])) { + $message = $messages->getMessage($params['message_id']); + if (!$formname) { + $vars = new Horde_Variables($message); + $vars->set('message_subject', $message['message_subject']); + $vars->set('message_body', $message['body']); + } + $editing = true; + } else { + $editing = false; + $params['message_id'] = null; + } + + /* Set a default title if one not specified. */ + if (!isset($params['title'])) { + $params['title'] = ($editing) ? _("Edit Message") : _("Post a New Message"); + } + + /* Get the form object. */ + $form = $messages->getForm($vars, $params['title'], $editing, is_null($params['forum_id'])); + + /* Validate the form. */ + if ($form->validate($vars)) { + $form->getInfo($vars, $info); + + if (isset($info['new_forum'])) { + $forum_info = $this->prepareFormData($scope, false, array('forum_name' => $info['new_forum']), $callback); + if ($forum_info instanceof PEAR_Error) { + return $forum_info; + } + $info['forum_id'] = $m_params['forum_id'] = $forums->saveForum($forum_info); + $result = &Agora_Messages::singleton($scope, $info['forum_id']); + if ($result instanceof PEAR_Error) { + return $result; + } + } + + /* Try and store this message and get back a new message_id */ + $message_id = $messages->saveMessage($info); + if ($message_id instanceof PEAR_Error) { + $queue->push(_("Could not post the message: ") . $message_id->getMessage(), 'horde.error'); + } else { + $queue->push(_("Message posted."), 'horde.success'); + $count = $messages->countMessages(); + $registry->callByPackage($scope, $callback, array($forum_name, 'messages', $count)); + return Horde_Util::bufferOutput(array($queue, 'notify'), array('listeners' => 'status')); + } + } + + /* Replying to a previous post? */ + if (isset($params['message_parent_id']) && !$form->isSubmitted()) { + $message = $messages->replyMessage($params['message_parent_id']); + if (!($message instanceof PEAR_Error)) { + $vars->set('message_parent_id', $params['message_parent_id']); + $vars->set('message_subject', $message['message_subject']); + $vars->set('message_body', $message['body']); + } else { + /* Bad parent message id, offer to do a regular post. */ + $vars->set('message_parent_id', ''); + } + } + + if (!$url) { + $url = Horde::selfUrl(true, false, true); + } + + return Horde_Util::bufferOutput(array($form, 'renderActive'), null, $vars, $url, 'post', null, false); + } + + /** + * Allows other Horde apps to remove messages. + * + * The forum name is constructed by just the $forum_name variable + * under the data root 'agora.forums.'. It is up to the apps + * themselves to make sure that the forum name is unique. + * + * @access private + * + * @param string $scope The application which is posting this message. + * @param string $forum_name The unique name for the forum. + * @param string $callback A callback method of the specified application + * that gets called to make sure that posting to + * this forum is allowed. + * @param array $params Any parameters for the forum message posting. + *
+     * message_id        - An existing message to delete
+     * 
+ * @param array $variables A hash with all variables of a submitted form + * generated by this method. + * + * @return mixed Returns either the rendered Horde_Form for posting a message + * or PEAR_Error object on error, or true in case of a + * successful post. + */ + public function removeMessage($scope, $forum_name, $callback, $params = array(), + $variables = null) + { + global $registry; + + /* Check if posting messages is allowed. */ + $check = $registry->callByPackage($scope, $callback, array($forum_name)); + if ($check instanceof PEAR_Error || !$check) { + return ''; + } + + require_once dirname(__FILE__) . '/base.php'; + + /* Create a separate notification queue. */ + $queue = Horde_Notification::singleton('agoraRemoveMessage'); + $queue->attach('status'); + + /* Set up the forums object. */ + $forums = &Agora_Messages::singleton($scope); + $params['forum_id'] = $forums->getForumId($forum_name); + if (empty($params['forum_id'])) { + return PEAR::raiseError(sprintf(_("Forum %s does not exist."), $forum_name)); + } + + /* Set up the messages control object. */ + $messages = &Agora_Messages::singleton($scope, $params['forum_id']); + if ($messages instanceof PEAR_Error) { + PEAR::raiseError(sprintf(_("Could not delete the message. %s"), $messages->getMessage())); + } + + /* Check delete permissions. */ + if (!$messages->hasPermission(Horde_Perms::DELETE)) { + return PEAR::raiseError(sprintf(_("You don't have permission to delete messages in forum %s."), $params['forum_id'])); + } + + /* Get the message to be deleted. */ + $message = $messages->getMessage($params['message_id']); + if ($message instanceof PEAR_Error) { + return PEAR::raiseError(sprintf(_("Could not delete the message. %s"), $message->getMessage())); + } + + /* Set up the form. */ + $vars = new Horde_Variables($variables); + $form = new Horde_Form($vars, sprintf(_("Delete \"%s\" and all replies?"), $message['message_subject']), 'delete_agora_message'); + $form->setButtons(array(_("Delete"), _("Cancel"))); + $form->addHidden('', 'forum_id', 'int', true); + $form->addHidden('', 'message_id', 'int', true); + + if ($form->validate()) { + if ($vars->get('submitbutton') == _("Delete")) { + $result = $messages->deleteMessage($params['message_id']); + if ($result instanceof PEAR_Error) { + $queue->push(sprintf(_("Could not delete the message. %s"), $result->getMessage()), 'horde.error'); + } else { + $queue->push(_("Message deleted."), 'horde.success'); + $count = $messages->countMessages(); + $registry->callByPackage($scope, $callback, array($forum_name, 'messages', $count)); + } + } else { + $queue->push(_("Message not deleted."), 'horde.message'); + } + return Horde_Util::bufferOutput(array($queue, 'notify'), array('listeners' => 'status')); + } + + return Horde_Util::bufferOutput(array($form, 'renderActive'), null, null, null, 'post', null, false); + } + + /** + * Allows other Horde apps to post messages. + * + * In most apps we use the same code to make comments possible. This function + * does most of that. Allow comments to be added to any app. The app itself + * should check if the agora api is present, determine a key and call this + * function before app::menu is called (before any output has started. At the + * end of its output it can print the array returned to show the comments. + * + * @access private + * + * @param string $scope The application which is posting this message. + * @param string $key Unique key from the object (picture etc we're + * viewing. It will be used as the forum name. + * @param string $callback A callback method of the specified application + * that gets called to make sure that posting to + * this forum is allowed. + * @param boolean $body Show the comment bodies in the thread view or + * not. + * @param string $base_url Base URL the edit/delete/reply links should + * point to. + * @param string $url If specified, the form gets submitted to this + * URL instead of the current page. + * @param array $variables A hash with all variables of a submitted form + * generated by this method. + * @param string $template_file Template file to use. + * + * @return mixed array Returns either the rendered Horde_Form for comments + * and threads for posting/viewing a message or PEAR + * objects on error. + */ + public function doComments($scope, $key, $callback, $bodies = true, + $base_url = null, $url = null, $variables = null, + $template_file = false) + { + require_once dirname(__FILE__) . '/base.php'; + + if (is_null($base_url)) { + $base_url = Horde::selfUrl(true); + } + + list($forum_id, $message_id) = Agora::getAgoraId(); + + $params = array(); + if ($message_id) { + $params['message_id'] = $message_id; + } + + if ($parent = Horde_Util::getFormData('message_parent_id')) { + $params['message_parent_id'] = $parent; + } + + // See if we're editing. + if (isset($params['message_id'])) { + $params['title'] = _("Edit a comment"); + } else { + $params['title'] = _("Add a comment"); + $params['message_id'] = null; + } + + if (Horde_Util::getFormData('delete') === null) { + $comments = $this->postMessage($scope, $key, $callback, $params, $url, $variables); + } else { + $comments = $this->removeMessage($scope, $key, $callback, $params, $url, $variables); + } + + if ($comments instanceof PEAR_Error) { + return $comments; + } + + include AGORA_BASE . '/lib/Comments.php'; + $threads = Agora_ViewComments::render($key, $scope, $base_url, $template_file); + + if ($threads instanceof PEAR_Error) { + $threads = $threads->getMessage(); + } + if ($comments instanceof PEAR_Error) { + $comments = $comments->getMessage(); + } + + return array('threads' => $threads, 'comments' => $comments); + } + + /** + * Fill up a form data array. + * + * @param string $scope The Horde application that is saving this forum. + * @param string $parent The parent forum. + * @param array $info The forum information to consisting of: + * forum_parent_id + * forum_name + * forum_description + * forum_moderated + * forum_attachments + * @param string $callback A callback method of the specified application + * that gets called to make sure that posting to + * this forum is allowed. + */ + public function prepareFormData($scope, $parent = false, $info = array(), $callback = null) + { + require_once dirname(__FILE__) . '/base.php'; + + $forums = &Agora_Messages::singleton($scope); + + if ($parent) { + $parent_id = $forums->getForumId($parent); + $parent_form = $forums->getForum($parent_id); + $info['forum_parent_id'] = $parent_id; + if (!isset($info['forum_moderated'])) { + $info['forum_moderated'] = $parent_form->isModerated(); + } + if (!isset($info['forum_attachments'])) { + $info['forum_attachments'] = $parent_form->forum->data['forum_attachments']; + } + } elseif (isset($info['forum_name'])) { + $forum_id = $forums->getForumId($info['forum_name']); + if (!empty($forum_id)) { + $forum = $forums->getForum($forum_id); + $info = array_merge($forum, $info); + } + } + + if (!isset($info['forum_parent_id'])) { + $info['forum_parent_id'] = 0; + } + + if (!isset($info['forum_attachments'])) { + $info['forum_attachments'] = ($GLOBALS['conf']['forums']['enable_attachments'] == '-1') ? false : true; + } + + if (!isset($info['forum_moderated'])) { + $info['forum_moderated'] = false; + } + + if (!isset($info['forum_description'])) { + $info['forum_description'] = ''; + } + + if (!isset($info['author'])) { + $info['author'] = ''; + } + + if ($callback) { + /* Get the data owner */ + if (empty($info['author'])) { + $info['author'] = $GLOBALS['registry']->callByPackage($scope, $callback, array($info['forum_name'], 'owner')); + if ($info['author'] instanceof PEAR_Error) { + return $info['author']; + } + } + + /* Get description */ + if (empty($info['forum_description'])) { + $info['forum_description'] = $GLOBALS['registry']->callByPackage($scope, $callback, array($info['forum_name'])); + if ($info['forum_description'] instanceof PEAR_Error) { + return $info['forum_description']; + } + } + } + + return $info; + } + + /** + * Prepare the moderate form + * + * @param string $scope The Horde application that is saving this forum. + */ + public function moderateForm($scope) + { + global $notification, $prefs, $registry; + + require_once dirname(__FILE__) . '/base.php'; + + $api_call = true; + + return require AGORA_BASE . '/moderate.php'; + } +} \ No newline at end of file diff --git a/agora/lib/Application.php b/agora/lib/Application.php new file mode 100644 index 000000000..c44173207 --- /dev/null +++ b/agora/lib/Application.php @@ -0,0 +1,71 @@ + + * @author Duck + * @package Agora + */ + +class Agora_Application extends Horde_Registry_Application +{ + public $version = 'H4 (1.0-git)'; + + /** + * Returns a list of available permissions. + * + * @return array An array describing all available permissions. + */ + public function perms() + { + static $perms = array(); + if (!empty($perms)) { + return $perms; + } + + require_once dirname(__FILE__) . '/base.php'; + + $perms['tree']['agora']['admin'] = true; + $perms['title']['agora:admin'] = _("Admin"); + $perms['title']['agora:forums'] = _("Forums"); + + foreach ($GLOBALS['registry']->listApps() as $scope) { + $perms['title']['agora:forums:' . $scope] = $GLOBALS['registry']->get('name', $scope); + $perms['tree']['agora']['forums'][$scope] = false; + + $forums = &Agora_Messages::singleton($scope); + $forums_list = $forums->getBareForums(); + if (($forums_list instanceof PEAR_Error) || empty($forums_list)) { + continue; + } + + foreach ($forums_list as $id => $title) { + $perms['tree']['agora']['forums'][$scope][$id] = false; + $perms['title']['agora:forums:' . $scope . ':' . $id] = $title; + } + + } + + return $perms; + } + + /** + * Generate the menu to use on the prefs page. + * + * @return Horde_Menu A Horde_Menu object. + */ + public function prefsMenu() + { + return Agora::getMenu(); + } +} diff --git a/agora/lib/Block/forums.php b/agora/lib/Block/forums.php new file mode 100644 index 000000000..b5d25db73 --- /dev/null +++ b/agora/lib/Block/forums.php @@ -0,0 +1,96 @@ + + * @author Jan Schneider + * @package Horde_Block + */ +class Horde_Block_agora_forums extends Horde_Block { + + var $_app = 'agora'; + + function _title() + { + return Horde::link(Horde::applicationUrl('forums.php', true)) . _("Forums") . ''; + } + + function _params() + { + /* Display the last X number of threads. */ + $forum_display = array(); + $forum_display['name'] = _("Only display this many forums (0 to display all forums)"); + $forum_display['type'] = 'int'; + $forum_display['default'] = 0; + $forum_display['values'] = $GLOBALS['prefs']->getValue('forums_block_display'); + + return array('forum_display' => $forum_display); + } + + function _content() + { + global $registry; + + require_once dirname(__FILE__) . '/../base.php'; + + /* Set up the forums object. */ + $forums = array(Agora_Messages::singleton()); + if (Horde_Auth::isAdmin()) { + foreach ($registry->listApps(array('hidden', 'notoolbar', 'active')) as $scope) { + if ($registry->hasMethod('hasComments', $scope) && + $registry->callByPackage($scope, 'hasComments') === true) { + $forums[] = &Agora_Messages::singleton($scope); + } + } + } + + /* Get the sorting. */ + $sort_by = Agora::getSortBy('forums'); + $sort_dir = Agora::getSortDir('forums'); + + /* Get the list of forums. */ + $forums_list = array(); + foreach ($forums as $forum) { + $scope_forums = $forum->getForums(0, true, $sort_by, $sort_dir, true); + if ($scope_forums instanceof PEAR_Error) { + return $scope_forums->getMessage(); + } + $forums_list = array_merge($forums_list, $scope_forums); + } + + /* Show a message if no available forums. Don't raise an error + * as it is not an error to have no forums. */ + if (empty($forums_list)) { + return _("There are no forums."); + } + + /* Display only the most recent threads if preference set. */ + if (!empty($this->_params['forum_display'])) { + $forums_list = array_slice($forums_list, 0, $this->_params['forum_display']); + } + + /* Set up the column headers. */ + $col_headers = array('forum_name' => _("Forum"), 'message_count' => _("Posts"), 'message_subject' => _("Last Post"), 'message_author' => _("Posted by"), 'message_timestamp' => _("Date")); + $col_headers = Agora::formatColumnHeaders($col_headers, $sort_by, $sort_dir, 'forums'); + + /* Set up the template tags. */ + $view = new Agora_View(); + $view->col_headers = $col_headers; + $view->forums_list = $forums_list; + + return $view->render('block/forums.html.php'); + } +} \ No newline at end of file diff --git a/agora/lib/Block/thread.php b/agora/lib/Block/thread.php new file mode 100644 index 000000000..485671640 --- /dev/null +++ b/agora/lib/Block/thread.php @@ -0,0 +1,94 @@ + + * @package Horde_Block + */ +class Horde_Block_agora_thread extends Horde_Block { + + var $_app = 'agora'; + + function _params() + { + require_once dirname(__FILE__) . '/../base.php'; + + $forumOb = &Agora_Messages::singleton(); + $forums_list = $forumOb->getForums(0, true, 'forum_name', 0, true); + + $threads = array('name' => _("Thread"), + 'type' => 'mlenum', + 'values' => array()); + + foreach ($forums_list as $forum_id => $forum) { + $threadsOb = &Agora_Messages::singleton('agora', $forum_id); + $threads_list = $threadsOb->getThreads(); + foreach ($threads_list as $thread_id => $thread) { + if (!isset($threads['default'])) { + $threads['default'] = $forum_id . '.' . $thread['message_id']; + } + $threads['values'][$forum['indent'] . $forum['forum_name']][$forum_id . '.' . $thread['message_id']] = $thread['message_subject']; + } + } + + return array('thread_id' => $threads); + } + + function _title() + { + return _("Single Thread"); + } + + function _content() + { + /* Return empty if we don't have a thread set. */ + if (empty($this->_params['thread_id'])) { + return ''; + } + + require_once dirname(__FILE__) . '/../base.php'; + + /* Set up the message object. */ + list($forum_id, $message_id) = explode('.', $this->_params['thread_id']); + $messages = &Agora_Messages::singleton('agora', $forum_id); + + /* Check if valid thread, otherwise show forum list. */ + if ($messages instanceof PEAR_Error || empty($messages)) { + return PEAR::raiseError(_("Unable to fetch selected thread.")); + } + + /* Get the sorting. */ + $sort_by = Agora::getSortBy('threads'); + $sort_dir = Agora::getSortDir('threads'); + $view_bodies = $GLOBALS['prefs']->getValue('thread_view_bodies'); + + /* Get the message array and the sorted thread list. */ + $threads_list = $messages->getThreads($messages->getThreadRoot($message_id), true, $sort_by, $sort_dir, $view_bodies, Horde::selfUrl()); + + /* Set up the column headers. */ + $col_headers = array(array('message_thread' => _("Thread"), 'message_subject' => _("Subject")), 'message_author' => _("Posted by"), 'message_timestamp' => _("Date")); + $col_headers = Agora::formatColumnHeaders($col_headers, $sort_by, $sort_dir, 'threads'); + + /* Set up the template tags. */ + $view = new Agora_View(); + $view->col_headers = $col_headers; + $view->threads_list = $threads_list; + $view->threads_list_header = _("Thread List"); + $view->thread_view_bodies = $view_bodies; + + return $view->render('block/thread.html.php'); + } +} \ No newline at end of file diff --git a/agora/lib/Block/threads.php b/agora/lib/Block/threads.php new file mode 100644 index 000000000..032786df4 --- /dev/null +++ b/agora/lib/Block/threads.php @@ -0,0 +1,132 @@ + + * @author Jan Schneider + * @package Horde_Block + */ +class Horde_Block_agora_threads extends Horde_Block { + + /** + * @var array + */ + var $_threads = array(); + + /** + * @var string + */ + var $_app = 'agora'; + + /** + * @return array + */ + function _params() + { + require_once dirname(__FILE__) . '/../base.php'; + + $forums = Agora_Messages::singleton(); + + /* Get the list of forums to display. */ + $forum_id = array( + 'name' => _("Forum"), + 'type' => 'enum', + 'values' => $forums->getForums(0, false, 'forum_name', 0, !Horde_Auth::isAdmin()), + ); + + /* Display the last X number of threads. */ + $thread_display = array( + 'name' => _("Only display this many threads (0 to display all threads)"), + 'type' => 'int', + 'default' => 0, + 'values' => $GLOBALS['prefs']->getValue('threads_block_display'), + ); + + return array('forum_id' => $forum_id, + 'thread_display' => $thread_display); + } + + /** + * @return string + */ + function _title() + { + require_once dirname(__FILE__) . '/../base.php'; + + if (!isset($this->_params['forum_id'])) { + return _("Threads"); + } + + if (empty($this->_threads)) { + $this->_threads = &Agora_Messages::singleton('agora', $this->_params['forum_id']); + if ($this->_threads instanceof PEAR_Error) { + return _("Threads"); + } + } + + $title = sprintf(_("Threads in \"%s\""), $this->_threads->_forum['forum_name']); + $url = Horde::applicationUrl('threads.php', true); + if (!empty($scope)) { + $url = Horde_Util::addParameter($url, 'scope', $scope); + } + return Horde::link(Agora::setAgoraId($this->_params['forum_id'], null, $url)) + . $title . ''; + } + + /** + * @return string + */ + function _content() + { + require_once dirname(__FILE__) . '/../base.php'; + + if (!isset($this->_params['forum_id'])) { + return _("No forum selected"); + } + + if (empty($this->_threads)) { + $this->_threads = &Agora_Messages::singleton('agora', $this->_params['forum_id']); + if ($this->_threads instanceof PEAR_Error) { + return PEAR::raiseError(_("Unable to fetch threads for selected forum.")); + } + } + + /* Get the sorting. */ + $sort_by = Agora::getSortBy('threads'); + $sort_dir = Agora::getSortDir('threads'); + + /* Get a list of threads and display only the most recent if + * preference is set. */ + $threads_list = $this->_threads->getThreads(0, false, $sort_by, $sort_dir, false, Horde::selfUrl(), null, 0, !empty($this->_params['thread_display']) ? $this->_params['thread_display'] : null); + + /* Show a message if no available threads. Don't raise an error + * as it is not an error to have no threads. */ + if (empty($threads_list)) { + return _("No available threads."); + } + + /* Set up the column headers. */ + $col_headers = array('message_subject' => _("Subject"), 'message_author' => _("Posted by"), 'message_timestamp' => _("Date")); + $col_headers = Agora::formatColumnHeaders($col_headers, $sort_by, $sort_dir, 'threads'); + + /* Set up the template tags. */ + $view = new Agora_View(); + $view->col_headers = $col_headers; + $view->threads = $threads_list; + + return $view->render('block/threads.html.php'); + } +} \ No newline at end of file diff --git a/agora/lib/Comments.php b/agora/lib/Comments.php new file mode 100644 index 000000000..a7294e663 --- /dev/null +++ b/agora/lib/Comments.php @@ -0,0 +1,127 @@ + + * @author Duck + */ +class Agora_ViewComments { + + /** + * Returns all threads of a forum in a threaded view. + * + * @param string $forum_name The unique name for the forum. + * @param boolean $bodies Whether to include message bodies in the view. + * @param string $scope The application that the specified forum belongs to. + * @param string $base_url An alternate link where edit/delete/reply links + * point to. + * @param string $template_file Template file to use. + * + * @return string The HTML code of the thread view. + */ + static public function render($forum_name, $scope = 'agora', $base_url = null, $template_file = false) + { + $forums = &Agora_Messages::singleton($scope); + $forum_id = $forums->getForumId($forum_name); + if ($forum_id === null) { + return ''; + } + + $messages = &Agora_Messages::singleton($scope, $forum_id); + if ($messages instanceof PEAR_Error) { + return $messages->getMessage(); + } + + if (($view_bodies = Horde_Util::getPost('bodies')) !== null) { + $GLOBALS['prefs']->setValue('comments_view_bodies', $view_bodies); + } else { + $view_bodies = $GLOBALS['prefs']->getValue('comments_view_bodies'); + } + + if ($messages->_forum['message_count'] == 0) { + return ''; + } + + $sort_by = Agora::getSortBy('comments'); + $sort_dir = Agora::getSortDir('comments'); + $html = '
' . _("Comments") . ' (' . $messages->_forum['message_count'] . ')' . '  '; + if (!$GLOBALS['prefs']->isLocked('comments_view_bodies')) { + $rss = Horde_Util::addParameter(Horde::applicationUrl('rss/threads.php', true, -1), array('scope' => $scope, 'forum_id' => $forum_id)); + $html .= ''; + $html .= '
'; + $html .= _("View") . ' '; + + if ($view_bodies != '1') { + $html .= ' ' . _("Sort by") . ' '; + $html .= ''; + $html .= ' ' . _("Sort direction") . ' '; + $html .= ''; + } + $html .= ''; + $html .= ' RSS '; + $html .= '
'; + } + $html .= '
'; + + $col_headers = array('message_thread' => _("Subject"), + 'message_thread_class_plain' => '', + 'message_author' => _("Posted by"), + 'message_author_class_plain' => '', + 'message_timestamp' => _("Date"), + 'message_timestamp_class_plain' => ''); + + if ($view_bodies == 1) { + $threads = $messages->getThreads(0, true, 'message_thread', 0, true, '', $base_url); + $html .= $messages->getThreadsUI($threads, $col_headers, true, $template_file); + } else { + $thread_page = Horde_Util::getFormData('comments_page', 0); + $thread_per_page = $GLOBALS['prefs']->getValue('comments_per_page'); + $thread_start = $thread_page * $thread_per_page; + + if (empty($template_file)) { + $template_file = '/messages/flat.html.php'; + } + + if ($messages->_forum['message_count'] > $thread_per_page && $view_bodies == 2) { + $vars = new Horde_Variables(array('comments_page' => $thread_page)); + $pager_ob = new Horde_Ui_Pager('comments_page', $vars, + array('num' => $messages->_forum['message_count'], + 'url' => $base_url, + 'perpage' => $thread_per_page)); + + $pager_html = $pager_ob->render(); + } else { + $pager_html = ''; + } + + $threads_list = $messages->getThreads(0, true, $sort_by, $sort_dir, 1, '', $base_url, $thread_start, $thread_per_page); + if ($threads_list instanceof PEAR_Error) { + $html .= $threads_list->getDebugInfo(); + } else { + $html .= $pager_html + . $messages->getThreadsUI($threads_list, $col_headers, true, $template_file) + . $pager_html; + } + } + + return $html; + } + +} diff --git a/agora/lib/Forms/Forum.php b/agora/lib/Forms/Forum.php new file mode 100644 index 000000000..c4befb6ac --- /dev/null +++ b/agora/lib/Forms/Forum.php @@ -0,0 +1,55 @@ +getForums(0, false, 'forum_name', 0, true)); + + $this->setButtons($vars->get('forum_id') ? _("Update") : _("Create")); + + $this->addHidden('', 'forum_id', 'int', false); + $this->addVariable(_("Forum name"), 'forum_name', 'text', true); + + if (count($forums_list) > 0) { + $this->addVariable(_("Parent forum"), 'forum_parent_id', 'enum', false, false, null, array($forums_list, true)); + } else { + $this->addHidden('', 'forum_parent_id', 'text', false); + $vars->set('forum_parent_id', key($forums_list)); + } + $this->addVariable(_("Enter a brief description of this forum"), 'forum_description', 'longtext', false, false, null, array(4, 40)); + $this->addVariable(_("Is this a moderated forum?"), 'forum_moderated', 'boolean', false, false, _("Set this if you want all messages to be checked by a moderator before they are posted.")); + $this->addVariable(_("Optional email address to recieve a copy of each posted message"), 'forum_distribution_address', 'text', false, false); + if ($conf['forums']['enable_attachments'] == '0') { + $this->addVariable(_("Allow attachments in this forum?"), 'forum_attachments', 'boolean', false, false, _("If selected users will be able to attach files to their messages.")); + } + } + + /** + */ + function execute(&$vars) + { + global $forums; + + $this->getInfo($vars, $info); + return $forums->saveForum($info); + } + +} diff --git a/agora/lib/Forms/Message.php b/agora/lib/Forms/Message.php new file mode 100644 index 000000000..07f6a8009 --- /dev/null +++ b/agora/lib/Forms/Message.php @@ -0,0 +1,64 @@ +remove('captcha'); + $this->removeVariable($varname = 'captcha'); + $this->insertVariableBefore('newcomment', _("Spam protection"), 'captcha', 'figlet', true, null, null, array(Agora::getCAPTCHA(true), $conf['forums']['figlet_font'])); + } + return false; + } + + return true; + } + + function &getRenderer($params = array()) + { + $renderer = new Horde_Form_Renderer_MessageForm($params); + return $renderer; + } + +} + +/** + * Message renderer class. + * + * @package Agora + */ +class Horde_Form_Renderer_MessageForm extends Horde_Form_Renderer { + + function _renderVarInputEnd(&$form, &$var, &$vars) + { + if ($var->hasDescription()) { + // The description is actually the quote button + echo ' ' . $var->getDescription(); + } + } + + function close($focus = false) + { + echo '' . "\n"; + + if (Horde_Util::getGet('reply_focus')) { + echo ''; + } + } + +} diff --git a/agora/lib/Forms/Search.php b/agora/lib/Forms/Search.php new file mode 100644 index 000000000..61efb97cf --- /dev/null +++ b/agora/lib/Forms/Search.php @@ -0,0 +1,73 @@ + + * @package Agora + */ +class SearchForm extends Horde_Form { + + /** + * Get list of available forums + */ + function getForumsType($scope) + { + $forums = &Agora_Messages::singleton($scope); + $forumlist = $forums->getBareForums(); + + return array('multienum', array($forumlist)); + } + + /** + * Set up forum object + */ + function SearchForm(&$vars, $scope) + { + parent::Horde_Form($vars, _("Search Forums")); + + if ($scope == 'agora') { + list($forumstype, $forumsparams) = $this->getForumsType($scope); + $this->addVariable(_("Search in these forums"), 'forums', $forumstype, + false, false, null, $forumsparams); + } else { + $this->addHidden('', 'scope', 'text', false); + } + + $this->addVariable(_("Keywords"), 'keywords', 'text', false); + $var = &$this->addVariable(_("Require all keywords?"), 'allkeywords', + 'boolean', false); + $var->setDefault(true); + + $var = &$this->addVariable(_("Search in subjects?"), + 'searchsubjects', 'boolean', false); + $var->setDefault(true); + + $this->addVariable(_("Search in message contents?"), 'searchcontents', + 'boolean', false); + + $this->addVariable(_("Author"), 'author', 'text', false); + + $this->setButtons(_("Search")); + } + + /** + * Trick getInfo to catch pager parameters + */ + function getInfo($vars, &$info) + { + parent::getInfo($vars, $info); + + if (!$this->isSubmitted()) { + foreach ($info as $key => $val) { + $info[$key] = $vars->get($key); + } + } + } +} \ No newline at end of file diff --git a/agora/lib/Messages.php b/agora/lib/Messages.php new file mode 100644 index 000000000..51b9f831d --- /dev/null +++ b/agora/lib/Messages.php @@ -0,0 +1,2340 @@ + + * @author Jan Schneider + * @author Duck + * @package Agora + */ +class Agora_Messages { + + /** + * A hash containing any parameters for the current driver. + * + * @var array + */ + protected $_params = array(); + + /** + * The forums scope. + * + * @var string + */ + protected $_scope; + + /** + * Current forum data + * + * @var array + */ + public $_forum; + + /** + * Current forum ID + * + * @var string + */ + protected $_forum_id; + + /** + * Handle for the current database connection. + * + * @var DB + */ + protected $_db; + + /** + * Handle for the current database connection, used for writing. Defaults + * to the same handle as $_db if a separate write database is not required. + * + * @var DB + */ + protected $_write_db; + + /** + * Scope theads table name + * + * @var string + */ + protected $_threads_table = 'agora_messages'; + + /** + * Scope theads table name + * + * @var string + */ + protected $_forums_table = 'agora_forums'; + + /** + * Cache object + * + * @var Horde_Cache + */ + protected $_cache; + + /** + * Constructor + */ + public function __construct($scope) + { + /* Set parameters. */ + $this->_scope = $scope; + $this->_connect(); + + /* Initialize the Cache object. */ + $this->_cache = &Horde_Cache::singleton($GLOBALS['conf']['cache']['driver'], + Horde::getDriverConfig('cache', $GLOBALS['conf']['cache']['driver'])); + } + + /** + * Attempts to return a reference to a concrete Messages instance. It will + * only create a new instance if no Messages instance currently exists. + * + * This method must be invoked as: $var = &Agora_Messages::singleton(); + * + * @param string $scope Application scope to use + * @param int $forum_id Form to link to + * + * @return Forums The concrete Messages reference, or false on error. + */ + static public function &singleton($scope = 'agora', $forum_id = 0) + { + static $objects = array(); + + if (!isset($objects[$scope])) { + $driver = $GLOBALS['conf']['threads']['split'] ? 'split_sql' : 'sql'; + require_once AGORA_BASE . '/lib/Messages/' . $driver . '.php'; + $class_name = 'Agora_Messages_' . $driver; + $objects[$scope] = new $class_name($scope); + } + + if ($forum_id) { + /* Check if there was a valid forum object to get. */ + $forum = $objects[$scope]->getForum($forum_id); + if ($forum instanceof PEAR_Error) { + return $forum; + } + + /* Set curernt forum id and forum data */ + $objects[$scope]->_forum = $forum; + $objects[$scope]->_forum_id = (int)$forum_id; + } + + return $objects[$scope]; + } + + /** + * Checks if attachments are allowed in messages for the current forum. + * + * @return boolean Whether attachments allowed or not. + */ + public function allowAttachments() + { + return ($GLOBALS['conf']['forums']['enable_attachments'] == '1' || + ($GLOBALS['conf']['forums']['enable_attachments'] == '0' && + $this->_forum['forum_attachments'])); + } + + /** + * Saves the message. + * + * @param array $info Array containing all the message data to save. + * + * @return mixed Message ID on success or PEAR_Error on failure. + */ + public function saveMessage($info) + { + /* Check if the thread is locked before changing anything. */ + if ($info['message_parent_id'] && + $this->isThreadLocked($info['message_parent_id'])) { + return PEAR::raiseError(_("This thread has been locked.")); + } + + /* Check post permissions. */ + if (!$this->hasPermission(Horde_Perms::EDIT)) { + return PEAR::raiseError(sprintf(_("You don't have permission to post messages in forum %s."), $this->_forum_id)); + } + + if (empty($info['message_id'])) { + /* Get thread parents */ + if ($info['message_parent_id'] > 0) { + $parents = $this->_db->getOne('SELECT parents FROM ' . $this->_threads_table . ' WHERE message_id = ?', + null, array($info['message_parent_id'])); + $info['parents'] = $parents . ':' . $info['message_parent_id']; + $info['message_thread'] = $this->getThreadRoot($info['message_parent_id']); + } else { + $info['parents'] = ''; + $info['message_thread'] = 0; + } + + /* Create new message */ + $sql = 'INSERT INTO ' . $this->_threads_table + . ' (message_id, forum_id, message_thread, parents, ' + . 'message_author, message_subject, body, attachments, ' + . 'message_timestamp, message_modifystamp, ip) ' + . ' VALUES (?, ?, ?, ?, ?, ?, ?, 0, ?, ?, ?)'; + + $author = Horde_Auth::getAuth() ? Horde_Auth::getAuth() : $info['posted_by']; + $info['message_id'] = $this->_write_db->nextId('agora_messages'); + $params = array($info['message_id'], + $this->_forum_id, + $info['message_thread'], + $info['parents'], + $author, + $this->convertToDriver($info['message_subject']), + $this->convertToDriver($info['message_body']), + $_SERVER['REQUEST_TIME'], + $_SERVER['REQUEST_TIME'], + $_SERVER['REMOTE_ADDR']); + + $statement = $this->_write_db->prepare($sql); + if ($statement instanceof PEAR_Error) { + return $statement; + } + $result = $statement->execute($params); + $statement->free(); + if ($result instanceof PEAR_Error) { + Horde::logMessage($result, __FILE__, __LINE__, PEAR_LOG_ERR); + return $result; + } + + /* Update last message in forum, but only if it is not moderated */ + if (!$this->_forum['forum_moderated']) { + // Send the new post to the distribution address + if ($this->_forum['forum_distribution_address']) { + Agora::distribute($info['message_id']); + } + /* Update cached message/thread counts and last poster */ + $this->_lastInForum($this->_forum_id, $info['message_id'], $author, $_SERVER['REQUEST_TIME']); + $this->_forumSequence($this->_forum_id, 'message', '+'); + if ($info['message_thread']) { + $this->_sequence($info['message_thread'], '+'); + $this->_lastInThread($info['message_thread'], $info['message_id'], $author, $_SERVER['REQUEST_TIME']); + } else { + $this->_forumSequence($this->_forum_id, 'thread', '+'); + } + } + + } else { + /* Update message data */ + $sql = 'UPDATE ' . $this->_threads_table . ' SET ' . + 'message_subject = ?, body = ?, message_modifystamp = ? WHERE message_id = ?'; + $params = array($this->convertToDriver($info['message_subject']), + $this->convertToDriver($info['message_body']), + $_SERVER['REQUEST_TIME'], + $info['message_id']); + + $statement = $this->_write_db->prepare($sql); + if ($statement instanceof PEAR_Error) { + return $statement; + } + $result = $statement->execute($params); + $statement->free(); + if ($result instanceof PEAR_Error) { + Horde::logMessage($result, __FILE__, __LINE__, PEAR_LOG_ERR); + return $result; + } + + /* Get message thread for cache expiration */ + $info['message_thread'] = $this->getThreadRoot($info['message_id']); + if ($info['message_thread'] instanceof PEAR_Error) { + return $info['message_thread']; + } + } + + /* Handle attachment saves or deletions. */ + if (!empty($info['message_attachment']) || + !empty($info['attachment_delete'])) { + $vfs = Agora::getVFS(); + if ($vfs instanceof PEAR_Error) { + return $vfs; + } + $vfs_dir = Agora::VFS_PATH . $this->_forum_id . '/' . $info['message_id']; + + /* Check if delete requested or new attachment loaded, and delete + * any existing one. */ + if (!empty($info['attachment_delete'])) { + $sql = 'SELECT file_id FROM agore_files WHERE message_id = ?'; + foreach ($this->_db->getCol($sql, null, array($info['message_id'])) as $file_id) { + if ($vfs->exists($vfs_dir, $file_id)) { + $delete = $vfs->deleteFile($vfs_dir, $file_id); + if ($delete instanceof PEAR_Error) { + return $delete; + } + } + } + $this->_write_db->query('DELETE FROM agore_files WHERE message_id = ' . (int)$info['message_id']); + $attachments = 0; + } + + /* Save new attachment information. */ + if (!empty($info['message_attachment'])) { + $file_id = $this->_write_db->nextId('agora_files'); + $result = $vfs->write($vfs_dir, $file_id, $info['message_attachment']['file'], true); + if ($result instanceof PEAR_Error) { + return $result; + } + + $file_sql = 'INSERT INTO agora_files (file_id, file_name, file_type, file_size, message_id) VALUES (?, ?, ?, ?, ?)'; + $file_data = array($file_id, + $info['message_attachment']['name'], + $info['message_attachment']['type'], + $info['message_attachment']['size'], + $info['message_id']); + + $statement = $this->_write_db->prepare($file_sql); + if ($statement instanceof PEAR_Error) { + return $statement; + } + + $result = $statement->execute($file_data); + $statement->free(); + if ($result instanceof PEAR_Error) { + Horde::logMessage($result, __FILE__, __LINE__, PEAR_LOG_ERR); + return $result; + } + $attachments = 1; + } + + $sql = 'UPDATE ' . $this->_threads_table . ' SET attachments = ' . $attachments + . ' WHERE message_id = ' . (int)$info['message_id']; + $result = $this->_write_db->query($sql); + if ($result instanceof PEAR_Error) { + Horde::logMessage($result, __FILE__, __LINE__, PEAR_LOG_ERR); + return $result; + } + } + + /* Update cache */ + $this->_updateCacheState($info['message_thread']); + + return $info['message_id']; + } + + /** + * Moves a thread to another forum. + * + * @todo Update the number of messages in the old/new forum + * + * @param integer $thread_id The ID of the thread to move. + * @param integer $forum_id The ID of the destination forum. + */ + public function moveThread($thread_id, $forum_id) + { + $sql = 'SELECT forum_id FROM ' . $this->_threads_table . ' WHERE message_id = ' . (int)$thread_id; + $old_forum = $this->_db->getOne($sql); + if ($old_forum instanceof PEAR_Error) { + return $old_forum; + } + + $sql = 'UPDATE ' . $this->_threads_table . ' SET forum_id = ' . (int)$forum_id + . ' WHERE message_thread = ' . (int)$thread_id .' OR message_id = ' . (int)$thread_id; + $result = $this->_write_db->query($sql); + if ($result instanceof PEAR_Error) { + return $result; + } + + $this->_forumSequence($old_forum, 'thread', '-'); + $this->_forumSequence($forum_id, 'thread', '+'); + + /* Update last message */ + $this->_lastInForum($old_forum); + $this->_lastInForum($forum_id); + + /* Update cache */ + $this->_updateCacheState($thread_id); + + return true; + } + + /** + * Splits a thread on message id. + * + * @param integer $message_id The ID of the message to split at. + */ + public function splitThread($message_id) + { + $sql = 'SELECT message_thread FROM ' . $this->_threads_table . ' WHERE message_id = ' . (int)$message_id; + $thread_id = $this->_db->getOne($sql); + if ($thread_id instanceof PEAR_Error) { + return $thread_id; + } + + $sql = 'UPDATE ' . $this->_threads_table . ' SET message_thread = ?, parents = ? WHERE message_id = ?'; + $statement = $this->_write_db->prepare($sql); + if ($statement instanceof PEAR_Error) { + return $statement; + } + + $result = $statement->execute(array(0, '', (int)$message_id)); + $statement->free(); + if ($result instanceof PEAR_Error) { + return $result; + } + + $sql = 'SELECT message_thread, parents, message_id FROM ' . $this->_threads_table . ' WHERE parents LIKE ?'; + $children = $this->_db->getAll($sql, null, array(":$thread_id:%$message_id%")); + if ($children instanceof PEAR_Error) { + return $children; + } + + if (!empty($children)) { + $pos = strpos($children[0]['parents'], ':' . $message_id); + foreach ($children as $i => $message) { + $children[$i]['message_thread'] = (int)$message_id; + $children[$i]['parents'] = substr($message['parents'], $pos); + } + + $sql = 'UPDATE ' . $this->_threads_table . ' SET message_thread = ?, parents = ? WHERE message_id = ?'; + $statement = $this->_write_db->prepare($sql); + if ($statement instanceof PEAR_Error) { + return $statement; + } + $result = $this->_write_db->executeMultiple($statement, $children); + $statement->free(); + if ($result instanceof PEAR_Error) { + return $result; + } + } + + // Update count on old thread + $count = $this->countThreads($thread_id); + $sql = 'UPDATE ' . $this->_threads_table . ' SET message_seq = ' . $count . ' WHERE message_id = ' . (int)$thread_id; + $result = $this->_write_db->query($sql); + if ($result instanceof PEAR_Error) { + return $result; + } + + // Update count on new thread + $count = $this->countThreads($message_id); + $sql = 'UPDATE ' . $this->_threads_table . ' SET message_seq = ' . $count . ' WHERE message_id = ' . (int)$thread_id; + $result = $this->_write_db->query($sql); + if ($result instanceof PEAR_Error) { + return $result; + } + + /* Update last message */ + $this->_lastInForum($this->_forum_id); + $this->_lastInThread($thread_id); + $this->_lastInThread($message_id); + + $this->_forumSequence($this->_forum_id, 'thread', '+'); + + /* Update cache */ + $this->_updateCacheState($thread_id); + } + + /** + * Merges two threads. + * + * @param integer $thread_id The ID of the thread to merge. + * @param integer $message_id The ID of the message to merge to. + */ + public function mergeThread($thread_from, $message_id) + { + $sql = 'SELECT message_thread, parents FROM ' . $this->_threads_table . ' WHERE message_id = ?'; + $destination = $this->_db->getRow($sql, null, array($message_id)); + if ($destination instanceof PEAR_Error) { + return $destination; + } + + /* Merge to the top level */ + if ($destination['message_thread'] == 0) { + $destination['message_thread'] = $message_id; + } + + $sql = 'SELECT message_thread, parents, message_id FROM ' . $this->_threads_table . ' WHERE message_id = ? OR message_thread = ?'; + $children = $this->_db->getAll($sql, null, array($thread_from, $thread_from)); + if ($children instanceof PEAR_Error) { + return $children; + } + + if (!empty($children)) { + foreach ($children as $i => $message) { + $children[$i]['message_thread'] = $destination['message_thread']; + $children[$i]['parents'] = $destination['parents'] . $message['parents']; + if (empty($children[$i]['parents'])) { + $children[$i]['parents'] = ':' . $message_id; + } + } + + $statement = $this->_write_db->prepare('UPDATE ' . $this->_threads_table . ' SET message_thread = ?, parents = ? WHERE message_id = ?'); + if ($statement instanceof PEAR_Error) { + return $statement; + } + + $result = $this->_write_db->executeMultiple($statement, $children); + if ($result instanceof PEAR_Error) { + return $result; + } + } + + $count = $this->countThreads($destination['message_thread']); + $sql = 'UPDATE ' . $this->_threads_table . ' SET message_seq = ' . $count + . ' WHERE message_id = ' . (int)$destination['message_thread']; + $result = $this->_write_db->query($sql); + if ($result instanceof PEAR_Error) { + return $result; + } + + /* Update last message */ + $this->_lastInForum($this->_forum_id); + $this->_lastInThread($destination['message_thread']); + + $this->_forumSequence($this->_forum_id, 'thread', '-'); + + /* Update cache */ + $this->_updateCacheState($destination['message_thread']); + } + + /** + * Fetches a message. + * + * @param integer $message_id The ID of the message to fetch. + */ + public function getMessage($message_id) + { + $message = $this->_cache->get('agora_msg' . $message_id, $GLOBALS['conf']['cache']['default_lifetime']); + if ($message) { + return unserialize($message); + } + + $sql = 'SELECT message_id, forum_id, message_thread, parents, ' + . 'message_author, message_subject, body, message_seq, ' + . 'message_timestamp, view_count, locked, attachments FROM ' + . $this->_threads_table . ' WHERE message_id = ?'; + $message = $this->_db->getRow($sql, null, array($message_id)); + if ($message instanceof PEAR_Error) { + Horde::logMessage($message, __FILE__, __LINE__, PEAR_LOG_ERR); + return $message; + } + + if (empty($message)) { + return PEAR::raiseError(sprintf(_("Message ID \"%d\" not found"), + $message_id)); + } + + $message['message_subject'] = $this->convertFromDriver($message['message_subject']); + $message['body'] = $this->convertFromDriver($message['body']); + if ($message['message_thread'] == 0) { + $message['message_thread'] = $message_id; + } + + /* Is author a moderator? */ + if (isset($this->_forum['moderators']) && + in_array($message['message_author'], $this->_forum['moderators'])) { + $message['message_author_moderator'] = 1; + } + + $this->_cache->set('agora_msg' . $message_id, serialize($message)); + + return $message; + } + + /** + * Returns a hash with all information necessary to reply to a message. + * + * @param mixed $message The ID of the parent message to reply to, or arry of its data. + * + * @return array A hash with all relevant information. + */ + public function replyMessage($message) + { + if (!is_array($message)) { + $message = $this->getMessage($message); + if ($message instanceof PEAR_Error) { + return $message; + } + } + + /* Set up the form subject with the parent subject. */ + if (Horde_String::lower(Horde_String::substr($message['message_subject'], 0, 3)) != 're:') { + $message['message_subject'] = 'Re: ' . $message['message_subject']; + } else { + $message['message_subject'] = $message['message_subject']; + } + + /* Prepare the message quite body . */ + $message['body'] = sprintf(_("Posted by %s on %s"), + htmlspecialchars($message['message_author']), + strftime($GLOBALS['prefs']->getValue('date_format'), $message['message_timestamp'])) + . "\n-------------------------------------------------------\n" + . $message['body']; + $message['body'] = "\n> " . Horde_String::wrap($message['body'], 60, "\n> ", Horde_Nls::getCharset()); + + return $message; + } + + /** + * Deletes a message and all replies. + * + * @param integer $message_id The ID of the message to delete. + * + * @return mixed Thread ID on success or PEAR_Error on failure. + */ + public function deleteMessage($message_id) + { + /* Check delete permissions. */ + if (!$this->hasPermission(Horde_Perms::DELETE)) { + return PEAR::raiseError(sprintf(_("You don't have permission to delete messages in forum %s."), $this->_forum_id)); + } + + $sql = 'SELECT message_thread FROM ' . $this->_threads_table . ' WHERE message_id = ?'; + $thread_id = $this->_db->getOne($sql, null, array($message_id)); + + if ($thread_id instanceof PEAR_Error) { + Horde::logMessage($thread_id, __FILE__, __LINE__, PEAR_LOG_ERR); + return $thread_id; + } + + $sql = 'DELETE FROM ' . $this->_threads_table . ' WHERE message_id = ' . (int)$message_id; + if ($thread_id == 0) { + $sql .= ' OR message_thread = ' . (int)$message_id; + } + + $result = $this->_write_db->query($sql); + if ($result instanceof PEAR_Error) { + Horde::logMessage($result, __FILE__, __LINE__, PEAR_LOG_ERR); + return $result; + } + + /* Update counts */ + $this->_forumSequence($this->_forum_id, 'message', '-'); + if ($thread_id) { + $this->_sequence($thread_id, '-'); + } else { + $this->_forumSequence($this->_forum_id, 'thread', '-'); + } + + $this->_lastInForum($this->_forum_id); + $this->_lastInThread($thread_id); + + /* Update cache */ + $this->_updateCacheState($thread_id); + + return $thread_id; + } + + /** + * Update lastMessage in a Forum + * + * @param integer $forum_id Forum to update + * @param integer $message_id Last message id + * @param string $message_author Last message author + * @param integer $message_timestamp Last message timestamp + */ + private function _lastInForum($forum_id, $message_id = 0, $message_author = '', $message_timestamp = 0) + { + // Get the last message in form or thread - when managing threads + if ($message_id == 0) { + $sql = 'SELECT message_id, message_author, message_timestamp FROM ' . $this->_threads_table + . ' WHERE forum_id = ' . (int)$forum_id . ' ORDER BY message_id DESC'; + $this->_db->setLimit(1, 0); + $last = $this->_db->getRow($sql); + if (empty($last)) { + array(0, '', 0); + } else { + extract($last); + } + } + + $sql = 'UPDATE ' . $this->_forums_table + . ' SET last_message_id = ?, last_message_author = ?, last_message_timestamp = ? WHERE forum_id = ?'; + + $statement = $this->_write_db->prepare($sql); + if ($statement instanceof PEAR_Error) { + return $statement; + } + + $statement->execute(array($message_id, $message_author, $message_timestamp, $forum_id)); + + $this->_cache->expire('agora_forum_' . $forum_id, $GLOBALS['conf']['cache']['default_lifetime']); + } + + /** + * Update lastMessage in Thread + * + * @param integer $thread_id Thread to update + * @param integer $message_id Last message id + * @param string $message_author Last message author + * @param integer $message_timestamp Last message timestamp + */ + private function _lastInThread($thread_id, $message_id = 0, $message_author = '', $message_timestamp = 0) + { + // Get the last message in form or thread - when managing threads + if ($message_id == 0) { + $sql = 'SELECT message_id, message_author, message_timestamp FROM ' . $this->_threads_table + . ' WHERE message_thread = ' . (int)$thread_id . ' ORDER BY message_id DESC'; + $this->_db->setLimit(1, 0); + $last = $this->_db->getRow($sql); + if (empty($last)) { + $last = array(0, '', 0); + } else { + extract($last); + } + } + + $sql = 'UPDATE ' . $this->_threads_table + . ' SET last_message_id = ?, last_message_author = ?, message_modifystamp = ? WHERE message_id = ?'; + + $statement = $this->_write_db->prepare($sql); + if ($statement instanceof PEAR_Error) { + return $statement; + } + + $statement->execute(array($message_id, $message_author, $message_timestamp, $thread_id)); + } + + /** + * Increments or decrements a forum's message count. + * + * @param integer $forum_id Forum to update + * @param string $type What to increment message, thread or view. + * @param integer|string $diff Incremental or decremental step, either a + * positive or negative integer, or a plus or + * minus sign. + */ + public function _forumSequence($forum_id, $type = 'message', $diff = '+') + { + $t = $type . '_count'; + $sql = 'UPDATE ' . $this->_forums_table . ' SET ' . $t . ' = '; + + switch ($diff) { + case '+': + case '-': + $sql .= $t . ' ' . $diff . ' 1'; + break; + + default: + $sql .= (int)$diff; + break; + } + + $sql .= ' WHERE forum_id = ' . (int)$forum_id; + + return $this->_write_db->query($sql); + } + + /** + * Increments or decrements a thread's message count. + * + * @param integer $thread_id Thread to update. + * @param integer|string $diff Incremental or decremental step, either a + * positive or negative integer, or a plus or + * minus sign. + */ + private function _sequence($thread_id, $diff = '+') + { + $sql = 'UPDATE ' . $this->_threads_table . ' SET message_seq = '; + + switch ($diff) { + case '+': + case '-': + $sql .= 'message_seq ' . $diff . ' 1'; + break; + + default: + $sql .= (int)$diff; + break; + } + + $sql .= ', message_modifystamp = ' . $_SERVER['REQUEST_TIME'] . ' WHERE message_id = ' . (int)$thread_id; + Horde::logMessage('Query by Agora_Messages::_sequence(): ' . $sql, __FILE__, __LINE__, PEAR_LOG_DEBUG); + return $this->_write_db->query($sql); + } + + /** + * Deletes an entire message thread. + * + * @param integer $thread_id The ID of the thread to delete. If not + * specified will delete all the threads for the + * current forum. + */ + public function deleteThread($thread_id = 0) + { + /* Check delete permissions. */ + if (!$this->hasPermission(Horde_Perms::DELETE)) { + return PEAR::raiseError(sprintf(_("You don't have permission to delete messages in forum %s."), $this->_forum_id)); + } + + if ($thread_id > 0) { + $sql = 'DELETE FROM ' . $this->_threads_table . ' WHERE message_thread = ' . (int)$thread_id; + $result = $this->_write_db->query($sql); + if ($result instanceof PEAR_Error) { + Horde::logMessage($result, __FILE__, __LINE__, PEAR_LOG_ERR); + return $result; + } + + $sql = 'SELECT COUNT(*) FROM ' . $this->_threads_table . ' WHERE forum_id = ' . (int)$this->_forum_id; + $messages = $this->_db->getOne($sql); + + $this->_forumSequence($this->_forum_id, 'thread', '-'); + $this->_forumSequence($this->_forum_id, 'message', $messages); + + /* Update cache */ + $this->_updateCacheState($thread_id); + + } else { + $sql = 'DELETE FROM ' . $this->_threads_table . ' WHERE forum_id = ' . (int)$this->_forum_id; + $result = $this->_write_db->query($sql); + if ($result instanceof PEAR_Error) { + Horde::logMessage($result, __FILE__, __LINE__, PEAR_LOG_ERR); + return $result; + } + + $this->_forumSequence($this->_forum_id, 'thread', 0); + $this->_forumSequence($this->_forum_id, 'message', 0); + } + + /* Update last message */ + $this->_lastInForum($this->_forum_id); + + return true; + } + + /** + * Returns a list of threads. + * + * @param integer $thread_root Message at which to start the thread. + * If null get all forum threads + * @param boolean $all_levels Show all child levels or just one level. + * @param string $sort_by The column by which to sort. + * @param integer $sort_dir The direction by which to sort: + * 0 - ascending + * 1 - descending + * @param boolean $message_view + * @param string $link_back A url to pass to the reply script which + * will be returned to after an insertion of + * a post. Useful in cases when this thread + * view is used in blocks to return to the + * original page rather than to Agora. + * @param string $base_url An alternative URL where edit/delete links + * point to. Mainly for api usage. Takes "%p" + * as a placeholder for the parent message ID. + * @param string $from The thread to start listing at. + * @param string $count The number of threads to return. + * @param boolean $nofollow Whether to set the 'rel="nofollow"' + * attribute on linked URLs in the messages. + */ + public function getThreads($thread_root = 0, + $all_levels = false, + $sort_by = 'message_timestamp', + $sort_dir = 0, + $message_view = false, + $link_back = '', + $base_url = null, + $from = null, + $count = null, + $nofollow = false) + { + /* Check read permissions */ + if (!$this->hasPermission(Horde_Perms::SHOW)) { + return PEAR::raiseError(sprintf(_("You don't have permission to read messages in forum %s."), $this->_forum_id)); + } + + /* Get messages data */ + $messages = $this->_getThreads($thread_root, $all_levels, $sort_by, $sort_dir, $message_view, $from, $count); + if ($messages instanceof PEAR_Error || empty($messages)) { + return $messages; + } + + /* Moderators */ + if (isset($this->_forum['moderators'])) { + $moderators = array_flip($this->_forum['moderators']); + } + + /* Set up the base urls for actions. */ + $view_url = Horde::applicationUrl('messages/index.php'); + if ($base_url) { + $edit_url = $base_url; + $del_url = Horde_Util::addParameter($base_url, 'delete', 'true'); + } else { + $edit_url = Horde::applicationUrl('messages/edit.php'); + $del_url = Horde::applicationUrl('messages/delete.php'); + } + + // Get needed prefs + $per_page = $GLOBALS['prefs']->getValue('thread_per_page'); + $view_bodies = $GLOBALS['prefs']->getValue('thread_view_bodies'); + $abuse_url = Horde::applicationUrl('messages/abuse.php'); + $hot_img = Horde::img('hot.png', _("Hot thread"), array('title' => _("Hot thread"))); + $new_img = Horde::img('required.png', _("New posts"), array('title' => _("New posts")), $GLOBALS['registry']->getImageDir('horde')); + $is_moderator = $this->hasPermission(Horde_Perms::DELETE); + + /* Loop through the threads and set up the array. */ + foreach ($messages as $id => &$message) { + + /* Add attachment link */ + if ($message['attachments']) { + $message['message_attachment'] = $this->getAttachmentLink($id); + } + + /* Get last message link */ + if ($thread_root == 0 && $message['last_message_id'] > 0) { + $url = Agora::setAgoraId($message['forum_id'], $message['last_message_id'], $view_url, $this->_scope); + $message['message_url'] = Horde::link($url); + $last_timestamp = $message['last_message_timestamp']; + } else { + $last_timestamp = $message['message_timestamp']; + } + + /* Check if thread is hot */ + if ($this->isHot($message['view_count'], $last_timestamp)) { + $message['hot'] = $hot_img; + } + + /* Check if has new posts since user last visit */ + if ($thread_root == 0 && $this->isNew($id, $last_timestamp)) { + $message['new'] = $new_img; + } + + /* Mark moderators */ + if (isset($this->_forum['moderators']) && array_key_exists($message['message_author'], $moderators)) { + $message['message_author_moderator'] = 1; + } + + /* Link to view the message. */ + $url = Agora::setAgoraId($message['forum_id'], $id, $view_url, $this->_scope); + $message['link'] = Horde::link($url, $message['message_subject'], '', '', '', $message['message_subject']); + + /* Set up indenting for threads. */ + if ($sort_by != 'message_thread') { + unset($message['indent'], $message['parent']); + + /* Links to pages */ + if ($thread_root == 0 && $message['message_seq'] > $per_page && $view_bodies == 2) { + $sub_pages = $message['message_seq'] / $per_page; + for ($i = 0; $i < $sub_pages; $i++) { + $page_title = sprintf(_("Page %d"), $i+1); + $message['pages'][] = Horde::link(Horde_Util::addParameter($url, 'thread_page', $i), $page_title, '', '', '', $page_title) . ($i+1) . ''; + } + } + } + + /* Button to post a reply to the message. */ + if (!$message['locked']) { + if ($base_url) { + $url = $base_url; + if (strpos($url, '%p') !== false) { + $url = str_replace('%p', $message['message_id'], $url); + } else { + $url = Horde_Util::addParameter($url, 'message_parent_id', $message['message_id']); + } + if (!empty($link_back)) { + $url = Horde_Util::addParameter($url, 'url', $link_back); + } + } else { + $url = Agora::setAgoraId($message['forum_id'], $id, $view_url, $this->_scope); + } + $url = Horde_Util::addParameter($url, 'reply_focus', 1) . '#messageform'; + $message['reply'] = Horde::link($url, _("Reply to message"), '', '', '', _("Reply to message")) . _("Reply") . ''; + } + + /* Link to edit the message. */ + if ($thread_root > 0 && isset($this->_forum['moderators'])) { + $url = Agora::setAgoraId($message['forum_id'], $id, $abuse_url); + $message['actions'][] = Horde::link($url, _("Report as abuse")) . _("Report as abuse") . ''; + } + + if ($is_moderator) { + /* Link to edit the message. */ + $url = Agora::setAgoraId($message['forum_id'], $id, $edit_url, $this->_scope); + $message['actions'][] = Horde::link($url, _("Edit"), '', '', '', _("Edit message")) . _("Edit") . ''; + + /* Link to delete the message. */ + $url = Agora::setAgoraId($message['forum_id'], $id, $del_url, $this->_scope); + $message['actions'][] = Horde::link($url, _("Delete"), '', '', '', _("Delete message")) . _("Delete") . ''; + + /* Link to lock/unlock the message. */ + $url = Agora::setAgoraId($this->_forum_id, $id, Horde::applicationUrl('messages/lock.php'), $this->_scope); + $label = ($message['locked']) ? _("Unlock") : _("Lock"); + $message['actions'][] = Horde::link($url, $label, '', '', '', $label) . $label . ''; + + /* Link to move thread to another forum. */ + if ($this->_scope == 'agora') { + if ($message['message_thread'] == $id) { + $url = Agora::setAgoraId($this->_forum_id, $id, Horde::applicationUrl('messages/move.php'), $this->_scope); + $message['actions'][] = Horde::link($url, _("Move"), '', '', '', _("Move")) . _("Move") . ''; + + /* Link to merge a message thred with anoter thread. */ + $url = Agora::setAgoraId($this->_forum_id, $id, Horde::applicationUrl('messages/merge.php'), $this->_scope); + $message['actions'][] = Horde::link($url, _("Merge"), '', '', '', _("Merge")) . _("Merge") . ''; + } elseif ($message['message_thread'] != 0) { + + /* Link to split thread to two threads, from this message after. */ + $url = Agora::setAgoraId($this->_forum_id, $id, Horde::applicationUrl('messages/split.php'), $this->_scope); + $message['actions'][] = Horde::link($url, _("Split"), '', '', '', _("Split")) . _("Split") . ''; + } + } + } + } + + return $messages; + } + + /** + * Formats a message body. + * + * @param string $messages Messages to format + * @param string $sort_by List format order + * @param boolean $format Format messages body + * @param integer $thread_root Thread root + */ + protected function _formatThreads($messages, $sort_by = 'message_modifystamp', + $format = false, $thread_root = 0) + { + /* Loop through the threads and set up the array. */ + foreach ($messages as $id => &$message) { + $message['message_id'] = $id; + $message['message_author'] = htmlspecialchars($message['message_author']); + $message['message_subject'] = htmlspecialchars($this->convertFromDriver($message['message_subject']), ENT_COMPAT, Horde_Nls::getCharset()); + $message['message_date'] = $this->dateFormat($message['message_timestamp']); + if ($format) { + $message['body'] = $this->formatBody($this->convertFromDriver($message['body'])); + } + + // If we are on the top, thread id is message itself + if ($message['message_thread'] == 0) { + $message['message_thread'] = $id; + } + + /* Get last message */ + if ($thread_root == 0 && $message['last_message_id'] > 0) { + $message['last_message_date'] = $this->dateFormat($message['last_message_timestamp']); + } + + /* Set up indenting for threads. */ + if ($sort_by == 'message_thread') { + $indent = explode(':', $message['parents']); + $message['indent'] = count($indent) - 1; + $last = array_pop($indent); + if (!isset($messages[$last])) { + $message['indent'] = 1; + $last = null; + } + $message['parent'] = $last ? $last : null; + } + } + + return $messages; + } + + /** + * Formats a message body. + * + * @param string $body Text to format. + */ + public function formatBody($body) + { + static $filters, $filters_params; + + if ($filters == null) { + $filters = array('text2html', 'bbcode', 'highlightquotes', 'emoticons'); + $filters_params = array(array('parselevel' => Horde_Text_Filter_Text2html::MICRO), + array(), + array('citeblock' => true), + array('entities' => true)); + + // check bad words replacement + $config_dir = $GLOBALS['registry']->get('fileroot', 'agora') . '/config/'; + $config_file = 'words.php'; + if (file_exists($config_dir . $config_file)) { + if (!empty($GLOBALS['conf']['vhosts'])) { + $v_file = substr($config_file, 0, -4) . '-' . $GLOBALS['conf']['server']['name'] . '.php'; + if (file_exists($config_dir . $config_file)) { + $config_file = $v_file; + } + } + + $filters[] = 'words'; + $filters_params[] = array('words_file' => $config_dir . $config_file, + 'replacement' => false); + } + } + + if (($hasBBcode = strpos($body, '[')) !== false && + strpos($body, '[/', $hasBBcode) !== false) { + $filters_params[0]['parselevel'] = Horde_Text_Filter_Text2html::NOHTML; + } + + return Horde_Text_Filter::filter($body, $filters, $filters_params); + } + + /** + * Returns true if the message is hot. + */ + public function isHot($views, $last_post) + { + if (!$GLOBALS['conf']['threads']['track_views']) { + return false; + } + + return ($views > $GLOBALS['prefs']->getValue('threads_hot')) && $last_post > ($_SERVER['REQUEST_TIME'] - 86400); + } + + /** + * Returns true, has new posts since user last visit + */ + public function isNew($thread_id, $last_post) + { + if (!isset($_COOKIE['agora_viewed_threads']) || + ($pos1 = strpos($_COOKIE['agora_viewed_threads'], ':' . $thread_id . '|')) === false || + ($pos2 = strpos($_COOKIE['agora_viewed_threads'], '|', $pos1)) === false || + substr($_COOKIE['agora_viewed_threads'], $pos2+1, 10) > $last_post + ) { + return false; + } + + return true; + } + + /** + * Fetches a list of messages awaiting moderation. Selects all messages, + * irrespective of the thread root, which have the 'moderate' flag set in + * the attributes. + * + * @param string $sort_by The column by which to sort. + * @param integer $sort_dir The direction by which to sort: + * 0 - ascending + * 1 - descending + */ + public function getModerateList($sort_by, $sort_dir) + { + $sql = 'SELECT forum_id, forum_name FROM ' . $this->_forums_table . ' WHERE forum_moderated = ?'; + $params = array(1); + + /* Check permissions */ + if (Horde_Auth::isAdmin('agora:admin') || + ($GLOBALS['perms']->exists('agora:forums:' . $this->_scope) && + $GLOBALS['perms']->hasPermission('agora:forums:' . $this->_scope, Horde_Auth::getAuth(), Horde_Perms::DELETE))) { + $sql .= ' AND scope = ? '; + $params[] = $this->_scope; + } else { + // Get only author forums + $sql .= ' AND scope = ? AND author = ?'; + $params[] = $this->_scope; + $params[] = Horde_Auth::getAuth(); + } + + /* Get moderate forums and their names */ + $forums_list = $this->_db->getAssoc($sql, null, $params, null, MDB2_FETCHMODE_ASSOC, false); + if ($forums_list instanceof PEAR_Error || empty($forums_list)) { + return $forums_list; + } + + /* Get message waiting for approval */ + $sql = 'SELECT message_id, forum_id, message_subject, message_author, ' + . 'body, message_timestamp, attachments FROM ' . $this->_threads_table . ' WHERE forum_id IN (' + . implode(',', array_keys($forums_list)) . ')' + . ' AND approved = ? ORDER BY ' . $sort_by . ' ' + . ($sort_dir ? 'DESC' : 'ASC'); + + $messages = $this->_db->getAssoc($sql, null, array(0)); + if ($messages instanceof PEAR_Error) { + return $messages; + } + + /* Loop through the messages and set up the array. */ + $approve_url = Horde_Util::addParameter(Horde::applicationUrl('moderate.php'), 'approve', true); + $del_url = Horde::applicationUrl('messages/delete.php'); + foreach ($messages as $id => &$message) { + $message['forum_name'] = $this->convertFromDriver($forums_list[$message['forum_id']]); + $message['message_id'] = $id; + $message['message_author'] = htmlspecialchars($message['message_author']); + $message['message_subject'] = htmlspecialchars($this->convertFromDriver($message['message_subject']), ENT_COMPAT, Horde_Nls::getCharset()); + $message['message_body'] = Horde_Text_Filter::filter($this->convertFromDriver($message['body']), 'highlightquotes'); + if ($message['attachments']) { + $message['message_attachment'] = $this->getAttachmentLink($id); + } + $message['message_date'] = $this->dateFormat($message['message_timestamp']); + } + + return $messages; + } + + /** + * Get banned users from the current forum + */ + public function getBanned() + { + $perm_name = 'agora:forums:' . $this->_scope . ':' . $this->_forum_id; + if (!$GLOBALS['perms']->exists($perm_name)) { + return array(); + } + + $forum_perm = $GLOBALS['perms']->getPermission($perm_name); + if (!($forum_perm instanceof Horde_Perms_Permission)) { + return $forum_perm; + } + + $permissions = $forum_perm->getUserPermissions(); + if (empty($permissions)) { + return $permissions; + } + + // Filter users moderators + $filter = Horde_Perms::EDIT | Horde_Perms::DELETE; + foreach ($permissions as $user => $level) { + if ($level & $filter) { + unset($permissions[$user]); + } + } + + return $permissions; + } + + /** + * Ban user on a specific forum. + * + * @param string $user Moderator username. + * @param integer $forum_id Forum to add moderator to. + * @param string $action Action to peform ('add' or 'delete'). + */ + public function updateBan($user, $forum_id = null, $action = 'add') + { + global $perms; + + if ($forum_id == null) { + $forum_id = $this->_forum_id; + } + + $perm_name = 'agora:forums:' . $this->_scope . ':' . $forum_id; + if (!$perms->exists($perm_name)) { + $forum_perm = &$perms->newPermission($perm_name); + $perms->addPermission($forum_perm); + } else { + $forum_perm = $perms->getPermission($perm_name); + if ($forum_perm instanceof PEAR_Error) { + return $forum_perm; + } + } + + if ($action == 'add') { + // Allow to only read posts + $forum_perm->removeUserPermission($user, Horde_Perms::ALL, true); + $forum_perm->addUserPermission($user, Horde_Perms::READ, true); + } else { + // Remove all acces to user + $forum_perm->removeUserPermission($user, Horde_Perms::ALL, true); + } + + return true; + } + + /** + * Updates forum moderators. + * + * @param string $moderator Moderator username. + * @param integer $forum_id Forum to add moderator to. + * @param string $action Action to peform ('add' or 'delete'). + */ + public function updateModerator($moderator, $forum_id = null, $action = 'add') + { + global $perms; + + if ($forum_id == null) { + $forum_id = $this->_forum_id; + } + + switch ($action) { + case 'add': + $sql = 'INSERT INTO agora_moderators (forum_id, horde_uid) VALUES (?, ?)'; + break; + + case 'delete': + $sql = 'DELETE FROM agora_moderators WHERE forum_id = ? AND horde_uid = ?'; + break; + } + + $statement = $this->_write_db->prepare($sql); + if ($statement instanceof PEAR_Error) { + return $statement; + } + + $result = $statement->execute(array($forum_id, $moderator)); + $statement->free(); + if ($result instanceof PEAR_Error) { + return $result; + } + + /* Update permissions*/ + $perm_name = 'agora:forums:' . $this->_scope . ':' . $forum_id; + if (!$perms->exists($perm_name)) { + $forum_perm = &$perms->newPermission($perm_name); + $perms->addPermission($forum_perm); + } else { + $forum_perm = $perms->getPermission($perm_name); + if ($forum_perm instanceof PEAR_Error) { + return $forum_perm; + } + } + + switch ($action) { + case 'add': + $forum_perm->addUserPermission($moderator, Horde_Perms::DELETE, true); + break; + + case 'delete': + $forum_perm->removeUserPermission($moderator, Horde_Perms::DELETE, true); + break; + } + + $this->_cache->expire('agora_forum_' . $forum_id, $GLOBALS['conf']['cache']['default_lifetime']); + } + + /** + * Approves one or more ids. + * + * @param string $action Whether to 'approve' or 'delete' messages. + * @param array $ids Array of message IDs. + * + * @return mixed Returns true if successful or otherwise a PEAR_Error. + */ + public function moderate($action, $ids) + { + switch ($action) { + case 'approve': + + // Get message thread to expire cache + $sql = 'SELECT message_thread FROM ' . $this->_threads_table + . ' WHERE message_id IN (' . implode(',', $ids) . ')'; + $threads = $this->_db->getCol($sql); + $this->_updateCacheState($threads); + + $sql = 'UPDATE ' . $this->_threads_table . ' SET approved = 1' + . ' WHERE message_id IN (' . implode(',', $ids) . ')'; + $this->_write_db->query($sql); + + // Save original forum_id for later resetting + $orig_forum_id = $this->_forum_id; + foreach ($ids as $message_id) { + // Update cached message and thread counts + $message = $this->getMessage($message_id); + $this->_forum_id = $message['forum_id']; + + // Update cached last poster + $this->_lastInForum($this->_forum_id); + $this->_forumSequence($this->_forum_id, 'message', '+'); + if (!empty($message['parents'])) { + $this->_sequence($message['message_thread'], '+'); + $this->_lastInThread($message['message_thread'], $message_id, $message['message_author'], $_SERVER['REQUEST_TIME']); + } else { + $this->_forumSequence($this->_forum_id, 'thread', '+'); + } + + // Send the new post to the distribution address + Agora::distribute($message_id); + } + + // Restore original forum_id + $this->_forum_id = $orig_forum_id; + break; + + case 'delete': + foreach ($ids as $id) { + $this->deleteMessage($id); + } + break; + } + } + + /** + * Returns the number of replies on a thread, or threads in a forum + * + * @param integer $thread_root Thread to count. + * + * @return integer The number of messages in thread or PEAR_Error on + * failure. + */ + public function countThreads($thread_root = 0) + { + $sql = 'SELECT COUNT(*) FROM ' . $this->_threads_table . ' WHERE message_thread = ?'; + if ($thread_root) { + $params = array($thread_root); + return $this->_db->getOne($sql, 'integer', array($thread_root)); + } else { + return $this->_db->getOne($sql . ' AND forum_id = ?', 'integer', array(0, $this->_forum_id)); + } + } + + /** + * Returns the number of all messages (threads and replies) in a forum + * + * @return integer The number of messages in forum or PEAR_Error on + * failure. + */ + public function countMessages() + { + $sql = 'SELECT COUNT(*) FROM ' . $this->_threads_table . ' WHERE forum_id = ?'; + return $this->_db->getOne($sql, null, array($this->_forum_id)); + } + + /** + * Returns a table showing the specified message list. + * + * @param array $threads A hash with the thread messages as + * returned by {@link + * Agora_Messages::getThreads}. + * @param array $col_headers A hash with the column headers. + * @param boolean $bodies Display the message bodies? + * @param string $template_file Template to use. + * + * @return string The rendered message table. + */ + public function getThreadsUI($threads, $col_headers, $bodies = false, + $template_file = false) + { + if (!count($threads)) { + return ''; + } + + /* Render threaded lists with Horde_Tree. */ + $current = key($threads); + if (!$template_file && isset($threads[$current]['indent'])) { + $tree = Horde_Tree::factory('threads', 'html'); + $tree->setOption(array('multiline' => $bodies, + 'lines' => !$bodies)); + $tree->setHeader(array( + array('html' => '' . $col_headers['message_thread'] . '', + 'width' => '50%', + 'class' => $col_headers['message_thread_class_plain']), + array('html' => '' . $col_headers['message_author'] . '', + 'width' => '25%', + 'class' => $col_headers['message_author_class_plain']), + array('html' => '' . $col_headers['message_timestamp'] . '', + 'width' => '24%', + 'class' => $col_headers['message_timestamp_class_plain']))); + + foreach ($threads as &$thread) { + if ($bodies) { + $text = '' . $thread['message_subject'] . '['; + if (isset($thread['reply'])) { + $text .= ' ' . $thread['reply']; + } + if (!empty($thread['actions'])) { + $text .= ', ' . implode(', ', $thread['actions']); + } + $text .= ']
' . + str_replace(array("\r", "\n"), '', $thread['body'] . ((isset($thread['message_attachment'])) ? $thread['message_attachment'] : '')); + } else { + $text = '' . $thread['link'] . $thread['message_subject'] . ' '; + if (isset($thread['actions'])) { + $text .= '[' . implode(', ', $thread['actions']) . ']'; + } + } + + $tree->addNode($thread['message_id'], + $thread['parent'], + $text, + $thread['indent'], + true, + array('icon' => '', + 'class' => 'linedRow'), + array($thread['message_author'], + $thread['message_date'])); + } + + return $tree->getTree(true); + } + + /* Set up the thread template tags. */ + $view = new Agora_View(); + $view->threads_list = $threads; + $view->col_headers = $col_headers; + $view->thread_view_bodies = $bodies; + + /* Render template. */ + if (!$template_file) { + $template_file = 'messages/threads.html.php'; + } + + return $view->render($template_file); + } + + /** + */ + public function getThreadRoot($message_id) + { + $sql = 'SELECT message_thread FROM ' . $this->_threads_table . ' WHERE message_id = ?'; + $thread_id = $this->_db->getOne($sql, null, array($message_id)); + return $thread_id ? $thread_id : $message_id; + } + + /** + */ + public function setThreadLock($message_id, $lock) + { + $sql = 'UPDATE ' . $this->_threads_table . ' SET locked = ' . (int)$lock + . ' WHERE message_id = ' . (int)$message_id . ' OR message_thread = ' . (int)$message_id; + return $this->_write_db->query($sql); + } + + /** + * @return boolean + */ + public function isThreadLocked($message_id) + { + $sql = 'SELECT message_thread FROM ' . $this->_threads_table . ' WHERE message_id = ?'; + $thread = $this->_db->getOne($sql, null, array($message_id)); + + return $this->_db->getOne('SELECT locked FROM ' . $this->_threads_table . ' WHERE message_id = ?', + null, array($thread)); + } + + /** + */ + public function getThreadActions() + { + /* Actions. */ + $actions = array(); + + $url = Agora::setAgoraId($this->_forum_id, null, Horde::applicationUrl('messages/edit.php')); + if ($this->hasPermission(Horde_Perms::EDIT)) { + $actions[] = array('url' => $url, 'label' => _("Post message")); + } + + if ($this->hasPermission(Horde_Perms::DELETE)) { + if ($this->_scope == 'agora') { + $url = Agora::setAgoraId($this->_forum_id, null, Horde::applicationUrl('editforum.php')); + $actions[] = array('url' => $url, 'label' => _("Edit Forum")); + } + $url = Agora::setAgoraId($this->_forum_id, null, Horde::applicationUrl('deleteforum.php'), $this->_scope); + $actions[] = array('url' => $url, 'label' => _("Delete Forum")); + $url = Agora::setAgoraId($this->_forum_id, null, Horde::applicationUrl('ban.php'), $this->_scope); + $actions[] = array('url' => $url, 'label' => _("Ban")); + } + + return $actions; + } + + /** + */ + public function getForm($vars, $title, $editing = false, $new_forum = false) + { + global $conf; + + require_once AGORA_BASE . '/lib/Forms/Message.php'; + $form = new MessageForm($vars, $title); + $form->setButtons($editing ? _("Save") : _("Post")); + $form->addHidden('', 'url', 'text', false); + + /* Figure out what to do with forum IDs. */ + if ($new_forum) { + /* This is a new forum to be created, create the var to hold the + * full path for the new forum. */ + $form->addHidden('', 'new_forum', 'text', false); + } else { + /* This is an existing forum so create the forum ID variable. */ + $form->addHidden('', 'forum_id', 'int', false); + } + + $form->addHidden('', 'scope', 'text', false); + $form->addHidden('', 'message_id', 'int', false); + $form->addHidden('', 'message_parent_id', 'int', false); + + if (!Horde_Auth::getAuth()) { + $form->addVariable(_("From"), 'posted_by', 'text', true); + } + + /* We are replaying, so display the quote button */ + if ($vars->get('message_parent_id')) { + $desc = ''; + $form->addVariable(_("Subject"), 'message_subject', 'text', true, false, $desc); + $form->addHidden('', 'message_body_old', 'longtext', false); + } else { + $form->addVariable(_("Subject"), 'message_subject', 'text', true); + } + + $form->addVariable(_("Message"), 'message_body', 'longtext', true); + + /* Check if an attachment is available and set variables for deleting + * and previewing. */ + if ($vars->get('attachment_preview')) { + $form->addVariable(_("Delete the existing attachment?"), 'attachment_delete', 'boolean', false); + $form->addVariable(_("Current attachment"), 'attachment_preview', 'html', false); + } + + if ($this->allowAttachments()) { + $form->addVariable(_("Attachment"), 'message_attachment', 'file', false); + } + + if (!empty($conf['forums']['captcha']) && !Horde_Auth::getAuth()) { + $form->addVariable(_("Spam protection"), 'captcha', 'figlet', true, null, null, array(Agora::getCAPTCHA(!$form->isSubmitted()), $conf['forums']['figlet_font'])); + } + + return $form; + } + + /** + * Formats time according to user preferences. + * + * @param int $timestamp Message timestamp. + * + * @return string Formatted date. + */ + public function dateFormat($timestamp) + { + return strftime($GLOBALS['prefs']->getValue('date_format'), $timestamp) + . ' ' + . (date($GLOBALS['prefs']->getValue('twentyFour') ? 'G:i' : 'g:ia', $timestamp)); + } + + /** + * Logs a message view. + * + * @return boolean True, if the view was logged, false if the message was aleredy seen + */ + public function logView($thread_id) + { + if (!$GLOBALS['conf']['threads']['track_views']) { + return false; + } + + if ($GLOBALS['browser']->isRobot()) { + return false; + } + + /* We already read this thread? */ + if (isset($_COOKIE['agora_viewed_threads']) && + strpos($_COOKIE['agora_viewed_threads'], ':' . $thread_id . '|') !== false) { + return false; + } + + /* Rembember when we see a thread */ + if (!isset($_COOKIE['agora_viewed_threads'])) { + $_COOKIE['agora_viewed_threads'] = ':'; + } + $_COOKIE['agora_viewed_threads'] .= $thread_id . '|' . $_SERVER['REQUEST_TIME'] . ':'; + + setcookie('agora_viewed_threads', $_COOKIE['agora_viewed_threads'], $_SERVER['REQUEST_TIME']+22896000, + $GLOBALS['conf']['cookie']['path'], $GLOBALS['conf']['cookie']['domain'], + $GLOBALS['conf']['use_ssl'] == 1 ? 1 : 0); + + /* Update the count */ + $sql = 'UPDATE ' . $this->_threads_table . ' SET view_count = view_count + 1 WHERE message_id = ' . (int)$thread_id; + $result = $this->_write_db->query($sql); + if ($result instanceof PEAR_Error) { + return $result; + } + + return true; + } + + /** + * Constructs message attachments link. + */ + public function getAttachmentLink($message_id) + { + if (!$this->allowAttachments()) { + return ''; + } + + $sql = 'SELECT file_id, file_name, file_size, file_type FROM agora_files WHERE message_id = ?'; + $files = $this->_db->getAssoc($sql, null, array($message_id)); + if ($files instanceof PEAR_Error || empty($files)) { + Horde::logMessage($files, __FILE__, __LINE__, PEAR_LOG_ERR); + return $files; + } + + global $mime_drivers, $mime_drivers_map; + $result = Horde::loadConfiguration('mime_drivers.php', array('mime_drivers', 'mime_drivers_map'), 'horde'); + extract($result); + require_once 'Horde/MIME/Part.php'; + require_once 'Horde/MIME/Viewer.php'; + require_once 'Horde/MIME/Magic.php'; + require_once 'Horde/MIME/Contents.php'; + + /* Make sure we have the tooltips javascript. */ + Horde::addScriptFile('tooltips.js', 'horde', true); + + /* Constuct the link with a tooltip for further info on the download. */ + $html = '
'; + $view_url = Horde::applicationUrl('view.php'); + foreach ($files as $file_id => $file) { + $mime_icon = MIME_Viewer::getIcon($file['file_type']); + $title = _("download") . ': ' . $file['file_name']; + $tooltip = $title . "\n" . sprintf(_("size: %s"), $this->formatSize($file['file_size'])) . "\n" . sprintf(_("type: %s"), $file['file_type']); + $url = Horde_Util::addParameter($view_url, array('forum_id' => $this->_forum_id, + 'message_id' => $message_id, + 'file_id' => $file_id, + 'file_name' => $file['file_name'], + 'file_type' => $file['file_type'])); + $html .= Horde::linkTooltip($url, $title, '', '', '', $tooltip) . + Horde::img($mime_icon, $title, 'align="middle"', '') . ' ' . $file['file_name'] . '  
'; + } + + return $html; + } + + /** + * Formats file size. + * + * @param int $filesize + * + * @return string Formatted filesize. + */ + public function formatSize($filesize) + { + $units = array('B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'); + $pass = 0; // set zero, for Bytes + while($filesize >= 1024) { + $filesize /= 1024; + $pass++; + } + + return round($filesize, 2) . ' ' . $units[$pass]; + } + + + /** + * Fetches a forum data. + * + * @param integer $forum_id The ID of the forum to fetch. + * + * @return array The forum hash or a PEAR_Error on failure. + */ + public function getForum($forum_id = 0) + { + if (!$forum_id) { + $forum_id = $this->_forum_id; + } elseif ($forum_id instanceof PEAR_Error) { + return $forum_id; + } + + // Make the requested forum the current forum + $this->_forum_id = $forum_id; + + /* Check if we can read messages in this forum */ + if (!$this->hasPermission(Horde_Perms::SHOW, $forum_id)) { + return PEAR::raiseError(sprintf(_("You don't have permission to access messages in forum %s."), $forum_id)); + } + + $forum = $this->_cache->get('agora_forum_' . $forum_id, $GLOBALS['conf']['cache']['default_lifetime']); + if ($forum) { + return unserialize($forum); + } + + $sql = 'SELECT forum_id, forum_name, scope, active, forum_description, ' + . 'forum_parent_id, forum_moderated, forum_attachments, ' + . 'forum_distribution_address, author, message_count, thread_count ' + . 'FROM ' . $this->_forums_table . ' WHERE forum_id = ?'; + $forum = $this->_db->getRow($sql, null, array($forum_id)); + if ($forum instanceof PEAR_Error) { + return $forum; + } elseif (empty($forum)) { + return PEAR::raiseError(sprintf(_("Forum %s does not exist."), $forum_id)); + } + + $forum['forum_name'] = $this->convertFromDriver($forum['forum_name']); + $forum['forum_description'] = $this->convertFromDriver($forum['forum_description']); + $forum['forum_distribution_address'] = $this->convertFromDriver($forum['forum_distribution_address']); + + /* Get moderators */ + $sql = 'SELECT horde_uid FROM agora_moderators WHERE forum_id = ?'; + $moderators = $this->_db->getCol($sql, null, array($forum_id)); + if ($moderators instanceof PEAR_Error) { + return $moderators; + } elseif (!empty($moderators)) { + $forum['moderators'] = $moderators; + } + + $this->_cache->set('agora_forum_' . $forum_id, serialize($forum)); + + return $forum; + } + + /** + * Returns the number of forums. + */ + public function countForums() + { + $sql = 'SELECT COUNT(*) FROM ' . $this->_forums_table . ' WHERE active = ? AND scope = ?'; + return $this->_db->getOne($sql, null, array(1, $this->_scope)); + } + + /** + * Fetches a list of forums. + * + * @param integer $root_forum The first level forum. + * @param boolean $formatted Whether to return the list formatted or raw. + * @param string $sort_by The column to sort by. + * @param integer $sort_dir Sort direction, 0 = ascending, + * 1 = descending. + * @param boolean $add_scope Add parent forum if forum for another + * scopelication. + * @param string $from The forum to start listing at. + * @param string $count The number of forums to return. + * + * @return mixed An array of forums or PEAR_Error on failure. + */ + public function getForums($root_forum = 0, $formatted = true, + $sort_by = 'forum_name', $sort_dir = 0, + $add_scope = false, $from = 0, $count = 0) + { + /* Get messages data */ + $forums = $this->_getForums($root_forum, $formatted, $sort_by, + $sort_dir, $add_scope, $from, $count); + if ($forums instanceof PEAR_Error || empty($forums) || !$formatted) { + return $forums; + } + + $moderate = array(); + $user = Horde_Auth::getAuth(); + $edit_url = Horde::applicationUrl('messages/edit.php'); + $editforum_url = Horde::applicationUrl('editforum.php'); + $delete_url = Horde::applicationUrl('deleteforum.php'); + + foreach ($forums as $forum_id => &$forum) { + if (!$this->hasPermission(Horde_Perms::SHOW, $forum_id, $forum['scope'])) { + unset($forums[$forum_id]); + continue; + } + + $forum['indentn'] = 0; + $forum['indent'] = ''; + if (!$this->hasPermission(Horde_Perms::READ, $forum_id, $forum['scope'])) { + continue; + } + + $forum['url'] = Agora::setAgoraId($forum_id, null, Horde::applicationUrl('threads.php'), $forum['scope'], true); + $forum['message_count'] = number_format($forum['message_count']); + $forum['thread_count'] = number_format($forum['thread_count']); + + if ($forum['last_message_id']) { + $forum['last_message_date'] = $this->dateFormat($forum['last_message_timestamp']); + $forum['last_message_url'] = Agora::setAgoraId($forum_id, $forum['last_message_id'], Horde::applicationUrl('messages/index.php'), $forum['scope'], true); + } + + $forum['actions'] = array(); + + /* Post message button. */ + + if ($this->hasPermission(Horde_Perms::EDIT, $forum_id, $forum['scope'])) { + /* New Post forum button. */ + $url = Agora::setAgoraId($forum_id, null, $edit_url, $forum['scope'], true); + $forum['actions'][] = Horde::link($url, _("Post message")) . _("New Post") . ''; + + if (Horde_Auth::isAdmin('agora:admin')) { + /* Edit forum button. */ + $url = Agora::setAgoraId($forum_id, null, $editforum_url, $forum['scope'], true); + $forum['actions'][] = Horde::link($url, _("Edit forum")) . _("Edit") . ''; + } + } + + if (Horde_Auth::isAdmin('agora:admin')) { + /* Delete forum button. */ + $url = Agora::setAgoraId($forum_id, null, $delete_url, $forum['scope'], true); + $forum['actions'][] = Horde::link($url, _("Delete forum")) . _("Delete") . ''; + } + + /* User is a moderator */ + if (isset($forum['moderators']) && in_array($user, $forum['moderators'])) { + $moderate[] = $forum_id; + } + } + + /* If needed, display moderate link */ + if (!empty($moderate)) { + $sql = 'SELECT forum_id, COUNT(forum_id) FROM ' . $this->_threads_table + . ' WHERE forum_id IN (' . implode(',', $moderate) . ') AND approved = ?' + . ' GROUP BY forum_id'; + $unapproved = $this->_db->getAssoc($sql, null, array(0), null, MDB2_FETCHMODE_ASSOC, false); + if ($unapproved instanceof PEAR_Error) { + return $unapproved; + } + + $url = Horde::link(Horde::applicationUrl('moderate.php', true), _("Moderate")) . _("Moderate") . ''; + foreach ($unapproved as $forum_id => $count) { + $forum['actions'][] = $url . ' (' . $count . ')' ; + } + } + + return $forums; + } + + /** + * Fetches a list of forums. + * + * @param integer $root_forum The first level forum. + * @param boolean $formatted Whether to return the list formatted or raw. + * @param string $sort_by The column to sort by. + * @param integer $sort_dir Sort direction, 0 = ascending, + * 1 = descending. + * @param boolean $add_scope Add parent forum if forum for another + * scopelication. + * @param string $from The forum to start listing at. + * @param string $count The number of forums to return. + * + * @return mixed An array of forums or PEAR_Error on failure. + */ + protected function _getForums($root_forum = 0, $formatted = true, + $sort_by = 'forum_name', $sort_dir = 0, + $add_scope = false, $from = 0, $count = 0) + { + return array(); + } + + /** + * Fetches a list of forums. + * + * @param integer $forums Frorms to format + * @param boolean $formatted Whether to return the list formatted or raw. + * + * @return mixed An array of forums or PEAR_Error on failure. + */ + protected function _formatForums($forums, $formatted = true) + { + foreach (array_keys($forums) as $forum_id) { + $forums[$forum_id]['forum_name'] = $this->convertFromDriver($forums[$forum_id]['forum_name']); + if ($formatted) { + $forums[$forum_id]['forum_description'] = $this->convertFromDriver($forums[$forum_id]['forum_description']); + } + } + + if ($formatted) { + /* Get moderators */ + $sql = 'SELECT forum_id, horde_uid' + . ' FROM agora_moderators WHERE forum_id IN (' . implode(',', array_keys($forums)) . ')'; + $moderators = $this->_db->getAssoc($sql, null, null, null, MDB2_FETCHMODE_ASSOC, false, true); + if ($moderators instanceof PEAR_Error) { + return $moderators; + } + + foreach ($forums as $forum_id => $forum) { + if (isset($moderators[$forum_id])) { + $forums[$forum_id]['moderators'] = $moderators[$forum_id]; + } + } + } + + return $forums; + } + + /** + * Get forums ids and titles + * + * @return array An array of forums and form names. + */ + public function getBareForums() + { + return array(); + } + + /** + * Creates a new forum. + * + * @param string $forum_name Forum name. + * @param string $forum_owner Forum owner. + * + * @return integer ID of the new generated forum. + */ + public function newForum($forum_name, $owner) + { + if (empty($forum_name)) { + return PEAR::raiseError(_("Cannot create a forum with an empty name.")); + } + + $forum_id = $this->_write_db->nextId('agora_forums'); + $sql = 'INSERT INTO ' . $this->_forums_table . ' (forum_id, scope, forum_name, active, author) VALUES (?, ?, ?, ?, ?)'; + $statement = $this->_write_db->prepare($sql); + if ($statement instanceof PEAR_Error) { + return $statement; + } + + $result = $statement->execute(array($forum_id, $this->_scope, $this->convertToDriver($forum_name), 1, $owner)); + $statement->free(); + + if ($result instanceof PEAR_Error) { + return $result; + } + + return $forum_id; + } + + /** + * Saves a forum, either creating one if no forum ID is given or updating + * an existing one. + * + * @param array $info The forum information to save consisting of: + * forum_id + * forum_author + * forum_parent_id + * forum_name + * forum_moderated + * forum_description + * forum_attachments + * + * @return mixed The forum ID on success or PEAR_Error on failure. + */ + public function saveForum($info) + { + if (empty($info['forum_id'])) { + if (empty($info['author'])) { + $info['author'] = Horde_Auth::getAuth(); + } + $info['forum_id'] = $this->newForum($info['forum_name'], $info['author']); + if ($info['forum_id'] instanceof PEAR_Error) { + return $info['forum_id']; + } + } + + $sql = 'UPDATE ' . $this->_forums_table . ' SET forum_name = ?, forum_parent_id = ?, ' + . 'forum_description = ?, forum_moderated = ?, ' + . 'forum_attachments = ?, forum_distribution_address = ? ' + . 'WHERE forum_id = ?'; + + $params = array($this->convertToDriver($info['forum_name']), + (int)$info['forum_parent_id'], + $this->convertToDriver($info['forum_description']), + (int)$info['forum_moderated'], + isset($info['forum_attachments']) ? (int)$info['forum_attachments'] : abs($GLOBALS['conf']['forums']['enable_attachments']), + isset($info['forum_distribution_address']) ? $info['forum_distribution_address'] : '', + $info['forum_id']); + + Horde::logMessage('SQL Query by Agora_Message::saveForum(): ' . $sql, __FILE__, __LINE__, PEAR_LOG_DEBUG); + $statement = $this->_write_db->prepare($sql); + if ($statement instanceof PEAR_Error) { + return $statement; + } + + $result = $statement->execute($params); + $statement->free(); + + if ($result instanceof PEAR_Error) { + return $result; + } + + $this->_updateCacheState(0); + $this->_cache->expire('agora_forum_' . $info['forum_id'], $GLOBALS['conf']['cache']['default_lifetime']); + + return $info['forum_id']; + } + + /** + * Deletes a forum, any subforums that are present and all messages + * contained in the forum and subforums. + * + * @param integer $forum_id The ID of the forum to delete. + * + * @return mixed True on success or PEAR_Error on failure. + */ + public function deleteForum($forum_id) + { + $result = $this->deleteThread(); + if ($result instanceof PEAR_Error) { + return $result; + } + + /* Delete the forum itself. */ + $result = $this->_write_db->query('DELETE FROM ' . $this->_forums_table . ' WHERE forum_id = ' . (int)$forum_id); + if ($result instanceof PEAR_Error) { + return $result; + } + + return true; + } + + /** + * Searches forums for matching threads or posts. + * + * @param array $filter Hash of filter criteria: + * 'forums' => Array of forum IDs to search. If not + * present, searches all forums. + * 'keywords' => Array of keywords to search for. If not + * present, finds all posts/threads. + * 'allkeywords' => Boolean specifying whether to find all + * keywords; otherwise, wants any keyword. + * False if not supplied. + * 'message_author' => Name of author to find posts by. If not + * present, any author. + * 'searchsubjects' => Boolean specifying whether to search + * subjects. True if not supplied. + * 'searchcontents' => Boolean specifying whether to search + * post contents. False if not supplied. + * @param string $sort_by The column by which to sort. + * @param integer $sort_dir The direction by which to sort: + * 0 - ascending + * 1 - descending + * @param string $from The thread to start listing at. + * @param string $count The number of threads to return. + */ + public function search($filter, $sort_by = 'message_subject', $sort_dir = 0, + $from = 0, $count = 0) + { + if (!isset($filter['allkeywords'])) { + $filter['allkeywords'] = false; + } + if (!isset($filter['searchsubjects'])) { + $filter['searchsubjects'] = true; + } + if (!isset($filter['searchcontents'])) { + $filter['searchcontents'] = false; + } + + /* Select forums ids to search in */ + $sql = 'SELECT forum_id, forum_name FROM ' . $this->_forums_table . ' WHERE '; + if (empty($filter['forums'])) { + $sql .= ' active = ? AND scope = ?'; + $forums = $this->_db->getAssoc($sql, null, array(1, $this->_scope)); + } else { + $sql .= ' forum_id IN (' . implode(',', $filter['forums']) . ')'; + $forums = $this->_db->getAssoc($sql); + } + if ($forums instanceof PEAR_Error) { + return $forums; + } + + /* Build query */ + $sql = ' FROM ' . $this->_threads_table . ' WHERE forum_id IN (' . implode(',', array_keys($forums)) . ')'; + + if (!empty($filter['keywords'])) { + $sql .= ' AND ('; + if ($filter['searchsubjects']) { + $keywords = ''; + foreach ($filter['keywords'] as $keyword) { + if (!empty($keywords)) { + $keywords .= $filter['allkeywords'] ? ' AND ' : ' OR '; + } + $keywords .= 'message_subject LIKE ' . $this->_db->quote('%' . $keyword . '%'); + } + $sql .= '(' . $keywords . ')'; + } + if ($filter['searchcontents']) { + if ($filter['searchsubjects']) { + $sql .= ' OR '; + } + $keywords = ''; + foreach ($filter['keywords'] as $keyword) { + if (!empty($keywords)) { + $keywords .= $filter['allkeywords'] ? ' AND ' : ' OR '; + } + $keywords .= 'body LIKE ' . $this->_db->quote('%' . $keyword . '%'); + } + $sql .= '(' . $keywords . ')'; + } + $sql .= ')'; + } + + if (!empty($filter['author'])) { + $sql .= ' AND message_author = ' . $this->_db->quote(Horde_String::lower($filter['author'], Horde_Nls::getCharset())); + } + + /* Sort by result column. */ + $sql .= ' ORDER BY ' . $sort_by . ' ' . ($sort_dir ? 'DESC' : 'ASC'); + + /* Slice directly in DB. */ + if ($count) { + $total = $this->_db->getOne('SELECT COUNT(*) ' . $sql); + $this->_db->setLimit($count, $from); + } + + $sql = 'SELECT message_id, forum_id, message_subject, message_author, message_timestamp ' . $sql; + $messages = $this->_db->query($sql); + if ($messages instanceof PEAR_Error) { + return $messages; + } + if (empty($messages)) { + return array('results' => array(), 'total' => 0); + } + + $results = array(); + $msg_url = Horde::applicationUrl('messages/index.php'); + $forum_url = Horde::applicationUrl('threads.php'); + while ($message = $messages->fetchRow()) { + if (!isset($results[$message['forum_id']])) { + $index = array('agora' => $message['forum_id'], 'scope' => $this->_scope); + $results[$message['forum_id']] = array('forum_id' => $message['forum_id'], + 'forum_url' => Horde_Util::addParameter($forum_url, $index), + 'forum_name' => $this->convertFromDriver($forums[$message['forum_id']]), + 'messages' => array()); + } + $index = array('agora' => $message['forum_id']. '.' . $message['message_id'], 'scope' => $this->_scope); + $results[$message['forum_id']]['messages'][] = array( + 'message_id' => $message['message_id'], + 'message_subject' => htmlspecialchars($this->convertFromDriver($message['message_subject'])), + 'message_author' => $message['message_author'], + 'message_date' => $this->dateFormat($message['message_timestamp']), + 'message_url' => Horde_Util::addParameter($msg_url, $index)); + } + + return array('results' => $results, 'total' => $total); + } + + /** + * Finds out if the user has the specified rights to the messages forum. + * + * @param integer $perm The permission level needed for access. + * @param integer $forum_id Forum to check permissions for. + * @param string $scope Application scope to use. + * + * @return boolean True if the user has the specified permissions. + */ + public function hasPermission($perm = Horde_Perms::READ, $forum_id = null, $scope = null) + { + global $perms; + + // Allow all admins + if (($forum_id === null && isset($this->_forum['author']) && $this->_forum['author'] == Horde_Auth::getAuth()) || + Horde_Auth::isAdmin('agora:admin')) { + return true; + } + + // Allow forum author + if ($forum_id === null) { + $forum_id = $this->_forum_id; + } + + if ($scope === null) { + $scope = $this->_scope; + } + + if (!$perms->exists('agora:forums:' . $scope) && + !$perms->exists('agora:forums:' . $scope . ':' . $forum_id)) { + return ($perm & Horde_Perms::DELETE) ? false : true; + } + + return $perms->hasPermission('agora:forums:' . $scope, Horde_Auth::getAuth(), $perm) || + $perms->hasPermission('agora:forums:' . $scope . ':' . $forum_id, Horde_Auth::getAuth(), $perm); + } + + /** + * Converts a value from the driver's charset to the default charset. + * + * @param mixed $value A value to convert. + * + * @return mixed The converted value. + */ + public function convertFromDriver($value) + { + return Horde_String::convertCharset($value, $this->_params['charset']); + } + + /** + * Converts a value from the default charset to the driver's charset. + * + * @param mixed $value A value to convert. + * + * @return mixed The converted value. + */ + public function convertToDriver($value) + { + return Horde_String::convertCharset($value, Horde_Nls::getCharset(), $this->_params['charset']); + } + + /** + * Attempts to open a persistent connection to the SQL server. + * + * @return boolean True on success; exits (Horde::fatal()) on error. + */ + private function _connect() + { + require_once 'MDB2.php'; + + $this->_params = Horde::getDriverConfig('storage', 'sql'); + Horde::assertDriverConfig($this->_params, 'storage', + array('phptype', 'charset')); + + $charset = $this->_params['charset']; + unset($this->_params['charset']); + + $this->_write_db = MDB2::factory($this->_params); + if ($this->_write_db instanceof PEAR_Error) { + Horde::fatal($this->_write_db, __FILE__, __LINE__); + } + + if (!empty($params['splitread'])) { + $params = array_merge($this->_params, $this->_params['read']); + $this->_db = MDB2::factory($this->_params); + if ($this->_db instanceof PEAR_Error) { + Horde::fatal($this->_db, __FILE__, __LINE__); + } + } else { + /* Default to the same DB handle for the writer too. */ + $this->_db =& $this->_write_db; + } + + $this->_db->loadModule('Extended'); + if ($this->_db instanceof PEAR_Error) { + Horde::fatal($this->_db, __FILE__, __LINE__); + } + + $this->_db->setFetchMode(MDB2_FETCHMODE_ASSOC); + $this->_write_db->setOption('seqcol_name', 'id'); + $this->_db->setOption('portability', MDB2_PORTABILITY_ALL ^ MDB2_PORTABILITY_EMPTY_TO_NULL); + $this->_params['charset'] = $charset; + + return true; + } + + /** + * Increment namespace + */ + private function _updateCacheState($thread) + { + if (is_array($thread)) { + foreach ($thread as $id) { + $key = 'prefix_' . $this->_forum_id . '_' . $id; + $prefix = $this->_cache->get($key, $GLOBALS['conf']['cache']['default_lifetime']); + if ($prefix) { + $this->_cache->set($key, $prefix + 1); + } + } + } else { + $key = 'prefix_' . $this->_forum_id . '_' . $thread; + $prefix = $this->_cache->get($key, $GLOBALS['conf']['cache']['default_lifetime']); + if ($prefix) { + $this->_cache->set($key, $prefix + 1); + } else { + $this->_cache->set($key, 2); + } + } + } + + /** + * Append namespace to cache key + */ + private function _getCacheKey($key, $thread = 0) + { + static $prefix; + + if ($prefix == null) { + $prefix = $this->_cache->get('prefix_' . $this->_forum_id . '_' . $thread, + $GLOBALS['conf']['cache']['default_lifetime']); + if (!$prefix) { + $prefix = '1'; + } + } + + return 's_' . $prefix . '_' . $thread . '_' . $key; + } + + /** + * Get cache value + */ + protected function _getCache($key, $thread = 0) + { + $key = $this->_getCacheKey($key, $thread); + + return $this->_cache->get($key, $GLOBALS['conf']['cache']['default_lifetime']); + } + + /** + * Set cache value + */ + protected function _setCache($key, $value, $thread = 0) + { + $key = $this->_getCacheKey($key, $thread); + + return $this->_cache->set($key, $value); + } +} diff --git a/agora/lib/Messages/split_sql.php b/agora/lib/Messages/split_sql.php new file mode 100644 index 000000000..25b9bbfb1 --- /dev/null +++ b/agora/lib/Messages/split_sql.php @@ -0,0 +1,302 @@ + + * @package Agora + */ +class Agora_Messages_split_sql extends Agora_Messages { + + /** + * Constructor + */ + public function __construct($scope) + { + parent::__construct($scope); + + /* trick table name */ + if ($scope != 'agora') { + $this->_threads_table = 'agora_messages_' . $scope; + $this->_forums_table = 'agora_forums_' . $scope; + } + } + + /** + * Returns an ID for a given forum name. + * + * @param string $forum_name The full forum name. + * + * @return integer The ID of the forum. + */ + public function getForumId($forum_name) + { + static $ids = array(); + + if (!isset($ids[$forum_name])) { + $sql = 'SELECT forum_id FROM ' . $this->_forums_table . ' WHERE forum_name = ?'; + $ids[$forum_name] = $this->_db->getOne($sql, array('integer'), array($forum_name)); + } + + return $ids[$forum_name]; + } + + /** + * Get forums ids and titles + * + * @return array An array of forums and form names. + */ + public function getBareForums() + { + if ($this->_scope == 'agora') { + $sql = 'SELECT forum_id, forum_name FROM ' . $this->_forums_table; + } else { + $sql = 'SELECT forum_id, forum_description FROM ' . $this->_forums_table; + } + + return $this->_db->getAssoc($sql); + } + + /** + * Fetches a list of forums. + * + * @param integer $root_forum The first level forum. + * @param boolean $formatted Whether to return the list formatted or raw. + * @param string $sort_by The column to sort by. + * @param integer $sort_dir Sort direction, 0 = ascending, + * 1 = descending. + * @param boolean $add_scope Add parent forum if forum for another + * scopelication. + * @param string $from The forum to start listing at. + * @param string $count The number of forums to return. + * + * @return mixed An array of forums or PEAR_Error on failure. + */ + protected function _getForums($root_forum = 0, $formatted = true, + $sort_by = 'forum_name', $sort_dir = 0, + $add_scope = false, $from = 0, $count = 0) + { + $key = $this->_scope . ':' . $root_forum . ':' . $formatted . ':' + . $sort_by . ':' . $sort_dir . ':' . $add_scope . ':' . $from + . ':' . $count; + $forums = $this->_getCache($key); + if ($forums) { + return unserialize($forums); + } + + $sql = 'SELECT forum_id, forum_name'; + + if ($formatted) { + $sql .= ', scope, active, forum_description, forum_parent_id, ' + . 'forum_moderated, forum_attachments, message_count, thread_count, ' + . 'last_message_id, last_message_author, last_message_timestamp'; + } + + $sql .= ' FROM ' . $this->_forums_table . ' WHERE active = ? '; + $params = array(1); + + if ($root_forum != 0) { + $sql .= ' AND forum_parent_id = ? '; + $params[] = $root_forum; + } + + /* Sort by result colomn if possible */ + $sql .= ' ORDER BY '; + if ($sort_by == 'forum_name' || $sort_by == 'message_count') { + $sql .= $sort_by; + } else { + $sql .= 'forum_id'; + } + $sql .= ' ' . ($sort_dir ? 'DESC' : 'ASC'); + + /* Slice direcly in DB. */ + if ($count) { + $this->_db->setLimit($count, $from); + } + + $forums = $this->_db->getAssoc($sql, null, $params, null, MDB2_FETCHMODE_ASSOC, $formatted); + if ($forums instanceof PEAR_Error || empty($forums)) { + return $forums; + } + + $forums = $this->_formatForums($forums, $formatted); + + $this->_setCache($key, serialize($forums)); + + return $forums; + } + + /** + * Returns a list of threads. + * + * @param integer $thread_root Message at which to start the thread. + * If null get all forum threads + * @param boolean $all_levels Show all child levels or just one level. + * @param string $sort_by The column by which to sort. + * @param integer $sort_dir The direction by which to sort: + * 0 - ascending + * 1 - descending + * @param boolean $message_view + * @param string $from The thread to start listing at. + * @param string $count The number of threads to return. + */ + protected function _getThreads($thread_root = 0, + $all_levels = false, + $sort_by = 'message_modifystamp', + $sort_dir = 0, + $message_view = false, + $from = 0, + $count = 0) + { + /* Cache */ + $key = $this->_scope . ':' . $this->_forum_id . ':' . $thread_root . ':' . intval($all_levels) . ':' + . $sort_by . ':' . $sort_dir . ':' . intval($message_view) . ':' . intval($from) . ':' . intval($count); + $messages = $this->_getCache($key, $thread_root); + if ($messages) { + return unserialize($messages); + } + + $bind = $this->_buildThreadsQuery(null, $thread_root, $all_levels, $sort_by, + $sort_dir, $message_view, $from, $count); + + /* Slice direcly in DB. */ + if ($sort_by != 'message_thread' && $count) { + $this->_db->setLimit($count, $from); + } + + $messages = $this->_db->getAssoc($bind[0], null, $bind[1], null, MDB2_FETCHMODE_ASSOC, true); + if ($messages instanceof PEAR_Error) { + Horde::logMessage($messages, __FILE__, __LINE__, PEAR_LOG_ERR); + return $messages; + } + + $messages = $this->_formatThreads($messages, $sort_by, $message_view, $thread_root); + + $this->_setCache($key, serialize($messages), $thread_root); + + return $messages; + } + + /** + * Returns a list of threads. + * + * @param string $forum_owner Forum owner + * @param integer $thread_root Message at which to start the thread. + * If null get all forum threads + * @param boolean $all_levels Show all child levels or just one level. + * @param string $sort_by The column by which to sort. + * @param integer $sort_dir The direction by which to sort: + * 0 - ascending + * 1 - descending + * @param boolean $message_view + * @param string $from The thread to start listing at. + * @param string $count The number of threads to return. + */ + public function getThreadsByForumOwner($forum_owner, + $thread_root = 0, + $all_levels = false, + $sort_by = 'message_modifystamp', + $sort_dir = 0, + $message_view = false, + $from = 0, + $count = 0) + { + $bind = $this->_buildThreadsQuery($forum_owner, $thread_root, $all_levels, + $sort_by, $sort_dir, $message_view, $from, $count); + + if ($sort_by != 'message_thread' && $count) { + $this->_db->setLimit($count, $from); + } + + $messages = $this->_db->getAssoc($bind[0], null, $bind[1], null, MDB2_FETCHMODE_ASSOC, true); + if ($messages instanceof PEAR_Error) { + Horde::logMessage($messages, __FILE__, __LINE__, PEAR_LOG_ERR); + return $messages; + } + + return $this->_formatThreads($messages, $sort_by, $message_view, $thread_root); + } + + /** + * Build threads query. + * + * @param string $forum_owner Forum owner + * @param integer $thread_root Message at which to start the thread. + * If null get all forum threads + * @param boolean $all_levels Show all child levels or just one level. + * @param string $sort_by The column by which to sort. + * @param integer $sort_dir The direction by which to sort: + * 0 - ascending + * 1 - descending + * @param boolean $message_view + * @param string $from The thread to start listing at. + * @param string $count The number of threads to return. + */ + private function _buildThreadsQuery($forum_owner = null, + $thread_root = 0, + $all_levels = false, + $sort_by = 'message_modifystamp', + $sort_dir = 0, + $message_view = false, + $from = 0, + $count = 0) + { + $params = array(); + $where = ''; + $sql = 'SELECT m.message_id, m.forum_id, m.message_thread, m.parents, m.message_author, ' + . 'm.message_subject, m.message_timestamp, m.locked, m.view_count, ' + . 'm.message_seq, m.attachments'; + + if ($message_view) { + $sql .= ', m.body'; + } + + if ($thread_root == 0) { + $sql .= ', m.last_message_id, m.last_message_author, m.message_modifystamp AS last_message_timestamp'; + } + + /* Get messages form a specific owner */ + if ($forum_owner !== null) { + $sql .= ', f.forum_name FROM ' . $this->_threads_table . ' m, ' . $this->_forums_table . ' f'; + $where .= ' AND f.author = ? AND f.forum_id = m.forum_id '; + $params[] = $forum_owner; + } else { + $sql .= ' FROM ' . $this->_threads_table . ' m'; + /* Get messages form a specific forum */ + if ($this->_forum_id) { + $where .= ' AND m.forum_id = ?'; + $params[] = $this->_forum_id; + } + } + + /* Get all levels? */ + if (!$all_levels) { + $where .= ' AND m.parents = ?'; + $params[] = ''; + } + + /* Get only approved messages. */ + if ($this->_forum['forum_moderated']) { + $where .= ' AND m.approved = ?'; + $params[] = 1; + } + + if ($thread_root) { + $where .= ' AND (message_id = ? OR message_thread = ?)'; + $params[] = (int)$thread_root; + $params[] = (int)$thread_root; + } + + /* Sort by result column. */ + $sql .= ' WHERE ' . substr($where, 5) . ' ORDER BY ' . $sort_by . ' ' . ($sort_dir ? 'DESC' : 'ASC'); + + return array($sql, $params); + } +} diff --git a/agora/lib/Messages/sql.php b/agora/lib/Messages/sql.php new file mode 100644 index 000000000..8d86cbfc5 --- /dev/null +++ b/agora/lib/Messages/sql.php @@ -0,0 +1,300 @@ + + * @author Jan Schneider + * @author Duck + * @package Agora + */ +class Agora_Messages_sql extends Agora_Messages { + + /** + * Returns an ID for a given forum name. + * + * @param string $forum_name The full forum name. + * + * @return integer The ID of the forum. + */ + public function getForumId($forum_name) + { + static $ids = array(); + + if (!isset($ids[$forum_name])) { + $sql = 'SELECT forum_id FROM ' . $this->_forums_table . ' WHERE scope = ? AND forum_name = ? '; + $params = array($this->_scope, $forum_name); + $ids[$forum_name] = $this->_db->getOne($sql, array('integer'), $params); + } + + return $ids[$forum_name]; + } + + /** + * Get forums ids and titles + * + * @return array An array of forums and form names. + */ + public function getBareForums() + { + if ($this->_scope == 'agora') { + $sql = 'SELECT forum_id, forum_name FROM ' . $this->_forums_table . ' WHERE scope = ?'; + } else { + $sql = 'SELECT forum_id, forum_description FROM ' . $this->_forums_table . ' WHERE scope = ?'; + } + + return $this->_db->getAssoc($sql, null, array($this->_scope)); + } + + /** + * Fetches a list of forums. + * + * @param integer $root_forum The first level forum. + * @param boolean $formatted Whether to return the list formatted or raw. + * @param string $sort_by The column to sort by. + * @param integer $sort_dir Sort direction, 0 = ascending, + * 1 = descending. + * @param boolean $add_scope Add parent forum if forum for another + * scopelication. + * @param string $from The forum to start listing at. + * @param string $count The number of forums to return. + * + * @return mixed An array of forums or PEAR_Error on failure. + */ + protected function _getForums($root_forum = 0, $formatted = true, + $sort_by = 'forum_name', $sort_dir = 0, + $add_scope = false, $from = 0, $count = 0) + { + $key = $this->_scope . ':' . $root_forum . ':' . $formatted . ':' + . $sort_by . ':' . $sort_dir . ':' . $add_scope . ':' . $from + . ':' . $count; + $forums = $this->_getCache($key); + if ($forums) { + return unserialize($forums); + } + + $sql = 'SELECT forum_id, forum_name'; + + if ($formatted) { + $sql .= ', scope, active, forum_description, forum_parent_id, ' + . 'forum_moderated, forum_attachments, message_count, thread_count, ' + . 'last_message_id, last_message_author, last_message_timestamp'; + } + + $sql .= ' FROM ' . $this->_forums_table . ' WHERE active = ? '; + $params = array(1); + + if ($root_forum != 0) { + $sql .= ' AND forum_parent_id = ? '; + $params[] = $root_forum; + } + + if ($add_scope) { + $sql .= ' AND scope = ? '; + $params[] = $this->_scope; + } + + /* Sort by result colomn if possible */ + $sql .= ' ORDER BY '; + if ($sort_by == 'forum_name' || $sort_by == 'message_count') { + $sql .= $sort_by; + } else { + $sql .= 'forum_id'; + } + $sql .= ' ' . ($sort_dir ? 'DESC' : 'ASC'); + + /* Slice direcly in DB. */ + if ($count) { + $this->_db->setLimit($count, $from); + } + + $forums = $this->_db->getAssoc($sql, null, $params, null, MDB2_FETCHMODE_ASSOC, $formatted); + if ($forums instanceof PEAR_Error || empty($forums)) { + return $forums; + } + + $forums = $this->_formatForums($forums, $formatted); + + $this->_setCache($key, serialize($forums)); + + return $forums; + } + + /** + * Returns a list of threads. + * + * @param integer $thread_root Message at which to start the thread. + * If null get all forum threads + * @param boolean $all_levels Show all child levels or just one level. + * @param string $sort_by The column by which to sort. + * @param integer $sort_dir The direction by which to sort: + * 0 - ascending + * 1 - descending + * @param boolean $message_view + * @param string $from The thread to start listing at. + * @param string $count The number of threads to return. + */ + protected function _getThreads($thread_root = 0, + $all_levels = false, + $sort_by = 'message_modifystamp', + $sort_dir = 0, + $message_view = false, + $from = 0, + $count = 0) + { + /* Cache */ + $key = $this->_scope . ':' . $this->_forum_id . ':' . $thread_root . ':' . intval($all_levels) . ':' + . $sort_by . ':' . $sort_dir . ':' . intval($message_view) . ':' . intval($from) . ':' . intval($count); + $messages = $this->_getCache($key, $thread_root); + if ($messages) { + return unserialize($messages); + } + + $bind = $this->_buildThreadsQuery(null, $thread_root, $all_levels, $sort_by, + $sort_dir, $message_view, $from, $count); + + /* Slice direcly in DB. */ + if ($sort_by != 'message_thread' && $count) { + $this->_db->setLimit($count, $from); + } + + $messages = $this->_db->getAssoc($bind[0], null, $bind[1], null, MDB2_FETCHMODE_ASSOC, true); + if ($messages instanceof PEAR_Error) { + Horde::logMessage($messages, __FILE__, __LINE__, PEAR_LOG_ERR); + return $messages; + } + + $messages = $this->_formatThreads($messages, $sort_by, $message_view, $thread_root); + + $this->_setCache($key, serialize($messages), $thread_root); + + return $messages; + } + + /** + * Returns a list of threads. + * + * @param string $forum_owner Forum owner + * @param integer $thread_root Message at which to start the thread. + * If null get all forum threads + * @param boolean $all_levels Show all child levels or just one level. + * @param string $sort_by The column by which to sort. + * @param integer $sort_dir The direction by which to sort: + * 0 - ascending + * 1 - descending + * @param boolean $message_view + * @param string $from The thread to start listing at. + * @param string $count The number of threads to return. + */ + public function getThreadsByForumOwner($forum_owner, + $thread_root = 0, + $all_levels = false, + $sort_by = 'message_modifystamp', + $sort_dir = 0, + $message_view = false, + $from = 0, + $count = 0) + { + $bind = $this->_buildThreadsQuery($forum_owner, $thread_root, $all_levels, + $sort_by, $sort_dir, $message_view, $from, $count); + + if ($sort_by != 'message_thread' && $count) { + $this->_db->setLimit($count, $from); + } + + $messages = $this->_db->getAssoc($bind[0], null, $bind[1], null, MDB2_FETCHMODE_ASSOC, true); + if ($messages instanceof PEAR_Error) { + Horde::logMessage($messages, __FILE__, __LINE__, PEAR_LOG_ERR); + return $messages; + } + + return $this->_formatThreads($messages, $sort_by, $message_view, $thread_root); + } + + /** + * Build threads query. + * + * @param string $forum_owner Forum owner + * @param integer $thread_root Message at which to start the thread. + * If null get all forum threads + * @param boolean $all_levels Show all child levels or just one level. + * @param string $sort_by The column by which to sort. + * @param integer $sort_dir The direction by which to sort: + * 0 - ascending + * 1 - descending + * @param boolean $message_view + * @param string $from The thread to start listing at. + * @param string $count The number of threads to return. + */ + private function _buildThreadsQuery($forum_owner = null, + $thread_root = 0, + $all_levels = false, + $sort_by = 'message_modifystamp', + $sort_dir = 0, + $message_view = false, + $from = 0, + $count = 0) + { + /* Select threads */ + $sql = 'SELECT m.message_id AS message_id, m.forum_id AS forum_id, m.message_thread AS message_thread, m.parents AS parents, m.message_author AS message_author, ' + . 'm.message_subject AS message_subject, m.message_timestamp AS message_timestamp, m.locked AS locked, m.view_count AS view_count, ' + . 'm.message_seq AS message_seq , m.attachments AS attachments'; + + if ($message_view) { + $sql .= ', m.body AS body'; + } + + if ($thread_root == 0) { + $sql .= ', m.last_message_id AS last_message_id, m.last_message_author AS last_message_author'. + ', m.message_modifystamp AS last_message_timestamp'; + } + + $sql .= ' FROM ' . $this->_threads_table . ' m, ' . $this->_forums_table . ' AS f '; + + $params = array(); + $sql .= ' WHERE f.forum_id = m.forum_id '; + + /* Get messages form a specific forum or owner */ + if ($forum_owner !== null) { + $sql .= ' AND f.author = ? AND f.scope = ?'; + $params[] = $forum_owner; + $params[] = $this->_scope; + } elseif ($this->_forum_id) { + $sql .= ' AND m.forum_id = ?'; + $params[] = $this->_forum_id; + } else { + $sql .= ' AND f.scope = ?'; + $params[] = $this->_scope; + } + + /* Get all levels? */ + if (!$all_levels) { + $sql .= ' AND m.parents = ?'; + $params[] = ''; + } + + /* Get only approved messages. */ + if ($this->_forum['forum_moderated']) { + $sql .= ' AND m.approved = ?'; + $params[] = 1; + } + + if ($thread_root) { + $sql .= ' AND (m.message_id = ? OR m.message_thread = ?)'; + $params[] = $thread_root; + $params[] = $thread_root; + } + + /* Sort by result column. */ + $sql .= ' ORDER BY m.' . $sort_by . ' ' . ($sort_dir ? 'DESC' : 'ASC'); + + return array($sql, $params); + } +} \ No newline at end of file diff --git a/agora/lib/Tree/flat.php b/agora/lib/Tree/flat.php new file mode 100644 index 000000000..7c915baaa --- /dev/null +++ b/agora/lib/Tree/flat.php @@ -0,0 +1,139 @@ + + * @author Duck + */ +class Horde_Tree_agoraflat extends Horde_Tree { + + /** + * TODO + * + * @var array + */ + var $_nodes = array(); + + /** + * Constructor. + */ + function Horde_Tree_agoraflat($tree_name, $params) + { + parent::Horde_Tree($tree_name, $params); + $this->_static = true; + } + + /** + * Returns the tree. + * + * @return string The HTML code of the rendered tree. + */ + function getTree() + { + $this->_buildIndents($this->_root_nodes); + + $tree = ''; + foreach ($this->_root_nodes as $node_id) { + $tree .= $this->_buildTree($node_id); + } + return $tree; + } + + /** + * Checks the current environment to see if we can render the HTML tree. + * HTML is always renderable, at least until we add a php-gtk tree + * backend, in which case this implementation will actually need a body. + * + * @static + * + * @return boolean Whether or not this Tree:: backend will function. + */ + function isSupported() + { + return true; + } + + /** + * Returns just the JS node definitions as a string. This is a no-op for + * the select renderer. + */ + function renderNodeDefinitions() + { + } + + /** + * Adds additional parameters to a node. + * + * @param string $id The unique node id. + * @param array $params Any other parameters to set. + *
+     * selected --  Whether this node is selected
+     * 
+ */ + function addNodeParams($id, $params = array()) + { + if (!is_array($params)) { + $params = array($params); + } + + $allowed = array('selected'); + + foreach ($params as $param_id => $param_val) { + /* Set only allowed and non-null params. */ + if (in_array($param_id, $allowed) && !is_null($param_val)) { + $this->_nodes[$id][$param_id] = $param_val; + } + } + } + + /** + * Recursive function to walk through the tree array and build the output. + * + * @access private + * + * @param string $node_id The Node ID. + * + * @return string The tree rendering. + */ + function _buildTree($node_id) + { + $extra = $this->_nodes[$node_id]['extra'][1]; + $output = '
' . "\n" + . '
' . "\n" + . $extra['link'] . '' . $extra['message_subject'] . '
' . "\n" + . _("Posted by") . ': ' . $extra['message_author'] . "\n
" + . _("on: ") . $extra['message_date'] . "\n" + . '
' . "\n"; + + if (isset($extra['message_author_moderator'])) { + $output .= _("Moderator") . '
'; + } + + if (!empty($extra['actions'])) { + $output .= ' [ ' . implode(', ', $extra['actions']) . ' ] '; + } + + $output .= '
' . "\n" + . '

' . $this->_nodes[$node_id]['label'] . '

' . "\n" + . '
' . "\n"; + + if (isset($this->_nodes[$node_id]['children']) && + $this->_nodes[$node_id]['expanded']) { + $num_subnodes = count($this->_nodes[$node_id]['children']); + for ($c = 0; $c < $num_subnodes; $c++) { + $child_node_id = $this->_nodes[$node_id]['children'][$c]; + $output .= $this->_buildTree($child_node_id); + } + } + + return $output; + } +} \ No newline at end of file diff --git a/agora/lib/View.php b/agora/lib/View.php new file mode 100644 index 000000000..a93a93754 --- /dev/null +++ b/agora/lib/View.php @@ -0,0 +1,27 @@ + + * @package Video + */ +class Agora_View extends Horde_View { + + /** + * Constructor + */ + public function __construct() + { + /* Set default data. */ + parent::__construct(array('templatePath' => AGORA_TEMPLATES . '/', + 'encoding' => Horde_Nls::getCharset())); + } + +} diff --git a/agora/lib/base.php b/agora/lib/base.php new file mode 100644 index 000000000..29c960ad1 --- /dev/null +++ b/agora/lib/base.php @@ -0,0 +1,48 @@ +pushApp('agora'); +} catch (Horde_Exception $e) { + Horde_Auth::authenticateFailure('agora', $e); +} +$conf = &$GLOBALS['conf']; +define('AGORA_TEMPLATES', $registry->get('templates')); + +// Notification system. +$notification = Horde_Notification::singleton(); +$notification->attach('status'); + +/* Agora base library. */ +if (!defined('AGORA_BASE')) { + define('AGORA_BASE', dirname(__FILE__) . '/..'); +} + +require_once AGORA_BASE . '/lib/Agora.php'; +require_once AGORA_BASE . '/lib/Messages.php'; +require_once AGORA_BASE . '/lib/View.php'; + +// Start compression. +if (!Horde_Util::nonInputVar('no_compress')) { + Horde::compressOutput(); +} diff --git a/agora/lib/prefs.php b/agora/lib/prefs.php new file mode 100644 index 000000000..122f41038 --- /dev/null +++ b/agora/lib/prefs.php @@ -0,0 +1,23 @@ + + * + * See the enclosed file COPYING for license information (GPL). If you + * did not receive this file, see http://www.fsf.org/copyleft/gpl.html. + */ + +function handle_avatarselect($updated) +{ + if ($GLOBALS['conf']['avatar']['allow_avatars']) { + $avatar_path = Horde_Util::getFormData('avatar_path'); + $avatar_path = Agora::validateAvatar($avatar_path) ? $avatar_path : null; + if ($avatar_path) { + $GLOBALS['prefs']->setValue('avatar_path', $avatar_path); + $updated = true; + } + } + + return $updated; +} diff --git a/agora/lib/version.php b/agora/lib/version.php new file mode 100644 index 000000000..adb9df0a1 --- /dev/null +++ b/agora/lib/version.php @@ -0,0 +1 @@ + diff --git a/agora/locale/.htaccess b/agora/locale/.htaccess new file mode 100755 index 000000000..3a4288278 --- /dev/null +++ b/agora/locale/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/agora/locale/de_DE/LC_MESSAGES/agora.mo b/agora/locale/de_DE/LC_MESSAGES/agora.mo new file mode 100644 index 000000000..dd069e61d Binary files /dev/null and b/agora/locale/de_DE/LC_MESSAGES/agora.mo differ diff --git a/agora/locale/es_ES/LC_MESSAGES/agora.mo b/agora/locale/es_ES/LC_MESSAGES/agora.mo new file mode 100755 index 000000000..ca6710c4c Binary files /dev/null and b/agora/locale/es_ES/LC_MESSAGES/agora.mo differ diff --git a/agora/locale/fi_FI/LC_MESSAGES/agora.mo b/agora/locale/fi_FI/LC_MESSAGES/agora.mo new file mode 100755 index 000000000..702bb551c Binary files /dev/null and b/agora/locale/fi_FI/LC_MESSAGES/agora.mo differ diff --git a/agora/locale/fr_FR/LC_MESSAGES/agora.mo b/agora/locale/fr_FR/LC_MESSAGES/agora.mo new file mode 100755 index 000000000..17be9304b Binary files /dev/null and b/agora/locale/fr_FR/LC_MESSAGES/agora.mo differ diff --git a/agora/locale/hu_HU/LC_MESSAGES/agora.mo b/agora/locale/hu_HU/LC_MESSAGES/agora.mo new file mode 100755 index 000000000..b29a77adb Binary files /dev/null and b/agora/locale/hu_HU/LC_MESSAGES/agora.mo differ diff --git a/agora/locale/it_IT/LC_MESSAGES/agora.mo b/agora/locale/it_IT/LC_MESSAGES/agora.mo new file mode 100755 index 000000000..feca3d531 Binary files /dev/null and b/agora/locale/it_IT/LC_MESSAGES/agora.mo differ diff --git a/agora/locale/ja_JP/LC_MESSAGES/agora.mo b/agora/locale/ja_JP/LC_MESSAGES/agora.mo new file mode 100755 index 000000000..08f9d2957 Binary files /dev/null and b/agora/locale/ja_JP/LC_MESSAGES/agora.mo differ diff --git a/agora/locale/lt_LT/LC_MESSAGES/agora.mo b/agora/locale/lt_LT/LC_MESSAGES/agora.mo new file mode 100755 index 000000000..2dbb47a53 Binary files /dev/null and b/agora/locale/lt_LT/LC_MESSAGES/agora.mo differ diff --git a/agora/locale/ro_RO/LC_MESSAGES/agora.mo b/agora/locale/ro_RO/LC_MESSAGES/agora.mo new file mode 100755 index 000000000..b95fec38a Binary files /dev/null and b/agora/locale/ro_RO/LC_MESSAGES/agora.mo differ diff --git a/agora/locale/sl_SI/LC_MESSAGES/agora.mo b/agora/locale/sl_SI/LC_MESSAGES/agora.mo new file mode 100644 index 000000000..41512c3c1 Binary files /dev/null and b/agora/locale/sl_SI/LC_MESSAGES/agora.mo differ diff --git a/agora/locale/zh_TW/LC_MESSAGES/agora.mo b/agora/locale/zh_TW/LC_MESSAGES/agora.mo new file mode 100755 index 000000000..858551099 Binary files /dev/null and b/agora/locale/zh_TW/LC_MESSAGES/agora.mo differ diff --git a/agora/messages/abuse.php b/agora/messages/abuse.php new file mode 100644 index 000000000..ddf443aaf --- /dev/null +++ b/agora/messages/abuse.php @@ -0,0 +1,103 @@ +push($messages->getMessage(), 'horde.warning'); + $url = Horde::applicationUrl('forums.php', true); + header('Location: ' . $url); + exit; +} + +/* Get requested message, if fail then back to forums list. */ +$message = $messages->getMessage($message_id); +if ($message instanceof PEAR_Error) { + $notification->push(sprintf(_("Could not open the message. %s"), $message->getMessage()), 'horde.warning'); + header('Location: ' . Horde::applicationUrl('forums.php', true)); + exit; +} + +/* We have any moderators? */ +$forum = $messages->getForum(); +if (!isset($forum['moderators'])) { + $notification->push(_("No moderators are associated with this forum."), 'horde.warning'); + $url = Agora::setAgoraId($forum_id, $message_id, Horde::applicationUrl('messages/index.php', true), $scope); + header('Location: ' . $url); + exit; +} + +/* Get the form object. */ +$vars = Horde_Variables::getDefaultVariables(); +$form = new Horde_Form($vars, _("Report as abuse")); +$form->setButtons(array(_("Report as abuse"), _("Cancel"))); +$form->addHidden('', 'agora', 'text', false); +$form->addHidden('', 'scope', 'text', false); + +if ($form->validate()) { + + $url = Agora::setAgoraId($forum_id, $message_id, Horde::applicationUrl('messages/index.php', true), $scope); + + if ($vars->get('submitbutton') == _("Cancel")) { + header('Location: ' . $url); + exit; + } + + /* Collect moderators emails, and send them the notify */ + require_once 'Horde/Identity.php'; + $emails = array(); + foreach ($forum['moderators'] as $moderator) { + $identity = &Identity::singleton('none', $moderator); + $address = $identity->getValue('from_addr'); + if (!empty($address)) { + $emails[] = $address; + } + } + + if (empty($emails)) { + header('Location: ' . $url); + exit; + } + + $mail = new Horde_Mime_Mail(array( + 'subject' => sprintf(_("Message %s reported as abuse"), + $message_id), + 'body' => $url . "\n\n" . Horde_Auth::getAuth() . "\n\n" . $_SERVER["REMOTE_ADDR"], + 'to' => $emails, + 'from' => $emails[0], + 'charset' => Horde_Nls::getCharset())); + $mail->addHeader('User-Agent', 'Agora ' . $registry->getVersion()); + $mail->send(Horde::getMailerConfig()); + + $notification->push($subject, 'horde.success'); + header('Location: ' . $url); + exit; +} + +/* Set up template data. */ +$view = new Agora_View(); +$view->menu = Agora::getMenu('string'); +$view->formbox = Horde_Util::bufferOutput(array($form, 'renderActive'), null, $vars, 'abuse.php', 'post'); +$view->notify = Horde_Util::bufferOutput(array($notification, 'notify'), array('listeners' => 'status')); +$view->message_subject = $message['message_subject']; +$view->message_author = $message['message_author']; +$view->message_date = strftime($prefs->getValue('date_format'), $message['message_timestamp']); +$view->message_body = Agora_Messages::formatBody($message['body']); + +require AGORA_TEMPLATES . '/common-header.inc'; +echo $view->render('messages/form.html.php'); +require $registry->get('templates', 'horde') . '/common-footer.inc'; diff --git a/agora/messages/delete.php b/agora/messages/delete.php new file mode 100644 index 000000000..8c3996783 --- /dev/null +++ b/agora/messages/delete.php @@ -0,0 +1,88 @@ + + */ + +define('AGORA_BASE', dirname(__FILE__) . '/..'); +require_once AGORA_BASE . '/lib/base.php'; +require_once AGORA_BASE . '/lib/Messages.php'; + +/* Set up the messages object. */ +list($forum_id, $message_id, $scope) = Agora::getAgoraId(); +$messages = &Agora_Messages::singleton($scope, $forum_id); +if ($messages instanceof PEAR_Error) { + $notification->push($messages->getMessage(), 'horde.warning'); + $url = Horde::applicationUrl('forums.php', true); + header('Location: ' . $url); + exit; +} + +/* Get requested message, if fail then back to forums list. */ +$message = $messages->getMessage($message_id); +if ($message instanceof PEAR_Error) { + $notification->push(sprintf(_("Could not open the message. %s"), $message->getMessage()), 'horde.warning'); + header('Location: ' . Horde::applicationUrl('forums.php', true)); + exit; +} + +/* Check delete permissions */ +if (!$messages->hasPermission(Horde_Perms::DELETE)) { + $notification->push(sprintf(_("You don't have permission to delete messages in forum %s."), $forum_id), 'horde.warning'); + $url = Agora::setAgoraId($forum_id, $message_id, Horde::applicationUrl('messages/index.php', true), $scope); + header('Location: ' . $url); + exit; +} + +/* Get the form object. */ +$vars = Horde_Variables::getDefaultVariables(); +$form = new Horde_Form($vars, sprintf(_("Delete \"%s\" and all replies?"), $message['message_subject'])); +$form->setButtons(array(_("Delete"), _("Cancel"))); +$form->addHidden('', 'agora', 'text', false); +$form->addHidden('', 'scope', 'text', false); + +if ($form->validate()) { + if ($vars->get('submitbutton') != _("Delete")) { + $notification->push(_("Message not deleted."), 'horde.message'); + $url = Agora::setAgoraId($forum_id, $message_id, Horde::applicationUrl('messages/index.php', true), $scope); + header('Location: ' . $url); + exit; + } + + $thread_id = $messages->deleteMessage($message_id); + if ($thread_id instanceof PEAR_Error) { + $notification->push(sprintf(_("Could not delete the message. %s"), $thread_id->getMessage()), 'horde.error'); + } elseif ($thread_id) { + $notification->push(_("Message deleted."), 'horde.success'); + $url = Agora::setAgoraId($forum_id, $thread_id, Horde::applicationUrl('messages/index.php', true), $scope); + header('Location: ' . $url); + exit; + } else { + $notification->push(_("Thread deleted."), 'horde.success'); + $url = Agora::setAgoraId($forum_id, null, Horde::applicationUrl('threads.php', true), $scope); + header('Location: ' . $url); + exit; + } +} + +/* Set up template data. */ +$view = new Agora_View(); +$view->message_subject = $message['message_subject']; +$view->message_author = $message['message_author']; +$view->message_date = $messages->dateFormat($message['message_timestamp']); +$view->message_body = Agora_Messages::formatBody($message['body']); +$view->menu = Agora::getMenu('string'); +$view->notify = Horde_Util::bufferOutput(array($notification, 'notify'), array('listeners' => 'status')); +$view->formbox = Horde_Util::bufferOutput(array($form, 'renderActive'), null, $vars, 'delete.php', 'post'); + +require AGORA_TEMPLATES . '/common-header.inc'; +echo $view->render('messages/form.html.php'); +require $registry->get('templates', 'horde') . '/common-footer.inc'; diff --git a/agora/messages/edit.php b/agora/messages/edit.php new file mode 100644 index 000000000..ab4d404a0 --- /dev/null +++ b/agora/messages/edit.php @@ -0,0 +1,126 @@ + + */ + +define('AGORA_BASE', dirname(__FILE__) . '/..'); +require_once AGORA_BASE . '/lib/base.php'; +require_once AGORA_BASE . '/lib/Messages.php'; + +list($forum_id, $message_id, $scope) = Agora::getAgoraId(); +$message_parent_id = Horde_Util::getFormData('message_parent_id'); + +$vars = Horde_Variables::getDefaultVariables(); +$vars->set('scope', $scope); +$formname = $vars->get('formname'); + +/* Set up the messages control object. */ +$messages = &Agora_Messages::singleton($scope, $forum_id); +if ($messages instanceof PEAR_Error) { + $notification->push(_("Could not post the message: ") . $messages->getMessage(), 'horde.warning'); + $url = Horde::applicationUrl('forums.php', true); + header('Location: ' . $url); + exit; +} + +/* Check edit permissions */ +if (!$messages->hasPermission(Horde_Perms::EDIT)) { + $notification->push(sprintf(_("You don't have permission to post messages in forum %s."), $forum_id), 'horde.warning'); + $url = Agora::setAgoraId($forum_id, $message_id, Horde::applicationUrl('messages/index.php', true), $scope); + header('Location: ' . $url); + exit; +} + +/* Check if a message is being edited. */ +if ($message_id) { + $message = $messages->getMessage($message_id); + if (!$formname) { + $vars = new Horde_Variables($message); + $vars->set('message_subject', $message['message_subject']); + $vars->set('message_body', $message['body']); + } + if ($message['attachments']) { + $attachment_link = $messages->getAttachmentLink($message_id); + if ($attachment_link) { + $vars->set('attachment_preview', $attachment_link); + } + } +} else { + $vars->set('forum_id', $forum_id); + $vars->set('message_id', $message_id); +} + +/* Get the forum details. */ +$forum_name = $messages->_forum['forum_name']; + +/* Set the title. */ +$title = $message_parent_id ? + sprintf(_("Post a Reply to \"%s\""), $forum_name) : + ($message_id ? sprintf(_("Edit Message in \"%s\""), $forum_name) : + sprintf(_("Post a New Message to \"%s\""), $forum_name)); + +/* Get the form object. */ +$form = $messages->getForm($vars, $title, $message_id); + +/* Validate the form. */ +if ($form->validate($vars)) { + $form->getInfo($vars, $info); + + /* Try and store this message and get back a new message_id */ + $message_id = $messages->saveMessage($info); + if ($message_id instanceof PEAR_Error) { + $notification->push(_("Could not post the message: ") . $message_id->getDebugInfo(), 'horde.error'); + } else { + if ($messages->_forum['forum_moderated']) { + $notification->push(_("Your message has been enqueued and is awaiting moderation. It will become visible after moderator approval."), 'horde.success'); + } else { + $notification->push(_("Message posted."), 'horde.success'); + } + if (!empty($info['url'])) { + $url = Horde::url($info['url'], true); + } else { + $url = Agora::setAgoraId($forum_id, $message_id, Horde::applicationUrl('messages/index.php', true), $scope); + } + header('Location: ' . $url); + exit; + } +} + +/* Set up template */ +$view = new Agora_View(); + +/* Check if a parent message exists and set up tags accordingly. */ +if ($message_parent_id) { + $message = $messages->replyMessage($message_parent_id); + if (!($message instanceof PEAR_Error)) { + $vars->set('message_subject', $message['message_subject']); + $vars->set('message_body_old', $message['body']); + $view->message_subject = $message['message_subject']; + $view->message_author = $message['message_author']; + $view->message_body = $message['body']; + } else { + /* Bad parent message id, offer to do a regular post. */ + $message_parent_id = null; + $vars->set('message_parent_id', ''); + $notification->push(_("Invalid parent message, you will be posting this message as a new thread."), 'horde.warning'); + } +} + +$view->replying = $message_parent_id; +$view->menu = Agora::getMenu('string'); +$view->notify = Horde_Util::bufferOutput(array($notification, 'notify'), array('listeners' => 'status')); +$view->formbox = Horde_Util::bufferOutput(array($form, 'renderActive'), null, $vars, 'edit.php', 'post'); + +require AGORA_TEMPLATES . '/common-header.inc'; +echo $view->render('messages/edit.html.php'); +require $registry->get('templates', 'horde') . '/common-footer.inc'; diff --git a/agora/messages/index.php b/agora/messages/index.php new file mode 100644 index 000000000..3e98b5494 --- /dev/null +++ b/agora/messages/index.php @@ -0,0 +1,221 @@ + + */ + +define('AGORA_BASE', dirname(__FILE__) . '/..'); +require_once AGORA_BASE . '/lib/base.php'; +require_once AGORA_BASE . '/lib/Messages.php'; +require_once 'Horde/Identity.php'; + +/* Set up the messages object. */ +list($forum_id, $message_id, $scope) = Agora::getAgoraId(); +$messages = &Agora_Messages::singleton($scope, $forum_id); +if ($messages instanceof PEAR_Error) { + $notification->push($messages->getMessage(), 'horde.warning'); + $url = Horde::applicationUrl('forums.php', true); + header('Location: ' . $url); + exit; +} + +/* Get requested message, if fail then back to forums list. */ +$message = $messages->getMessage($message_id); +if ($message instanceof PEAR_Error) { + $notification->push(sprintf(_("Could not open the message. %s"), $message->getMessage()), 'horde.warning'); + header('Location: ' . Horde::applicationUrl('forums.php', true)); + exit; +} + +/* Check if we must show bodies */ +if (($view_bodies = Horde_Util::getGet('bodies')) !== null) { + $prefs->setValue('thread_view_bodies', $view_bodies); +} else { + $view_bodies = $prefs->getValue('thread_view_bodies'); +} + +/* Get view settings. */ +$sort_by = ($view_bodies == 1) ? 'message_thread' : Agora::getSortBy('thread'); +$sort_dir = Agora::getSortDir('thread'); +$forum = $messages->getForum(); +$title = $forum['forum_name'] . ' :: ' . $message['message_subject']; +$thread_page = Horde_Util::getFormData('thread_page'); + +/* Count = replies + opening thread */ +$thread_count = $messages->countThreads($message['message_thread']); +if ($thread_count instanceof PEAR_Error) { + $notification->push(sprintf(_("Could not open the message. %s"), $thread_count->getMessage()), 'horde.warning'); + $thread_count = 0; +} else { + $thread_count++; +} + +/* Log thread views. */ +$seen = $messages->logView($message['message_thread']); + +/* Set thread page views */ +if ($view_bodies == 2) { + if ($thread_page === null && !$seen) { + /* Jump to the last page, if we already seen the thread */ + $thread_page = max(ceil($thread_count / $prefs->getValue('thread_per_page')) - 1, 0); + } + $thread_per_page = $prefs->getValue('thread_per_page'); + $thread_start = $thread_page * $thread_per_page; +} else { + $thread_page = 0; + $thread_per_page = 0; + $thread_start = 0; +} + +/* Set up template */ +$view = new Agora_View(); + +if (!$view_bodies) { + /* Get the author's avatar. */ + if ($conf['avatar']['allow_avatars']) { + $identity = &Identity::singleton('none', $message['message_author']); + $avatar_path = $identity->getValue('avatar_path'); + $message_author_avatar = Agora::validateAvatar($avatar_path) ? Agora::getAvatarUrl($avatar_path) : false; + $view->message_author_avatar = $message_author_avatar; + } + + $view->message_id = $message['message_id']; + $view->message_author = sprintf(_("Posted by %s on %s"), htmlspecialchars($message['message_author']), $messages->dateFormat($message['message_timestamp'])); + if (isset($message['message_author_moderator'])) { + $view->message_author_moderator = 1; + } + $view->message_subject = $message['message_subject']; + $view->message_body = Agora_Messages::formatBody($message['body']); + + if ($message['attachments']) { + $view->message_attachment = $messages->getAttachmentLink($message_id); + } + + $template_file = 'messages/message.html.php'; +} else { + $template_file = 'messages/index.html.php'; +} + +/* Actions. */ +$actions = array(); + +/* Check if the thread allows replies. */ +if (!$message['locked']) { + $url = Agora::setAgoraId($forum_id, null, Horde::applicationUrl('messages/edit.php')); + $url = Horde_Util::addParameter($url, 'message_parent_id', $message_id); + $actions[] = Horde::link($url, _("Reply")) . _("Reply") . ''; +} + +/* Add admin permissons */ +if ($messages->hasPermission(Horde_Perms::DELETE)) { + $url = Agora::setAgoraId($forum_id, $message_id, Horde::applicationUrl('messages/edit.php')); + $actions[] = Horde::link($url, _("Edit")) . _("Edit") . ''; + + $url = Agora::setAgoraId($forum_id, $message_id, Horde::applicationUrl('messages/delete.php')); + $actions[] = Horde::link($url, _("Delete")) . _("Delete") . ''; + + $url = Agora::setAgoraId($forum_id, $message_id, Horde::applicationUrl('messages/lock.php')); + $label = ($message['locked']) ? _("Unlock thread") : _("Lock thread"); + $actions[] = Horde::link($url, $label) . $label . ''; +} + +/* Get the message array and the sorted thread list. */ +$threads_list = $messages->getThreads($message['message_thread'], true, $sort_by, $sort_dir, ($view_bodies ? 1 : 0), '', null, $thread_start, $thread_per_page); +if ($threads_list instanceof PEAR_Error) { + $notification->push($threads_list->getMessage(), 'horde.error'); + header('Location: ' . Horde::applicationUrl('forums.php', true)); + exit; +} + +/* Set up pager. */ +if ($thread_count > $thread_per_page && $view_bodies == 2) { + $vars = new Horde_Variables(array('thread_page' => $thread_page)); + $pager_ob = new Horde_Ui_Pager('thread_page', $vars, array('num' => $thread_count, 'url' => 'messages/index.php', 'perpage' => $thread_per_page)); + $pager_ob->preserve('agora', Horde_Util::getFormData('agora')); + $view->pager_link = $pager_ob->render(); +} + +/* Set up the column headers. */ +$col_headers = array(array('message_thread' => _("Thread"), 'message_subject' => _("Subject")), 'message_author' => _("Posted by"), 'message_timestamp' => _("Date")); +$col_headers = Agora::formatColumnHeaders($col_headers, $sort_by, $sort_dir, 'thread'); + +/* Actions. */ +$url = Agora::setAgoraId($forum_id, $message_id, Horde::applicationUrl('messages/index.php')); + +/* Get the thread table. */ +switch ($view_bodies) { +case '2': + $threads_template = 'messages/flat.html.php'; + if (!$prefs->isLocked('thread_view_bodies')) { + $actions[] = Horde::link(Horde_Util::addParameter($url, 'bodies', 0), _("Hide bodies")) . _("Hide bodies") . ''; + $actions[] = Horde::link(Horde_Util::addParameter($url, 'bodies', 1), _("Thread")) . _("Thread") . ''; + } + $threads = $messages->getThreadsUI($threads_list, $col_headers, $view_bodies, $threads_template); + break; + +case '1': + $threads_template = 'messages/flat_thread.html.php'; + if (!$prefs->isLocked('thread_view_bodies')) { + $actions[] = Horde::link(Horde_Util::addParameter($url, 'bodies', 0), _("Hide bodies")) . _("Hide bodies") . ''; + $actions[] = Horde::link(Horde_Util::addParameter($url, 'bodies', 2), _("Flat")) . _("Flat") . ''; + } + + /* Resort messages by thread */ + require_once AGORA_BASE . '/lib/Tree/flat.php'; + $tree = new Horde_Tree_agoraflat('flatthread', array()); + foreach ($threads_list as &$node) { + $tree->addNode($node['message_id'], $node['parent'], $node['body'], $node['indent'], true, array(), $node); + } + + $threads = $tree->getTree(); + break; + +default: + $threads_template = false; + if (!$prefs->isLocked('thread_view_bodies')) { + $actions[] = Horde::link(Horde_Util::addParameter($url, 'bodies', 1), _("View bodies")) . _("View bodies") . ''; + } + $threads = $messages->getThreadsUI($threads_list, $col_headers, $view_bodies, $threads_template); + break; +} + +/* Set up the main template tags. */ +$view->menu = Agora::getMenu('string'); +$view->notify = Horde_Util::bufferOutput(array($notification, 'notify'), array('listeners' => 'status')); +$view->actions = $actions; +$view->threads = $threads; +$view->rss = Horde_Util::addParameter(Horde::applicationUrl('rss/messages.php', true, -1), array('scope' => $scope, 'message_id' => $message_id, 'forum_id' => $forum_id)); + +/* Display an edit-dialogue if the thread is not locked and we can edit messages in them. */ +if (!$messages->hasPermission(Horde_Perms::EDIT)) { + $message = sprintf(_("You don't have permission to post messages in forum %s."), $forum['forum_name']); + if (!empty($conf['hooks']['permsdenied'])) { + $message = Horde::callHook('perms_denied', array('agora'), 'horde', $message); + } + $view->form = $message; +} elseif ($message['locked']) { + $view->form = _("Thread locked."); +} else { + $reply = $messages->replyMessage($message); + $vars = Horde_Variables::getDefaultVariables(); + $vars->set('forum_id', $forum_id); + $vars->set('message_parent_id', $message_id); + $vars->set('message_subject', $reply['message_subject']); + $vars->set('message_body_old', $reply['body']); + $form = $messages->getForm($vars, sprintf(_("Post a Reply to \"%s\""), $reply['message_subject'])); + $view->form = Horde_Util::bufferOutput(array($form, 'renderActive'), null, null, 'edit.php', 'post', null, false); +} + +Horde::addScriptFile('hideable.js', 'horde', true); +Horde::addScriptFile('stripe.js', 'horde', true); +require AGORA_TEMPLATES . '/common-header.inc'; +echo $view->render($template_file); +require $registry->get('templates', 'horde') . '/common-footer.inc'; diff --git a/agora/messages/lock.php b/agora/messages/lock.php new file mode 100644 index 000000000..1582bef38 --- /dev/null +++ b/agora/messages/lock.php @@ -0,0 +1,84 @@ + + */ + +define('AGORA_BASE', dirname(__FILE__) . '/..'); +require_once AGORA_BASE . '/lib/base.php'; +require_once AGORA_BASE . '/lib/Messages.php'; + +/* Set up the messages object. */ +list($forum_id, $message_id, $scope) = Agora::getAgoraId(); +$messages = &Agora_Messages::singleton($scope, $forum_id); +if ($messages instanceof PEAR_Error) { + $notification->push($messages->getMessage(), 'horde.warning'); + $url = Horde::applicationUrl('forums.php', true); + header('Location: ' . $url); + exit; +} + +/* Get requested message, if fail then back to forums list. */ +$message = $messages->getMessage($message_id); +if ($message instanceof PEAR_Error) { + $notification->push(sprintf(_("Could not open the message. %s"), $message->getMessage()), 'horde.warning'); + header('Location: ' . Horde::applicationUrl('forums.php', true)); + exit; +} + +/* Check delete permissions */ +if (!$messages->hasPermission(Horde_Perms::DELETE)) { + $notification->push(sprintf(_("You don't have permission to delete messages in forum %s."), $forum_id), 'horde.warning'); + $url = Agora::setAgoraId($forum_id, $message_id, Horde::applicationUrl('messages/index.php', true), $scope); + header('Location: ' . $url); + exit; +} + +/* Get the form object. */ +$vars = Horde_Variables::getDefaultVariables(); +$form = new Horde_Form($vars, sprintf(_("Locking thread \"%s\""), $message['message_subject'])); +$form->setButtons(_("Update"), true); +$form->addHidden('', 'agora', 'text', false); +$v = &$form->addVariable(_("Allow replies in this thread"), 'message_lock', 'radio', true, false, null, array(array('0' => _("Yes, allow replies"), '1' => _("No, do not allow replies")))); +$v->setDefault('0'); + +if ($form->validate()) { + $form->getInfo($vars, $info); + + /* Try and delete this message. */ + $result = $messages->setThreadLock($message_id, $info['message_lock']); + if ($result instanceof PEAR_Error) { + $notification->push(sprintf(_("Could not lock the thread. %s"), $result->getMessage()), 'horde.error'); + } else { + if ($info['message_lock']) { + $notification->push(_("Thread locked."), 'horde.success'); + } else { + $notification->push(_("Thread unlocked."), 'horde.success'); + } + $url = Agora::setAgoraId($forum_id, $message_id, Horde::applicationUrl('messages/index.php', true)); + header('Location: ' . $url); + exit; + } +} + +/* Set up template data. */ +$view = new Agora_View(); +$view->menu = Agora::getMenu('string'); +$view->formbox = Horde_Util::bufferOutput(array($form, 'renderActive'), null, $vars, 'lock.php', 'post'); +$view->notify = Horde_Util::bufferOutput(array($notification, 'notify'), array('listeners' => 'status')); +$view->message_subject = $message['message_subject']; +$view->message_author = $message['message_author']; +$view->message_date = strftime($prefs->getValue('date_format'), $message['message_timestamp']); +$view->message_body = Agora_Messages::formatBody($message['body']); + +require AGORA_TEMPLATES . '/common-header.inc'; +echo $view->render('messages/form.html.php'); +require $registry->get('templates', 'horde') . '/common-footer.inc'; diff --git a/agora/messages/merge.php b/agora/messages/merge.php new file mode 100644 index 000000000..df767d583 --- /dev/null +++ b/agora/messages/merge.php @@ -0,0 +1,94 @@ +push($messages->getMessage(), 'horde.warning'); + $url = Horde::applicationUrl('forums.php', true); + header('Location: ' . $url); + exit; +} + +/* Get requested message, if fail then back to forums list. */ +$message = $messages->getMessage($message_id); +if ($message instanceof PEAR_Error) { + $notification->push(sprintf(_("Could not open the message. %s"), $message->getMessage()), 'horde.warning'); + header('Location: ' . Horde::applicationUrl('forums.php', true)); + exit; +} + +/* Check delete permissions */ +if (!$messages->hasPermission(Horde_Perms::DELETE)) { + $notification->push(sprintf(_("You don't have permission to delete messages in forum %s."), $forum_id), 'horde.warning'); + $url = Agora::setAgoraId($forum_id, $message_id, Horde::applicationUrl('messages/index.php', true), $scope); + header('Location: ' . $url); + exit; +} + +/* Get the form object. */ +$vars = Horde_Variables::getDefaultVariables(); +$form = new Horde_Form($vars, sprintf(_("Merge \"%s\" with another thread"), $message['message_subject'])); +$form->setButtons(array(_("Merge"), _("Cancel"))); +$form->addHidden('', 'agora', 'text', false); +$form->addHidden('', 'scope', 'text', false); + +$action_submit = Horde_Form_Action::factory('submit'); +$threads_list = array(); +foreach ($messages->getThreads(0, false, 'message_subject', 0) as $id => $thread) { + $threads_list[$id] = $thread['message_subject']; +} + +$v = &$form->addVariable(_("With Thread: "), 'new_thread_id', 'enum', true, false, null, array($threads_list)); +$v->setAction($action_submit); +$v->setOption('trackchange', true); + +if ($vars->get('new_thread_id')) { + $message_list = array(); + foreach ($messages->getThreads($vars->get('new_thread_id'), true, 'message_timestamp') as $id => $thread) { + $message_list[$id] = $thread['message_subject'] . ' (' . $thread['message_author'] . ' ' . $thread['message_date'] . ')'; + } + $form->addVariable(_("After Message: "), 'after_message_id', 'enum', true, false, null, array($message_list)); +} + +/* Validate the form. */ +if ($form->validate()) { + $form->getInfo($vars, $info); + + if ($vars->get('submitbutton') == _("Merge")) { + $merge = $messages->mergeThread($message_id, $info['after_message_id']); + if ($merge instanceof PEAR_Error) { + $notification->push($merge->getMessage(), 'horde.error'); + } else { + $notification->push(sprintf(_("Thread %s merged with thread %s after message %s."), $message_id, $info['new_thread_id'], $info['after_message_id']), 'horde.error'); + header('Location: ' . Agora::setAgoraId($forum_id, $info['new_thread_id'], Horde::applicationUrl('messages/index.php', true), $scope)); + exit; + } + } +} + +/* Template object. */ +$view = new Agora_View(); +$view->menu = Agora::getMenu('string'); +$view->main = Horde_Util::bufferOutput(array($form, 'renderActive'), null, $vars, 'merge.php', 'post'); +$view->message_subject = $message['message_subject']; +$view->message_author = $message['message_author']; +$view->message_body = Agora_Messages::formatBody($message['body']); + +require AGORA_TEMPLATES . '/common-header.inc'; +echo $view->render('main.html.php'); +require $registry->get('templates', 'horde') . '/common-footer.inc'; diff --git a/agora/messages/move.php b/agora/messages/move.php new file mode 100644 index 000000000..9becb4948 --- /dev/null +++ b/agora/messages/move.php @@ -0,0 +1,80 @@ +push($messages->getMessage(), 'horde.warning'); + $url = Horde::applicationUrl('forums.php', true); + header('Location: ' . $url); + exit; +} + +/* Get requested message, if fail then back to forums list. */ +$message = $messages->getMessage($message_id); +if ($message instanceof PEAR_Error) { + $notification->push(sprintf(_("Could not open the message. %s"), $message->getMessage()), 'horde.warning'); + header('Location: ' . Horde::applicationUrl('forums.php', true)); + exit; +} + +/* Check delete permissions */ +if (!$messages->hasPermission(Horde_Perms::DELETE)) { + $notification->push(sprintf(_("You don't have permission to delete messages in forum %s."), $forum_id), 'horde.warning'); + $url = Agora::setAgoraId($forum_id, $message_id, Horde::applicationUrl('messages/index.php', true), $scope); + header('Location: ' . $url); + exit; +} + +/* Get the form object. */ +$vars = Horde_Variables::getDefaultVariables(); +$form = new Horde_Form($vars, sprintf(_("Move \"%s\" to another forum"), $message['message_subject'])); +$form->setButtons(array(_("Move"), _("Cancel"))); +$form->addHidden('', 'agora', 'text', false); +$form->addHidden('', 'scope', 'text', false); + +$forums_list = Agora::formatCategoryTree($messages->getForums(0, false)); +$v = &$form->addVariable(_("Forum"), 'new_forum_id', 'enum', true, false, null, array($forums_list)); +$v->setDefault($forum_id); + +/* Validate the form. */ +if ($form->validate()) { + $form->getInfo($vars, $info); + + if ($vars->get('submitbutton') == _("Move")) { + $move = $messages->moveThread($message_id, $info['new_forum_id']); + if ($move instanceof PEAR_Error) { + $notification->push($move->getMessage(), 'horde.error'); + } else { + $notification->push(sprintf(_("Thread %s moved to from forum %s to %s."), $message_id, $forum_id, $info['new_forum_id']), 'horde.success'); + header('Location: ' . Agora::setAgoraId($info['new_forum_id'], $message_id, Horde::applicationUrl('messages/index.php', true), $scope)); + exit; + } + } +} + +/* Template object. */ +$view = new Agora_View(); +$view->menu = Agora::getMenu('string'); +$view->formbox = Horde_Util::bufferOutput(array($form, 'renderActive'), null, $vars, 'move.php', 'post'); +$view->message_subject = $message['message_subject']; +$view->message_author = $message['message_author']; +$view->message_body = Agora_Messages::formatBody($message['body']); + +require AGORA_TEMPLATES . '/common-header.inc'; +echo $view->render('messages/edit.html.php'); +require $registry->get('templates', 'horde') . '/common-footer.inc'; diff --git a/agora/messages/split.php b/agora/messages/split.php new file mode 100644 index 000000000..2bb8044b5 --- /dev/null +++ b/agora/messages/split.php @@ -0,0 +1,76 @@ +push($messages->getMessage(), 'horde.warning'); + $url = Horde::applicationUrl('forums.php', true); + header('Location: ' . $url); + exit; +} + +/* Get requested message, if fail then back to forums list. */ +$message = $messages->getMessage($message_id); +if ($message instanceof PEAR_Error) { + $notification->push(sprintf(_("Could not open the message. %s"), $message->getMessage()), 'horde.warning'); + header('Location: ' . Horde::applicationUrl('forums.php', true)); + exit; +} + +/* Check delete permissions */ +if (!$messages->hasPermission(Horde_Perms::DELETE)) { + $notification->push(sprintf(_("You don't have permission to delete messages in forum %s."), $forum_id), 'horde.warning'); + $url = Agora::setAgoraId($forum_id, $message_id, Horde::applicationUrl('messages/index.php', true), $scope); + header('Location: ' . $url); + exit; +} + +/* Get the form object. */ +$vars = Horde_Variables::getDefaultVariables(); +$form = new Horde_Form($vars, sprintf(_("Split \"%s\""), $message['message_subject'])); +$form->setButtons(array(_("Split"), _("Cancel"))); +$form->addHidden('', 'agora', 'text', false); +$form->addHidden('', 'scope', 'text', false); + +/* Validate the form. */ +if ($form->validate()) { + $form->getInfo($vars, $info); + + if ($vars->get('submitbutton') == _("Split")) { + $split = $messages->splitThread($message_id); + if ($split instanceof PEAR_Error) { + $notification->push($split->getMessage(), 'horde.error'); + } else { + $notification->push(sprintf(_("Thread splitted by message %s."), $message_id), 'horde.error'); + header('Location: ' . Agora::setAgoraId($forum_id, $message_id, Horde::applicationUrl('messages/index.php', true), $scope)); + exit; + } + } +} + +/* Template object. */ +$view = new Agora_View(); +$view->menu = Agora::getMenu('string'); +$view->formbox = Horde_Util::bufferOutput(array($form, 'renderActive'), null, $vars, 'split.php', 'post'); +$view->message_subject = $message['message_subject']; +$view->message_author = $message['message_author']; +$view->message_body = Agora_Messages::formatBody($message['body']); + +require AGORA_TEMPLATES . '/common-header.inc'; +echo $view->render('messages/edit.html.php'); +require $registry->get('templates', 'horde') . '/common-footer.inc'; diff --git a/agora/moderate.php b/agora/moderate.php new file mode 100644 index 000000000..39e16183e --- /dev/null +++ b/agora/moderate.php @@ -0,0 +1,87 @@ +getValue('threads_per_page'); +$messages_start = $messages_page * $messages_per_page; + +/* Get the sorting. */ +$sort_by = Agora::getSortBy('moderate'); +$sort_dir = Agora::getSortDir('moderate'); + +/* Check for any actions. */ +switch (Horde_Util::getFormData('action')) { +case _("Approve"): + $message_ids = Horde_Util::getFormData('message_ids'); + $messages->moderate('approve', $message_ids); + $notification->push(sprintf(_("%d messages was approved."), count($message_ids)), 'horde.success'); + break; + +case _("Delete"): + $message_ids = Horde_Util::getFormData('message_ids'); + $messages->moderate('delete', $message_ids); + $notification->push(sprintf(_("%d messages was deleted."), count($message_ids)), 'horde.success'); + break; +} + +/* Get a list of messages still to moderate. Error will occur if you don't have the right permissions */ +$messages_list = $messages->getModerateList($sort_by, $sort_dir); +if ($messages_list instanceof PEAR_Error) { + $notification->push($messages_list->getMessage(), 'horde.error'); + header('Location: ' . Horde::applicationUrl('forums.php', true)); + exit; +} elseif (empty($messages_list)) { + $messages_count = 0; + $notification->push(_("No messages are waiting for moderation."), 'horde.message'); +} else { + $messages_count = count($messages_list); + $messages_list = array_slice($messages_list, $messages_start, $messages_per_page); +} + + +/* Set up the column headers. */ +$col_headers = array('forum_id' => _("Forum"), 'message_subject' => _("Subject"), 'message_author' => _("Posted by"), 'message_body' => _("Body"), 'message_timestamp' => _("Date")); +$col_headers = Agora::formatColumnHeaders($col_headers, $sort_by, $sort_dir, 'moderate'); + +/* Set up the template tags. */ +$view = new Agora_View(); +$view->col_headers = $col_headers; +$view->messages = $messages_list; +$view->buttons = array(_("Approve"), _("Delete")); +$view->session_tag = Horde_Util::formInput(); +$view->notify = Horde_Util::bufferOutput(array($notification, 'notify'), array('listeners' => 'status')); + +/* Set up pager. */ +$vars = Horde_Variables::getDefaultVariables(); +$pager_ob = new Horde_Ui_Pager('moderate_page', $vars, array('num' => $messages_count, 'url' => Horde::selfUrl(true), 'perpage' => $messages_per_page)); +$pager_ob->preserve('agora', Horde_Util::getFormData('agora')); +$view->pager = $pager_ob->render(); + +if (isset($api_call)) { + return $view->render('moderate.html.php'); +} else { + $title = _("Messages Awaiting Moderation"); + $view->menu = Agora::getMenu('string'); + Horde::addScriptFile('stripe.js', 'horde', true); + require_once AGORA_TEMPLATES . '/common-header.inc'; + echo $view->render('moderate.html.php'); + require_once $registry->get('templates', 'horde') . '/common-footer.inc'; +} diff --git a/agora/moderators.php b/agora/moderators.php new file mode 100644 index 000000000..fb65ba0fb --- /dev/null +++ b/agora/moderators.php @@ -0,0 +1,93 @@ + + * @author Marko Djukic + */ + +define('AGORA_BASE', dirname(__FILE__)); +require_once AGORA_BASE . '/lib/base.php'; + +if (!Horde_Auth::isAdmin()) { + header('Location: ' . Horde::applicationUrl('forums.php')); + exit; +} + +/* Set up the messages object. */ +$scope = Horde_Util::getFormData('scope', 'agora'); +$messages = &Agora_Messages::singleton($scope); +if ($messages instanceof PEAR_Error) { + $notification->push($messages->getMessage(), 'horde.warning'); + $url = Horde::applicationUrl('forums.php', true); + header('Location: ' . $url); + exit; +} + +/* Moderator action */ +$action = Horde_Util::getFormData('action'); +if ($action) { + $forum_id = Horde_Util::getFormData('forum_id'); + $moderator = Horde_Util::getFormData('moderator'); + $result = $messages->updateModerator($moderator, $forum_id, $action); + if ($result instanceof PEAR_Error) { + $notification->push($result->getMessage(), 'horde.error'); + } + + header('Location: ' . Horde::applicationUrl('moderators.php', true)); + exit; +} + +/* Get the list of forums. */ +$forums_list = $messages->getForums(0, true, 'forum_name'); +if ($forums_list instanceof PEAR_Error) { + $notification->push($forums_list->getMessage(), 'horde.error'); + header('Location: ' . Horde::applicationUrl('forums.php', true)); + exit; +} + +/* Add delete links to moderators */ +$url = Horde_Util::addParameter(Horde::applicationUrl('moderators.php'), 'action', 'delete'); +foreach ($forums_list as $forum_id => $forum) { + if (!isset($forum['moderators'])) { + unset($forums_list[$forum_id]); + continue; + } + foreach ($forum['moderators'] as $id => $moderator) { + $delete = Horde_Util::addParameter($url, array('moderator' => $moderator, 'forum_id' => $forum_id)); + $forums_list[$forum_id]['moderators'][$id] = Horde::link($delete, _("Delete")) . $moderator . ''; + } +} + +$title = _("Moderators"); +$vars = Horde_Variables::getDefaultVariables(); +$form = new Horde_Form($vars, $title); +$form->addHidden('', 'scope', 'text', false); +$form->addHidden('', 'action', 'text', false); +$vars->set('action', 'add'); +$form->addVariable(_("Moderator"), 'moderator', 'text', true); +if ($messages->countForums() > 50) { + $form->addVariable(_("Forum"), 'forum_id', 'int', true); +} else { + $forums_enum = $messages->getForums(0, false, 'forum_name', 0, !Horde_Auth::isAdmin()); + $form->addVariable(_("Forum"), 'forum_id', 'enum', true, false, false, array($forums_enum)); +} + +/* Set up template data. */ +$view = new Agora_View(); +$view->menu = Agora::getMenu('string'); +$view->formbox = Horde_Util::bufferOutput(array($form, 'renderActive'), null, null, 'moderators.php', 'post'); +$view->notify = Horde_Util::bufferOutput(array($notification, 'notify'), array('listeners' => 'status')); +$view->forums = $forums_list; + +Horde::addScriptFile('stripe.js', 'horde', true); +require AGORA_TEMPLATES . '/common-header.inc'; +echo $view->render('moderators.html.php'); +require $registry->get('templates', 'horde') . '/common-footer.inc'; diff --git a/agora/owner.php b/agora/owner.php new file mode 100644 index 000000000..2eac6a439 --- /dev/null +++ b/agora/owner.php @@ -0,0 +1,78 @@ + + */ + +require_once dirname(__FILE__) . '/lib/base.php'; + +/* Only authenticated users should be using this. */ +if (!Horde_Auth::isAuthenticated()) { + $notification->push(_("You are not authorised for this action."), 'horde.warning'); + Horde_Auth::authenticateFailure('agora'); +} + +/* Default to agora and current user if is not an admin. */ +$scope = Horde_Util::getGet('scope', 'agora'); +$owner = Horde_Auth::isAdmin() ? Horde_Util::getGet('owner', Horde_Auth::getAuth()) : Horde_Auth::getAuth(); + +/* Get the sorting. */ +$sort_by = Agora::getSortBy('threads'); +$sort_dir = Agora::getSortDir('threads'); + +require AGORA_TEMPLATES . '/common-header.inc'; + +echo ''; +$notification->notify(array('listeners' => 'status')); +echo '

' . sprintf(_("Last posts in forums owned by %s"), $owner) . '

'; + +foreach ($registry->listApps() as $scope) { + if ($scope == 'agora' || ($registry->hasMethod('hasComments', $scope) && + $registry->callByPackage($scope, 'hasComments') === true)) { + $scope_name = $registry->get('name', $scope); + $forums = Agora_Messages::singleton($scope); + $threads = $forums->getThreadsByForumOwner($owner, 0, false, $sort_by, $sort_dir, false, 0, 5); + echo '

' . $scope_name . '

'; + + if ($threads instanceof PEAR_Error) { + echo $threads->getMessage(); + } elseif (empty($threads)) { + echo _("No threads"); + } else { + $link_back = $registry->hasMethod('show', $scope); + $url = Horde::applicationUrl('agora/messages/index.php'); + + /* link threads if possible */ + foreach ($threads as &$thread) { + if ($link_back) { + $thread['link'] = Horde::link($registry->linkByPackage($scope, 'show', array('id' => $thread['forum_name']))); + } else { + $thread['link'] = Horde::link(Agora::setAgoraId($thread['forum_id'], $thread['message_id'], $url, $scope, false)); + } + } + + /* Set up the column headers. */ + $col_headers = array('message_subject' => _("Subject"), 'message_author' => _("Posted by"), 'message_timestamp' => _("Date")); + $col_headers = Agora::formatColumnHeaders($col_headers, $sort_by, $sort_dir, 'threads'); + + /* Set up the template tags. */ + $view = new Agora_View(); + $view->col_headers = $col_headers; + $view->threads = $threads; + + echo $view->render('block/threads.html.php'); + } + + echo '
'; + } +} + +require $registry->get('templates', 'horde') . '/common-footer.inc'; diff --git a/agora/po/.htaccess b/agora/po/.htaccess new file mode 100755 index 000000000..3a4288278 --- /dev/null +++ b/agora/po/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/agora/po/README b/agora/po/README new file mode 100755 index 000000000..a985e94aa --- /dev/null +++ b/agora/po/README @@ -0,0 +1 @@ +see horde/po/README diff --git a/agora/po/agora.pot b/agora/po/agora.pot new file mode 100644 index 000000000..630ea34fc --- /dev/null +++ b/agora/po/agora.pot @@ -0,0 +1,1023 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Horde Project +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: dev@lists.horde.org\n" +"POT-Creation-Date: 2009-06-27 16:09+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: moderate.php:35 +#, php-format +msgid "%d messages was approved." +msgstr "" + +#: moderate.php:41 +#, php-format +msgid "%d messages was deleted." +msgstr "" + +#: scripts/phorum2agora.php:217 +msgid "-a, --agora_id[=aid] Agora forum id to save message to" +msgstr "" + +#: scripts/phorum2agora.php:220 +msgid "-c, --count[=messages] Number of messages to move at once" +msgstr "" + +#: scripts/phorum2agora.php:219 +msgid "" +"-f, --from[=offset] Offset from where to start to read messages" +msgstr "" + +#: scripts/phorum2agora.php:215 +msgid "-h, --help Show this help" +msgstr "" + +#: scripts/phorum2agora.php:216 +msgid "-p, --phorum_id[=pid] Phorum forum id to read message from" +msgstr "" + +#: scripts/phorum2agora.php:218 +msgid "-t, --phorum_table[=table] Phorum messages tablename" +msgstr "" + +#: lib/api.php:860 +msgid "Add a comment" +msgstr "" + +#: lib/api.php:164 +msgid "Admin" +msgstr "" + +#: messages/merge.php:65 +msgid "After Message: " +msgstr "" + +#: forums.php:71 +msgid "All Forums" +msgstr "" + +#: lib/Forms/Forum.php:41 +msgid "Allow attachments in this forum?" +msgstr "" + +#: messages/lock.php:50 +msgid "Allow replies in this thread" +msgstr "" + +#: moderate.php:32 moderate.php:68 +msgid "Approve" +msgstr "" + +#: lib/Comments.php:73 config/prefs.php.dist:92 config/prefs.php.dist:127 +#: config/prefs.php.dist:168 config/prefs.php.dist:256 +msgid "Ascending" +msgstr "" + +#: lib/Messages.php:1568 +msgid "Attachment" +msgstr "" + +#: lib/Comments.php:68 lib/Forms/Search.php:55 +msgid "Author" +msgstr "" + +#: config/prefs.php.dist:11 +msgid "Avatar" +msgstr "" + +#: config/prefs.php.dist:64 +#, php-format +msgid "" +"Avatars must be smaller than %s by %s pixels and less than %sKb in size." +msgstr "" + +#: ban.php:57 lib/Messages.php:1513 +msgid "Ban" +msgstr "" + +#: templates/ban.html.php:10 +msgid "Banned" +msgstr "" + +#: moderate.php:61 +msgid "Body" +msgstr "" + +#: deleteforum.php:44 messages/abuse.php:47 messages/abuse.php:55 +#: messages/merge.php:46 messages/move.php:46 messages/delete.php:48 +#: messages/split.php:46 lib/api.php:781 +msgid "Cancel" +msgstr "" + +#: lib/Messages.php:1944 +msgid "Cannot create a forum with an empty name." +msgstr "" + +#: templates/prefs/avatarselect.inc:8 +msgid "Choose from a gallery of avatars: " +msgstr "" + +#: lib/Comments.php:54 lib/api.php:491 +msgid "Comments" +msgstr "" + +#: rss/threads.php:63 +#, php-format +msgid "Comments on %s" +msgstr "" + +#: config/prefs.php.dist:48 +msgid "Comments view" +msgstr "" + +#: editforum.php:44 +#, php-format +msgid "Could not create the forum. %s" +msgstr "" + +#: deleteforum.php:65 +#, php-format +msgid "Could not delete the forum. %s" +msgstr "" + +#: messages/delete.php:62 lib/api.php:764 lib/api.php:775 lib/api.php:789 +#, php-format +msgid "Could not delete the message. %s" +msgstr "" + +#: threads.php:30 +#, php-format +msgid "Could not list threads. %s" +msgstr "" + +#: messages/lock.php:59 +#, php-format +msgid "Could not lock the thread. %s" +msgstr "" + +#: messages/abuse.php:30 messages/merge.php:30 messages/move.php:30 +#: messages/index.php:33 messages/index.php:55 messages/lock.php:32 +#: messages/delete.php:32 messages/split.php:30 +#, php-format +msgid "Could not open the message. %s" +msgstr "" + +#: messages/edit.php:30 messages/edit.php:82 lib/api.php:630 lib/api.php:683 +msgid "Could not post the message: " +msgstr "" + +#: scripts/phorum2agora.php:64 +msgid "Couldn't read command-line options." +msgstr "" + +#: lib/Forms/Forum.php:26 +msgid "Create" +msgstr "" + +#: lib/Messages.php:1564 +msgid "Current attachment" +msgstr "" + +#: owner.php:63 forums.php:54 moderate.php:61 messages/index.php:147 +#: lib/Comments.php:67 lib/Comments.php:87 lib/api.php:481 +#: lib/Block/threads.php:122 lib/Block/forums.php:86 lib/Block/thread.php:82 +#: config/prefs.php.dist:83 config/prefs.php.dist:117 +#: config/prefs.php.dist:159 config/prefs.php.dist:247 +msgid "Date" +msgstr "" + +#: config/prefs.php.dist:248 +msgid "Default comments view sort:" +msgstr "" + +#: config/prefs.php.dist:84 +msgid "Default forums view sort:" +msgstr "" + +#: config/prefs.php.dist:94 config/prefs.php.dist:129 +#: config/prefs.php.dist:170 config/prefs.php.dist:258 +msgid "Default sorting direction:" +msgstr "" + +#: config/prefs.php.dist:160 +msgid "Default thread view sort:" +msgstr "" + +#: config/prefs.php.dist:119 +msgid "Default threads view sort:" +msgstr "" + +#: deleteforum.php:44 deleteforum.php:62 ban.php:54 moderators.php:65 +#: moderate.php:38 moderate.php:68 messages/index.php:123 +#: messages/delete.php:48 messages/delete.php:53 lib/Messages.php:955 +#: lib/Messages.php:1837 lib/api.php:781 lib/api.php:786 +msgid "Delete" +msgstr "" + +#: messages/delete.php:47 lib/api.php:780 +#, php-format +msgid "Delete \"%s\" and all replies?" +msgstr "" + +#: deleteforum.php:42 lib/Messages.php:1511 +msgid "Delete Forum" +msgstr "" + +#: lib/Messages.php:1837 +msgid "Delete forum" +msgstr "" + +#: lib/Messages.php:955 +msgid "Delete message" +msgstr "" + +#: lib/Messages.php:1563 +msgid "Delete the existing attachment?" +msgstr "" + +#: lib/Comments.php:74 config/prefs.php.dist:93 config/prefs.php.dist:128 +#: config/prefs.php.dist:169 config/prefs.php.dist:257 +msgid "Descending" +msgstr "" + +#: forums.php:54 +msgid "Description" +msgstr "" + +#: config/prefs.php.dist:18 config/prefs.php.dist:25 config/prefs.php.dist:32 +#: config/prefs.php.dist:40 config/prefs.php.dist:47 +msgid "Display Options" +msgstr "" + +#: config/prefs.php.dist:237 +msgid "Display full message bodies in the comments view?" +msgstr "" + +#: config/prefs.php.dist:181 +msgid "Display full message bodies in the thread list view?" +msgstr "" + +#: config/prefs.php.dist:200 +msgid "Display graphical emoticons?" +msgstr "" + +#: messages/index.php:120 lib/Messages.php:951 lib/Messages.php:1830 +msgid "Edit" +msgstr "" + +#: editforum.php:25 lib/Messages.php:1508 +msgid "Edit Forum" +msgstr "" + +#: lib/api.php:658 +msgid "Edit Message" +msgstr "" + +#: messages/edit.php:69 +#, php-format +msgid "Edit Message in \"%s\"" +msgstr "" + +#: lib/api.php:858 +msgid "Edit a comment" +msgstr "" + +#: lib/Messages.php:1830 +msgid "Edit forum" +msgstr "" + +#: lib/Messages.php:951 +msgid "Edit message" +msgstr "" + +#: lib/Forms/Forum.php:37 +msgid "Enter a brief description of this forum" +msgstr "" + +#: messages/index.php:168 lib/Comments.php:60 config/prefs.php.dist:235 +msgid "Flat" +msgstr "" + +#: moderators.php:77 moderators.php:80 forums.php:54 moderate.php:61 +#: templates/moderators.html.php:8 messages/move.php:51 +#: lib/Block/threads.php:45 lib/Block/forums.php:86 config/prefs.php.dist:79 +msgid "Forum" +msgstr "" + +#: lib/Messages.php:1735 lib/api.php:758 +#, php-format +msgid "Forum %s does not exist." +msgstr "" + +#: editforum.php:47 +msgid "Forum Modified" +msgstr "" + +#: editforum.php:47 +msgid "Forum created." +msgstr "" + +#: deleteforum.php:67 +msgid "Forum deleted." +msgstr "" + +#: deleteforum.php:48 templates/moderators.html.php:9 lib/Forms/Forum.php:29 +msgid "Forum name" +msgstr "" + +#: deleteforum.php:70 +msgid "Forum not deleted." +msgstr "" + +#: templates/forums.html.php:9 templates/common-header.inc:27 lib/api.php:165 +#: lib/Block/forums.php:3 lib/Block/forums.php:28 +msgid "Forums" +msgstr "" + +#: config/prefs.php.dist:19 +msgid "Forums View" +msgstr "" + +#: rss/index.php:28 +#, php-format +msgid "Forums in %s" +msgstr "" + +#: lib/Messages.php:1545 +msgid "From" +msgstr "" + +#: templates/threads.html.php:44 templates/threads/threads.html.php:44 +msgid "Goto page:" +msgstr "" + +#: messages/index.php:158 messages/index.php:167 +msgid "Hide bodies" +msgstr "" + +#: lib/Messages.php:869 +msgid "Hot thread" +msgstr "" + +#: lib/Forms/Forum.php:41 +msgid "If selected users will be able to attach files to their messages." +msgstr "" + +#: messages/edit.php:115 +msgid "" +"Invalid parent message, you will be posting this message as a new thread." +msgstr "" + +#: lib/Forms/Forum.php:38 +msgid "Is this a moderated forum?" +msgstr "" + +#: lib/Forms/Search.php:43 +msgid "Keywords" +msgstr "" + +#: config/prefs.php.dist:81 +msgid "Last Message" +msgstr "" + +#: forums.php:54 lib/Block/forums.php:86 +msgid "Last Post" +msgstr "" + +#: threads.php:59 config/prefs.php.dist:118 +msgid "Last post" +msgstr "" + +#: owner.php:35 +#, php-format +msgid "Last posts in forums owned by %s" +msgstr "" + +#: lib/Messages.php:959 +msgid "Lock" +msgstr "" + +#: messages/index.php:126 +msgid "Lock thread" +msgstr "" + +#: messages/lock.php:47 +#, php-format +msgid "Locking thread \"%s\"" +msgstr "" + +#: lib/Agora.php:345 +msgid "Malformed avatar." +msgstr "" + +#: lib/Agora.php:368 +msgid "Malformed database entry." +msgstr "" + +#: scripts/phorum2agora.php:213 +msgid "" +"Mandatory arguments to long options are mandatory for short options too." +msgstr "" + +#: messages/merge.php:46 messages/merge.php:72 lib/Messages.php:970 +msgid "Merge" +msgstr "" + +#: messages/merge.php:45 +#, php-format +msgid "Merge \"%s\" with another thread" +msgstr "" + +#: lib/Messages.php:1558 +msgid "Message" +msgstr "" + +#: messages/abuse.php:77 +#, php-format +msgid "Message %s reported as abuse" +msgstr "" + +#: lib/Messages.php:522 +#, php-format +msgid "Message ID \"%d\" not found" +msgstr "" + +#: config/prefs.php.dist:41 +msgid "Message View" +msgstr "" + +#: messages/delete.php:64 lib/api.php:791 +msgid "Message deleted." +msgstr "" + +#: messages/delete.php:54 lib/api.php:796 +msgid "Message not deleted." +msgstr "" + +#: messages/edit.php:87 lib/api.php:685 +msgid "Message posted." +msgstr "" + +#: templates/messages/index.html.php:1 config/prefs.php.dist:80 +msgid "Messages" +msgstr "" + +#: moderate.php:81 templates/moderate.html.php:11 +msgid "Messages Awaiting Moderation" +msgstr "" + +#: lib/Messages.php:1856 +msgid "Moderate" +msgstr "" + +#: moderators.php:75 templates/messages/flat_thread.html.php:10 +#: templates/messages/flat.html.php:11 templates/messages/message.html.php:21 +#: lib/Tree/flat.php:117 +msgid "Moderator" +msgstr "" + +#: moderators.php:69 templates/forums.html.php:39 +#: templates/moderators.html.php:4 templates/moderators.html.php:10 +msgid "Moderators" +msgstr "" + +#: messages/move.php:46 messages/move.php:58 lib/Messages.php:966 +msgid "Move" +msgstr "" + +#: messages/move.php:45 +#, php-format +msgid "Move \"%s\" to another forum" +msgstr "" + +#: config/prefs.php.dist:10 +msgid "My Information" +msgstr "" + +#: editforum.php:25 +msgid "New Forum" +msgstr "" + +#: lib/Messages.php:1825 +msgid "New Post" +msgstr "" + +#: lib/Agora.php:251 +msgid "New Thread" +msgstr "" + +#: lib/Messages.php:870 +msgid "New posts" +msgstr "" + +#: config/prefs.php.dist:178 +msgid "No" +msgstr "" + +#: lib/Block/threads.php:118 +msgid "No available threads." +msgstr "" + +#: lib/Block/threads.php:97 +msgid "No forum selected" +msgstr "" + +#: templates/forums.html.php:60 +msgid "No forums have been created." +msgstr "" + +#: config/prefs.php.dist:198 +msgid "No graphical emoticons" +msgstr "" + +#: moderate.php:53 +msgid "No messages are waiting for moderation." +msgstr "" + +#: messages/abuse.php:38 +msgid "No moderators are associated with this forum." +msgstr "" + +#: templates/moderators.html.php:27 +msgid "No moderators have been created." +msgstr "" + +#: owner.php:48 templates/block/threads.html.php:32 +msgid "No threads" +msgstr "" + +#: messages/lock.php:50 +msgid "No, do not allow replies" +msgstr "" + +#: config/prefs.php.dist:103 +msgid "Number of forums to display on each page" +msgstr "" + +#: config/prefs.php.dist:190 +msgid "Number of message to display on each page" +msgstr "" + +#: config/prefs.php.dist:146 config/prefs.php.dist:267 +msgid "Number of messages to display on each page" +msgstr "" + +#: config/prefs.php.dist:137 +msgid "Number of views in 24hrs to trigger a 'hot-thread':" +msgstr "" + +#: lib/Block/forums.php:35 +msgid "Only display this many forums (0 to display all forums)" +msgstr "" + +#: lib/Block/threads.php:52 +msgid "Only display this many threads (0 to display all threads)" +msgstr "" + +#: lib/Forms/Forum.php:39 +msgid "Optional email address to recieve a copy of each posted message" +msgstr "" + +#: templates/forums.html.php:34 +msgid "Options" +msgstr "" + +#: lib/Messages.php:917 +#, php-format +msgid "Page %d" +msgstr "" + +#: lib/Forms/Forum.php:32 +msgid "Parent forum" +msgstr "" + +#: lib/Messages.php:1527 +msgid "Post" +msgstr "" + +#: lib/api.php:658 +msgid "Post a New Message" +msgstr "" + +#: messages/edit.php:70 +#, php-format +msgid "Post a New Message to \"%s\"" +msgstr "" + +#: messages/edit.php:68 messages/index.php:213 +#, php-format +msgid "Post a Reply to \"%s\"" +msgstr "" + +#: lib/Messages.php:1502 lib/Messages.php:1825 +msgid "Post message" +msgstr "" + +#: owner.php:63 forums.php:54 moderate.php:61 +#: templates/messages/flat_thread.html.php:7 messages/index.php:147 +#: lib/Comments.php:85 lib/api.php:479 lib/Block/threads.php:122 +#: lib/Block/forums.php:86 lib/Block/thread.php:82 lib/Tree/flat.php:112 +#: config/prefs.php.dist:82 config/prefs.php.dist:115 +#: config/prefs.php.dist:158 config/prefs.php.dist:246 +msgid "Posted by" +msgstr "" + +#: templates/messages/flat.html.php:9 messages/index.php:91 +#: lib/Messages.php:567 +#, php-format +msgid "Posted by %s on %s" +msgstr "" + +#: threads.php:59 forums.php:54 lib/Block/forums.php:86 +#: config/prefs.php.dist:116 +msgid "Posts" +msgstr "" + +#: lib/Messages.php:1550 +msgid "Quote" +msgstr "" + +#: messages/index.php:114 lib/Messages.php:939 +msgid "Reply" +msgstr "" + +#: lib/Messages.php:939 +msgid "Reply to message" +msgstr "" + +#: messages/abuse.php:46 messages/abuse.php:47 lib/Messages.php:945 +msgid "Report as abuse" +msgstr "" + +#: lib/Forms/Search.php:44 +msgid "Require all keywords?" +msgstr "" + +#: lib/Messages.php:1527 +msgid "Save" +msgstr "" + +#: lib/Forms/Search.php:57 +msgid "Search" +msgstr "" + +#: search.php:69 lib/Forms/Search.php:33 +msgid "Search Forums" +msgstr "" + +#: templates/search.html.php:5 +msgid "Search Results" +msgstr "" + +#: lib/Forms/Search.php:52 +msgid "Search in message contents?" +msgstr "" + +#: lib/Forms/Search.php:48 +msgid "Search in subjects?" +msgstr "" + +#: lib/Forms/Search.php:37 +msgid "Search in these forums" +msgstr "" + +#: config/prefs.php.dist:12 +msgid "Set the avatar image that is shown with your posts." +msgstr "" + +#: lib/Forms/Forum.php:38 +msgid "" +"Set this if you want all messages to be checked by a moderator before they " +"are posted." +msgstr "" + +#: config/prefs.php.dist:20 +msgid "Set your options for the forums view." +msgstr "" + +#: config/prefs.php.dist:42 +msgid "Set your options for the message view." +msgstr "" + +#: config/prefs.php.dist:34 config/prefs.php.dist:49 +msgid "Set your options for the single thread view." +msgstr "" + +#: config/prefs.php.dist:27 +msgid "Set your options for the threads view." +msgstr "" + +#: config/prefs.php.dist:199 +msgid "Show graphical emoticons" +msgstr "" + +#: lib/Block/thread.php:3 lib/Block/thread.php:52 +msgid "Single Thread" +msgstr "" + +#: config/prefs.php.dist:33 +msgid "Single Thread View" +msgstr "" + +#: lib/Agora.php:192 +msgid "Sort Ascending" +msgstr "" + +#: lib/Agora.php:192 +msgid "Sort Descending" +msgstr "" + +#: lib/Comments.php:65 +msgid "Sort by" +msgstr "" + +#: lib/Agora.php:200 lib/Agora.php:207 +#, php-format +msgid "Sort by %s" +msgstr "" + +#: lib/Comments.php:71 +msgid "Sort direction" +msgstr "" + +#: lib/Messages.php:1572 lib/Forms/Message.php:24 +msgid "Spam protection" +msgstr "" + +#: messages/split.php:46 messages/split.php:54 lib/Messages.php:975 +msgid "Split" +msgstr "" + +#: messages/split.php:45 +#, php-format +msgid "Split \"%s\"" +msgstr "" + +#: threads.php:59 +msgid "Started" +msgstr "" + +#: deleteforum.php:56 +msgid "Subforums" +msgstr "" + +#: threads.php:59 owner.php:63 moderate.php:61 messages/index.php:147 +#: lib/Comments.php:69 lib/Comments.php:83 lib/Messages.php:1552 +#: lib/Messages.php:1555 lib/api.php:477 lib/Block/threads.php:122 +#: lib/Block/thread.php:82 config/prefs.php.dist:114 config/prefs.php.dist:157 +#: config/prefs.php.dist:245 +msgid "Subject" +msgstr "" + +#: lib/Agora.php:229 +msgid "The VFS backend needs to be configured to enable attachment uploads." +msgstr "" + +#: config/prefs.php.dist:61 +msgid "The location of your avatar image." +msgstr "" + +#: lib/Block/forums.php:77 +msgid "There are no forums." +msgstr "" + +#: templates/threads.html.php:69 templates/threads/threads.html.php:69 +msgid "There are no threads in this forum." +msgstr "" + +#: lib/Messages.php:159 +msgid "This thread has been locked." +msgstr "" + +#: deleteforum.php:47 +msgid "This will delete the forum, any subforums and all relative messages." +msgstr "" + +#: messages/index.php:147 messages/index.php:159 lib/Comments.php:61 +#: lib/Block/thread.php:32 lib/Block/thread.php:82 config/prefs.php.dist:113 +#: config/prefs.php.dist:156 config/prefs.php.dist:236 +msgid "Thread" +msgstr "" + +#: messages/merge.php:77 +#, php-format +msgid "Thread %s merged with thread %s after message %s." +msgstr "" + +#: messages/move.php:63 +#, php-format +msgid "Thread %s moved to from forum %s to %s." +msgstr "" + +#: templates/messages/index.html.php:10 lib/Block/thread.php:89 +msgid "Thread List" +msgstr "" + +#: templates/messages/message.html.php:34 +msgid "Thread Summary" +msgstr "" + +#: messages/delete.php:69 +msgid "Thread deleted." +msgstr "" + +#: messages/index.php:205 messages/lock.php:62 +msgid "Thread locked." +msgstr "" + +#: messages/split.php:59 +#, php-format +msgid "Thread splitted by message %s." +msgstr "" + +#: messages/lock.php:64 +msgid "Thread unlocked." +msgstr "" + +#: forums.php:54 templates/threads.html.php:1 +#: templates/threads/threads.html.php:1 lib/Comments.php:77 +#: lib/Block/threads.php:3 lib/Block/threads.php:70 lib/Block/threads.php:76 +msgid "Threads" +msgstr "" + +#: config/prefs.php.dist:26 +msgid "Threads View" +msgstr "" + +#: lib/Block/threads.php:80 +#, php-format +msgid "Threads in \"%s\"" +msgstr "" + +#: threads.php:66 threads.php:79 rss/threads.php:57 +#, php-format +msgid "Threads in %s" +msgstr "" + +#: lib/Block/thread.php:70 +msgid "Unable to fetch selected thread." +msgstr "" + +#: lib/Block/threads.php:103 +msgid "Unable to fetch threads for selected forum." +msgstr "" + +#: lib/Messages.php:959 +msgid "Unlock" +msgstr "" + +#: messages/index.php:126 +msgid "Unlock thread" +msgstr "" + +#: messages/lock.php:48 lib/Forms/Forum.php:26 +msgid "Update" +msgstr "" + +#: scripts/phorum2agora.php:211 +#, php-format +msgid "Usage: %s [OPTIONS]..." +msgstr "" + +#: ban.php:64 +msgid "User" +msgstr "" + +#: lib/Comments.php:59 +msgid "View" +msgstr "" + +#: messages/index.php:184 +msgid "View bodies" +msgstr "" + +#: threads.php:59 +msgid "Views" +msgstr "" + +#: messages/merge.php:56 +msgid "With Thread: " +msgstr "" + +#: config/prefs.php.dist:179 +msgid "Yes" +msgstr "" + +#: messages/lock.php:50 +msgid "Yes, allow replies" +msgstr "" + +#: config/prefs.php.dist:180 +msgid "Yes, and don't thread them" +msgstr "" + +#: owner.php:19 +msgid "You are not authorised for this action." +msgstr "" + +#: lib/Messages.php:1719 +#, php-format +msgid "You don't have permission to access messages in forum %s." +msgstr "" + +#: messages/merge.php:37 messages/move.php:37 messages/lock.php:39 +#: messages/delete.php:39 messages/split.php:37 lib/Messages.php:588 +#: lib/Messages.php:766 lib/api.php:769 +#, php-format +msgid "You don't have permission to delete messages in forum %s." +msgstr "" + +#: messages/edit.php:38 messages/index.php:199 lib/Messages.php:164 +#: lib/api.php:636 +#, php-format +msgid "You don't have permission to post messages in forum %s." +msgstr "" + +#: lib/Messages.php:841 +#, php-format +msgid "You don't have permission to read messages in forum %s." +msgstr "" + +#: ban.php:29 +#, php-format +msgid "You don't have permissions to ban users from forum %s." +msgstr "" + +#: editforum.php:35 +#, php-format +msgid "You don't have permissions to create a new forum in %s" +msgstr "" + +#: deleteforum.php:26 +#, php-format +msgid "You don't have permissions to delete forums in %s" +msgstr "" + +#: editforum.php:31 +#, php-format +msgid "You don't have permissions to edit forum %s" +msgstr "" + +#: messages/edit.php:85 +msgid "" +"Your message has been enqueued and is awaiting moderation. It will become " +"visible after moderator approval." +msgstr "" + +#: lib/Agora.php:244 +msgid "_Forums" +msgstr "" + +#: lib/Agora.php:261 +msgid "_Moderate" +msgstr "" + +#: lib/Agora.php:265 +msgid "_Moderators" +msgstr "" + +#: lib/Agora.php:256 +msgid "_New Forum" +msgstr "" + +#: lib/Agora.php:269 +msgid "_Search" +msgstr "" + +#: lib/Agora.php:249 +msgid "_Threads" +msgstr "" + +#: templates/forums.html.php:51 templates/threads.html.php:60 +#: templates/threads/threads.html.php:60 +msgid "by" +msgstr "" + +#: lib/Messages.php:1665 +msgid "download" +msgstr "" + +#: templates/messages/flat_thread.html.php:8 lib/Tree/flat.php:113 +msgid "on: " +msgstr "" + +#: lib/Messages.php:1666 +#, php-format +msgid "size: %s" +msgstr "" + +#: lib/Messages.php:1666 +#, php-format +msgid "type: %s" +msgstr "" diff --git a/agora/po/de_DE.po b/agora/po/de_DE.po new file mode 100644 index 000000000..45e2975c2 --- /dev/null +++ b/agora/po/de_DE.po @@ -0,0 +1,1035 @@ +# German translations for Agora. +# Copyright 2003-2009 The Horde Project +# This file is distributed under the same license as the Agora package. +# Jan Schneider , 2003-2008. +# +# message: Beitrag +# thread: Thema +msgid "" +msgstr "" +"Project-Id-Version: Agora 0.1\n" +"Report-Msgid-Bugs-To: dev@lists.horde.org\n" +"POT-Creation-Date: 2008-08-01 10:44+0200\n" +"PO-Revision-Date: 2008-04-01 15:04+0200\n" +"Last-Translator: Jan Schneider \n" +"Language-Team: i18n@lists.horde.org\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ISO-8859-1\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: moderate.php:36 +#, php-format +msgid "%d messages was approved." +msgstr "%d Beiträge wurden freigegeben." + +#: moderate.php:42 +#, php-format +msgid "%d messages was deleted." +msgstr "%d Beiträge wurden gelöscht." + +#: scripts/phorum2agora.php:218 +msgid "-a, --agora_id[=aid] Agora forum id to save message to" +msgstr "" +"-a, --agora_id[=aid] ID des Forums in dem Beiträge gespeichert " +"werden\n" +" sollen." + +#: scripts/phorum2agora.php:221 +msgid "-c, --count[=messages] Number of messages to move at once" +msgstr "" +"-c, --count[=messages] Anzahl der Beiträge die auf einmal verschoben\n" +" werden sollen" + +#: scripts/phorum2agora.php:220 +msgid "" +"-f, --from[=offset] Offset from where to start to read messages" +msgstr "" +"-f, --from[=offset] Offset ab dem Beiträge gelesen werden sollen" + +#: scripts/phorum2agora.php:216 +msgid "-h, --help Show this help" +msgstr "-h, --help Diese Hilfe anzeigen" + +#: scripts/phorum2agora.php:217 +msgid "-p, --phorum_id[=pid] Phorum forum id to read message from" +msgstr "" +"-p, --phorum_id[=pid] Phorum Foren-ID von dem Beiträge gelesen " +"werden\n" +" sollen" + +#: scripts/phorum2agora.php:219 +msgid "-t, --phorum_table[=table] Phorum messages tablename" +msgstr "-t, --phorum_table[=table] Phorum Tabellenname für Beiträge" + +#: lib/api.php:854 +msgid "Add a comment" +msgstr "Kommentar hinzufügen" + +#: lib/api.php:164 +msgid "Admin" +msgstr "Administration" + +#: messages/merge.php:66 +msgid "After Message: " +msgstr "Nach Beitrag: " + +#: forums.php:72 +msgid "All Forums" +msgstr "Alle Foren" + +#: lib/Forms/Forum.php:40 +msgid "Allow attachments in this forum?" +msgstr "Anhänge in diesem Forum erlauben?" + +#: messages/lock.php:51 +msgid "Allow replies in this thread" +msgstr "Antworten zu diesem Thema zulassen" + +#: moderate.php:33 moderate.php:69 +msgid "Approve" +msgstr "Freigeben" + +#: lib/Comments.php:73 config/prefs.php.dist:92 config/prefs.php.dist:127 +#: config/prefs.php.dist:168 config/prefs.php.dist:256 +msgid "Ascending" +msgstr "Aufsteigend" + +#: lib/Messages.php:1512 +msgid "Attachment" +msgstr "Anhang" + +#: lib/Comments.php:68 lib/Forms/Search.php:55 +msgid "Author" +msgstr "Autor" + +#: config/prefs.php.dist:11 +msgid "Avatar" +msgstr "Avatar" + +#: config/prefs.php.dist:64 +#, php-format +msgid "" +"Avatars must be smaller than %s by %s pixels and less than %sKb in size." +msgstr "Avatare müssen kleiner als %s mal %s Pixel und kleiner als %sKB sein." + +#: ban.php:58 lib/Messages.php:1457 +msgid "Ban" +msgstr "Verbannen" + +#: templates/ban.html.php:10 +msgid "Banned" +msgstr "Verbannt" + +#: moderate.php:62 +msgid "Body" +msgstr "Text" + +#: deleteforum.php:45 messages/abuse.php:48 messages/abuse.php:56 +#: messages/merge.php:47 messages/move.php:47 messages/delete.php:49 +#: messages/split.php:47 lib/api.php:775 +msgid "Cancel" +msgstr "Abbrechen" + +#: lib/Messages.php:1870 +msgid "Cannot create a forum with an empty name." +msgstr "Foren mit leeren Namen können nicht erstellt werden." + +#: templates/prefs/avatarselect.inc:8 +msgid "Choose from a gallery of avatars: " +msgstr "Wählen Sie einen Avatar aus der Liste aus:" + +#: lib/Comments.php:81 lib/api.php:483 +msgid "Comments" +msgstr "Kommentare" + +#: rss/threads.php:54 +#, php-format +msgid "Comments on %s" +msgstr "Kommentar zu %s" + +#: config/prefs.php.dist:48 +msgid "Comments view" +msgstr "Kommentaranzeige" + +#: editforum.php:44 +#, php-format +msgid "Could not create the forum. %s" +msgstr "Forum konnte nicht erstellt werden. %s" + +#: deleteforum.php:66 +#, php-format +msgid "Could not delete the forum. %s" +msgstr "Forum konnte nicht gelöscht erstellt werden. %s" + +#: messages/delete.php:63 lib/api.php:758 lib/api.php:769 lib/api.php:783 +#, php-format +msgid "Could not delete the message. %s" +msgstr "Beitrag konnte nicht gelöscht werden. %s" + +#: threads.php:32 +#, php-format +msgid "Could not list threads. %s" +msgstr "Themen konnten nicht angezeigt werden. %s" + +#: messages/lock.php:60 +#, php-format +msgid "Could not lock the thread. %s" +msgstr "Das Thema konnte nicht gesperrt werden. %s" + +#: messages/abuse.php:31 messages/merge.php:31 messages/move.php:31 +#: messages/index.php:34 messages/lock.php:33 messages/delete.php:33 +#: messages/split.php:31 +#, php-format +msgid "Could not open the message. %s" +msgstr "Beitrag konnte nicht geöffnet werden. %s" + +#: messages/edit.php:31 messages/edit.php:83 lib/api.php:623 lib/api.php:676 +msgid "Could not post the message: " +msgstr "Beitrag konnte nicht gespeichert werden:" + +#: scripts/phorum2agora.php:65 +msgid "Couldn't read command-line options." +msgstr "Die Kommandozeilenparameter konnten nicht gelesen werden." + +#: lib/Forms/Forum.php:26 +msgid "Create" +msgstr "Erstellen" + +#: lib/Messages.php:1508 +msgid "Current attachment" +msgstr "Aktueller Anhang" + +#: owner.php:63 forums.php:55 moderate.php:62 messages/index.php:142 +#: lib/Comments.php:67 lib/Comments.php:87 lib/api.php:473 +#: lib/Block/threads.php:122 lib/Block/forums.php:86 lib/Block/thread.php:82 +#: config/prefs.php.dist:83 config/prefs.php.dist:117 +#: config/prefs.php.dist:159 config/prefs.php.dist:247 +msgid "Date" +msgstr "Datum" + +#: config/prefs.php.dist:248 +msgid "Default comments view sort:" +msgstr "Standard-Sortierreihenfolge der Kommentare:" + +#: config/prefs.php.dist:84 +msgid "Default forums view sort:" +msgstr "Standard-Sortierreihenfolge der Foren:" + +#: config/prefs.php.dist:94 config/prefs.php.dist:129 +#: config/prefs.php.dist:170 config/prefs.php.dist:258 +msgid "Default sorting direction:" +msgstr "Sortierrichtung:" + +#: config/prefs.php.dist:160 +msgid "Default thread view sort:" +msgstr "Standard-Sortierreihenfolge in Themen:" + +#: config/prefs.php.dist:119 +msgid "Default threads view sort:" +msgstr "Standard-Sortierreihenfolge der Themen:" + +#: deleteforum.php:45 deleteforum.php:63 ban.php:55 moderators.php:66 +#: moderate.php:39 moderate.php:69 messages/index.php:118 +#: messages/delete.php:49 messages/delete.php:54 lib/Messages.php:927 +#: lib/Messages.php:1763 lib/api.php:775 lib/api.php:780 +msgid "Delete" +msgstr "Löschen" + +#: messages/delete.php:48 lib/api.php:774 +#, php-format +msgid "Delete \"%s\" and all replies?" +msgstr "\"%s\" und alle Antworten löschen?" + +#: deleteforum.php:43 lib/Messages.php:1455 +msgid "Delete Forum" +msgstr "Forum löschen" + +#: lib/Messages.php:1763 +msgid "Delete forum" +msgstr "Forum löschen" + +#: lib/Messages.php:927 +msgid "Delete message" +msgstr "Beitrag löschen" + +#: lib/Messages.php:1507 +msgid "Delete the existing attachment?" +msgstr "Den aktuellen Anhang löschen?" + +#: lib/Comments.php:74 config/prefs.php.dist:93 config/prefs.php.dist:128 +#: config/prefs.php.dist:169 config/prefs.php.dist:257 +msgid "Descending" +msgstr "Absteigend" + +#: forums.php:55 +msgid "Description" +msgstr "Beschreibung" + +#: config/prefs.php.dist:18 config/prefs.php.dist:25 config/prefs.php.dist:32 +#: config/prefs.php.dist:40 config/prefs.php.dist:47 +msgid "Display Options" +msgstr "Anzeige-Einstellungen" + +#: config/prefs.php.dist:237 +msgid "Display full message bodies in the comments view?" +msgstr "Kompletten Beitragstext in der Kommentaransicht anzeigen?" + +#: config/prefs.php.dist:181 +msgid "Display full message bodies in the thread list view?" +msgstr "Kompletten Beitragstext in der Themenliste anzeigen?" + +#: config/prefs.php.dist:200 +msgid "Display graphical emoticons?" +msgstr "Emoticons anzeigen?" + +#: messages/index.php:115 lib/Messages.php:923 lib/Messages.php:1757 +msgid "Edit" +msgstr "Bearbeiten" + +#: editforum.php:25 lib/Messages.php:1452 +msgid "Edit Forum" +msgstr "Forum bearbeiten" + +#: lib/api.php:651 +msgid "Edit Message" +msgstr "Beitrag bearbeiten" + +#: messages/edit.php:70 +#, php-format +msgid "Edit Message in \"%s\"" +msgstr "Beitrag in \"%s\" bearbeiten" + +#: lib/api.php:852 +msgid "Edit a comment" +msgstr "Kommentar bearbeiten" + +#: lib/Messages.php:1757 +msgid "Edit forum" +msgstr "Forum bearbeiten" + +#: lib/Messages.php:923 +msgid "Edit message" +msgstr "Beitrag bearbeiten" + +#: lib/Forms/Forum.php:37 +msgid "Enter a brief description of this forum" +msgstr "Geben Sie eine kurze Beschreibung für dieses Forum ein" + +#: messages/index.php:163 lib/Comments.php:60 config/prefs.php.dist:235 +msgid "Flat" +msgstr "Flach" + +#: moderators.php:78 moderators.php:81 forums.php:55 moderate.php:62 +#: templates/moderators.html.php:8 messages/move.php:52 +#: lib/Block/threads.php:45 lib/Block/forums.php:86 config/prefs.php.dist:79 +msgid "Forum" +msgstr "Forum" + +#: lib/Messages.php:1675 lib/api.php:752 +#, php-format +msgid "Forum %s does not exist." +msgstr "Das Forum %s existiert nicht." + +#: editforum.php:47 +msgid "Forum Modified" +msgstr "Forum geändert" + +#: editforum.php:47 +msgid "Forum created." +msgstr "Forum erstellt." + +#: deleteforum.php:68 +msgid "Forum deleted." +msgstr "Forum gelöscht." + +#: deleteforum.php:49 templates/moderators.html.php:9 lib/Forms/Forum.php:29 +msgid "Forum name" +msgstr "Forumsname" + +#: deleteforum.php:71 +msgid "Forum not deleted." +msgstr "Forum nicht gelöscht." + +#: templates/forums.html.php:9 templates/common-header.inc:27 lib/api.php:165 +#: lib/Block/forums.php:3 lib/Block/forums.php:28 +msgid "Forums" +msgstr "Foren" + +#: config/prefs.php.dist:19 +msgid "Forums View" +msgstr "Forenansicht" + +#: rss/index.php:28 +#, php-format +msgid "Forums in %s" +msgstr "Foren in %s" + +#: lib/Messages.php:1489 +msgid "From" +msgstr "Von" + +#: templates/threads.html.php:44 +msgid "Goto page:" +msgstr "Zu Seite:" + +#: messages/index.php:153 messages/index.php:162 +msgid "Hide bodies" +msgstr "Beitragstexte ausblenden" + +#: lib/Messages.php:841 +msgid "Hot thread" +msgstr "\"Heißes\" Thema" + +#: lib/Forms/Forum.php:40 +msgid "If selected users will be able to attach files to their messages." +msgstr "Wenn markiert, können alle Benutzer Dateien an ihre Beiträge anhängen." + +#: messages/edit.php:112 +msgid "" +"Invalid parent message, you will be posting this message as a new thread." +msgstr "" +"Ungültiger Ursprungsbeitrag. Ihr Beitrag wird als neues Thema erstellt." + +#: lib/Forms/Forum.php:38 +msgid "Is this a moderated forum?" +msgstr "Ist dies ein moderiertes Forum?" + +#: lib/Forms/Search.php:43 +msgid "Keywords" +msgstr "Stichwörter" + +#: config/prefs.php.dist:81 +msgid "Last Message" +msgstr "Letzter Beitrag" + +#: forums.php:55 lib/Block/forums.php:86 +msgid "Last Post" +msgstr "Letzter Beitrag" + +#: threads.php:61 config/prefs.php.dist:118 +msgid "Last post" +msgstr "Letzter Beitrag" + +#: owner.php:35 +#, php-format +msgid "Last posts in forums owned by %s" +msgstr "Letzte Beiträge in Foren von %s" + +#: lib/Messages.php:931 +msgid "Lock" +msgstr "Sperren" + +#: messages/index.php:121 +msgid "Lock thread" +msgstr "Thema sperren" + +#: messages/lock.php:48 +#, php-format +msgid "Locking thread \"%s\"" +msgstr "Thema \"%s\" sperren" + +#: lib/Agora.php:347 +msgid "Malformed avatar." +msgstr "Ungültiger Avatar." + +#: lib/Agora.php:370 +msgid "Malformed database entry." +msgstr "Ungültiger Datenbankeintrag." + +#: scripts/phorum2agora.php:214 +msgid "" +"Mandatory arguments to long options are mandatory for short options too." +msgstr "" +"Pflichtwerte für lange Parameter sind auch für kurze Parameter verpflichtend." + +#: messages/merge.php:47 messages/merge.php:73 lib/Messages.php:942 +msgid "Merge" +msgstr "Zusammenfügen" + +#: messages/merge.php:46 +#, php-format +msgid "Merge \"%s\" with another thread" +msgstr "\"%s\" mit anderem Thema zusammenfügen" + +#: lib/Messages.php:1502 +msgid "Message" +msgstr "Beitrag" + +#: messages/abuse.php:79 +#, php-format +msgid "Message %s reported as abuse" +msgstr "Beitrag %s als Spam gemeldet" + +#: lib/Messages.php:503 +#, php-format +msgid "Message ID \"%d\" not found" +msgstr "Beitrags-ID \"%d\" nicht gefunden" + +#: config/prefs.php.dist:41 +msgid "Message View" +msgstr "Beitragsansicht" + +#: messages/delete.php:65 lib/api.php:785 +msgid "Message deleted." +msgstr "Beitrag gelöscht." + +#: messages/delete.php:55 lib/api.php:790 +msgid "Message not deleted." +msgstr "Der Beitrag wurde nicht gelöscht." + +#: messages/edit.php:85 lib/api.php:678 +msgid "Message posted." +msgstr "Beitrag gespeichert." + +#: templates/messages/index.html.php:1 config/prefs.php.dist:80 +msgid "Messages" +msgstr "Beiträge" + +#: moderate.php:82 templates/moderate.html.php:11 +msgid "Messages Awaiting Moderation" +msgstr "Zu moderierende Beiträge" + +#: lib/Messages.php:1782 +msgid "Moderate" +msgstr "Mäßig" + +#: moderators.php:76 templates/messages/flat_thread.html.php:10 +#: templates/messages/flat.html.php:26 templates/messages/message.html.php:21 +#: lib/Tree/flat.php:117 +msgid "Moderator" +msgstr "Moderator" + +#: moderators.php:70 templates/forums.html.php:39 +#: templates/moderators.html.php:4 templates/moderators.html.php:10 +msgid "Moderators" +msgstr "Moderatoren" + +#: messages/move.php:47 messages/move.php:59 lib/Messages.php:938 +msgid "Move" +msgstr "Verschieben" + +#: messages/move.php:46 +#, php-format +msgid "Move \"%s\" to another forum" +msgstr "\"%s\" in ein anderes Forum verschieben" + +#: config/prefs.php.dist:10 +msgid "My Information" +msgstr "Meine Informationen" + +#: editforum.php:25 +msgid "New Forum" +msgstr "Neues Forum" + +#: lib/Messages.php:1752 +msgid "New Post" +msgstr "Neuer Beitrag" + +#: lib/Agora.php:253 +msgid "New Thread" +msgstr "Neues Thema" + +#: lib/Messages.php:842 +msgid "New posts" +msgstr "Neue Beiträge" + +#: config/prefs.php.dist:178 +msgid "No" +msgstr "Nein" + +#: lib/Block/threads.php:118 +msgid "No available threads." +msgstr "Keine Themen verfügbar." + +#: lib/Block/threads.php:97 +msgid "No forum selected" +msgstr "Kein Forum ausgewählt." + +#: templates/forums.html.php:60 +msgid "No forums have been created." +msgstr "Es wurden keine Foren erstellt." + +#: config/prefs.php.dist:198 +msgid "No graphical emoticons" +msgstr "Emoticons nicht anzeigen" + +#: moderate.php:54 +msgid "No messages are waiting for moderation." +msgstr "Keine Beiträge zu moderieren." + +#: messages/abuse.php:39 +msgid "No moderators are associated with this forum." +msgstr "Diesem Forum sind keine Moderatoren zugeordnet." + +#: templates/moderators.html.php:27 +msgid "No moderators have been created." +msgstr "Es wurden keine Moderatoren angelegt." + +#: owner.php:48 templates/block/threads.html.php:32 +msgid "No threads" +msgstr "Keine Themen" + +#: messages/lock.php:51 +msgid "No, do not allow replies" +msgstr "Nein, Antworten nicht zulassen" + +#: config/prefs.php.dist:103 +msgid "Number of forums to display on each page" +msgstr "Anzahl der Foren pro Seite" + +#: config/prefs.php.dist:190 +msgid "Number of message to display on each page" +msgstr "Anzahl der Beiträge pro Seite" + +#: config/prefs.php.dist:146 config/prefs.php.dist:267 +msgid "Number of messages to display on each page" +msgstr "Anzahl der Beiträge pro Seite" + +#: config/prefs.php.dist:137 +msgid "Number of views in 24hrs to trigger a 'hot-thread':" +msgstr "" +"Anzahl der Seitenaufrufe innerhalb von 24 Stunden, um ein Thema als \"heiß\" " +"zu markieren:" + +#: lib/Block/forums.php:35 +msgid "Only display this many forums (0 to display all forums)" +msgstr "Maximal so viele Foren anzeigen (0 um alle Foren anzuzeigen)" + +#: lib/Block/threads.php:52 +msgid "Only display this many threads (0 to display all threads)" +msgstr "Maximal so viele Themen anzeigen (0 um alle Themen anzuzeigen)" + +#: templates/forums.html.php:34 +msgid "Options" +msgstr "Einstellungen" + +#: lib/Messages.php:889 +#, php-format +msgid "Page %d" +msgstr "Seite %d" + +#: lib/Forms/Forum.php:32 +msgid "Parent forum" +msgstr "Übergeordnetes Forum" + +#: lib/Messages.php:1471 +msgid "Post" +msgstr "Abschicken" + +#: lib/api.php:651 +msgid "Post a New Message" +msgstr "Neuen Beitrag erstellen" + +#: messages/edit.php:71 +#, php-format +msgid "Post a New Message to \"%s\"" +msgstr "Neuen Beitrag in \"%s\" erstellen" + +#: messages/edit.php:69 messages/index.php:208 +#, php-format +msgid "Post a Reply to \"%s\"" +msgstr "Antwort auf \"%s\" schreiben" + +#: lib/Messages.php:1447 lib/Messages.php:1752 +msgid "Post message" +msgstr "Neuer Beitrag" + +#: owner.php:63 forums.php:55 moderate.php:62 +#: templates/messages/flat_thread.html.php:7 +#: templates/messages/flat.html.php:22 messages/index.php:142 +#: lib/Comments.php:85 lib/api.php:471 lib/Block/threads.php:122 +#: lib/Block/forums.php:86 lib/Block/thread.php:82 lib/Tree/flat.php:112 +#: config/prefs.php.dist:82 config/prefs.php.dist:115 +#: config/prefs.php.dist:158 config/prefs.php.dist:246 +msgid "Posted by" +msgstr "Geschrieben von" + +#: messages/index.php:86 lib/Messages.php:548 +#, php-format +msgid "Posted by %s on %s" +msgstr "Geschrieben von %s am %s" + +#: threads.php:61 forums.php:55 lib/Block/forums.php:86 +#: config/prefs.php.dist:116 +msgid "Posts" +msgstr "Beiträge" + +#: lib/Messages.php:1494 +msgid "Quote" +msgstr "Zitieren" + +#: messages/index.php:109 lib/Messages.php:911 +msgid "Reply" +msgstr "Antworten" + +#: lib/Messages.php:911 +msgid "Reply to message" +msgstr "Beitrag beantworten" + +#: messages/abuse.php:47 messages/abuse.php:48 lib/Messages.php:917 +msgid "Report as abuse" +msgstr "Missbrauch melden" + +#: lib/Forms/Search.php:44 +msgid "Require all keywords?" +msgstr "Nach allen Wörtern suchen?" + +#: lib/Messages.php:1471 +msgid "Save" +msgstr "Speichern" + +#: lib/Forms/Search.php:57 +msgid "Search" +msgstr "Suche" + +#: search.php:70 lib/Forms/Search.php:33 +msgid "Search Forums" +msgstr "Foren durchsuchen" + +#: templates/search.html.php:5 +msgid "Search Results" +msgstr "Suchergebnisse" + +#: lib/Forms/Search.php:52 +msgid "Search in message contents?" +msgstr "In Beiträgen suchen?" + +#: lib/Forms/Search.php:48 +msgid "Search in subjects?" +msgstr "In Betreffs suchen?" + +#: lib/Forms/Search.php:37 +msgid "Search in these forums" +msgstr "Diese Foren durchsuchen" + +#: config/prefs.php.dist:12 +msgid "Set the avatar image that is shown with your posts." +msgstr "" +"Legen Sie das Avatarbild fest, das neben Ihren Beiträgen angezeigt wird." + +#: lib/Forms/Forum.php:38 +msgid "" +"Set this if you want all messages to be checked by a moderator before they " +"are posted." +msgstr "" +"Markieren Sie diese Einstellung, wenn alle Beiträge von einem Moderator " +"kontrolliert werden sollen, bevor sie erscheinen." + +#: config/prefs.php.dist:20 +msgid "Set your options for the forums view." +msgstr "Legen Sie Ihre Einstellungen für die Forenansicht fest." + +#: config/prefs.php.dist:42 +msgid "Set your options for the message view." +msgstr "Legen Sie Ihre Einstellungen für die Beitragsansicht fest." + +#: config/prefs.php.dist:34 config/prefs.php.dist:49 +msgid "Set your options for the single thread view." +msgstr "Legen Sie Ihre Einstellungen für die Ansicht einzelner Themen fest." + +#: config/prefs.php.dist:27 +msgid "Set your options for the threads view." +msgstr "Legen Sie Ihre Einstellungen für die Themenansicht fest." + +#: config/prefs.php.dist:199 +msgid "Show graphical emoticons" +msgstr "Emoticons anzeigen" + +#: lib/Block/thread.php:3 lib/Block/thread.php:52 +msgid "Single Thread" +msgstr "Einzelnes Thema" + +#: config/prefs.php.dist:33 +msgid "Single Thread View" +msgstr "Ansicht einzelner Themen" + +#: lib/Agora.php:192 +msgid "Sort Ascending" +msgstr "Aufsteigend sortieren" + +#: lib/Agora.php:192 +msgid "Sort Descending" +msgstr "Absteigend sortieren" + +#: lib/Comments.php:65 +msgid "Sort by" +msgstr "Sortieren nach" + +#: lib/Agora.php:200 lib/Agora.php:207 +#, php-format +msgid "Sort by %s" +msgstr "Sortieren nach %s" + +#: lib/Comments.php:71 +msgid "Sort direction" +msgstr "Sortierrichtung" + +#: lib/Messages.php:1516 lib/Forms/Message.php:24 +msgid "Spam protection" +msgstr "Spamschutz" + +#: messages/split.php:47 messages/split.php:55 lib/Messages.php:947 +msgid "Split" +msgstr "Teilen" + +#: messages/split.php:46 +#, php-format +msgid "Split \"%s\"" +msgstr "\"%s\" teilen" + +#: threads.php:61 +msgid "Started" +msgstr "Erster" + +#: deleteforum.php:57 +msgid "Subforums" +msgstr "Unterforen" + +#: threads.php:61 owner.php:63 moderate.php:62 messages/index.php:142 +#: lib/Comments.php:69 lib/Comments.php:83 lib/Messages.php:1496 +#: lib/Messages.php:1499 lib/api.php:469 lib/Block/threads.php:122 +#: lib/Block/thread.php:82 config/prefs.php.dist:114 config/prefs.php.dist:157 +#: config/prefs.php.dist:245 +msgid "Subject" +msgstr "Betreff" + +#: lib/Agora.php:229 +msgid "The VFS backend needs to be configured to enable attachment uploads." +msgstr "" +"Das VFS-Backend muss konfiguriert sein, um das Hochladen von Dateien zu " +"erlauben." + +#: config/prefs.php.dist:61 +msgid "The location of your avatar image." +msgstr "Der Ort Ihres Avatarbildes." + +#: lib/Block/forums.php:77 +msgid "There are no forums." +msgstr "Keine Foren gefunden." + +#: templates/threads.html.php:69 +msgid "There are no threads in this forum." +msgstr "In diesem Forum befinden sich noch keine Beiträge." + +#: lib/Messages.php:162 +msgid "This thread has been locked." +msgstr "Dieses Thema wurde geschlossen." + +#: deleteforum.php:48 +msgid "This will delete the forum, any subforums and all relative messages." +msgstr "" +"Damit wird das Forum, alle Unterforen und alle dazugehörigen Beiträge " +"gelöscht." + +#: messages/index.php:142 messages/index.php:154 lib/Comments.php:61 +#: lib/Block/thread.php:32 lib/Block/thread.php:82 config/prefs.php.dist:113 +#: config/prefs.php.dist:156 config/prefs.php.dist:236 +msgid "Thread" +msgstr "Thema" + +#: messages/merge.php:78 +#, php-format +msgid "Thread %s merged with thread %s after message %s." +msgstr "Thema %s mit Thema %s nach Beitrag %s zusammengefügt." + +#: messages/move.php:64 +#, php-format +msgid "Thread %s moved to from forum %s to %s." +msgstr "Thema %s von Forum %s nach %s verschoben." + +#: templates/messages/index.html.php:10 lib/Block/thread.php:89 +msgid "Thread List" +msgstr "Themenliste" + +#: templates/messages/message.html.php:34 +msgid "Thread Summary" +msgstr "Themenübersicht" + +#: messages/delete.php:70 +msgid "Thread deleted." +msgstr "Thema gelöscht." + +#: messages/index.php:200 messages/lock.php:63 +msgid "Thread locked." +msgstr "Thema gesperrt." + +#: messages/split.php:60 +#, php-format +msgid "Thread splitted by message %s." +msgstr "Thema ab Beitrag %s geteilt." + +#: messages/lock.php:65 +msgid "Thread unlocked." +msgstr "Thema freigegeben." + +#: forums.php:55 templates/threads.html.php:1 lib/Comments.php:77 +#: lib/Block/threads.php:3 lib/Block/threads.php:70 lib/Block/threads.php:76 +msgid "Threads" +msgstr "Themen" + +#: config/prefs.php.dist:26 +msgid "Threads View" +msgstr "Themenansicht" + +#: lib/Block/threads.php:80 +#, php-format +msgid "Threads in \"%s\"" +msgstr "Themen in \"%s\"" + +#: threads.php:68 threads.php:81 rss/threads.php:48 +#, php-format +msgid "Threads in %s" +msgstr "Themen in %s" + +#: lib/Block/thread.php:70 +msgid "Unable to fetch selected thread." +msgstr "Das ausgewählte Thema konnte nicht gelesen werden." + +#: lib/Block/threads.php:103 +msgid "Unable to fetch threads for selected forum." +msgstr "Die Themen für das ausgewählte Forum konnten nicht gelesen werden." + +#: lib/Messages.php:931 +msgid "Unlock" +msgstr "Freigeben" + +#: messages/index.php:121 +msgid "Unlock thread" +msgstr "Thema freigeben" + +#: messages/lock.php:49 lib/Forms/Forum.php:26 +msgid "Update" +msgstr "Aktualisierung" + +#: scripts/phorum2agora.php:212 +#, php-format +msgid "Usage: %s [OPTIONS]..." +msgstr "Aufruf: %s [OPTIONEN]..." + +#: ban.php:65 +msgid "User" +msgstr "Benutzer" + +#: lib/Comments.php:59 +msgid "View" +msgstr "Anzeigen" + +#: messages/index.php:179 +msgid "View bodies" +msgstr "Beitragstexte anzeigen" + +#: threads.php:61 +msgid "Views" +msgstr "Gelesen" + +#: messages/merge.php:57 +msgid "With Thread: " +msgstr "Mit Thema: " + +#: config/prefs.php.dist:179 +msgid "Yes" +msgstr "Ja" + +#: messages/lock.php:51 +msgid "Yes, allow replies" +msgstr "Ja, Antworten zulassen" + +#: config/prefs.php.dist:180 +msgid "Yes, and don't thread them" +msgstr "Ja, ohne einzurücken" + +#: owner.php:19 +msgid "You are not authorised for this action." +msgstr "Sie sind zu dieser Aktion nicht autorisiert." + +#: lib/Messages.php:1660 +#, php-format +msgid "You don't have permission to access messages in forum %s." +msgstr "Sie haben nicht genügend Rechte, um Beiträge im Forum %s anzuzeigen." + +#: messages/merge.php:38 messages/move.php:38 messages/lock.php:40 +#: messages/delete.php:40 messages/split.php:38 lib/Messages.php:569 +#: lib/Messages.php:738 lib/api.php:763 +#, php-format +msgid "You don't have permission to delete messages in forum %s." +msgstr "Sie haben nicht genügend Rechte, um Beiträge im Forum %s zu löschen." + +#: messages/edit.php:39 messages/index.php:194 lib/Messages.php:167 +#: lib/api.php:629 +#, php-format +msgid "You don't have permission to post messages in forum %s." +msgstr "Sie haben nicht genügend Rechte, um Beiträge im Forum %s zu erstellen." + +#: lib/Messages.php:813 +#, php-format +msgid "You don't have permission to read messages in forum %s." +msgstr "Sie haben nicht genügend Rechte, um Beiträge im Forum %s zu lesen." + +#: ban.php:30 +#, php-format +msgid "You don't have permissions to ban users from forum %s." +msgstr "" +"Sie haben nicht genügend Rechte, um Benutzer vom Forum %s zu verbannen." + +#: editforum.php:35 +#, php-format +msgid "You don't have permissions to create a new forum in %s" +msgstr "Sie haben nicht genügend Rechte, um ein neues Forum in %s zu erstellen" + +#: deleteforum.php:27 +#, php-format +msgid "You don't have permissions to delete forums in %s" +msgstr "Sie haben nicht genügend Rechte, um Foren in %s zu löschen" + +#: editforum.php:31 +#, php-format +msgid "You don't have permissions to edit forum %s" +msgstr "Sie haben nicht genügend Rechte, um Forum %s zu bearbeiten" + +#: lib/Agora.php:246 +msgid "_Forums" +msgstr "_Foren" + +#: lib/Agora.php:263 +msgid "_Moderate" +msgstr "_Moderieren" + +#: lib/Agora.php:267 +msgid "_Moderators" +msgstr "_Moderatoren" + +#: lib/Agora.php:258 +msgid "_New Forum" +msgstr "_Neues Forum" + +#: lib/Agora.php:271 +msgid "_Search" +msgstr "_Suche" + +#: lib/Agora.php:251 +msgid "_Threads" +msgstr "_Themen" + +#: templates/forums.html.php:51 templates/threads.html.php:60 +msgid "by" +msgstr "von" + +#: lib/Messages.php:1609 +msgid "download" +msgstr "Herunterladen" + +#: templates/messages/flat_thread.html.php:8 +#: templates/messages/flat.html.php:23 lib/Tree/flat.php:113 +msgid "on: " +msgstr "am: " + +#: lib/Messages.php:1610 +#, php-format +msgid "size: %s" +msgstr "Größe: %s" + +#: lib/Messages.php:1610 +#, php-format +msgid "type: %s" +msgstr "Typ: %s" diff --git a/agora/po/es_ES.po b/agora/po/es_ES.po new file mode 100644 index 000000000..0f2c83586 --- /dev/null +++ b/agora/po/es_ES.po @@ -0,0 +1,1028 @@ +# Spanish translations for agora package +# Traducciones al español para el paquete agora. +# Copyright 2008-2009 The Horde Project +# This file is distributed under the same license as the agora package. +# Automatically generated, 2008. +# +msgid "" +msgstr "" +"Project-Id-Version: Agora 1.0-cvs\n" +"Report-Msgid-Bugs-To: dev@lists.horde.org\n" +"POT-Creation-Date: 2008-03-17 11:11+0100\n" +"PO-Revision-Date: 2008-03-17 11:11+0100\n" +"Last-Translator: Manuel P. Ayala \n" +"Language-Team: i18n@lists.horde.org\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ISO-8859-1\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: moderate.php:36 +#, php-format +msgid "%d messages was approved." +msgstr "Se aprobaron %d mensajes." + +#: moderate.php:42 +#, php-format +msgid "%d messages was deleted." +msgstr "Se eliminaron %d mensajes." + +#: scripts/phorum2agora.php:218 +msgid "-a, --agora_id[=aid] Agora forum id to save message to" +msgstr "" +"-a, --agora_id[=aid] if de foro de Agora en el que guardar el mensaje" + +#: scripts/phorum2agora.php:221 +msgid "-c, --count[=messages] Number of messages to move at once" +msgstr "-c, --count[=messages] Cantidad de mensajes a trasladar a la vez" + +#: scripts/phorum2agora.php:220 +msgid "" +"-f, --from[=offset] Offset from where to start to read messages" +msgstr "" +"-f, --from[=offset] Desplazamiento a partir del que empezar a leer " +"mensajes" + +#: scripts/phorum2agora.php:216 +msgid "-h, --help Show this help" +msgstr "-h, --help Muestra esta ayuda" + +#: scripts/phorum2agora.php:217 +msgid "-p, --phorum_id[=pid] Phorum forum id to read message from" +msgstr "" +"-p, --phorum_id[=pid] id de foro de Phorum del que leer los mensajes" + +#: scripts/phorum2agora.php:219 +msgid "-t, --phorum_table[=table] Phorum messages tablename" +msgstr "-t, --phorum_table[=table] nombre de tabla de mensajes de Phorum" + +#: lib/api.php:817 +msgid "Add a comment" +msgstr "Añadir comentario" + +#: lib/api.php:153 +msgid "Admin" +msgstr "Administrar" + +#: messages/merge.php:66 +msgid "After Message: " +msgstr "Mensaje posterior: " + +#: forums.php:72 +msgid "All Forums" +msgstr "Todos los foros" + +#: lib/Forms/Forum.php:40 +msgid "Allow attachments in this forum?" +msgstr "¿Permitir adjuntos en este foro?" + +#: messages/lock.php:51 +msgid "Allow replies in this thread" +msgstr "Permitir respuestas en esta conversación" + +#: moderate.php:33 moderate.php:69 +msgid "Approve" +msgstr "Aprobar" + +#: lib/Comments.php:73 config/.bak/prefs.php.dist:92 +#: config/.bak/prefs.php.dist:127 config/.bak/prefs.php.dist:168 +#: config/.bak/prefs.php.dist:256 +msgid "Ascending" +msgstr "Ascendente" + +#: lib/Messages.php:1512 +msgid "Attachment" +msgstr "Adjunto" + +#: lib/Comments.php:68 lib/Forms/Search.php:55 +msgid "Author" +msgstr "Autor" + +#: config/.bak/prefs.php.dist:11 +msgid "Avatar" +msgstr "Imagen personal" + +#: config/.bak/prefs.php.dist:64 +#, php-format +msgid "" +"Avatars must be smaller than %s by %s pixels and less than %sKb in size." +msgstr "" +"Las imágenes personales tienen que medir menos de %s por %s píxeles y tener " +"un tamaño menor de %sKb." + +#: ban.php:58 lib/Messages.php:1457 +msgid "Ban" +msgstr "Prohibir" + +#: templates/forums/ban.php:10 +msgid "Banned" +msgstr "Prohibido" + +#: moderate.php:62 +msgid "Body" +msgstr "Cuerpo" + +#: deleteforum.php:45 messages/delete.php:49 messages/move.php:47 +#: messages/merge.php:47 messages/split.php:47 messages/abuse.php:48 +#: messages/abuse.php:56 lib/api.php:738 +msgid "Cancel" +msgstr "Cancelar" + +#: lib/Messages.php:1870 +msgid "Cannot create a forum with an empty name." +msgstr "No se puede crear un foro con un nombre en blanco." + +#: templates/prefs/avatarselect.inc:8 +msgid "Choose from a gallery of avatars: " +msgstr "Elija de una galería de imágenes personales: " + +#: lib/api.php:446 lib/Comments.php:81 +msgid "Comments" +msgstr "Comentarios" + +#: rss/threads.php:54 +#, php-format +msgid "Comments on %s" +msgstr "Comentarios en %s" + +#: config/.bak/prefs.php.dist:48 +msgid "Comments view" +msgstr "Vista de comentarios" + +#: editforum.php:44 +#, php-format +msgid "Could not create the forum. %s" +msgstr "No se puede crear el foro. %s" + +#: deleteforum.php:66 +#, php-format +msgid "Could not delete the forum. %s" +msgstr "No se puede eliminar el foro. %s" + +#: messages/delete.php:63 lib/api.php:721 lib/api.php:732 lib/api.php:746 +#, php-format +msgid "Could not delete the message. %s" +msgstr "No se puede eliminar el mensaje. %s" + +#: threads.php:32 +#, php-format +msgid "Could not list threads. %s" +msgstr "No se pueden listar las conversaciones. %s" + +#: messages/lock.php:60 +#, php-format +msgid "Could not lock the thread. %s" +msgstr "No se puede bloquear la conversación. %s" + +#: messages/index.php:34 messages/delete.php:33 messages/move.php:31 +#: messages/merge.php:31 messages/split.php:31 messages/lock.php:33 +#: messages/abuse.php:31 +#, php-format +msgid "Could not open the message. %s" +msgstr "No se puede abrir el mensaje. %s" + +#: messages/edit.php:31 messages/edit.php:83 lib/api.php:586 lib/api.php:639 +msgid "Could not post the message: " +msgstr "No se pudo enviar el mensaje: " + +#: scripts/phorum2agora.php:65 +msgid "Couldn't read command-line options." +msgstr "No se pudieron lees las opciones de línea de comandos." + +#: lib/Forms/Forum.php:26 +msgid "Create" +msgstr "Crear" + +#: lib/Messages.php:1508 +msgid "Current attachment" +msgstr "Adjunto actual" + +#: forums.php:55 moderate.php:62 messages/index.php:146 lib/api.php:436 +#: lib/Comments.php:67 lib/Comments.php:87 lib/Block/forums.php:86 +#: lib/Block/threads.php:122 lib/Block/thread.php:82 +#: config/.bak/prefs.php.dist:83 config/.bak/prefs.php.dist:117 +#: config/.bak/prefs.php.dist:159 config/.bak/prefs.php.dist:247 +msgid "Date" +msgstr "Fecha" + +#: config/.bak/prefs.php.dist:248 +msgid "Default comments view sort:" +msgstr "Clasificación por omisión de la vista de comentarios:" + +#: config/.bak/prefs.php.dist:84 +msgid "Default forums view sort:" +msgstr "Clasificación por omisión de la vista de foros:" + +#: config/.bak/prefs.php.dist:94 config/.bak/prefs.php.dist:129 +#: config/.bak/prefs.php.dist:170 config/.bak/prefs.php.dist:258 +msgid "Default sorting direction:" +msgstr "Sentido de clasificación por omisión:" + +#: config/.bak/prefs.php.dist:160 +msgid "Default thread view sort:" +msgstr "Clasificación por omisión de la vista de conversaciones:" + +#: config/.bak/prefs.php.dist:119 +msgid "Default threads view sort:" +msgstr "Clasificación por omisión de la vista de conversaciones:" + +#: deleteforum.php:45 deleteforum.php:63 ban.php:55 moderators.php:66 +#: moderate.php:39 moderate.php:69 messages/index.php:122 +#: messages/delete.php:49 messages/delete.php:54 lib/api.php:738 +#: lib/api.php:743 lib/Messages.php:927 lib/Messages.php:1763 +msgid "Delete" +msgstr "Eliminar" + +#: messages/delete.php:48 lib/api.php:737 +#, php-format +msgid "Delete \"%s\" and all replies?" +msgstr "¿Eliminar \"%s\" y todas las respuestas?" + +#: deleteforum.php:43 lib/Messages.php:1455 +msgid "Delete Forum" +msgstr "Eliminar foro" + +#: lib/Messages.php:1763 +msgid "Delete forum" +msgstr "Eliminar foro" + +#: lib/Messages.php:927 +msgid "Delete message" +msgstr "Eliminar mensaje" + +#: lib/Messages.php:1507 +msgid "Delete the existing attachment?" +msgstr "¿Eliminar el adjunto existente?" + +#: lib/Comments.php:74 config/.bak/prefs.php.dist:93 +#: config/.bak/prefs.php.dist:128 config/.bak/prefs.php.dist:169 +#: config/.bak/prefs.php.dist:257 +msgid "Descending" +msgstr "Descendente" + +#: forums.php:55 +msgid "Description" +msgstr "Descripción" + +#: config/.bak/prefs.php.dist:18 config/.bak/prefs.php.dist:25 +#: config/.bak/prefs.php.dist:32 config/.bak/prefs.php.dist:40 +#: config/.bak/prefs.php.dist:47 +msgid "Display Options" +msgstr "Opciones de Visualización" + +#: config/.bak/prefs.php.dist:237 +msgid "Display full message bodies in the comments view?" +msgstr "¿Mostrar los mensajes completos en la vista de comentarios?" + +#: config/.bak/prefs.php.dist:181 +msgid "Display full message bodies in the thread list view?" +msgstr "¿Mostrar los mensajes completos en el listado de conversaciones?" + +#: config/.bak/prefs.php.dist:200 +msgid "Display graphical emoticons?" +msgstr "¿Mostrar emoticones gráficos?" + +#: messages/index.php:119 lib/Messages.php:923 lib/Messages.php:1757 +msgid "Edit" +msgstr "Modificar" + +#: editforum.php:25 lib/Messages.php:1452 +msgid "Edit Forum" +msgstr "Modificar foro" + +#: lib/api.php:614 +msgid "Edit Message" +msgstr "Modificar mensaje" + +#: messages/edit.php:70 +#, php-format +msgid "Edit Message in \"%s\"" +msgstr "Modificar mensaje en \"%s\"" + +#: lib/api.php:815 +msgid "Edit a comment" +msgstr "Modificar un comentario" + +#: lib/Messages.php:1757 +msgid "Edit forum" +msgstr "Modificar foro" + +#: lib/Messages.php:923 +msgid "Edit message" +msgstr "Modificar mensaje" + +#: lib/Forms/Forum.php:37 +msgid "Enter a brief description of this forum" +msgstr "Introduzca una descripción breve del foro" + +#: messages/index.php:168 lib/Comments.php:60 config/.bak/prefs.php.dist:235 +msgid "Flat" +msgstr "Vista plana" + +#: forums.php:55 moderators.php:78 moderators.php:81 moderate.php:62 +#: messages/move.php:52 templates/moderators/moderators.php:8 +#: lib/Block/forums.php:86 lib/Block/threads.php:45 +#: config/.bak/prefs.php.dist:79 +msgid "Forum" +msgstr "Foro" + +#: lib/api.php:715 lib/Messages.php:1675 +#, php-format +msgid "Forum %s does not exist." +msgstr "El foro %s no existe." + +#: editforum.php:47 +msgid "Forum Modified" +msgstr "Se ha modificado el foro" + +#: editforum.php:47 +msgid "Forum created." +msgstr "Se ha creado el foro." + +#: deleteforum.php:68 +msgid "Forum deleted." +msgstr "Se ha eliminado el foro." + +#: deleteforum.php:49 templates/moderators/moderators.php:9 +#: lib/Forms/Forum.php:29 +msgid "Forum name" +msgstr "Nombre del foro" + +#: deleteforum.php:71 +msgid "Forum not deleted." +msgstr "No se ha eliminado el foro." + +#: templates/common-header.inc:27 templates/forums/forums.php:9 +#: lib/api.php:154 lib/Block/forums.php:3 lib/Block/forums.php:28 +msgid "Forums" +msgstr "Foros" + +#: config/.bak/prefs.php.dist:19 +msgid "Forums View" +msgstr "Vista de foros" + +#: rss/index.php:28 +#, php-format +msgid "Forums in %s" +msgstr "Foros de %s" + +#: lib/Messages.php:1489 +msgid "From" +msgstr "De" + +#: templates/threads/threads.php:44 +msgid "Goto page:" +msgstr "Ir a la página:" + +#: messages/index.php:158 messages/index.php:167 +msgid "Hide bodies" +msgstr "Ocultar cuerpos" + +#: lib/Messages.php:841 +msgid "Hot thread" +msgstr "Conversación caliente" + +#: lib/Forms/Forum.php:40 +msgid "If selected users will be able to attach files to their messages." +msgstr "Si se selecciona los usuarios podrán adjuntar archivos a sus mensajes." + +#: messages/edit.php:112 +msgid "" +"Invalid parent message, you will be posting this message as a new thread." +msgstr "" +"Mensaje padre no válido, estará enviando este mensaje como una conversación " +"nueva." + +#: lib/Forms/Forum.php:38 +msgid "Is this a moderated forum?" +msgstr "¿El foro está moderado?" + +#: lib/Forms/Search.php:43 +msgid "Keywords" +msgstr "Palabras clave" + +#: config/.bak/prefs.php.dist:81 +msgid "Last Message" +msgstr "Último mensaje" + +#: forums.php:55 lib/Block/forums.php:86 +msgid "Last Post" +msgstr "Último envío" + +#: threads.php:61 config/.bak/prefs.php.dist:118 +msgid "Last post" +msgstr "Último envío" + +#: lib/Messages.php:931 +msgid "Lock" +msgstr "Bloquear" + +#: messages/index.php:125 +msgid "Lock thread" +msgstr "Bloquear conversación" + +#: messages/lock.php:48 +#, php-format +msgid "Locking thread \"%s\"" +msgstr "Bloqueando conversación \"%s\"" + +#: lib/Agora.php:347 +msgid "Malformed avatar." +msgstr "Imagen personal defectuosa." + +#: lib/Agora.php:370 +msgid "Malformed database entry." +msgstr "Entrada de base de datos defectuosa." + +#: scripts/phorum2agora.php:214 +msgid "" +"Mandatory arguments to long options are mandatory for short options too." +msgstr "" +"Los argumentos requeridos de las opciones extendidas también son requeridos " +"en las opciones abreviadas." + +#: messages/merge.php:47 messages/merge.php:73 lib/Messages.php:942 +msgid "Merge" +msgstr "Combinar" + +#: messages/merge.php:46 +#, php-format +msgid "Merge \"%s\" with another thread" +msgstr "Combinar \"%s\" con otra conversación" + +#: lib/Messages.php:1502 +msgid "Message" +msgstr "Mensaje" + +#: messages/abuse.php:79 +#, php-format +msgid "Message %s reported as abuse" +msgstr "Se ha considerado el mensaje %s como correo abusivo." + +#: lib/Messages.php:503 +#, php-format +msgid "Message ID \"%d\" not found" +msgstr "No se encontró el ID de mensaje \"%d\"" + +#: config/.bak/prefs.php.dist:41 +msgid "Message View" +msgstr "Vista de mensajes" + +#: messages/delete.php:65 lib/api.php:748 +msgid "Message deleted." +msgstr "Se ha eliminado el mensaje." + +#: messages/delete.php:55 lib/api.php:753 +msgid "Message not deleted." +msgstr "Mensaje no borrado." + +#: messages/edit.php:85 lib/api.php:641 +msgid "Message posted." +msgstr "Mensaje enviado." + +#: templates/messages/index.php:1 config/.bak/prefs.php.dist:80 +msgid "Messages" +msgstr "Mensajes" + +#: moderate.php:82 templates/moderate/moderate.php:11 +msgid "Messages Awaiting Moderation" +msgstr "Mensajes pendientes de moderación" + +#: lib/Messages.php:1782 +msgid "Moderate" +msgstr "Moderar" + +#: moderators.php:76 templates/messages/flat.php:26 +#: templates/messages/message.php:21 templates/messages/flat_thread.php:10 +#: lib/Tree/flat.php:117 +msgid "Moderator" +msgstr "Moderador" + +#: moderators.php:70 templates/forums/forums.php:39 +#: templates/moderators/moderators.php:4 +#: templates/moderators/moderators.php:10 +msgid "Moderators" +msgstr "Moderadores" + +#: messages/move.php:47 messages/move.php:59 lib/Messages.php:938 +msgid "Move" +msgstr "Trasladar" + +#: messages/move.php:46 +#, php-format +msgid "Move \"%s\" to another forum" +msgstr "Trasladar \"%s\" a otro foro" + +#: config/.bak/prefs.php.dist:10 +msgid "My Information" +msgstr "Mi información" + +#: editforum.php:25 +msgid "New Forum" +msgstr "Añadir foro" + +#: lib/Messages.php:1752 +msgid "New Post" +msgstr "Añadir envío" + +#: lib/Agora.php:253 +msgid "New Thread" +msgstr "Añadir conversación" + +#: lib/Messages.php:842 +msgid "New posts" +msgstr "Envíos nuevos" + +#: config/.bak/prefs.php.dist:178 +msgid "No" +msgstr "No" + +#: lib/Block/threads.php:118 +msgid "No available threads." +msgstr "No hay conversaciones." + +#: lib/Block/threads.php:97 +msgid "No forum selected" +msgstr "No se ha seleccionado un foro." + +#: templates/forums/forums.php:60 +msgid "No forums have been created." +msgstr "No se ha creado ningún foro." + +#: config/.bak/prefs.php.dist:198 +msgid "No graphical emoticons" +msgstr "No hay emoticones gráficos" + +#: moderate.php:54 +msgid "No messages are waiting for moderation." +msgstr "No hay mensajes pendientes de moderación." + +#: messages/abuse.php:39 +msgid "No moderators are associated with this forum." +msgstr "No se ha asociado ningún moderador a este foro." + +#: templates/moderators/moderators.php:27 +msgid "No moderators have been created." +msgstr "No se ha creado ningún moderador." + +#: templates/block/threads.php:32 +msgid "No threads" +msgstr "Sin conversaciones" + +#: messages/lock.php:51 +msgid "No, do not allow replies" +msgstr "No, no permitir respuestas" + +#: config/.bak/prefs.php.dist:103 +msgid "Number of forums to display on each page" +msgstr "Número de foros mostrado en cada página" + +#: config/.bak/prefs.php.dist:190 +msgid "Number of message to display on each page" +msgstr "Número de mensajes mostrados en cada página" + +#: config/.bak/prefs.php.dist:146 config/.bak/prefs.php.dist:267 +msgid "Number of messages to display on each page" +msgstr "Número de mensajes mostrados en cada página" + +#: config/.bak/prefs.php.dist:137 +msgid "Number of views in 24hrs to trigger a 'hot-thread':" +msgstr "" +"Número de opiniones en 24 horas que activen una 'conversación-caliente':" + +#: lib/Block/forums.php:35 +msgid "Only display this many forums (0 to display all forums)" +msgstr "Mostrar sólo este número de foros (0 para mostrar todos los foros)" + +#: lib/Block/threads.php:52 +msgid "Only display this many threads (0 to display all threads)" +msgstr "" +"Mostrar sólo este número de conversaciones (0 para mostrar todas las " +"conversaciones)" + +#: templates/forums/forums.php:34 +msgid "Options" +msgstr "Opciones" + +#: lib/Messages.php:889 +#, php-format +msgid "Page %d" +msgstr "Página %d" + +#: lib/Forms/Forum.php:32 +msgid "Parent forum" +msgstr "Foro anterior" + +#: lib/Messages.php:1471 +msgid "Post" +msgstr "Enviar" + +#: lib/api.php:614 +msgid "Post a New Message" +msgstr "Añadir un mensaje" + +#: messages/edit.php:71 +#, php-format +msgid "Post a New Message to \"%s\"" +msgstr "Añadir un mensaje a \"%s\"" + +#: messages/index.php:213 messages/edit.php:69 +#, php-format +msgid "Post a Reply to \"%s\"" +msgstr "Añadir una respuesta a \"%s\"" + +#: lib/Messages.php:1447 lib/Messages.php:1752 +msgid "Post message" +msgstr "Enviar mensaje" + +#: forums.php:55 moderate.php:62 messages/index.php:146 +#: templates/messages/flat.php:22 templates/messages/flat_thread.php:7 +#: lib/api.php:434 lib/Comments.php:85 lib/Tree/flat.php:112 +#: lib/Block/forums.php:86 lib/Block/threads.php:122 lib/Block/thread.php:82 +#: config/.bak/prefs.php.dist:82 config/.bak/prefs.php.dist:115 +#: config/.bak/prefs.php.dist:158 config/.bak/prefs.php.dist:246 +msgid "Posted by" +msgstr "Enviado por" + +#: messages/index.php:87 lib/Messages.php:548 +#, php-format +msgid "Posted by %s on %s" +msgstr "Enviado por %s de %s" + +#: forums.php:55 threads.php:61 lib/Block/forums.php:86 +#: config/.bak/prefs.php.dist:116 +msgid "Posts" +msgstr "Envíos" + +#: lib/Messages.php:1494 +msgid "Quote" +msgstr "Citar" + +#: messages/index.php:113 lib/Messages.php:911 +msgid "Reply" +msgstr "Responder" + +#: lib/Messages.php:911 +msgid "Reply to message" +msgstr "Responder al mensaje" + +#: messages/abuse.php:47 messages/abuse.php:48 lib/Messages.php:917 +msgid "Report as abuse" +msgstr "Considerar como correo abusivo" + +#: lib/Forms/Search.php:44 +msgid "Require all keywords?" +msgstr "¿Requerir todas las palabras claves?" + +#: lib/Messages.php:1471 +msgid "Save" +msgstr "Guardar" + +#: lib/Forms/Search.php:57 +msgid "Search" +msgstr "Buscar" + +#: search.php:70 lib/Forms/Search.php:33 +msgid "Search Forums" +msgstr "Buscar foros" + +#: templates/search/search.php:5 +msgid "Search Results" +msgstr "Resultados de la búsqueda" + +#: lib/Forms/Search.php:52 +msgid "Search in message contents?" +msgstr "¿Buscar en contenido de los mensajes?" + +#: lib/Forms/Search.php:48 +msgid "Search in subjects?" +msgstr "¿Buscar en los asuntos?" + +#: lib/Forms/Search.php:37 +msgid "Search in these forums" +msgstr "Buscar en estos foros" + +#: config/.bak/prefs.php.dist:12 +msgid "Set the avatar image that is shown with your posts." +msgstr "Define la imagen personal mostrada con sus envíos." + +#: lib/Forms/Forum.php:38 +msgid "" +"Set this if you want all messages to be checked by a moderator before they " +"are posted." +msgstr "" +"Active ésto si desea que un moderador examine todos los mensajes antes de " +"enviarlos." + +#: config/.bak/prefs.php.dist:20 +msgid "Set your options for the forums view." +msgstr "Define las opciones de la vista de foros." + +#: config/.bak/prefs.php.dist:42 +msgid "Set your options for the message view." +msgstr "Define las opciones de la vista de mensajes." + +#: config/.bak/prefs.php.dist:34 config/.bak/prefs.php.dist:49 +msgid "Set your options for the single thread view." +msgstr "Define las opciones de la vista de conversación." + +#: config/.bak/prefs.php.dist:27 +msgid "Set your options for the threads view." +msgstr "Define las opciones de la vista de conversaciones." + +#: config/.bak/prefs.php.dist:199 +msgid "Show graphical emoticons" +msgstr "Mostrar emoticones gráficos" + +#: lib/Block/thread.php:3 lib/Block/thread.php:52 +msgid "Single Thread" +msgstr "Conversación única" + +#: config/.bak/prefs.php.dist:33 +msgid "Single Thread View" +msgstr "Conversación única" + +#: lib/Agora.php:192 +msgid "Sort Ascending" +msgstr "Ascendente" + +#: lib/Agora.php:192 +msgid "Sort Descending" +msgstr "Descendente" + +#: lib/Comments.php:65 +msgid "Sort by" +msgstr "Ordenar por" + +#: lib/Agora.php:200 lib/Agora.php:207 +#, php-format +msgid "Sort by %s" +msgstr "Ordenar por %s" + +#: lib/Comments.php:71 +msgid "Sort direction" +msgstr "Sentido de clasificación" + +#: lib/Messages.php:1516 lib/Forms/Message.php:24 +msgid "Spam protection" +msgstr "Protección anti spam" + +#: messages/split.php:47 messages/split.php:55 lib/Messages.php:947 +msgid "Split" +msgstr "Dividir" + +#: messages/split.php:46 +#, php-format +msgid "Split \"%s\"" +msgstr "Dividir \"%s\"" + +#: threads.php:61 +msgid "Started" +msgstr "Iniciada" + +#: deleteforum.php:57 +msgid "Subforums" +msgstr "Foros secundarios" + +#: threads.php:61 moderate.php:62 messages/index.php:146 lib/api.php:432 +#: lib/Comments.php:69 lib/Comments.php:83 lib/Messages.php:1496 +#: lib/Messages.php:1499 lib/Block/threads.php:122 lib/Block/thread.php:82 +#: config/.bak/prefs.php.dist:114 config/.bak/prefs.php.dist:157 +#: config/.bak/prefs.php.dist:245 +msgid "Subject" +msgstr "Asunto" + +#: lib/Agora.php:229 +msgid "The VFS backend needs to be configured to enable attachment uploads." +msgstr "Para activar la carga de adjuntos hay que configurar el motor VFS." + +#: config/.bak/prefs.php.dist:61 +msgid "The location of your avatar image." +msgstr "Ubicación de su imagen personal." + +#: lib/Block/forums.php:77 +msgid "There are no forums." +msgstr "No hay foros." + +#: templates/threads/threads.php:69 +msgid "There are no threads in this forum." +msgstr "No hay conversaciones en este foro." + +#: lib/Messages.php:162 +msgid "This thread has been locked." +msgstr "Esta conversación se ha bloqueado." + +#: deleteforum.php:48 +msgid "This will delete the forum, any subforums and all relative messages." +msgstr "" +"Ésto eliminará el foro, cualquier foro secundario y todos los mensajes que " +"contengan." + +#: messages/index.php:146 messages/index.php:159 lib/Comments.php:61 +#: lib/Block/thread.php:32 lib/Block/thread.php:82 +#: config/.bak/prefs.php.dist:113 config/.bak/prefs.php.dist:156 +#: config/.bak/prefs.php.dist:236 +msgid "Thread" +msgstr "Conversación" + +#: messages/merge.php:78 +#, php-format +msgid "Thread %s merged with thread %s after message %s." +msgstr "" +"Se ha combinado la conversación %s con la conversación %s tras el mensaje %s." + +#: messages/move.php:64 +#, php-format +msgid "Thread %s moved to from forum %s to %s." +msgstr "Se ha trasladado la conversación %s al foro %s desde el foro %s." + +#: templates/messages/index.php:10 lib/Block/thread.php:89 +msgid "Thread List" +msgstr "Lista de conversaciones" + +#: templates/messages/message.php:34 +msgid "Thread Summary" +msgstr "Resumen de la conversación" + +#: messages/delete.php:70 +msgid "Thread deleted." +msgstr "Conversación eliminada." + +#: messages/index.php:205 messages/lock.php:63 +msgid "Thread locked." +msgstr "Conversación bloqueada." + +#: messages/split.php:60 +#, php-format +msgid "Thread splitted by message %s." +msgstr "Se ha dividido la conversación a partir del mensaje %s." + +#: messages/lock.php:65 +msgid "Thread unlocked." +msgstr "Conversación desbloqueada." + +#: forums.php:55 templates/threads/threads.php:1 lib/Comments.php:77 +#: lib/Block/threads.php:3 lib/Block/threads.php:70 lib/Block/threads.php:76 +msgid "Threads" +msgstr "Conversaciones" + +#: config/.bak/prefs.php.dist:26 +msgid "Threads View" +msgstr "Vista de conversaciones" + +#: lib/Block/threads.php:80 +#, php-format +msgid "Threads in \"%s\"" +msgstr "Conversaciones en \"%s\"" + +#: threads.php:68 threads.php:81 rss/threads.php:48 +#, php-format +msgid "Threads in %s" +msgstr "Conversaciones en %s" + +#: lib/Block/thread.php:70 +msgid "Unable to fetch selected thread." +msgstr "Incapaz de traer la conversación seleccionada." + +#: lib/Block/threads.php:103 +msgid "Unable to fetch threads for selected forum." +msgstr "Incapaz de traer las conversaciones del foro seleccionado." + +#: lib/Messages.php:931 +msgid "Unlock" +msgstr "Desbloquear" + +#: messages/index.php:125 +msgid "Unlock thread" +msgstr "Desbloquear conversación" + +#: messages/lock.php:49 lib/Forms/Forum.php:26 +msgid "Update" +msgstr "Actualizar" + +#: scripts/phorum2agora.php:212 +#, php-format +msgid "Usage: %s [OPTIONS]..." +msgstr "Uso: %s [OPCIONES]..." + +#: ban.php:65 +msgid "User" +msgstr "Usuario" + +#: lib/Comments.php:59 +msgid "View" +msgstr "Ver" + +#: messages/index.php:184 +msgid "View bodies" +msgstr "Ver cuerpos" + +#: threads.php:61 +msgid "Views" +msgstr "Vistas" + +#: messages/merge.php:57 +msgid "With Thread: " +msgstr "Con la conversación: " + +#: config/.bak/prefs.php.dist:179 +msgid "Yes" +msgstr "Sí" + +#: messages/lock.php:51 +msgid "Yes, allow replies" +msgstr "Sí, permitir respuestas" + +#: config/.bak/prefs.php.dist:180 +msgid "Yes, and don't thread them" +msgstr "Sí, y no mostrar las conversaciones" + +#: lib/Messages.php:1660 +#, php-format +msgid "You don't have permission to access messages in forum %s." +msgstr "Carece de permisos para acceder a los mensajes del foro %s." + +#: messages/delete.php:40 messages/move.php:38 messages/merge.php:38 +#: messages/split.php:38 messages/lock.php:40 lib/api.php:726 +#: lib/Messages.php:569 lib/Messages.php:738 +#, php-format +msgid "You don't have permission to delete messages in forum %s." +msgstr "Carece de permisos para eliminar los mensajes del foro %s." + +#: messages/index.php:199 messages/edit.php:39 lib/api.php:592 +#: lib/Messages.php:167 +#, php-format +msgid "You don't have permission to post messages in forum %s." +msgstr "Carece de permisos para enviar mensajes al foro %s." + +#: lib/Messages.php:813 +#, php-format +msgid "You don't have permission to read messages in forum %s." +msgstr "Carece de permisos para leer los mensajes del foro %s." + +#: ban.php:30 +#, php-format +msgid "You don't have permissions to ban users from forum %s." +msgstr "Carece de permisos para prohibir usuarios en el foro %s." + +#: editforum.php:35 +#, php-format +msgid "You don't have permissions to create a new forum in %s" +msgstr "Carece de permisos para crear un foro en %s" + +#: deleteforum.php:27 +#, php-format +msgid "You don't have permissions to delete forums in %s" +msgstr "Carece de permisos para eliminar foros en %s" + +#: editforum.php:31 +#, php-format +msgid "You don't have permissions to edit forum %s" +msgstr "Carece de permisos para modificar el foro %s" + +#: lib/Agora.php:246 +msgid "_Forums" +msgstr "_Foros" + +#: lib/Agora.php:263 +msgid "_Moderate" +msgstr "_Moderar" + +#: lib/Agora.php:267 +msgid "_Moderators" +msgstr "Mo_deradores" + +#: lib/Agora.php:258 +msgid "_New Forum" +msgstr "_Añadir foro" + +#: lib/Agora.php:271 +msgid "_Search" +msgstr "_Buscar" + +#: lib/Agora.php:251 +msgid "_Threads" +msgstr "_Conversaciones" + +#: templates/forums/forums.php:51 templates/threads/threads.php:60 +msgid "by" +msgstr "por" + +#: lib/Messages.php:1609 +msgid "download" +msgstr "descargar" + +#: templates/messages/flat.php:23 templates/messages/flat_thread.php:8 +#: lib/Tree/flat.php:113 +msgid "on: " +msgstr "en: " + +#: lib/Messages.php:1610 +#, php-format +msgid "size: %s" +msgstr "tamaño: %s" + +#: lib/Messages.php:1610 +#, php-format +msgid "type: %s" +msgstr "tipo: %s" diff --git a/agora/po/fi_FI.po b/agora/po/fi_FI.po new file mode 100644 index 000000000..049e3848d --- /dev/null +++ b/agora/po/fi_FI.po @@ -0,0 +1,623 @@ +# Finnish translation for Agora. +# Copyright +# Leena Heino , 2004. +# +msgid "" +msgstr "" +"Project-Id-Version: Agora 0.1-cvs\n" +"Report-Msgid-Bugs-To: dev@lists.horde.org\n" +"POT-Creation-Date: 2005-03-14 11:02+0200\n" +"PO-Revision-Date: 2004-12-10 12:59+0200\n" +"Last-Translator: Leena Heino \n" +"Language-Team: Finnish \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=iso-8859-1\n" +"Content-Transfer-Encoding: 8-bit\n" + +#: lib/Forums.php:170 +msgid "-- Top Level --" +msgstr "-- Ylin taso --" + +#: lib/api.php:82 +msgid "Admin" +msgstr "Ylläpitäjä" + +#: forums.php:58 +msgid "All Forums" +msgstr "Kaikki foorumit" + +#: editforum.php:46 +msgid "Allow attachments in this forum?" +msgstr "Salli liitteet tälle foorumille." + +#: messages/lock.php:64 +msgid "Allow replies in this thread" +msgstr "Salli vastauksia tähän säikeeseen" + +#: moderate.php:64 +msgid "Approve" +msgstr "Hyväksy" + +#: config/prefs.php.dist:55 config/prefs.php.dist:85 config/prefs.php.dist:131 +msgid "Ascending" +msgstr "Nouseva" + +#: lib/Messages.php:816 +msgid "Attachment" +msgstr "Liite" + +#: moderate.php:55 +msgid "Body" +msgstr "Sisältö" + +#: lib/Forums.php:74 +msgid "Can not create a forum with an empty name." +msgstr "Ei voi tehdä foorumia tyhjällä nimellä." + +#: lib/Messages.php:88 +msgid "Can not create a message without a message thread." +msgstr "Et voi kirjoittaa viestiä ilman säiettä." + +#: messages/delete.php:61 messages/delete.php:83 +msgid "Cancel" +msgstr "Peru" + +#: lib/api.php:235 +msgid "Comments" +msgstr "Kommentit" + +#: editforum.php:55 +#, php-format +msgid "Could not create the forum. %s" +msgstr "Ei voi luoda foorumia. %s" + +#: deleteforum.php:62 +#, php-format +msgid "Could not delete the forum. %s" +msgstr "Ei voi poistaa foorumia. %s" + +#: messages/delete.php:45 messages/delete.php:75 +#, php-format +msgid "Could not delete the message. %s" +msgstr "Ei voi poistaa viestiä. %s" + +#: threads.php:30 +#, php-format +msgid "Could not list threads. %s" +msgstr "Ei voi listata säikeitä. %s" + +#: messages/lock.php:45 messages/lock.php:73 +#, php-format +msgid "Could not lock the thread. %s" +msgstr "Ei voi lukita säiettä. %s" + +#: messages/index.php:26 messages/message.php:25 +#, php-format +msgid "Could not open the message. %s" +msgstr "Ei voi avata viestiä. %s" + +#: messages/edit.php:78 lib/api.php:355 +#, php-format +msgid "Could not post the message. %s" +msgstr "Ei voi lähettää viestiä. %s" + +#: messages/edit.php:30 lib/api.php:323 +#, php-format +msgid "Could not post the message: %s" +msgstr "Ei voi lähettää viestiä: %s" + +#: editforum.php:36 +msgid "Create" +msgstr "Luo" + +#: lib/Messages.php:812 +msgid "Current attachment" +msgstr "Nykyinen liite" + +#: forums.php:42 moderate.php:55 messages/index.php:47 messages/message.php:47 +#: lib/api.php:224 lib/Block/forums.php:70 lib/Block/thread.php:103 +#: lib/Block/threads.php:116 config/prefs.php.dist:46 config/prefs.php.dist:76 +#: config/prefs.php.dist:122 +msgid "Date" +msgstr "Päiväys" + +#: config/prefs.php.dist:47 +msgid "Default forums view sort:" +msgstr "Oletusjärjestys keskusteluryhmänäkymässä:" + +#: config/prefs.php.dist:57 config/prefs.php.dist:87 config/prefs.php.dist:133 +msgid "Default sorting direction:" +msgstr "Oletusjärjestyksen suunta:" + +#: config/prefs.php.dist:77 config/prefs.php.dist:123 +msgid "Default threads view sort:" +msgstr "Oletusjärjestys säienäkymässä:" + +#: deleteforum.php:42 deleteforum.php:55 moderate.php:65 +#: messages/delete.php:61 messages/delete.php:65 messages/message.php:76 +#: lib/Forums.php:243 lib/Messages.php:496 +msgid "Delete" +msgstr "Poista" + +#: messages/delete.php:58 +#, php-format +msgid "Delete '%s' and all replies?" +msgstr "Poista '%s' ja kaikki vastaukset?" + +#: deleteforum.php:39 lib/Messages.php:777 +msgid "Delete Forum" +msgstr "Poista foorumi" + +#: lib/Forums.php:243 +msgid "Delete forum" +msgstr "Poista foorumi" + +#: lib/Messages.php:496 +msgid "Delete message" +msgstr "Poista viesti" + +#: lib/Messages.php:811 +msgid "Delete the existing attachment?" +msgstr "Poista nykyinen liite?" + +#: config/prefs.php.dist:56 config/prefs.php.dist:86 config/prefs.php.dist:132 +msgid "Descending" +msgstr "Laskeva" + +#: forums.php:42 +msgid "Description" +msgstr "Kuvaus" + +#: config/prefs.php.dist:9 config/prefs.php.dist:16 config/prefs.php.dist:23 +#: config/prefs.php.dist:30 +msgid "Display Options" +msgstr "Näkymän asetukset" + +#: config/prefs.php.dist:103 +msgid "Display full message bodies in the thread list view?" +msgstr "Näytä koko viesti säielistanäkymässä." + +#: config/prefs.php.dist:143 +msgid "Display graphical emoticons?" +msgstr "Näytä graafiset hymiöt." + +#: deleteforum.php:42 deleteforum.php:70 +msgid "Do not delete" +msgstr "Ei saa poistaa" + +#: messages/message.php:73 lib/Forums.php:239 lib/Messages.php:492 +msgid "Edit" +msgstr "Muokkaa" + +#: editforum.php:30 lib/Messages.php:775 +msgid "Edit Forum" +msgstr "Muokkaa foorumia" + +#: lib/api.php:329 +msgid "Edit Message" +msgstr "Muokkaa viestiä" + +#: messages/edit.php:65 +#, php-format +msgid "Edit Message in \"%s\"" +msgstr "Muokkaa viestiä \"%s\":ssä" + +#: lib/Forums.php:239 +msgid "Edit forum" +msgstr "Muokkaa foorumia" + +#: lib/Messages.php:492 +msgid "Edit message" +msgstr "Muokkaa viestiä" + +#: editforum.php:43 +msgid "Enter a brief description of this forum" +msgstr "Anna lyhyt kuvaus tästä foorumista" + +#: forums.php:42 +msgid "Flat" +msgstr "Tasainen" + +#: forums.php:42 moderate.php:55 lib/Block/forums.php:70 +#: lib/Block/threads.php:48 config/prefs.php.dist:42 +msgid "Forum" +msgstr "Foorumi" + +#: editforum.php:57 +msgid "Forum Modified" +msgstr "Foorumia muokattu" + +#: editforum.php:57 +msgid "Forum created." +msgstr "Foorumi luotu" + +#: deleteforum.php:64 +msgid "Forum deleted." +msgstr "Foorumi poistettu." + +#: deleteforum.php:45 editforum.php:38 +msgid "Forum name" +msgstr "Foorumin nimi" + +#: deleteforum.php:71 +msgid "Forum not deleted." +msgstr "Foorumia ei poistettu." + +#: lib/Agora.php:234 lib/Block/forums.php:3 lib/Block/forums.php:27 +#: templates/forums/forums.html:7 +msgid "Forums" +msgstr "Foorumit" + +#: config/prefs.php.dist:10 +msgid "Forums View" +msgstr "Fooruminäkymä" + +#: lib/Messages.php:803 +msgid "From" +msgstr "Lähettäjä" + +#: lib/Messages.php:501 +msgid "Hot thread" +msgstr "Kuuma säie" + +#: editforum.php:46 +msgid "If selected users will be able to attach files to their messages." +msgstr "Voikovatko tietyt käyttäjät liittää tiedostoja viesteihinsä." + +#: messages/edit.php:107 +msgid "" +"Invalid parent message, you will be posting this message as a new thread." +msgstr "Juuriviesti on epäkelpo, tämä viesti aloittaa uuden säikeen." + +#: editforum.php:44 +msgid "Is this a moderated forum?" +msgstr "Onko tämä moderoitu foorumi" + +#: config/prefs.php.dist:44 +msgid "Last Message" +msgstr "Viimeinen viesti" + +#: forums.php:42 lib/Block/forums.php:70 +msgid "Last Post" +msgstr "Viimeksi lähetetty" + +#: threads.php:57 +msgid "Last post" +msgstr "Viimeksi lähetetty" + +#: messages/index.php:56 messages/message.php:79 +msgid "Lock thread" +msgstr "Lukitse säie" + +#: messages/lock.php:58 +#, php-format +msgid "Locking thread '%s'" +msgstr "Lukitse säie '%s'" + +#: lib/Messages.php:806 +msgid "Message" +msgstr "Viesti" + +#: config/prefs.php.dist:31 +msgid "Message View" +msgstr "Viestinäkymä" + +#: messages/delete.php:77 +msgid "Message deleted." +msgstr "Viesti poistettu." + +#: messages/index.php:30 messages/message.php:29 +msgid "Message does not exist." +msgstr "Viestiä ei ole olemassa." + +#: messages/delete.php:84 +msgid "Message not deleted." +msgstr "Viestiä ei poistettu." + +#: messages/edit.php:80 lib/api.php:357 +msgid "Message posted." +msgstr "Viesti lähetetty." + +#: config/prefs.php.dist:43 +msgid "Messages" +msgstr "Viestit" + +#: moderate.php:84 +msgid "Messages Awaiting Moderation" +msgstr "Viestejä odottamassa moderointia" + +#: lib/Agora.php:247 +msgid "Moderate" +msgstr "Moderoi" + +#: editforum.php:30 lib/Agora.php:246 +msgid "New Forum" +msgstr "Uusi foorumi" + +#: lib/Forums.php:234 +msgid "New Post" +msgstr "Uusi viesti" + +#: lib/Agora.php:241 +msgid "New Thread" +msgstr "Uusi säie" + +#: lib/Block/forums.php:61 +msgid "No available forums." +msgstr "Ei keskustelufoorumeja saatavilla." + +#: lib/Block/threads.php:112 +msgid "No available threads." +msgstr "Ei säikeitä saatavilla." + +#: forums.php:35 +msgid "No forums available." +msgstr "Keskustelufoorumeja ei ole saatavilla." + +#: config/prefs.php.dist:141 +msgid "No graphical emoticons" +msgstr "Ei graafisia hymiöitä" + +#: moderate.php:48 +msgid "No messages to moderate available." +msgstr "Ei viestejä odottamassa moderointia." + +#: templates/block/threads.html:26 +msgid "No threads" +msgstr "Ei säikeitä" + +#: threads.php:51 +msgid "No threads available." +msgstr "Ei säikeitä saatavilla." + +#: messages/lock.php:64 +msgid "No, do not allow replies" +msgstr "Ei, vastaukset eivät ole sallittuja" + +#: config/prefs.php.dist:65 +msgid "Number of forums to display on each page" +msgstr "Kuinka monta foorumia näytetään yhdellä sivulla" + +#: config/prefs.php.dist:111 +msgid "Number of threads to display on each page" +msgstr "Kuinka monta säiettä näytetään yhdellä sivulla" + +#: config/prefs.php.dist:95 +msgid "Number of views in 24hrs to trigger a 'hot-thread':" +msgstr "Lukijoiden määrä 24 tunnin aikana, joka muuttaa 'kuumaksi säikeeksi':" + +#: lib/Block/forums.php:34 +msgid "Only display this many forums (0 to display all forums)" +msgstr "Näytä näin monta foorumia (0 näyttää kaikki foorumit)" + +#: lib/Block/threads.php:59 +msgid "Only display this many threads (0 to display all threads)" +msgstr "Näytä näin monta säiettä (0 näyttää kaikki säikeet)" + +#: editforum.php:42 +msgid "Parent forum" +msgstr "Juurifoorumi" + +#: lib/Messages.php:789 +msgid "Post" +msgstr "Lähetä" + +#: lib/api.php:329 +msgid "Post a New Message" +msgstr "Lähetä uusi viesti" + +#: messages/edit.php:66 +#, php-format +msgid "Post a New Message to \"%s\"" +msgstr "Lähetä uusi viesti \"%s\"" + +#: messages/edit.php:64 +#, php-format +msgid "Post a Reply to \"%s\"" +msgstr "Lähetä vastaus \"%s\"" + +#: lib/Forums.php:234 lib/Messages.php:771 lib/Block/threads.php:82 +msgid "Post message" +msgstr "Lähetä viesti" + +#: forums.php:42 moderate.php:55 messages/index.php:47 messages/message.php:47 +#: lib/api.php:222 lib/Block/forums.php:70 lib/Block/thread.php:103 +#: lib/Block/threads.php:116 config/prefs.php.dist:45 config/prefs.php.dist:75 +#: config/prefs.php.dist:121 +msgid "Posted By" +msgstr "Lähettäjä" + +#: messages/message.php:54 lib/Messages.php:274 +#, php-format +msgid "Posted by %s on %s" +msgstr "Lähettäjä %s, %s" + +#: templates/messages/form.html:20 +msgid "Posted by on " +msgstr "Lähettäjä , " + +#: forums.php:42 threads.php:57 lib/Block/forums.php:70 +msgid "Posts" +msgstr "Lähettäjät" + +#: messages/message.php:68 lib/Messages.php:486 +msgid "Reply" +msgstr "Vastaa" + +#: lib/Messages.php:486 +msgid "Reply to message" +msgstr "Vastaa viestiin" + +#: lib/Messages.php:273 +#, php-format +msgid "Replying to \"%s\"" +msgstr "Vastataan \"%s\"" + +#: lib/Messages.php:789 +msgid "Save" +msgstr "Talleta" + +#: editforum.php:44 +msgid "" +"Set this if you want all messages to be checked by a moderator before they " +"are posted." +msgstr "" +"Aseta tämä, jos haluat että moderoija tarkastaa kaikki viestit ennen kuin ne " +"lähetetään." + +#: config/prefs.php.dist:11 +msgid "Set your options for the forums view." +msgstr "Voit muokata fooruminäkymän asetuksia." + +#: config/prefs.php.dist:32 +msgid "Set your options for the message view." +msgstr "Voit muokata viestinäkymän asetuksia." + +#: config/prefs.php.dist:25 +msgid "Set your options for the single thread view." +msgstr "Voit muokata säie kerrallaan näkymän asetuksia" + +#: config/prefs.php.dist:18 +msgid "Set your options for the threads view." +msgstr "Voit asettaa säienäkymän asetuksia." + +#: config/prefs.php.dist:142 +msgid "Show graphical emoticons" +msgstr "Näytä graafiset hymiöt" + +#: lib/Block/thread.php:3 lib/Block/thread.php:67 +msgid "Single Thread" +msgstr "Säie kerrallaan" + +#: config/prefs.php.dist:24 +msgid "Single Thread View" +msgstr "Säie kerrallaan näkymä" + +#: lib/Agora.php:184 +msgid "Sort Ascending" +msgstr "Järjestä nousevaan" + +#: lib/Agora.php:184 +msgid "Sort Descending" +msgstr "Järjestä laskevaan" + +#: lib/Agora.php:192 lib/Agora.php:198 +#, php-format +msgid "Sort by %s" +msgstr "Järjestä %s mukaan" + +#: threads.php:57 +msgid "Started" +msgstr "Aloitettu" + +#: deleteforum.php:51 +msgid "Subforums" +msgstr "alifoorumit" + +#: threads.php:57 moderate.php:55 messages/index.php:47 +#: messages/message.php:47 lib/Messages.php:805 lib/api.php:220 +#: lib/Block/thread.php:103 lib/Block/threads.php:116 config/prefs.php.dist:74 +#: config/prefs.php.dist:120 +msgid "Subject" +msgstr "Otsikko" + +#: lib/Agora.php:220 +msgid "The VFS backend needs to be configured to enable attachment uploads." +msgstr "" +"VFS-taustajärjestelmä pitää olla asennettu ennenkuin voi tuoda liitteitä." + +#: templates/moderate/moderate.html:9 +msgid "The following messages are waiting for approval" +msgstr "Seuraavat viestit odottavat hyväksyntääsi" + +#: deleteforum.php:44 +msgid "This will delete the forum, any subforums and all relative messages." +msgstr "Tämä poistaa foorumin, kaikki alifoorumit ja niihin liittyvät viestit" + +#: messages/index.php:47 messages/message.php:47 lib/Block/thread.php:46 +#: lib/Block/thread.php:70 lib/Block/thread.php:103 config/prefs.php.dist:73 +#: config/prefs.php.dist:119 +msgid "Thread" +msgstr "Säie" + +#: messages/index.php:71 lib/Block/thread.php:110 +#: templates/messages/index.html:9 +msgid "Thread List" +msgstr "Listä Säikeistä" + +#: templates/messages/message.html:28 +msgid "Thread Summary" +msgstr "Säikeen yhteenveto" + +#: messages/lock.php:76 +msgid "Thread locked." +msgstr "Säie lukittu." + +#: messages/lock.php:78 +msgid "Thread unlocked." +msgstr "Säie avattu." + +#: lib/Agora.php:239 lib/Block/threads.php:3 lib/Block/threads.php:73 +msgid "Threads" +msgstr "Säikeet" + +#: config/prefs.php.dist:17 +msgid "Threads View" +msgstr "Säienäkymä" + +#: lib/Block/threads.php:77 +#, php-format +msgid "Threads in \"%s\"" +msgstr "Säikeet \"%s\"" + +#: threads.php:79 +#, php-format +msgid "Threads in %s" +msgstr "Säikeet %s" + +#: templates/threads/threads.html:11 +msgid "Threads in " +msgstr "Säikeet " + +#: lib/Block/thread.php:92 +msgid "Unable to fetch selected thread." +msgstr "Ei voi hakea valittua säiettä." + +#: lib/Block/threads.php:102 +msgid "Unable to fetch threads for selected forum." +msgstr "Ei voi hakea säikeitä valitulle foorumille" + +#: messages/index.php:56 messages/message.php:79 +msgid "Unlock thread" +msgstr "Avaa säie" + +#: editforum.php:36 messages/lock.php:61 +msgid "Update" +msgstr "Päivitä" + +#: messages/lock.php:64 +msgid "Yes, allow replies" +msgstr "Kyllä, salli vastaukset" + +#: lib/Forums.php:39 lib/Messages.php:34 +msgid "You must configure a Horde Categories backend to use Agora." +msgstr "" +"Sinun pitää asentaa Horde Categories taustajärjestelmä käyttääksesi Agoraa." + +#: templates/javascript/moderate.js:15 +msgid "You must select at least one message first." +msgstr "Sinun pitää valita ainakin yksi viesti." + +#: lib/Messages.php:1009 +msgid "download" +msgstr "lataa" + +#: lib/Messages.php:1010 +#, php-format +msgid "size: %s" +msgstr "koko: %s" + +#: lib/Messages.php:1010 +#, php-format +msgid "type: %s" +msgstr "tyyppi: %s" diff --git a/agora/po/fr_FR.po b/agora/po/fr_FR.po new file mode 100644 index 000000000..e1f6db1d2 --- /dev/null +++ b/agora/po/fr_FR.po @@ -0,0 +1,281 @@ +# French Traduction for the Agora Module to the Horde Framework +# Copyright 2003-2009 The Horde Project +# This file is distributed under the same license as the hordecvs package. +# Florent AIDE , 2003 +# +msgid "" +msgstr "" +"Project-Id-Version: hordecvs 02\n" +"POT-Creation-Date: 2003-02-05 17:15+0100\n" +"PO-Revision-Date: 2003-02-05 17:15+0100\n" +"Last-Translator: Automatically generated\n" +"Language-Team: i18n@lists.horde.org\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ISO-8859-1\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#: managemessage.php:96 +msgid "... as a reply to message" +msgstr "... en réponse au message" + +#: lib/Agora.php:154 lib/Menu.php:76 +msgid "Add Forum" +msgstr "Ajouter un Forum" + +#: lib/Menu.php:112 +msgid "Administration" +msgstr "Administration" + +#: templates/index/notconfigured.inc:4 +msgid "Agora is not properly configured" +msgstr "Agora n'est pas configuré correctement" + +#: lib/ManageMessage.php:46 forums.php:58 +msgid "Author" +msgstr "Auteur" + +#: lib/ManageForum.php:35 +msgid "Brief forum description" +msgstr "Déscription brève pour le Forum" + +#: lib/Agora.php:76 +msgid "Can not create a forum with an empty name." +msgstr "Impossible de créer un Forum sans nom" + +#: lib/Agora.php:85 +msgid "Can not create a message thread without message id." +msgstr "Ne peut pas créer un thread de message sans un identifiant de message" + +#: manageforum.php:83 +#, c-format +msgid "Could not create the forum. %s" +msgstr "Erreur lors de la création du Forum. %s" + +#: managemessage.php:79 +#, c-format +msgid "Could not submit the message. %s" +msgstr "N'a pas pu envoyer le message %s" + +#: manageforum.php:65 +msgid "Create a New Forum" +msgstr "Créer un nouveau Forum" + +#: lib/ManageForum.php:31 +#, c-format +msgid "Creating a subforum of %s." +msgstr "Création d'un sous Forum de %s." + +#: lib/ManageMessage.php:47 forums.php:58 +msgid "Date" +msgstr "Date" + +#: forums.php:52 +msgid "Forum" +msgstr "Forum" + +#: manageforum.php:87 +msgid "Forum Details" +msgstr "Détails du Forum" + +#: lib/Agora.php:147 lib/Menu.php:62 +msgid "Forum Home" +msgstr "Accueil du Forum" + +#: manageforum.php:85 +msgid "Forum created." +msgstr "Forum créé" + +#: lib/ManageForum.php:33 +msgid "Forum name" +msgstr "Nom du Forum" + +#: forums.php:51 +msgid "Forums" +msgstr "Forums" + +#: lib/api.php:54 +msgid "Forums Summary" +msgstr "Résumé pour le forum" + +#: lib/Menu.php:117 +msgid "Help" +msgstr "Aide" + +#: config/prefs.php.dist:6 +msgid "Language" +msgstr "Langue" + +#: forums.php:52 +msgid "Last Message" +msgstr "Dernier Message" + +#: lib/Menu.php:128 +msgid "Login" +msgstr "Identifiant" + +#: lib/Menu.php:125 +msgid "Logout" +msgstr "Déconnection" + +#: lib/Agora.php:222 +msgid "Main" +msgstr "Accueil" + +#: manageforum.php:38 +msgid "Manage Forums" +msgstr "Gèrer les Forums" + +#: managemessage.php:39 +msgid "Manage Messages" +msgstr "Gèrer les messages" + +#: lib/ManageMessage.php:28 lib/ManageMessage.php:48 managemessage.php:83 +msgid "Message" +msgstr "Message" + +#: lib/ManageMessage.php:27 +msgid "Message subject" +msgstr "Sujet du Message" + +#: managemessage.php:81 +msgid "Message submitted." +msgstr "Message envoyé" + +#: forums.php:52 +msgid "Messages" +msgstr "Messages" + +#: lib/Agora.php:150 +msgid "Moderated" +msgstr "Modéré" + +#: lib/ManageForum.php:34 +msgid "Moderated forum" +msgstr "Forum Modéré" + +#: lib/api.php:91 +msgid "New Campaign" +msgstr "Nouvelle Campagne" + +#: lib/api.php:91 lib/Block/summary.php:41 +msgid "New Forum" +msgstr "Nouveau Forum" + +#: lib/Agora.php:157 lib/Menu.php:84 +msgid "New Message" +msgstr "Nouveau Message" + +#: lib/Block/summary.php:57 +msgid "No forums available." +msgstr "Pas de Forum disponible" + +#: lib/Agora.php:152 lib/Menu.php:104 +msgid "Permissions" +msgstr "Permissions" + +#: managemessage.php:66 +msgid "Post a New Message" +msgstr "Envoyer un nouveau message" + +#: forums.php:52 +msgid "Posted By" +msgstr "Envoyé par" + +#: managemessage.php:99 +#, c-format +msgid "Re: %s" +msgstr "Re: %s" + +#: lib/Agora.php:160 lib/Menu.php:92 +msgid "Reply" +msgstr "Répondre" + +#: config/prefs.php.dist:16 +msgid "Select your preferred language:" +msgstr "Sélectionner votre langue préfèrée" + +#: lib/ManageForum.php:34 +msgid "" +"Set this if you want all messages to be checked by a moderator before they " +"are posted" +msgstr "" +"Cochez ceci pour faire modèrer tous les messages par un modérateur avant " +"qu'ils ne soient envoyés" + +#: config/prefs.php.dist:7 +msgid "Set your preferred display language." +msgstr "Choisissez votre langue d'affichage préfèrée" + +#: templates/index/notconfigured.inc:40 +msgid "Some of Agora's configuration files are missing:" +msgstr "Certains fichiers de configuration de Agora sont manquants" + +#: templates/index/notconfigured.inc:69 +msgid "" +"Some of the HTML templates in agora/config/templates/ are missing. These " +"files control the look and feel of Agora." +msgstr "" +"Certains des modèle HTML dans agora/config/templates sont manquants.Ces " +"fichiers gèrent l'apparence d'Agora" + +#: lib/ManageForum.php:36 +msgid "Store" +msgstr "Stoque" + +#: lib/ManageMessage.php:45 forums.php:58 +msgid "Subject" +msgstr "Sujet" + +#: lib/ManageMessage.php:29 +msgid "Submit" +msgstr "Soumettre" + +#: templates/index/notconfigured.inc:59 +msgid "" +"This file controls the default preferences for Agora, and also controls " +"which preferences users can alter." +msgstr "" +"Ce fichier contrôle les préférences de Agora, et aussi quellespréférences " +"les utilisateurs peuvent changer." + +#: templates/index/notconfigured.inc:52 +msgid "" +"This file controls the stylesheet that is used to set colors and fonts in " +"addition to or overriding Horde defaults." +msgstr "" +"Ce fichier contrôle les feuilles de style utilisées pour choisir les " +"couleurs et les polices de caractères" + +#: manageforum.php:58 managemessage.php:59 +msgid "This forum has been deleted." +msgstr "Ce Forum à été supprimé." + +#: manageforum.php:56 managemessage.php:57 +#, c-format +msgid "This forum has been deleted. %s" +msgstr "Ce Forum à été supprimé. %s" + +#: templates/index/notconfigured.inc:45 +msgid "" +"This is the main Agora configuration file. It contains options for all Agora " +"scripts." +msgstr "" +"Ceci est le fichier principal configuration de Agora. Il contient toutes les " +"options de configurationpour les divers scripts de Agora" + +#: lib/Menu.php:68 +msgid "Thread Home" +msgstr "Racine du fil de discussion" + +#: forums.php:57 +msgid "Threads" +msgstr "Fils de discussions" + +#: forums.php:46 +msgid "Welcome to this discussion!" +msgstr "Bienvenue dans cette discussion!" + +#: config/prefs.php.dist:5 +msgid "Your Information" +msgstr "Vos informations" diff --git a/agora/po/hu_HU.po b/agora/po/hu_HU.po new file mode 100644 index 000000000..8b043f6de --- /dev/null +++ b/agora/po/hu_HU.po @@ -0,0 +1,1016 @@ +# Hungarian translations for Agora. +# Copyright 2006-2009 The Horde Project +# This file is distributed under the same license as the Agora package. +# +# George Hron , 2007. +# Garami Gabor , 2008. +msgid "" +msgstr "" +"Project-Id-Version: hu_HU\n" +"Report-Msgid-Bugs-To: dev@lists.horde.org\n" +"POT-Creation-Date: 2008-01-02 12:27+0100\n" +"PO-Revision-Date: 2008-02-15 21:17+0100\n" +"Last-Translator: Garami Gabor \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ISO-8859-2\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: KBabel 1.11.4\n" + +#: moderate.php:36 +#, php-format +msgid "%d messages was approved." +msgstr "%d üzenet jóbváhagyva." + +#: moderate.php:42 +#, php-format +msgid "%d messages was deleted." +msgstr "%d üzenet törölve." + +#: scripts/phorum2agora.php:218 +msgid "-a, --agora_id[=aid] Agora forum id to save message to" +msgstr "" +"-a, --agora_id[=aid] Agora fórum id, ahova az üzeneteket mentsük" + +#: scripts/phorum2agora.php:221 +msgid "-c, --count[=messages] Number of messages to move at once" +msgstr "-c, --count[=messages] Az egyszerre mozgatandó üzenetek száma" + +#: scripts/phorum2agora.php:220 +msgid "" +"-f, --from[=offset] Offset from where to start to read messages" +msgstr "-f, --from[=offset] Ahonnan az üzenetek olvasását kezdjük" + +#: scripts/phorum2agora.php:216 +msgid "-h, --help Show this help" +msgstr "-h, --help Ez a szöveg" + +#: scripts/phorum2agora.php:217 +msgid "-p, --phorum_id[=pid] Phorum forum id to read message from" +msgstr "" +"-p, --phorum_id[=pid] Phorum fórum id, ahonnan az üzeneteket olvassuk" + +#: scripts/phorum2agora.php:219 +msgid "-t, --phorum_table[=table] Phorum messages tablename" +msgstr "-t, --phorum_table[=table] A Phorum üzenetek táblája" + +#: lib/api.php:816 +msgid "Add a comment" +msgstr "Megjegyzés küldése" + +#: lib/api.php:153 +msgid "Admin" +msgstr "Adminisztrálás" + +#: messages/merge.php:66 +msgid "After Message: " +msgstr "Ez után: " + +#: forums.php:73 +msgid "All Forums" +msgstr "Minden fórum" + +#: lib/Forms/Forum.php:40 +msgid "Allow attachments in this forum?" +msgstr "Engedélyezi a csatolásokat ebben a fórumban?" + +#: messages/lock.php:51 +msgid "Allow replies in this thread" +msgstr "Válaszok engedélyezése ebben a szálban" + +#: moderate.php:33 moderate.php:69 +msgid "Approve" +msgstr "Jóváhagy" + +#: lib/Comments.php:73 config/prefs.php.dist:103 config/prefs.php.dist:138 +#: config/prefs.php.dist:179 config/prefs.php.dist:267 +msgid "Ascending" +msgstr "Növekvõ" + +#: lib/Messages.php:1513 +msgid "Attachment" +msgstr "Csatolmány" + +#: lib/Comments.php:68 lib/Forms/Search.php:55 +msgid "Author" +msgstr "Szerzõ" + +#: config/prefs.php.dist:11 +msgid "Avatar" +msgstr "Avatár" + +#: config/prefs.php.dist:67 +#, php-format +msgid "" +"Avatars must be smaller than %s by %s pixels and less than %sKb in size." +msgstr "" +"Az avatár nem lehet nagyobb, mint %sx%s pixel, és kissebnek kell lennie, " +"mint %sKb." + +#: ban.php:58 lib/Messages.php:1458 +msgid "Ban" +msgstr "Tilt" + +#: templates/forums/ban.php:10 +msgid "Banned" +msgstr "Tiltva" + +#: moderate.php:62 +msgid "Body" +msgstr "Törzs" + +#: deleteforum.php:45 messages/abuse.php:48 messages/abuse.php:56 +#: messages/merge.php:47 messages/move.php:47 messages/delete.php:49 +#: messages/split.php:47 lib/api.php:737 +msgid "Cancel" +msgstr "Mégsem" + +#: lib/Messages.php:1871 +msgid "Cannot create a forum with an empty name." +msgstr "Névtelen fórum nem hozható létre" + +#: templates/prefs/avatarselect.inc:8 +msgid "Choose from a gallery of avatars: " +msgstr "Avatás kiválasztása galériából" + +#: lib/Comments.php:81 lib/api.php:445 +msgid "Comments" +msgstr "Megjegyzések" + +#: rss/threads.php:54 +#, php-format +msgid "Comments on %s" +msgstr "Megjegyzések itt: %s" + +#: config/prefs.php.dist:51 +msgid "Comments view" +msgstr "Megjegyzések" + +#: editforum.php:44 +#, php-format +msgid "Could not create the forum. %s" +msgstr "Nem lehet a fórumot létrehozni. %s" + +#: deleteforum.php:66 +#, php-format +msgid "Could not delete the forum. %s" +msgstr "Nem lehet a fórumot törölni. %s" + +#: messages/delete.php:63 lib/api.php:720 lib/api.php:731 lib/api.php:745 +#, php-format +msgid "Could not delete the message. %s" +msgstr "Nem lehet az üzenetet törölni. %s" + +#: threads.php:32 +#, php-format +msgid "Could not list threads. %s" +msgstr "Nem lehet listázni a szálat. %s" + +#: messages/lock.php:60 +#, php-format +msgid "Could not lock the thread. %s" +msgstr "Nem lehez zárolni a szálat. %s" + +#: messages/abuse.php:31 messages/merge.php:31 messages/move.php:31 +#: messages/index.php:34 messages/lock.php:33 messages/delete.php:33 +#: messages/split.php:31 +#, php-format +msgid "Could not open the message. %s" +msgstr "Nem lehet az üzenetet megnyitni:%s" + +#: messages/edit.php:31 messages/edit.php:83 lib/api.php:585 lib/api.php:638 +msgid "Could not post the message: " +msgstr "Nem lehet az üzenetet elküldeni:" + +#: scripts/phorum2agora.php:65 +msgid "Couldn't read command-line options." +msgstr "Nem lehet olvasni a paracssori opciókat." + +#: lib/Forms/Forum.php:26 +msgid "Create" +msgstr "Létrehoz" + +#: lib/Messages.php:1509 +msgid "Current attachment" +msgstr "Aktív csatolmány" + +#: forums.php:56 moderate.php:62 messages/index.php:146 lib/Comments.php:67 +#: lib/Comments.php:87 lib/api.php:435 lib/Block/threads.php:125 +#: lib/Block/forums.php:87 lib/Block/thread.php:84 config/prefs.php.dist:94 +#: config/prefs.php.dist:128 config/prefs.php.dist:170 +#: config/prefs.php.dist:258 +msgid "Date" +msgstr "Dátum" + +#: config/prefs.php.dist:259 +msgid "Default comments view sort:" +msgstr "Alapértelmezett fórumrendezési irány:" + +#: config/prefs.php.dist:95 +msgid "Default forums view sort:" +msgstr "Alapértelmezett fórumrendezési irány:" + +#: config/prefs.php.dist:105 config/prefs.php.dist:140 +#: config/prefs.php.dist:181 config/prefs.php.dist:269 +msgid "Default sorting direction:" +msgstr "Alapértelmezett rendezési irány:" + +#: config/prefs.php.dist:171 +msgid "Default thread view sort:" +msgstr "Alapértelmezett szálrendezési irány:" + +#: config/prefs.php.dist:130 +msgid "Default threads view sort:" +msgstr "Alapértelmezett szálrendezési:" + +#: deleteforum.php:45 deleteforum.php:63 ban.php:55 moderators.php:66 +#: moderate.php:39 moderate.php:69 messages/index.php:122 +#: messages/delete.php:49 messages/delete.php:54 lib/Messages.php:927 +#: lib/Messages.php:1764 lib/api.php:737 lib/api.php:742 +msgid "Delete" +msgstr "Törlés" + +#: messages/delete.php:48 lib/api.php:736 +#, php-format +msgid "Delete \"%s\" and all replies?" +msgstr "Törli \"%s\"-t és minden rá adott választ?" + +#: deleteforum.php:43 lib/Messages.php:1456 +msgid "Delete Forum" +msgstr "Fórum Törlése" + +#: lib/Messages.php:1764 +msgid "Delete forum" +msgstr "Fórum törlése" + +#: lib/Messages.php:927 +msgid "Delete message" +msgstr "Üzenet törlése" + +#: lib/Messages.php:1508 +msgid "Delete the existing attachment?" +msgstr "Törli a csatolmányokat is?" + +#: lib/Comments.php:74 config/prefs.php.dist:104 config/prefs.php.dist:139 +#: config/prefs.php.dist:180 config/prefs.php.dist:268 +msgid "Descending" +msgstr "Csökkenõ" + +#: forums.php:56 +msgid "Description" +msgstr "Leírás" + +#: config/prefs.php.dist:21 config/prefs.php.dist:28 config/prefs.php.dist:35 +#: config/prefs.php.dist:43 config/prefs.php.dist:50 +msgid "Display Options" +msgstr "Megjelenítés beállítása" + +#: config/prefs.php.dist:248 +msgid "Display full message bodies in the comments view?" +msgstr "Az üzenet törzsének teljes megjelenítése szál nézetben?" + +#: config/prefs.php.dist:192 +msgid "Display full message bodies in the thread list view?" +msgstr "Az üzenet törzsének teljes megjelenítése szál nézetben?" + +#: config/prefs.php.dist:211 +msgid "Display graphical emoticons?" +msgstr "Smiley-k megjelenítése?" + +#: messages/index.php:119 lib/Messages.php:923 lib/Messages.php:1758 +msgid "Edit" +msgstr "Szerkesztés" + +#: editforum.php:25 lib/Messages.php:1453 +msgid "Edit Forum" +msgstr "Fórum szerkesztése" + +#: lib/api.php:613 +msgid "Edit Message" +msgstr "Üzenet szerkesztése" + +#: messages/edit.php:70 +#, php-format +msgid "Edit Message in \"%s\"" +msgstr "Üzenet szerkesztése ebben: \"%s\"" + +#: lib/api.php:814 +msgid "Edit a comment" +msgstr "Megjegyzés szerkesztése" + +#: lib/Messages.php:1758 +msgid "Edit forum" +msgstr "Fórum szerkesztése" + +#: lib/Messages.php:923 +msgid "Edit message" +msgstr "Üzenet szerkesztése" + +#: lib/Forms/Forum.php:37 +msgid "Enter a brief description of this forum" +msgstr "Rövid leírás ehhez a fórumhoz" + +#: messages/index.php:168 lib/Comments.php:60 config/prefs.php.dist:246 +msgid "Flat" +msgstr "Lapos" + +#: moderators.php:78 moderators.php:81 forums.php:56 moderate.php:62 +#: templates/moderators/moderators.php:8 messages/move.php:52 +#: lib/Block/threads.php:46 lib/Block/forums.php:87 config/prefs.php.dist:90 +msgid "Forum" +msgstr "Fórum" + +#: lib/Messages.php:1676 lib/api.php:714 +#, php-format +msgid "Forum %s does not exist." +msgstr "A(z) %s fórum nem létezik" + +#: editforum.php:47 +msgid "Forum Modified" +msgstr "Fórum módosult" + +#: editforum.php:47 +msgid "Forum created." +msgstr "Fórum létrejött." + +#: deleteforum.php:68 +msgid "Forum deleted." +msgstr "Fórum törölve." + +#: deleteforum.php:49 templates/moderators/moderators.php:9 +#: lib/Forms/Forum.php:29 +msgid "Forum name" +msgstr "Fórum neve" + +#: deleteforum.php:71 +msgid "Forum not deleted." +msgstr "Fórum megtartva." + +#: templates/common-header.inc:27 templates/forums/forums.php:9 +#: lib/api.php:154 lib/Block/forums.php:3 lib/Block/forums.php:28 +msgid "Forums" +msgstr "Fórumok" + +#: config/prefs.php.dist:22 +msgid "Forums View" +msgstr "Fórum nézet" + +#: rss/index.php:28 +#, php-format +msgid "Forums in %s" +msgstr "Fórum nézet itt: %s" + +#: lib/Messages.php:1490 +msgid "From" +msgstr "Küldte: " + +#: templates/threads/threads.php:44 +msgid "Goto page:" +msgstr "Ugrás ide:" + +#: messages/index.php:158 messages/index.php:167 +msgid "Hide bodies" +msgstr "Szöveg elrejtése" + +#: lib/Messages.php:841 +msgid "Hot thread" +msgstr "Friss szál" + +#: lib/Forms/Forum.php:40 +msgid "If selected users will be able to attach files to their messages." +msgstr "A kiválasztott felhasználók csatolhatnak fájlokat az üzeneteikhez." + +#: messages/edit.php:112 +msgid "" +"Invalid parent message, you will be posting this message as a new thread." +msgstr "Érvénytelen eredeti üzenet. Új szálon indul az üzeneted." + +#: lib/Forms/Forum.php:38 +msgid "Is this a moderated forum?" +msgstr "Moderált fórum?" + +#: lib/Forms/Search.php:43 +msgid "Keywords" +msgstr "Kulcsszavak" + +#: config/prefs.php.dist:92 +msgid "Last Message" +msgstr "Legutolsó üzenet" + +#: forums.php:56 lib/Block/forums.php:87 +msgid "Last Post" +msgstr "Legutolsó Bejegyzés" + +#: threads.php:61 config/prefs.php.dist:129 +msgid "Last post" +msgstr "Legutolsó bejegyzés" + +#: lib/Messages.php:931 +msgid "Lock" +msgstr "Zárolás" + +#: messages/index.php:125 +msgid "Lock thread" +msgstr "Szál zárolása" + +#: messages/lock.php:48 +#, php-format +msgid "Locking thread \"%s\"" +msgstr "\"%s\" szál zárolása" + +#: lib/Agora.php:347 +msgid "Malformed avatar." +msgstr "Hibás avatár" + +#: lib/Agora.php:370 +msgid "Malformed database entry." +msgstr "Hibás adatbázis-bejegyzés" + +#: scripts/phorum2agora.php:214 +msgid "" +"Mandatory arguments to long options are mandatory for short options too." +msgstr "A kötelezõ hosszú opciók rövid alakja is kötelezõ." + +#: messages/merge.php:47 messages/merge.php:73 lib/Messages.php:942 +msgid "Merge" +msgstr "Összefésül" + +#: messages/merge.php:46 +#, php-format +msgid "Merge \"%s\" with another thread" +msgstr "A(z) \"%s\" szál összefûzése másik szállal" + +#: lib/Messages.php:1503 +msgid "Message" +msgstr "Üzenet" + +#: messages/abuse.php:79 +#, php-format +msgid "Message %s reported as abuse" +msgstr "A(z) %s üzenet megjelölve helytelennek." + +#: lib/Messages.php:503 +#, php-format +msgid "Message ID \"%d\" not found" +msgstr "\"%d\" azonosítójú üzenet nincs" + +#: config/prefs.php.dist:44 +msgid "Message View" +msgstr "Üzenet nézet" + +#: messages/delete.php:65 lib/api.php:747 +msgid "Message deleted." +msgstr "Üzenet törölve." + +#: messages/delete.php:55 lib/api.php:752 +msgid "Message not deleted." +msgstr "Üzenet nem törlõdött" + +#: messages/edit.php:85 lib/api.php:640 +msgid "Message posted." +msgstr "Üzenet elküldve" + +#: templates/messages/index.php:1 config/prefs.php.dist:91 +msgid "Messages" +msgstr "Üzenetek" + +#: moderate.php:82 templates/moderate/moderate.php:11 +msgid "Messages Awaiting Moderation" +msgstr "Üzenetek várnak moderálásra" + +#: lib/Messages.php:1783 +msgid "Moderate" +msgstr "Moderálás" + +#: moderators.php:76 templates/messages/message.php:21 +#: templates/messages/flat.php:26 templates/messages/flat_thread.php:10 +#: lib/Tree/flat.php:117 +msgid "Moderator" +msgstr "Moderátor" + +#: moderators.php:70 templates/moderators/moderators.php:4 +#: templates/moderators/moderators.php:10 templates/forums/forums.php:39 +msgid "Moderators" +msgstr "Moderátorok" + +#: messages/move.php:47 messages/move.php:59 lib/Messages.php:938 +msgid "Move" +msgstr "Mozgat" + +#: messages/move.php:46 +#, php-format +msgid "Move \"%s\" to another forum" +msgstr "A(z) \"%s\" mozgatása másik fórumba" + +#: config/prefs.php.dist:10 +msgid "My Information" +msgstr "Adataim" + +#: editforum.php:25 +msgid "New Forum" +msgstr "Új fórum" + +#: lib/Messages.php:1753 +msgid "New Post" +msgstr "Új bejegyzés" + +#: lib/Agora.php:253 +msgid "New Thread" +msgstr "Új szál" + +#: lib/Messages.php:842 +msgid "New posts" +msgstr "Új bejegyzések" + +#: config/prefs.php.dist:189 +msgid "No" +msgstr "Nem" + +#: lib/Block/threads.php:121 +msgid "No available threads." +msgstr "Nincs elérhetõ szál" + +#: lib/Block/threads.php:100 +msgid "No forum selected" +msgstr "Nincs fórum kiválasztva." + +#: templates/forums/forums.php:60 +msgid "No forums have been created." +msgstr "Nem készült el a fórum." + +#: config/prefs.php.dist:209 +msgid "No graphical emoticons" +msgstr "Nincsenek smiley-k" + +#: moderate.php:54 +msgid "No messages are waiting for moderation." +msgstr "Nem vár üzenet moderálásra" + +#: messages/abuse.php:39 +msgid "No moderators are associated with this forum." +msgstr "Nincs moderátor rendelve ehhez a fórumhoz." + +#: templates/moderators/moderators.php:27 +msgid "No moderators have been created." +msgstr "Nincsenek moderátorok." + +#: templates/block/threads.php:32 +msgid "No threads" +msgstr "Nincsenek szálak." + +#: messages/lock.php:51 +msgid "No, do not allow replies" +msgstr "Nem, nem engedélyezem a válaszokat" + +#: config/prefs.php.dist:114 +msgid "Number of forums to display on each page" +msgstr "Az egy lapon megjelenített fórumok száma:" + +#: config/prefs.php.dist:201 +msgid "Number of message to display on each page" +msgstr "Az egy lapon megjelenített üzenetek száma:" + +#: config/prefs.php.dist:157 config/prefs.php.dist:278 +msgid "Number of messages to display on each page" +msgstr "Az egy lapon megjelenített üzenetek száma:" + +#: config/prefs.php.dist:148 +msgid "Number of views in 24hrs to trigger a 'hot-thread':" +msgstr "24 órán belöli ránézések száma a 'forró szál' bekapcsolásához:" + +#: lib/Block/forums.php:35 +msgid "Only display this many forums (0 to display all forums)" +msgstr "Csak bizonyos fórumokon jelenjen meg (0 esetén minden fórumon látható)" + +#: lib/Block/threads.php:53 +msgid "Only display this many threads (0 to display all threads)" +msgstr "Csak bizonyos szálakban jelenjen meg (0 esetén minden szálban látható)" + +#: templates/forums/forums.php:34 +msgid "Options" +msgstr "Beállítások" + +#: lib/Messages.php:889 +#, php-format +msgid "Page %d" +msgstr "%d. oldal" + +#: lib/Forms/Forum.php:32 +msgid "Parent forum" +msgstr "Elõzõ fórum" + +#: lib/Messages.php:1472 +msgid "Post" +msgstr "Küld" + +#: lib/api.php:613 +msgid "Post a New Message" +msgstr "Új üzenet küldése" + +#: messages/edit.php:71 +#, php-format +msgid "Post a New Message to \"%s\"" +msgstr "Új üzenet %s részére" + +#: messages/edit.php:69 messages/index.php:213 +#, php-format +msgid "Post a Reply to \"%s\"" +msgstr "Válasz \"%s\"-nek" + +#: lib/Messages.php:1448 lib/Messages.php:1753 +msgid "Post message" +msgstr "Üzenet küldése" + +#: forums.php:56 moderate.php:62 templates/messages/flat.php:22 +#: templates/messages/flat_thread.php:7 messages/index.php:146 +#: lib/Comments.php:85 lib/api.php:433 lib/Block/threads.php:125 +#: lib/Block/forums.php:87 lib/Block/thread.php:84 lib/Tree/flat.php:112 +#: config/prefs.php.dist:93 config/prefs.php.dist:126 +#: config/prefs.php.dist:169 config/prefs.php.dist:257 +msgid "Posted by" +msgstr "Beküldte:" + +#: messages/index.php:87 lib/Messages.php:548 +#, php-format +msgid "Posted by %s on %s" +msgstr "Beküldte: %s, ekkor: %s" + +#: threads.php:61 forums.php:56 lib/Block/forums.php:87 +#: config/prefs.php.dist:127 +msgid "Posts" +msgstr "Bejegyzések" + +#: lib/Messages.php:1495 +msgid "Quote" +msgstr "Idéz" + +#: messages/index.php:113 lib/Messages.php:911 +msgid "Reply" +msgstr "Válasz" + +#: lib/Messages.php:911 +msgid "Reply to message" +msgstr "Válasz az üzenetre" + +#: messages/abuse.php:47 messages/abuse.php:48 lib/Messages.php:917 +msgid "Report as abuse" +msgstr "Helytelennek jelöl" + +#: lib/Forms/Search.php:44 +msgid "Require all keywords?" +msgstr "Mindegyik kulcsszó kell?" + +#: lib/Messages.php:1472 +msgid "Save" +msgstr "Mentés" + +#: lib/Forms/Search.php:57 +msgid "Search" +msgstr "Keresés" + +#: search.php:70 lib/Forms/Search.php:33 +msgid "Search Forums" +msgstr "Fórum keresése" + +#: templates/search/search.php:5 +msgid "Search Results" +msgstr "Keresés eredménye" + +#: lib/Forms/Search.php:52 +msgid "Search in message contents?" +msgstr "Keressen az üzenet tartalmában?" + +#: lib/Forms/Search.php:48 +msgid "Search in subjects?" +msgstr "Keresés a tárgyban is?" + +#: lib/Forms/Search.php:37 +msgid "Search in these forums" +msgstr "Keresés ezekben a fórumokban" + +#: config/prefs.php.dist:12 +msgid "Set the avatar image that is shown with your posts." +msgstr "Válasszon egy avatárt ami a bejegyzései mellett fog megjelenni." + +#: lib/Forms/Forum.php:38 +msgid "" +"Set this if you want all messages to be checked by a moderator before they " +"are posted." +msgstr "" +"Akkor állítsa ezt be, ha szeretné, hogy minden üzenet moderálva legyen " +"beküldés elõtt." + +#: config/prefs.php.dist:23 +msgid "Set your options for the forums view." +msgstr "Beállítások fórum nézethez" + +#: config/prefs.php.dist:45 +msgid "Set your options for the message view." +msgstr "Beállítások üzenet nézethez" + +#: config/prefs.php.dist:37 config/prefs.php.dist:52 +msgid "Set your options for the single thread view." +msgstr "Az egyszálas nézet beállítása." + +#: config/prefs.php.dist:30 +msgid "Set your options for the threads view." +msgstr "A szálak nézetének beállítása." + +#: config/prefs.php.dist:210 +msgid "Show graphical emoticons" +msgstr "Smiley-k megjelenítése" + +#: lib/Block/thread.php:3 lib/Block/thread.php:53 +msgid "Single Thread" +msgstr "Szimpla szál" + +#: config/prefs.php.dist:36 +msgid "Single Thread View" +msgstr "Szimpla szál nézet" + +#: lib/Agora.php:192 +msgid "Sort Ascending" +msgstr "Növekvõ sorrend" + +#: lib/Agora.php:192 +msgid "Sort Descending" +msgstr "Csökkenõ sorrend" + +#: lib/Comments.php:65 +msgid "Sort by" +msgstr "Rendezés eszerint:" + +#: lib/Agora.php:200 lib/Agora.php:207 +#, php-format +msgid "Sort by %s" +msgstr "Rendezés %s szerint" + +#: lib/Comments.php:71 +msgid "Sort direction" +msgstr "Alapértelmezett rendezési irány:" + +#: lib/Messages.php:1517 lib/Forms/Message.php:24 +msgid "Spam protection" +msgstr "Spam védelem" + +#: messages/split.php:47 messages/split.php:55 lib/Messages.php:947 +msgid "Split" +msgstr "Kettévág" + +#: messages/split.php:46 +#, php-format +msgid "Split \"%s\"" +msgstr "Vágd el: \"%s\"" + +#: threads.php:61 +msgid "Started" +msgstr "Elindítva" + +#: deleteforum.php:57 +msgid "Subforums" +msgstr "Alfórumok" + +#: threads.php:61 moderate.php:62 messages/index.php:146 lib/Comments.php:69 +#: lib/Comments.php:83 lib/Messages.php:1497 lib/Messages.php:1500 +#: lib/api.php:431 lib/Block/threads.php:125 lib/Block/thread.php:84 +#: config/prefs.php.dist:125 config/prefs.php.dist:168 +#: config/prefs.php.dist:256 +msgid "Subject" +msgstr "Tárgy" + +#: lib/Agora.php:229 +msgid "The VFS backend needs to be configured to enable attachment uploads." +msgstr "A VFS backendet konfigurálni kell a csatolások egedélyezéséhez." + +#: config/prefs.php.dist:64 +msgid "The location of your avatar image." +msgstr "Az ön avatárjának a helye" + +#: lib/Block/forums.php:78 +msgid "There are no forums." +msgstr "Nincsenek fórumok" + +#: templates/threads/threads.php:69 +msgid "There are no threads in this forum." +msgstr "Nincsenek szálak ebben a fórumban" + +#: lib/Messages.php:162 +msgid "This thread has been locked." +msgstr "Szál zárolva" + +#: deleteforum.php:48 +msgid "This will delete the forum, any subforums and all relative messages." +msgstr "" +"Ez törli a fórumot annak összes alfórumával és minden üzenetével együtt." + +#: messages/index.php:146 messages/index.php:159 lib/Comments.php:61 +#: lib/Block/thread.php:33 lib/Block/thread.php:84 config/prefs.php.dist:124 +#: config/prefs.php.dist:167 config/prefs.php.dist:247 +msgid "Thread" +msgstr "Szál" + +#: messages/merge.php:78 +#, php-format +msgid "Thread %s merged with thread %s after message %s." +msgstr "AZz) %s szál össze lett fésülve a(z) %s szállal a(z) %s. üzenet után" + +#: messages/move.php:64 +#, php-format +msgid "Thread %s moved to from forum %s to %s." +msgstr "A(z) %s szál átkerült a(z) %s fórumból a(z) %s fórumba." + +#: templates/messages/index.php:10 lib/Block/thread.php:91 +msgid "Thread List" +msgstr "Szálak listája" + +#: templates/messages/message.php:34 +msgid "Thread Summary" +msgstr "Szál összegzése" + +#: messages/delete.php:70 +msgid "Thread deleted." +msgstr "Szál zárolva." + +#: messages/index.php:205 messages/lock.php:63 +msgid "Thread locked." +msgstr "Szál zárolva." + +#: messages/split.php:60 +#, php-format +msgid "Thread splitted by message %s." +msgstr "A szál elvágva a(z) %s üzenet mentén." + +#: messages/lock.php:65 +msgid "Thread unlocked." +msgstr "Szál feloldva" + +#: forums.php:56 templates/threads/threads.php:1 lib/Comments.php:77 +#: lib/Block/threads.php:3 lib/Block/threads.php:72 lib/Block/threads.php:78 +msgid "Threads" +msgstr "Szálak" + +#: config/prefs.php.dist:29 +msgid "Threads View" +msgstr "Szál nézet" + +#: lib/Block/threads.php:82 +#, php-format +msgid "Threads in \"%s\"" +msgstr "Szálak \"%s\"-ban" + +#: threads.php:68 threads.php:81 rss/threads.php:48 +#, php-format +msgid "Threads in %s" +msgstr "Szálak %s-ban" + +#: lib/Block/thread.php:72 +msgid "Unable to fetch selected thread." +msgstr "Nem lehet a kért szálat megnyitni" + +#: lib/Block/threads.php:106 +msgid "Unable to fetch threads for selected forum." +msgstr "Nem lehet a kért fórumot megnyitni" + +#: lib/Messages.php:931 +msgid "Unlock" +msgstr "Szál feloldása" + +#: messages/index.php:125 +msgid "Unlock thread" +msgstr "Szál feloldása" + +#: messages/lock.php:49 lib/Forms/Forum.php:26 +msgid "Update" +msgstr "Frissít" + +#: config/prefs.php.dist:79 +msgid "Upload your own avatar image." +msgstr "Saját avatár feltöltése" + +#: scripts/phorum2agora.php:212 +#, php-format +msgid "Usage: %s [OPTIONS]..." +msgstr "Használat: %s [OPCIÓK]..." + +#: ban.php:65 +msgid "User" +msgstr "Felhasználó" + +#: lib/Comments.php:59 +msgid "View" +msgstr "Nézetek" + +#: messages/index.php:184 +msgid "View bodies" +msgstr "Szöveg megjelenítése" + +#: threads.php:61 +msgid "Views" +msgstr "Nézetek" + +#: messages/merge.php:57 +msgid "With Thread: " +msgstr "Ezzel a szállal: " + +#: config/prefs.php.dist:190 +msgid "Yes" +msgstr "Igen" + +#: messages/lock.php:51 +msgid "Yes, allow replies" +msgstr "Igen, engedélyezem a válaszokat" + +#: config/prefs.php.dist:191 +msgid "Yes, and don't thread them" +msgstr "Igen, de ne kerüljenek szálba." + +#: lib/Messages.php:1661 +#, php-format +msgid "You don't have permission to access messages in forum %s." +msgstr "Nincs jogod az üzenetek eléréséhez a(z) %s fórumban." + +#: messages/merge.php:38 messages/move.php:38 messages/lock.php:40 +#: messages/delete.php:40 messages/split.php:38 lib/Messages.php:569 +#: lib/Messages.php:738 lib/api.php:725 +#, php-format +msgid "You don't have permission to delete messages in forum %s." +msgstr "Nincs jogod az üzenetek törléséhez a(z) %s fórumban." + +#: messages/edit.php:39 messages/index.php:199 lib/Messages.php:167 +#: lib/api.php:591 +#, php-format +msgid "You don't have permission to post messages in forum %s." +msgstr "Nincs jogod az üzenetek küldéséhez a(z) %s fórumba." + +#: lib/Messages.php:813 +#, php-format +msgid "You don't have permission to read messages in forum %s." +msgstr "Nincs jogod az üzenetek olvasásához a(z) %s fórumban." + +#: ban.php:30 +#, php-format +msgid "You don't have permissions to ban users from forum %s." +msgstr "Nincs jogod a felhasználók tiltásához a(z) %s fórumban." + +#: editforum.php:35 +#, php-format +msgid "You don't have permissions to create a new forum in %s" +msgstr "Nincs jogod fórum kreálásához itt: %s." + +#: deleteforum.php:27 +#, php-format +msgid "You don't have permissions to delete forums in %s" +msgstr "Nincs jogod fórum törléséhez itt: %s." + +#: editforum.php:31 +#, php-format +msgid "You don't have permissions to edit forum %s" +msgstr "Nincs jogod a(z) %s fórum szerkesztéséhez." + +#: lib/Agora.php:246 +msgid "_Forums" +msgstr "_Fórumok" + +#: lib/Agora.php:263 +msgid "_Moderate" +msgstr "_Moderálás" + +#: lib/Agora.php:267 +msgid "_Moderators" +msgstr "_Moderátorok" + +#: lib/Agora.php:258 +msgid "_New Forum" +msgstr "Ú_J fórum" + +#: lib/Agora.php:271 +msgid "_Search" +msgstr "_Keresés" + +#: lib/Agora.php:251 +msgid "_Threads" +msgstr "_Szálak" + +#: templates/forums/forums.php:51 templates/threads/threads.php:60 +msgid "by" +msgstr "by" + +#: lib/Messages.php:1610 +msgid "download" +msgstr "letölt" + +#: templates/messages/flat.php:23 templates/messages/flat_thread.php:8 +#: lib/Tree/flat.php:113 +msgid "on: " +msgstr "itt: " + +#: lib/Messages.php:1611 +#, php-format +msgid "size: %s" +msgstr "méret: %s" + +#: lib/Messages.php:1611 +#, php-format +msgid "type: %s" +msgstr "típus: %s" diff --git a/agora/po/it_IT.po b/agora/po/it_IT.po new file mode 100644 index 000000000..f5c44aa91 --- /dev/null +++ b/agora/po/it_IT.po @@ -0,0 +1,617 @@ +# Italian translations for op package. +# Copyright 2003-2009 The Horde Project +# This file is distributed under the same license as the op package. +# Automatically generated, 2003. +# +msgid "" +msgstr "" +"Project-Id-Version: agora cvs-0.1\n" +"Report-Msgid-Bugs-To: dev@lists.horde.org\n" +"POT-Creation-Date: 2004-10-18 00:24+0200\n" +"PO-Revision-Date: 2004-09-07 09:59+0100\n" +"Last-Translator: jacopo \n" +"Language-Team: Horde i18n \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=iso-8859-1\n" +"Content-Transfer-Encoding: 8bit\n" + +#: lib/Forums.php:170 +msgid "-- Top Level --" +msgstr "-- Primo Livello --" + +#: lib/api.php:73 +msgid "Admin" +msgstr "Admin" + +#: forums.php:58 +msgid "All Forums" +msgstr "Tutti i Forum" + +#: editforum.php:46 +msgid "Allow attachments in this forum?" +msgstr "Permiti gli allegati in questo forum?" + +#: messages/lock.php:64 +msgid "Allow replies in this thread" +msgstr "Permetti le risposte in questa discussione" + +#: moderate.php:64 +msgid "Approve" +msgstr "Approva" + +#: config/prefs.php.dist:55 config/prefs.php.dist:85 config/prefs.php.dist:131 +msgid "Ascending" +msgstr "Crescente" + +#: lib/Messages.php:775 +msgid "Attachment" +msgstr "Allegato" + +#: moderate.php:55 +msgid "Body" +msgstr "Corpo" + +#: lib/Forums.php:74 +msgid "Can not create a forum with an empty name." +msgstr "Non puoi creare un forum senza nome" + +#: lib/Messages.php:89 +msgid "Can not create a message without a message thread." +msgstr "Non era possibile creare un messaggio senza una discussione." + +#: messages/delete.php:61 messages/delete.php:83 +msgid "Cancel" +msgstr "Cancella" + +#: lib/api.php:207 +msgid "Comments" +msgstr "Commenti" + +#: editforum.php:55 +#, php-format +msgid "Could not create the forum. %s" +msgstr "Non puoi creare il forum. %s" + +#: deleteforum.php:62 +#, php-format +msgid "Could not delete the forum. %s" +msgstr "Non era possibile eliminare il forum. %s" + +#: messages/delete.php:45 messages/delete.php:75 +#, php-format +msgid "Could not delete the message. %s" +msgstr "Non era possibile eliminare il messaggio. %s" + +#: threads.php:30 +#, php-format +msgid "Could not list threads. %s" +msgstr "Non era possibile elencare le discussioni. %s" + +#: messages/lock.php:45 messages/lock.php:73 +#, php-format +msgid "Could not lock the thread. %s" +msgstr "Non era possibile chiudere la discussione. %s" + +#: messages/index.php:23 messages/message.php:25 +#, php-format +msgid "Could not open the message. %s" +msgstr "Non era possibile aprire il messaggio. %s" + +#: messages/edit.php:78 lib/api.php:327 +#, php-format +msgid "Could not post the message. %s" +msgstr "Non era possibile inviare il messaggio. %s" + +#: messages/edit.php:30 lib/api.php:295 +#, php-format +msgid "Could not post the message: %s" +msgstr "Non era possibile inviare il messaggio: %s" + +#: editforum.php:36 +msgid "Create" +msgstr "Crea" + +#: lib/Messages.php:771 +msgid "Current attachment" +msgstr "Allegato attuale" + +#: forums.php:42 threads.php:58 moderate.php:55 messages/index.php:44 +#: messages/message.php:47 lib/api.php:196 lib/Block/forums.php:71 +#: lib/Block/thread.php:101 lib/Block/threads.php:118 config/prefs.php.dist:46 +#: config/prefs.php.dist:76 config/prefs.php.dist:122 +msgid "Date" +msgstr "Data" + +#: config/prefs.php.dist:47 +msgid "Default forums view sort:" +msgstr "Criteri di ordinamento di default per i forum:" + +#: config/prefs.php.dist:57 config/prefs.php.dist:87 config/prefs.php.dist:133 +msgid "Default sorting direction:" +msgstr "Ordine di default:" + +#: config/prefs.php.dist:77 config/prefs.php.dist:123 +msgid "Default threads view sort:" +msgstr "Criteri di ordinamento di default per le discussioni:" + +#: deleteforum.php:42 deleteforum.php:55 moderate.php:65 +#: messages/delete.php:61 messages/delete.php:65 messages/message.php:77 +msgid "Delete" +msgstr "Elimina" + +#: messages/delete.php:58 +#, php-format +msgid "Delete '%s' and all replies?" +msgstr "Elimina '%s' e tutte le risposte?" + +#: deleteforum.php:39 lib/Messages.php:736 +msgid "Delete Forum" +msgstr "Elimina Forum" + +#: lib/Forums.php:243 +msgid "Delete forum" +msgstr "Elimina forum" + +#: lib/Messages.php:435 +msgid "Delete message" +msgstr "Elimina messaggio" + +#: lib/Messages.php:770 +msgid "Delete the existing attachment?" +msgstr "Elimina l'allegato attuale?" + +#: config/prefs.php.dist:56 config/prefs.php.dist:86 config/prefs.php.dist:132 +msgid "Descending" +msgstr "Discendente" + +#: forums.php:42 +msgid "Description" +msgstr "Descrizione" + +#: config/prefs.php.dist:9 config/prefs.php.dist:16 config/prefs.php.dist:23 +#: config/prefs.php.dist:30 +msgid "Display Options" +msgstr "Opzioni di Visualizzazione" + +#: config/prefs.php.dist:103 +msgid "Display full message bodies in the thread list view?" +msgstr "Mostra il corpo intero di messaggi nel elenco di discussioni?" + +#: config/prefs.php.dist:143 +msgid "Display graphical emoticons?" +msgstr "Visualizza le faccine grafiche?" + +#: deleteforum.php:42 deleteforum.php:70 +msgid "Do not delete" +msgstr "Non eliminare" + +#: messages/message.php:74 +msgid "Edit" +msgstr "Modifica" + +#: editforum.php:30 lib/Forums.php:239 lib/Messages.php:734 +msgid "Edit Forum" +msgstr "Modifica Forum" + +#: lib/api.php:301 +msgid "Edit Message" +msgstr "Modifica Messaggio" + +#: messages/edit.php:65 +#, php-format +msgid "Edit Message in \"%s\"" +msgstr "Modifica Messaggio in \"%s\"" + +#: lib/Forums.php:239 +msgid "Edit forum" +msgstr "Modifica forum" + +#: lib/Messages.php:431 +msgid "Edit message" +msgstr "Modifica messaggio" + +#: editforum.php:43 +msgid "Enter a brief description of this forum" +msgstr "Inserisci una descrizione breva di questo forum" + +#: forums.php:42 +msgid "Flat" +msgstr "Piatto" + +#: forums.php:42 moderate.php:55 lib/Block/forums.php:71 +#: lib/Block/threads.php:49 config/prefs.php.dist:42 +msgid "Forum" +msgstr "Forum" + +#: editforum.php:57 +msgid "Forum Modified" +msgstr "Forum Modificato" + +#: editforum.php:57 +msgid "Forum created." +msgstr "Forum creato." + +#: deleteforum.php:64 +msgid "Forum deleted." +msgstr "Forum eliminato." + +#: deleteforum.php:45 editforum.php:38 +msgid "Forum name" +msgstr "Nome forum" + +#: deleteforum.php:71 +msgid "Forum not deleted." +msgstr "Forum non eliminato." + +#: lib/Agora.php:228 lib/Block/forums.php:3 lib/Block/forums.php:28 +#: templates/forums/forums.html:24 +msgid "Forums" +msgstr "Forum" + +#: config/prefs.php.dist:10 +msgid "Forums View" +msgstr "Visualizza i Forum" + +#: lib/Messages.php:762 +msgid "From" +msgstr "Da" + +#: lib/Messages.php:440 +msgid "Hot thread" +msgstr "Discussione scottante" + +#: editforum.php:46 +msgid "If selected users will be able to attach files to their messages." +msgstr "Se selezionato, gli utente potranno allegare i file a loro messaggi." + +#: messages/edit.php:107 +msgid "" +"Invalid parent message, you will be posting this message as a new thread." +msgstr "" +"Messaggio originale invalido, questo messaggio sara' inviato come una nuova " +"discussione." + +#: editforum.php:44 +msgid "Is this a moderated forum?" +msgstr "Questo e' un forum moderato?" + +#: config/prefs.php.dist:44 +msgid "Last Message" +msgstr "Ultimo Messaggio" + +#: forums.php:42 lib/Block/forums.php:71 +msgid "Last Post" +msgstr "Ultimo Messaggio" + +#: messages/index.php:53 messages/message.php:80 +msgid "Lock thread" +msgstr "Chiudi la discussione" + +#: messages/lock.php:58 +#, php-format +msgid "Locking thread '%s'" +msgstr "Chiusura della discussione '%s'" + +#: lib/Messages.php:765 +msgid "Message" +msgstr "Messaggio" + +#: config/prefs.php.dist:31 +msgid "Message View" +msgstr "Visualizzazione Messaggio" + +#: messages/delete.php:77 +msgid "Message deleted." +msgstr "Messaggio eliminato." + +#: messages/index.php:27 messages/message.php:29 +msgid "Message does not exist." +msgstr "Messaggio inesistente." + +#: messages/delete.php:84 +msgid "Message not deleted." +msgstr "Messaggio non eliminato." + +#: messages/edit.php:80 lib/api.php:329 +msgid "Message posted." +msgstr "Messaggio inserito." + +#: config/prefs.php.dist:43 +msgid "Messages" +msgstr "Messaggi" + +#: moderate.php:84 +msgid "Messages Awaiting Moderation" +msgstr "Messaggi In Attesa di Moderazione" + +#: lib/Agora.php:242 +msgid "Moderate" +msgstr "Moderare" + +#: editforum.php:30 lib/Agora.php:240 +msgid "New Forum" +msgstr "Nuovo Forum" + +#: lib/Agora.php:234 +msgid "New Thread" +msgstr "Nuova Discussione" + +#: lib/Block/forums.php:62 +msgid "No available forums." +msgstr "Nessun forum disponibile." + +#: lib/Block/threads.php:109 +msgid "No available threads." +msgstr "Nessuna discussione disponibile." + +#: forums.php:35 +msgid "No forums available." +msgstr "Nessun forum disponibile." + +#: config/prefs.php.dist:141 +msgid "No graphical emoticons" +msgstr "Nessun emoticon grafico" + +#: moderate.php:48 +msgid "No messages to moderate available." +msgstr "Nessun messaggio da moderare è disponibile." + +#: templates/block/threads.html:26 +msgid "No threads" +msgstr "Nessuna discussione" + +#: threads.php:51 +msgid "No threads available." +msgstr "Nessuna discussione disponibile." + +#: messages/lock.php:64 +msgid "No, do not allow replies" +msgstr "No, non permettere le risposte" + +#: config/prefs.php.dist:65 +msgid "Number of forums to display on each page" +msgstr "Numero di forum da mostrare su ogni pagina" + +#: config/prefs.php.dist:111 +msgid "Number of threads to display on each page" +msgstr "Numero di discussioni da mostrare su ogni pagina" + +#: config/prefs.php.dist:95 +msgid "Number of views in 24hrs to trigger a 'hot-thread':" +msgstr "" +"Numero di visualizzazioni in 24 ore per segnalare una 'discussione scottante'" + +#: lib/Block/forums.php:35 +msgid "Only display this many forums (0 to display all forums)" +msgstr "Mostra solo questo numero di forum (0 per mostrare tutti i forum)" + +#: lib/Block/threads.php:57 +msgid "Only display this many threads (0 to display all threads)" +msgstr "" +"Mostra solo questo numero di discussioni (0 per mostrare tutti le " +"discussioni)" + +#: editforum.php:42 +msgid "Parent forum" +msgstr "Forum " + +#: lib/Messages.php:748 +msgid "Post" +msgstr "Inserisci" + +#: lib/api.php:301 +msgid "Post a New Message" +msgstr "Inserisci un Nuovo Messaggio" + +#: messages/edit.php:66 +#, php-format +msgid "Post a New Message to \"%s\"" +msgstr "Inserisci un Nuovo Messaggio in \"%s\"" + +#: messages/edit.php:64 +#, php-format +msgid "Post a Reply to \"%s\"" +msgstr "Inserisci una Risposta a \"%s\"" + +#: lib/Forums.php:234 lib/Messages.php:730 lib/Block/threads.php:80 +msgid "Post message" +msgstr "Inserisci Messagio" + +#: forums.php:42 threads.php:58 moderate.php:55 messages/index.php:44 +#: messages/message.php:47 lib/api.php:194 lib/Block/forums.php:71 +#: lib/Block/thread.php:101 lib/Block/threads.php:118 config/prefs.php.dist:45 +#: config/prefs.php.dist:75 config/prefs.php.dist:121 +msgid "Posted By" +msgstr "Inviato Da" + +#: messages/message.php:54 lib/Messages.php:265 +#, php-format +msgid "Posted by %s on %s" +msgstr "Inserito da %s il %s:" + +#: templates/messages/form.html:35 +msgid "Posted by on " +msgstr "Inserito da il " + +#: forums.php:42 lib/Block/forums.php:71 +msgid "Posts" +msgstr "Messaggi" + +#: messages/message.php:69 +msgid "Reply" +msgstr "Rispondi" + +#: lib/Messages.php:425 +msgid "Reply to message" +msgstr "Rispondi al messaggio" + +#: lib/Messages.php:264 +#, php-format +msgid "Replying to \"%s\"" +msgstr "Rispondi a \"%s\"" + +#: lib/Messages.php:748 +msgid "Save" +msgstr "Salva" + +#: editforum.php:44 +msgid "" +"Set this if you want all messages to be checked by a moderator before they " +"are posted." +msgstr "" +"Imposta questo se vuoi che tutti i messaggi vengano controllati da un " +"moderatore prima di essere inseriti." + +#: config/prefs.php.dist:11 +msgid "Set your options for the forums view." +msgstr "Imposta le tue opzioni per la visualizzazione di forum." + +#: config/prefs.php.dist:32 +msgid "Set your options for the message view." +msgstr "Imposta le tue opzioni per la visualizzazione del messaggio." + +#: config/prefs.php.dist:25 +msgid "Set your options for the single thread view." +msgstr "" +"Imposta le tue opzioni per la visualizzazione di una singola discussione." + +#: config/prefs.php.dist:18 +msgid "Set your options for the threads view." +msgstr "Imposta le tue opzioni per la visualizzazione di discussioni." + +#: config/prefs.php.dist:142 +msgid "Show graphical emoticons" +msgstr "Mostra emoticon grafici" + +#: lib/Block/thread.php:3 lib/Block/thread.php:65 +msgid "Single Thread" +msgstr "Discussione Singola" + +#: config/prefs.php.dist:24 +msgid "Single Thread View" +msgstr "Visualizzazione una Singola Discussione" + +#: lib/Agora.php:180 +msgid "Sort Ascending" +msgstr "Ordina Crescente" + +#: lib/Agora.php:180 +msgid "Sort Descending" +msgstr "Ordina Discendente" + +#: lib/Agora.php:188 lib/Agora.php:194 +#, php-format +msgid "Sort by %s" +msgstr "Ordina per %s" + +#: deleteforum.php:51 +msgid "Subforums" +msgstr "Sotto-forum" + +#: threads.php:58 moderate.php:55 messages/index.php:44 +#: messages/message.php:47 lib/Messages.php:764 lib/api.php:192 +#: lib/Block/thread.php:101 lib/Block/threads.php:118 config/prefs.php.dist:74 +#: config/prefs.php.dist:120 +msgid "Subject" +msgstr "Oggetto" + +#: lib/Agora.php:216 +msgid "The VFS backend needs to be configured to enable attachment uploads." +msgstr "" + +#: templates/moderate/moderate.html:24 +msgid "The following messages are waiting for approval" +msgstr "I seguenti messaggi sono in attesa di essere approvati" + +#: deleteforum.php:44 +msgid "This will delete the forum, any subforums and all relative messages." +msgstr "" +"Questo eliminerà il forum, qualsiasi sotto-forum e tutti i relativi " +"messaggi." + +#: messages/index.php:44 messages/message.php:47 lib/Block/thread.php:47 +#: lib/Block/thread.php:68 lib/Block/thread.php:101 config/prefs.php.dist:73 +#: config/prefs.php.dist:119 +msgid "Thread" +msgstr "Thread" + +#: messages/index.php:68 lib/Block/thread.php:108 +#: templates/messages/index.html:23 +msgid "Thread List" +msgstr "Elenco Discussioni" + +#: templates/messages/message.html:47 +msgid "Thread Summary" +msgstr "Riassunto Discussione" + +#: messages/lock.php:76 +msgid "Thread locked." +msgstr "Discussione chiusa." + +#: messages/lock.php:78 +msgid "Thread unlocked." +msgstr "Discussione aperta." + +#: lib/Agora.php:232 lib/Block/threads.php:3 lib/Block/threads.php:71 +msgid "Threads" +msgstr "Discussioni" + +#: config/prefs.php.dist:17 +msgid "Threads View" +msgstr "Visualizzazione Discussioni" + +#: lib/Block/threads.php:75 +#, php-format +msgid "Threads in \"%s\"" +msgstr "Discussioni in \"%s\"" + +#: threads.php:80 +#, php-format +msgid "Threads in %s" +msgstr "Discussioni in %s" + +#: templates/threads/threads.html:23 +msgid "Threads in " +msgstr "Discussioni in " + +#: lib/Block/thread.php:90 +msgid "Unable to fetch selected thread." +msgstr "Impossibile accedere alla discussione selezionata." + +#: lib/Block/threads.php:100 +msgid "Unable to fetch threads for selected forum." +msgstr "Impossibile accedere alle discussioni per il forum selezionato." + +#: messages/index.php:53 messages/message.php:80 +msgid "Unlock thread" +msgstr "Apri la discussione" + +#: editforum.php:36 messages/lock.php:61 +msgid "Update" +msgstr "Aggiorna" + +#: messages/lock.php:64 +msgid "Yes, allow replies" +msgstr "Si, permetti le risposte" + +#: lib/Forums.php:39 lib/Messages.php:35 +msgid "You must configure a Horde Categories backend to use Agora." +msgstr "" + +#: templates/javascript/moderate.js:15 +msgid "You must select at least one message first." +msgstr "Devi prima specificare almeno un messaggio." + +#: lib/Messages.php:946 +msgid "download" +msgstr "scarica" + +#: lib/Messages.php:947 +#, php-format +msgid "size: %s" +msgstr "grandezza: %s" + +#: lib/Messages.php:947 +#, php-format +msgid "type: %s" +msgstr "tipo: %s" diff --git a/agora/po/ja_JP.po b/agora/po/ja_JP.po new file mode 100644 index 000000000..9aa46e4b8 --- /dev/null +++ b/agora/po/ja_JP.po @@ -0,0 +1,1116 @@ +# Japanese translations for Agora package. +# Copyright 2008-2009 The Horde Project +# This file is distributed under the same license as the Agora package. +# Automatically generated, 2008. +# +msgid "" +msgstr "" +"Project-Id-Version: Agora 1.0-cvs\n" +"Report-Msgid-Bugs-To: dev@lists.horde.org\n" +"POT-Creation-Date: 2008-02-07 11:24+0900\n" +"PO-Revision-Date: 2008-01-02 12:27+0100\n" +"Last-Translator: Takeshi Taguchi \n" +"Language-Team: i18n@lists.horde.org\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=SHIFT_JIS\n" +"Content-Transfer-Encoding: 8bit\n" + +#: moderate.php:51 +#, php-format +msgid "%d messages was approved." +msgstr "%d ’ʂ̃ƒbƒZ[ƒW‚ð³”F‚µ‚Ü‚µ‚½B" + +#: moderate.php:57 +#, php-format +msgid "%d messages was deleted." +msgstr "%d ’ʂ̃ƒbƒZ[ƒW‚ðíœ‚µ‚Ü‚µ‚½B" + +#: scripts/phorum2agora.php:218 +msgid "-a, --agora_id[=aid] Agora forum id to save message to" +msgstr "-a, --agora_id[=aid] ƒƒbƒZ[ƒW‚ð•Û‘¶‚·‚é agoraƒtƒH[ƒ‰ƒ€ID" + +#: scripts/phorum2agora.php:221 +msgid "-c, --count[=messages] Number of messages to move at once" +msgstr "-c, --count[=messages] ˆê“x‚Ɉړ®‚·‚郁ƒbƒZ[ƒW”" + +#: scripts/phorum2agora.php:220 +msgid "" +"-f, --from[=offset] Offset from where to start to read messages" +msgstr "-f, --from[=offset] ƒƒbƒZ[ƒW‚ð“ǂݎn‚߂鏊‚܂ł̃IƒtƒZƒbƒg" + +#: scripts/phorum2agora.php:216 +msgid "-h, --help Show this help" +msgstr "-h, --help ‚±‚̃wƒ‹ƒv‚ð•\ަ" + +#: scripts/phorum2agora.php:217 +msgid "-p, --phorum_id[=pid] Phorum forum id to read message from" +msgstr "-p, --phorum_id[=pid] ƒƒbƒZ[ƒW‚ð“Ç‚ÞPhorum ƒtƒH[ƒ‰ƒ€ID" + +#: scripts/phorum2agora.php:219 +msgid "-t, --phorum_table[=table] Phorum messages tablename" +msgstr "-t, --phorum_table[=table] Phorum ƒƒbƒZ[ƒW‚̃e[ƒuƒ‹–¼" + +# +#: lib/api.php:813 +msgid "Add a comment" +msgstr "ƒRƒƒ“ƒg‚ð’ljÁ" + +# +#: lib/api.php:148 +msgid "Admin" +msgstr "ŠÇ—" + +# +#: messages/merge.php:69 +msgid "After Message: " +msgstr "ˆ—ŒãƒƒbƒZ[ƒWF" + +# +#: forums.php:75 +msgid "All Forums" +msgstr "‘S‚ẴtƒH[ƒ‰ƒ€" + +# +#: lib/Forms/Forum.php:44 +msgid "Allow attachments in this forum?" +msgstr "“Y•t‚ð‚±‚ÌƒtƒH[ƒ‰ƒ€‚Å‹–‰Â‚µ‚Ü‚·‚©?" + +#: messages/lock.php:53 +msgid "Allow replies in this thread" +msgstr "‚±‚̃XƒŒƒbƒh‚ÅƒŠƒvƒ‰ƒC‚ð‹–‰Â" + +#: moderate.php:48 moderate.php:70 +msgid "Approve" +msgstr "³”F" + +#: lib/View.php:72 config/prefs.php.dist:103 config/prefs.php.dist:138 +#: config/prefs.php.dist:179 config/prefs.php.dist:267 +msgid "Ascending" +msgstr "¸‡" + +#: lib/Messages.php:1454 +msgid "Attachment" +msgstr "“Y•t" + +#: lib/View.php:67 lib/Forms/Search.php:58 +msgid "Author" +msgstr "ì¬ŽÒ" + +# +#: config/prefs.php.dist:11 +msgid "Avatar" +msgstr "‰»g" + +#: config/prefs.php.dist:67 +#, php-format +msgid "" +"Avatars must be smaller than %s by %s pixels and less than %sKb in size." +msgstr "‰»g‚Í %s ~ %sƒsƒNƒZƒ‹ˆÈ‰º‚Å‚ ‚èA%sKbˆÈ‰º‚Ì—e—ʂłȂ¯‚ê‚΂Ȃè‚Ü‚¹‚ñB" + +# +#: ban.php:58 lib/Messages.php:1399 +msgid "Ban" +msgstr "’Ç•ú" + +#: templates/forums/ban.html:10 +msgid "Banned" +msgstr "’Ç•úÏ‚Ý" + +#: moderate.php:62 +msgid "Body" +msgstr "–{•¶" + +# +#: deleteforum.php:47 messages/split.php:49 messages/delete.php:52 +#: messages/merge.php:50 messages/move.php:49 messages/abuse.php:50 +#: messages/abuse.php:58 lib/api.php:734 +msgid "Cancel" +msgstr "ƒLƒƒƒ“ƒZƒ‹" + +# +#: lib/Messages.php:1882 +msgid "Cannot create a forum with an empty name." +msgstr "–¼‘O‚ª‹ó‚̃tƒH[ƒ‰ƒ€‚͍쐬‚Å‚«‚Ü‚¹‚ñB" + +#: templates/prefs/avatarselect.inc:8 +msgid "Choose from a gallery of avatars: " +msgstr "‰»gˆê——‚©‚ç‘I‘ð:" + +# +#: lib/View.php:78 lib/api.php:440 +msgid "Comments" +msgstr "ƒRƒƒ“ƒg" + +# +#: config/prefs.php.dist:51 +msgid "Comments view" +msgstr "ƒRƒƒ“ƒg•\ަ" + +#: editforum.php:44 +#, php-format +msgid "Could not create the forum. %s" +msgstr "ƒtƒH[ƒ‰ƒ€‚ðì¬‚Å‚«‚Ü‚¹‚ñ:%s" + +#: deleteforum.php:68 +#, php-format +msgid "Could not delete the forum. %s" +msgstr "ƒtƒH[ƒ‰ƒ€‚ðíœ‚Å‚«‚Ü‚¹‚ñ:%s" + +#: messages/delete.php:66 lib/api.php:717 lib/api.php:728 lib/api.php:742 +#, php-format +msgid "Could not delete the message. %s" +msgstr "ƒƒbƒZ[ƒW‚ðíœ‚Å‚«‚Ü‚¹‚ñ:%s" + +#: threads.php:33 +#, php-format +msgid "Could not list threads. %s" +msgstr "ƒXƒŒƒbƒh•\ަ‚Å‚«‚Ü‚¹‚ñ:%s" + +#: messages/lock.php:62 +#, php-format +msgid "Could not lock the thread. %s" +msgstr "ƒXƒŒƒbƒh‚ðƒƒbƒN‚Å‚«‚Ü‚¹‚ñ:%s" + +#: messages/split.php:33 messages/delete.php:36 messages/index.php:36 +#: messages/lock.php:35 messages/merge.php:34 messages/move.php:33 +#: messages/abuse.php:33 +#, php-format +msgid "Could not open the message. %s" +msgstr "ƒƒbƒZ[ƒW‚ðŠJ‚¯‚Ü‚¹‚ñ:%s" + +# +#: messages/edit.php:33 messages/edit.php:83 lib/api.php:581 lib/api.php:634 +msgid "Could not post the message: " +msgstr "ƒƒbƒZ[ƒW‚𓊍e‚Å‚«‚Ü‚¹‚ñ:" + +#: lib/Template.php:234 +#, php-format +msgid "Could not save the compiled template file \"%s\"." +msgstr "ƒRƒ“ƒpƒCƒ‹‚µ‚½—Œ`ƒtƒ@ƒCƒ‹ '%s' ‚ð•Û‘¶‚Å‚«‚Ü‚¹‚ñ‚Å‚µ‚½B" + +# +#: scripts/phorum2agora.php:65 +msgid "Couldn't read command-line options." +msgstr "ƒRƒ}ƒ“ƒhƒ‰ƒCƒ“ƒIƒvƒVƒ‡ƒ“‚ð“ǂ߂܂¹‚ñB" + +#: lib/Forms/Forum.php:30 +msgid "Create" +msgstr "ì¬" + +# +#: lib/Messages.php:1450 +msgid "Current attachment" +msgstr "Œ»Ý‚Ì“Y•t" + +#: moderate.php:62 forums.php:57 messages/index.php:146 lib/View.php:66 +#: lib/View.php:85 lib/View.php:100 lib/api.php:429 lib/Block/forums.php:87 +#: lib/Block/thread.php:84 lib/Block/threads.php:125 config/prefs.php.dist:94 +#: config/prefs.php.dist:128 config/prefs.php.dist:170 +#: config/prefs.php.dist:258 +msgid "Date" +msgstr "“ú•t" + +# +#: config/prefs.php.dist:259 +msgid "Default comments view sort:" +msgstr "ƒfƒtƒHƒ‹ƒg‚̃Rƒƒ“ƒg•\ަ‡:" + +# +#: config/prefs.php.dist:95 +msgid "Default forums view sort:" +msgstr "ƒfƒtƒHƒ‹ƒg‚̃tƒH[ƒ‰ƒ€•\ަ‡:" + +# +#: config/prefs.php.dist:105 config/prefs.php.dist:140 +#: config/prefs.php.dist:181 config/prefs.php.dist:269 +msgid "Default sorting direction:" +msgstr "ƒfƒtƒHƒ‹ƒg‚Ì•À‚ёւ¦‡:" + +# +#: config/prefs.php.dist:171 +msgid "Default thread view sort:" +msgstr "ƒfƒtƒHƒ‹ƒg‚̃XƒŒƒbƒh•\ަ‡:" + +# +#: config/prefs.php.dist:130 +msgid "Default threads view sort:" +msgstr "ƒfƒtƒHƒ‹ƒg‚̃XƒŒƒbƒhŒQ•\ަ‡:" + +#: ban.php:55 moderators.php:67 moderate.php:54 moderate.php:70 +#: deleteforum.php:47 deleteforum.php:65 messages/delete.php:52 +#: messages/delete.php:57 messages/index.php:122 lib/api.php:734 +#: lib/api.php:739 lib/Messages.php:801 lib/Messages.php:1700 +msgid "Delete" +msgstr "íœ" + +#: messages/delete.php:51 lib/api.php:733 +#, php-format +msgid "Delete \"%s\" and all replies?" +msgstr " \"%s\"‚Æ‘S‚Ä‚ÌƒŠƒvƒ‰ƒC‚ðíœ‚µ‚Ü‚·‚©?" + +# +#: deleteforum.php:45 lib/Messages.php:1397 +msgid "Delete Forum" +msgstr "ƒtƒH[ƒ‰ƒ€‚ðíœ" + +# +#: lib/Messages.php:1700 +msgid "Delete forum" +msgstr "ƒtƒH[ƒ‰ƒ€‚ðíœ" + +# +#: lib/Messages.php:801 +msgid "Delete message" +msgstr "ƒƒbƒZ[ƒW‚ðíœ" + +# +#: lib/Messages.php:1449 +msgid "Delete the existing attachment?" +msgstr "Šù‘¶‚Ì“Y•t‚ðíœ‚µ‚Ü‚·‚©?" + +#: lib/View.php:73 config/prefs.php.dist:104 config/prefs.php.dist:139 +#: config/prefs.php.dist:180 config/prefs.php.dist:268 +msgid "Descending" +msgstr "~‡" + +#: forums.php:57 +msgid "Description" +msgstr "à–¾" + +#: config/prefs.php.dist:21 config/prefs.php.dist:28 config/prefs.php.dist:35 +#: config/prefs.php.dist:43 config/prefs.php.dist:50 +msgid "Display Options" +msgstr "•\ަƒIƒvƒVƒ‡ƒ“" + +#: config/prefs.php.dist:248 +msgid "Display full message bodies in the comments view?" +msgstr "ƒRƒƒ“ƒg•\ަ‚сƒbƒZ[ƒW–{•¶‚·‚ׂĂð•\ަ‚µ‚Ü‚·‚©?" + +#: config/prefs.php.dist:192 +msgid "Display full message bodies in the thread list view?" +msgstr "ƒXƒŒƒbƒh•\ަ‚сƒbƒZ[ƒW–{•¶‚·‚ׂĂð•\ަ‚µ‚Ü‚·‚©?" + +# +#: config/prefs.php.dist:211 +msgid "Display graphical emoticons?" +msgstr "ƒOƒ‰ƒtƒBƒJƒ‹Šç•¶Žš‚ð•\ަ‚µ‚Ü‚·‚©?" + +#: messages/index.php:119 lib/Messages.php:797 lib/Messages.php:1694 +msgid "Edit" +msgstr "•ҏW" + +# +#: editforum.php:25 lib/Messages.php:1394 +msgid "Edit Forum" +msgstr "ƒtƒH[ƒ‰ƒ€•ҏW" + +# +#: lib/api.php:609 +msgid "Edit Message" +msgstr "ƒƒbƒZ[ƒW•ҏW" + +#: messages/edit.php:70 +#, php-format +msgid "Edit Message in \"%s\"" +msgstr "\"%s\" ‚ւ̃ƒbƒZ[ƒW•ҏW" + +# +#: lib/api.php:811 +msgid "Edit a comment" +msgstr "ƒRƒƒ“ƒg•ҏW" + +# +#: lib/Messages.php:1694 +msgid "Edit forum" +msgstr "ƒtƒH[ƒ‰ƒ€•ҏW" + +# +#: lib/Messages.php:797 +msgid "Edit message" +msgstr "ƒƒbƒZ[ƒW•ҏW" + +# +#: lib/Forms/Forum.php:41 +msgid "Enter a brief description of this forum" +msgstr "‚±‚̃tƒH[ƒ‰ƒ€‚Ìà–¾‚ð“ü—Í‚µ‚Ä‚­‚¾‚³‚¢" + +#: messages/index.php:168 lib/View.php:59 config/prefs.php.dist:246 +msgid "Flat" +msgstr "ƒtƒ‰ƒbƒg" + +# +#: moderators.php:79 moderators.php:82 moderate.php:62 forums.php:57 +#: messages/move.php:54 lib/Block/forums.php:87 lib/Block/threads.php:46 +#: config/prefs.php.dist:90 templates/moderators/moderators.html:8 +msgid "Forum" +msgstr "ƒtƒH[ƒ‰ƒ€" + +#: lib/api.php:711 lib/Messages.php:1612 +#, php-format +msgid "Forum %s does not exist." +msgstr "ƒtƒH[ƒ‰ƒ€ %s ‚Í‘¶Ý‚µ‚Ü‚¹‚ñB" + +# +#: editforum.php:47 +msgid "Forum Modified" +msgstr "ƒtƒH[ƒ‰ƒ€•ύX“úŽž" + +#: editforum.php:47 +msgid "Forum created." +msgstr "ƒtƒH[ƒ‰ƒ€‚͐¶¬‚³‚ê‚Ü‚µ‚½B" + +# +#: deleteforum.php:70 +msgid "Forum deleted." +msgstr "ƒtƒH[ƒ‰ƒ€‚͍폜‚³‚ê‚Ü‚µ‚½B" + +# +#: deleteforum.php:51 lib/Forms/Forum.php:33 +#: templates/moderators/moderators.html:9 +msgid "Forum name" +msgstr "ƒtƒH[ƒ‰ƒ€–¼" + +# +#: deleteforum.php:73 +msgid "Forum not deleted." +msgstr "ƒtƒH[ƒ‰ƒ€‚͍폜‚³‚ê‚Ü‚¹‚ñ‚Å‚µ‚½B" + +#: lib/api.php:149 lib/Block/forums.php:3 lib/Block/forums.php:28 +#: templates/forums/forums.html:9 +msgid "Forums" +msgstr "ƒtƒH[ƒ‰ƒ€" + +# +#: config/prefs.php.dist:22 +msgid "Forums View" +msgstr "ƒtƒH[ƒ‰ƒ€•\ަ" + +#: lib/Messages.php:1431 +msgid "From" +msgstr "·ol" + +#: templates/threads/threads.html:43 +msgid "Goto page:" +msgstr "ƒy[ƒW‚ÖˆÚ“®:" + +# +#: messages/index.php:158 messages/index.php:167 +msgid "Hide bodies" +msgstr "–{•¶‚ð‰B‚·" + +# +#: lib/Messages.php:718 +msgid "Hot thread" +msgstr "”M‚¢ƒXƒŒƒbƒh" + +#: lib/Forms/Forum.php:44 +msgid "If selected users will be able to attach files to their messages." +msgstr "‘I‘ð‚³‚ê‚½ƒ†[ƒU‚ªƒƒbƒZ[ƒW‚Ƀtƒ@ƒCƒ‹“Y•t‚Å‚«‚é‚È‚ç‚΁B" + +#: messages/edit.php:113 +msgid "" +"Invalid parent message, you will be posting this message as a new thread." +msgstr "•s³‚ȐeƒƒbƒZ[ƒW‚Å‚·B‚ ‚È‚½‚Ì“Še‚͐V‹KƒXƒŒƒbƒh‚Æ‚µ‚Ĉµ‚í‚ê‚Ü‚·B" + +# +#: lib/Forms/Forum.php:42 +msgid "Is this a moderated forum?" +msgstr "‚±‚ê‚̓‚ƒfƒŒ[ƒ^ŠÇ—‰º‚É‚ ‚éƒtƒH[ƒ‰ƒ€‚Å‚·‚©H" + +#: lib/Forms/Search.php:46 +msgid "Keywords" +msgstr "ƒL[ƒ[ƒh" + +# +#: config/prefs.php.dist:92 +msgid "Last Message" +msgstr "ÅŒã‚̃ƒbƒZ[ƒW" + +# +#: forums.php:57 lib/Block/forums.php:87 +msgid "Last Post" +msgstr "ÅV‚Ì“Še" + +# +#: threads.php:62 config/prefs.php.dist:129 +msgid "Last post" +msgstr "ÅV‚Ì“Še" + +# +#: lib/Messages.php:805 +msgid "Lock" +msgstr "ƒƒbƒN" + +# +#: messages/index.php:125 +msgid "Lock thread" +msgstr "ƒXƒŒƒbƒh‚ðƒƒbƒN" + +#: messages/lock.php:50 +#, php-format +msgid "Locking thread \"%s\"" +msgstr "ƒƒbƒN‚³‚ꂽƒXƒŒƒbƒh \"%s\"" + +#: lib/Agora.php:361 +msgid "Malformed avatar." +msgstr "‰ó‚ꂽ‰»gB" + +#: lib/Agora.php:384 +msgid "Malformed database entry." +msgstr "‰ó‚ꂽƒf[ƒ^ƒx[ƒX€–ځB" + +#: scripts/phorum2agora.php:214 +msgid "" +"Mandatory arguments to long options are mandatory for short options too." +msgstr "" +"Mandatory arguments to long options are mandatory for short options too." + +#: messages/merge.php:50 messages/merge.php:76 lib/Messages.php:816 +msgid "Merge" +msgstr "ƒ}[ƒW" + +#: messages/merge.php:49 +#, php-format +msgid "Merge \"%s\" with another thread" +msgstr "•ʂ̃XƒŒƒbƒh‚Å\"%s\"‚ðƒ}[ƒW" + +# +#: lib/Messages.php:1444 +msgid "Message" +msgstr "ƒƒbƒZ[ƒW" + +#: messages/abuse.php:80 +#, php-format +msgid "Message %s reported as abuse" +msgstr "ƒƒbƒZ[ƒW %s ‚Í•s³‚È‚à‚̂Ƃµ‚Ä•ñ‚³‚ê‚Ü‚µ‚½B" + +#: lib/Messages.php:456 +#, php-format +msgid "Message ID \"%d\" not found" +msgstr "ƒƒbƒZ[ƒWID \"%d\" ‚ÍŒ©‚‚©‚è‚Ü‚¹‚ñB" + +# +#: config/prefs.php.dist:44 +msgid "Message View" +msgstr "ƒƒbƒZ[ƒW•\ަ" + +# +#: messages/delete.php:68 lib/api.php:744 +msgid "Message deleted." +msgstr "ƒƒbƒZ[ƒW‚͍폜‚³‚ê‚Ü‚µ‚½B" + +# +#: messages/delete.php:58 lib/api.php:749 +msgid "Message not deleted." +msgstr "ƒƒbƒZ[ƒW‚͍폜‚³‚ê‚Ü‚¹‚ñ‚Å‚µ‚½B" + +# +#: messages/edit.php:85 lib/api.php:636 +msgid "Message posted." +msgstr "ƒƒbƒZ[ƒW‚Í“Še‚³‚ê‚Ü‚µ‚½B" + +#: config/prefs.php.dist:91 +msgid "Messages" +msgstr "ƒƒbƒZ[ƒW" + +#: moderate.php:82 templates/moderate/moderate.html:9 +msgid "Messages Awaiting Moderation" +msgstr "ƒƒbƒZ[ƒW‚͏³”F‘Ò‚¿‚Å‚·" + +#: lib/Messages.php:1719 +msgid "Moderate" +msgstr "³”FŠÇ—" + +# +#: moderators.php:77 lib/Tree/flat.php:117 templates/messages/flat.html:25 +#: templates/messages/flat_thread.html:10 templates/messages/message.html:21 +msgid "Moderator" +msgstr "³”FŽÒ" + +# +#: moderators.php:71 templates/moderators/moderators.html:4 +#: templates/moderators/moderators.html:10 templates/forums/forums.html:40 +msgid "Moderators" +msgstr "³”FŽÒ" + +#: messages/move.php:49 messages/move.php:61 lib/Messages.php:812 +msgid "Move" +msgstr "ˆÚ“®" + +#: messages/move.php:48 +#, php-format +msgid "Move \"%s\" to another forum" +msgstr "\"%s\"‚ð•ʂ̃tƒH[ƒ‰ƒ€‚Ɉړ®" + +# +#: config/prefs.php.dist:10 +msgid "My Information" +msgstr "Ž„‚̏î•ñ" + +# +#: editforum.php:25 +msgid "New Forum" +msgstr "V‹KƒtƒH[ƒ‰ƒ€" + +# +#: lib/Messages.php:1689 +msgid "New Post" +msgstr "V‹K“Še" + +# +#: lib/Agora.php:267 +msgid "New Thread" +msgstr "V‹KƒXƒŒƒbƒh" + +# +#: lib/Messages.php:719 +msgid "New posts" +msgstr "V‹K“Še" + +# +#: config/prefs.php.dist:189 +msgid "No" +msgstr "‚¢‚¢‚¦" + +# +#: lib/Block/threads.php:121 +msgid "No available threads." +msgstr "ƒXƒŒƒbƒh‚ª‚ ‚è‚Ü‚¹‚ñB" + +# +#: lib/Block/threads.php:100 +msgid "No forum selected" +msgstr "ƒtƒH[ƒ‰ƒ€‚ª‘I‘ð‚³‚ê‚Ä‚¢‚Ü‚¹‚ñB" + +# +#: templates/forums/forums.html:65 +msgid "No forums have been created." +msgstr "ƒtƒH[ƒ‰ƒ€‚͐¶¬‚³‚ê‚Ü‚¹‚ñ‚Å‚µ‚½B" + +#: config/prefs.php.dist:209 +msgid "No graphical emoticons" +msgstr "ƒOƒ‰ƒtƒBƒbƒNŠç•¶Žš”ñ•\ަ" + +#: moderate.php:40 +msgid "No messages are waiting for moderation." +msgstr "³”F‘Ò‚¿‚̃ƒbƒZ[ƒW‚Í‚ ‚è‚Ü‚¹‚ñB" + +#: messages/abuse.php:41 +msgid "No moderators are associated with this forum." +msgstr "‚±‚̃tƒH[ƒ‰ƒ€‚ɂ͏³”FŽÒ‚ª‹‚Ü‚¹‚ñB" + +# +#: templates/moderators/moderators.html:27 +msgid "No moderators have been created." +msgstr "³”FŽÒ‚͐¶¬‚³‚ê‚Ü‚¹‚ñ‚Å‚µ‚½B" + +# +#: templates/block/threads.html:32 +msgid "No threads" +msgstr "”ñƒXƒŒƒbƒh" + +#: messages/lock.php:53 +msgid "No, do not allow replies" +msgstr "ƒŠƒvƒ‰ƒC‚Í‹–‚³‚ê‚Ü‚¹‚ñ" + +# +#: config/prefs.php.dist:114 +msgid "Number of forums to display on each page" +msgstr "Šeƒy[ƒW‚É•\ަ‚·‚éƒtƒH[ƒ‰ƒ€”" + +# +#: config/prefs.php.dist:201 +msgid "Number of message to display on each page" +msgstr "Šeƒy[ƒW‚É•\ަ‚·‚郁ƒbƒZ[ƒW”" + +# +#: config/prefs.php.dist:157 config/prefs.php.dist:278 +msgid "Number of messages to display on each page" +msgstr "Šeƒy[ƒW‚É•\ަ‚·‚郁ƒbƒZ[ƒW”" + +#: config/prefs.php.dist:148 +msgid "Number of views in 24hrs to trigger a 'hot-thread':" +msgstr "u”M‚¢ƒXƒŒƒbƒhv‚Æ”F’è‚·‚é24ŽžŠÔ‚̃AƒNƒZƒX”:" + +#: lib/Block/forums.php:35 +msgid "Only display this many forums (0 to display all forums)" +msgstr "‚±‚̐”‚¾‚¯‚̃tƒH[ƒ‰ƒ€‚ð•\ަ(0‚Å‘SƒtƒH[ƒ‰ƒ€‚ð•\ަ)" + +#: lib/Block/threads.php:53 +msgid "Only display this many threads (0 to display all threads)" +msgstr "‚±‚̐”‚¾‚¯‚̃XƒŒƒbƒh‚ð•\ަ(0‚Å‘SƒXƒŒƒbƒh‚ð•\ަ)" + +#: templates/forums/forums.html:35 +msgid "Options" +msgstr "ƒIƒvƒVƒ‡ƒ“" + +#: lib/Messages.php:763 +#, php-format +msgid "Page %d" +msgstr "ƒy[ƒW %d" + +# +#: lib/Forms/Forum.php:36 +msgid "Parent forum" +msgstr "eƒtƒH[ƒ‰ƒ€" + +# +#: lib/Messages.php:1413 +msgid "Post" +msgstr "“Še" + +# +#: lib/api.php:609 +msgid "Post a New Message" +msgstr "V‹KƒƒbƒZ[ƒW‚𓊍e" + +#: messages/edit.php:71 +#, php-format +msgid "Post a New Message to \"%s\"" +msgstr "%s ‚ւ̐V‹KƒƒbƒZ[ƒW“Še" + +#: messages/edit.php:69 messages/index.php:213 +#, php-format +msgid "Post a Reply to \"%s\"" +msgstr "\"%s\"‚Ö‚ÌƒŠƒvƒ‰ƒC‚𓊍e" + +# +#: lib/Messages.php:1389 lib/Messages.php:1689 +msgid "Post message" +msgstr "ƒƒbƒZ[ƒW‚𓊍e" + +#: moderate.php:62 forums.php:57 messages/index.php:146 lib/View.php:83 +#: lib/View.php:99 lib/api.php:427 lib/Tree/flat.php:112 +#: lib/Block/forums.php:87 lib/Block/thread.php:84 lib/Block/threads.php:125 +#: config/prefs.php.dist:93 config/prefs.php.dist:126 +#: config/prefs.php.dist:169 config/prefs.php.dist:257 +#: templates/messages/flat.html:21 templates/messages/flat_thread.html:7 +msgid "Posted by" +msgstr "“ŠeŽÒ" + +#: messages/index.php:90 lib/Messages.php:501 +#, php-format +msgid "Posted by %s on %s" +msgstr "%s ‚Ì %s‚©‚ç‚Ì“Še" + +# +#: threads.php:62 forums.php:57 lib/Block/forums.php:87 +#: config/prefs.php.dist:127 +msgid "Posts" +msgstr "“Še" + +# +#: lib/Messages.php:1436 +msgid "Quote" +msgstr "—e—ʐ§ŒÀ" + +#: messages/index.php:113 lib/Messages.php:785 +msgid "Reply" +msgstr "ƒŠƒvƒ‰ƒC" + +# +#: lib/Messages.php:785 +msgid "Reply to message" +msgstr "‘—MŽÒ‚ÉƒŠƒvƒ‰ƒC" + +# +#: messages/abuse.php:49 messages/abuse.php:50 lib/Messages.php:791 +msgid "Report as abuse" +msgstr "•s³Žg—p‚Æ•ñ" + +#: lib/Forms/Search.php:47 +msgid "Require all keywords?" +msgstr "‘S‚ẴL[ƒ[ƒh‚ð‹‚ß‚Ü‚·‚©?" + +#: lib/Messages.php:1413 +msgid "Save" +msgstr "•Û‘¶" + +#: lib/Forms/Search.php:60 +msgid "Search" +msgstr "ŒŸõ" + +# +#: search.php:70 lib/Forms/Search.php:36 +msgid "Search Forums" +msgstr "ƒtƒH[ƒ‰ƒ€ŒŸõ" + +#: templates/search/search.html:5 +msgid "Search Results" +msgstr "ŒŸõŒ‹‰Ê" + +#: lib/Forms/Search.php:55 +msgid "Search in message contents?" +msgstr "ƒƒbƒZ[ƒW“àŒŸõ" + +# +#: lib/Forms/Search.php:51 +msgid "Search in subjects?" +msgstr "Œ–¼ŒŸõ" + +# +#: lib/Forms/Search.php:40 +msgid "Search in these forums" +msgstr "•¡”ƒtƒH[ƒ‰ƒ€ŠÔŒŸõ" + +#: config/prefs.php.dist:12 +msgid "Set the avatar image that is shown with your posts." +msgstr "‚ ‚È‚½‚ª“Še‚·‚鉿‘œ‚ʼn»g‚ðÝ’肵‚Ü‚·B" + +#: lib/Forms/Forum.php:42 +msgid "" +"Set this if you want all messages to be checked by a moderator before they " +"are posted." +msgstr "" +"“Še‚³‚ê‚é‘O‚ɏ³”FŽÒ‚É‚æ‚Á‚Ä‚·‚ׂẴƒbƒZ[ƒW‚ªƒ`ƒFƒbƒN‚³‚ê‚邿‚¤‚É‚·‚é‚È‚ç" +"‚ΐݒèB" + +#: config/prefs.php.dist:23 +msgid "Set your options for the forums view." +msgstr "ƒtƒH[ƒ‰ƒ€•\ަ‚̃IƒvƒVƒ‡ƒ“‚ðÝ’èB" + +#: config/prefs.php.dist:45 +msgid "Set your options for the message view." +msgstr "ƒƒbƒZ[ƒW•\ަ‚̃IƒvƒVƒ‡ƒ“‚ðÝ’èB" + +#: config/prefs.php.dist:37 config/prefs.php.dist:52 +msgid "Set your options for the single thread view." +msgstr "ƒXƒŒƒbƒh’P‘Ì•\ަ‚̃IƒvƒVƒ‡ƒ“‚ðÝ’èB" + +#: config/prefs.php.dist:30 +msgid "Set your options for the threads view." +msgstr "ƒXƒŒƒbƒh•\ަ‚̃IƒvƒVƒ‡ƒ“‚ðÝ’èB" + +#: config/prefs.php.dist:210 +msgid "Show graphical emoticons" +msgstr "ƒOƒ‰ƒtƒBƒJƒ‹Šç•¶Žš‚ð•\ަ" + +# +#: lib/Block/thread.php:3 lib/Block/thread.php:53 +msgid "Single Thread" +msgstr "’P‘̃XƒŒƒbƒh" + +# +#: config/prefs.php.dist:36 +msgid "Single Thread View" +msgstr "’P‘̃XƒŒƒbƒh•\ަ" + +# +#: lib/Agora.php:206 +msgid "Sort Ascending" +msgstr "¸‡•À‚ёւ¦" + +# +#: lib/Agora.php:206 +msgid "Sort Descending" +msgstr "~‡•À‚ёւ¦" + +# +#: lib/View.php:64 +msgid "Sort by" +msgstr "ˆÈ‰º‚Å•À‚בւ¦" + +#: lib/Agora.php:214 lib/Agora.php:221 +#, php-format +msgid "Sort by %s" +msgstr "%s ‚Å•À‚בւ¦" + +# +#: lib/View.php:70 +msgid "Sort direction" +msgstr "•À‚ёւ¦•ûŒüF" + +# +#: lib/Messages.php:1458 lib/Forms/Message.php:26 +msgid "Spam protection" +msgstr "SPAM–hŒä" + +#: messages/split.php:49 messages/split.php:57 lib/Messages.php:821 +msgid "Split" +msgstr "•ªŠ„" + +#: messages/split.php:48 +#, php-format +msgid "Split \"%s\"" +msgstr "•ªŠ„ \"%s\"" + +# +#: threads.php:62 +msgid "Started" +msgstr "ŠJŽn" + +# +#: deleteforum.php:59 +msgid "Subforums" +msgstr "ƒTƒuƒtƒH[ƒ‰ƒ€" + +#: threads.php:62 moderate.php:62 messages/index.php:146 lib/View.php:68 +#: lib/View.php:81 lib/View.php:98 lib/api.php:425 lib/Messages.php:1438 +#: lib/Messages.php:1441 lib/Block/thread.php:84 lib/Block/threads.php:125 +#: config/prefs.php.dist:125 config/prefs.php.dist:168 +#: config/prefs.php.dist:256 +msgid "Subject" +msgstr "Œ–¼" + +#: lib/Agora.php:243 +msgid "The VFS backend needs to be configured to enable attachment uploads." +msgstr "" +"VFS ƒoƒbƒNƒGƒ“ƒh‚Í“Y•t‚̃Aƒbƒvƒ[ƒh‚ð‹–‰Â‚·‚邿‚¤Ý’肳‚ê‚Ä‚¢‚È‚¯‚ê‚΂Ȃè‚Ü" +"‚¹‚ñB" + +#: config/prefs.php.dist:64 +msgid "The location of your avatar image." +msgstr "‚ ‚È‚½‚̉»g‰æ‘œ‚̏ꏊB" + +# +#: lib/Block/forums.php:78 +msgid "There are no forums." +msgstr "ƒtƒH[ƒ‰ƒ€‚Í‚ ‚è‚Ü‚¹‚ñB" + +# +#: templates/threads/threads.html:72 +msgid "There are no threads in this forum." +msgstr "‚±‚̃tƒH[ƒ‰ƒ€‚ɂ̓XƒŒƒbƒh‚Í‚ ‚è‚Ü‚¹‚ñB" + +# +#: lib/Messages.php:166 +msgid "This thread has been locked." +msgstr "‚±‚̃XƒŒƒbƒh‚̓ƒbƒN‚³‚ê‚Ü‚µ‚½B" + +#: deleteforum.php:50 +msgid "This will delete the forum, any subforums and all relative messages." +msgstr "" +"‚±‚̃tƒH[ƒ‰ƒ€‚͍폜‚³‚ê‚Ü‚·B‰½‚̃TƒuƒtƒH[ƒ‰ƒ€‚àƒƒbƒZ[ƒW‚à‘¶Ý‚µ‚Ü‚¹‚ñB" + +#: messages/index.php:146 messages/index.php:159 lib/View.php:60 +#: lib/View.php:97 lib/Block/thread.php:33 lib/Block/thread.php:84 +#: config/prefs.php.dist:124 config/prefs.php.dist:167 +#: config/prefs.php.dist:247 +msgid "Thread" +msgstr "ƒXƒŒƒbƒh" + +#: messages/merge.php:81 +#, php-format +msgid "Thread %s merged with thread %s after message %s." +msgstr "ƒƒbƒZ[ƒW %s ‚ÌŒã‚̃XƒŒƒbƒh%s‚ŁAƒXƒŒƒbƒh%s‚Í“‡‚³‚ê‚Ü‚µ‚½B" + +#: messages/move.php:66 +#, php-format +msgid "Thread %s moved to from forum %s to %s." +msgstr "ƒXƒŒƒbƒh%s‚́AƒtƒH[ƒ‰ƒ€%s‚©‚ç%s‚ÖˆÚ“®‚µ‚Ü‚µ‚½B" + +# +#: lib/Block/thread.php:91 templates/messages/index.html:9 +msgid "Thread List" +msgstr "ƒXƒŒƒbƒhˆê——" + +# +#: templates/messages/message.html:34 +msgid "Thread Summary" +msgstr "ƒXƒŒƒbƒhŠT—vF" + +# +#: messages/delete.php:73 +msgid "Thread deleted." +msgstr "ƒXƒŒƒbƒh‚͍폜‚³‚ê‚Ü‚µ‚½B" + +# +#: messages/index.php:205 messages/lock.php:65 +msgid "Thread locked." +msgstr "ƒXƒŒƒbƒh‚̓ƒbƒN‚³‚ê‚Ü‚µ‚½B" + +#: messages/split.php:62 +#, php-format +msgid "Thread splitted by message %s." +msgstr "ƒXƒŒƒbƒh‚̓ƒbƒZ[ƒW%s ‚Å•ªŠ„‚³‚ê‚Ü‚µ‚½B" + +# +#: messages/lock.php:67 +msgid "Thread unlocked." +msgstr "ƒXƒŒƒbƒhƒƒbƒN‰ðœ" + +# +#: forums.php:57 lib/Block/threads.php:3 lib/Block/threads.php:72 +#: lib/Block/threads.php:78 +msgid "Threads" +msgstr "ƒXƒŒƒbƒh" + +# +#: config/prefs.php.dist:29 +msgid "Threads View" +msgstr "ƒXƒŒƒbƒh•\ަ" + +#: lib/Block/threads.php:82 +#, php-format +msgid "Threads in \"%s\"" +msgstr "\"%s\"‚̃XƒŒƒbƒh" + +#: threads.php:70 threads.php:82 +#, php-format +msgid "Threads in %s" +msgstr "%s‚̃XƒŒƒbƒh" + +# +#: lib/Block/thread.php:72 +msgid "Unable to fetch selected thread." +msgstr "‘I‘ð‚³‚ê‚½ƒXƒŒƒbƒh‚ð“ǂݍž‚߂܂¹‚ñB" + +# +#: lib/Block/threads.php:106 +msgid "Unable to fetch threads for selected forum." +msgstr "‘I‘ð‚³‚ê‚½ƒtƒH[ƒ‰ƒ€‚̃XƒŒƒbƒh‚ð“ǂݍž‚߂܂¹‚ñB" + +# +#: lib/Messages.php:805 +msgid "Unlock" +msgstr "ƒƒbƒN‰ðœ" + +# +#: messages/index.php:125 +msgid "Unlock thread" +msgstr "ƒƒbƒN‰ðœ" + +#: messages/lock.php:51 lib/Forms/Forum.php:30 +msgid "Update" +msgstr "XV" + +#: config/prefs.php.dist:79 +msgid "Upload your own avatar image." +msgstr "‰»g‰æ‘œ‚ðXV" + +#: scripts/phorum2agora.php:212 +#, php-format +msgid "Usage: %s [OPTIONS]..." +msgstr "Žg—p–@: %s [OPTIONS]..." + +#: ban.php:65 +msgid "User" +msgstr "ƒ†[ƒU" + +#: lib/View.php:58 +msgid "View" +msgstr "•\ަ" + +# +#: messages/index.php:185 +msgid "View bodies" +msgstr "–{•¶•\ަ" + +# +#: threads.php:62 +msgid "Views" +msgstr "•\ަ" + +# +#: messages/merge.php:60 +msgid "With Thread: " +msgstr "ƒXƒŒƒbƒh•\ަ: " + +#: config/prefs.php.dist:190 +msgid "Yes" +msgstr "‚Í‚¢" + +# +#: messages/lock.php:53 +msgid "Yes, allow replies" +msgstr "‚Í‚¢AƒŠƒvƒ‰ƒC‚ð‹–‰Â‚µ‚Ü‚·B" + +#: config/prefs.php.dist:191 +msgid "Yes, and don't thread them" +msgstr "‚Í‚¢AƒXƒŒƒbƒh‰»‚µ‚Ü‚¹‚ñ" + +#: lib/Messages.php:1597 +#, php-format +msgid "You don't have permission to access messages in forum %s." +msgstr "‚ ‚È‚½‚ɂ̓tƒH[ƒ‰ƒ€%s‚̃ƒbƒZ[ƒW‚ɃAƒNƒZƒX‚·‚錠ŒÀ‚ª‚ ‚è‚Ü‚¹‚ñB" + +#: messages/split.php:40 messages/delete.php:43 messages/lock.php:42 +#: messages/merge.php:41 messages/move.php:40 lib/api.php:722 +#: lib/Messages.php:522 lib/Messages.php:619 +#, php-format +msgid "You don't have permission to delete messages in forum %s." +msgstr "‚ ‚È‚½‚ɂ̓tƒH[ƒ‰ƒ€%s‚̃ƒbƒZ[ƒW‚ðíœ‚·‚錠ŒÀ‚ª‚ ‚è‚Ü‚¹‚ñB" + +#: messages/edit.php:41 messages/index.php:199 lib/api.php:587 +#: lib/Messages.php:171 +#, php-format +msgid "You don't have permission to post messages in forum %s." +msgstr "‚ ‚È‚½‚ɂ̓tƒH[ƒ‰ƒ€%s‚É“Še‚·‚錠ŒÀ‚ª‚ ‚è‚Ü‚¹‚ñB" + +#: lib/Messages.php:690 +#, php-format +msgid "You don't have permission to read messages in forum %s." +msgstr "‚ ‚È‚½‚ɂ̓tƒH[ƒ‰ƒ€%s‚̃ƒbƒZ[ƒW‚ð“ǂތ ŒÀ‚ª‚ ‚è‚Ü‚¹‚ñB" + +#: ban.php:30 +#, php-format +msgid "You don't have permissions to ban users from forum %s." +msgstr "‚ ‚È‚½‚ɂ̓tƒH[ƒ‰ƒ€%s‚©‚烆[ƒU‚ð’Ç•ú‚·‚錠ŒÀ‚ª‚ ‚è‚Ü‚¹‚ñB" + +#: editforum.php:35 +#, php-format +msgid "You don't have permissions to create a new forum in %s" +msgstr "‚ ‚È‚½‚É‚Í%s‚ɐV‚µ‚¢ƒtƒH[ƒ‰ƒ€‚ðì¬‚·‚錠ŒÀ‚ª‚ ‚è‚Ü‚¹‚ñB" + +#: deleteforum.php:29 +#, php-format +msgid "You don't have permissions to delete forums in %s" +msgstr "‚ ‚È‚½‚É‚Í%s‚ŃtƒH[ƒ‰ƒ€‚ðíœ‚·‚錠ŒÀ‚ª‚ ‚è‚Ü‚¹‚ñB" + +#: editforum.php:31 +#, php-format +msgid "You don't have permissions to edit forum %s" +msgstr "‚ ‚È‚½‚ɂ̓tƒH[ƒ‰ƒ€%s‚ð•ҏW‚·‚錠ŒÀ‚ª‚ ‚è‚Ü‚¹‚ñB" + +# +#: lib/Agora.php:260 +msgid "_Forums" +msgstr "_FƒtƒH[ƒ‰ƒ€" + +# +#: lib/Agora.php:277 +msgid "_Moderate" +msgstr "_M³”F‹Æ–±" + +# +#: lib/Agora.php:281 +msgid "_Moderators" +msgstr "³”FŽÒŠÇ—" + +# +#: lib/Agora.php:272 +msgid "_New Forum" +msgstr "_NV‹KƒtƒH[ƒ‰ƒ€" + +#: lib/Agora.php:285 +msgid "_Search" +msgstr "_SŒŸõ" + +# +#: lib/Agora.php:265 +msgid "_Threads" +msgstr "_TƒXƒŒƒbƒh" + +#: templates/threads/threads.html:59 templates/forums/forums.html:52 +msgid "by" +msgstr "by" + +# +#: lib/Messages.php:1546 +msgid "download" +msgstr "ƒ_ƒEƒ“ƒ[ƒh" + +#: lib/Tree/flat.php:113 templates/messages/flat.html:22 +#: templates/messages/flat_thread.html:8 +msgid "on: " +msgstr "on: " + +#: lib/Messages.php:1547 +#, php-format +msgid "size: %s" +msgstr "—e—Ê: %s" + +#: lib/Messages.php:1547 +#, php-format +msgid "type: %s" +msgstr "Œ`Ž®: %s" diff --git a/agora/po/lt_LT.po b/agora/po/lt_LT.po new file mode 100644 index 000000000..7e8a1ff8f --- /dev/null +++ b/agora/po/lt_LT.po @@ -0,0 +1,966 @@ +# Lithuanian translations for Agora package. +# Copyright 2007-2009 The Horde Project +# This file is distributed under the same license as the Agora package. +# Vilius Sumskas , 2004, 2007. +# +msgid "" +msgstr "" +"Project-Id-Version: Agora 1.0-cvs\n" +"Report-Msgid-Bugs-To: dev@lists.horde.org\n" +"POT-Creation-Date: 2007-11-23 14:52+0200\n" +"PO-Revision-Date: 2007-11-23 14:56+0200\n" +"Last-Translator: Vilius Sumskas \n" +"Language-Team: Lithuanian \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ISO-8859-13\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%" +"100<10 || n%100>=20) ? 1 : 2);\n" + +#: moderate.php:51 +#, php-format +msgid "%d messages was approved." +msgstr "Patvirtintos(a) %d þinutës(iø)." + +#: moderate.php:57 +#, php-format +msgid "%d messages was deleted." +msgstr "Iðtrintos(a) %d þinutës(iø)." + +#: lib/api.php:813 +msgid "Add a comment" +msgstr "Pridëti komentarà" + +#: lib/api.php:147 +msgid "Admin" +msgstr "Valdymas" + +#: messages/merge.php:69 +msgid "After Message: " +msgstr "Po þinutës: " + +#: forums.php:74 +msgid "All Forums" +msgstr "Visi forumai" + +#: lib/Forms/Forum.php:44 +msgid "Allow attachments in this forum?" +msgstr "Leisti prikabinti failus ðiame forume?" + +#: messages/lock.php:53 +msgid "Allow replies in this thread" +msgstr "Leiti atsakinëti ðioje temoje" + +#: moderate.php:48 moderate.php:69 +msgid "Approve" +msgstr "Patvirtinti" + +#: lib/Comments.php:71 config/prefs.php.dist:103 config/prefs.php.dist:138 +#: config/prefs.php.dist:179 config/prefs.php.dist:267 +msgid "Ascending" +msgstr "Didëjimo tvarka" + +#: lib/Messages.php:1552 +msgid "Attachment" +msgstr "Prikabintas failas" + +#: lib/Comments.php:66 lib/Forms/Search.php:58 +msgid "Author" +msgstr "Autorius" + +#: config/prefs.php.dist:11 +msgid "Avatar" +msgstr "Avataras" + +#: config/prefs.php.dist:67 +#, php-format +msgid "" +"Avatars must be smaller than %s by %s pixels and less than %sKb in size." +msgstr "Avatarai turi bûti maþesni nei %s ir %s pikseliø ir maþesni nei %sKb." + +#: ban.php:58 lib/Messages.php:1497 +msgid "Ban" +msgstr "Blokuoti" + +#: templates/forums/ban.php:10 +msgid "Banned" +msgstr "Blokuotas" + +#: moderate.php:62 +msgid "Body" +msgstr "Turinys" + +#: deleteforum.php:47 lib/api.php:734 messages/move.php:49 +#: messages/delete.php:52 messages/split.php:49 messages/merge.php:50 +#: messages/abuse.php:50 messages/abuse.php:58 +msgid "Cancel" +msgstr "Atðaukti" + +#: lib/Messages.php:1964 +msgid "Cannot create a forum with an empty name." +msgstr "Nepavyko sukurti forumo be pavadinimo." + +#: templates/prefs/avatarselect.inc:8 +msgid "Choose from a gallery of avatars: " +msgstr "Pasirinkite ið avatarø galerijos: " + +#: lib/Comments.php:77 lib/api.php:440 +msgid "Comments" +msgstr "Komentarai" + +#: config/prefs.php.dist:51 +msgid "Comments view" +msgstr "Komentarø vaizdavimas" + +#: editforum.php:44 +#, php-format +msgid "Could not create the forum. %s" +msgstr "Nepavyko sukurti forumo. %s" + +#: deleteforum.php:68 +#, php-format +msgid "Could not delete the forum. %s" +msgstr "Nepavyko iðtrinti forumo. %s" + +#: lib/api.php:717 lib/api.php:728 lib/api.php:742 messages/delete.php:66 +#, php-format +msgid "Could not delete the message. %s" +msgstr "Nepavyko iðtrinti þinutës. %s" + +#: threads.php:33 +#, php-format +msgid "Could not list threads. %s" +msgstr "Nepavyko parodyti temos. %s" + +#: messages/lock.php:62 +#, php-format +msgid "Could not lock the thread. %s" +msgstr "Nepavyko uþrakinti temos. %s" + +#: messages/move.php:33 messages/index.php:36 messages/delete.php:36 +#: messages/lock.php:35 messages/split.php:33 messages/merge.php:34 +#: messages/abuse.php:33 +#, php-format +msgid "Could not open the message. %s" +msgstr "Nepavyko parodyti þinutës. %s" + +#: lib/api.php:581 lib/api.php:634 messages/edit.php:33 messages/edit.php:85 +msgid "Could not post the message: " +msgstr "Nepavyko áraðyti þinutës: " + +#: lib/Forms/Forum.php:30 +msgid "Create" +msgstr "Sukurti" + +#: lib/Messages.php:1548 +msgid "Current attachment" +msgstr "Jau prikabinti failai" + +#: moderate.php:62 forums.php:57 lib/Comments.php:65 lib/Comments.php:84 +#: lib/Comments.php:99 lib/api.php:429 lib/Block/threads.php:125 +#: lib/Block/thread.php:84 lib/Block/forums.php:87 messages/index.php:148 +#: config/prefs.php.dist:94 config/prefs.php.dist:128 +#: config/prefs.php.dist:170 config/prefs.php.dist:258 +msgid "Date" +msgstr "Data" + +#: config/prefs.php.dist:259 +msgid "Default comments view sort:" +msgstr "Standartinis komentarø rûðiavimas:" + +#: config/prefs.php.dist:95 +msgid "Default forums view sort:" +msgstr "Standartinis forumø rûðiavimas:" + +#: config/prefs.php.dist:105 config/prefs.php.dist:140 +#: config/prefs.php.dist:181 config/prefs.php.dist:269 +msgid "Default sorting direction:" +msgstr "Standartinë rûðiavimo kryptis:" + +#: config/prefs.php.dist:171 +msgid "Default thread view sort:" +msgstr "Standartinis vienos temos rûðiavimas:" + +#: config/prefs.php.dist:130 +msgid "Default threads view sort:" +msgstr "Standartinis temø rûðiavimas:" + +#: ban.php:55 moderate.php:54 moderate.php:69 moderators.php:67 +#: deleteforum.php:47 deleteforum.php:65 lib/api.php:734 lib/api.php:739 +#: lib/Messages.php:918 lib/Messages.php:1799 messages/index.php:124 +#: messages/delete.php:52 messages/delete.php:57 +msgid "Delete" +msgstr "Iðtrinti" + +#: lib/api.php:733 messages/delete.php:51 +#, php-format +msgid "Delete \"%s\" and all replies?" +msgstr "Iðtrinti \"%s\" ir visus atsakymus?" + +#: deleteforum.php:45 lib/Messages.php:1495 +msgid "Delete Forum" +msgstr "Iðtrinti forumà" + +#: lib/Messages.php:1799 +msgid "Delete forum" +msgstr "Iðtrinti forumà" + +#: lib/Messages.php:918 +msgid "Delete message" +msgstr "Iðtrinti þinutæ" + +#: lib/Messages.php:1547 +msgid "Delete the existing attachment?" +msgstr "Iðtrinti egzistuojantá prikabintà failà?" + +#: lib/Comments.php:72 config/prefs.php.dist:104 config/prefs.php.dist:139 +#: config/prefs.php.dist:180 config/prefs.php.dist:268 +msgid "Descending" +msgstr "Maþëjimo tvarka" + +#: forums.php:57 +msgid "Description" +msgstr "Apraðymas" + +#: config/prefs.php.dist:21 config/prefs.php.dist:28 config/prefs.php.dist:35 +#: config/prefs.php.dist:43 config/prefs.php.dist:50 +msgid "Display Options" +msgstr "Vaizdavimo nustatymai" + +#: config/prefs.php.dist:248 +msgid "Display full message bodies in the comments view?" +msgstr "Rodyti pilnà þinutës tekstà komentarø sàraðe?" + +#: config/prefs.php.dist:192 +msgid "Display full message bodies in the thread list view?" +msgstr "Rodyti pilnà þinutæ temos þinuèiø sàraðe?" + +#: config/prefs.php.dist:211 +msgid "Display graphical emoticons?" +msgstr "Rodyti grafines ðypsenëles?" + +#: lib/Messages.php:914 lib/Messages.php:1793 messages/index.php:121 +msgid "Edit" +msgstr "Redaguoti" + +#: editforum.php:25 lib/Messages.php:1492 +msgid "Edit Forum" +msgstr "Forumo redagavimas" + +#: lib/api.php:609 +msgid "Edit Message" +msgstr "Þinutës redagavimas" + +#: messages/edit.php:72 +#, php-format +msgid "Edit Message in \"%s\"" +msgstr "Þinutës redagavimas forume \"%s\"" + +#: lib/api.php:811 +msgid "Edit a comment" +msgstr "Redaguoti komentarà" + +#: lib/Messages.php:1793 +msgid "Edit forum" +msgstr "Redaguoti forumà" + +#: lib/Messages.php:914 +msgid "Edit message" +msgstr "Redaguoti þinutæ" + +#: lib/Forms/Forum.php:41 +msgid "Enter a brief description of this forum" +msgstr "Áraðykite trumpà forumo apraðymà" + +#: lib/Comments.php:58 messages/index.php:170 config/prefs.php.dist:246 +msgid "Flat" +msgstr "Plokðèias" + +#: moderate.php:62 moderators.php:79 moderators.php:82 forums.php:57 +#: lib/Block/threads.php:46 lib/Block/forums.php:87 +#: templates/moderators/moderators.php:8 messages/move.php:54 +#: config/prefs.php.dist:90 +msgid "Forum" +msgstr "Forumas" + +#: lib/api.php:711 lib/Messages.php:1711 +#, php-format +msgid "Forum %s does not exist." +msgstr "Forumas %s neegzistuoja." + +#: editforum.php:47 +msgid "Forum Modified" +msgstr "Forumas keistas" + +#: editforum.php:47 +msgid "Forum created." +msgstr "Forumas sukurtas." + +#: deleteforum.php:70 +msgid "Forum deleted." +msgstr "Forumas iðtrintas." + +#: deleteforum.php:51 lib/Forms/Forum.php:33 +#: templates/moderators/moderators.php:9 +msgid "Forum name" +msgstr "Forumo pavadinimas" + +#: deleteforum.php:73 +msgid "Forum not deleted." +msgstr "Forumas neiðtrintas." + +#: lib/api.php:148 lib/Block/forums.php:3 lib/Block/forums.php:28 +#: templates/forums/forums.php:9 +msgid "Forums" +msgstr "Forumai" + +#: config/prefs.php.dist:22 +msgid "Forums View" +msgstr "Forumo rodymas" + +#: lib/Messages.php:1529 +msgid "From" +msgstr "Nuo" + +#: templates/threads/threads.php:43 +msgid "Goto page:" +msgstr "Eiti á puslapá:" + +#: messages/index.php:160 messages/index.php:169 +msgid "Hide bodies" +msgstr "Paslëpti þinuèiø tekstà" + +#: lib/Messages.php:832 +msgid "Hot thread" +msgstr "Daþna tema" + +#: lib/Forms/Forum.php:44 +msgid "If selected users will be able to attach files to their messages." +msgstr "" +"Jeigu pasirinksite, vartotojai galës prikabinti failus prie savo þinuèiø." + +#: messages/edit.php:114 +msgid "" +"Invalid parent message, you will be posting this message as a new thread." +msgstr "Neteisinga tëviðkoji þinutë, ði þinutë bus paskelbta kaip nauja tema." + +#: lib/Forms/Forum.php:42 +msgid "Is this a moderated forum?" +msgstr "Ar tai moderuojamas forumas?" + +#: lib/Forms/Search.php:46 +msgid "Keywords" +msgstr "Þodþiai" + +#: config/prefs.php.dist:92 +msgid "Last Message" +msgstr "Paskutinë þinutë" + +#: forums.php:57 lib/Block/forums.php:87 +msgid "Last Post" +msgstr "Paskutinë þinutë" + +#: threads.php:62 config/prefs.php.dist:129 +msgid "Last post" +msgstr "Paskutinë þinutë" + +#: lib/Messages.php:922 +msgid "Lock" +msgstr "Uþrakinti" + +#: messages/index.php:127 +msgid "Lock thread" +msgstr "Uþrakinti temà" + +#: messages/lock.php:50 +#, php-format +msgid "Locking thread \"%s\"" +msgstr "Temos \"%s\" rakinimas" + +#: lib/Agora.php:361 +msgid "Malformed avatar." +msgstr "Neteisingas avataras." + +#: lib/Agora.php:384 +msgid "Malformed database entry." +msgstr "Neteisingas duomenø bazës áraðas." + +#: lib/Messages.php:933 messages/merge.php:50 messages/merge.php:76 +msgid "Merge" +msgstr "Sujungti" + +#: messages/merge.php:49 +#, php-format +msgid "Merge \"%s\" with another thread" +msgstr "Sujungti \"%s\" su kita tema" + +#: lib/Messages.php:1542 +msgid "Message" +msgstr "Þinutë" + +#: messages/abuse.php:80 +#, php-format +msgid "Message %s reported as abuse" +msgstr "Þinutë %s paskelbta kaip nepageidaujama." + +#: lib/Messages.php:500 +#, php-format +msgid "Message ID \"%d\" not found" +msgstr "Þinutë, kurios ID \"%d\", nërasta" + +#: config/prefs.php.dist:44 +msgid "Message View" +msgstr "Þinutës rodymas" + +#: lib/api.php:744 messages/delete.php:68 +msgid "Message deleted." +msgstr "Þinutë iðtrinta." + +#: lib/api.php:749 messages/delete.php:58 +msgid "Message not deleted." +msgstr "Þinutë neiðtrinta." + +#: lib/api.php:636 messages/edit.php:87 +msgid "Message posted." +msgstr "Þinutë áraðyta." + +#: config/prefs.php.dist:91 +msgid "Messages" +msgstr "Þinutës" + +#: moderate.php:81 templates/moderate/moderate.php:9 +msgid "Messages Awaiting Moderation" +msgstr "Þinutës laukianèios patvirtinimo" + +#: lib/Messages.php:1818 +msgid "Moderate" +msgstr "Moderuoti" + +#: moderators.php:77 lib/Tree/flat.php:117 +#: templates/messages/flat_thread.php:10 templates/messages/flat.php:25 +#: templates/messages/message.php:21 +msgid "Moderator" +msgstr "Moderatorius" + +#: moderators.php:71 templates/moderators/moderators.php:4 +#: templates/moderators/moderators.php:10 templates/forums/forums.php:39 +msgid "Moderators" +msgstr "Moderatoriai" + +#: lib/Messages.php:929 messages/move.php:49 messages/move.php:61 +msgid "Move" +msgstr "Perkelti" + +#: messages/move.php:48 +#, php-format +msgid "Move \"%s\" to another forum" +msgstr "Perkelti \"%s\" á kità forumà" + +#: config/prefs.php.dist:10 +msgid "My Information" +msgstr "Mano informacija" + +#: editforum.php:25 +msgid "New Forum" +msgstr "Naujas forumas" + +#: lib/Messages.php:1788 +msgid "New Post" +msgstr "Nauja þinutë" + +#: lib/Agora.php:267 +msgid "New Thread" +msgstr "Nauja tema" + +#: lib/Messages.php:833 +msgid "New posts" +msgstr "Naujos þinutës" + +#: config/prefs.php.dist:189 +msgid "No" +msgstr "Ne" + +#: lib/Block/threads.php:121 +msgid "No available threads." +msgstr "Temø nëra." + +#: lib/Block/threads.php:100 +msgid "No forum selected" +msgstr "Nepasirinktas forumas" + +#: templates/forums/forums.php:64 +msgid "No forums have been created." +msgstr "Forumø nëra." + +#: config/prefs.php.dist:209 +msgid "No graphical emoticons" +msgstr "Nerodyti grafiniø ðypsenëliø" + +#: moderate.php:40 +msgid "No messages are waiting for moderation." +msgstr "Þinuèiø laukianèiø moderavimo nëra." + +#: messages/abuse.php:41 +msgid "No moderators are associated with this forum." +msgstr "Ðiam forumui nepaskirtas joks moderatorius." + +#: templates/moderators/moderators.php:27 +msgid "No moderators have been created." +msgstr "Moderatoriø nëra." + +#: templates/block/threads.php:32 +msgid "No threads" +msgstr "Temø nëra" + +#: messages/lock.php:53 +msgid "No, do not allow replies" +msgstr "Ne, neleisti atsakinëti" + +#: config/prefs.php.dist:114 +msgid "Number of forums to display on each page" +msgstr "Forumø skaièius viename puslapyje" + +#: config/prefs.php.dist:201 +msgid "Number of message to display on each page" +msgstr "Þinuèiø skaièius viename puslapyje" + +#: config/prefs.php.dist:157 config/prefs.php.dist:278 +msgid "Number of messages to display on each page" +msgstr "Þinuèiø skaièius viename puslapyje" + +#: config/prefs.php.dist:148 +msgid "Number of views in 24hrs to trigger a 'hot-thread':" +msgstr "Parodymø skaièius per 24 val., kad tema bûtø paskelbta kaip 'daþna':" + +#: lib/Block/forums.php:35 +msgid "Only display this many forums (0 to display all forums)" +msgstr "Rodyti tik tiek forumø (0 rodo visus)" + +#: lib/Block/threads.php:53 +msgid "Only display this many threads (0 to display all threads)" +msgstr "Rodyti tik tiek temø (0 rodo visas)" + +#: templates/forums/forums.php:34 +msgid "Options" +msgstr "Nustatymai" + +#: lib/Messages.php:880 +#, php-format +msgid "Page %d" +msgstr "%d puslapis" + +#: lib/Forms/Forum.php:36 +msgid "Parent forum" +msgstr "Tëviðkasis forumas" + +#: lib/Messages.php:1511 +msgid "Post" +msgstr "Áraðyti" + +#: lib/api.php:609 +msgid "Post a New Message" +msgstr "Sukurti naujà þinutæ" + +#: messages/edit.php:73 +#, php-format +msgid "Post a New Message to \"%s\"" +msgstr "Naujos þinutës raðymas forume \"%s\"" + +#: messages/index.php:215 messages/edit.php:71 +#, php-format +msgid "Post a Reply to \"%s\"" +msgstr "Atsakymo raðymas á \"%s\"" + +#: lib/Messages.php:1487 lib/Messages.php:1788 +msgid "Post message" +msgstr "Sukurti þinutæ" + +#: moderate.php:62 forums.php:57 lib/Comments.php:82 lib/Comments.php:98 +#: lib/api.php:427 lib/Block/threads.php:125 lib/Block/thread.php:84 +#: lib/Block/forums.php:87 lib/Tree/flat.php:112 +#: templates/messages/flat_thread.php:7 templates/messages/flat.php:21 +#: messages/index.php:148 config/prefs.php.dist:93 config/prefs.php.dist:126 +#: config/prefs.php.dist:169 config/prefs.php.dist:257 +msgid "Posted by" +msgstr "Autorius" + +#: lib/Messages.php:545 messages/index.php:89 +#, php-format +msgid "Posted by %s on %s" +msgstr "Autorius %s %s" + +#: threads.php:62 forums.php:57 lib/Block/forums.php:87 +#: config/prefs.php.dist:127 +msgid "Posts" +msgstr "Þinutës" + +#: lib/Messages.php:1534 +msgid "Quote" +msgstr "Cituoti" + +#: lib/Messages.php:902 messages/index.php:115 +msgid "Reply" +msgstr "Atsakyti" + +#: lib/Messages.php:902 +msgid "Reply to message" +msgstr "Atsakyti á þinutæ" + +#: lib/Messages.php:908 messages/abuse.php:49 messages/abuse.php:50 +msgid "Report as abuse" +msgstr "Paskelbti kaip nepageidaujamà" + +#: lib/Forms/Search.php:47 +msgid "Require all keywords?" +msgstr "Reikalauti visø raktiniø þodþiø?" + +#: lib/Messages.php:1511 +msgid "Save" +msgstr "Iðsaugoti" + +#: lib/Forms/Search.php:60 +msgid "Search" +msgstr "Ieðkoti" + +#: search.php:71 lib/Forms/Search.php:36 +msgid "Search Forums" +msgstr "Paieðka forumuose" + +#: templates/search/search.php:5 +msgid "Search Results" +msgstr "Paieðkos rezultatai" + +#: lib/Forms/Search.php:55 +msgid "Search in message contents?" +msgstr "Ieðkoti þinutës tekste?" + +#: lib/Forms/Search.php:51 +msgid "Search in subjects?" +msgstr "Ieðkoti pavadinimuose?" + +#: lib/Forms/Search.php:40 +msgid "Search in these forums" +msgstr "Ieðkoti ðiuose forumuose" + +#: config/prefs.php.dist:12 +msgid "Set the avatar image that is shown with your posts." +msgstr "Avataro paveiksliuko, kuris rodomas jûsø þinutëse, nustatymas." + +#: lib/Forms/Forum.php:42 +msgid "" +"Set this if you want all messages to be checked by a moderator before they " +"are posted." +msgstr "" +"Paþymëkite tai, jeigu norite, kad visos þinutës prieð patekdamos á forumà, " +"bûtø patikrinamos moderatoriø." + +#: config/prefs.php.dist:23 +msgid "Set your options for the forums view." +msgstr "Forumø vaizdavimo nustatymø keitimas." + +#: config/prefs.php.dist:45 +msgid "Set your options for the message view." +msgstr "Þinutës vaizdavimo nustatymø keitimas." + +#: config/prefs.php.dist:37 config/prefs.php.dist:52 +msgid "Set your options for the single thread view." +msgstr "Vienos temos vaizdavimo nustatymø keitimas." + +#: config/prefs.php.dist:30 +msgid "Set your options for the threads view." +msgstr "Temø vaizdavimo nustatymø keitimas." + +#: config/prefs.php.dist:210 +msgid "Show graphical emoticons" +msgstr "Rodyti grafines ðypsenëles" + +#: lib/Block/thread.php:3 lib/Block/thread.php:53 +msgid "Single Thread" +msgstr "Viena tema" + +#: config/prefs.php.dist:36 +msgid "Single Thread View" +msgstr "Vienos temos rodymas" + +#: lib/Agora.php:206 +msgid "Sort Ascending" +msgstr "Surûðiuoti didëjanèia tvarka" + +#: lib/Agora.php:206 +msgid "Sort Descending" +msgstr "Surûðiuoti maþëjanèia tvarka" + +#: lib/Comments.php:63 +msgid "Sort by" +msgstr "Rûðiuoti pagal" + +#: lib/Agora.php:214 lib/Agora.php:221 +#, php-format +msgid "Sort by %s" +msgstr "Rûðiuoti pagal %s" + +#: lib/Comments.php:69 +msgid "Sort direction" +msgstr "Rûðiavimo kryptis" + +#: lib/Messages.php:1556 lib/Forms/Message.php:26 +msgid "Spam protection" +msgstr "Apsauga nuo ðiukðliø" + +#: lib/Messages.php:938 messages/split.php:49 messages/split.php:57 +msgid "Split" +msgstr "Iðskirti" + +#: messages/split.php:48 +#, php-format +msgid "Split \"%s\"" +msgstr "Iðskirti \"%s\"" + +#: threads.php:62 +msgid "Started" +msgstr "Autorius" + +#: deleteforum.php:59 +msgid "Subforums" +msgstr "Subforumai" + +#: moderate.php:62 threads.php:62 lib/Comments.php:67 lib/Comments.php:80 +#: lib/Comments.php:97 lib/api.php:425 lib/Messages.php:1536 +#: lib/Messages.php:1539 lib/Block/threads.php:125 lib/Block/thread.php:84 +#: messages/index.php:148 config/prefs.php.dist:125 config/prefs.php.dist:168 +#: config/prefs.php.dist:256 +msgid "Subject" +msgstr "Tema" + +#: lib/Agora.php:243 +msgid "The VFS backend needs to be configured to enable attachment uploads." +msgstr "Prikabintø failø galimybei turi bûti ájungta VFS posistemë." + +#: config/prefs.php.dist:64 +msgid "The location of your avatar image." +msgstr "Jûsø avataro paveiksliuko vieta." + +#: lib/Block/forums.php:78 +msgid "There are no forums." +msgstr "Forumø nëra." + +#: templates/threads/threads.php:72 +msgid "There are no threads in this forum." +msgstr "Ðiame forume temø nëra." + +#: lib/Messages.php:166 +msgid "This thread has been locked." +msgstr "Ði tema yra uþrakinta." + +#: deleteforum.php:50 +msgid "This will delete the forum, any subforums and all relative messages." +msgstr "" +"Tai iðtrins ðá forumà, bet kokius gilesnius forumus ir visas susijusias " +"þinutes." + +#: lib/Comments.php:59 lib/Comments.php:96 lib/Block/thread.php:33 +#: lib/Block/thread.php:84 messages/index.php:148 messages/index.php:161 +#: config/prefs.php.dist:124 config/prefs.php.dist:167 +#: config/prefs.php.dist:247 +msgid "Thread" +msgstr "Temø grupës" + +#: messages/merge.php:81 +#, php-format +msgid "Thread %s merged with thread %s after message %s." +msgstr "Tema %s sujungta su tema %s po þinutës %s." + +#: messages/move.php:66 +#, php-format +msgid "Thread %s moved to from forum %s to %s." +msgstr "Tema %s perkelta ið forumo %s á %s." + +#: lib/Block/thread.php:91 templates/messages/index.php:9 +msgid "Thread List" +msgstr "Þinuèiø sàraðas" + +#: templates/messages/message.php:34 +msgid "Thread Summary" +msgstr "Temos santrumpa" + +#: messages/delete.php:73 +msgid "Thread deleted." +msgstr "Tema iðtrinta." + +#: messages/index.php:207 messages/lock.php:65 +msgid "Thread locked." +msgstr "Tema uþrakinta." + +#: messages/split.php:62 +#, php-format +msgid "Thread splitted by message %s." +msgstr "Tema iðskirta þinute %s." + +#: messages/lock.php:67 +msgid "Thread unlocked." +msgstr "Tema atrakinta." + +#: forums.php:57 lib/Block/threads.php:3 lib/Block/threads.php:72 +#: lib/Block/threads.php:78 +msgid "Threads" +msgstr "Temos" + +#: config/prefs.php.dist:29 +msgid "Threads View" +msgstr "Temø rodymas" + +#: lib/Block/threads.php:82 +#, php-format +msgid "Threads in \"%s\"" +msgstr "\"%s\" temos" + +#: threads.php:69 threads.php:81 +#, php-format +msgid "Threads in %s" +msgstr "%s temos" + +#: lib/Block/thread.php:72 +msgid "Unable to fetch selected thread." +msgstr "Nepavyko parodyti pasirinktos temos." + +#: lib/Block/threads.php:106 +msgid "Unable to fetch threads for selected forum." +msgstr "Nepavyko parodyti temø pasirinktame forume." + +#: lib/Messages.php:922 +msgid "Unlock" +msgstr "Atrakinti" + +#: messages/index.php:127 +msgid "Unlock thread" +msgstr "Atrakinti temà" + +#: lib/Forms/Forum.php:30 messages/lock.php:51 +msgid "Update" +msgstr "Atnaujinti" + +#: config/prefs.php.dist:79 +msgid "Upload your own avatar image." +msgstr "Ákelkite savo avataro paveiksliukà." + +#: ban.php:65 +msgid "User" +msgstr "Vartotojas" + +#: lib/Comments.php:57 +msgid "View" +msgstr "Rodyti" + +#: messages/index.php:187 +msgid "View bodies" +msgstr "Rodyti þinuèiø turiná" + +#: threads.php:62 +msgid "Views" +msgstr "Rodymas" + +#: messages/merge.php:60 +msgid "With Thread: " +msgstr "Su tema: " + +#: config/prefs.php.dist:190 +msgid "Yes" +msgstr "Taip" + +#: messages/lock.php:53 +msgid "Yes, allow replies" +msgstr "Taip, leisti atsakinëti" + +#: config/prefs.php.dist:191 +msgid "Yes, and don't thread them" +msgstr "Taip, ir nerodo sàryðiø" + +#: lib/Messages.php:1696 +#, php-format +msgid "You don't have permission to access messages in forum %s." +msgstr "Jûs neturite teisiø perþiûrëti þinutes forume %s." + +#: lib/api.php:722 lib/Messages.php:566 lib/Messages.php:730 +#: messages/move.php:40 messages/delete.php:43 messages/lock.php:42 +#: messages/split.php:40 messages/merge.php:41 +#, php-format +msgid "You don't have permission to delete messages in forum %s." +msgstr "Jûs neturite teisiø iðtrinti þinutes ið forumo %s." + +#: lib/api.php:587 lib/Messages.php:171 messages/index.php:201 +#: messages/edit.php:41 +#, php-format +msgid "You don't have permission to post messages in forum %s." +msgstr "Jûs neturite teisiø raðyti þinuèiø á forumà %s." + +#: lib/Messages.php:804 +#, php-format +msgid "You don't have permission to read messages in forum %s." +msgstr "Jûs neturite teisiø skaityti þinutes forume %s." + +#: ban.php:30 +#, php-format +msgid "You don't have permissions to ban users from forum %s." +msgstr "Jûs neturite teisiø blokuoti vartotojø forume %s." + +#: editforum.php:35 +#, php-format +msgid "You don't have permissions to create a new forum in %s" +msgstr "Jûs neturite teisiø kurti naujø forumø forume %s" + +#: deleteforum.php:29 +#, php-format +msgid "You don't have permissions to delete forums in %s" +msgstr "Jûs neturite teisiø trinti forumø ið forumo %s" + +#: editforum.php:31 +#, php-format +msgid "You don't have permissions to edit forum %s" +msgstr "Jûs neturite teisiø keisti forumo %s" + +#: lib/Agora.php:260 +msgid "_Forums" +msgstr "Forumai" + +#: lib/Agora.php:277 +msgid "_Moderate" +msgstr "Moderuoti" + +#: lib/Agora.php:281 +msgid "_Moderators" +msgstr "Moderatoriai" + +#: lib/Agora.php:272 +msgid "_New Forum" +msgstr "Naujas forumas" + +#: lib/Agora.php:285 +msgid "_Search" +msgstr "Ieðkoti" + +#: lib/Agora.php:265 +msgid "_Threads" +msgstr "Temos" + +#: templates/threads/threads.php:59 templates/forums/forums.php:51 +msgid "by" +msgstr " " + +#: lib/Messages.php:1645 +msgid "download" +msgstr "atsisiøsti" + +#: lib/Tree/flat.php:113 templates/messages/flat_thread.php:8 +#: templates/messages/flat.php:22 +msgid "on: " +msgstr ": " + +#: lib/Messages.php:1646 +#, php-format +msgid "size: %s" +msgstr "dydis: %s" + +#: lib/Messages.php:1646 +#, php-format +msgid "type: %s" +msgstr "tipas: %s" diff --git a/agora/po/ro_RO.po b/agora/po/ro_RO.po new file mode 100644 index 000000000..56ddba2c4 --- /dev/null +++ b/agora/po/ro_RO.po @@ -0,0 +1,263 @@ +# Romanian translations for Agora package. +# Copyright 2003-2009 The Horde Project +# This file is distributed under the same license as the Agora package. +# Eugen Hoanca , 2003. +# +msgid "" +msgstr "" +"Project-Id-Version: Agora 0.0.1\n" +"POT-Creation-Date: 2003-03-04 13:46+0100\n" +"PO-Revision-Date: 2003-03-24 15:16+0200\n" +"Last-Translator: Eugen Hoanca \n" +"Language-Team: Romanian \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ISO-8859-1\n" +"Content-Transfer-Encoding: 8bit\n" + +#: managemessage.php:96 +msgid "... as a reply to message" +msgstr "... ca raspuns la mesaj" + +#: lib/Agora.php:180 lib/Menu.php:76 +msgid "Add Forum" +msgstr "Adauga forum" + +#: templates/index/notconfigured.inc:4 +msgid "Agora is not properly configured" +msgstr "Agora nu este corect configurat" + +#: lib/ManageMessage.php:46 forums.php:58 +msgid "Author" +msgstr "Autor" + +#: lib/Agora.php:102 +msgid "Can not create a forum with an empty name." +msgstr "Nu se poate crea un forum fara nume." + +#: lib/Agora.php:111 +msgid "Can not create a message thread without message id." +msgstr "Nu se poate crea un fir fara identificator de mesaj." + +#: manageforum.php:82 +msgid "Could not create the forum. %s" +msgstr "Nu se poate crea forumul. %s" + +#: managemessage.php:79 +msgid "Could not submit the message. %s" +msgstr "Nu s-a putut trimite mesajul. %s" + +#: manageforum.php:64 +msgid "Create a New Forum" +msgstr "Creare forum nou" + +#: lib/ManageForum.php:31 +msgid "Creating a subforum of %s." +msgstr "Creare subforum al %s." + +#: lib/ManageMessage.php:47 forums.php:58 +msgid "Date" +msgstr "Data" + +#: lib/ManageForum.php:35 +msgid "Enter a brief description of this forum" +msgstr "Introduceti o scurta descriere a acestui forum" + +#: forums.php:52 +msgid "Forum" +msgstr "Forum" + +#: manageforum.php:86 +msgid "Forum Details" +msgstr "Detalii forum" + +#: lib/Agora.php:173 lib/Menu.php:62 +msgid "Forum Home" +msgstr "Pagina principala forum" + +#: manageforum.php:84 +msgid "Forum created." +msgstr "Forum creat." + +#: lib/ManageForum.php:33 +msgid "Forum name" +msgstr "Nume forum" + +#: forums.php:51 +msgid "Forums" +msgstr "Forumuri" + +#: lib/api.php:54 +msgid "Forums Summary" +msgstr "Cuprins forumuri" + +#: lib/ManageForum.php:34 +msgid "Is this a moderated forum?" +msgstr "Este forum moderat?" + +#: config/prefs.php.dist:6 +msgid "Language" +msgstr "Limba" + +#: forums.php:52 +msgid "Last Message" +msgstr "Ultimul mesaj" + +#: lib/Menu.php:102 +msgid "Login" +msgstr "Intrare" + +#: lib/Menu.php:99 +msgid "Logout" +msgstr "Iesire" + +#: lib/Agora.php:248 +msgid "Main" +msgstr "Principal" + +#: manageforum.php:37 +msgid "Manage Forums" +msgstr "Administrare forumuri" + +#: managemessage.php:39 +msgid "Manage Messages" +msgstr "Administrare mesaje" + +#: lib/ManageMessage.php:28 lib/ManageMessage.php:48 managemessage.php:83 +msgid "Message" +msgstr "Mesaj" + +#: lib/ManageMessage.php:27 +msgid "Message subject" +msgstr "Subiect mesaj" + +#: managemessage.php:81 +msgid "Message submitted." +msgstr "Mesaj trimis" + +#: forums.php:52 +msgid "Messages" +msgstr "Mesaje" + +#: lib/Agora.php:176 +msgid "Moderated" +msgstr "Moderat" + +#: lib/Block/summary.php:41 +msgid "New Forum" +msgstr "Forum nou" + +#: lib/Agora.php:183 lib/Menu.php:84 +msgid "New Message" +msgstr "Mesaj nou" + +#: lib/Block/summary.php:57 +msgid "No forums available." +msgstr "Nu exista forumuri disponibile." + +#: lib/Agora.php:178 +msgid "Permissions" +msgstr "Permisiuni" + +#: managemessage.php:66 +msgid "Post a New Message" +msgstr "Publicare mesaj nou" + +#: forums.php:52 +msgid "Posted By" +msgstr "Publicat de" + +#: managemessage.php:99 +msgid "Re: %s" +msgstr "Re: %s" + +#: lib/Agora.php:186 lib/Menu.php:92 +msgid "Reply" +msgstr "Raspuns" + +#: config/prefs.php.dist:16 +msgid "Select your preferred language:" +msgstr "Selecteaza limba favorita:" + +#: lib/ManageForum.php:34 +msgid "" +"Set this if you want all messages to be checked by a moderator before they " +"are posted" +msgstr "" +"Setare pentru ca toate mesajele sa fie verificate de un moderator inainte " +"de a fi publicate." + +#: config/prefs.php.dist:7 +msgid "Set your preferred display language." +msgstr "Setare limba favorita pentru afisare." + +#: templates/index/notconfigured.inc:40 +msgid "Some of Agora's configuration files are missing:" +msgstr "Anumite fisiere de configurare agora lipsesc:" + +#: templates/index/notconfigured.inc:69 +msgid "" +"Some of the HTML templates in agora/config/templates/ are missing. These " +"files control the look and feel of Agora." +msgstr "" +"Cateva din fisierele HTML predefinite din agora/config/templates lipsesc. " +"Aceste fisiere seteaza afisajul Agorei." + +#: lib/ManageForum.php:36 +msgid "Store" +msgstr "Stocare" + +#: lib/ManageMessage.php:45 forums.php:58 +msgid "Subject" +msgstr "Subiect" + +#: lib/ManageMessage.php:29 +msgid "Submit" +msgstr "Trimitere" + +#: templates/index/notconfigured.inc:59 +msgid "" +"This file controls the default preferences for Agora, and also controls " +"which preferences users can alter." +msgstr "" +"Acest fisier controleaza atat preferintele implicite pentru Agora, precum si " +"alte preferinte pentru utilizatori." + +#: templates/index/notconfigured.inc:52 +msgid "" +"This file controls the stylesheet that is used to set colors and fonts in " +"addition to or overriding Horde defaults." +msgstr "" +"Acest fisier controleaza schema de culori si fonturi diferite de cele " +"implicite Horde." + +#: managemessage.php:59 manageforum.php:57 +msgid "This forum has been deleted." +msgstr "Acest forum a fost sters." + +#: managemessage.php:57 manageforum.php:55 +msgid "This forum has been deleted. %s" +msgstr "Acest forum a fost sters. %s" + +#: templates/index/notconfigured.inc:45 +msgid "" +"This is the main Agora configuration file. It contains options for all Agora " +"scripts." +msgstr "" +"Acesta este principalul fisier de configurare Agora. Contine optiuni pentru " +"toate scripturile Agora." + +#: lib/Menu.php:68 +msgid "Thread Home" +msgstr "Pagina principala de fire" + +#: forums.php:57 +msgid "Threads" +msgstr "Fire" + +#: lib/Agora.php:67 +msgid "You must configure a Horde Categories backend to use Agora." +msgstr "Trebuie configurate Categoriile Horde pentru a utiliza Agora." + +#: config/prefs.php.dist:5 +msgid "Your Information" +msgstr "Detalii Personale" diff --git a/agora/po/sl_SI.po b/agora/po/sl_SI.po new file mode 100644 index 000000000..0a41f3f56 --- /dev/null +++ b/agora/po/sl_SI.po @@ -0,0 +1,1032 @@ +# translation of obala_agora_sl_SI.po to Slovene +# Automatically generated, 2006. +# Marko McLion , 2007. +# Slovenian translations for Agora packaga +# Slovenski prevod Agora paketa +# Copyright 2006-2009 The Horde Project +# This file is distributed under the same license as the horde package. +msgid "" +msgstr "" +"Project-Id-Version: obala_agora_sl_SI\n" +"Report-Msgid-Bugs-To: dev@lists.horde.org\n" +"POT-Creation-Date: 2008-10-28 19:25+0100\n" +"PO-Revision-Date: 2007-01-15 00:33+0100\n" +"Last-Translator: Marko McLion \n" +"Language-Team: Slovene \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.4\n" + +#: moderate.php:36 +#, php-format +msgid "%d messages was approved." +msgstr "Potrjeniih je bilo %d sporočil." + +#: moderate.php:42 +#, php-format +msgid "%d messages was deleted." +msgstr "Izbrisanji je bilo %d sporočil." + +#: scripts/phorum2agora.php:218 +msgid "-a, --agora_id[=aid] Agora forum id to save message to" +msgstr "" +"-a, --agora_id[=aid] Id Agora foruma v katerega shranimo sporočilo" + +#: scripts/phorum2agora.php:221 +msgid "-c, --count[=messages] Number of messages to move at once" +msgstr "" +"-c, --count[=messages] Å tevilo sporočil, ki jih premaknem naenkrat" + +#: scripts/phorum2agora.php:220 +msgid "" +"-f, --from[=offset] Offset from where to start to read messages" +msgstr "-f, --from[=offset] Zamik od katerega začnem branje sporočil" + +#: scripts/phorum2agora.php:216 +msgid "-h, --help Show this help" +msgstr "-h, --help Prikaži to pomoč" + +#: scripts/phorum2agora.php:217 +msgid "-p, --phorum_id[=pid] Phorum forum id to read message from" +msgstr "" +"-p, --phorum_id[=pid] Id Phorum foruma iz katerega preberem sporočila" + +#: scripts/phorum2agora.php:219 +msgid "-t, --phorum_table[=table] Phorum messages tablename" +msgstr "-t, --phorum_table[=table] Ime tabele Phorum sporočila" + +#: lib/api.php:854 +msgid "Add a comment" +msgstr "Dodaj komentar" + +#: lib/api.php:164 +msgid "Admin" +msgstr "Urednik" + +#: messages/merge.php:66 +msgid "After Message: " +msgstr "Po sporočilu: " + +#: forums.php:72 +msgid "All Forums" +msgstr "Vse table" + +#: lib/Forms/Forum.php:41 +msgid "Allow attachments in this forum?" +msgstr "Dovolim pripenjanje datotek v tej tabli?" + +#: messages/lock.php:51 +msgid "Allow replies in this thread" +msgstr "Dovoli ogovarjanje na to temo" + +#: moderate.php:33 moderate.php:69 +msgid "Approve" +msgstr "Potrdi" + +#: lib/Comments.php:73 config/prefs.php.dist:92 config/prefs.php.dist:127 +#: config/prefs.php.dist:168 config/prefs.php.dist:256 +msgid "Ascending" +msgstr "Naraščajoč" + +#: lib/Messages.php:1543 +msgid "Attachment" +msgstr "Priponka" + +#: lib/Comments.php:68 lib/Forms/Search.php:55 +msgid "Author" +msgstr "Avtor" + +#: config/prefs.php.dist:11 +msgid "Avatar" +msgstr "Avatar" + +#: config/prefs.php.dist:64 +#, php-format +msgid "" +"Avatars must be smaller than %s by %s pixels and less than %sKb in size." +msgstr "Avatar mora biti manjÅ¡i od %s x %s pik in manjÅ¡i od %sKb velikosti." + +#: ban.php:58 lib/Messages.php:1488 +msgid "Ban" +msgstr "Izobči" + +#: templates/ban.html.php:10 +msgid "Banned" +msgstr "Izobčeni" + +#: moderate.php:62 +msgid "Body" +msgstr "Vsebina" + +#: deleteforum.php:45 messages/abuse.php:48 messages/abuse.php:56 +#: messages/merge.php:47 messages/move.php:47 messages/delete.php:49 +#: messages/split.php:47 lib/api.php:775 +msgid "Cancel" +msgstr "Prekliči" + +#: lib/Messages.php:1919 +msgid "Cannot create a forum with an empty name." +msgstr "Ne morem ustvariti table brez imena." + +#: templates/prefs/avatarselect.inc:8 +msgid "Choose from a gallery of avatars: " +msgstr "Izberi avatar iz galerije: " + +#: lib/Comments.php:81 lib/api.php:483 +msgid "Comments" +msgstr "Komentarji" + +#: rss/threads.php:54 +msgid "Comments on %s" +msgstr "Komentarji na %s" + +#: config/prefs.php.dist:48 +msgid "Comments view" +msgstr "Pregled komentarjev" + +#: editforum.php:44 +#, php-format +msgid "Could not create the forum. %s" +msgstr "Ne morem ustvariti table. %s" + +#: deleteforum.php:66 +#, php-format +msgid "Could not delete the forum. %s" +msgstr "Ne morem izbrisati table. %s" + +#: messages/delete.php:63 lib/api.php:758 lib/api.php:769 lib/api.php:783 +#, php-format +msgid "Could not delete the message. %s" +msgstr "Ne morem izbrisati sporočila. %s" + +#: threads.php:32 +#, php-format +msgid "Could not list threads. %s" +msgstr "Ne morem izpisati tem. %s" + +#: messages/lock.php:60 +#, php-format +msgid "Could not lock the thread. %s" +msgstr "Ne morem zakleniti teme. %s" + +#: messages/abuse.php:31 messages/merge.php:31 messages/move.php:31 +#: messages/index.php:34 messages/lock.php:33 messages/delete.php:33 +#: messages/split.php:31 +#, php-format +msgid "Could not open the message. %s" +msgstr "Ne morem odpreti sporočila. %s" + +#: messages/edit.php:31 messages/edit.php:83 lib/api.php:623 lib/api.php:676 +msgid "Could not post the message: " +msgstr "Ne morem shraniti sporočila: " + +#: scripts/phorum2agora.php:65 +msgid "Couldn't read command-line options." +msgstr "Ni moč prebrati ukazov iz ukazne vrstice." + +#: lib/Forms/Forum.php:26 +msgid "Create" +msgstr "Ustvari" + +#: lib/Messages.php:1539 +msgid "Current attachment" +msgstr "Trenutna priponka" + +#: owner.php:63 forums.php:55 moderate.php:62 messages/index.php:142 +#: lib/Comments.php:67 lib/Comments.php:87 lib/api.php:473 +#: lib/Block/threads.php:122 lib/Block/forums.php:86 lib/Block/thread.php:82 +#: config/prefs.php.dist:83 config/prefs.php.dist:117 +#: config/prefs.php.dist:159 config/prefs.php.dist:247 +msgid "Date" +msgstr "Datum" + +#: config/prefs.php.dist:248 +msgid "Default comments view sort:" +msgstr "Privzeti vrsni red komentarjav:" + +#: config/prefs.php.dist:84 +msgid "Default forums view sort:" +msgstr "Privzeto razvrščanje tabel:" + +#: config/prefs.php.dist:94 config/prefs.php.dist:129 +#: config/prefs.php.dist:170 config/prefs.php.dist:258 +msgid "Default sorting direction:" +msgstr "Privzeta smer razvrščanja:" + +#: config/prefs.php.dist:160 +msgid "Default thread view sort:" +msgstr "Privzeta kolona za razvrščanje odgovorov:" + +#: config/prefs.php.dist:119 +msgid "Default threads view sort:" +msgstr "Privzeta kolona za razvrščanje tem:" + +#: deleteforum.php:45 deleteforum.php:63 ban.php:55 moderators.php:66 +#: moderate.php:39 moderate.php:69 messages/index.php:118 +#: messages/delete.php:49 messages/delete.php:54 lib/Messages.php:934 +#: lib/Messages.php:1812 lib/api.php:775 lib/api.php:780 +msgid "Delete" +msgstr "ZbriÅ¡i" + +#: messages/delete.php:48 lib/api.php:774 +#, php-format +msgid "Delete \"%s\" and all replies?" +msgstr "ZbriÅ¡em '%s' in vse njene odgovore?" + +#: deleteforum.php:43 lib/Messages.php:1486 +msgid "Delete Forum" +msgstr "ZbriÅ¡i tablo" + +#: lib/Messages.php:1812 +msgid "Delete forum" +msgstr "ZbriÅ¡i tablo" + +#: lib/Messages.php:934 +msgid "Delete message" +msgstr "ZbriÅ¡i sporočilo" + +#: lib/Messages.php:1538 +msgid "Delete the existing attachment?" +msgstr "ZbriÅ¡em obstoječe priponke?" + +#: lib/Comments.php:74 config/prefs.php.dist:93 config/prefs.php.dist:128 +#: config/prefs.php.dist:169 config/prefs.php.dist:257 +msgid "Descending" +msgstr "Padajoč" + +#: forums.php:55 +msgid "Description" +msgstr "Opis" + +#: config/prefs.php.dist:18 config/prefs.php.dist:25 config/prefs.php.dist:32 +#: config/prefs.php.dist:40 config/prefs.php.dist:47 +msgid "Display Options" +msgstr "Prikaži Možnosti" + +#: config/prefs.php.dist:237 +msgid "Display full message bodies in the comments view?" +msgstr "Prikažem telesa sporočil v komentarjih?" + +#: config/prefs.php.dist:181 +msgid "Display full message bodies in the thread list view?" +msgstr "Prikažem vsebino sporočil v drevesnem pregledu?" + +#: config/prefs.php.dist:200 +msgid "Display graphical emoticons?" +msgstr "Prikažem grafične smeÅ¡kote?" + +#: messages/index.php:115 lib/Messages.php:930 lib/Messages.php:1805 +msgid "Edit" +msgstr "Uredi" + +#: editforum.php:25 lib/Messages.php:1483 +msgid "Edit Forum" +msgstr "Uredi tablo" + +#: lib/api.php:651 +msgid "Edit Message" +msgstr "Uredi sporočilo" + +#: messages/edit.php:70 +#, php-format +msgid "Edit Message in \"%s\"" +msgstr "Uredi sporočilo v \"%s\"" + +#: lib/api.php:852 +msgid "Edit a comment" +msgstr "Uredi komentar" + +#: lib/Messages.php:1805 +msgid "Edit forum" +msgstr "Uredi tablo" + +#: lib/Messages.php:930 +msgid "Edit message" +msgstr "Uredi sporočilo" + +#: lib/Forms/Forum.php:37 +msgid "Enter a brief description of this forum" +msgstr "Vnesi kratek opis table" + +#: messages/index.php:163 lib/Comments.php:60 config/prefs.php.dist:235 +msgid "Flat" +msgstr "Spisek" + +#: moderators.php:78 moderators.php:81 forums.php:55 moderate.php:62 +#: templates/moderators.html.php:8 messages/move.php:52 +#: lib/Block/threads.php:45 lib/Block/forums.php:86 config/prefs.php.dist:79 +msgid "Forum" +msgstr "Tabla" + +#: lib/Messages.php:1710 lib/api.php:752 +#, php-format +msgid "Forum %s does not exist." +msgstr "Tabla %s ne obstaja." + +#: editforum.php:47 +msgid "Forum Modified" +msgstr "Tabla je bila spremenjena" + +#: editforum.php:47 +msgid "Forum created." +msgstr "Tabla ustvarjena." + +#: deleteforum.php:68 +msgid "Forum deleted." +msgstr "Tabla je bil izbrisana." + +#: deleteforum.php:49 templates/moderators.html.php:9 lib/Forms/Forum.php:29 +msgid "Forum name" +msgstr "Ime table" + +#: deleteforum.php:71 +msgid "Forum not deleted." +msgstr "Tabla ni bila izbrisana." + +#: templates/forums.html.php:9 templates/common-header.inc:27 lib/api.php:165 +#: lib/Block/forums.php:3 lib/Block/forums.php:28 +msgid "Forums" +msgstr "Table" + +#: config/prefs.php.dist:19 +msgid "Forums View" +msgstr "Pregled tabel" + +#: rss/index.php:28 +msgid "Forums in %s" +msgstr "Forumi v %s" + +#: lib/Messages.php:1520 +msgid "From" +msgstr "Od" + +#: templates/threads.html.php:44 templates/threads/threads.html.php:44 +msgid "Goto page:" +msgstr "Pojdi na stran:" + +#: messages/index.php:153 messages/index.php:162 +msgid "Hide bodies" +msgstr "Skrij telesa" + +#: lib/Messages.php:848 +msgid "Hot thread" +msgstr "Vroča tema" + +#: lib/Forms/Forum.php:41 +msgid "If selected users will be able to attach files to their messages." +msgstr "" +"Če je izbrano dovoljujeÅ¡ uporabnikom pripenjanje datotek k svojim sporočilom." + +#: messages/edit.php:116 +msgid "" +"Invalid parent message, you will be posting this message as a new thread." +msgstr "" +"Prvotno sporočilo ne obstaja, to sporočilo bo objavljeno kot nova tema." + +#: lib/Forms/Forum.php:38 +msgid "Is this a moderated forum?" +msgstr "Ali je to moderirana tabla?" + +#: lib/Forms/Search.php:43 +msgid "Keywords" +msgstr "Ključne besede" + +#: config/prefs.php.dist:81 +msgid "Last Message" +msgstr "Zadnje sporočilo" + +#: forums.php:55 lib/Block/forums.php:86 +msgid "Last Post" +msgstr "Zadnje sporočilo" + +#: threads.php:61 config/prefs.php.dist:118 +msgid "Last post" +msgstr "Zadnji vpis" + +#: owner.php:35 +#, php-format +msgid "Last posts in forums owned by %s" +msgstr "Zadnja sporočila v formih uporabnika %s" + +#: lib/Messages.php:938 +msgid "Lock" +msgstr "Zakleni" + +#: messages/index.php:121 +msgid "Lock thread" +msgstr "Zakleni temo" + +#: messages/lock.php:48 +#, php-format +msgid "Locking thread \"%s\"" +msgstr "Zaklepanje teme \"%s\"" + +#: lib/Agora.php:347 +msgid "Malformed avatar." +msgstr "Pokvarjen avatar." + +#: lib/Agora.php:370 +msgid "Malformed database entry." +msgstr "Pokvarjen vpis v bazi podatkov." + +#: scripts/phorum2agora.php:214 +msgid "" +"Mandatory arguments to long options are mandatory for short options too." +msgstr "" + +#: messages/merge.php:47 messages/merge.php:73 lib/Messages.php:949 +msgid "Merge" +msgstr "Združi" + +#: messages/merge.php:46 +#, php-format +msgid "Merge \"%s\" with another thread" +msgstr "Združi \"%s\" z drugo temo" + +#: lib/Messages.php:1533 +msgid "Message" +msgstr "Sporočilo" + +#: messages/abuse.php:79 +#, php-format +msgid "Message %s reported as abuse" +msgstr "Zloraba v sporočilu %s." + +#: lib/Messages.php:509 +#, php-format +msgid "Message ID \"%d\" not found" +msgstr "Spročilo Å¡t \"%d\" ne obstaja" + +#: config/prefs.php.dist:41 +msgid "Message View" +msgstr "Pregled sporočil" + +#: messages/delete.php:65 lib/api.php:785 +msgid "Message deleted." +msgstr "Sporočilo je zbrisano." + +#: messages/delete.php:55 lib/api.php:790 +msgid "Message not deleted." +msgstr "Sporočilo ni zbrisano." + +#: messages/edit.php:88 lib/api.php:678 +msgid "Message posted." +msgstr "Sporočilo je poslano." + +#: templates/messages/index.html.php:1 config/prefs.php.dist:80 +msgid "Messages" +msgstr "Sporočila" + +#: moderate.php:82 templates/moderate.html.php:11 +msgid "Messages Awaiting Moderation" +msgstr "Nepotrjena sporočila" + +#: lib/Messages.php:1831 +msgid "Moderate" +msgstr "Moderiraj" + +#: moderators.php:76 templates/messages/flat_thread.html.php:10 +#: templates/messages/flat.html.php:26 templates/messages/message.html.php:21 +#: lib/Tree/flat.php:117 +msgid "Moderator" +msgstr "Moderator" + +#: moderators.php:70 templates/forums.html.php:39 +#: templates/moderators.html.php:4 templates/moderators.html.php:10 +msgid "Moderators" +msgstr "Moderatorji" + +#: messages/move.php:47 messages/move.php:59 lib/Messages.php:945 +msgid "Move" +msgstr "Premakni" + +#: messages/move.php:46 +#, php-format +msgid "Move \"%s\" to another forum" +msgstr "Premakni \"%s\" v drugo tablo" + +#: config/prefs.php.dist:10 +msgid "My Information" +msgstr "Moji podatki" + +#: editforum.php:25 +msgid "New Forum" +msgstr "Nova tabla" + +#: lib/Messages.php:1800 +msgid "New Post" +msgstr "Nov vpis" + +#: lib/Agora.php:253 +msgid "New Thread" +msgstr "Nova tema" + +#: lib/Messages.php:849 +msgid "New posts" +msgstr "Nova sporočila" + +#: config/prefs.php.dist:178 +msgid "No" +msgstr "Ne" + +#: lib/Block/threads.php:118 +msgid "No available threads." +msgstr "Ni dostopnih tem." + +#: lib/Block/threads.php:97 +msgid "No forum selected" +msgstr "Tabla ni bila izbrana." + +#: templates/forums.html.php:60 +msgid "No forums have been created." +msgstr "Ni bila ustvarjen Å¡e nobena tabla." + +#: config/prefs.php.dist:198 +msgid "No graphical emoticons" +msgstr "Ni grafičnih smeÅ¡kotov" + +#: moderate.php:54 +msgid "No messages are waiting for moderation." +msgstr "Ni sporočil, ki bi čakala na moderiranje." + +#: messages/abuse.php:39 +msgid "No moderators are associated with this forum." +msgstr "Ni moderatorjev povezanih s to tablo." + +#: templates/moderators.html.php:27 +msgid "No moderators have been created." +msgstr "Moderator ni bil ustvarjen." + +#: owner.php:48 templates/block/threads.html.php:32 +msgid "No threads" +msgstr "Ni tem" + +#: messages/lock.php:51 +msgid "No, do not allow replies" +msgstr "Ne dovoli odgovarjanja" + +#: config/prefs.php.dist:103 +msgid "Number of forums to display on each page" +msgstr "Å tevilo tabel na vsaki strani" + +#: config/prefs.php.dist:190 +msgid "Number of message to display on each page" +msgstr "Å tevilo sporočil na vsaki strani" + +#: config/prefs.php.dist:146 config/prefs.php.dist:267 +msgid "Number of messages to display on each page" +msgstr "Å tevilo sporočil na vsaki strani" + +#: config/prefs.php.dist:137 +msgid "Number of views in 24hrs to trigger a 'hot-thread':" +msgstr "" +"Å tevilo branj v zadhnjih 24ih urah, ki so potrebna za označbo kot vroča tema." + +#: lib/Block/forums.php:35 +msgid "Only display this many forums (0 to display all forums)" +msgstr "Prikaži le toliko tabel (0 pomeni vse)" + +#: lib/Block/threads.php:52 +msgid "Only display this many threads (0 to display all threads)" +msgstr "Prikaži toliko tem (0 pomeni vse)" + +#: lib/Forms/Forum.php:39 +msgid "Optional email address to recieve a copy of each posted message" +msgstr "Poljuben email kamor naj javljamo da prihajajo nova sporočila" + +#: templates/forums.html.php:34 +msgid "Options" +msgstr "Možnosti" + +#: lib/Messages.php:896 +#, php-format +msgid "Page %d" +msgstr "Stran %d" + +#: lib/Forms/Forum.php:32 +msgid "Parent forum" +msgstr "Prvotna tabla" + +#: lib/Messages.php:1502 +msgid "Post" +msgstr "VpiÅ¡i" + +#: lib/api.php:651 +msgid "Post a New Message" +msgstr "Oddaj novo sporočilo" + +#: messages/edit.php:71 +#, php-format +msgid "Post a New Message to \"%s\"" +msgstr "Oddaj novo sporočilo v \"%s\"" + +#: messages/edit.php:69 messages/index.php:208 +#, php-format +msgid "Post a Reply to \"%s\"" +msgstr "Oddaj odgovor na '%s'" + +#: lib/Messages.php:1477 lib/Messages.php:1800 +msgid "Post message" +msgstr "Oddaj sporočilo" + +#: owner.php:63 forums.php:55 moderate.php:62 +#: templates/messages/flat_thread.html.php:7 +#: templates/messages/flat.html.php:22 messages/index.php:142 +#: lib/Comments.php:85 lib/api.php:471 lib/Block/threads.php:122 +#: lib/Block/forums.php:86 lib/Block/thread.php:82 lib/Tree/flat.php:112 +#: config/prefs.php.dist:82 config/prefs.php.dist:115 +#: config/prefs.php.dist:158 config/prefs.php.dist:246 +msgid "Posted by" +msgstr "Objavlil" + +#: messages/index.php:86 lib/Messages.php:554 +#, php-format +msgid "Posted by %s on %s" +msgstr "Objavil %s ob %s" + +#: threads.php:61 forums.php:55 lib/Block/forums.php:86 +#: config/prefs.php.dist:116 +msgid "Posts" +msgstr "Odgovorov" + +#: lib/Messages.php:1525 +msgid "Quote" +msgstr "Citiraj" + +#: messages/index.php:109 lib/Messages.php:918 +msgid "Reply" +msgstr "Odgovori" + +#: lib/Messages.php:918 +msgid "Reply to message" +msgstr "Odgovori na sporočilo" + +#: messages/abuse.php:47 messages/abuse.php:48 lib/Messages.php:924 +msgid "Report as abuse" +msgstr "Prijavi zlorabo" + +#: lib/Forms/Search.php:44 +msgid "Require all keywords?" +msgstr "Zahtevam vse ključne besede?" + +#: lib/Messages.php:1502 +msgid "Save" +msgstr "Shrani" + +#: lib/Forms/Search.php:57 +msgid "Search" +msgstr "Najdi" + +#: search.php:70 lib/Forms/Search.php:33 +msgid "Search Forums" +msgstr "Išči v tablah" + +#: templates/search.html.php:5 +msgid "Search Results" +msgstr "Rezultati iskanja" + +#: lib/Forms/Search.php:52 +msgid "Search in message contents?" +msgstr "Išči po vsebini sporočil?" + +#: lib/Forms/Search.php:48 +msgid "Search in subjects?" +msgstr "Išči po naslovih sporočil?" + +#: lib/Forms/Search.php:37 +msgid "Search in these forums" +msgstr "Išči v teh tablah" + +#: config/prefs.php.dist:12 +msgid "Set the avatar image that is shown with your posts." +msgstr "Nastavi avatar, ki se bo prikazal v tvojih objavah" + +#: lib/Forms/Forum.php:38 +msgid "" +"Set this if you want all messages to be checked by a moderator before they " +"are posted." +msgstr "" +"Izberi to, če želiÅ¡ da moderator potrdi vsako sporočilo preden je objavljeno." + +#: config/prefs.php.dist:20 +msgid "Set your options for the forums view." +msgstr "Nastavi svoje monosti za pregled tabel." + +#: config/prefs.php.dist:42 +msgid "Set your options for the message view." +msgstr "Nastavi svoje možnosti za pregled sporočil." + +#: config/prefs.php.dist:34 config/prefs.php.dist:49 +msgid "Set your options for the single thread view." +msgstr "Nastavi svoje nastavitve za enojen pregled tem." + +#: config/prefs.php.dist:27 +msgid "Set your options for the threads view." +msgstr "Nastavi svoje možnosti za pregled tem." + +#: config/prefs.php.dist:199 +msgid "Show graphical emoticons" +msgstr "Prikaži grafične smeÅ¡kote" + +#: lib/Block/thread.php:3 lib/Block/thread.php:52 +msgid "Single Thread" +msgstr "Ena tema" + +#: config/prefs.php.dist:33 +msgid "Single Thread View" +msgstr "Enoten pogled na temo" + +#: lib/Agora.php:192 +msgid "Sort Ascending" +msgstr "Razvrsti naraščajoče" + +#: lib/Agora.php:192 +msgid "Sort Descending" +msgstr "Razvrsti padajoče" + +#: lib/Comments.php:65 +msgid "Sort by" +msgstr "Razvrsti po" + +#: lib/Agora.php:200 lib/Agora.php:207 +#, php-format +msgid "Sort by %s" +msgstr "Razvrsti po %s" + +#: lib/Comments.php:71 +msgid "Sort direction" +msgstr "Vrstni red" + +#: lib/Messages.php:1547 lib/Forms/Message.php:24 +msgid "Spam protection" +msgstr "Zaščita pred reklamnimi sporočili" + +#: messages/split.php:47 messages/split.php:55 lib/Messages.php:954 +msgid "Split" +msgstr "Razbij" + +#: messages/split.php:46 +#, php-format +msgid "Split \"%s\"" +msgstr "Razbijem \"%s\"" + +#: threads.php:61 +msgid "Started" +msgstr "Začeto" + +#: deleteforum.php:57 +msgid "Subforums" +msgstr "Podtabla" + +#: threads.php:61 owner.php:63 moderate.php:62 messages/index.php:142 +#: lib/Comments.php:69 lib/Comments.php:83 lib/Messages.php:1527 +#: lib/Messages.php:1530 lib/api.php:469 lib/Block/threads.php:122 +#: lib/Block/thread.php:82 config/prefs.php.dist:114 config/prefs.php.dist:157 +#: config/prefs.php.dist:245 +msgid "Subject" +msgstr "Zadeva" + +#: lib/Agora.php:229 +msgid "The VFS backend needs to be configured to enable attachment uploads." +msgstr "Za upprabo pripetih datotek mora biti VFS nastavljen." + +#: config/prefs.php.dist:61 +msgid "The location of your avatar image." +msgstr "Lokacija tvoje slike za avatar." + +#: lib/Block/forums.php:77 +msgid "There are no forums." +msgstr "Ni tabel." + +#: templates/threads.html.php:69 templates/threads/threads.html.php:69 +msgid "There are no threads in this forum." +msgstr "Ni odprih tem v tej tabli." + +#: lib/Messages.php:162 +msgid "This thread has been locked." +msgstr "Tema je bila zaklenjena." + +#: deleteforum.php:48 +msgid "This will delete the forum, any subforums and all relative messages." +msgstr "Izbris table bo uničil tudi vse podtable in sporočila v njih." + +#: messages/index.php:142 messages/index.php:154 lib/Comments.php:61 +#: lib/Block/thread.php:32 lib/Block/thread.php:82 config/prefs.php.dist:113 +#: config/prefs.php.dist:156 config/prefs.php.dist:236 +msgid "Thread" +msgstr "Tema" + +#: messages/merge.php:78 +#, php-format +msgid "Thread %s merged with thread %s after message %s." +msgstr "Tema %s je bila družena s temo %s za sporočilom %s." + +#: messages/move.php:64 +#, php-format +msgid "Thread %s moved to from forum %s to %s." +msgstr "Tema %s je bila premaknjena iz table %s v %s." + +#: templates/messages/index.html.php:10 lib/Block/thread.php:89 +msgid "Thread List" +msgstr "Spisek tem" + +#: templates/messages/message.html.php:34 +msgid "Thread Summary" +msgstr "Povzetek teme" + +#: messages/delete.php:70 +msgid "Thread deleted." +msgstr "Tema je bila zbrisana." + +#: messages/index.php:200 messages/lock.php:63 +msgid "Thread locked." +msgstr "Tema je bila zaklenjena." + +#: messages/split.php:60 +#, php-format +msgid "Thread splitted by message %s." +msgstr "Tema je bila razbita pri sporočilu %s." + +#: messages/lock.php:65 +msgid "Thread unlocked." +msgstr "Tema je bila odklenjena." + +#: forums.php:55 templates/threads.html.php:1 +#: templates/threads/threads.html.php:1 lib/Comments.php:77 +#: lib/Block/threads.php:3 lib/Block/threads.php:70 lib/Block/threads.php:76 +msgid "Threads" +msgstr "Teme" + +#: config/prefs.php.dist:26 +msgid "Threads View" +msgstr "Razvejan pregled" + +#: lib/Block/threads.php:80 +#, php-format +msgid "Threads in \"%s\"" +msgstr "Teme v \"%s\"" + +#: threads.php:68 threads.php:81 rss/threads.php:48 +#, php-format +msgid "Threads in %s" +msgstr "Teme v %s" + +#: lib/Block/thread.php:70 +msgid "Unable to fetch selected thread." +msgstr "Ne morem dobiti izbrane teme." + +#: lib/Block/threads.php:103 +msgid "Unable to fetch threads for selected forum." +msgstr "Ne morem dobiti teme za izrano tablo." + +#: lib/Messages.php:938 +msgid "Unlock" +msgstr "Odkleni" + +#: messages/index.php:121 +msgid "Unlock thread" +msgstr "Odkleni temo" + +#: messages/lock.php:49 lib/Forms/Forum.php:26 +msgid "Update" +msgstr "Posodobi" + +#: scripts/phorum2agora.php:212 +#, php-format +msgid "Usage: %s [OPTIONS]..." +msgstr "Uporaba: %s [OPCIJE]..." + +#: ban.php:65 +msgid "User" +msgstr "Uporabnik" + +#: lib/Comments.php:59 +msgid "View" +msgstr "Prikaz" + +#: messages/index.php:179 +msgid "View bodies" +msgstr "Prikaži telesa sporočil" + +#: threads.php:61 +msgid "Views" +msgstr "Prikazi" + +#: messages/merge.php:57 +msgid "With Thread: " +msgstr "Z devato: " + +#: config/prefs.php.dist:179 +msgid "Yes" +msgstr "Da" + +#: messages/lock.php:51 +msgid "Yes, allow replies" +msgstr "Dovoli odgovarajanje" + +#: config/prefs.php.dist:180 +msgid "Yes, and don't thread them" +msgstr "Da, ne veži jih drevesno" + +#: owner.php:19 +msgid "You are not authorised for this action." +msgstr "Nimate pravic za ta ukaz" + +#: lib/Messages.php:1694 +#, php-format +msgid "You don't have permission to access messages in forum %s." +msgstr "Nimate dovoljenj za dostop do sporočil v tabli %s." + +#: messages/merge.php:38 messages/move.php:38 messages/lock.php:40 +#: messages/delete.php:40 messages/split.php:38 lib/Messages.php:575 +#: lib/Messages.php:745 lib/api.php:763 +#, php-format +msgid "You don't have permission to delete messages in forum %s." +msgstr "Nimate dovoljenj za brisanje sporočil v tabli %s." + +#: messages/edit.php:39 messages/index.php:194 lib/Messages.php:167 +#: lib/api.php:629 +#, php-format +msgid "You don't have permission to post messages in forum %s." +msgstr "Nimate dovoljenja za objavo sporočil v tabli %s." + +#: lib/Messages.php:820 +#, php-format +msgid "You don't have permission to read messages in forum %s." +msgstr "Nimate dovoljenja za prebiranje sporočil v tabli %s." + +#: ban.php:30 +#, php-format +msgid "You don't have permissions to ban users from forum %s." +msgstr "Nimate dovoljenja za izobčiti uporabnke s table %s." + +#: editforum.php:35 +#, php-format +msgid "You don't have permissions to create a new forum in %s" +msgstr "Nimate dovoljenj za ustvaritev novih tabel v %s." + +#: deleteforum.php:27 +#, php-format +msgid "You don't have permissions to delete forums in %s" +msgstr "Nimate dovoljenj za brisanje tabel v %s." + +#: editforum.php:31 +#, php-format +msgid "You don't have permissions to edit forum %s" +msgstr "Nimate dovoljenj za urejanje table %s." + +#: messages/edit.php:86 +msgid "" +"Your message has been enqueued and is awaiting moderation. It will become " +"visible after moderator approval." +msgstr "" +"VaÅ¡e sporočilo čaka na potridtev. Vidno bo takoj po potrditivi urednika." + +#: lib/Agora.php:246 +msgid "_Forums" +msgstr "_Table" + +#: lib/Agora.php:263 +msgid "_Moderate" +msgstr "_Moderiraj" + +#: lib/Agora.php:267 +msgid "_Moderators" +msgstr "Moderatorji" + +#: lib/Agora.php:258 +msgid "_New Forum" +msgstr "_Nova tabla" + +#: lib/Agora.php:271 +msgid "_Search" +msgstr "I_skanje" + +#: lib/Agora.php:251 +msgid "_Threads" +msgstr "_Teme" + +#: templates/forums.html.php:51 templates/threads.html.php:60 +#: templates/threads/threads.html.php:60 +msgid "by" +msgstr "od" + +#: lib/Messages.php:1640 +msgid "download" +msgstr "pretoči" + +#: templates/messages/flat_thread.html.php:8 +#: templates/messages/flat.html.php:23 lib/Tree/flat.php:113 +msgid "on: " +msgstr "dne: " + +#: lib/Messages.php:1641 +#, php-format +msgid "size: %s" +msgstr "velikost: %s" + +#: lib/Messages.php:1641 +#, php-format +msgid "type: %s" +msgstr "tip: %s" diff --git a/agora/po/zh_TW.po b/agora/po/zh_TW.po new file mode 100644 index 000000000..17993bebc --- /dev/null +++ b/agora/po/zh_TW.po @@ -0,0 +1,140 @@ +# AGORA Traditional Chinese Translation +# Copyright 2002 David Chang.±i¨}¤å,¥xÆW +# David Chang , 2002. +msgid "" +msgstr "" +"Project-Id-Version: agora \n" +"Report-Msgid-Bugs-To: dev@lists.horde.org\n" +"POT-Creation-Date: 2004-01-19 13:52+0800\n" +"PO-Revision-Date: 2003-01-20 13:00+0800\n" +"Last-Translator: David Chang \n" +"Language-Team: Traditional Chinese \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=BIG5\n" +"Content-Transfer-Encoding: 8bit\n" + +#: lib/api.php:65 +#, php-format +msgid "%s not found." +msgstr "§ä¤£¨ì %s." + +#: lib/Forums.php:64 +msgid "Can not create a forum with an empty name." +msgstr "°Q½×°Ï¦WºÙ¤£±oªÅ¥Õ." + +#: deletemessage.php:61 deletemessage.php:83 +msgid "Cancel" +msgstr "¨ú®ø" + +#: editforum.php:55 +#, php-format +msgid "Could not create the forum. %s" +msgstr "µLªk«Ø¥ß¦¹°Q½×°Ï. %s" + +#: editforum.php:36 +msgid "Create" +msgstr "«Ø¥ß" + +#: forums.php:31 message.php:43 threads.php:47 lib/Block/forums.php:56 +#: lib/Block/threads.php:107 config/prefs.php.dist:35 config/prefs.php.dist:57 +msgid "Date" +msgstr "¤é´Á" + +#: config/prefs.php.dist:46 config/prefs.php.dist:68 +msgid "Default sorting direction:" +msgstr "¹w³]±Æ§Ç¤è¦V:" + +#: deleteforum.php:41 deleteforum.php:53 deletemessage.php:61 +#: deletemessage.php:65 message.php:71 +msgid "Delete" +msgstr "§R°£" + +#: config/prefs.php.dist:45 config/prefs.php.dist:67 +msgid "Descending" +msgstr "­°¾­" + +#: forums.php:31 +msgid "Description" +msgstr "´y­z" + +#: config/prefs.php.dist:9 config/prefs.php.dist:15 config/prefs.php.dist:21 +msgid "Display Options" +msgstr "Åã¥Ü¿ï¶µ" + +#: message.php:68 +msgid "Edit" +msgstr "½s¿è" + +#: forums.php:31 lib/Block/forums.php:56 lib/Block/threads.php:45 +#: config/prefs.php.dist:31 +msgid "Forum" +msgstr "°Q½×°Ï" + +#: editforum.php:57 +msgid "Forum created." +msgstr "°Q½×°Ï¤w«Ø¥ß." + +#: deleteforum.php:43 editforum.php:38 +msgid "Forum name" +msgstr "°Q½×°Ï¦WºÙ" + +#: lib/Agora.php:193 lib/api.php:71 lib/Block/forums.php:25 +msgid "Forums" +msgstr "°Q½×°Ï" + +#: config/prefs.php.dist:33 +msgid "Last Message" +msgstr "³Ì«áªº¤å³¹" + +#: editmessage.php:76 +msgid "Message" +msgstr "¤å³¹" + +#: config/prefs.php.dist:32 +msgid "Messages" +msgstr "¤å³¹" + +#: forums.php:31 message.php:43 threads.php:47 lib/Block/forums.php:56 +#: lib/Block/threads.php:107 config/prefs.php.dist:34 config/prefs.php.dist:56 +msgid "Posted By" +msgstr "µo°_¤H" + +#: editmessage.php:111 +#, php-format +msgid "Re: %s" +msgstr "¦^ÂÐ: %s" + +#: message.php:64 +msgid "Reply" +msgstr "¦^ÂÐ" + +#: editmessage.php:68 +msgid "Save" +msgstr "Àx¦s" + +#: editforum.php:43 +msgid "" +"Set this if you want all messages to be checked by a moderator before they " +"are posted" +msgstr "¦pªG§A§Æ±æ©Ò¦³ªº¤å³¹¦b¤½§G«e¥²¶·¥ý¸g¥Ñª©¥DÀˬd,½Ð¤Ä¿ï¦¹¶µ¥Ø" + +#: editmessage.php:75 message.php:43 threads.php:47 lib/Block/threads.php:107 +#: config/prefs.php.dist:55 +msgid "Subject" +msgstr "¥D¦®" + +#: message.php:43 threads.php:47 config/prefs.php.dist:54 +msgid "Thread" +msgstr "ÃöÁp" + +#: lib/Agora.php:197 lib/api.php:72 lib/Block/threads.php:61 +msgid "Threads" +msgstr "¥DÃD" + +#: editforum.php:36 +msgid "Update" +msgstr "Åܧó" + +#: prefs.php:24 +msgid "User Options" +msgstr "¨Ï¥ÎªÌ¿ï¶µ" diff --git a/agora/rss/index.php b/agora/rss/index.php new file mode 100644 index 000000000..f72558b18 --- /dev/null +++ b/agora/rss/index.php @@ -0,0 +1,59 @@ + + */ + +define('AUTH_HANDLER', true); +define('AGORA_BASE', dirname(__FILE__) . '/../'); +require_once AGORA_BASE . '/lib/base.php'; + +// Show a specific scope? +$scope = Horde_Util::getGet('scope', 'agora'); +$cache_key = 'agora_rss_' . $scope; + +/* Initialize the Cache object. */ +$cache = &Horde_Cache::singleton($GLOBALS['conf']['cache']['driver'], + Horde::getDriverConfig('cache', $GLOBALS['conf']['cache']['driver'])); + +$rss = $cache->get($cache_key, $conf['cache']['default_lifetime']); +if (!$rss) { + + $title = sprintf(_("Forums in %s"), $registry->get('name', $scope)); + $forums = Agora_Messages::singleton($scope); + $forums_list = $forums->getForums(0, true, 'forum_name', 0); + + $rss = ' + + + ' . htmlspecialchars($title) . ' + ' . str_replace('_', '-', strtolower(Horde_Nls::select())) . ' + ' . date('r') . ' + ' . htmlspecialchars($title) . ' + ' . Horde::applicationUrl('index.php', true, -1) . ' + ' . htmlspecialchars($registry->get('name')) . ''; + + foreach ($forums_list as $forum_id => $forum) { + $rss .= ' + + ' . htmlspecialchars($forum['forum_name']) . ' + ' . htmlspecialchars($forum['forum_description']) . ' + ' . Horde_Util::addParameter(Horde::applicationUrl('threads.php', true, -1), array('scope' => $scope, 'forum_id' => $forum_id)) . ' + '; + } + + $rss .= ' + + '; + + $cache->set($cache_key, $rss); +} + +header('Content-type: text/xml; charset=' . Horde_Nls::getCharset()); +echo $rss; diff --git a/agora/rss/messages.php b/agora/rss/messages.php new file mode 100644 index 000000000..82dbf6d1c --- /dev/null +++ b/agora/rss/messages.php @@ -0,0 +1,69 @@ + + */ + +define('AUTH_HANDLER', true); +define('AGORA_BASE', dirname(__FILE__) . '/../'); +require_once AGORA_BASE . '/lib/base.php'; + +// Show a specific scope? +list($forum_id, $message_id, $scope) = Agora::getAgoraId(); +$cache_key = 'agora_rss_' . $scope . '_' . $forum_id . '_' . $message_id; + +/* Initialize the Cache object. */ +$cache = &Horde_Cache::singleton($GLOBALS['conf']['cache']['driver'], + Horde::getDriverConfig('cache', $GLOBALS['conf']['cache']['driver'])); + +$rss = $cache->get($cache_key, $conf['cache']['default_lifetime']); + +if (!$rss) { + + $messages = Agora_Messages::singleton($scope, $forum_id); + $message = $messages->getMessage($message_id); + if ($message instanceof PEAR_Error) { + exit; + } + + $threads_list = $messages->getThreads($message['message_thread'], true, 'message_timestamp', 1, 1, '', null, 0, 10); + if ($threads_list instanceof PEAR_Error) { + exit; + } + + $rss = ' + + + ' . htmlspecialchars($message['message_subject']) . ' + ' . str_replace('_', '-', strtolower(Horde_Nls::select())) . ' + ' . date('r') . ' + ' . htmlspecialchars($message['message_subject']) . ' + ' . Horde::applicationUrl('index.php', true, -1) . ' + ' . htmlspecialchars($registry->get('name')) . ''; + + foreach ($threads_list as $thread_id => $thread) { + $url = Horde::applicationUrl('messages/index.php', true, -1); + $url = Agora::setAgoraId($forum_id, $thread_id, $url, $scope, true); + $rss .= ' + + ' . htmlspecialchars($thread['message_subject']) . ' + ' . htmlspecialchars(trim($thread['body'])) . ' + ' . $url . ' + '; + } + + $rss .= ' + + '; + + $cache->set($cache_key, $rss); +} + +header('Content-type: text/xml; charset=' . Horde_Nls::getCharset()); +echo $rss; diff --git a/agora/rss/threads.php b/agora/rss/threads.php new file mode 100644 index 000000000..678524aa8 --- /dev/null +++ b/agora/rss/threads.php @@ -0,0 +1,108 @@ + + */ + +define('AUTH_HANDLER', true); +define('AGORA_BASE', dirname(__FILE__) . '/../'); +require_once AGORA_BASE . '/lib/base.php'; + +// Detect forum id +$scope = Horde_Util::getGet('scope', 'agora'); +$forum_id = Horde_Util::getGet('forum_id'); +if ($scope != 'agora') { + if (($forum_name = Horde_Util::getGet('forum_name')) !== null) { + $threads = Agora_Messages::singleton($scope); + $forum_id = $threads->getForumId($forum_name); + if (($forum_id instanceof PEAR_Error) || empty($forum_id)) { + die($forum_id); + } + } elseif ($forum_id !== null) { + $threads = Agora_Messages::singleton($scope, $forum_id); + if ($threads instanceof PEAR_Error) { + die($threads); + } + $forum_array = $threads->getForum(); + $forum_name = $forum_array['forum_name']; + } +} + +$cache_key = 'agora_rss_' . $scope . '_' . $forum_id; + +/* Initialize the Cache object. */ +$cache = &Horde_Cache::singleton($GLOBALS['conf']['cache']['driver'], + Horde::getDriverConfig('cache', $GLOBALS['conf']['cache']['driver'])); + +$rss = $cache->get($cache_key, $conf['cache']['default_lifetime']); + +if (!$rss) { + + // Get forum title + $threads = Agora_Messages::singleton($scope, $forum_id); + if ($threads instanceof PEAR_Error) { + Horde::fatal($threads, __FILE__, __LINE__); + } + if ($scope == 'agora') { + $forum_array = $threads->getForum(); + if ($forum_array instanceof PEAR_Error) { + Horde::fatal($forum_array, __FILE__, __LINE__); + } + $title = sprintf(_("Threads in %s"), $forum_array['forum_name']); + } else { + $title = $registry->callByPackage($scope, 'commentCallback', array($forum_name, 'title')); + if ($title instanceof PEAR_Error) { + Horde::fatal($title, __FILE__, __LINE__); + } + $title = sprintf(_("Comments on %s"), $title); + } + + $threads_list = $threads->getThreads(0, false, 'message_modifystamp', 1, true, '', null, 0, 10); + + $rss = ' + + + ' . htmlspecialchars($title) . ' + ' . str_replace('_', '-', strtolower(Horde_Nls::select())) . ' + ' . date('r') . ' + ' . htmlspecialchars($title) . ' + ' . Horde::applicationUrl('index.php', true, -1) . ' + ' . htmlspecialchars($registry->get('name')) . ''; + + // Use commentCallback to get the return link + // show is not enought as we can have many parameters, like turba source etc + $url = Horde::applicationUrl('messages/index.php', true, -1); + if ($scope != 'agora' && $registry->hasMethod('commentCallback', $scope)) { + $try = $registry->callByPackage($scope, 'commentCallback', array($forum_name, 'link')); + if ($try instanceof PEAR_Error) { + die($try->getMessage()); + } + if (substr($url, 0, 4) == 'http') { + $url = $try; + } + } + + foreach ($threads_list as $thread_id => $thread) { + $rss .= ' + + ' . htmlspecialchars($thread['message_subject']) . ' + ' . htmlspecialchars(trim($thread['body'])) . ' + ' . Agora::setAgoraId($forum_id, $thread_id, $url, $scope, true) . ' + '; + } + + $rss .= ' + + '; + + $cache->set($cache_key, $rss); +} + +header('Content-type: text/xml; charset=' . Horde_Nls::getCharset()); +echo $rss; diff --git a/agora/scripts/phorum2agora.php b/agora/scripts/phorum2agora.php new file mode 100755 index 000000000..3c886b5e8 --- /dev/null +++ b/agora/scripts/phorum2agora.php @@ -0,0 +1,222 @@ +#!/usr/bin/php +fatal($error); +} + +// Show help and exit if no arguments were set. +list($opts, $args) = $ret; +if (!$opts) { + showHelp(); + exit; +} + +foreach ($opts as $opt) { + list($optName, $optValue) = $opt; + switch ($optName) { + case 'p': + case '--phorum_id': + $phorum_id = $optValue; + break; + + case 'a': + case '--agora_id': + $agora_id = $optValue; + break; + + case 't': + case '--phorum_table': + $phorum_table = $optValue; + break; + + case 'f': + case '--from': + $from = $optValue; + break; + + case 'c': + case '--count': + $count = $optValue; + break; + + case 'h': + case '--help': + showHelp(); + exit; + } +} + +/* Set up defaults */ +if (empty($phorum_table)) { + $phorum_table = 'p5_messages'; +} +if (empty($from)) { + $cfrom = 0; +} +if (empty($count)) { + $cfrom = 100; +} + +/* Get phorum messages data */ +$sql = 'SELECT message_id, thread, author, subject, body, ' + . ' datestamp, ip, viewcount, closed ' + . ' FROM ' . $phorum_table . ' WHERE forum_id = ? ORDER BY message_id ASC'; +$sql = $db_phorum->modifyLimitQuery($sql, $from * $count, $count); +$messages = $db_phorum->getAll($sql, array($phorum_id), DB_FETCHMODE_ASSOC); +if ($messages instanceof PEAR_Error) { + echo $messages->getMessage() . ': ' . $messages->getDebugInfo() . "\n"; + exit; +} + +/* Display some info of messages imported */ +$msgs = $db_phorum->getOne('SELECT COUNT(*) FROM ' . $phorum_table . ' WHERE forum_id = ? ', array($phorum_id)); +echo 'Agora forum ID: ' . $agora_id . "\n"; +echo 'Phorum forum ID: ' . $phorum_id . "\n"; +echo 'Processing ' . count($messages) . ' (' . ($from * $count) . '/' . $count . ') messages of ' . $msgs . ' in phorum' . "\n"; + +/* SQL mesage insert statement */ +$sql = 'INSERT INTO agora_messages ' + . '(message_id, forum_id, parents, message_thread, message_author, message_subject, body, ' + . 'message_timestamp, attachments, ip, view_count, locked)' + . ' VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) '; + +// Delete old messages * DO NOT USE THIS. IS ONLY FOR TESTING +// $b_agora->query('TRUNCATE TABLE agora_messages'); +// $db_agora->query('TRUNCATE TABLE agora_messages_seq'); + +/* Start inserting */ +foreach ($messages as $message) { + $params = array(); + $params[] = $message['message_id']; + $params[] = $agora_id; + $params[] = makeParents($message['thread'], $message['message_id']); + $params[] = ($message['thread'] == $message['message_id']) ? 0 : $message['thread']; + $params[] = $message['author']; + $params[] = Horde_String::convertCharset($message['subject'], $conf['sql']['charset']); + $params[] = Horde_String::convertCharset($message['body'], $conf['sql']['charset']); + $params[] = $message['datestamp']; + $params[] = 0; + $params[] = $message['ip']; + $params[] = $message['viewcount']; + $params[] = $message['closed']; + $result = $db_agora->query($sql, $params); + if ($result instanceof PEAR_Error) { + echo $result->getMessage() . ': ' . $result->getDebugInfo() . "\n"; + exit; + } +} + +/* Update message sql */ +$max = $db_agora->getOne('SELECT MAX(message_id) FROM agora_messages'); +$db_agora->query('UPDATE agora_messages_seq SET ID = ?' , array($max)); + +/* Clean cache */ +$forums = Agora_Messages::singleton('agora'); +@$forums->cleanCache($agora_id); + +echo "done\n"; + +/* Constuct message parents */ +function makeParents($thread_id, $message_id) +{ + if (intval($thread_id) < 1) { + return ''; + } + + $sql = 'SELECT message_id FROM ' . $GLOBALS['phorum_table'] + . ' WHERE thread = ? AND message_id < ? ORDER BY message_id ASC'; + + $mesages = $GLOBALS['db_phorum']->getCol($sql, 0, array($thread_id, $message_id)); + if ($mesages instanceof PEAR_Error) { + echo $mesages->getMessage() . ': ' . $mesages->getDebugInfo() . "\n"; + exit; + } + + if (empty($mesages)) { + return ''; + } else { + return ':' . implode(':', $mesages); + } +} + +/** + * Show the command line arguments that the script accepts. + */ +function showHelp() +{ + global $cli; + + $cli->writeln(sprintf(_("Usage: %s [OPTIONS]..."), basename(__FILE__))); + $cli->writeln(); + $cli->writeln(_("Mandatory arguments to long options are mandatory for short options too.")); + $cli->writeln(); + $cli->writeln(_("-h, --help Show this help")); + $cli->writeln(_("-p, --phorum_id[=pid] Phorum forum id to read message from")); + $cli->writeln(_("-a, --agora_id[=aid] Agora forum id to save message to")); + $cli->writeln(_("-t, --phorum_table[=table] Phorum messages tablename")); + $cli->writeln(_("-f, --from[=offset] Offset from where to start to read messages")); + $cli->writeln(_("-c, --count[=messages] Number of messages to move at once")); + $cli->writeln(); +} diff --git a/agora/scripts/sql/agora.mysql.sql b/agora/scripts/sql/agora.mysql.sql new file mode 100644 index 000000000..62df0afbb --- /dev/null +++ b/agora/scripts/sql/agora.mysql.sql @@ -0,0 +1,67 @@ +-- $Horde: agora/scripts/sql/agora.mysql.sql,v 1.16 2009/10/20 21:28:30 jan Exp $ + +CREATE TABLE agora_files ( + file_id INT(11) UNSIGNED NOT NULL, + file_name VARCHAR(255) NOT NULL, + file_size INT(11) UNSIGNED DEFAULT 0 NOT NULL, + file_type VARCHAR(32) NOT NULL, + message_id MEDIUMINT(9) UNSIGNED DEFAULT 0, +-- + PRIMARY KEY (file_id) +); +CREATE INDEX agora_file_message_idx ON agora_files (message_id); + +CREATE TABLE agora_forums ( + forum_id SMALLINT(6) UNSIGNED NOT NULL, + scope VARCHAR(10) NOT NULL, + forum_name VARCHAR(255) NOT NULL, + active SMALLINT(6) UNSIGNED NOT NULL, + forum_description TEXT, + forum_parent_id SMALLINT(11) UNSIGNED, + author VARCHAR(32) NOT NULL, + forum_moderated SMALLINT(6) UNSIGNED, + forum_attachments TINYINT(1) UNSIGNED DEFAULT 0, + forum_distribution_address VARCHAR(255) DEFAULT '' NOT NULL, + message_count SMALLINT(6) UNSIGNED DEFAULT 0, + thread_count SMALLINT(6) UNSIGNED DEFAULT 0, + count_views SMALLINT(6) UNSIGNED, + last_message_id MEDIUMINT(10) UNSIGNED DEFAULT 0, + last_message_author VARCHAR(50), + last_message_timestamp MEDIUMINT(10) UNSIGNED DEFAULT 0, +-- + PRIMARY KEY (forum_id) +); +CREATE INDEX agora_forum_scope_idx ON agora_forums (scope, active); + +CREATE TABLE agora_messages ( + message_id MEDIUMINT(9) UNSIGNED NOT NULL, + forum_id SMALLINT(6) UNSIGNED DEFAULT 0 NOT NULL, + message_thread MEDIUMINT(9) UNSIGNED DEFAULT 0 NOT NULL, + parents VARCHAR(255) DEFAULT NULL, + message_author VARCHAR(32) NOT NULL, + message_subject VARCHAR(85) NOT NULL, + body TEXT NOT NULL, + attachments TINYINT(1) UNSIGNED DEFAULT 0 NOT NULL, + ip VARCHAR(30) NOT NULL, + status TINYINT(1) UNSIGNED DEFAULT 2 NOT NULL, + message_seq INT(11) DEFAULT 0 NOT NULL, + approved TINYINT(1) UNSIGNED DEFAULT 0 NOT NULL, + message_timestamp INT(11) UNSIGNED DEFAULT 0 NOT NULL, + message_modifystamp INT(11) UNSIGNED DEFAULT 0 NOT NULL, + view_count INT(11) UNSIGNED DEFAULT 0 NOT NULL, + locked TINYINT(1) UNSIGNED DEFAULT 0 NOT NULL, + last_message_id INT(10) UNSIGNED DEFAULT 0 NOT NULL, + last_message_author VARCHAR(255), +-- + PRIMARY KEY (message_id) +); +CREATE INDEX agora_messages_forum_id ON agora_messages (forum_id); +CREATE INDEX agora_messages_message_thread ON agora_messages (message_thread); +CREATE INDEX agora_messages_parents ON agora_messages (parents); + +CREATE TABLE agora_moderators ( + forum_id SMALLINT(6) UNSIGNED NOT NULL, + horde_uid VARCHAR(32) NOT NULL, +-- + PRIMARY KEY (forum_id, horde_uid) +); diff --git a/agora/scripts/sql/agora.sql b/agora/scripts/sql/agora.sql new file mode 100644 index 000000000..e3c8f1c66 --- /dev/null +++ b/agora/scripts/sql/agora.sql @@ -0,0 +1,67 @@ +-- $Horde: agora/scripts/sql/agora.sql,v 1.16 2009/10/20 21:28:30 jan Exp $ + +CREATE TABLE agora_files ( + file_id INT NOT NULL, + file_name VARCHAR(255) NOT NULL, + file_size INT DEFAULT 0 NOT NULL, + file_type VARCHAR(32) NOT NULL, + message_id INT DEFAULT 0 NOT NULL, +-- + PRIMARY KEY (file_id) +); +CREATE INDEX agora_file_message_idx ON agora_files (message_id); + +CREATE TABLE agora_forums ( + forum_id INT NOT NULL, + scope VARCHAR(10) NOT NULL, + forum_name VARCHAR(255) NOT NULL, + active SMALLINT NOT NULL, + forum_description VARCHAR(255), + forum_parent_id INT, + author VARCHAR(32) NOT NULL, + forum_moderated SMALLINT, + forum_attachments SMALLINT DEFAULT 0 NOT NULL, + forum_distribution_address VARCHAR(255) DEFAULT '' NOT NULL, + message_count INT DEFAULT 0, + thread_count INT DEFAULT 0, + count_views SMALLINT, + last_message_id INT DEFAULT 0 NOT NULL, + last_message_author VARCHAR(32), + last_message_timestamp INT DEFAULT 0 NOT NULL, +-- + PRIMARY KEY (forum_id) +); +CREATE INDEX agora_forum_scope_idx ON agora_forums (scope, active); + +CREATE TABLE agora_messages ( + message_id INT NOT NULL, + forum_id INT DEFAULT 0 NOT NULL, + message_thread INT DEFAULT 0 NOT NULL, + parents VARCHAR(255), + message_author VARCHAR(32) NOT NULL, + message_subject VARCHAR(85) NOT NULL, + body text NOT NULL, + attachments SMALLINT DEFAULT 0 NOT NULL, + ip VARCHAR(30) NOT NULL, + status SMALLINT DEFAULT 2 NOT NULL, + message_seq INT DEFAULT 0 NOT NULL, + approved SMALLINT DEFAULT 0 NOT NULL, + message_timestamp INT DEFAULT 0 NOT NULL, + message_modifystamp INT DEFAULT 0 NOT NULL, + view_count INT DEFAULT 0 NOT NULL, + locked SMALLINT DEFAULT 0 NOT NULL, + last_message_id INT DEFAULT 0 NOT NULL, + last_message_author VARCHAR(32), +-- + PRIMARY KEY (message_id) +); +CREATE INDEX agora_messages_forum_id ON agora_messages (forum_id); +CREATE INDEX agora_messages_message_thread ON agora_messages (message_thread); +CREATE INDEX agora_messages_parents ON agora_messages (parents); + +CREATE TABLE agora_moderators ( + forum_id INT DEFAULT 0 NOT NULL, + horde_uid VARCHAR(32) NOT NULL, +-- + PRIMARY KEY (forum_id, horde_uid) +); diff --git a/agora/scripts/upgrades/2006-10-26_forums_table.php b/agora/scripts/upgrades/2006-10-26_forums_table.php new file mode 100755 index 000000000..4f9a0993d --- /dev/null +++ b/agora/scripts/upgrades/2006-10-26_forums_table.php @@ -0,0 +1,76 @@ +#!/usr/bin/php +setOption('portability', DB_PORTABILITY_LOWERCASE | DB_PORTABILITY_ERRORS); + +/* Copy forums. */ +$max_id = 0; +$forums = $db->getAll('SELECT * FROM horde_datatree WHERE group_uid LIKE \'agora.forums%\'', DB_FETCHMODE_ASSOC); +foreach ($forums as $forum) { + if ($forum['datatree_id'] > $max_id) { + $max_id = $forum['datatree_id']; + } + + $result = $db->getAll('SELECT * FROM horde_datatree_attributes WHERE datatree_id = ?', array($forum['datatree_id']), DB_FETCHMODE_ASSOC); + $attributes = array(); + foreach ($result as $attr) { + $attributes[$attr['attribute_name'] . '_' . $attr['attribute_key']] = $attr['attribute_value']; + } + + $sql = 'INSERT INTO agora_forums' . + ' (forum_id, scope, active, forum_name, forum_description, author, forum_moderated, message_count, forum_attachments, forum_parent_id, count_views, thread_count)' . + ' VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, 0, 0, 0)'; + + $values = array($forum['datatree_id'], + ($forum['group_uid'] == 'agora.forums') ? 'agora' : substr($forum['group_uid'], 13), + 1, + $forum['datatree_name'], + $attributes['forum_description'], + $forum['user_uid'], + (int)$attributes['forum_moderated'], + $attributes['message_seq'], + (int)$attributes['forum_attachments']); + + $result = $db->query($sql, $values); + if ($result instanceof PEAR_Error) { + var_dump($result); + exit; + } +} + +// Update DB sequence. +while ($db->nextId('agora_forums') < $max_id); diff --git a/agora/scripts/upgrades/2006-10-26_messages_table.php b/agora/scripts/upgrades/2006-10-26_messages_table.php new file mode 100755 index 000000000..6b915bd4f --- /dev/null +++ b/agora/scripts/upgrades/2006-10-26_messages_table.php @@ -0,0 +1,80 @@ +#!/usr/bin/php +setOption('portability', DB_PORTABILITY_LOWERCASE | DB_PORTABILITY_ERRORS); + +/* Get messages. */ +$sql = 'SELECT DISTINCT d.datatree_id, d.datatree_parents FROM horde_datatree d, horde_datatree_attributes a ' + . ' WHERE d.group_uid = \'agora.threads\' AND d.datatree_id = a.datatree_id'; +$threads = $db->getAssoc($sql); +if ($threads instanceof PEAR_Error) { + var_dump($threads); + exit; +} + +/* SQL mesage insert statement */ +$sql = 'INSERT INTO agora_messages ' + . '(message_id, forum_id, parents, message_thread, message_author, message_subject, body, message_timestamp, attachments, ip)' + . ' VALUES (?, ?, ?, ?, ?, ?, ?, ?, 0, \'\') '; + +foreach ($threads as $id => $parents) { + $result = $db->getAll('SELECT * FROM horde_datatree_attributes WHERE datatree_id = ?', array($id), DB_FETCHMODE_ASSOC); + $attributes = array(); + foreach ($result as $attr) { + $attributes[$attr['attribute_key']] = $attr['attribute_value']; + } + + // Remove main thread + $thread = explode(':', $parents); + unset($thread[1]); + + $params = array($id); + $params[] = $attributes['forum_id']; + $params[] = implode(':', $thread); + $params[] = count($thread) > 1 ? $thread[2] : 0; + $params[] = $attributes['author']; + $params[] = $attributes['subject']; + $params[] = $attributes['body']; + $params[] = $attributes['timestamp']; + + $result = $db->query($sql, $params); + if ($result instanceof PEAR_Error) { + var_dump($result); + exit; + } +} diff --git a/agora/scripts/upgrades/2006-10-28_update_counts.php b/agora/scripts/upgrades/2006-10-28_update_counts.php new file mode 100755 index 000000000..a2c24c652 --- /dev/null +++ b/agora/scripts/upgrades/2006-10-28_update_counts.php @@ -0,0 +1,100 @@ +#!/usr/bin/php +setOption('portability', DB_PORTABILITY_LOWERCASE | DB_PORTABILITY_ERRORS); + +/* Get threads. */ +$sql = 'SELECT message_id, forum_id FROM agora_messages WHERE message_thread = ?'; +$threads = $db->getAssoc($sql, false, array(0)); +if ($threads instanceof PEAR_Error) { + var_dump($threads); + exit; +} + +/* Reset message count */ +$db->query('UPDATE agora_messages SET message_seq = 0'); +echo 'Processing ' . count($threads) . ' threads' . "\n"; + +$sql = 'SELECT message_thread, COUNT(*) FROM agora_messages WHERE message_thread > ? GROUP BY message_thread'; +$counts = $db->getAssoc($sql, false, array(0)); +if ($counts instanceof PEAR_Error) { + var_dump($counts); + exit; +} + +/* Update the number of messages in thread */ +$forums = array(); +foreach ($threads as $message_id => $forum_id) { + if (!isset($counts[$message_id])) { + continue; + } + $count = $counts[$message_id]; + $db->query('UPDATE agora_messages SET message_seq = ? WHERE message_id = ?', array($count, $message_id)); + + if (!isset($forums[$forum_id])) { + $forums[$forum_id] = array('threads' => 0, + 'messages' => 0, + 'forum_id' => $forum_id); + } + + $forums[$forum_id]['threads'] += 1; + $forums[$forum_id]['messages'] += ($count + 1); +} + +echo "Update forums \n"; + +/* Update thread and message count for forums */ +$db->query('UPDATE agora_forums SET thread_count = 0, message_count = 0'); +$sth = $db->prepare('UPDATE agora_forums SET thread_count = ?, message_count = ? WHERE forum_id = ?'); +$result = $db->executeMultiple($sth, $forums); +if ($result instanceof PEAR_Error) { + var_dump($result); + exit; +} + +echo "Clean cache \n"; + +/* Clean cache */ +$forums = Agora_Messages::singleton('agora'); +foreach ($forums->getForums(0, false) as $forum_id) { + @$forums->cleanCache($forum_id); +} + +echo "done\n"; diff --git a/agora/scripts/upgrades/2006-12-20_add_moderators_table.sql b/agora/scripts/upgrades/2006-12-20_add_moderators_table.sql new file mode 100644 index 000000000..dad0e6230 --- /dev/null +++ b/agora/scripts/upgrades/2006-12-20_add_moderators_table.sql @@ -0,0 +1,6 @@ +CREATE TABLE agora_moderators ( + forum_id INT DEFAULT 0 NOT NULL, + horde_uid VARCHAR(32) NOT NULL, +-- + PRIMARY KEY (forum_id, horde_uid) +); diff --git a/agora/scripts/upgrades/2007-02-04_modifystamp.sql b/agora/scripts/upgrades/2007-02-04_modifystamp.sql new file mode 100644 index 000000000..57c080a05 --- /dev/null +++ b/agora/scripts/upgrades/2007-02-04_modifystamp.sql @@ -0,0 +1,3 @@ +ALTER TABLE agora_messages ADD message_modifystamp INT DEFAULT 0 NOT NULL; + +UPDATE agora_messages SET message_modifystamp = message_timestamp; \ No newline at end of file diff --git a/agora/scripts/upgrades/2007-09-23_last_message.php b/agora/scripts/upgrades/2007-09-23_last_message.php new file mode 100644 index 000000000..8550c70bd --- /dev/null +++ b/agora/scripts/upgrades/2007-09-23_last_message.php @@ -0,0 +1,102 @@ +#!/usr/bin/php +loadModule('Extended'); + +/* Update last forum messages */ +$forums = $mdb->getCol('SELECT forum_id FROM agora_forums WHERE last_message_id = 0 ORDER BY forum_id'); +if ($forums instanceof PEAR_Error) { + var_dump($forums); + exit; +} + +foreach ($forums as $forum_id) { + $sql = 'SELECT message_id, message_author, message_timestamp FROM agora_messages' . + ' WHERE forum_id = ' . (int)$forum_id . ' ORDER BY message_id DESC'; + $mdb->setLimit(1, 0); + $last = $mdb->getRow($sql); + if (empty($last)) { + continue; + } + + list($message_id, $message_author, $message_timestamp) = $last; + + $sql = 'UPDATE agora_forums' . + ' SET last_message_id = ?, last_message_author = ?, last_message_timestamp = ? WHERE forum_id = ?'; + + $statement = $mdb->prepare($sql); + $statement->execute(array($message_id, $message_author, $message_timestamp, $forum_id)); + + echo "Forums: $forum_id \n"; + +} + +/* Update last messages in threads */ +$mdb->setLimit(500, 0); +$threads = $mdb->getCol('SELECT message_id FROM agora_messages WHERE message_thread = 0 AND last_message_id = 0 ORDER BY message_id'); +if ($threads instanceof PEAR_Error) { + var_dump($threads); + exit; +} + +foreach ($threads as $thread_id) { + $sql = 'SELECT message_id, message_author, message_timestamp FROM agora_messages' . + ' WHERE message_thread = ' . (int)$thread_id . ' ORDER BY message_id DESC'; + $mdb->setLimit(1, 0); + $last = $mdb->getRow($sql); + if (empty($last)) { + continue; + } + + list($message_id, $message_author, $message_timestamp) = $last; + + $sql = 'UPDATE agora_messages' . + ' SET last_message_id = ?, last_message_author = ?, message_modifystamp = ? WHERE message_id = ?'; + + $statement = $mdb->prepare($sql); + $statement->execute(array($message_id, $message_author, $message_timestamp, $thread_id)); + + echo "Thread: $thread_id \n"; +} + +echo "done\n"; diff --git a/agora/scripts/upgrades/2007-09-23_last_message.sql b/agora/scripts/upgrades/2007-09-23_last_message.sql new file mode 100644 index 000000000..f20a5d52e --- /dev/null +++ b/agora/scripts/upgrades/2007-09-23_last_message.sql @@ -0,0 +1,6 @@ +ALTER TABLE agora_messages ADD last_message_id INT DEFAULT 0 NOT NULL; +ALTER TABLE agora_messages ADD last_message_author VARCHAR(255); + +ALTER TABLE agora_forums ADD last_message_id INT DEFAULT 0 NOT NULL; +ALTER TABLE agora_forums ADD last_message_author VARCHAR(255) DEFAULT 0 NOT NULL; +ALTER TABLE agora_forums ADD last_message_timestamp INT DEFAULT 0 NOT NULL; diff --git a/agora/scripts/upgrades/2008-10-26_add_distribution_address.sql b/agora/scripts/upgrades/2008-10-26_add_distribution_address.sql new file mode 100644 index 000000000..4c6fd3ddb --- /dev/null +++ b/agora/scripts/upgrades/2008-10-26_add_distribution_address.sql @@ -0,0 +1,4 @@ +-- +-- $Horde: agora/scripts/upgrades/2008-10-26_add_distribution_address.sql,v 1.2 2009/10/20 21:28:31 jan Exp $ +-- +ALTER TABLE agora_forums ADD COLUMN forum_distribution_address VARCHAR(255) DEFAULT '' NOT NULL diff --git a/agora/search.php b/agora/search.php new file mode 100644 index 000000000..e8d352a4c --- /dev/null +++ b/agora/search.php @@ -0,0 +1,72 @@ + + */ + +define('AGORA_BASE', dirname(__FILE__)); +require_once AGORA_BASE . '/lib/base.php'; +require_once AGORA_BASE . '/lib/Forms/Search.php'; + +/* Set up the forums object. */ +$scope = Horde_Util::getGet('scope', 'agora'); +$messages = &Agora_Messages::singleton($scope); +$vars = Horde_Variables::getDefaultVariables(); +$form = new SearchForm($vars, $scope); +$thread_page = Horde_Util::getFormData('thread_page'); + +$view = new Agora_View(); + +if ($form->isSubmitted() || $thread_page != null) { + + $form->getInfo($vars, $info); + + if (!empty($info['keywords'])) { + $info['keywords'] = preg_split('/\s+/', $info['keywords']); + } + + $sort_by = Agora::getSortBy('thread'); + $sort_dir = Agora::getSortDir('thread'); + $thread_per_page = $prefs->getValue('thread_per_page'); + $thread_start = $thread_page * $thread_per_page; + + $searchResults = $messages->search($info, $sort_by, $sort_dir, $thread_start, $thread_per_page); + if ($searchResults instanceof PEAR_Error) { + $notification->push($searchResults->getMessage(), 'horde.error'); + header('Location:' . Horde::applicationUrl('search.php')); + exit; + } + + if ($searchResults['total'] > count($searchResults['results'])) { + $pager_ob = new Horde_Ui_Pager('thread_page', $vars, array('num' => $searchResults['total'], 'url' => 'search.php', 'perpage' => $thread_per_page)); + foreach ($info as $key => $val) { + if ($val) { + if ($key == 'keywords') { + $val = implode(' ', $val); + } + $pager_ob->preserve($key, $val); + } + } + $view->pager_link = $pager_ob->render(); + } + + $view->searchTotal = number_format($searchResults['total']); + $view->searchResults = $searchResults['results']; +} + +$view->menu = Agora::getMenu('string'); +$view->notify = Horde_Util::bufferOutput(array($notification, 'notify'), array('listeners' => 'status')); +$view->searchForm = Horde_Util::bufferOutput(array($form, 'renderActive'), null, $vars, 'search.php', 'get'); + +$title = _("Search Forums"); +require AGORA_TEMPLATES . '/common-header.inc'; +echo $view->render('search.html.php'); +require $registry->get('templates', 'horde') . '/common-footer.inc'; diff --git a/agora/templates/.htaccess b/agora/templates/.htaccess new file mode 100755 index 000000000..3a4288278 --- /dev/null +++ b/agora/templates/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/agora/templates/ban.html.php b/agora/templates/ban.html.php new file mode 100755 index 000000000..fb98d0a94 --- /dev/null +++ b/agora/templates/ban.html.php @@ -0,0 +1,19 @@ + +notify; ?> + +

_arrays['forum']['forum_name']; ?>

+
_arrays['forum']['forum_description']; ?>
+ +
+ +banned)): ?> +

+
    +banned as $k1 => $v1): ?> +
  • banned)) { echo $this->banned; } ?>
  • + +
+
+ + +formbox; ?> \ No newline at end of file diff --git a/agora/templates/block/forums.html.php b/agora/templates/block/forums.html.php new file mode 100755 index 000000000..5db8f4d36 --- /dev/null +++ b/agora/templates/block/forums.html.php @@ -0,0 +1,49 @@ + + + + col_headers['forum_name_class']; ?>> + col_headers['forum_name']; ?> + + col_headers['message_count_class']; ?>> + col_headers['message_count']; ?> + + col_headers['message_subject_class']; ?>> + col_headers['message_subject']; ?> + + col_headers['message_author_class']; ?>> + col_headers['message_author']; ?> + + col_headers['message_timestamp_class']; ?>> + col_headers['message_timestamp']; ?> + + + + +forums_list as $k1 => $v1): ?> + + + + + + + + + +
+ + + + [ $v2): ?>] + + + + + + + + + + + + +
diff --git a/agora/templates/block/thread.html.php b/agora/templates/block/thread.html.php new file mode 100755 index 000000000..9e75fb0e6 --- /dev/null +++ b/agora/templates/block/thread.html.php @@ -0,0 +1,41 @@ +threads_list)): ?> + + + + + + + + +threads_list as $k1 => $v1): ?> + + + + + + + + +
col_headers['message_thread_class']; ?>> + col_headers['message_thread']; ?> + col_headers['message_author_class']; ?>> + col_headers['message_author']; ?> + col_headers['message_timestamp_class']; ?>> + col_headers['message_timestamp']; ?> +
+ + thread_view_bodies)): ?> + + + + +
+ +
+ +
+ + + +
+ diff --git a/agora/templates/block/threads.html.php b/agora/templates/block/threads.html.php new file mode 100755 index 000000000..18e65890e --- /dev/null +++ b/agora/templates/block/threads.html.php @@ -0,0 +1,37 @@ + + + + col_headers['message_subject_class']; ?>> + col_headers['message_subject']; ?> + + col_headers['message_author_class']; ?>> + col_headers['message_author']; ?> + + col_headers['message_timestamp_class']; ?>> + col_headers['message_timestamp']; ?> + + + +threads)): ?> +threads as $k1 => $v1): ?> + + + + + + + + + + + + +
+ + + + + +
+ +
diff --git a/agora/templates/common-header.inc b/agora/templates/common-header.inc new file mode 100644 index 000000000..0ed3d03be --- /dev/null +++ b/agora/templates/common-header.inc @@ -0,0 +1,30 @@ + + + + + +' : '' ?> + +get('name'); +if (!empty($title)) $page_title .= ' :: ' . $title; +if (!empty($refresh_time) && ($refresh_time > 0) && !empty($refresh_url)) { + echo "\n"; +} + +Horde::includeScriptFiles(); + +?> +<?php echo htmlspecialchars($page_title) ?> + + +" href="" type="application/rss+xml" /> + + +> diff --git a/agora/templates/forums.html.php b/agora/templates/forums.html.php new file mode 100755 index 000000000..7ffe4046e --- /dev/null +++ b/agora/templates/forums.html.php @@ -0,0 +1,61 @@ + +notify; ?> + +

+ actions)): ?> + + actions); foreach ($this->actions as $k1 => $v1): ?>actions)) { echo $this->actions; } ?> + + +

+forums_list) || !empty($this->forums_list)): ?> + + + + + + + + + forums_list as $k2 => $v2): ?> + + + + + + + +
col_headers['forum_name_class']; ?>> + col_headers['forum_name']; ?> + col_headers['message_count_class']; ?>> + col_headers['message_count']; ?> + col_headers['thread_count_class']; ?>> + col_headers['thread_count']; ?> + col_headers['message_timestamp_class']; ?>> + col_headers['message_timestamp']; ?> +
+ +

+ + : + $v3): ?> + + +
+ : + $v4): ?> +
+ + + + + +
+ + + +
+ pager_link;?> + +

+ diff --git a/agora/templates/main.html.php b/agora/templates/main.html.php new file mode 100755 index 000000000..9cc078851 --- /dev/null +++ b/agora/templates/main.html.php @@ -0,0 +1,3 @@ + +notify; ?> +main; ?> diff --git a/agora/templates/messages/edit.html.php b/agora/templates/messages/edit.html.php new file mode 100755 index 000000000..cd81b1498 --- /dev/null +++ b/agora/templates/messages/edit.html.php @@ -0,0 +1,28 @@ + +notify; ?> + +formbox; ?> + +replying)): ?> + +
+

+ message_subject; ?> +

+ + + + + + +
+ message_author_avatar)): ?> + <?php echo $this->message_author; ?> +
+ + message_author; ?> +
+ message_body; ?> +
+ + diff --git a/agora/templates/messages/flat.html.php b/agora/templates/messages/flat.html.php new file mode 100644 index 000000000..5e805f058 --- /dev/null +++ b/agora/templates/messages/flat.html.php @@ -0,0 +1,34 @@ +threads_list as $k1 => $v1): ?> + +
+ +
+ + + + + + + + [ + + $v2): ?> + + + + ] + +
+ +
+

+ +

+
+ +
+
+ + diff --git a/agora/templates/messages/flat_thread.html.php b/agora/templates/messages/flat_thread.html.php new file mode 100755 index 000000000..edd032f0b --- /dev/null +++ b/agora/templates/messages/flat_thread.html.php @@ -0,0 +1,29 @@ +threads_list as $k1 => $v1): ?> + +
+ +
+
+
+ + +
+ +
[ + + $v2): ?> + + ] + +
+ +
+

+ +

+
+ +
+
+ + diff --git a/agora/templates/messages/form.html.php b/agora/templates/messages/form.html.php new file mode 100755 index 000000000..f746ccb51 --- /dev/null +++ b/agora/templates/messages/form.html.php @@ -0,0 +1,24 @@ + +notify; ?> + +formbox; ?> + +
+

+ message_subject; ?> +

+ + + + + + +
+ message_author_avatar)): ?> + <?php echo $this->message_author; ?> +
+ + message_author; ?> +
+ message_body; ?> +
diff --git a/agora/templates/messages/index.html.php b/agora/templates/messages/index.html.php new file mode 100755 index 000000000..fa1ce730f --- /dev/null +++ b/agora/templates/messages/index.html.php @@ -0,0 +1,22 @@ +" href="rss ?>" type="application/rss+xml" /> + +notify; ?> + +
+ actions)): ?> + + actions); foreach ($this->actions as $k1 => $v1): ?>actions)) { echo $this->actions; } ?> + + +
+ +pager_link; ?> + +
+ threads;?> +
+ +pager_link; ?> + +
+form; ?> \ No newline at end of file diff --git a/agora/templates/messages/message.html.php b/agora/templates/messages/message.html.php new file mode 100755 index 000000000..261e94b5b --- /dev/null +++ b/agora/templates/messages/message.html.php @@ -0,0 +1,44 @@ + +notify; ?> + +
+ actions)): ?> + + actions); foreach ($this->actions as $k1 => $v1): ?>actions)) { echo $this->actions; } ?> + + + message_subject)): ?>message_subject; ?>  +
+ +
+
+ message_author_avatar)): ?> + <?php echo $this->message_author; ?> +
+ + message_author; ?> + message_author_moderator)): ?> +
+ +
+
+

+ message_body; ?> + message_attachment)): ?>
message_attachment; ?> +

+
+
+
+ +

+ +

+ +
+ threads; ?> +
+ + pager_link; ?> + +
+form; ?> diff --git a/agora/templates/messages/threads.html.php b/agora/templates/messages/threads.html.php new file mode 100755 index 000000000..91dfcb597 --- /dev/null +++ b/agora/templates/messages/threads.html.php @@ -0,0 +1,50 @@ + + + + + + + + threads_list as $k1 => $v1): ?> + thread_view_bodies)): ?> style="border-bottom:0;" > + + + + + thread_view_bodies)): ?> + + + + + + +
+ col_headers['message_thread']; ?> + + col_headers['message_author']; ?> + + col_headers['message_timestamp']; ?> +
+ + + [ ] + + + + + +
+ +
+ +
+
diff --git a/agora/templates/moderate.html.php b/agora/templates/moderate.html.php new file mode 100755 index 000000000..901591ce8 --- /dev/null +++ b/agora/templates/moderate.html.php @@ -0,0 +1,56 @@ +menu)): ?> + + +notify; ?> + +messages)): ?> + +
+session_tag; ?> + +

+ + + + + col_headers['forum_id_class']; ?>> + col_headers['forum_id']; ?> + + col_headers['message_subject_class']; ?>> + col_headers['message_subject']; ?> + + col_headers['message_author_class']; ?>> + col_headers['message_author']; ?> + + col_headers['message_body_class']; ?>> + col_headers['message_body']; ?> + + col_headers['message_timestamp_class']; ?>> + col_headers['message_timestamp']; ?> + + + + + messages as $k1 => $v1): ?> + + + + + + + + + + +
+
+

+ buttons as $k2 => $v2): ?> + + +

+
+ +pager; ?> + + diff --git a/agora/templates/moderators.html.php b/agora/templates/moderators.html.php new file mode 100755 index 000000000..3cca586b4 --- /dev/null +++ b/agora/templates/moderators.html.php @@ -0,0 +1,33 @@ + +notify; ?> + +

+forums)): ?> + + + + + + +forums as $k1 => $v1): ?> + + + + + + +
forums)) { echo $this->forums; } ?> + + $v2): ?> +
+ + +
+ +

+ + + +
+ +formbox; ?> \ No newline at end of file diff --git a/agora/templates/prefs/avatarselect.inc b/agora/templates/prefs/avatarselect.inc new file mode 100644 index 000000000..22157e061 --- /dev/null +++ b/agora/templates/prefs/avatarselect.inc @@ -0,0 +1,10 @@ +isFolder(Agora::AVATAR_PATH, 'gallery')): ?> +

+ +

+ diff --git a/agora/templates/search.html.php b/agora/templates/search.html.php new file mode 100755 index 000000000..808c2c2b8 --- /dev/null +++ b/agora/templates/search.html.php @@ -0,0 +1,36 @@ + +notify; ?> + +searchResults)): ?> +

(searchTotal; ?>)

+ +searchResults as $k1 => $v1): ?> + + + + $v2): ?> + + + + + + + + +
+ +
  + + + + + +
+ +pager_link; ?> + +
+ + + +searchForm; ?> diff --git a/agora/templates/threads.html.php b/agora/templates/threads.html.php new file mode 100755 index 000000000..9da20e63c --- /dev/null +++ b/agora/templates/threads.html.php @@ -0,0 +1,71 @@ +" href="rss ?>" type="application/rss+xml" /> + +notify; ?> + +
+ actions)): ?> + + actions); foreach ($this->actions as $k1 => $v1): ?> + + + forum_name; ?> +
+
+ forum_description; ?> +
+ +threads)): ?> + + + + + + + + + + threads as $k2 => $v2): ?> + + + + + + + + +
col_headers['message_subject_class']; ?>> + col_headers['message_subject']; ?> + col_headers['message_seq_class']; ?>> + col_headers['message_seq']; ?> + col_headers['view_count_class']; ?>> + col_headers['view_count']; ?> + col_headers['message_author_class']; ?>> + col_headers['message_author']; ?> + col_headers['message_modifystamp_class']; ?>> + col_headers['message_modifystamp']; ?> +
+ + + + +
[ $v3): ?> ] +
[ $v4): ?> ] +
+
+ + + + + + + +
+ + + +
+ pager_link; ?> + +

+ + diff --git a/agora/themes/bluewhite/graphics/comment_box.png b/agora/themes/bluewhite/graphics/comment_box.png new file mode 100755 index 000000000..39c6e1a22 Binary files /dev/null and b/agora/themes/bluewhite/graphics/comment_box.png differ diff --git a/agora/themes/bluewhite/screen.css b/agora/themes/bluewhite/screen.css new file mode 100755 index 000000000..d5f71740a --- /dev/null +++ b/agora/themes/bluewhite/screen.css @@ -0,0 +1,24 @@ +/** + * $Horde: agora/themes/bluewhite/screen.css,v 1.2 2006/10/29 18:18:46 chuck Exp $ + */ + +.messageContainer { + background: #fff; + width: auto; +} +.messageAuthor { + float: left; + width: 10em; + border: 1px solid #ccc; + padding: 1em; + margin: 1em; +} +.messageBody { + float: left; + width: 410px; + min-height: 50px; + border: none; + margin: 1em; + padding: 0 0 30px 0; + background: #ffc url("graphics/comment_box.png") no-repeat bottom center; +} diff --git a/agora/themes/graphics/agora.png b/agora/themes/graphics/agora.png new file mode 100755 index 000000000..b25f15f43 Binary files /dev/null and b/agora/themes/graphics/agora.png differ diff --git a/agora/themes/graphics/favicon.ico b/agora/themes/graphics/favicon.ico new file mode 100755 index 000000000..3cb06ae76 Binary files /dev/null and b/agora/themes/graphics/favicon.ico differ diff --git a/agora/themes/graphics/flagged.png b/agora/themes/graphics/flagged.png new file mode 100755 index 000000000..63ac464d4 Binary files /dev/null and b/agora/themes/graphics/flagged.png differ diff --git a/agora/themes/graphics/forums.png b/agora/themes/graphics/forums.png new file mode 100755 index 000000000..4eb3f6990 Binary files /dev/null and b/agora/themes/graphics/forums.png differ diff --git a/agora/themes/graphics/hot.png b/agora/themes/graphics/hot.png new file mode 100755 index 000000000..6d80d982e Binary files /dev/null and b/agora/themes/graphics/hot.png differ diff --git a/agora/themes/graphics/moderate.png b/agora/themes/graphics/moderate.png new file mode 100755 index 000000000..008099373 Binary files /dev/null and b/agora/themes/graphics/moderate.png differ diff --git a/agora/themes/graphics/newforum.png b/agora/themes/graphics/newforum.png new file mode 100755 index 000000000..18cb781b3 Binary files /dev/null and b/agora/themes/graphics/newforum.png differ diff --git a/agora/themes/graphics/newmessage.png b/agora/themes/graphics/newmessage.png new file mode 100755 index 000000000..abc33ce89 Binary files /dev/null and b/agora/themes/graphics/newmessage.png differ diff --git a/agora/themes/graphics/reply.png b/agora/themes/graphics/reply.png new file mode 100755 index 000000000..9eb9e4092 Binary files /dev/null and b/agora/themes/graphics/reply.png differ diff --git a/agora/themes/graphics/thread.png b/agora/themes/graphics/thread.png new file mode 100755 index 000000000..872886359 Binary files /dev/null and b/agora/themes/graphics/thread.png differ diff --git a/agora/themes/graphics/threads.png b/agora/themes/graphics/threads.png new file mode 100755 index 000000000..872886359 Binary files /dev/null and b/agora/themes/graphics/threads.png differ diff --git a/agora/themes/screen.css b/agora/themes/screen.css new file mode 100755 index 000000000..0ba998061 --- /dev/null +++ b/agora/themes/screen.css @@ -0,0 +1,21 @@ +/** + * $Horde: agora/themes/screen.css,v 1.4 2007/05/07 18:58:35 chuck Exp $ + */ + +.messageContainer { + width: 100%; + padding: 2px; + background: #e9e9e9; + margin-bottom: 8px; +} +.messageAuthor { + width: 10%; +} +.messageBody { + width: 90%; + background: #fff; + border: 1px solid #ccc; +} +.messageBody p { + padding: 1em; +} diff --git a/agora/threads.php b/agora/threads.php new file mode 100644 index 000000000..fdebaeb5d --- /dev/null +++ b/agora/threads.php @@ -0,0 +1,82 @@ + + * @author Marko Djukic + */ + +define('AGORA_BASE', dirname(__FILE__)); +require_once AGORA_BASE . '/lib/base.php'; +require_once AGORA_BASE . '/lib/Messages.php'; + +/* Make sure we have a forum id. */ +list($forum_id, , $scope) = Agora::getAgoraId(); +if (empty($forum_id)) { + header('Location: ' . Horde::applicationUrl('forums.php', true)); + exit; +} + +/* Check if this is a valid thread, otherwise show the forum list. */ +$threads = &Agora_Messages::singleton($scope, $forum_id); +if ($threads instanceof PEAR_Error) { + $notification->push(sprintf(_("Could not list threads. %s"), $threads->getMessage()), 'horde.warning'); + header('Location: ' . Horde::applicationUrl('forums.php', true)); + exit; +} + +/* Which thread page are we on? Default to page 0. */ +$thread_page = Horde_Util::getFormData('thread_page', 0); +$threads_per_page = $prefs->getValue('threads_per_page'); +$thread_start = $thread_page * $threads_per_page; + +/* Get the forum data. */ +$forum_array = $threads->getForum(); + +/* Get the sorting. */ +$sort_by = Agora::getSortBy('threads'); +$sort_dir = Agora::getSortDir('threads'); + +/* Get a list of threads. */ +$threads_list = $threads->getThreads(0, false, $sort_by, $sort_dir, false, '', null, $thread_start, $threads_per_page); +if ($threads_list instanceof PEAR_Error) { + $notification->push($threads_list->getMessage(), 'horde.error'); + header('Location: ' . Horde::applicationUrl('forums.php', true)); + exit; +} elseif (empty($threads_list)) { + $threads_count = 0; +} else { + $threads_count = $threads->_forum['thread_count']; +} +/* Set up the column headers. */ +$col_headers = array('message_subject' => _("Subject"), 'message_seq' => _("Posts"), 'view_count' => _("Views"), 'message_author' => _("Started"), 'message_modifystamp' => _("Last post")); +$col_headers = Agora::formatColumnHeaders($col_headers, $sort_by, $sort_dir, 'threads'); + +/* Set up the template tags. */ +$view = new Agora_View(); +$view->col_headers = $col_headers; +$view->threads = $threads_list; +$view->forum_name = sprintf(_("Threads in %s"), $forum_array['forum_name']); +$view->forum_description = Agora_Messages::formatBody($forum_array['forum_description']); +$view->actions = $threads->getThreadActions(); +$view->menu = Agora::getMenu('string'); +$view->notify = Horde_Util::bufferOutput(array($notification, 'notify'), array('listeners' => 'status')); +$view->rss = Horde_Util::addParameter(Horde::applicationUrl('rss/threads.php', true, -1), array('scope' => $scope, 'forum_id' => $forum_id)); + +/* Set up pager. */ +$vars = Horde_Variables::getDefaultVariables(); +$pager_ob = new Horde_Ui_Pager('thread_page', $vars, array('num' => $threads_count, 'url' => 'threads.php', 'perpage' => $threads_per_page)); +$pager_ob->preserve('agora', Horde_Util::getFormData('agora')); +$view->pager_link = $pager_ob->render(); + +$title = sprintf(_("Threads in %s"), $forum_array['forum_name']); +require AGORA_TEMPLATES . '/common-header.inc'; +echo $view->render('threads.html.php'); +require $registry->get('templates', 'horde') . '/common-footer.inc'; diff --git a/agora/view.php b/agora/view.php new file mode 100644 index 000000000..5bfade8e8 --- /dev/null +++ b/agora/view.php @@ -0,0 +1,34 @@ + + */ + +define('AGORA_BASE', dirname(__FILE__)); +require_once AGORA_BASE . '/lib/base.php'; + +$action_id = Horde_Util::getFormData('action_id', 'download'); +$file_id = Horde_Util::getFormData('file_id'); +$file_name = Horde_Util::getFormData('file_name'); +$vfs_path = Agora::VFS_PATH . Horde_Util::getFormData('forum_id') . '/' . Horde_Util::getFormData('message_id'); +$file_type = Horde_Util::getFormData('file_type'); + +/* Get VFS object. */ +$vfs = Agora::getVFS(); + +/* Run through action handlers. TODO: Do inline viewing. */ +switch ($action_id) { +case 'download': + $file_data = $vfs->read($vfs_path, $file_id); + $browser->downloadHeaders($file_name, $file_type, false, strlen($file_data)); + echo $file_data; + break; +}