Changeset 2141
- Timestamp:
- 03/29/10 08:41:20 (14 years ago)
- Location:
- plugins/agora
- Files:
-
- 15 added
- 4 deleted
- 25 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/agora/_admin.php
r1885 r2141 4 4 # This file is part of agora, a plugin for Dotclear 2. 5 5 # 6 # Copyright (c) 2009 Osku , Tomtom and contributors 7 ## Licensed under the GPL version 2.0 license. 6 # Copyright (c) 2009-2010 Osku ,Tomtom and contributors 7 # 8 # Licensed under the GPL version 2.0 license. 8 9 # A copy of this license is available in LICENSE file or at 9 10 # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html … … 17 18 function agora_dashboard($core,$icons) 18 19 { 19 $icons['agora'] = new ArrayObject(array(__('Agora'),'plugin.php?p=agora','index.php?pf=agora/icon.png')); 20 $agora = new agora($core,false); 21 $thread_count = $core->blog->getPosts(array('post_type'=>'thread'),true)->f(0); 22 $str_threads = ($thread_count > 1) ? __('%d threads') : __('%d thread'); 23 24 $message_count = $agora->getMessages(array(),true)->f(0); 25 $str_messages = ($message_count > 1) ? __('%d messages') : __('%d message'); 26 $icons['agora'] = new ArrayObject(array(sprintf($str_threads,$thread_count),'plugin.php?p=agora','index.php?pf=agora/icon.png')); 27 $icons['agora'][0] .= '</a> <br /><a href="plugin.php?p=agora&act=messages">'.sprintf($str_messages,$message_count); 20 28 } 21 29 22 $_menu[' Blog']->addItem(__('Agora'),23 'plugin.php?p=agora ','index.php?pf=agora/icon-small.png',30 $_menu['Plugins']->addItem(__('agora:config'), 31 'plugin.php?p=agora&act=options','index.php?pf=agora/icon-small.png', 24 32 preg_match('/plugin.php\?p=agora(&.*)?$/',$_SERVER['REQUEST_URI']), 25 33 $core->auth->check('admin',$core->blog->id)); … … 28 36 $core->auth->setPermissionType('moderator',__('can moderate the agora')); 29 37 38 # Rest methods 39 $core->rest->addFunction('getMessageById',array('agoraRestMethods','getMessageById')); 40 41 class agoraRestMethods 42 { 43 public static function getMessageById($core,$get) 44 { 45 //global $core; 46 47 if (empty($get['id'])) { 48 throw new Exception('No message ID'); 49 } 50 51 $rs = $core->blog->agora->getMessages(array('message_id' => (integer) $get['id'])); 52 53 if ($rs->isEmpty()) { 54 throw new Exception('No message for this ID'); 55 } 56 57 $rsp = new xmlTag('post'); 58 $rsp->id = $rs->message_id; 59 60 $rsp->message_dt($rs->message_dt); 61 $rsp->message_creadt($rs->message_creadt); 62 $rsp->message_upddt($rs->message_upddt); 63 $rsp->user_id($rs->user_id); 64 65 $rsp->message_content($rs->message_content); 66 67 $rsp->message_status($rs->message_status); 68 $rsp->post_title($rs->post_title); 69 $rsp->post_url($rs->post_url); 70 $rsp->post_id($rs->post_id); 71 $rsp->post_dt($rs->post_dt); 72 $rsp->user_id($rs->user_id); 73 $rsp->user_name($rs->user_name); 74 $rsp->user_firstname($rs->user_firstname); 75 $rsp->user_displayname($rs->user_displayname); 76 $rsp->user_email($rs->user_email); 77 $rsp->user_url($rs->user_url); 78 $rsp->cat_title($rs->cat_title); 79 $rsp->cat_url($rs->cat_url); 80 81 $rsp->message_display_content($rs->getContent(true)); 82 83 if ($core->auth->userID()) { 84 # --BEHAVIOR-- adminAfterCommentDesc 85 $rsp->message_spam_disp($core->callBehavior('adminAfterMessageDesc', $rs)); 86 } 87 88 return $rsp; 89 } 90 } 30 91 ?> -
plugins/agora/_define.php
r1864 r2141 4 4 # This file is part of agora, a plugin for Dotclear 2. 5 5 # 6 # Copyright (c) 2009 Osku , Tomtom and contributors 7 ## Licensed under the GPL version 2.0 license. 6 # Copyright (c) 2009-2010 Osku ,Tomtom and contributors 7 # 8 # Licensed under the GPL version 2.0 license. 8 9 # A copy of this license is available in LICENSE file or at 9 10 # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html … … 15 16 $this->registerModule( 16 17 /* Name */ "Agora", 17 /* Description*/ " It is not a forum but almost",18 /* Description*/ "Stuff to build a forum", 18 19 /* Author */ "Osku, Tomtom (http://blog.zenstyle.fr) and contributors", 19 /* Version */ '0.5 trunk',20 /* Version */ '0.5.3', 20 21 /* Permissions */ 'admin' 21 22 ); -
plugins/agora/_install.php
r1864 r2141 4 4 # This file is part of agora, a plugin for Dotclear 2. 5 5 # 6 # Copyright (c) 2009 Osku , Tomtom and contributors 7 ## Licensed under the GPL version 2.0 license. 6 # Copyright (c) 2009-2010- Osku ,Tomtom and contributors 7 # 8 # Licensed under the GPL version 2.0 license. 8 9 # A copy of this license is available in LICENSE file or at 9 10 # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html … … 28 29 ->message_dt ('timestamp', 0, false, 'now()') 29 30 ->message_tz ('varchar', 128, false, "'UTC'") 31 ->message_creadt ('timestamp', 0, false, 'now()') 30 32 ->message_upddt ('timestamp', 0, false, 'now()') 31 33 ->message_format ('varchar', 32, false, "'xhtml'") … … 48 50 $changes = $si->synchronize($s); 49 51 52 $s =& $core->blog->settings; 53 $s->setNameSpace('agora'); 54 $s->put('agora_flag',false,'boolean','Agora activation flag',true,true); 55 $s->put('agora_announce',__('<p class="message">Welcome to the Agora.</p>'),'string','Agora announce',true,true); 56 $s->put('nb_message_per_feed',20,'integer','Number of messages on feeds',true,true); 57 50 58 $core->setVersion('agora',$version); 51 59 return true; -
plugins/agora/_prepend.php
r1882 r2141 4 4 # This file is part of agora, a plugin for Dotclear 2. 5 5 # 6 # Copyright (c) 2009 Osku , Tomtom and contributors 7 ## Licensed under the GPL version 2.0 license. 6 # Copyright (c) 2009-2010 Osku ,Tomtom and contributors 7 # 8 # Licensed under the GPL version 2.0 license. 8 9 # A copy of this license is available in LICENSE file or at 9 10 # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html … … 16 17 if ($core->blog->settings->agora_flag) 17 18 { 18 $core->url->register('agora','agora','^agora(.*)$',array('urlAgora','forum')); 19 $core->url->register('subforum','agora/sub','^agora/sub/(.+)$',array('urlAgora','subforum')); 20 $core->url->register('newthread','agora/newthread','^agora/newthread(.*)$',array('urlAgora','newthread')); 21 $core->url->register('thread','agora/thread','^agora/thread/(.+)$',array('urlAgora','thread')); 19 $core->url->register('agora','agora','^agora(.*)$',array('urlAgora','agora')); 20 $core->url->register('place','place','^place/(.+)$',array('urlAgora','place')); 21 $core->url->register('newthread','newthread','^newthread(.*)$',array('urlAgora','newthread')); 22 $core->url->register('thread','thread','^thread/(.+)$',array('urlAgora','thread')); 23 $core->url->register('threadpreview','threadpreview','^threadpreview/(.+)$',array('urlAgora','threadpreview')); 22 24 //$core->url->register('answer','agora/answer','^agora/answer/(.+)$',array('urlAgora','answer')); 23 $core->url->register('editthread',' agora/edit/thread','^agora/edit/thread/(.+)$',array('urlAgora','editthread'));24 $core->url->register('removethread',' agora/remove/thread','^agora/remove/thread/(.+)$',array('urlAgora','removethread'));25 $core->url->register('editmessage',' agora/edit/message','^agora/edit/message/(.+)$',array('urlAgora','editmessage'));26 $core->url->register('removemessage',' agora/remove/message','^agora/remove/message/(.+)$',array('urlAgora','removemessage'));27 $core->url->register('register',' agora/register','^agora/register$',array('urlAgora','register'));28 $core->url->register('login',' agora/login','^agora/login$',array('urlAgora','login'));29 $core->url->register('logout',' agora/logout','^agora/logout$',array('urlAgora','logout'));30 $core->url->register('profile',' agora/profile','^agora/profile/(.+)$',array('urlAgora','profile'));25 $core->url->register('editthread','thread/edit','^thread/edit/(.+)$',array('urlAgora','editthread')); 26 $core->url->register('removethread','thread/remove','^thread/remove/(.+)$',array('urlAgora','removethread')); 27 $core->url->register('editmessage','message/edit','^message/edit/(.+)$',array('urlAgora','editmessage')); 28 $core->url->register('removemessage','message/remove','^message/remove/(.+)$',array('urlAgora','removemessage')); 29 $core->url->register('register','register','^register$',array('urlAgora','register')); 30 $core->url->register('login','login','^login$',array('urlAgora','login')); 31 $core->url->register('logout','logout','^logout$',array('urlAgora','logout')); 32 $core->url->register('profile','profile','^profile/(.+)$',array('urlAgora','profile')); 31 33 //$core->url->register('userlist','agora/userlist','^agora/userlist/(.+)$',array('urlAgora','userlist')); 32 34 //$core->url->register('recovery','agora/recovery','^agora/recovery(.*)$',array('urlAgora','recovery')); 33 $core->url->register('ago feed','agora/feed','^agora/feed/(.+)$',array('urlAgora','feed'));35 $core->url->register('agora_feed','feed/agora','^feed/agora/(.+)$',array('urlAgora','feed')); 34 36 } 35 37 36 $core->setPostType('thread post','plugin.php?p=agora&act=thread&id=%d',$core->url->getBase('thread').'/%s');38 $core->setPostType('thread','plugin.php?p=agora&act=thread&id=%d',$core->url->getBase('thread').'/%s'); 37 39 38 40 $__autoload['agora'] = dirname(__FILE__).'/inc/class.agora.php'; … … 45 47 $__autoload['rsExtMessage'] = dirname(__FILE__).'/inc/class.rs.agora.php'; 46 48 49 $core->blog->agora = new agora($core,false); 47 50 ?> -
plugins/agora/_public.php
r1882 r2141 4 4 # This file is part of agora, a plugin for Dotclear 2. 5 5 # 6 # Copyright (c) 2009 Osku , Tomtom and contributors 7 ## Licensed under the GPL version 2.0 license. 6 # Copyright (c) 2009-2010 Osku ,Tomtom and contributors 7 # 8 # Licensed under the GPL version 2.0 license. 8 9 # A copy of this license is available in LICENSE file or at 9 10 # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html … … 20 21 21 22 // URLs 22 $core->tpl->addValue(' forumURL',array('agoraTemplate','forumURL'));23 $core->tpl->addValue('agoraURL',array('agoraTemplate','agoraURL')); 23 24 $core->tpl->addValue('registerURL',array('agoraTemplate','registerURL')); 24 25 $core->tpl->addValue('loginURL',array('agoraTemplate','loginURL')); … … 26 27 $core->tpl->addValue('logoutURL',array('agoraTemplate','logoutURL')); 27 28 $core->tpl->addValue('AgoraFeedURL',array('agoraTemplate','AgoraFeedURL')); 28 $core->tpl->addValue(' SubforumFeedURL',array('agoraTemplate','SubforumFeedURL'));29 $core->tpl->addValue('placeFeedURL',array('agoraTemplate','placeFeedURL')); 29 30 30 31 … … 34 35 $core->tpl->addValue('RegisterPreviewEmail',array('agoraTemplate','RegisterPreviewEmail')); 35 36 36 // Subforums loop 37 $core->tpl->addBlock('Subforums',array('agoraTemplate','Subforums')); 38 $core->tpl->addBlock('SubforumFirstChildren',array('agoraTemplate','SubforumFirstChildren')); 39 $core->tpl->addValue('SubforumURL',array('agoraTemplate','SubforumURL')); 40 $core->tpl->addValue('SubforumThreadsNumber',array('agoraTemplate','SubforumThreadsNumber')); 41 $core->tpl->addValue('SubforumAnswersNumber',array('agoraTemplate','SubforumAnswersNumber')); 42 $core->tpl->addValue('SubForumNewThreadLink',array('agoraTemplate','SubForumNewThreadLink')); 43 $core->tpl->addValue('SubforumID',array('agoraTemplate','SubforumID')); 44 $core->tpl->addValue('SubforumSpacer',array('agoraTemplate','SubforumSpacer')); 45 $core->tpl->addBlock('SubforumComboSelected',array('agoraTemplate','SubforumComboSelected')); 37 // places loop 38 $core->tpl->addValue('placeURL',array('agoraTemplate','placeURL')); 39 $core->tpl->addValue('placeThreadsNumber',array('agoraTemplate','placeThreadsNumber')); 40 $core->tpl->addValue('placeAnswersNumber',array('agoraTemplate','placeAnswersNumber')); 41 $core->tpl->addValue('placeNewThreadLink',array('agoraTemplate','placeNewThreadLink')); 42 $core->tpl->addValue('placeID',array('agoraTemplate','placeID')); 43 $core->tpl->addValue('placeSpacer',array('agoraTemplate','placeSpacer')); 44 $core->tpl->addBlock('placeComboSelected',array('agoraTemplate','placeComboSelected')); 46 45 47 46 // Pagination plus (getMessages) … … 55 54 //$core->tpl->addBlock('ForumEntries',array('agoraTemplate','ForumEntries')); 56 55 $core->tpl->addValue('EntryIfClosed',array('agoraTemplate','EntryIfClosed')); 57 $core->tpl->addValue(' ThreadAnswersCount',array('agoraTemplate','ThreadAnswersCount'));56 $core->tpl->addValue('EntryMessageCount',array('agoraTemplate','EntryMessageCount')); 58 57 $core->tpl->addValue('EntryCreaDate',array('agoraTemplate','EntryCreaDate')); 59 // Thread loop, subforum context 58 $core->tpl->addValue('EntryUpdDate',array('agoraTemplate','EntryUpdDate')); 59 // Thread loop, place context 60 60 $core->tpl->addBlock('IfThreadPreview',array('agoraTemplate','IfThreadPreview')); 61 61 $core->tpl->addValue('ThreadPreviewTitle',array('agoraTemplate','ThreadPreviewTitle')); 62 62 $core->tpl->addValue('ThreadPreviewContent',array('agoraTemplate','ThreadPreviewContent')); 63 $core->tpl->addValue('ThreadURL',array('agoraTemplate','ThreadURL'));63 //$core->tpl->addValue('ThreadURL',array('agoraTemplate','ThreadURL')); 64 64 $core->tpl->addValue('ThreadCategoryURL',array('agoraTemplate','ThreadCategoryURL')); 65 $core->tpl->addValue(' AnswerThreadURL',array('agoraTemplate','AnswerThreadURL'));65 $core->tpl->addValue('MessageThreadURL',array('agoraTemplate','MessageThreadURL')); 66 66 $core->tpl->addValue('ThreadProfileUserID',array('agoraTemplate','ThreadProfileUserID')); 67 67 $core->tpl->addBlock('ThreadComboSelected',array('agoraTemplate','ThreadComboSelected')); … … 95 95 $core->tpl->addValue('MessageOrderNumber',array('agoraTemplate','MessageOrderNumber')); 96 96 $core->tpl->addValue('MessageAuthorID',array('agoraTemplate','MessageAuthorID')); 97 $core->tpl->addValue('MessageAuthor ',array('agoraTemplate','MessageAuthor'));97 $core->tpl->addValue('MessageAuthorCommonName',array('agoraTemplate','MessageAuthorCommonName')); 98 98 $core->tpl->addValue('MessageDate',array('agoraTemplate','MessageDate')); 99 99 $core->tpl->addValue('MessageTime',array('agoraTemplate','MessageTime')); … … 102 102 $core->tpl->addValue('MessageEditContent',array('agoraTemplate','MessageEditContent')); 103 103 $core->tpl->addValue('MessageProfileUserID',array('agoraTemplate','MessageProfileUserID')); 104 $core->tpl->addValue('MessageEntryTitle',array('agoraTemplate','MessageEntryTitle')); 105 $core->tpl->addValue('MessageFeedID',array('agoraTemplate','MessageFeedID')); 104 106 //$core->tpl->addValue('',array('agoraTemplate','')); 105 107 //$core->tpl->addValue('',array('agoraTemplate','')); … … 262 264 $_ctx->agora_register['pwd'] = ''; 263 265 264 $url = $core->blog->url.$core->url->getBase(" forum");266 $url = $core->blog->url.$core->url->getBase("agora"); 265 267 266 268 $register = isset($_POST['ru_login']) && isset($_POST['ru_email']); … … 325 327 $core->callBehavior('publicAfterUserCreate',$cur,$user_id); 326 328 329 header('Content-Type: text/html; charset=UTF-8'); 327 330 http::head(201,'Created'); 328 331 header('Content-Type: text/html'); … … 471 474 { 472 475 $user_id = ($core->auth->userID() != false && isset($_SESSION['sess_user_id'])) ? $core->auth->userID() : ''; 473 $_ctx->profile = $_ctx->agora->getUser($args); 474 if ($_ctx->profile->isEmpty()) { 476 //$_ctx->users->user_id = $args; 477 $_ctx->users = $_ctx->agora->getUser($args); 478 if ($_ctx->users->isEmpty()) { 475 479 self::p404(); 476 480 } … … 478 482 $_ctx->profile_user = new ArrayObject(); 479 483 480 $_ctx->profile_user['pseudo'] = $_ctx-> profile->user_displayname;481 $_ctx->profile_user['email'] = $_ctx-> profile->user_email;482 $_ctx->profile_user['url'] = $_ctx-> profile->user_url;483 $_ctx->profile_user['status'] = $_ctx-> profile->user_status;484 $_ctx->profile_user['pseudo'] = $_ctx->users->user_displayname; 485 $_ctx->profile_user['email'] = $_ctx->users->user_email; 486 $_ctx->profile_user['url'] = $_ctx->users->user_url; 487 $_ctx->profile_user['status'] = $_ctx->users->user_status; 484 488 $_ctx->profile_user['pwd'] = ''; 485 489 $_ctx->profile_user['msg'] = ''; … … 574 578 public static function old_forum($args) 575 579 { 576 // URL forum/ : home of the forum : see categories aka subforums580 // URL forum/ : home of the forum : see categories aka places 577 581 578 582 global $core, $_ctx; … … 592 596 } 593 597 594 public static function forum($args)598 public static function agora($args) 595 599 { 596 600 global $core; … … 613 617 if (empty($_GET['q'])) { 614 618 $core->tpl->setPath($core->tpl->getPath(), dirname(__FILE__).'/default-templates'); 615 self::serveDocument(' forum.html','text/html',false);619 self::serveDocument('agora.html','text/html',false); 616 620 } else { 617 621 self::search(); … … 634 638 } 635 639 636 public static function subforum($args)637 { 638 // URL forum/sub/sub_url : view threads of a subforum640 public static function place($args) 641 { 642 // URL forum/sub/sub_url : view threads of a place 639 643 // URL forum/sub/sub_url /newthread/ : write a new thread in the category 640 644 … … 649 653 self::p404(); 650 654 } 651 $params['without_empty'] = false;655 //$params['without_empty'] = false; 652 656 $params['cat_url'] = $args; 657 $params['post_type'] = 'thread'; 653 658 //$params['thread_id'] = ''; 654 659 … … 713 718 $cur->post_lang = $core->auth->getInfo('user_lang'); 714 719 $cur->post_content = $_POST['t_content']; 715 $cur->post_type = 'thread post';720 $cur->post_type = 'thread'; 716 721 $cur->post_open_comment = 1; 717 722 … … 719 724 //$cur->thread_id = ''; 720 725 721 $redir = $core->blog->url.$core->url->getBase(" subforum").'/'.$_ctx->categories->cat_url;726 $redir = $core->blog->url.$core->url->getBase("place").'/'.$_ctx->categories->cat_url; 722 727 $redir .= strpos($redir,'?') !== false ? '&' : '?'; 723 728 … … 745 750 } 746 751 $core->tpl->setPath($core->tpl->getPath(), dirname(__FILE__).'/default-templates'); 747 self::serveDocument(' subforum.html','text/html',false);752 self::serveDocument('place.html','text/html',false); 748 753 return; 749 754 } … … 777 782 $_ctx->thread_preview['rawcontent'] = ''; 778 783 $_ctx->thread_preview['preview'] = false; 779 $_ctx->thread_preview['cat'] = (!$_ctx->categories->isEmpty()) ? $_ctx->categories->cat_id : ''; 784 $_ctx->thread_preview['cat'] = ($_ctx->categories->isEmpty()) ? '' : $_ctx->categories->cat_id; 785 $_ctx->thread_preview['not_empty'] = ( $args == '' ) ? false : true; 780 786 781 787 $thread_new = isset($_POST['t_content']) && isset($_POST['t_title']); … … 798 804 $_ctx->thread_preview['content'] = $content; 799 805 $_ctx->thread_preview['rawcontent'] = $_POST['t_content']; 800 $_ctx->thread_preview['cat'] = $_POST['t_cat']; 806 $_ctx->thread_preview['cat'] = (integer) $_POST['t_cat']; 807 $_ctx->thread_preview['not_empty'] = true; 801 808 802 809 if ($preview) … … 811 818 { 812 819 $cur = $core->con->openCursor($core->prefix.'post'); 820 # Magic tweak doesn't work here 821 //$core->blog->settings->system->post_url_format = "{id}"; 813 822 $cur->user_id = $user_id; 814 $cur->cat_id = $_POST['t_cat'];823 $cur->cat_id = ((integer) $_POST['t_cat']) ? (integer) $_POST['t_cat'] : null; 815 824 $cur->post_title = $title; 825 $offset = dt::getTimeOffset($core->blog->settings->blog_timezone); 826 $cur->post_dt = date('Y-m-d H:i:s',time() + $offset); 816 827 $cur->post_format = 'wiki'; 817 828 $cur->post_status = 1; 818 829 $cur->post_lang = $core->auth->getInfo('user_lang'); 819 830 $cur->post_content = $_POST['t_content']; 820 $cur->post_type = 'thread post';831 $cur->post_type = 'thread'; 821 832 $cur->post_open_comment = 1; 822 833 $redir = $core->blog->url.$core->url->getBase("thread").'/'; … … 867 878 URL forum/thread/id(& or ?)action=open : open the thead : thread->commentsActive : true 868 879 */ 869 $n = self::getPageNumber($args);870 871 if ($args == '' && !$n) {880 //$n = self::getPageNumber($args); 881 882 if ($args == ''){// && !$n) { 872 883 self::p404(); 873 884 } 874 875 if ($n) {876 $GLOBALS['_page_number'] = $n;877 }885 $core->blog->withoutPassword(false); 886 //if ($n) { 887 // $GLOBALS['_page_number'] = $n; 888 //} 878 889 879 890 $user_id = ($core->auth->userID() != false && isset($_SESSION['sess_user_id'])) ? $core->auth->userID() : ''; … … 882 893 $params = new ArrayObject(); 883 894 $params['post_url'] = $args; 884 $params['post_type'] = 'thread post';895 $params['post_type'] = 'thread'; 885 896 886 897 //$_ctx->posts = $_ctx->agora->getPostsPlus($params); … … 898 909 $_ctx->post_preview['rawcontent'] = ''; 899 910 $_ctx->post_preview['preview'] = false;*/ 900 $_ctx->nb_message_per_page = $core->blog->settings->agora_nb_msg_per_page_per_thread; 911 //$_ctx->nb_message_per_page = $core->blog->settings->agora_nb_msg_per_page_per_thread; 912 913 $post_id = $_ctx->posts->post_id; 914 $post_password = $_ctx->posts->post_password; 915 916 # Password protected entry 917 if ($post_password != '' && !$_ctx->preview) 918 { 919 # Get passwords cookie 920 if (isset($_COOKIE['dc_passwd'])) { 921 $pwd_cookie = unserialize($_COOKIE['dc_passwd']); 922 } else { 923 $pwd_cookie = array(); 924 } 925 926 # Check for match 927 if ((!empty($_POST['password']) && $_POST['password'] == $post_password) 928 || (isset($pwd_cookie[$post_id]) && $pwd_cookie[$post_id] == $post_password)) 929 { 930 $pwd_cookie[$post_id] = $post_password; 931 setcookie('dc_passwd',serialize($pwd_cookie),0,'/'); 932 } 933 else 934 { 935 self::serveDocument('password-form.html','text/html',false); 936 return; 937 } 938 } 901 939 902 940 $_ctx->message_preview = new ArrayObject(); … … 994 1032 $cur->post_title = $_ctx->posts->post_title; 995 1033 $cur->post_content = $_POST['p_content']; 996 $cur->post_type = 'thread post';*/1034 $cur->post_type = 'thread';*/ 997 1035 $cur = $core->con->openCursor($core->prefix.'message'); 998 1036 $cur->user_id = $user_id; 999 1037 $cur->message_format = 'wiki'; 1000 1038 $cur->message_content = $_POST['p_content']; 1039 $offset = dt::getTimeOffset($core->blog->settings->blog_timezone); 1040 $cur->message_dt = date('Y-m-d H:i:s',time() + $offset); 1041 //$cur->message_dt = date('Y-m-d H:i:s'); 1001 1042 $cur->post_id = $_ctx->posts->post_id; 1002 1043 $cur->message_status = 1 ; … … 1048 1089 return; 1049 1090 } 1091 1092 public static function threadpreview($args) 1093 { 1094 $core = $GLOBALS['core']; 1095 $_ctx = $GLOBALS['_ctx']; 1096 1097 if (!preg_match('#^(.+?)/([0-9a-z]{40})/(.+?)$#',$args,$m)) { 1098 # The specified Preview URL is malformed. 1099 self::p404(); 1100 } 1101 else 1102 { 1103 $user_id = $m[1]; 1104 $user_key = $m[2]; 1105 $post_url = $m[3]; 1106 if (!$core->auth->checkUser($user_id,null,$user_key)) { 1107 # The user has no access to the entry. 1108 self::p404(); 1109 } 1110 else 1111 { 1112 $_ctx->preview = true; 1113 self::thread($post_url); 1114 } 1115 } 1116 } 1050 1117 1051 1118 public static function removethread($args) … … 1068 1135 $params['post_id'] = $args; 1069 1136 $params['no_content'] = true; 1070 $params['post_type'] = 'thread post';1137 $params['post_type'] = 'thread'; 1071 1138 //$_ctx->posts = $_ctx->agora->getPostsPlus($params); 1072 1139 $_ctx->posts = $core->blog->getPosts($params); … … 1078 1145 1079 1146 //$redir = $core->blog->url.$core->url->getBase("thread").'/'.$_ctx->posts->post_url; 1080 $redir = $core->blog->url.$core->url->getBase(" subforum").'/'.$_ctx->posts->cat_url;1147 $redir = $core->blog->url.$core->url->getBase("place").'/'.$_ctx->posts->cat_url; 1081 1148 1082 1149 $redir .= strpos($redir,'?') !== false ? '&' : '?'; … … 1120 1187 1121 1188 $params['post_id'] = $args ; 1122 $params['post_type'] = 'thread post';1189 $params['post_type'] = 'thread'; 1123 1190 $_ctx->posts = $core->blog->getPosts($params); 1124 1191 … … 1134 1201 $_ctx->thread_preview['preview'] = false; 1135 1202 $_ctx->thread_preview['cat'] = $_ctx->posts->cat_id; 1203 $_ctx->thread_preview['not_empty'] = ( $args == '' ) ? false : true; 1136 1204 1137 1205 $p_content = $_ctx->posts->post_content; … … 1166 1234 $_ctx->thread_preview['title'] = $_POST['ed_title']; 1167 1235 $_ctx->thread_preview['cat'] = $_POST['ed_cat']; 1236 $_ctx->thread_preview['not_empty'] = true; 1168 1237 1169 1238 if ($preview) … … 1388 1457 1389 1458 public static function feed($args) 1390 { 1459 { // need review 1391 1460 global $core, $_ctx; 1392 1461 1393 1462 $type = null; 1394 $ answers = false;1463 $messages = false; 1395 1464 $cat_url = false; 1396 $ thread_id = null;1465 $post_id = null; 1397 1466 $params = array(); 1398 1467 $subtitle = ''; … … 1416 1485 } 1417 1486 1418 if (preg_match('#^(atom|rss2)/ answers/([0-9]+)$#',$args,$m))1419 { 1420 # Thread answers feed1487 if (preg_match('#^(atom|rss2)/messages/([0-9]+)$#',$args,$m)) 1488 { 1489 # Thread messages feed 1421 1490 $type = $m[1]; 1422 $ answers = true;1423 $ thread_id = (integer) $m[2];1424 } 1425 elseif (preg_match('#^(?: subforum/(.+)/)?(atom|rss2)?$#',$args,$m))1426 { 1427 # All threads feed1491 $messages = true; 1492 $post_id = (integer) $m[2]; 1493 } 1494 elseif (preg_match('#^(?:place/(.+)/)?(atom|rss2)(/messages)?$#',$args,$m)) 1495 { 1496 # All posts or comments feed 1428 1497 $type = $m[2]; 1498 $messages = !empty($m[3]); 1429 1499 if (!empty($m[1])) { 1430 1500 $cat_url = $m[1]; … … 1434 1504 { 1435 1505 self::p404(); 1506 return; 1436 1507 } 1437 1508 … … 1439 1510 { 1440 1511 $params['cat_url'] = $cat_url; 1441 $params['post_type'] = 'thread post';1442 $params['threads_only'] = true;1443 $_ctx->categories = $ _ctx->agora->getCategoriesPlus($params);1444 1445 if ($_ctx->categories->isEmpty()) { die ('coucou 1');1512 $params['post_type'] = 'thread'; 1513 //$params['threads_only'] = true; 1514 $_ctx->categories = $core->blog->getCategories($params); 1515 1516 if ($_ctx->categories->isEmpty()) { //die ('coucou 1'); 1446 1517 self::p404(); 1447 1518 } … … 1449 1520 $subtitle = ' - '.$_ctx->categories->cat_title; 1450 1521 } 1451 elseif ($thread_id) 1452 { 1453 $params['post_id'] = $thread_id; 1454 $params['post_type'] = 'threadpost'; 1455 $_ctx->posts = $_ctx->agora->getPostsPlus($params); 1522 elseif ($post_id) 1523 { 1524 $params['post_id'] = $post_id; 1525 $params['post_type'] = 'thread'; 1526 //$_ctx->posts = $_ctx->agora->getPostsPlus($params); 1527 $_ctx->posts = $core->blog->getPosts($params); 1456 1528 1457 1529 if ($_ctx->posts->isEmpty()) { … … 1463 1535 1464 1536 $tpl = 'agora-'.$type; 1465 if ($answers) { 1466 $tpl .= '-answers'; 1467 $_ctx->nb_comment_per_page = $core->blog->settings->nb_comment_per_feed; 1537 if ($messages) { 1538 $tpl .= '-messages'; 1539 //$_ctx->nb_comment_per_page = $core->blog->settings->nb_comment_per_feed; 1540 $_ctx->nb_message_per_page = $core->blog->settings->nb_message_per_feed; 1468 1541 } else { 1469 1542 $_ctx->nb_entry_per_page = $core->blog->settings->nb_post_per_feed; … … 1484 1557 } 1485 1558 1486 class tplAgora1559 class widgetsAgora 1487 1560 { 1488 1561 public static function memberWidget($w) … … 1490 1563 global $core; 1491 1564 1492 if ($core->url->type != ' subforum' && $core->url->type != 'thread'1565 if ($core->url->type != 'place' && $core->url->type != 'thread' 1493 1566 && $core->url->type != 'agora' && $core->url->type != 'agora-page') { 1494 1567 return; 1495 1568 } 1496 1569 1497 $user_displayname = ($core->auth->getInfo('user_displayname') == '' )? ' ' : $core->auth->getInfo('user_displayname'); 1498 1499 $content = 1570 $user_displayname = ($core->auth->getInfo('user_displayname') == '' )? $core->auth->userID() : $core->auth->getInfo('user_displayname'); 1571 1572 $content = 1573 '<li><a href="'.$core->blog->url.$core->url->getBase("agora").'">'.__('Home').'</a></li>'; 1574 $content .= 1500 1575 ($core->auth->userID() != false && isset($_SESSION['sess_user_id'])) ? 1501 1576 '<li><a href="'.$core->blog->url.$core->url->getBase("newthread").'">'.__('New thread').'</a></li>'. 1502 '<li><strong>'.$core->auth->userID().'</strong> {'.$user_displayname.'}</li>'. 1503 '<li><a href="'.$core->blog->url.$core->url->getBase("profile").'/'.$core->auth->userID().'">'.__('My profil').'</a></li>'. 1577 '<li><a href="'.$core->blog->url.$core->url->getBase("profile").'/'.$core->auth->userID().'"><strong>'.$user_displayname.'</strong></a></li>'. 1504 1578 '<li><a href="'.$core->blog->url.$core->url->getBase("logout").'">'.__('Logout').'</a></li>' : 1505 1579 '<li><a href="'.$core->blog->url.$core->url->getBase("login").'">'.__('Login').'</a></li>'. … … 1545 1619 return $res; 1546 1620 } 1621 1622 public static function categoriesWidget($w) 1623 { 1624 global $core; 1625 1626 if ($core->url->type != 'place' && $core->url->type != 'thread' 1627 && $core->url->type != 'agora' && $core->url->type != 'agora-page') { 1628 return; 1629 } 1630 1631 $rs = $core->blog->getCategories(array('post_type'=>'thread')); 1632 if ($rs->isEmpty()) { 1633 return; 1634 } 1635 1636 $res = 1637 '<div class="places">'. 1638 ($w->title ? '<h2>'.html::escapeHTML($w->title).'</h2>' : ''); 1639 1640 $ref_level = $level = $rs->level-1; 1641 while ($rs->fetch()) 1642 { 1643 $class = ''; 1644 if (($core->url->type == 'place' && $_ctx->categories instanceof record && $_ctx->categories->cat_id == $rs->cat_id) 1645 || ($core->url->type == 'thread' && $_ctx->posts instanceof record && $_ctx->posts->cat_id == $rs->cat_id)) { 1646 $class = ' class="place-current"'; 1647 } 1648 1649 if ($rs->level > $level) { 1650 $res .= str_repeat('<ul><li'.$class.'>',$rs->level - $level); 1651 } elseif ($rs->level < $level) { 1652 $res .= str_repeat('</li></ul>',-($rs->level - $level)); 1653 } 1654 1655 if ($rs->level <= $level) { 1656 $res .= '</li><li'.$class.'>'; 1657 } 1658 1659 $res .= 1660 '<a href="'.$core->blog->url.$core->url->getBase('place').'/'. 1661 $rs->cat_url.'">'. 1662 html::escapeHTML($rs->cat_title).'</a>'. 1663 ($w->postcount ? ' ('.$rs->nb_post.')' : ''); 1664 1665 1666 $level = $rs->level; 1667 } 1668 1669 if ($ref_level - $level < 0) { 1670 $res .= str_repeat('</li></ul>',-($ref_level - $level)); 1671 } 1672 $res .= '</div>'; 1673 1674 return $res; 1675 } 1676 1677 public static function bestofWidget($w) 1678 { 1679 global $core; 1680 1681 if ($w->homeonly && $core->url->type != 'agora') { 1682 return; 1683 } 1684 1685 $params = array( 1686 'post_type' => 'thread', 1687 'post_selected'=>true, 1688 'no_content'=>true, 1689 'order'=>'post_dt desc'); 1690 1691 $rs = $core->blog->getPosts($params); 1692 1693 if ($rs->isEmpty()) { 1694 return; 1695 } 1696 1697 $res = 1698 '<div class="selected">'. 1699 ($w->title ? '<h2>'.html::escapeHTML($w->title).'</h2>' : ''). 1700 '<ul>'; 1701 1702 while ($rs->fetch()) { 1703 $res .= ' <li><a href="'.$rs->getURL().'">'.html::escapeHTML($rs->post_title).'</a></li> '; 1704 } 1705 1706 $res .= '</ul></div>'; 1707 1708 return $res; 1709 } 1710 1711 public static function lastthreadsWidget($w) 1712 { 1713 global $core; 1714 1715 if ($w->homeonly && $core->url->type != 'agora') { 1716 return; 1717 } 1718 1719 $params['post_type'] = 'thread'; 1720 $params['limit'] = abs((integer) $w->limit); 1721 $params['order'] = 'post_dt desc'; 1722 $params['no_content'] = true; 1723 1724 if ($w->category) 1725 { 1726 if ($w->category == 'null') { 1727 $params['sql'] = ' AND p.cat_id IS NULL '; 1728 } elseif (is_numeric($w->category)) { 1729 $params['cat_id'] = (integer) $w->category; 1730 } else { 1731 $params['cat_url'] = $w->category; 1732 } 1733 } 1734 1735 $rs = $core->blog->getPosts($params); 1736 1737 if ($rs->isEmpty()) { 1738 return; 1739 } 1740 1741 $res = 1742 '<div class="lastthreads">'. 1743 ($w->title ? '<h2>'.html::escapeHTML($w->title).'</h2>' : ''). 1744 '<ul>'; 1745 1746 while ($rs->fetch()) { 1747 $res .= '<li><a href="'.$rs->getURL().'">'. 1748 html::escapeHTML($rs->post_title).'</a></li>'; 1749 } 1750 1751 $res .= '</ul></div>'; 1752 1753 return $res; 1754 } 1755 1756 public static function lastmessagesWidget($w) 1757 { 1758 global $core, $_ctx; 1759 1760 if ($w->homeonly && $core->url->type != 'agora') { 1761 return; 1762 } 1763 1764 $params['limit'] = abs((integer) $w->limit); 1765 //$params['order'] = 'message_dt desc'; 1766 if ($w->category) 1767 { 1768 if ($w->category == 'null') { 1769 $params['sql'] = ' AND p.cat_id IS NULL '; 1770 } elseif (is_numeric($w->category)) { 1771 $params['cat_id'] = (integer) $w->category; 1772 } else { 1773 $params['cat_url'] = $w->category; 1774 } 1775 } 1776 $agora = new agora($core); 1777 $rs = $agora->getMessages($params); 1778 1779 if ($rs->isEmpty()) { 1780 return; 1781 } 1782 1783 $res = '<div class="lastmessages">'. 1784 ($w->title ? '<h2>'.html::escapeHTML($w->title).'</h2>' : ''). 1785 '<ul>'; 1786 1787 while ($rs->fetch()) 1788 { 1789 $res .= '<li><a href="'.$rs->getThreadURL().'#m'.$rs->message_id.'">'. 1790 html::escapeHTML($rs->post_title).' - '. 1791 html::escapeHTML($rs->getAuthorCN()). 1792 '</a></li>'; 1793 } 1794 1795 $res .= '</ul></div>'; 1796 1797 return $res; 1798 } 1799 1800 public static function subscribeWidget($w) 1801 { 1802 global $core, $_ctx; 1803 1804 if ($w->homeonly && $core->url->type != 'agora') { 1805 return; 1806 } 1807 1808 $type = ($w->type == 'atom' || $w->type == 'rss2') ? $w->type : 'rss2'; 1809 $mime = $type == 'rss2' ? 'application/rss+xml' : 'application/atom+xml'; 1810 1811 $p_title = __('This agora\'s threads %s feed'); 1812 $c_title = __('This agora\'s messages %s feed'); 1813 1814 $res = 1815 '<div class="syndicate">'. 1816 ($w->title ? '<h2>'.html::escapeHTML($w->title).'</h2>' : ''). 1817 '<ul>'; 1818 1819 $res .= 1820 '<li><a type="'.$mime.'" '. 1821 'href="'.$core->blog->url.$core->url->getBase('agora_feed').'/'.$type.'" '. 1822 'title="'.sprintf($p_title,($type == 'atom' ? 'Atom' : 'RSS')).'" class="feed">'. 1823 __('Threads feed').'</a></li>'. 1824 '<li><a type="'.$mime.'" '. 1825 'href="'.$core->blog->url.$core->url->getBase('agora_feed').'/'.$type.'/messages" '. 1826 'title="'.sprintf($c_title,($type == 'atom' ? 'Atom' : 'RSS')).'" class="feed">'. 1827 __('Messages feed').'</a></li>'; 1828 1829 $res .= '</ul></div>'; 1830 1831 return $res; 1832 } 1547 1833 } 1548 1834 ?> -
plugins/agora/_widgets.php
r1844 r2141 4 4 # This file is part of agora, a plugin for Dotclear 2. 5 5 # 6 # Copyright (c) 2009 Osku , Tomtom and contributors 7 ## Licensed under the GPL version 2.0 license. 6 # Copyright (c) 2009-2010 Osku ,Tomtom and contributors 7 # 8 # Licensed under the GPL version 2.0 license. 8 9 # A copy of this license is available in LICENSE file or at 9 10 # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html … … 11 12 # -- END LICENSE BLOCK ------------------------------------ 12 13 13 14 14 if (!defined('DC_RC_PATH')) { return; } 15 15 16 16 $core->addBehavior('initWidgets',array('agoraWidgets','initWidgetsAgoraMember')); 17 17 $core->addBehavior('initWidgets',array('agoraWidgets','initWidgetsAgoraModerate')); 18 $core->addBehavior('initWidgets',array('agoraWidgets','initWidgetsAgoraCategories')); 19 $core->addBehavior('initWidgets',array('agoraWidgets','initWidgetsAgoraBestof')); 20 $core->addBehavior('initWidgets',array('agoraWidgets','initWidgetsAgoraLastThreads')); 21 $core->addBehavior('initWidgets',array('agoraWidgets','initWidgetsAgoraLastMessages')); 22 $core->addBehavior('initWidgets',array('agoraWidgets','initWidgetsAgoraSubscribe')); 18 23 19 24 class agoraWidgets … … 21 26 public static function initWidgetsAgoraMember($w) 22 27 { 23 $w->create('memberAgoraWidget',__('Agora member connection'),array('tplAgora','memberWidget'));24 $w->memberAgoraWidget->setting('title',__('Title:'),__('Agora connection'));28 $w->create('memberAgoraWidget',__('Agora: navigation'),array('widgetsAgora','memberWidget')); 29 $w->memberAgoraWidget->setting('title',__('Title:'),__('Agora navigation')); 25 30 #$widgets->privateblog->setting('text',__('Text:'),'','textarea'); 26 31 #$widgets->privateblog->setting('label',__('Button:'),__('Disconnect')); … … 30 35 public static function initWidgetsAgoraModerate($w) 31 36 { 32 $w->create('moderateAgoraWidget',__('Agora moderation'),array('tplAgora','moderateWidget'));37 $w->create('moderateAgoraWidget',__('Agora: moderation'),array('widgetsAgora','moderateWidget')); 33 38 $w->moderateAgoraWidget->setting('title',__('Title:'),__('Agora moderation')); 34 39 #$widgets->privateblog->setting('text',__('Text:'),'','textarea'); … … 36 41 #$widgets->privateblog->setting('homeonly',__('Home page only'),0,'check'); 37 42 } 43 public static function initWidgetsAgoraCategories($w) 44 { 45 $w->create('categoriesAgoraWidget',__('Agora: categories list'),array('widgetsAgora','categoriesWidget')); 46 $w->categoriesAgoraWidget->setting('title',__('Title:'),__('Agora\'s sections')); 47 $w->categoriesAgoraWidget->setting('postcount',__('With entries counts'),0,'check'); 48 #$widgets->privateblog->setting('text',__('Text:'),'','textarea'); 49 #$widgets->privateblog->setting('label',__('Button:'),__('Disconnect')); 50 #$widgets->privateblog->setting('homeonly',__('Home page only'),0,'check'); 51 } 52 public static function initWidgetsAgoraBestof($w) 53 { 54 $w->create('bestofAgoraWidget',__('Agora: selected threads'),array('widgetsAgora','bestofWidget')); 55 $w->bestofAgoraWidget->setting('title',__('Title:'),__('Selected threads')); 56 $w->bestofAgoraWidget->setting('homeonly',__('Home page only'),1,'check'); 57 } 58 public static function initWidgetsAgoraLastThreads($w) 59 { 60 global $core; 61 $w->create('lastthreadsAgoraWidget',__('Agora: last threads'),array('widgetsAgora','lastthreadsWidget'));; 62 $w->lastthreadsAgoraWidget->setting('title',__('Title:'),__('Last threads')); 63 $rs = $core->blog->getCategories(array('post_type'=>'thread')); 64 $categories = array('' => '', __('Uncategorized') => 'null'); 65 while ($rs->fetch()) { 66 $categories[str_repeat(' ',$rs->level-1).'• '.html::escapeHTML($rs->cat_title)] = $rs->cat_id; 67 } 68 $w->lastthreadsAgoraWidget->setting('category',__('Category:'),'','combo',$categories); 69 unset($rs,$categories); 70 $w->lastthreadsAgoraWidget->setting('limit',__('Entries limit:'),10); 71 $w->lastthreadsAgoraWidget->setting('homeonly',__('Home page only'),1,'check'); 72 } 73 public static function initWidgetsAgoraLastMessages($w) 74 { 75 global $core; 76 $w->create('lastmessagesAgoraWidget',__('Agora: last messages'),array('widgetsAgora','lastmessagesWidget')); 77 $w->lastmessagesAgoraWidget->setting('title',__('Title:'),__('Last messages')); 78 $rs = $core->blog->getCategories(array('post_type'=>'thread')); 79 $categories = array('' => '', __('Uncategorized') => 'null'); 80 while ($rs->fetch()) { 81 $categories[str_repeat(' ',$rs->level-1).'• '.html::escapeHTML($rs->cat_title)] = $rs->cat_id; 82 } 83 $w->lastmessagesAgoraWidget->setting('category',__('Category:'),'','combo',$categories); 84 unset($rs,$categories); 85 $w->lastmessagesAgoraWidget->setting('limit',__('Messages limit:'),10); 86 $w->lastmessagesAgoraWidget->setting('homeonly',__('Home page only'),1,'check'); 87 } 88 89 public static function initWidgetsAgoraSubscribe($w) 90 { 91 global $core; 92 $w->create('subscribeAgoraWidget',__('Agora: subscribe links'),array('widgetsAgora','subscribeWidget')); 93 $w->subscribeAgoraWidget->setting('title',__('Title:'),__('Subscribe')); 94 $w->subscribeAgoraWidget->setting('type',__('Feeds type:'),'atom','combo',array('Atom' => 'atom', 'RSS' => 'rss2')); 95 $w->subscribeAgoraWidget->setting('homeonly',__('Home page only'),0,'check'); 96 } 38 97 } 39 98 ?> -
plugins/agora/default-templates/agora-atom.xml
r1844 r2141 18 18 <generator uri="http://dotclear.org/">Dotclear</generator> 19 19 20 <tpl:Entries type="thread post">20 <tpl:Entries type="thread"> 21 21 22 22 <entry> 23 23 <title>{{tpl:EntryTitle encode_xml="1"}}</title> 24 <link href="{{tpl: ThreadURL}}" rel="alternate" type="text/html"24 <link href="{{tpl:EntryURL}}" rel="alternate" type="text/html" 25 25 title="{{tpl:EntryTitle encode_xml="1"}}" /> 26 26 <id>{{tpl:EntryFeedID}}</id> -
plugins/agora/default-templates/agora-rss2.xml
r1844 r2141 17 17 <generator>Dotclear</generator> 18 18 19 <tpl:Entries type="thread post">19 <tpl:Entries type="thread"> 20 20 21 21 <item> 22 22 <title>{{tpl:EntryTitle encode_xml="1"}}</title> 23 <link>{{tpl: ThreadURL}}</link>23 <link>{{tpl:EntryURL}}</link> 24 24 <guid isPermaLink="false">{{tpl:EntryFeedID}}</guid> 25 25 <pubDate>{{tpl:EntryDate rfc822="1"}}</pubDate> -
plugins/agora/default-templates/editmessage.html
r1872 r2141 9 9 <title>{{tpl:lang Edit message}} - {{tpl:lang Agora}} - {{tpl:BlogName encode_html="1"}}</title> 10 10 11 <meta name="description" lang="{{tpl:BlogLanguage}}" content="{{tpl:lang Forum}}" />11 <meta name="description" lang="{{tpl:BlogLanguage}}" content="{{tpl:lang Agora}}" /> 12 12 <meta name="copyright" content="{{tpl:BlogCopyrightNotice encode_html="1"}}" /> 13 13 <meta name="author" content="{{tpl:BlogEditor encode_html="1"}}" /> … … 26 26 <link rel="top" href="{{tpl:BlogURL}}" title="{{tpl:lang Home}}" /> 27 27 <link rel="contents" href="{{tpl:BlogArchiveURL}}" title="{{tpl:lang Archives}}" /> 28 <tpl: Subforums>29 <link rel="section" href="{{tpl: SubforumURL}}" title="{{tpl:CategoryTitle encode_html="1"}}" />30 </tpl: Subforums>28 <tpl:Categories post_type="thread"> 29 <link rel="section" href="{{tpl:placeURL}}" title="{{tpl:CategoryTitle encode_html="1"}}" /> 30 </tpl:Categories> 31 31 32 32 <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="{{tpl:BlogFeedURL type="rss2"}}" /> -
plugins/agora/default-templates/editpost.html
r1882 r2141 9 9 <title>{{tpl:lang Edit thread}} - {{tpl:lang Agora}} - {{tpl:BlogName encode_html="1"}}</title> 10 10 11 <meta name="description" lang="{{tpl:BlogLanguage}}" content="{{tpl:lang Forum}}" />11 <meta name="description" lang="{{tpl:BlogLanguage}}" content="{{tpl:lang Agora}}" /> 12 12 <meta name="copyright" content="{{tpl:BlogCopyrightNotice encode_html="1"}}" /> 13 13 <meta name="author" content="{{tpl:BlogEditor encode_html="1"}}" /> … … 26 26 <link rel="top" href="{{tpl:BlogURL}}" title="{{tpl:lang Home}}" /> 27 27 <link rel="contents" href="{{tpl:BlogArchiveURL}}" title="{{tpl:lang Archives}}" /> 28 <tpl: Subforums>29 <link rel="section" href="{{tpl:Sub forumURL}}" title="{{tpl:CategoryTitle encode_html="1"}}" />30 </tpl: Subforums>28 <tpl:Categories> 29 <link rel="section" href="{{tpl:SubAgoraURL}}" title="{{tpl:CategoryTitle encode_html="1"}}" /> 30 </tpl:Categories> 31 31 32 32 <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="{{tpl:BlogFeedURL type="rss2"}}" /> 33 33 <link rel="alternate" type="application/atom+xml" title="Atom 1.0" href="{{tpl:BlogFeedURL type="atom"}}" /> 34 34 <link rel="EditURI" type="application/rsd+xml" title="RSD" href="{{tpl:BlogRSDURL}}" /> 35 <link rel="meta" type="application/xbel+xml" title="Blogroll" href="{{tpl:BlogrollXbelLink}}" />36 35 37 36 {{tpl:include src="_head.html"}} … … 50 49 <div id="content-info"> 51 50 52 <h2><a href="{{tpl: forumURL}}">{{tpl:lang Agora}}</a> › <tpl:Subforums><tpl:ThreadComboSelected> {{tpl:CategoryTitle encode_html="1"}} </tpl:ThreadComboSelected></tpl:Subforums>51 <h2><a href="{{tpl:AgoraURL}}">{{tpl:lang Agora}}</a> › <tpl:Categories><tpl:ThreadComboSelected> {{tpl:CategoryTitle encode_html="1"}} </tpl:ThreadComboSelected></tpl:Categories> 53 52 › <a href="{{tpl:ThreadURL}}">{{tpl:EntryTitle}}</a> 54 53 </h2> … … 82 81 </p> 83 82 84 <tpl: Subforums>83 <tpl:Categories> 85 84 <tpl:CategoriesHeader> 86 85 <p class="field"> 87 86 <label for="ed_cat">{{tpl:lang Category}} :</label> 88 87 <select name="ed_cat" id="ed_cat"> 88 <option value=""> 89 90 </option> 89 91 </tpl:CategoriesHeader> 90 <option value="{{tpl: SubforumID}}" <tpl:ThreadComboSelected> selected=selected </tpl:ThreadComboSelected>>91 {{tpl: SubforumSpacer}}92 <option value="{{tpl:placeID}}" <tpl:placeComboSelected> selected=selected </tpl:placeComboSelected>> 93 {{tpl:placeSpacer}} 92 94 • {{tpl:CategoryTitle encode_html="1"}} 93 95 </option> … … 96 98 </p> 97 99 </tpl:CategoriesFooter> 98 </tpl: Subforums>100 </tpl:Categories> 99 101 100 102 -
plugins/agora/default-templates/login.html
r1844 r2141 26 26 <link rel="top" href="{{tpl:BlogURL}}" title="{{tpl:lang Home}}" /> 27 27 <link rel="contents" href="{{tpl:BlogArchiveURL}}" title="{{tpl:lang Archives}}" /> 28 <tpl:Subforums>29 <link rel="section" href="{{tpl:SubforumURL}}" title="{{tpl:CategoryTitle encode_html="1"}}" />30 </tpl:Subforums>31 28 32 29 {{tpl:include src="_head.html"}} … … 45 42 <div id="content-info"> 46 43 47 <h2><a href="{{tpl: forumURL}}">{{tpl:lang Agora}}</a> › {{tpl:lang Login}}</h2>44 <h2><a href="{{tpl:agoraURL}}">{{tpl:lang Agora}}</a> › {{tpl:lang Login}}</h2> 48 45 49 46 </div> … … 62 59 {{tpl:SysBehavior behavior="publicLoginFormBefore"}} 63 60 64 <p class="field"><label for="li_login">{{tpl:lang login}} :</label>61 <p class="field"><label for="li_login">{{tpl:lang Username}} :</label> 65 62 <input name="li_login" id="li_login" type="text" size="30" maxlength="255" 66 63 value="" /> -
plugins/agora/default-templates/newthread.html
r1885 r2141 9 9 <title>{{tpl:lang New thread}} - {{tpl:lang Agora}} - {{tpl:BlogName encode_html="1"}}<tpl:PaginationIf start="0"> - {{tpl:lang page}} {{tpl:PaginationCurrent}}</tpl:PaginationIf></title> 10 10 11 <meta name="description" lang="{{tpl:BlogLanguage}}" content="{{tpl:lang Forum}}" />11 <meta name="description" lang="{{tpl:BlogLanguage}}" content="{{tpl:lang Agora}}" /> 12 12 <meta name="copyright" content="{{tpl:BlogCopyrightNotice encode_html="1"}}" /> 13 13 <meta name="author" content="{{tpl:BlogEditor encode_html="1"}}" /> … … 15 15 16 16 <link rel="schema.dc" href="http://purl.org/dc/elements/1.1/" /> 17 <meta name="dc.title" lang="{{tpl:BlogLanguage}}" content="{{tpl:lang Forum}} - {{tpl:BlogName encode_html="1"}}<tpl:PaginationIf start="0"> - {{tpl:lang page}} {{tpl:PaginationCurrent}}</tpl:PaginationIf>" />17 <meta name="dc.title" lang="{{tpl:BlogLanguage}}" content="{{tpl:lang Agora}} - {{tpl:BlogName encode_html="1"}}<tpl:PaginationIf start="0"> - {{tpl:lang page}} {{tpl:PaginationCurrent}}</tpl:PaginationIf>" /> 18 18 <meta name="dc.description" lang="{{tpl:BlogLanguage}}" content="{{tpl:BlogDescription remove_html="1"}}" /> 19 19 <meta name="dc.language" content="{{tpl:BlogLanguage}}" /> … … 26 26 <link rel="top" href="{{tpl:BlogURL}}" title="{{tpl:lang Home}}" /> 27 27 <link rel="contents" href="{{tpl:BlogArchiveURL}}" title="{{tpl:lang Archives}}" /> 28 <tpl:Categories post_type="threadpost">29 <link rel="section" href="{{tpl: SubforumURL}}" title="{{tpl:CategoryTitle encode_html="1"}}" />28 <tpl:Categories post_type="thread"> 29 <link rel="section" href="{{tpl:placeURL}}" title="{{tpl:CategoryTitle encode_html="1"}}" /> 30 30 </tpl:Categories> 31 31 … … 33 33 <link rel="alternate" type="application/atom+xml" title="Atom 1.0" href="{{tpl:BlogFeedURL type="atom"}}" /> 34 34 <link rel="EditURI" type="application/rsd+xml" title="RSD" href="{{tpl:BlogRSDURL}}" /> 35 <link rel="meta" type="application/xbel+xml" title="Blogroll" href="{{tpl:BlogrollXbelLink}}" />36 35 37 36 {{tpl:include src="_head.html"}} … … 50 49 <div id="content-info"> 51 50 52 <h2><a href="{{tpl: forumURL}}">{{tpl:lang Agora}}</a> ›<tpl:IfThreadPreview><tpl:Subforums><tpl:SubforumComboSelected> {{tpl:CategoryTitle encode_html="1"}} </tpl:SubforumComboSelected></tpl:Subforums></tpl:IfThreadPreview></h2>51 <h2><a href="{{tpl:agoraURL}}">{{tpl:lang Agora}}</a> ›<tpl:IfThreadPreview><tpl:Categories><tpl:placeComboSelected> {{tpl:CategoryTitle encode_html="1"}} </tpl:placeComboSelected></tpl:Categories></tpl:IfThreadPreview></h2> 53 52 54 53 </div> … … 62 61 <tpl:IfThreadPreview> 63 62 <div id="pr"> 64 <h3>{{tpl:lang New thread}}</h3>65 <h2 class=" thread-preview">{{tpl:ThreadPreviewTitle}}</h2>63 <h3>{{tpl:lang Your new thread}}</h3> 64 <h2 class="post-title">{{tpl:ThreadPreviewTitle}}</h2> 66 65 <div class="thread-preview">{{tpl:ThreadPreviewContent}}</div> 67 66 <p class="buttons"><input type="submit" class="submit" value="{{tpl:lang send}}" /></p> … … 74 73 {{tpl:SysBehavior behavior="publicThreadFormBeforeContent"}} 75 74 76 <p class="field"><label for="t_title">{{tpl:lang Subject}} :</label>75 <p class="field"><label class="required" for="t_title">{{tpl:lang Subject}} :</label> 77 76 <input name="t_title" id="t_title" type="text" size="30" maxlength="255" 78 77 value="{{tpl:ThreadPreviewTitle encode_html="1"}}" /> 79 78 </p> 80 79 81 <tpl:Categories> 82 <tpl:CategoriesHeader> 83 <p class="field"> 84 <label for="t_cat">{{tpl:lang Category}} :</label> 85 <select name="t_cat" id="t_cat"> 86 </tpl:CategoriesHeader> 87 <option value="{{tpl:SubforumID}}" <tpl:SubforumComboSelected> selected=selected </tpl:SubforumComboSelected>> 88 {{tpl:SubforumSpacer}} 89 • {{tpl:CategoryTitle encode_html="1"}} 90 </option> 91 <tpl:CategoriesFooter> 92 </select> 93 </p> 94 </tpl:CategoriesFooter> 95 </tpl:Categories> 80 <tpl:Categories> 81 <tpl:CategoriesHeader> 82 <p class="field"> 83 <label for="t_cat">{{tpl:lang Category}} :</label> 84 <select name="t_cat" id="t_cat"> 85 <option value=""> 86 87 </option> 88 </tpl:CategoriesHeader> 89 <option value="{{tpl:placeID}}" <tpl:placeComboSelected> selected=selected </tpl:placeComboSelected>> 90 {{tpl:placeSpacer}} 91 • {{tpl:CategoryTitle encode_html="1"}} 92 </option> 93 <tpl:CategoriesFooter> 94 </select> 95 </p> 96 </tpl:CategoriesFooter> 97 </tpl:Categories> 96 98 97 <p class="field"><label for="t_content">{{tpl:lang Message}} :</label>99 <p class="field"><label class="required" for="t_content">{{tpl:lang Message}} :</label> 98 100 <textarea name="t_content" id="t_content" cols="35" 99 101 rows="7">{{tpl:ThreadPreviewContent raw="1" encode_html="1"}}</textarea> -
plugins/agora/default-templates/profile.html
r1844 r2141 24 24 <meta name="dc.format" content="text/html" /> 25 25 26 <link rel="top" href="{{tpl:BlogURL}}" title="{{tpl:lang Home}}" /> 27 <link rel="contents" href="{{tpl:BlogArchiveURL}}" title="{{tpl:lang Archives}}" /> 28 <tpl:Subforums> 29 <link rel="section" href="{{tpl:SubforumURL}}" title="{{tpl:CategoryTitle encode_html="1"}}" /> 30 </tpl:Subforums> 31 26 <link rel="top" href="{{tpl:agoraURL}}" title="{{tpl:lang Home}}" /> 27 32 28 {{tpl:include src="_head.html"}} 33 29 … … 45 41 <div id="content-info"> 46 42 47 <h2><a href="{{tpl: forumURL}}">{{tpl:lang Agora}}</a> › {{tpl:lang profile}} › {{tpl:ProfileUserID}}</h2>43 <h2><a href="{{tpl:agoraURL}}">{{tpl:lang Agora}}</a> › {{tpl:lang profile}} › {{tpl:ProfileUserID}}</h2> 48 44 49 45 </div> … … 65 61 66 62 </dl> 63 64 <tpl:Entries type="thread" no_content="1" lastn="10"> 65 <tpl:EntriesHeader> 66 <h2>{{tpl:lang Last threads}}</h2> 67 <ul> 68 </tpl:EntriesHeader> 69 70 <li id="p{{tpl:EntryID}}" class="thread {{tpl:EntryIfSelected}} {{tpl:EntryIfClosed}}"> 71 <a href="{{tpl:EntryURL}}">{{tpl:EntryTitle encode_html="1"}}</a> 72 <em>{{tpl:lang on}} {{tpl:EntryCreaDate}} 73 <tpl:EntryIf has_category="1">(<a href="{{tpl:ThreadCategoryURL}}">{{tpl:EntryCategory}}</a>)</tpl:EntryIf> 74 </em></li> 75 76 <tpl:EntriesFooter> 77 </ul> 78 </tpl:EntriesFooter> 79 </tpl:Entries> 80 81 <tpl:Messages no_content="1" lastn="10" order="desc" sortby="post_id"> 82 <tpl:MessagesHeader> 83 <h2>{{tpl:lang Last messages}}</h2> 84 <ul> 85 </tpl:MessagesHeader> 86 87 <li id="p{{tpl:MessageID}}" class="message"> 88 <a href="{{tpl:MessageThreadURL}}#m{{tpl:MessageID}}">{{tpl:MessageEntryTitle}}</a> 89 <em>{{tpl:lang on}} {{tpl:MessageDate}}, {{tpl:MessageTime}} 90 </em></li> 91 92 <tpl:MessagesFooter> 93 </ul> 94 </tpl:MessagesFooter> 95 </tpl:Messages> 67 96 68 97 </div> -
plugins/agora/default-templates/profile_me.html
r1844 r2141 24 24 <meta name="dc.format" content="text/html" /> 25 25 26 <link rel="top" href="{{tpl:BlogURL}}" title="{{tpl:lang Home}}" /> 27 <link rel="contents" href="{{tpl:BlogArchiveURL}}" title="{{tpl:lang Archives}}" /> 28 <tpl:Subforums> 29 <link rel="section" href="{{tpl:SubforumURL}}" title="{{tpl:CategoryTitle encode_html="1"}}" /> 30 </tpl:Subforums> 26 <link rel="top" href="{{tpl:agoraURL}}" title="{{tpl:lang Home}}" /> 31 27 32 28 {{tpl:include src="_head.html"}} … … 45 41 <div id="content-info"> 46 42 47 <h2><a href="{{tpl: forumURL}}">{{tpl:lang Agora}}</a> › {{tpl:lang Profile}} › {{tpl:ProfileUserID}}</h2>43 <h2><a href="{{tpl:agoraURL}}">{{tpl:lang Agora}}</a> › {{tpl:lang Profile}} › {{tpl:ProfileUserID}}</h2> 48 44 49 45 </div> … … 106 102 </form> 107 103 108 </div> 104 <tpl:Entries type="thread" no_content="1" lastn="10"> 105 <tpl:EntriesHeader> 106 <h2>{{tpl:lang Last threads}}</h2> 107 <ul> 108 </tpl:EntriesHeader> 109 110 <li id="p{{tpl:EntryID}}" class="thread {{tpl:EntryIfSelected}} {{tpl:EntryIfClosed}}"> 111 <a href="{{tpl:EntryURL}}">{{tpl:EntryTitle encode_html="1"}}</a> 112 <em>{{tpl:lang on}} {{tpl:EntryCreaDate}} 113 <tpl:EntryIf has_category="1">(<a href="{{tpl:ThreadCategoryURL}}">{{tpl:EntryCategory}}</a>)</tpl:EntryIf> 114 </em></li> 115 116 <tpl:EntriesFooter> 117 </ul> 118 </tpl:EntriesFooter> 119 </tpl:Entries> 120 121 <tpl:Messages no_content="1" lastn="10" order="desc" sortby="post_id"> 122 <tpl:MessagesHeader> 123 <h2>{{tpl:lang Last messages}}</h2> 124 <ul> 125 </tpl:MessagesHeader> 126 127 <li id="p{{tpl:MessageID}}" class="message"> 128 <a href="{{tpl:MessageThreadURL}}#m{{tpl:MessageID}}">{{tpl:MessageEntryTitle}}</a> 129 <em>{{tpl:lang on}} {{tpl:MessageDate}}, {{tpl:MessageTime}} 130 </em></li> 131 132 <tpl:MessagesFooter> 133 </ul> 134 </tpl:MessagesFooter> 135 </tpl:Messages> 136 137 </div> 109 138 110 139 </div> <!-- End #main --> -
plugins/agora/default-templates/register.html
r1844 r2141 15 15 16 16 <link rel="schema.dc" href="http://purl.org/dc/elements/1.1/" /> 17 <meta name="dc.title" lang="{{tpl:BlogLanguage}}" content="{{tpl:lang Agora}} - {{tpl:BlogName encode_html="1"}} 17 <meta name="dc.title" lang="{{tpl:BlogLanguage}}" content="{{tpl:lang Agora}} - {{tpl:BlogName encode_html="1"}}" /> 18 18 <meta name="dc.description" lang="{{tpl:BlogLanguage}}" content="{{tpl:BlogDescription remove_html="1"}}" /> 19 19 <meta name="dc.language" content="{{tpl:BlogLanguage}}" /> … … 25 25 26 26 <link rel="top" href="{{tpl:BlogURL}}" title="{{tpl:lang Home}}" /> 27 <link rel="contents" href="{{tpl:BlogArchiveURL}}" title="{{tpl:lang Archives}}" /> 28 <tpl:Subforums> 29 <link rel="section" href="{{tpl:SubforumURL}}" title="{{tpl:CategoryTitle encode_html="1"}}" /> 30 </tpl:Subforums> 27 31 28 32 29 {{tpl:include src="_head.html"}} … … 45 42 <div id="content-info"> 46 43 47 <h2><a href="{{tpl: forumURL}}">{{tpl:lang Agora}}</a> › {{tpl:lang Register}}</h2>44 <h2><a href="{{tpl:agoraURL}}">{{tpl:lang Agora}}</a> › {{tpl:lang Register}}</h2> 48 45 49 46 </div> … … 69 66 {{tpl:SysBehavior behavior="publicRegisterFormBefore"}} 70 67 71 <p class="field"><label for="ru_login">{{tpl:lang login}} :</label>68 <p class="field"><label for="ru_login">{{tpl:lang Username}} :</label> 72 69 <input name="ru_login" id="ru_login" type="text" size="30" maxlength="255" 73 70 value="{{tpl:RegisterPreviewLogin encode_html="1"}}" /> … … 81 78 <p style="display:none"><input name="email2" type="text" size="30" 82 79 maxlength="255" value="" /></p> 80 81 <p class="form-help">{{tpl:lang Username must contain at least 2 characters using letters, numbers or symbols.}}</p> 83 82 84 83 <!-- # --BEHAVIOR-- publicRegisterFormAfter --> -
plugins/agora/default-templates/thread.html
r1872 r2141 9 9 <title>{{tpl:EntryTitle encode_html="1"}} - {{tpl:lang Agora}} - {{tpl:BlogName encode_html="1"}}</title> 10 10 11 <meta name="description" lang="{{tpl:BlogLanguage}}" content="{{tpl:lang Forum}}" />11 <meta name="description" lang="{{tpl:BlogLanguage}}" content="{{tpl:lang Agora}}" /> 12 12 <meta name="copyright" content="{{tpl:BlogCopyrightNotice encode_html="1"}}" /> 13 13 <meta name="author" content="{{tpl:BlogEditor encode_html="1"}}" /> … … 15 15 16 16 <link rel="schema.dc" href="http://purl.org/dc/elements/1.1/" /> 17 <meta name="dc.title" lang="{{tpl:BlogLanguage}}" content="{{tpl:lang Forum}} - {{tpl:BlogName encode_html="1"}}" />17 <meta name="dc.title" lang="{{tpl:BlogLanguage}}" content="{{tpl:lang Agora}} - {{tpl:BlogName encode_html="1"}}" /> 18 18 <meta name="dc.description" lang="{{tpl:BlogLanguage}}" content="{{tpl:BlogDescription remove_html="1"}}" /> 19 19 <meta name="dc.language" content="{{tpl:BlogLanguage}}" /> … … 26 26 <link rel="top" href="{{tpl:BlogURL}}" title="{{tpl:lang Home}}" /> 27 27 <link rel="contents" href="{{tpl:BlogArchiveURL}}" title="{{tpl:lang Archives}}" /> 28 <tpl: Subforums>29 <link rel="section" href="{{tpl: SubforumURL}}" title="{{tpl:CategoryTitle encode_html="1"}}" />30 </tpl: Subforums>28 <tpl:Categories post_type="thread"> 29 <link rel="section" href="{{tpl:placeURL}}" title="{{tpl:CategoryTitle encode_html="1"}}" /> 30 </tpl:Categories> 31 31 32 32 33 33 <link rel="alternate" type="application/atom+xml" title="Atom 1.0" href="{{tpl:AgoraFeedURL type="atom"}}" /> 34 34 <link rel="EditURI" type="application/rsd+xml" title="RSD" href="{{tpl:BlogRSDURL}}" /> 35 <link rel="meta" type="application/xbel+xml" title="Blogroll" href="{{tpl:BlogrollXbelLink}}" />36 35 37 36 {{tpl:include src="_head.html"}} … … 50 49 <div id="content-info"> 51 50 52 <h2><a href="{{tpl:forumURL}}">{{tpl:lang Agora}}</a> › <a href="{{tpl:ThreadCategoryURL}}">{{tpl:EntryCategory}}</a> 51 <h2><a href="{{tpl:agoraURL}}">{{tpl:lang Agora}}</a><tpl:EntryIf has_category="1"> › <a href="{{tpl:ThreadCategoryURL}}">{{tpl:EntryCategory}}</a></tpl:EntryIf> 52 53 53 </h2> 54 54 55 55 </div> 56 56 57 <div id="p " class="post {{tpl:EntryIfSelected}} {{tpl:EntryIfClosed}}">57 <div id="p{{tpl:EntryID}}" class="post {{tpl:EntryIfSelected}} {{tpl:EntryIfClosed}}"> 58 58 59 59 <h2 class="post-title">{{tpl:EntryTitle encode_html="1"}}</h2> 60 60 <!--p class="post-info">{{tpl:CategoryDescription}} </p--> 61 62 {{tpl:lang by}} <a href="{{tpl:ThreadProfileUserID}}">{{tpl:EntryAuthor ID}}</a> {{tpl:lang on}} {{tpl:EntryCreaDate}}63 - <a href="{{tpl: ThreadURL}}">{{tpl:lang Permalink}}</a>61 <p class="post-info"> 62 {{tpl:lang by}} <a href="{{tpl:ThreadProfileUserID}}">{{tpl:EntryAuthorCommonName}}</a> {{tpl:lang on}} {{tpl:EntryCreaDate}} 63 - <a href="{{tpl:EntryURL}}">{{tpl:lang Permalink}}</a> 64 64 <tpl:userIsModo> 65 65 - <a href="{{tpl:ModerationEditThread}}">{{tpl:lang edit}}</a> … … 76 76 77 77 </div> 78 79 <!-- # Attachments --> 80 <tpl:Attachments> 81 <tpl:AttachmentsHeader> 82 <div id="attachments"> 83 <h3>{{tpl:lang Attachments}}</h3> 84 <ul> 85 </tpl:AttachmentsHeader> 86 <li class="{{tpl:AttachmentType}}"> 87 <tpl:AttachmentIf is_mp3="1"> 88 {{tpl:include src="_mp3_player.html"/}} - 89 </tpl:AttachmentIf> 90 <tpl:AttachmentIf is_flv="1"> 91 {{tpl:include src="_flv_player.html"/}} 92 </tpl:AttachmentIf> 93 <tpl:AttachmentIf is_flv="0"> 94 <a href="{{tpl:AttachmentURL}}" 95 title="{{tpl:AttachmentFileName}} ({{tpl:AttachmentSize}})">{{tpl:AttachmentTitle}}</a> 96 </tpl:AttachmentIf> 97 </li> 98 <tpl:AttachmentsFooter> 99 </ul> 100 </div> 101 </tpl:AttachmentsFooter> 102 </tpl:Attachments> 103 104 105 <tpl:EntryIf show_comments="1"> 78 106 <div id="comments"> 79 <tpl:EntryTags type="nb_messages"> 80 <h3>{{tpl:TagID}} {{tpl:lang message(s)}}</h3> 81 </tpl:EntryTags> 107 <h3>{{tpl:EntryMessageCount}}</h3> 82 108 83 109 <tpl:Messages> … … 87 113 </tpl:MessagesHeader> 88 114 89 <dt id=" c{{tpl:MessageID}}" class="{{tpl:MessageIfOdd}} {{tpl:MessageIfFirst}}"><a90 href="# c{{tpl:MessageID}}" class="comment-number">{{tpl:MessageOrderNumber}}.</a>115 <dt id="m{{tpl:MessageID}}" class="{{tpl:MessageIfOdd}} {{tpl:MessageIfFirst}}"><a 116 href="#m{{tpl:MessageID}}" class="comment-number">{{tpl:MessageOrderNumber}}.</a> 91 117 {{tpl:lang On}} {{tpl:MessageDate}}, {{tpl:MessageTime}} 92 {{tpl:lang by}} <a href="{{tpl:MessageProfileUserID}}">{{tpl:MessageAuthor }}</a>118 {{tpl:lang by}} <a href="{{tpl:MessageProfileUserID}}">{{tpl:MessageAuthorCommonName}}</a> 93 119 <tpl:userIsModo> 94 120 - <a href="{{tpl:ModerationEditMessage}}"> {{tpl:lang edit}}</a> … … 113 139 <tpl:MessagesFooter> 114 140 </dl> 115 <tpl:agoPagination> 116 <p class="pagination"><tpl:agoPaginationIf start="0"><a href="{{tpl:agoPaginationURL offset="-1"}}" class="prev">« 117 {{tpl:lang previous messages}}</a> - </tpl:agoPaginationIf> 118 {{tpl:lang page}} {{tpl:agoPaginationCurrent}} {{tpl:lang of}} {{tpl:agoPaginationCounter}} 119 <tpl:agoPaginationIf end="0"> - <a href="{{tpl:agoPaginationURL offset="+1"}}" class="next">{{tpl:lang next messages}} 120 »</a></tpl:agoPaginationIf></p> 121 </tpl:agoPagination> 141 122 142 </tpl:MessagesFooter> 123 143 124 144 </tpl:Messages> 125 145 </div> <!--#comments --> 146 147 </tpl:EntryIf> 148 126 149 <tpl:SysIfThreadUpdated> 127 150 <p class="message" id="pr">{{tpl:lang Status of thread has been modified.}}</p> 128 151 </tpl:SysIfThreadUpdated> 129 152 130 <tpl:EntryIf comments_active="0">131 <h3>{{tpl:lang Thread closed}}</h3>132 </tpl:EntryIf>133 </div>134 153 135 154 <tpl:EntryIf comments_active="1"> … … 137 156 <tpl:authForm> 138 157 <!-- # Thread form --> 139 <form action="{{tpl: ThreadURL}}#pr" method="post" id="comment-form">158 <form action="{{tpl:EntryURL}}#pr" method="post" id="comment-form"> 140 159 141 160 <tpl:SysIfFormError> … … 153 172 </tpl:IfMessagePreview> 154 173 155 <h3>{{tpl:lang Add a n answer}}</h3>174 <h3>{{tpl:lang Add a message}}</h3> 156 175 <fieldset> 157 176 <!-- # --BEHAVIOR-- publicAnswerFormBeforeContent --> … … 175 194 </form> 176 195 </tpl:authForm> 177 </tpl:EntryIf> 178 179 <tpl:EntryIf comments_active="1"> 180 <p id="comments-feed"><a class="feed" href="{{tpl:AgoraFeedURL type="atom"}}/answers/{{tpl:EntryID}}" 181 title="{{tpl:lang This thread's answers Atom feed}}">{{tpl:lang This thread's answers feed}}</a></p> 196 197 <p id="comments-feed"><a class="feed" href="{{tpl:AgoraFeedURL type="atom"}}/messages/{{tpl:EntryID}}" 198 title="{{tpl:lang This thread's messages Atom feed}}">{{tpl:lang This thread's messages feed}}</a></p> 199 182 200 </tpl:EntryIf> 183 201 <tpl:EntryIf comments_active="0">{{tpl:lang Thread closed}}</tpl:EntryIf> 184 202 </div> 185 203 … … 194 212 {{tpl:Widgets type="extra"}} 195 213 </div> <!-- End #blogextra --> 196 </div> 214 </div> <!-- End #sidebar --> 197 215 198 216 </div> <!-- End #wrapper --> -
plugins/agora/inc/class.agora.auth.php
r1844 r2141 4 4 # This file is part of agora, a plugin for Dotclear 2. 5 5 # 6 # Copyright (c) 2009 Osku , Tomtom and contributors 7 ## Licensed under the GPL version 2.0 license. 6 # Copyright (c) 2009-2010 Osku ,Tomtom and contributors 7 # 8 # Licensed under the GPL version 2.0 license. 8 9 # A copy of this license is available in LICENSE file or at 9 10 # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 10 11 # 11 12 # -- END LICENSE BLOCK ------------------------------------ 12 13 13 class dcPublicAuth extends dcAuth 14 14 { -
plugins/agora/inc/class.agora.behaviors.php
r1844 r2141 4 4 # This file is part of agora, a plugin for Dotclear 2. 5 5 # 6 # Copyright (c) 2009 Osku , Tomtom and contributors 7 ## Licensed under the GPL version 2.0 license. 6 # Copyright (c) 2009-2010 Osku ,Tomtom and contributors 7 # 8 # Licensed under the GPL version 2.0 license. 8 9 # A copy of this license is available in LICENSE file or at 9 10 # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html -
plugins/agora/inc/class.agora.log.php
r1844 r2141 4 4 # This file is part of agora, a plugin for Dotclear 2. 5 5 # 6 # Copyright (c) 2009 Osku , Tomtom and contributors 7 ## Licensed under the GPL version 2.0 license. 6 # Copyright (c) 2009-2010 Osku ,Tomtom and contributors 7 # 8 # Licensed under the GPL version 2.0 license. 8 9 # A copy of this license is available in LICENSE file or at 9 10 # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html … … 46 47 47 48 if (!$count_only) { 48 $strReq .= 'GROUP BY user_id ';49 //$strReq .= 'GROUP BY user_id '; 49 50 50 51 if (!empty($params['order']) && !$count_only) { -
plugins/agora/inc/class.agora.php
r1885 r2141 4 4 # This file is part of agora, a plugin for Dotclear 2. 5 5 # 6 # Copyright (c) 2009 Osku , Tomtom and contributors 7 ## Licensed under the GPL version 2.0 license. 6 # Copyright (c) 2009-2010 Osku ,Tomtom and contributors 7 # 8 # Licensed under the GPL version 2.0 license. 8 9 # A copy of this license is available in LICENSE file or at 9 10 # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html … … 16 17 private $message_status = array(); 17 18 18 public function __construct($core )19 public function __construct($core,$public=true) 19 20 { 20 21 $this->con =& $core->con; … … 31 32 $this->message_status['1'] = __('published'); 32 33 33 $this->core->auth = new dcPublicAuth($core); 34 if ($public) 35 { 36 $this->core->auth = new dcPublicAuth($core); 37 } 34 38 $this->core->log = new dcLog($core); 35 39 } … … 80 84 $strReq .= 'GROUP BY U.user_id,user_super,user_status,user_pwd,user_name,'. 81 85 'user_firstname,user_displayname,user_email,user_url,'. 82 'user_desc, user_lang,user_tz,user_post_status,user_options '; 86 'user_desc, user_lang,user_tz,user_post_status,user_options,'. 87 'user_creadt, user_upddt '; 83 88 84 89 if (!empty($params['order']) && !$count_only) { … … 197 202 $link = $this->core->blog->url.$this->core->url->getBase('register'); 198 203 $link .= strpos($link,'?') !== false ? '&' : '?'; 199 $url_forum = $this->core-> url->getBase('forum');200 $url_login = $this->core-> url->getBase('login');204 $url_forum = $this->core->blog->url.$this->core->url->getBase('agora'); 205 $url_login = $this->core->blog->url.$this->core->url->getBase('login'); 201 206 $sub = __('Account confirmation request on Agora'); 202 207 $msg = … … 206 211 $link.'key='.$key. 207 212 "\n\n". 208 __('Your indormations:'). 213 __('Your indormations:')."\n". 209 214 sprintf(__('Login: %s'),$user_id)."\n". 210 sprintf(__('Password: %s'),$pwd)."\n". 211 __('Agora connection:'). 212 $url_login. 215 sprintf(__('Password: %s'),$pwd)."\n\n". 216 sprintf(__('Agora connection: %s'),$url_login)."\n". 213 217 "\n\n". 214 218 __('If you have received this mail in error, you do not need to take any action to cancel the account.'). … … 334 338 */ 335 339 //$cur->nb_comment = (integer) $rs->f(0); 336 $cur->post_dt = date('Y-m-d H:i:s'); 337 340 //$cur->post_upddt = date('Y-m-d H:i:s'); 341 /*$cur->post_tz = $this->core->auth->getInfo('user_tz'); 342 $offset = dt::getTimeOffset($cur->post_tz); 343 $now = time() + $offset; 344 $cur->post_dt = date('Y-m-d H:i:00',$now);*/ 345 $offset = dt::getTimeOffset($this->core->blog->settings->system->blog_timezone); 346 $cur->post_dt = date('Y-m-d H:i:s',time() + $offset); 338 347 $cur->update('WHERE post_id = '.(integer) $id); 339 }340 341 public function getThreadURL($rs)342 {343 $thread_id = $rs->thread_id;344 345 $strReq = 'SELECT post_url '.346 'FROM '.$this->prefix.'post '.347 'WHERE post_id = '.(integer) $thread_id.' ';348 349 $rs = $this->con->select($strReq);350 351 if ($rs->isEmpty()) {352 return;353 }354 355 return $rs->post_url;356 }357 358 /**359 Retrieves categories. <var>$params</var> is an associative array which can360 take the following parameters:361 362 - post_type: Get only entries with given type (default "post")363 - cat_url: filter on cat_url field364 - cat_id: filter on cat_id field365 - start: start with a given category366 - level: categories level to retrieve367 - with_empty: filter empty categories368 369 @param params <b>array</b> Parameters370 @return <b>record</b>371 */372 public function getCategoriesPlus($params=array())373 {374 // From /inc/core/class.dc.blog.php getCategories375 //Just authorize Empty Categories376 $c_params = array();377 if (isset($params['post_type'])) {378 $c_params['post_type'] = $params['post_type'];379 unset($params['post_type']);380 }381 $counter = $this->getCategoriesCounter($c_params);382 $counter2 = $this->getCategoriesCounter($c_params,true);383 384 //$without_empty = isset($params['without_empty']) ? (bool) $params['without_empty'] : ($this->core->auth->userID() == false);385 //$with_empty = isset($params['with_empty']) ? (bool) $params['with_empty'] : ($this->core->auth->userID() == false);386 //if (isset($params['with_empty'])) //&& ($params['with_empty'])))387 //{388 // $with_empty = true;389 //} else {390 // $with_empty = $this->core->auth->userID() != false; # For public display $this->core->auth->userID() !=391 //}392 393 $start = isset($params['start']) ? (integer) $params['start'] : 0;394 $l = isset($params['level']) ? (integer) $params['level'] : 0;395 396 $rs = $this->core->blog->categories()->getChildren($start,null,'desc');397 398 # Get each categories total posts count399 $data = array();400 $stack = array();401 $stack2 = array();402 $level = 0;403 $cols = $rs->columns();404 while ($rs->fetch())405 {406 $nb_post = isset($counter[$rs->cat_id]) ? (integer) $counter[$rs->cat_id] : 0;407 $nb_answer = isset($counter2[$rs->cat_id]) ? (integer) $counter2[$rs->cat_id] : 0;408 409 if ($rs->level > $level) {410 $nb_total = $nb_post;411 $stack[$rs->level] = (integer) $nb_post;412 $nb_total2 = $nb_answer;413 $stack2[$rs->level] = (integer) $nb_answer;414 } elseif ($rs->level == $level) {415 $nb_total = $nb_post;416 $stack[$rs->level] += $nb_post;417 $nb_total2 = $nb_answer;418 $stack2[$rs->level] += $nb_answer;419 } else {420 $nb_total = $stack[$rs->level+1] + $nb_post;421 $nb_total2 = $stack2[$rs->level+1] + $nb_answer;422 if (isset($stack[$rs->level])) {423 $stack[$rs->level] += $nb_total;424 $stack2[$rs->level] += $nb_answer;425 } else {426 $stack[$rs->level] = $nb_total;427 $stack2[$rs->level] = $nb_total2;428 }429 unset($stack[$rs->level+1]);430 unset($stack2[$rs->level+1]);431 }432 433 //if (($nb_total == 0) && true) {434 // continue;435 //}436 437 $level = $rs->level;438 439 $t = array();440 foreach ($cols as $c) {441 $t[$c] = $rs->f($c);442 }443 $t['nb_post'] = $nb_post;444 $t['nb_total'] = $nb_total;445 $t['nb_answer'] = $nb_answer;446 $t['nb_total2'] = $nb_total2;447 448 if ($l == 0 || ($l > 0 && $l == $rs->level)) {449 array_unshift($data,$t);450 }451 }452 453 # We need to apply filter after counting454 if (!empty($params['cat_id']))455 {456 $found = false;457 foreach ($data as $v) {458 if ($v['cat_id'] == $params['cat_id']) {459 $found = true;460 $data = array($v);461 break;462 }463 }464 if (!$found) {465 $data = array();466 }467 }468 469 if (!empty($params['cat_url']) && empty($params['cat_id']))470 {471 $found = false;472 foreach ($data as $v) {473 if ($v['cat_url'] == $params['cat_url']) {474 $found = true;475 $data = array($v);476 break;477 }478 }479 if (!$found) {480 $data = array();481 }482 }483 484 return staticRecord::newFromArray($data);485 }486 487 private function getCategoriesCounter($params=array(),$bis=false)488 {489 $strReq =490 'SELECT C.cat_id, COUNT(P.post_id) AS nb_post, SUM(P.nb_comment) AS nb_answer '.491 'FROM '.$this->prefix.'category AS C '.492 'JOIN '.$this->prefix."post P ON (C.cat_id = P.cat_id AND P.blog_id = '".$this->con->escape($this->core->blog->id)."' ) ".493 "WHERE C.blog_id = '".$this->con->escape($this->core->blog->id)."' ";494 495 if (!$this->core->auth->userID()) {496 $strReq .= 'AND P.post_status = 1 ';497 }498 499 if (!empty($params['post_type'])) {500 $strReq .= "AND post_type = '".$this->con->escape($params['post_type'])."' ";501 }502 else {503 $strReq .= "AND post_type = 'threadpost' ";504 }505 506 //$strReq .= 'AND P.thread_id is NULL ';507 508 $strReq .= 'GROUP BY C.cat_id ';509 510 $rs = $this->con->select($strReq);511 $counters = array();512 $counters2 = array();513 while ($rs->fetch()) {514 $counters[$rs->cat_id] = $rs->nb_post;515 $counters2[$rs->cat_id] = $rs->nb_answer;516 }517 518 if ($bis) {519 return $counters2;520 } else {521 return $counters;522 }523 }524 525 public function getCategoryFirstChildren($id)526 {527 return $this->getCategoriesPlus(array('start' => $id,'level' => $id == 0 ? 1 : 2));528 348 } 529 349 … … 580 400 $blog_id = $this->core->blog->id; 581 401 582 if (!empty($res) )402 if (!empty($res) && is_array($res[$blog_id]['p'])) 583 403 { 584 404 if (array_key_exists($perm,$res[$blog_id]['p'])) { … … 622 442 $rs = $this->con->select($strReq); 623 443 444 $cur = $this->con->openCursor($this->prefix.'post'); 445 624 446 if ($rs->isEmpty()) { 625 447 return; 626 448 } 627 449 else { 628 $nb = $rs->f(0); 629 } 630 631 $meta = new dcMeta($core); 632 $meta->delPostMeta($post_id,'nb_messages'); 633 $meta->setPostMeta($post_id,'nb_messages',$nb); 450 $cur->nb_comment = (integer) $rs->f(0); 451 } 452 453 $cur->update('WHERE post_id = '.(integer) $post_id); 634 454 635 455 } … … 656 476 $strReq = 657 477 'SELECT message_id,M.post_id, M.user_id, message_dt, '. 658 'message_tz, message_ upddt, message_format, '.478 'message_tz, message_creadt, message_upddt, message_format, '. 659 479 $content_req.' message_status, '. 660 480 'P.post_title, P.post_url, P.post_type, P.post_dt, './/P.user_id, '. … … 701 521 } 702 522 } 523 524 if (!empty($params['user_id'])) { 525 $strReq .= "AND M.user_id = '".$this->con->escape($params['user_id'])."' "; 526 } 703 527 704 528 if (!empty($params['post_id'])) { … … 726 550 if (isset($params['q_author'])) { 727 551 $q_author = $this->con->escape(str_replace('*','%',strtolower($params['q_author']))); 728 $strReq .= "AND LOWER( comment_author) LIKE '".$q_author."' ";552 $strReq .= "AND LOWER(M.user_id) LIKE '".$q_author."' "; 729 553 } 730 554 … … 771 595 $rs->extend('rsExtMessage'); 772 596 773 # --BEHAVIOR-- coreBlogGetComments774 $this->core->callBehavior('agora BlogGetMessages',$rs);597 # --BEHAVIOR-- agoraGetMessages 598 $this->core->callBehavior('agoraGetMessages',$rs); 775 599 776 600 return $rs; … … 793 617 794 618 $cur->message_id = (integer) $rs->f(0) + 1; 619 620 $cur->message_creadt = date('Y-m-d H:i:s'); 795 621 $cur->message_upddt = date('Y-m-d H:i:s'); 796 797 $offset = dt::getTimeOffset($this->core->blog->settings->blog_timezone); 798 $cur->message_dt = date('Y-m-d H:i:s',time() + $offset); 799 $cur->message_tz = $this->core->blog->settings->blog_timezone; 622 $cur->message_tz = $this->core->auth->getInfo('user_tz'); 800 623 801 624 # Post excerpt and content … … 876 699 } 877 700 878 $cur = $this->con->openCursor($this->prefix.'message');701 /*$cur = $this->con->openCursor($this->prefix.'message'); 879 702 $cur->message_status = (integer) $status; 880 703 $this->updMessage($id,$cur); 704 705 $id = (integer) $id; 706 $status = (integer) $status;*/ 707 708 #If user can only publish, we need to check the post's owner 709 if (!$this->core->auth->check('contentadmin',$this->core->blog->id)) 710 { 711 $strReq = 'SELECT message_id '. 712 'FROM '.$this->prefix.'message '. 713 'WHERE message_id = '.$id.' '. 714 //"AND blog_id = '".$this->con->escape($this->core->blog->id)."' ". 715 "AND user_id = '".$this->con->escape($this->core->auth->userID())."' "; 716 717 $rs = $this->con->select($strReq); 718 719 if ($rs->isEmpty()) { 720 throw new Exception(__('You are not allowed to change this entry status')); 721 } 722 } 723 724 $cur = $this->con->openCursor($this->prefix.'message'); 725 726 $cur->message_status = $status; 727 $cur->message_upddt = date('Y-m-d H:i:s'); 728 729 $cur->update( 730 'WHERE message_id = '.$id.' ' 731 //"AND blog_id = '".$this->con->escape($this->core->blog->id)."' " 732 ); 733 $this->core->blog->triggerBlog(); 881 734 } 882 735 … … 923 776 throw new Exception(__('No message content')); 924 777 } 778 779 if ($cur->message_dt == '') { 780 $offset = dt::getTimeOffset($this->core->auth->getInfo('user_tz')); 781 $now = time() + $offset; 782 $cur->message_dt = date('Y-m-d H:i:00',$now); 783 } 925 784 926 785 $message_id = is_int($message_id) ? $message_id : $cur->message_id; -
plugins/agora/inc/class.agora.template.php
r1872 r2141 4 4 # This file is part of agora, a plugin for Dotclear 2. 5 5 # 6 # Copyright (c) 2009 Osku , Tomtom and contributors 7 ## Licensed under the GPL version 2.0 license. 6 # Copyright (c) 2009-2010 Osku ,Tomtom and contributors 7 # 8 # Licensed under the GPL version 2.0 license. 8 9 # A copy of this license is available in LICENSE file or at 9 10 # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html … … 18 19 } 19 20 20 public static function forumURL($attr)21 public static function agoraURL($attr) 21 22 { 22 23 global $core, $_ctx; … … 67 68 68 69 $f = $GLOBALS['core']->tpl->getFilters($attr); 69 return '<?php echo '.sprintf($f,'$core->blog->url.$core->url->getBase("ago feed")."/'.$type.'"').'; ?>';70 return '<?php echo '.sprintf($f,'$core->blog->url.$core->url->getBase("agora_feed")."/'.$type.'"').'; ?>'; 70 71 } 71 72 … … 97 98 } 98 99 99 /*dtd 100 <!ELEMENT tpl:Subforums - - -- Subforums loop --> 101 */ 102 public static function Subforums($attr,$content) 103 { 104 global $core, $_ctx; 105 106 $p = "\$params = array();\n"; 107 108 if (isset($attr['url'])) { 109 $p .= "\$params['cat_url'] = '".addslashes($attr['url'])."';\n"; 110 } 111 112 //if (isset($attr['without_empty'])) { 113 // $p .= "\$params['without_empty'] = '".(bool) $attr['without_empty']."';\n"; 114 //} 115 116 if (!empty($attr['post_type'])) { 117 $p .= "\$params['post_type'] = '".addslashes($attr['post_type'])."';\n"; 118 } 119 else { 120 $p .= "\$params['post_type'] = 'threadpost';\n"; 121 } 122 123 if (!empty($attr['level'])) { 124 $p .= "\$params['level'] = ".(integer) $attr['level'].";\n"; 125 } 126 127 //if (isset($_ctx->subforumurl)) { 128 // $p .= "\$params['cat_url'] = '".addslashes($_ctx->subforumurl)."';\n"; 129 //} 130 131 $res = "<?php\n"; 132 $res .= $p; 133 $res .= '$_ctx->categories = $_ctx->agora->getCategoriesPlus($params);'."\n"; 134 $res .= "?>\n"; 135 $res .= '<?php while ($_ctx->categories->fetch()) : ?>'.$content.'<?php endwhile; $_ctx->categories = null; unset($params); ?>'; 136 137 return $res; 138 } 139 140 public static function SubforumFirstChildren($attr,$content) 141 { 142 return 143 "<?php\n". 144 '$_ctx->categories = $_ctx->agora->getCategoryFirstChildren($_ctx->categories->cat_id);'."\n". 145 'while ($_ctx->categories->fetch()) : ?>'.$content.'<?php endwhile; $_ctx->categories = null; ?>'; 146 } 147 148 public static function SubforumURL($attr) 149 { 150 global $core, $_ctx; 151 152 $f = $GLOBALS['core']->tpl->getFilters($attr); 153 return '<?php echo '.sprintf($f,'$core->blog->url.$core->url->getBase("subforum")."/".$_ctx->categories->cat_url').'; ?>'; 154 } 155 156 public static function SubforumFeedURL($attr) 100 public static function placeURL($attr) 101 { 102 global $core, $_ctx; 103 104 $f = $GLOBALS['core']->tpl->getFilters($attr); 105 return '<?php echo '.sprintf($f,'$core->blog->url.$core->url->getBase("place")."/".$_ctx->categories->cat_url').'; ?>'; 106 } 107 108 public static function placeFeedURL($attr) 157 109 { 158 110 $type = !empty($attr['type']) ? $attr['type'] : 'atom'; … … 163 115 164 116 $f = $GLOBALS['core']->tpl->getFilters($attr); 165 return '<?php echo '.sprintf($f,'$core->blog->url.$core->url->getBase("ago feed")."/subforum/".'.117 return '<?php echo '.sprintf($f,'$core->blog->url.$core->url->getBase("agora_feed")."/place/".'. 166 118 '$_ctx->categories->cat_url."/'.$type.'"').'; ?>'; 167 119 } 168 120 169 public static function ThreadAnswersCount($attr) 170 { 171 global $core, $_ctx; 172 173 $none = 'no answer'; 174 $one = 'one answer'; 175 $more = '%d answers'; 121 public static function authForm($attr,$content) 122 { 123 global $core; 124 125 return 126 '<?php if ($core->auth->userID() != false && isset($_SESSION[\'sess_user_id\'])) : ?>'. 127 $content. 128 '<?php endif; ?>'; 129 } 130 131 public static function notauthForm($attr,$content) 132 { 133 global $core; 134 135 return 136 '<?php if ($core->auth->userID() == false) : ?>'. 137 $content. 138 '<?php endif; ?>'; 139 } 140 141 public static function placeNewThreadLink($attr) 142 { 143 global $core, $_ctx; 144 145 $f = $GLOBALS['core']->tpl->getFilters($attr); 146 147 return 148 '<?php if ($_ctx->categories->isEmpty()) {'. 149 ' echo '.sprintf($f,'$core->blog->url.$core->url->getBase("newthread")').';'. 150 '} else {'. 151 ' echo '.sprintf($f,'$core->blog->url.$core->url->getBase("newthread")."/".$_ctx->categories->cat_url').';'. 152 '} ?>'; 153 } 154 155 public static function placeThreadsNumber($attr) 156 { 157 global $core, $_ctx; 158 159 $none = __('no thread'); 160 $one = __('one thread'); 161 $more = __('%d threads'); 176 162 177 163 if (isset($attr['none'])) { … … 184 170 $more = addslashes($attr['more']); 185 171 } 186 $operation = '$_ctx->posts->nb_comment'; 172 if (!empty($attr['full'])) { 173 $operation = '$_ctx->categories->nb_total'; 174 } else { 175 $operation = '$_ctx->categories->nb_post'; 176 } 177 178 return 179 "<?php if (".$operation." == 0) {\n". 180 " printf('".$none."',".$operation.");\n". 181 "} elseif (".$operation." == 1) {\n". 182 " printf('".$one."',".$operation.");\n". 183 "} else {\n". 184 " printf('".$more."',".$operation.");\n". 185 "} ?>"; 186 } 187 188 public static function placeAnswersNumber($attr) 189 { 190 global $core, $_ctx; 191 192 $none = __('no answer'); 193 $one = __('one answer'); 194 $more = __('%d answers'); 195 196 if (isset($attr['none'])) { 197 $none = addslashes($attr['none']); 198 } 199 if (isset($attr['one'])) { 200 $one = addslashes($attr['one']); 201 } 202 if (isset($attr['more'])) { 203 $more = addslashes($attr['more']); 204 } 205 206 if (!empty($attr['full'])) { 207 $operation = '$_ctx->categories->nb_total2'; 208 } else { 209 $operation = '$_ctx->categories->nb_answer'; 210 } 211 212 return 213 "<?php if (".$operation." == 0) {\n". 214 " printf('".$none."',".$operation.");\n". 215 "} elseif (".$operation." == 1) {\n". 216 " printf('".$one."',".$operation.");\n". 217 "} else {\n". 218 " printf('".$more."',".$operation.");\n". 219 "} ?>"; 220 } 221 222 public static function PublicUserID($attr) 223 { 224 global $core, $_ctx; 225 226 $f = $GLOBALS['core']->tpl->getFilters($attr); 227 return '<?php echo '.sprintf($f,'$core->auth->userID()').'; ?>'; 228 } 229 230 public static function PublicUserDisplayName($attr) 231 { 232 global $core, $_ctx; 233 234 $f = $GLOBALS['core']->tpl->getFilters($attr); 235 return '<?php echo '.sprintf($f,'$core->auth->getInfo(\'user_displayname\')').'; ?>'; 236 } 237 238 public static function IfThreadPreview($attr,$content) 239 { 240 global $_ctx; 241 242 return 243 '<?php if ($_ctx->thread_preview !== null && $_ctx->thread_preview["preview"]) : ?>'. 244 $content. 245 '<?php endif; ?>'; 246 } 247 248 public static function ThreadPreviewTitle($attr) 249 { 250 global $_ctx; 251 252 $f = $GLOBALS['core']->tpl->getFilters($attr); 253 return '<?php echo '.sprintf($f,'$_ctx->thread_preview["title"]').'; ?>'; 254 } 255 256 257 public static function ThreadPreviewContent($attr) 258 { 259 global $_ctx; 260 261 $f = $GLOBALS['core']->tpl->getFilters($attr); 262 263 if (!empty($attr['raw'])) { 264 $co = '$_ctx->thread_preview["rawcontent"]'; 265 } else { 266 $co = '$_ctx->thread_preview["content"]'; 267 } 268 269 return '<?php echo '.sprintf($f,$co).'; ?>'; 270 } 271 272 public static function IfAnswerPreview($attr,$content) 273 { 274 global $_ctx; 275 276 return 277 '<?php if ($_ctx->message_preview !== null && $_ctx->message_preview["preview"]) : ?>'. 278 $content. 279 '<?php endif; ?>'; 280 } 281 282 public static function AnswerPreviewContent($attr) 283 { 284 global $_ctx; 285 286 $f = $GLOBALS['core']->tpl->getFilters($attr); 287 288 if (!empty($attr['raw'])) { 289 $co = '$_ctx->message_preview["rawcontent"]'; 290 } else { 291 $co = '$_ctx->message_preview["content"]'; 292 } 293 294 return '<?php echo '.sprintf($f,$co).'; ?>'; 295 } 296 297 public static function ThreadProfileUserID($attr) 298 { 299 global $core, $_ctx; 300 301 $f = $GLOBALS['core']->tpl->getFilters($attr); 302 return '<?php echo '.sprintf($f,'$core->blog->url.$core->url->getBase("profile")."/".$_ctx->posts->user_id').'; ?>'; 303 } 304 305 public static function ThreadURL($attr) 306 { 307 global $core, $_ctx; 308 309 $f = $GLOBALS['core']->tpl->getFilters($attr); 310 return '<?php echo '.sprintf($f,'$core->blog->url.$core->url->getBase("thread")."/".$_ctx->posts->post_url').'; ?>'; 311 } 312 313 public static function ThreadCategoryURL($attr) 314 { 315 global $core, $_ctx; 316 317 $f = $GLOBALS['core']->tpl->getFilters($attr); 318 return '<?php echo '.sprintf($f,'$core->blog->url.$core->url->getBase("place")."/".$_ctx->posts->cat_url').'; ?>'; 319 } 320 321 public static function MessageThreadURL($attr) 322 { 323 global $core, $_ctx; 324 325 $f = $GLOBALS['core']->tpl->getFilters($attr); 326 return '<?php echo '.sprintf($f,'$_ctx->messages->getThreadURL()').'; ?>'; 327 } 328 329 public static function EntryIfClosed($attr) 330 { 331 global $core, $_ctx; 332 333 $ret = isset($attr['return']) ? $attr['return'] : 'closed'; 334 $ret = html::escapeHTML($ret); 335 336 return 337 '<?php if (!$_ctx->posts->post_open_comment) { '. 338 "echo '".addslashes($ret)."'; } ?>"; 339 } 340 341 public static function EntryMessageCount($attr) 342 { 343 global $core, $_ctx; 344 345 $none = 'no message'; 346 $one = 'one message'; 347 $more = '%d messages'; 348 349 if (isset($attr['none'])) { 350 $none = addslashes($attr['none']); 351 } 352 if (isset($attr['one'])) { 353 $one = addslashes($attr['one']); 354 } 355 if (isset($attr['more'])) { 356 $more = addslashes($attr['more']); 357 } 358 359 if (empty($attr['count_all'])) { 360 $operation = '$_ctx->posts->nb_comment'; 361 } else { 362 $operation = '($_ctx->posts->nb_comment + $_ctx->posts->nb_trackback)'; 363 } 187 364 188 365 return … … 196 373 } 197 374 198 public static function authForm($attr,$content)199 {200 global $core;201 202 return203 '<?php if ($core->auth->userID() != false && isset($_SESSION[\'sess_user_id\'])) : ?>'.204 $content.205 '<?php endif; ?>';206 }207 208 public static function notauthForm($attr,$content)209 {210 global $core;211 212 return213 '<?php if ($core->auth->userID() == false) : ?>'.214 $content.215 '<?php endif; ?>';216 }217 218 public static function SubForumNewThreadLink($attr)219 {220 global $core;221 222 $f = $GLOBALS['core']->tpl->getFilters($attr);223 if (isset($_ctx->categories))224 {225 return '<?php echo '.sprintf($f,'$core->blog->url.$core->url->getBase("newthread")."/".$_ctx->categories->cat_url').'; ?>';226 }227 else228 {229 return '<?php echo '.sprintf($f,'$core->blog->url.$core->url->getBase("newthread")').'; ?>';230 }231 }232 233 public static function SubforumThreadsNumber($attr)234 {235 global $core, $_ctx;236 237 $none = __('no thread');238 $one = __('one thread');239 $more = __('%d threads');240 241 if (isset($attr['none'])) {242 $none = addslashes($attr['none']);243 }244 if (isset($attr['one'])) {245 $one = addslashes($attr['one']);246 }247 if (isset($attr['more'])) {248 $more = addslashes($attr['more']);249 }250 if (!empty($attr['full'])) {251 $operation = '$_ctx->categories->nb_total';252 } else {253 $operation = '$_ctx->categories->nb_post';254 }255 256 return257 "<?php if (".$operation." == 0) {\n".258 " printf('".$none."',".$operation.");\n".259 "} elseif (".$operation." == 1) {\n".260 " printf('".$one."',".$operation.");\n".261 "} else {\n".262 " printf('".$more."',".$operation.");\n".263 "} ?>";264 }265 266 public static function SubforumAnswersNumber($attr)267 {268 global $core, $_ctx;269 270 $none = __('no answer');271 $one = __('one answer');272 $more = __('%d answers');273 274 if (isset($attr['none'])) {275 $none = addslashes($attr['none']);276 }277 if (isset($attr['one'])) {278 $one = addslashes($attr['one']);279 }280 if (isset($attr['more'])) {281 $more = addslashes($attr['more']);282 }283 284 if (!empty($attr['full'])) {285 $operation = '$_ctx->categories->nb_total2';286 } else {287 $operation = '$_ctx->categories->nb_answer';288 }289 290 return291 "<?php if (".$operation." == 0) {\n".292 " printf('".$none."',".$operation.");\n".293 "} elseif (".$operation." == 1) {\n".294 " printf('".$one."',".$operation.");\n".295 "} else {\n".296 " printf('".$more."',".$operation.");\n".297 "} ?>";298 }299 300 public static function PublicUserID($attr)301 {302 global $core, $_ctx;303 304 $f = $GLOBALS['core']->tpl->getFilters($attr);305 return '<?php echo '.sprintf($f,'$core->auth->userID()').'; ?>';306 }307 308 public static function PublicUserDisplayName($attr)309 {310 global $core, $_ctx;311 312 $f = $GLOBALS['core']->tpl->getFilters($attr);313 return '<?php echo '.sprintf($f,'$core->auth->getInfo(\'user_displayname\')').'; ?>';314 }315 316 public static function IfThreadPreview($attr,$content)317 {318 global $_ctx;319 320 return321 '<?php if ($_ctx->thread_preview !== null && $_ctx->thread_preview["preview"]) : ?>'.322 $content.323 '<?php endif; ?>';324 }325 326 public static function ThreadPreviewTitle($attr)327 {328 global $_ctx;329 330 $f = $GLOBALS['core']->tpl->getFilters($attr);331 return '<?php echo '.sprintf($f,'$_ctx->thread_preview["title"]').'; ?>';332 }333 334 335 public static function ThreadPreviewContent($attr)336 {337 global $_ctx;338 339 $f = $GLOBALS['core']->tpl->getFilters($attr);340 341 if (!empty($attr['raw'])) {342 $co = '$_ctx->thread_preview["rawcontent"]';343 } else {344 $co = '$_ctx->thread_preview["content"]';345 }346 347 return '<?php echo '.sprintf($f,$co).'; ?>';348 }349 350 public static function IfAnswerPreview($attr,$content)351 {352 global $_ctx;353 354 return355 '<?php if ($_ctx->message_preview !== null && $_ctx->message_preview["preview"]) : ?>'.356 $content.357 '<?php endif; ?>';358 }359 360 public static function AnswerPreviewContent($attr)361 {362 global $_ctx;363 364 $f = $GLOBALS['core']->tpl->getFilters($attr);365 366 if (!empty($attr['raw'])) {367 $co = '$_ctx->message_preview["rawcontent"]';368 } else {369 $co = '$_ctx->message_preview["content"]';370 }371 372 return '<?php echo '.sprintf($f,$co).'; ?>';373 }374 375 public static function ThreadProfileUserID($attr)376 {377 global $core, $_ctx;378 379 $f = $GLOBALS['core']->tpl->getFilters($attr);380 return '<?php echo '.sprintf($f,'$core->blog->url.$core->url->getBase("profile")."/".$_ctx->posts->user_id').'; ?>';381 }382 383 public static function ThreadURL($attr)384 {385 global $core, $_ctx;386 387 $f = $GLOBALS['core']->tpl->getFilters($attr);388 return '<?php echo '.sprintf($f,'$core->blog->url.$core->url->getBase("thread")."/".$_ctx->posts->post_url').'; ?>';389 }390 391 public static function ThreadCategoryURL($attr)392 {393 global $core, $_ctx;394 395 $f = $GLOBALS['core']->tpl->getFilters($attr);396 return '<?php echo '.sprintf($f,'$core->blog->url.$core->url->getBase("subforum")."/".$_ctx->posts->cat_url').'; ?>';397 }398 399 public static function AnswerThreadURL($attr)400 {401 global $core, $_ctx;402 403 $f = $GLOBALS['core']->tpl->getFilters($attr);404 return '<?php echo '.sprintf($f,'$core->blog->url.$core->url->getBase("thread")."/".$_ctx->agora->getThreadURL($_ctx->posts)').'; ?>';405 }406 407 public static function EntryIfClosed($attr)408 {409 global $core, $_ctx;410 411 $ret = isset($attr['return']) ? $attr['return'] : 'closed';412 $ret = html::escapeHTML($ret);413 414 return415 '<?php if (!$_ctx->posts->post_open_comment) { '.416 "echo '".addslashes($ret)."'; } ?>";417 }418 419 375 public static function PaginationPlus($attr,$content) 420 376 { … … 605 561 { 606 562 global $core; 607 563 608 564 $format = (!empty($attr['format'])) ? $attr['format'] : 609 565 $core->blog->settings->date_format.', '.$core->blog->settings->time_format; 610 566 $f = $GLOBALS['core']->tpl->getFilters($attr); 611 567 612 568 return('<?php echo '.'dt::dt2str(\''.$format.'\','.sprintf($f,'$_ctx->posts->post_creadt'). 613 569 ',\''.$core->blog->settings->blog_timezone.'\'); ?>'); 614 570 } 615 571 572 public static function EntryUpdDate($attr) 573 { 574 global $core; 575 576 $format = (!empty($attr['format'])) ? $attr['format'] : 577 $core->blog->settings->date_format.', '.$core->blog->settings->time_format; 578 $f = $GLOBALS['core']->tpl->getFilters($attr); 579 580 return('<?php echo '.'dt::dt2str(\''.$format.'\','.sprintf($f,'$_ctx->posts->post_upddt'). 581 ',\''.$core->blog->settings->blog_timezone.'\'); ?>'); 582 } 583 616 584 public static function userIsModo($attr,$content) 617 585 { … … 629 597 630 598 $f = $GLOBALS['core']->tpl->getFilters($attr); 631 return '<?php echo '.sprintf($f,'$_ctx-> profile->user_id').'; ?>';599 return '<?php echo '.sprintf($f,'$_ctx->users->user_id').'; ?>'; 632 600 } 633 601 … … 637 605 638 606 $f = $GLOBALS['core']->tpl->getFilters($attr); 639 return '<?php echo '.sprintf($f,'$_ctx-> profile->user_displayname').'; ?>';607 return '<?php echo '.sprintf($f,'$_ctx->users->user_displayname').'; ?>'; 640 608 } 641 609 … … 645 613 646 614 $f = $GLOBALS['core']->tpl->getFilters($attr); 647 return '<?php echo '.sprintf($f,'$_ctx-> profile->user_url').'; ?>';615 return '<?php echo '.sprintf($f,'$_ctx->users->user_url').'; ?>'; 648 616 } 649 617 … … 653 621 654 622 $f = $GLOBALS['core']->tpl->getFilters($attr); 655 return '<?php echo '.sprintf($f,'$_ctx-> profile->user_email').'; ?>';623 return '<?php echo '.sprintf($f,'$_ctx->users->user_email').'; ?>'; 656 624 } 657 625 … … 667 635 } 668 636 669 //$_ctx-> profile->user_creadt = strtotime($_ctx->profile->user_creadt);637 //$_ctx->users->user_creadt = strtotime($_ctx->users->user_creadt); 670 638 $iso8601 = !empty($attr['iso8601']); 671 639 $rfc822 = !empty($attr['rfc822']); … … 674 642 675 643 if ($rfc822) { 676 return '<?php echo '.sprintf($f,"dt::rfc822(\$_ctx-> profile->user_creadt,\$core->blog->settings->blog_timezone)").'; ?>';644 return '<?php echo '.sprintf($f,"dt::rfc822(\$_ctx->users->user_creadt,\$core->blog->settings->blog_timezone)").'; ?>'; 677 645 } elseif ($iso8601) { 678 return '<?php echo '.sprintf($f,"dt::iso8601(\$_ctx-> profile->user_creadt,\$core->blog->settings->blog_timezone)").'; ?>';679 } else { 680 return '<?php echo '.sprintf($f,"dt::str('".$format."',\$_ctx-> profile->user_creadt)").'; ?>';646 return '<?php echo '.sprintf($f,"dt::iso8601(\$_ctx->users->user_creadt,\$core->blog->settings->blog_timezone)").'; ?>'; 647 } else { 648 return '<?php echo '.sprintf($f,"dt::str('".$format."',\$_ctx->users->user_creadt)").'; ?>'; 681 649 } 682 650 } … … 693 661 } 694 662 695 //$_ctx-> profile->user_upddt = strtotime($_ctx->profile->user_upddt);663 //$_ctx->users->user_upddt = strtotime($_ctx->users->user_upddt); 696 664 $iso8601 = !empty($attr['iso8601']); 697 665 $rfc822 = !empty($attr['rfc822']); … … 700 668 701 669 if ($rfc822) { 702 return '<?php echo '.sprintf($f,"dt::rfc822(\$_ctx-> profile->user_upddt,\$core->blog->settings->blog_timezone)").'; ?>';670 return '<?php echo '.sprintf($f,"dt::rfc822(\$_ctx->users->user_upddt,\$core->blog->settings->blog_timezone)").'; ?>'; 703 671 } elseif ($iso8601) { 704 return '<?php echo '.sprintf($f,"dt::iso8601(\$_ctx-> profile->user_upddt,\$core->blog->settings->blog_timezone)").'; ?>';705 } else { 706 return '<?php echo '.sprintf($f,"dt::str('".$format."',\$_ctx-> profile->user_upddt)").'; ?>';672 return '<?php echo '.sprintf($f,"dt::iso8601(\$_ctx->users->user_upddt,\$core->blog->settings->blog_timezone)").'; ?>'; 673 } else { 674 return '<?php echo '.sprintf($f,"dt::str('".$format."',\$_ctx->users->user_upddt)").'; ?>'; 707 675 } 708 676 } … … 717 685 "}\n"; 718 686 719 $lastn = -1;687 $lastn = 0; 720 688 if (isset($attr['lastn'])) { 721 689 $lastn = abs((integer) $attr['lastn'])+0; 722 690 } 723 691 724 $p .= 'if (!isset($_page_number)) { $_page_number = 1; }'."\n"; 725 726 if ($lastn != 0) { 727 if ($lastn > 0) { 728 $p .= "\$params['limit'] = ".$lastn.";\n"; 729 } else { 730 $p .= "\$params['limit'] = \$_ctx->nb_message_per_page;\n"; 731 } 692 //$p .= 'if (!isset($_page_number)) { $_page_number = 1; }'."\n"; 693 694 //if ($lastn != 0) { 695 if ($lastn > 0) { 696 $p .= "\$params['limit'] = ".$lastn.";\n"; 697 } else { 698 //$p .= "\$params['limit'] = \$_ctx->nb_message_per_page;\n"; 699 $p .= "if (\$_ctx->nb_message_per_page !== null) { \$params['limit'] = \$_ctx->nb_message_per_page; }\n"; 700 } 732 701 733 if (!isset($attr['ignore_pagination']) || $attr['ignore_pagination'] == "0") {702 /*if (!isset($attr['ignore_pagination']) || $attr['ignore_pagination'] == "0") { 734 703 $p .= "\$params['limit'] = array(((\$_page_number-1)*\$params['limit']),\$params['limit']);\n"; 735 704 } else { 736 705 $p .= "\$params['limit'] = array(0, \$params['limit']);\n"; 737 } 738 }706 }*/ 707 //} 739 708 740 709 if (isset($attr['author'])) { … … 772 741 } 773 742 774 $sortby = ' post_dt';775 $order = ' desc';743 $sortby = 'message_dt'; 744 $order = 'asc'; 776 745 if (isset($attr['sortby'])) { 777 746 switch ($attr['sortby']) { 778 case 'title': $sortby = 'post_title'; break;779 case 'selected' : $sortby = 'post_selected'; break;780 747 case 'author' : $sortby = 'user_id'; break; 781 case 'date' : $sortby = 'post_dt'; break; 782 case 'id' : $sortby = 'post_id'; break; 748 case 'date' : $sortby = 'message_dt'; break; 749 case 'id' : $sortby = 'message_id'; break; 750 case 'post_id' : $sortby = 'post_id'; break; 783 751 } 784 752 } … … 853 821 } 854 822 855 public static function MessageAuthor ($attr)856 { //A revoir857 global $core, $_ctx; 858 859 $f = $GLOBALS['core']->tpl->getFilters($attr); 860 861 return '<?php echo '.sprintf($f,'$_ctx->messages-> user_id').'; ?>';823 public static function MessageAuthorCommonName($attr) 824 { 825 global $core, $_ctx; 826 827 $f = $GLOBALS['core']->tpl->getFilters($attr); 828 829 return '<?php echo '.sprintf($f,'$_ctx->messages->getAuthorCN()').'; ?>'; 862 830 } 863 831 … … 914 882 } elseif ($iso8601) { 915 883 return '<?php echo '.sprintf($f,"\$_ctx->messages->getISO8601Date()").'; ?>'; 884 /*return '<?php echo "plop" ; ?>';*/ 916 885 } else { 917 886 return '<?php echo '.sprintf($f,"\$_ctx->messages->getDate('".$format."')").'; ?>'; … … 987 956 } 988 957 958 public static function MessageEntryTitle($attr) 959 { 960 global $core, $_ctx; 961 962 $f = $GLOBALS['core']->tpl->getFilters($attr); 963 return '<?php echo '.sprintf($f,'$_ctx->messages->post_title').'; ?>'; 964 } 965 966 public static function MessageFeedID($attr) 967 { 968 global $core, $_ctx; 969 970 $f = $GLOBALS['core']->tpl->getFilters($attr); 971 return '<?php echo '.sprintf($f,'$_ctx->messages->getFeedID()').'; ?>'; 972 } 973 989 974 public static function agoPagination($attr,$content) 990 975 { … … 1064 1049 } 1065 1050 1066 public static function SubforumID($attr)1051 public static function placeID($attr) 1067 1052 { 1068 1053 global $core, $_ctx; … … 1070 1055 } 1071 1056 1072 public static function SubforumSpacer($attr)1057 public static function placeSpacer($attr) 1073 1058 { 1074 1059 global $core, $_ctx; … … 1081 1066 } 1082 1067 1083 public static function SubforumComboSelected($attr,$content)1084 { 1085 global $core, $_ctx; 1086 1087 return 1088 '<?php if ( $_ctx->categories->cat_id == $_ctx->thread_preview["cat"]) : ?>'.1068 public static function placeComboSelected($attr,$content) 1069 { 1070 global $core, $_ctx; 1071 1072 return 1073 '<?php if (($_ctx->categories->cat_id == $_ctx->thread_preview["cat"]) && ($_ctx->thread_preview["not_empty"])) : ?>'. 1089 1074 $content. 1090 1075 '<?php endif; ?>'; -
plugins/agora/inc/class.agora.utils.php
r1864 r2141 4 4 # This file is part of agora, a plugin for Dotclear 2. 5 5 # 6 # Copyright (c) 2009 Osku , Tomtom and contributors 7 ## Licensed under the GPL version 2.0 license. 6 # Copyright (c) 2009-2010 Osku ,Tomtom and contributors 7 # 8 # Licensed under the GPL version 2.0 license. 8 9 # A copy of this license is available in LICENSE file or at 9 10 # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html -
plugins/agora/inc/class.rs.agora.php
r1864 r2141 5 5 # 6 6 # Copyright (c) 2009 Osku , Tomtom and contributors 7 ## Licensed under the GPL version 2.0 license. 7 # 8 # Licensed under the GPL version 2.0 license. 8 9 # A copy of this license is available in LICENSE file or at 9 10 # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html … … 11 12 # -- END LICENSE BLOCK ------------------------------------ 12 13 13 class rsExtagora14 {15 public static function getURL($rs)16 {17 return $rs->core->blog->url.$rs->core->url->getBase('forum').'/'.18 html::sanitizeURL($rs->post_url);19 }20 21 public static function NewPosts($rs)22 {23 $now = dt::toUTC(time());24 25 // to be continued26 27 }28 29 public static function getThreadURL($rs)30 {31 32 33 }34 }35 14 class rsExtMessage 36 15 { … … 38 17 { 39 18 if ($absolute_urls) { 40 return html::absoluteURLs($rs->message_content_xhtml,$rs->get URL());19 return html::absoluteURLs($rs->message_content_xhtml,$rs->getThreadURL()); 41 20 } else { 42 21 return $rs->message_content_xhtml; … … 44 23 } 45 24 46 public static function getURL($rs) 25 public static function getAuthorCN($rs) 26 { 27 return dcUtils::getUserCN($rs->user_id, $rs->user_name, 28 $rs->user_firstname, $rs->user_displayname); 29 } 30 31 public static function getThreadURL($rs) 47 32 { 48 33 return $rs->core->blog->url.$rs->core->getPostPublicURL( … … 71 56 public static function getTS($rs) 72 57 { 73 return strtotime($rs->mess sage_dt);58 return strtotime($rs->message_dt); 74 59 } 75 60 … … 83 68 return dt::rfc822($rs->getTS(),$rs->message_tz); 84 69 } 70 71 public static function getFeedID($rs) 72 { 73 return 'urn:md5:'.md5($rs->core->blog->uid.$rs->message_id); 74 75 $url = parse_url($rs->core->blog->url); 76 $date_part = date('Y-m-d',strtotime($rs->message_dt)); 77 78 return 'tag:'.$url['host'].','.$date_part.':'.$rs->message_id; 79 } 85 80 } 86 81 ?> -
plugins/agora/index.php
r1882 r2141 4 4 # This file is part of agora, a plugin for Dotclear 2. 5 5 # 6 # Copyright (c) 2009 Osku , Tomtom and contributors 7 ## Licensed under the GPL version 2.0 license. 6 # Copyright (c) 2009-2010 Osku ,Tomtom and contributors 7 # 8 # Licensed under the GPL version 2.0 license. 8 9 # A copy of this license is available in LICENSE file or at 9 10 # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html … … 11 12 # -- END LICENSE BLOCK ------------------------------------ 12 13 13 // Setting default parameters if missing configuration 14 if (is_null($core->blog->settings->agora_flag)) { 15 try{16 $core->blog->settings->setNameSpace('agora');17 18 // Agora is not active by default 19 $core->blog->settings->put('agora_flag',false,'boolean','Agora activation flag'); 20 $core->blog->triggerBlog(); 21 http::redirect(http::getSelfURI());22 }23 catch (Exception $e) { 24 $core->error->add($e->getMessage()); 25 } 26 } 27 28 // Getting current parameters 29 $agora_flag = (boolean)$core->blog->settings->agora_flag; 30 $agora_announce = $core->blog->settings->agora_announce; 31 $agora_nb_msg_page = $core->blog->settings->agora_nb_msg_per_page_per_thread; 32 33 if ($agora_announce === null) { 34 $agora_announce = __('<p class="message">Welcome to the Agora.</p>'); 35 }36 37 if ($agora_nb_msg_page === null) { 38 $agora_nb_msg_page = 10; 39 } 40 41 if (!empty($_POST['saveconfig'])) 42 { 43 try14 $act = (!empty($_REQUEST['act']) && $_REQUEST['act'] == 'thread') ? 'thread' : 'options'; 15 16 if ($_REQUEST['act'] == 'thread') { 17 include dirname(__FILE__).'/thread.php'; 18 return; 19 } 20 21 if ($_REQUEST['act'] == 'messages') { 22 include dirname(__FILE__).'/messages.php'; 23 return; 24 } 25 26 if ($_REQUEST['act'] == 'messages-actions') { 27 include dirname(__FILE__).'/messages_actions.php'; //not ready yet 28 return; 29 } 30 31 if ($_REQUEST['act'] == 'options') { 32 include dirname(__FILE__).'/options.php'; // to finalize 33 return; 34 } 35 36 if (!defined('DC_CONTEXT_ADMIN')) { return; } 37 dcPage::check('agora,contentadmin'); 38 39 40 /* Pager class 41 -------------------------------------------------------- */ 42 class adminThreadList extends adminGenericList 43 { 44 public function display($page,$nb_per_page,$enclose_block='') 44 45 { 45 $agora_flag = (empty($_POST['agora_flag']))?false:true; 46 $agora_announce = $_POST['agora_announce']; 47 $agora_nb_msg_page = abs((integer) $_POST['agora_nb_msg_page']); 48 if ($agora_nb_msg_page <= 1) { $agora_nb_msg_page = 1; } 49 50 if (empty($_POST['agora_announce'])) { 51 throw new Exception(__('No agora announce.')); 52 } 53 54 $core->blog->settings->setNamespace('agora'); 55 $core->blog->settings->put('agora_flag',$agora_flag,'boolean','Active the agora module'); 56 $core->blog->settings->put('agora_announce',$agora_announce,'string','Agora announce'); 57 $core->blog->settings->put('agora_nb_msg_per_page_per_thread',$agora_nb_msg_page,'integer','Number of messages per page per thread'); 58 59 $core->blog->triggerBlog(); 60 61 $msg = __('Configuration successfully updated.'); 62 } 63 64 catch (Exception $e) 46 if ($this->rs->isEmpty()) 47 { 48 echo '<p><strong>'.__('No thread').'</strong></p>'; 49 } 50 else 51 { 52 $pager = new pager($page,$this->rs_count,$nb_per_page,10); 53 $pager->html_prev = $this->html_prev; 54 $pager->html_next = $this->html_next; 55 $pager->var_page = 'page'; 56 57 $html_block = 58 '<table class="clear"><tr>'. 59 '<th colspan="2">'.__('Title').'</th>'. 60 '<th>'.__('Date').'</th>'. 61 '<th>'.__('Category').'</th>'. 62 '<th>'.__('Author').'</th>'. 63 '<th>'.__('Messages').'</th>'. 64 '<th>'.__('Status').'</th>'. 65 '</tr>%s</table>'; 66 67 if ($enclose_block) { 68 $html_block = sprintf($enclose_block,$html_block); 69 } 70 71 echo '<p>'.__('Page(s)').' : '.$pager->getLinks().'</p>'; 72 73 $blocks = explode('%s',$html_block); 74 75 echo $blocks[0]; 76 77 while ($this->rs->fetch()) 78 { 79 echo $this->postLine(); 80 } 81 82 echo $blocks[1]; 83 84 echo '<p>'.__('Page(s)').' : '.$pager->getLinks().'</p>'; 85 } 86 } 87 88 private function postLine() 65 89 { 66 $core->error->add($e->getMessage()); 67 } 68 } 90 if ($this->core->auth->check('categories',$this->core->blog->id)) { 91 $cat_link = '<a href="category.php?id=%s">%s</a>'; 92 } else { 93 $cat_link = '%2$s'; 94 } 95 96 $img = '<img alt="%1$s" title="%1$s" src="images/%2$s" />'; 97 switch ($this->rs->post_status) { 98 case 1: 99 $img_status = sprintf($img,__('published'),'check-on.png'); 100 break; 101 case 0: 102 $img_status = sprintf($img,__('unpublished'),'check-off.png'); 103 break; 104 case -1: 105 $img_status = sprintf($img,__('scheduled'),'scheduled.png'); 106 break; 107 case -2: 108 $img_status = sprintf($img,__('pending'),'check-wrn.png'); 109 break; 110 } 111 if ($this->rs->cat_title) { 112 $cat_title = sprintf($cat_link,$this->rs->cat_id, 113 html::escapeHTML($this->rs->cat_title)); 114 } else { 115 $cat_title = __('None'); 116 } 117 118 $protected = ''; 119 if ($this->rs->post_password) { 120 $protected = sprintf($img,__('protected'),'locker.png'); 121 } 122 123 $selected = ''; 124 if ($this->rs->post_selected) { 125 $selected = sprintf($img,__('selected'),'selected.png'); 126 } 127 128 $attach = ''; 129 $nb_media = $this->rs->countMedia(); 130 if ($nb_media > 0) { 131 $attach_str = $nb_media == 1 ? __('%d attachment') : __('%d attachments'); 132 $attach = sprintf($img,sprintf($attach_str,$nb_media),'attach.png'); 133 } 134 135 $res = '<tr class="line'.($this->rs->post_status != 1 ? ' offline' : '').'"'. 136 ' id="p'.$this->rs->post_id.'">'; 137 138 $res .= 139 '<td class="nowrap">'. 140 form::checkbox(array('entries[]'),$this->rs->post_id,'','','',!$this->rs->isEditable()).'</td>'. 141 '<td class="maximal"><a href="'.$this->core->getPostAdminURL($this->rs->post_type,$this->rs->post_id).'">'. 142 html::escapeHTML($this->rs->post_title).'</a></td>'. 143 '<td class="nowrap">'.dt::dt2str(__('%Y-%m-%d %H:%M'),$this->rs->post_dt).'</td>'. 144 '<td class="nowrap">'.$cat_title.'</td>'. 145 '<td class="nowrap">'.$this->rs->user_id.'</td>'. 146 '<td class="nowrap">'.$this->rs->nb_comment.'</td>'. 147 '<td class="nowrap status">'.$img_status.' '.$selected.' '.$protected.' '.$attach.'</td>'. 148 '</tr>'; 149 150 return $res; 151 } 152 } 153 154 /* Getting threads 155 -------------------------------------------------------- */ 156 $params = array( 157 'post_type' => 'thread' 158 ); 159 160 # Getting categories 161 try { 162 $categories = $core->blog->getCategories(array('post_type'=>'thread')); 163 } catch (Exception $e) { 164 $core->error->add($e->getMessage()); 165 } 166 167 # Getting authors 168 try { 169 $users = $core->blog->getPostsUsers('thread'); 170 } catch (Exception $e) { 171 $core->error->add($e->getMessage()); 172 } 173 174 # Getting dates 175 try { 176 $dates = $core->blog->getDates(array('type'=>'month','post_type'=>'thread')); 177 } catch (Exception $e) { 178 $core->error->add($e->getMessage()); 179 } 180 181 # Getting langs 182 try { 183 $langs = $core->blog->getLangs(); 184 } catch (Exception $e) { 185 $core->error->add($e->getMessage()); 186 } 187 188 # Creating filter combo boxes 189 if (!$core->error->flag()) 190 { 191 # Filter form we'll put in html_block 192 $users_combo = $categories_combo = array(); 193 $users_combo['-'] = $categories_combo['-'] = ''; 194 while ($users->fetch()) 195 { 196 $user_cn = dcUtils::getUserCN($users->user_id,$users->user_name, 197 $users->user_firstname,$users->user_displayname); 198 199 if ($user_cn != $users->user_id) { 200 $user_cn .= ' ('.$users->user_id.')'; 201 } 202 203 $users_combo[$user_cn] = $users->user_id; 204 } 205 206 while ($categories->fetch()) { 207 $categories_combo[str_repeat(' ',$categories->level-1).'• '. 208 html::escapeHTML($categories->cat_title). 209 ' ('.$categories->nb_post.')'] = $categories->cat_id; 210 } 211 212 $status_combo = array( 213 '-' => '' 214 ); 215 foreach ($core->blog->getAllPostStatus() as $k => $v) { 216 $status_combo[$v] = (string) $k; 217 } 218 219 $selected_combo = array( 220 '-' => '', 221 __('selected') => '1', 222 __('not selected') => '0' 223 ); 224 225 # Months array 226 $dt_m_combo['-'] = ''; 227 while ($dates->fetch()) { 228 $dt_m_combo[dt::str('%B %Y',$dates->ts())] = $dates->year().$dates->month(); 229 } 230 231 $lang_combo['-'] = ''; 232 while ($langs->fetch()) { 233 $lang_combo[$langs->post_lang] = $langs->post_lang; 234 } 235 236 $sortby_combo = array( 237 __('Date') => 'post_dt', 238 __('Title') => 'post_title', 239 __('Category') => 'cat_title', 240 __('Author') => 'user_id', 241 __('Status') => 'post_status', 242 __('Selected') => 'post_selected' 243 ); 244 245 $order_combo = array( 246 __('Descending') => 'desc', 247 __('Ascending') => 'asc' 248 ); 249 } 250 251 # Actions combo box 252 $combo_action = array(); 253 if ($core->auth->check('publish,contentadmin',$core->blog->id)) 254 { 255 $combo_action[__('Status')] = array( 256 __('Publish') => 'publish', 257 __('Unpublish') => 'unpublish', 258 __('Schedule') => 'schedule', 259 __('Mark as pending') => 'pending' 260 ); 261 } 262 $combo_action[__('Mark')] = array( 263 __('Mark as selected') => 'selected', 264 __('Mark as unselected') => 'unselected' 265 ); 266 $combo_action[__('Change')] = array(__('Change category') => 'category'); 267 if ($core->auth->check('admin',$core->blog->id)) 268 { 269 $combo_action[__('Change')] = array_merge($combo_action[__('Change')], 270 array(__('Change author') => 'author')); 271 } 272 if ($core->auth->check('delete,contentadmin',$core->blog->id)) 273 { 274 $combo_action[__('Delete')] = array(__('Delete') => 'delete'); 275 } 276 277 /* Get posts 278 -------------------------------------------------------- */ 279 $user_id = !empty($_GET['user_id']) ? $_GET['user_id'] : ''; 280 $cat_id = !empty($_GET['cat_id']) ? $_GET['cat_id'] : ''; 281 $status = isset($_GET['status']) ? $_GET['status'] : ''; 282 $selected = isset($_GET['selected']) ? $_GET['selected'] : ''; 283 $month = !empty($_GET['month']) ? $_GET['month'] : ''; 284 $lang = !empty($_GET['lang']) ? $_GET['lang'] : ''; 285 $sortby = !empty($_GET['sortby']) ? $_GET['sortby'] : 'post_dt'; 286 $order = !empty($_GET['order']) ? $_GET['order'] : 'desc'; 287 288 $show_filters = false; 289 290 $page = !empty($_GET['page']) ? (integer) $_GET['page'] : 1; 291 $nb_per_page = 30; 292 293 if (!empty($_GET['nb']) && (integer) $_GET['nb'] > 0) { 294 if ($nb_per_page != $_GET['nb']) { 295 $show_filters = true; 296 } 297 $nb_per_page = (integer) $_GET['nb']; 298 } 299 300 $params['limit'] = array((($page-1)*$nb_per_page),$nb_per_page); 301 $params['no_content'] = true; 302 303 # - User filter 304 if ($user_id !== '' && in_array($user_id,$users_combo)) { 305 $params['user_id'] = $user_id; 306 $show_filters = true; 307 } 308 309 # - Categories filter 310 if ($cat_id !== '' && in_array($cat_id,$categories_combo)) { 311 $params['cat_id'] = $cat_id; 312 $show_filters = true; 313 } 314 315 # - Status filter 316 if ($status !== '' && in_array($status,$status_combo)) { 317 $params['post_status'] = $status; 318 $show_filters = true; 319 } 320 321 # - Selected filter 322 if ($selected !== '' && in_array($selected,$selected_combo)) { 323 $params['post_selected'] = $selected; 324 $show_filters = true; 325 } 326 327 # - Month filter 328 if ($month !== '' && in_array($month,$dt_m_combo)) { 329 $params['post_month'] = substr($month,4,2); 330 $params['post_year'] = substr($month,0,4); 331 $show_filters = true; 332 } 333 334 # - Lang filter 335 if ($lang !== '' && in_array($lang,$lang_combo)) { 336 $params['post_lang'] = $lang; 337 $show_filters = true; 338 } 339 340 # - Sortby and order filter 341 if ($sortby !== '' && in_array($sortby,$sortby_combo)) { 342 if ($order !== '' && in_array($order,$order_combo)) { 343 $params['order'] = $sortby.' '.$order; 344 } 345 346 if ($sortby != 'post_dt' || $order != 'desc') { 347 $show_filters = true; 348 } 349 } 350 351 $params['limit'] = array((($page-1)*$nb_per_page),$nb_per_page); 352 $params['no_content'] = true; 353 //$params['order'] = 'post_position ASC, post_title ASC'; 354 355 try { 356 $pages = $core->blog->getPosts($params); 357 $counter = $core->blog->getPosts($params,true); 358 $post_list = new adminThreadList($core,$pages,$counter->f(0)); 359 } catch (Exception $e) { 360 $core->error->add($e->getMessage()); 361 } 362 363 /* DISPLAY 364 -------------------------------------------------------- */ 365 366 # --BEHAVIOR-- adminPagesActionsCombo 367 $core->callBehavior('adminThreadsActionsCombo',array(&$combo_action)); 368 369 /* Display 370 -------------------------------------------------------- */ 69 371 ?> 70 372 <html> 71 373 <head> 72 <title><?php echo __('Agora'); ?></title> 374 <title><?php echo __('Threads'); ?></title> 375 <?php 376 echo dcPage::jsLoad('js/_posts_list.js'); 377 if (!$show_filters) { 378 echo dcPage::jsLoad('js/filter-controls.js'); 379 }?> 380 <script type="text/javascript"> 381 //<![CDATA[ 382 <?php echo dcPage::jsVar('dotclear.msg.confirm_delete_posts',__("Are you sure you want to delete selected threads?")); ?> 383 //]]> 384 </script> 73 385 </head> 74 386 <body> 75 387 <?php 76 echo '<h2>'.html::escapeHTML($core->blog->name).' › '.__('Agora').'</h2>'; 77 78 if (!empty($msg)) echo '<p class="message">'.$msg.'</p>'; 79 80 if (!empty($err)) echo '<p class="error">'.$err.'</p>'; 81 82 echo '<div id="agora_options">'. 83 '<form method="post" action="'.$p_url.'">'. 84 '<fieldset>'. 85 '<legend>'.__('Plugin activation').'</legend>'. 86 '<div class="two-cols">'. 87 '<div class="col">'. 88 '<p class="field">'. 89 form::checkbox('agora_flag', 1, $agora_flag). 90 '<label class=" classic" for="agora_flag">'.__('Enable Agora').'</label>'. 91 '</p>'. 92 '</div>'. 93 94 '</div>'. 95 '</fieldset>'. 96 '<fieldset>'. 97 '<legend>'.__('Presentation options').'</legend>'. 98 '<div class="two-cols">'. 99 '<p class="area"><label class="required" title="'.__('Required field').'">'. 100 __('Agora announce:'). 101 form::textarea('agora_announce',200,4,html::escapeHTML($agora_announce)). 102 '</label></p>'. 103 '<div class="col">'. 104 '<p>'. 105 '<label class="classic" for="agora_nb_msg_page">'.sprintf(__('Display %s messages per thread\'page'), 106 form::field('agora_nb_msg_page',2,3,$agora_nb_msg_page)). 107 '</label>'. 108 '</p>'. 109 '</div>'. 110 '<div class="col">'. 111 '</div>'. 112 113 '</div>'. 114 '</fieldset>'. 115 116 '<p>'.form::hidden(array('p'),'agora'). 117 $core->formNonce(). 118 '<input type="submit" name="saveconfig" value="'.__('Save configuration').'" /></p>'. 119 '</form>'. 120 '</div>'; 388 echo '<h2>'.html::escapeHTML($core->blog->name).' › '.__('Threads'). 389 ' - <a class="button" href="'.$p_url.'&act=thread">'.__('New thread').'</a></h2>'; 390 391 if (!$core->error->flag()) 392 { 393 if (!$show_filters) { 394 echo '<p><a id="filter-control" class="form-control" href="#">'. 395 __('Filters').'</a></p>'; 396 } 397 398 echo 399 '<form action="'.$p_url.'" method="get" id="filters-form">'. 400 '<fieldset><legend>'.__('Filters').'</legend>'. 401 '<div class="three-cols">'. 402 '<div class="col">'. 403 '<label>'.__('Author:'). 404 form::combo('user_id',$users_combo,$user_id).'</label> '. 405 '<label>'.__('Category:'). 406 form::combo('cat_id',$categories_combo,$cat_id).'</label> '. 407 '<label>'.__('Status:'). 408 form::combo('status',$status_combo,$status).'</label> '. 409 '</div>'. 410 411 '<div class="col">'. 412 '<label>'.__('Selected:'). 413 form::combo('selected',$selected_combo,$selected).'</label> '. 414 '<label>'.__('Month:'). 415 form::combo('month',$dt_m_combo,$month).'</label> '. 416 '<label>'.__('Lang:'). 417 form::combo('lang',$lang_combo,$lang).'</label> '. 418 '</div>'. 419 420 '<div class="col">'. 421 '<p><label>'.__('Order by:'). 422 form::combo('sortby',$sortby_combo,$sortby).'</label> '. 423 '<label>'.__('Sort:'). 424 form::combo('order',$order_combo,$order).'</label></p>'. 425 '<p><label class="classic">'. form::field('nb',3,3,$nb_per_page).' '. 426 __('Entries per page').'</label> '. 427 '<p><input type="hidden" name="p" value="agora" />'. 428 '<input type="submit" value="'.__('filter').'" /></p>'. 429 '</div>'. 430 '</div>'. 431 '<br class="clear" />'. //Opera sucks 432 '</fieldset>'. 433 '</form>'; 434 435 # Show pages 436 $post_list->display($page,$nb_per_page, 437 '<form action="posts_actions.php" method="post" id="form-entries">'. 438 439 '%s'. 440 441 '<div class="two-cols">'. 442 '<p class="col checkboxes-helpers"></p>'. 443 444 '<p class="col right">'.__('Selected threads action:').' '. 445 form::combo('action',$combo_action). 446 '<input type="submit" value="'.__('ok').'" /></p>'. 447 form::hidden(array('post_type'),'thread'). 448 form::hidden(array('redir'),html::escapeHTML($_SERVER['REQUEST_URI'])). 449 $core->formNonce(). 450 '</div>'. 451 '</form>'); 452 } 121 453 ?> 122 454 </body> -
plugins/agora/locales/fr/main.po
r1844 r2141 1 # Language: français 2 # Module: agora - 0.5.3 3 # Date: 2010-03-29 06:13:35 4 # Translated with translater 1.3 5 1 6 msgid "" 2 7 msgstr "" 3 " Project-Id-Version: Agora\n"4 " Report-Msgid-Bugs-To:\n"5 "POT-Creation-Date: 2009-06-01 19:07+0100\n"6 "PO-Revision-Date: 20 09-10-24 07:54+0100\n"7 "Last-Translator: Kozlika <kozlika@free.fr>\n"8 "Content-Type: text/plain; charset=UTF-8\n" 9 "Project-Id-Version: agora 0.5.3\n" 10 "POT-Creation-Date: \n" 11 "PO-Revision-Date: 2010-03-29T06:13:35+00:00\n" 12 "Last-Translator: Osku\n" 8 13 "Language-Team: \n" 9 14 "MIME-Version: 1.0\n" 10 "Content-Type: text/plain; charset=UTF-8\n"11 15 "Content-Transfer-Encoding: 8bit\n" 12 "X-Poedit-Language: French\n" 13 "X-Poedit-Country: FRANCE\n" 14 "X-Poedit-SourceCharset: utf-8\n" 15 "X-Poedit-KeywordsList: __\n" 16 "X-Poedit-Basepath: ../..\n" 17 "X-Poedit-SearchPath-0: .\n" 18 19 #: _public.php:188 20 #, php-format 16 17 #: _admin.php:22 18 #: inc/class.agora.template.php:161 19 msgid "%d threads" 20 msgstr "%d discussions" 21 22 #: _admin.php:22 23 msgid "%d thread" 24 msgstr "%d discussion" 25 26 #: _admin.php:25 27 msgid "%d messages" 28 msgstr "%d messages" 29 30 #: _admin.php:25 31 msgid "%d message" 32 msgstr "%d message" 33 34 #: _admin.php:30 35 msgid "agora:config" 36 msgstr "agora:config" 37 38 #: _admin.php:35 39 msgid "is an agora member" 40 msgstr "est membre de l'agora" 41 42 #: _admin.php:36 43 msgid "can moderate the agora" 44 msgstr "peut modérer l'agora" 45 46 #: _install.php:55 47 msgid "<p class=\"message\">Welcome to the Agora.</p>" 48 msgstr "<p class=\"message\">Bienvenue dans l'agora.</p>" 49 50 #: _public.php:222 21 51 msgid "The e-mail was sent successfully to %s." 22 msgstr "L 'emaila été envoyé avec succès à %s."23 24 #: _public.php:2 0452 msgstr "Le message a été envoyé avec succès à %s." 53 54 #: _public.php:238 25 55 msgid "Your new password is in your mailbox." 26 msgstr "Votre nouveau mot de passe est dans votre messagerie."27 28 #: _public.php: 27929 #: _public.php: 49656 msgstr "Votre nouveau mot de passe est dans votre boîte à lettres." 57 58 #: _public.php:313 59 #: _public.php:532 30 60 msgid "You must provide a valid email" 31 61 msgstr "Vous devez fournir une adresse email valide" 32 62 33 #: _public.php:284 34 #, php-format 63 #: _public.php:318 35 64 msgid "User \"%s\" already exists." 36 65 msgstr "L'utilisateur \"%s\" existe déjà." 37 66 38 #: _public.php:298 39 #, php-format 67 #: _public.php:333 40 68 msgid "User %s successfully created. You will receive an email to activate your account." 41 msgstr "L'utilisateur %s a été créé avec succès. Vous recevrez un email pour activer votre compte." 42 43 #: _public.php:328 44 #, php-format 69 msgstr "L'utilisateur %s a été créé avec succès. Vous allez recevoir un email pour activer votre compte." 70 71 #: _public.php:363 45 72 msgid "User %s is already registred. You can log in." 46 73 msgstr "L'utilisateur %s est déjà enregistré. Vous pouvez vous connecter." 47 74 48 #: _public.php:336 49 #, php-format 75 #: _public.php:371 50 76 msgid "User %s is now registred. You can now log in." 51 msgstr "L'utilisateur %s est maintenant enregistré. Vous pouvez vous connecter."52 53 #: _public.php:3 4754 #: inc/class.agora.php:1 3277 msgstr "L'utilisateur %s est maintenant enregistré. Vous pouvez désormais vous connecter." 78 79 #: _public.php:382 80 #: inc/class.agora.php:143 55 81 msgid "This is a wrong registration URL. Registration failed." 56 msgstr "C 'est un lien d'enregistrement incorrect. L'enregistrement a échoué."57 58 #: _public.php: 48282 msgstr "Ceci est une mauvaise URL de confirmation. L'enregistrement a échoué." 83 84 #: _public.php:518 59 85 msgid "You must confirm your password" 60 86 msgstr "Vous devez confirmer votre mot de passe" 61 87 62 #: _public.php: 48688 #: _public.php:522 63 89 msgid "Please, check your password. Passwords don't match" 64 msgstr "S'il vous plaît, vérifiez vos mots de passe. Ils ne correspondent pas" 65 66 #: _public.php:513 67 #, php-format 90 msgstr "Veuillez vérifier vos mots de passe. Ils ne correspondent pas" 91 92 #: _public.php:549 68 93 msgid "User %s successfully updated." 69 msgstr "L'utilisateur %s a été mis à jour avec succès." 70 71 #: _admin.php:19 72 #: _admin.php:22 73 #: index.php:64 74 #: index.php:67 94 msgstr "L'utilsateur %s a été mis à jour avec succès" 95 96 #: _public.php:1573 97 #: default-templates/agora.html:26 98 #: default-templates/editmessage.html:26 99 #: default-templates/editpost.html:26 100 #: default-templates/login.html:26 101 #: default-templates/newthread.html:26 102 #: default-templates/place.html:26 103 #: default-templates/profile.html:26 104 #: default-templates/profile_me.html:26 105 #: default-templates/register.html:26 106 #: default-templates/thread.html:26 107 msgid "Home" 108 msgstr "Accueil" 109 110 #: _public.php:1576 111 #: default-templates/newthread.html:9 112 #: default-templates/place.html:53 113 #: index.php:389 114 #: thread.php:38 115 msgid "New thread" 116 msgstr "Nouvelle discussion" 117 118 #: _public.php:1578 119 msgid "Logout" 120 msgstr "Déconnexion" 121 122 #: _public.php:1579 123 #: default-templates/login.html:9 124 #: default-templates/login.html:44 125 #: default-templates/login.html:55 126 msgid "Login" 127 msgstr "Connexion" 128 129 #: _public.php:1580 130 #: default-templates/register.html:9 131 #: default-templates/register.html:44 132 msgid "Register" 133 msgstr "S'enregistrer" 134 135 #: _public.php:1602 136 msgid "Close the thread" 137 msgstr "Fermer la discussion" 138 139 #: _public.php:1603 140 msgid "Open the thread" 141 msgstr "Ouvrir la discussion" 142 143 #: _public.php:1606 144 msgid "Unpin the thread" 145 msgstr "Dépingler la discussion" 146 147 #: _public.php:1607 148 msgid "Pin the thread" 149 msgstr "Épingler la discussion" 150 151 #: _public.php:1811 152 msgid "This agora's threads %s feed" 153 msgstr "Fil des discussions de l'agora" 154 155 #: _public.php:1812 156 msgid "This agora's messages %s feed" 157 msgstr "Fil des messages de l'agora" 158 159 #: _public.php:1823 160 #: default-templates/place.html:59 161 msgid "Threads feed" 162 msgstr "Fil des discussions" 163 164 #: _public.php:1827 165 #: default-templates/place.html:62 166 msgid "Messages feed" 167 msgstr "Fil des messages" 168 169 #: _widgets.php:28 170 msgid "Agora: navigation" 171 msgstr "Agora : navigation" 172 173 #: _widgets.php:29 174 #: _widgets.php:38 175 #: _widgets.php:46 176 #: _widgets.php:55 177 #: _widgets.php:62 178 #: _widgets.php:77 179 #: _widgets.php:93 180 #: thread.php:461 181 msgid "Title:" 182 msgstr "Titre :" 183 184 #: _widgets.php:29 185 msgid "Agora navigation" 186 msgstr "Navigation" 187 188 #: _widgets.php:30 189 #: _widgets.php:39 190 #: _widgets.php:48 191 msgid "Text:" 192 msgstr "Texte :" 193 194 #: _widgets.php:31 195 #: _widgets.php:40 196 #: _widgets.php:49 197 msgid "Button:" 198 msgstr "Bouton :" 199 200 #: _widgets.php:31 201 #: _widgets.php:40 202 #: _widgets.php:49 203 msgid "Disconnect" 204 msgstr "Se déconnecter" 205 206 #: _widgets.php:32 207 #: _widgets.php:41 208 #: _widgets.php:50 209 #: _widgets.php:56 210 #: _widgets.php:71 211 #: _widgets.php:86 212 #: _widgets.php:95 213 msgid "Home page only" 214 msgstr "Page d'accueil uniquement" 215 216 #: _widgets.php:37 217 msgid "Agora: moderation" 218 msgstr "Agora : modération" 219 220 #: _widgets.php:38 221 msgid "Agora moderation" 222 msgstr "Modération de l'agora" 223 224 #: _widgets.php:45 225 msgid "Agora: categories list" 226 msgstr "Agora : liste des catégories" 227 228 #: _widgets.php:46 229 msgid "Agora's sections" 230 msgstr "Sections de l'agora" 231 232 #: _widgets.php:47 233 msgid "With entries counts" 234 msgstr "Afficher le nombre de billets" 235 236 #: _widgets.php:54 237 msgid "Agora: selected threads" 238 msgstr "Agora : discussions sélectionnées" 239 240 #: _widgets.php:55 241 msgid "Selected threads" 242 msgstr "Discussions à retenir" 243 244 #: _widgets.php:61 245 msgid "Agora: last threads" 246 msgstr "Agora : dernières discussions" 247 248 #: _widgets.php:62 249 #: default-templates/profile.html:66 250 #: default-templates/profile_me.html:106 251 msgid "Last threads" 252 msgstr "Dernières discussions" 253 254 #: _widgets.php:64 255 #: _widgets.php:79 256 msgid "Uncategorized" 257 msgstr "Non catégorisé" 258 259 #: _widgets.php:68 260 #: _widgets.php:83 261 #: index.php:405 262 #: thread.php:379 263 msgid "Category:" 264 msgstr "Catégorie :" 265 266 #: _widgets.php:70 267 msgid "Entries limit:" 268 msgstr "Nombre de discussions maximum :" 269 270 #: _widgets.php:76 271 msgid "Agora: last messages" 272 msgstr "Agora : derniers messages" 273 274 #: _widgets.php:77 275 #: default-templates/profile.html:83 276 #: default-templates/profile_me.html:123 277 msgid "Last messages" 278 msgstr "Derniers messages" 279 280 #: _widgets.php:85 281 msgid "Messages limit:" 282 msgstr "Nombre de messages maximum :" 283 284 #: _widgets.php:92 285 msgid "Agora: subscribe links" 286 msgstr "Agora : liens d'abonnement" 287 288 #: _widgets.php:93 289 msgid "Subscribe" 290 msgstr "S'abonner" 291 292 #: _widgets.php:94 293 msgid "Feeds type:" 294 msgstr "Types de fil :" 295 296 #: default-templates/agora.html:9 297 #: default-templates/agora.html:11 298 #: default-templates/agora.html:17 299 #: default-templates/agora.html:50 300 #: default-templates/editmessage.html:9 301 #: default-templates/editmessage.html:11 302 #: default-templates/editmessage.html:17 303 #: default-templates/editmessage.html:52 304 #: default-templates/editpost.html:9 305 #: default-templates/editpost.html:11 306 #: default-templates/editpost.html:17 307 #: default-templates/editpost.html:51 308 #: default-templates/login.html:9 309 #: default-templates/login.html:11 310 #: default-templates/login.html:17 311 #: default-templates/login.html:44 312 #: default-templates/newthread.html:9 313 #: default-templates/newthread.html:11 314 #: default-templates/newthread.html:17 315 #: default-templates/newthread.html:51 316 #: default-templates/place.html:9 317 #: default-templates/place.html:11 318 #: default-templates/place.html:17 319 #: default-templates/place.html:50 320 #: default-templates/profile.html:9 321 #: default-templates/profile.html:11 322 #: default-templates/profile.html:17 323 #: default-templates/profile.html:43 324 #: default-templates/profile_me.html:9 325 #: default-templates/profile_me.html:11 326 #: default-templates/profile_me.html:17 327 #: default-templates/profile_me.html:43 328 #: default-templates/register.html:9 329 #: default-templates/register.html:11 330 #: default-templates/register.html:17 331 #: default-templates/register.html:44 332 #: default-templates/thread.html:9 333 #: default-templates/thread.html:11 334 #: default-templates/thread.html:17 335 #: default-templates/thread.html:51 336 #: options.php:51 337 #: options.php:59 75 338 msgid "Agora" 76 339 msgstr "Agora" 77 340 78 #: _admin.php:27 79 msgid "is an agora member" 80 msgstr "est membre de l'agora" 81 82 #: _admin.php:28 83 msgid "can moderate the agora" 84 msgstr "peut modérer l'agora" 85 86 #: index.php:33 87 msgid "<p class=\"message\">Welcome to the Agora.</p>" 88 msgstr "<p class=\"message\">Bienvenue dans l'Agora.</p>" 89 90 #: index.php:44 341 #: default-templates/agora.html:9 342 #: default-templates/agora.html:17 343 #: default-templates/agora.html:110 344 #: default-templates/newthread.html:9 345 #: default-templates/newthread.html:17 346 #: default-templates/place.html:9 347 #: default-templates/place.html:17 348 #: default-templates/place.html:107 349 #: default-templates/place.html:138 350 msgid "page" 351 msgstr "page" 352 353 #: default-templates/agora.html:27 354 #: default-templates/editmessage.html:27 355 #: default-templates/editpost.html:27 356 #: default-templates/login.html:27 357 #: default-templates/newthread.html:27 358 #: default-templates/place.html:27 359 #: default-templates/thread.html:27 360 msgid "Archives" 361 msgstr "Archives" 362 363 #: default-templates/agora.html:69 364 msgid "Last thread:" 365 msgstr "Dernière discussion :" 366 367 #: default-templates/agora.html:70 368 #: default-templates/agora.html:85 369 #: default-templates/agora.html:99 370 #: default-templates/place.html:95 371 #: default-templates/place.html:127 372 #: default-templates/thread.html:62 373 #: default-templates/thread.html:118 374 msgid "by" 375 msgstr "par" 376 377 #: default-templates/agora.html:84 378 msgid "Last message:" 379 msgstr "Dernier message :" 380 381 #: default-templates/agora.html:99 382 #: default-templates/place.html:95 383 #: default-templates/place.html:127 384 #: default-templates/profile.html:72 385 #: default-templates/profile.html:89 386 #: default-templates/profile_me.html:112 387 #: default-templates/profile_me.html:129 388 #: default-templates/thread.html:62 389 msgid "on" 390 msgstr "le" 391 392 #: default-templates/agora.html:109 393 #: default-templates/place.html:106 394 #: default-templates/place.html:137 395 msgid "previous entries" 396 msgstr "billets précédents" 397 398 #: default-templates/agora.html:110 399 #: default-templates/place.html:107 400 #: default-templates/place.html:138 401 msgid "of" 402 msgstr "de" 403 404 #: default-templates/agora.html:111 405 #: default-templates/place.html:108 406 #: default-templates/place.html:139 407 msgid "next entries" 408 msgstr "billets suivants" 409 410 #: default-templates/editmessage.html:9 411 #: message.php:75 412 #: message.php:255 413 msgid "Edit message" 414 msgstr "Editer le message" 415 416 #: default-templates/editmessage.html:65 417 #: default-templates/editmessage.html:86 418 #: default-templates/editpost.html:67 419 #: default-templates/editpost.html:114 420 msgid "finish" 421 msgstr "terminer" 422 423 #: default-templates/editmessage.html:69 424 msgid "Edit a message" 425 msgstr "Modifier le message" 426 427 #: default-templates/editmessage.html:75 428 #: default-templates/editpost.html:103 429 #: default-templates/newthread.html:99 430 #: default-templates/thread.html:179 431 #: message.php:199 432 msgid "Message" 433 msgstr "Message" 434 435 #: default-templates/editmessage.html:85 436 #: default-templates/editpost.html:113 437 #: default-templates/newthread.html:111 438 #: default-templates/register.html:88 439 #: default-templates/thread.html:191 440 msgid "preview" 441 msgstr "prévisualiser" 442 443 #: default-templates/editpost.html:9 444 #: thread.php:124 445 #: thread.php:374 446 msgid "Edit thread" 447 msgstr "Modifier la discussion" 448 449 #: default-templates/editpost.html:64 450 msgid "Edit the post" 451 msgstr "Modifier la discussion" 452 453 #: default-templates/editpost.html:71 454 msgid "Edit a post" 455 msgstr "Modifier la discussion" 456 457 #: default-templates/editpost.html:78 458 #: default-templates/newthread.html:75 459 msgid "Subject" 460 msgstr "Sujet" 461 462 #: default-templates/editpost.html:86 463 #: default-templates/newthread.html:83 464 #: index.php:61 465 #: index.php:239 466 msgid "Category" 467 msgstr "Catégorie" 468 469 #: default-templates/login.html:61 470 #: default-templates/register.html:68 471 msgid "Username" 472 msgstr "Identifiant" 473 474 #: default-templates/login.html:66 475 msgid "Password" 476 msgstr "Mot de passe" 477 478 #: default-templates/login.html:75 479 #: default-templates/newthread.html:66 480 #: default-templates/newthread.html:112 481 #: default-templates/register.html:58 482 #: default-templates/register.html:89 483 #: default-templates/thread.html:170 484 #: default-templates/thread.html:192 485 msgid "send" 486 msgstr "envoyer" 487 488 #: default-templates/newthread.html:63 489 msgid "Your new thread" 490 msgstr "Votre nouvelle discussion" 491 492 #: default-templates/newthread.html:70 493 msgid "Add a thread" 494 msgstr "Ajouter une discussion" 495 496 #: default-templates/place.html:59 497 msgid "This categorie's threads Atom feed" 498 msgstr "Fil des discussions de cette catégorie" 499 500 #: default-templates/place.html:62 501 msgid "This category's messages Atom feed" 502 msgstr "Fil des messages de cette catégorie" 503 504 #: default-templates/place.html:71 505 msgid "Subcategories" 506 msgstr "Sous-catégories" 507 508 #: default-templates/place.html:86 509 msgid "Announcements" 510 msgstr "Annonces" 511 512 #: default-templates/place.html:119 513 #: index.php:374 514 #: index.php:388 515 #: thread.php:287 516 #: thread.php:335 517 msgid "Threads" 518 msgstr "Discussions" 519 520 #: default-templates/profile.html:9 521 #: default-templates/profile_me.html:9 522 #: default-templates/profile_me.html:43 523 msgid "Profile" 524 msgstr "Profil" 525 526 #: default-templates/profile.html:43 527 msgid "profile" 528 msgstr "profil" 529 530 #: default-templates/profile.html:49 531 #: default-templates/profile_me.html:60 532 msgid "Name or nickname" 533 msgstr "Nom ou pseudo" 534 535 #: default-templates/profile.html:52 536 #: default-templates/profile_me.html:70 537 msgid "Website" 538 msgstr "Site web" 539 540 #: default-templates/profile.html:55 541 #: default-templates/profile_me.html:85 542 msgid "Creation date" 543 msgstr "Date de création" 544 545 #: default-templates/profile.html:58 546 #: default-templates/profile_me.html:89 547 msgid "Update date" 548 msgstr "Date de mise à jour" 549 550 #: default-templates/profile_me.html:54 551 msgid "My informations" 552 msgstr "Mes informations" 553 554 #: default-templates/profile_me.html:65 555 #: default-templates/register.html:73 556 msgid "Email address" 557 msgstr "Adresse email" 558 559 #: default-templates/profile_me.html:75 560 msgid "New password" 561 msgstr "Nouveau mot de passe" 562 563 #: default-templates/profile_me.html:80 564 msgid "Confirm password" 565 msgstr "Confirmer le mot de passe" 566 567 #: default-templates/profile_me.html:99 568 #: message.php:293 569 #: thread.php:480 570 msgid "save" 571 msgstr "enregistrer" 572 573 #: default-templates/register.html:55 574 msgid "Your infos" 575 msgstr "Vos infos" 576 577 #: default-templates/register.html:62 578 msgid "Register an account" 579 msgstr "Enregister un compte" 580 581 #: default-templates/register.html:81 582 msgid "Username must contain at least 2 characters using letters, numbers or symbols." 583 msgstr "L'identifiant doit contenir au moins 2 caractères parmi lettres, chiffres et symbôles." 584 585 #: default-templates/thread.html:63 586 msgid "Permalink" 587 msgstr "Lien permanent" 588 589 #: default-templates/thread.html:65 590 #: default-templates/thread.html:120 591 msgid "edit" 592 msgstr "modifier" 593 594 #: default-templates/thread.html:66 595 #: default-templates/thread.html:121 596 #: message.php:295 597 #: messages.php:105 598 #: thread.php:482 599 #: thread.php:522 600 msgid "delete" 601 msgstr "supprimer" 602 603 #: default-templates/thread.html:83 604 #: thread.php:419 605 msgid "Attachments" 606 msgstr "Pièces jointes" 607 608 #: default-templates/thread.html:117 609 msgid "On" 610 msgstr "Le" 611 612 #: default-templates/thread.html:150 613 msgid "Status of thread has been modified." 614 msgstr "Le status des messages a été modifié" 615 616 #: default-templates/thread.html:166 617 msgid "Your answer" 618 msgstr "Votre réponse" 619 620 #: default-templates/thread.html:174 621 msgid "Add a message" 622 msgstr "Ajouter un message" 623 624 #: default-templates/thread.html:198 625 msgid "This thread's messages Atom feed" 626 msgstr "Fil Atom des messages de cette dicussion" 627 628 #: default-templates/thread.html:198 629 msgid "This thread's messages feed" 630 msgstr "Fil des messages de cette discussion" 631 632 #: default-templates/thread.html:201 633 msgid "Thread closed" 634 msgstr "Discussion close" 635 636 #: inc/class.agora.log.php:106 637 #: inc/class.agora.log.php:112 638 #: inc/class.agora.log.php:134 639 msgid "No such log ID" 640 msgstr "Aucun log ID" 641 642 #: inc/class.agora.log.php:146 643 msgid "No log message" 644 msgstr "Aucun message log" 645 646 #: inc/class.agora.php:25 647 #: inc/class.agora.php:30 648 #: index.php:108 649 #: lib/admin.messages.pager.php:86 650 #: message.php:342 651 #: thread.php:585 652 msgid "pending" 653 msgstr "en attente" 654 655 #: inc/class.agora.php:26 656 msgid "suspended" 657 msgstr "suspendu" 658 659 #: inc/class.agora.php:27 660 msgid "active" 661 msgstr "actif" 662 663 #: inc/class.agora.php:29 664 #: lib/admin.messages.pager.php:89 665 #: message.php:345 666 #: thread.php:588 667 msgid "junk" 668 msgstr "indésirable" 669 670 #: inc/class.agora.php:31 671 #: index.php:102 672 #: lib/admin.messages.pager.php:83 673 #: message.php:339 674 #: thread.php:582 675 msgid "unpublished" 676 msgstr "non publié" 677 678 #: inc/class.agora.php:32 679 #: index.php:99 680 #: lib/admin.messages.pager.php:80 681 #: message.php:336 682 #: thread.php:579 683 msgid "published" 684 msgstr "publié" 685 686 #: inc/class.agora.php:162 687 msgid "Cannot login. Empty password." 688 msgstr "Connexion impossible. Mot de passe vide." 689 690 #: inc/class.agora.php:167 691 msgid "Cannot login. Check." 692 msgstr "Connexion impossible. Vérifiez." 693 694 #: inc/class.agora.php:171 695 msgid "User is not a member of forum" 696 msgstr "L'utilisateur n'est pas membre de l'agora" 697 698 #: inc/class.agora.php:206 699 msgid "Account confirmation request on Agora" 700 msgstr "Confirmation de création compte pour l'Agora" 701 702 #: inc/class.agora.php:208 703 msgid "Welcome to the forum of %s" 704 msgstr "Bienvenue sur le forum de %s" 705 706 #: inc/class.agora.php:209 707 msgid "To activate your account and verify your e-mail address, please click on the following link:" 708 msgstr "Pour activer le compte, vérifiez votre adresse email, cliquez sur le lien suivant :" 709 710 #: inc/class.agora.php:213 711 msgid "Your indormations:" 712 msgstr "Vos informations :" 713 714 #: inc/class.agora.php:214 715 msgid "Login: %s" 716 msgstr "Identifiant : %s" 717 718 #: inc/class.agora.php:215 719 msgid "Password: %s" 720 msgstr "Mot de passe : %s" 721 722 #: inc/class.agora.php:218 723 msgid "If you have received this mail in error, you do not need to take any action to cancel the account." 724 msgstr "SI vous avez reçu cet email par erreur, il n'est pas nécessaire d'annuler le compte." 725 726 #: inc/class.agora.php:219 727 msgid "The account will not be activated, and you will not receive any further emails." 728 msgstr "Le compte ne sera pas activé et vous ne recevrez pas d'autre emails." 729 730 #: inc/class.agora.php:220 731 msgid "If clicking the link above does not work, copy and paste the URL in a new browser window instead." 732 msgstr "Si le clic sur le lien ci-dessous ne fonctionne pas, copier et coller l'URL dans un navigateur." 733 734 #: inc/class.agora.php:222 735 msgid "Thank you for particape to our agora." 736 msgstr "Merci de participer à notre agora." 737 738 #: inc/class.agora.php:224 739 msgid "This is a post-only mailing. Replies to this message are not monitored or answered." 740 msgstr "Ce message est issu d'une boite email générique. Les réponses ne sont ni regardées ni répondues." 741 742 #: inc/class.agora.php:353 743 msgid "You are not allowed to close this thread" 744 msgstr "Vous n'êtes pas autorisé à clôre la discussion." 745 746 #: inc/class.agora.php:371 747 msgid "You are not allowed to mark this entry as closed" 748 msgstr "Vous n'êtes pas autorisé à marquer la discussion comme close" 749 750 #: inc/class.agora.php:606 751 msgid "You are not allowed to create an message" 752 msgstr "Vous n'êtes pas autorisé à créer un message" 753 754 #: inc/class.agora.php:650 755 msgid "You are not allowed to update comments" 756 msgstr "Vous n'êtes pas autorisé à modifier des commentaires" 757 758 #: inc/class.agora.php:656 759 #: inc/class.agora.php:662 760 #: inc/class.agora.php:745 761 msgid "No such message ID" 762 msgstr "Aucun message avec cet ID" 763 764 #: inc/class.agora.php:669 765 msgid "You are not allowed to update this message" 766 msgstr "Vous n'êtes pas autorisé à mettre à jour ce message" 767 768 #: inc/class.agora.php:698 769 msgid "You are not allowed to change this message's status" 770 msgstr "Vous n'êtes pas autorisé à changer l'état des messages" 771 772 #: inc/class.agora.php:720 773 msgid "You are not allowed to change this entry status" 774 msgstr "Vous n'êtes pas autorisé à modifier l'état de cette discussion" 775 776 #: inc/class.agora.php:739 777 msgid "You are not allowed to delete messages" 778 msgstr "Vous n'êtes pas autorisé à supprimer ce message" 779 780 #: inc/class.agora.php:761 781 msgid "You are not allowed to delete this comment" 782 msgstr "Vous n'êtes pas autorisé à supprimer ce message" 783 784 #: inc/class.agora.php:776 785 msgid "No message content" 786 msgstr "Aucun contenu pour le message" 787 788 #: inc/class.agora.php:788 789 msgid "No message content xhtml" 790 msgstr "Aucun contenu xhtml pour le message" 791 792 #: inc/class.agora.template.php:159 793 msgid "no thread" 794 msgstr "aucune discussion" 795 796 #: inc/class.agora.template.php:160 797 msgid "one thread" 798 msgstr "une discussion" 799 800 #: inc/class.agora.template.php:192 801 msgid "no answer" 802 msgstr "aucune réponse" 803 804 #: inc/class.agora.template.php:193 805 msgid "one answer" 806 msgstr "une réponse" 807 808 #: inc/class.agora.template.php:194 809 msgid "%d answers" 810 msgstr "%d réponses" 811 812 #: index.php:48 813 msgid "No thread" 814 msgstr "Aucune discussion" 815 816 #: index.php:59 817 #: index.php:238 818 #: lib/admin.messages.pager.php:30 819 msgid "Title" 820 msgstr "Titre" 821 822 #: index.php:60 823 #: index.php:237 824 #: lib/admin.messages.pager.php:31 825 #: message.php:323 826 #: messages.php:33 827 #: thread.php:566 828 msgid "Date" 829 msgstr "Date" 830 831 #: index.php:62 832 #: index.php:240 833 #: lib/admin.messages.pager.php:32 834 #: message.php:322 835 #: messages.php:35 836 #: thread.php:565 837 msgid "Author" 838 msgstr "Auteur" 839 840 #: index.php:63 841 #: message.php:240 842 #: messages.php:124 843 #: messages.php:145 844 #: thread.php:528 845 #: thread.php:535 846 msgid "Messages" 847 msgstr "Messages" 848 849 #: index.php:64 850 #: index.php:241 851 #: index.php:255 852 #: lib/admin.messages.pager.php:33 853 #: message.php:325 854 #: messages.php:36 855 #: thread.php:568 856 msgid "Status" 857 msgstr "État" 858 859 #: index.php:71 860 #: index.php:84 861 #: lib/admin.messages.pager.php:41 862 #: lib/admin.messages.pager.php:54 863 msgid "Page(s)" 864 msgstr "Page(s)" 865 866 #: index.php:105 867 msgid "scheduled" 868 msgstr "programmé" 869 870 #: index.php:115 871 msgid "None" 872 msgstr "Aucun" 873 874 #: index.php:120 875 msgid "protected" 876 msgstr "protégé" 877 878 #: index.php:125 879 #: index.php:221 880 msgid "selected" 881 msgstr "sélectionné" 882 883 #: index.php:131 884 msgid "%d attachment" 885 msgstr "%d annexe" 886 887 #: index.php:131 888 msgid "%d attachments" 889 msgstr "%d annexes" 890 891 #: index.php:143 892 #: lib/admin.messages.pager.php:103 893 #: message.php:356 894 #: thread.php:599 895 msgid "%Y-%m-%d %H:%M" 896 msgstr "%Y-%m-%d %H:%M" 897 898 #: index.php:222 899 msgid "not selected" 900 msgstr "non sélectionné" 901 902 #: index.php:242 903 msgid "Selected" 904 msgstr "Sélectionné" 905 906 #: index.php:246 907 #: messages.php:40 908 msgid "Descending" 909 msgstr "Décroissant" 910 911 #: index.php:247 912 #: messages.php:41 913 msgid "Ascending" 914 msgstr "Croissant" 915 916 #: index.php:256 917 msgid "Publish" 918 msgstr "Publier" 919 920 #: index.php:257 921 msgid "Unpublish" 922 msgstr "Hors ligne" 923 924 #: index.php:258 925 msgid "Schedule" 926 msgstr "Programmer" 927 928 #: index.php:259 929 msgid "Mark as pending" 930 msgstr "En attente" 931 932 #: index.php:262 933 msgid "Mark" 934 msgstr "Marquer" 935 936 #: index.php:263 937 msgid "Mark as selected" 938 msgstr "Sélectionné" 939 940 #: index.php:264 941 msgid "Mark as unselected" 942 msgstr "Non sélectionné" 943 944 #: index.php:266 945 #: index.php:269 946 #: index.php:269 947 msgid "Change" 948 msgstr "Changer" 949 950 #: index.php:266 951 msgid "Change category" 952 msgstr "Changer la catégorie" 953 954 #: index.php:270 955 msgid "Change author" 956 msgstr "Changer l'auteur" 957 958 #: index.php:274 959 #: index.php:274 960 msgid "Delete" 961 msgstr "Supprimer" 962 963 #: index.php:382 964 msgid "Are you sure you want to delete selected threads?" 965 msgstr "Êtes-vous sûr de vouloir supprimer les discussions sélectionnées" 966 967 #: index.php:395 968 #: index.php:400 969 #: messages.php:152 970 #: messages.php:157 971 msgid "Filters" 972 msgstr "Filtres" 973 974 #: index.php:403 975 #: messages.php:177 976 msgid "Author:" 977 msgstr "Auteur :" 978 979 #: index.php:407 980 #: messages.php:160 981 msgid "Status:" 982 msgstr "État :" 983 984 #: index.php:412 985 msgid "Selected:" 986 msgstr "Sélectionné :" 987 988 #: index.php:414 989 msgid "Month:" 990 msgstr "Mois :" 991 992 #: index.php:416 993 msgid "Lang:" 994 msgstr "Langue :" 995 996 #: index.php:421 997 #: messages.php:168 998 msgid "Order by:" 999 msgstr "Trier par :" 1000 1001 #: index.php:423 1002 #: messages.php:171 1003 msgid "Sort:" 1004 msgstr "Trier :" 1005 1006 #: index.php:426 1007 msgid "Entries per page" 1008 msgstr "Billets par page" 1009 1010 #: index.php:428 1011 #: messages.php:182 1012 msgid "filter" 1013 msgstr "filtre" 1014 1015 #: index.php:444 1016 msgid "Selected threads action:" 1017 msgstr "Action sur les discussions sélectionnées :" 1018 1019 #: index.php:446 1020 #: messages.php:213 1021 #: thread.php:551 1022 msgid "ok" 1023 msgstr "ok" 1024 1025 #: lib/admin.messages.pager.php:19 1026 #: thread.php:539 1027 msgid "No message" 1028 msgstr "Aucun message" 1029 1030 #: lib/admin.messages.pager.php:107 1031 #: message.php:360 1032 #: thread.php:603 1033 msgid "Edit this message" 1034 msgstr "Modifier ce message" 1035 1036 #: message.php:26 1037 msgid "New message" 1038 msgstr "Nouveau message" 1039 1040 #: message.php:62 1041 msgid "This message does not exist." 1042 msgstr "Ce message n'existe pas." 1043 1044 #: message.php:202 1045 msgid "Are you sure you want to delete this message?" 1046 msgstr "Êtes-vous sûr de vouloir supprimer les messages sélectionnés" 1047 1048 #: message.php:224 1049 msgid "Message has been successfully updated." 1050 msgstr "Le message a été mis à jour avec succès." 1051 1052 #: message.php:227 1053 msgid "Message has been successfully created." 1054 msgstr "Le message a été créé avec succès." 1055 1056 #: message.php:236 1057 msgid "Don't forget to validate your XHTML conversion by saving your message." 1058 msgstr "Enregistrez votre message pour valider la transformation en XHTML." 1059 1060 #: message.php:260 1061 msgid "Message status:" 1062 msgstr "État du message :" 1063 1064 #: message.php:264 1065 #: thread.php:387 1066 msgid "Published on:" 1067 msgstr "Publié le :" 1068 1069 #: message.php:267 1070 #: thread.php:390 1071 msgid "Text formating:" 1072 msgstr "Format du texte :" 1073 1074 #: message.php:269 1075 #: thread.php:392 1076 msgid "Convert to XHTML" 1077 msgstr "Convertir en XHTML" 1078 1079 #: message.php:282 1080 #: options.php:82 1081 #: thread.php:461 1082 #: thread.php:469 1083 msgid "Required field" 1084 msgstr "Champ obligatoire" 1085 1086 #: message.php:283 1087 #: thread.php:470 1088 msgid "Content:" 1089 msgstr "Contenu :" 1090 1091 #: message.php:324 1092 #: thread.php:567 1093 msgid "IP address" 1094 msgstr "Adresse IP" 1095 1096 #: messages.php:34 1097 msgid "Entry title" 1098 msgstr "Titre du billet" 1099 1100 #: messages.php:98 1101 #: thread.php:514 1102 msgid "publish" 1103 msgstr "publier" 1104 1105 #: messages.php:99 1106 #: thread.php:515 1107 msgid "unpublish" 1108 msgstr "hors ligne" 1109 1110 #: messages.php:100 1111 #: thread.php:516 1112 msgid "mark as pending" 1113 msgstr "en attente" 1114 1115 #: messages.php:101 1116 #: thread.php:517 1117 msgid "mark as junk" 1118 msgstr "indésirable" 1119 1120 #: messages.php:139 1121 msgid "Are you sure you want to delete these messages?" 1122 msgstr "Êtes-vous sûr de vouloir supprimer les messages sélectionnés" 1123 1124 #: messages.php:164 1125 msgid "Messages per page" 1126 msgstr "Messages par page" 1127 1128 #: messages.php:193 1129 msgid "You have one spam message." 1130 msgstr "Vous avez un message spam." 1131 1132 #: messages.php:194 1133 msgid "Show it." 1134 msgstr "L'afficher" 1135 1136 #: messages.php:196 1137 msgid "You have %s spam messages." 1138 msgstr "Vous avez %s messages spam." 1139 1140 #: messages.php:197 1141 msgid "Show them." 1142 msgstr "Les afficher." 1143 1144 #: messages.php:210 1145 #: thread.php:547 1146 msgid "Selected messages action:" 1147 msgstr "Action pour les messages sélectionnés" 1148 1149 #: messages_actions.php:93 1150 msgid "back" 1151 msgstr "retour" 1152 1153 #: options.php:30 91 1154 msgid "No agora announce." 92 msgstr "Aucune annonce pour l' Agora"93 94 #: index.php:531155 msgstr "Aucune annonce pour l'agora" 1156 1157 #: options.php:40 95 1158 msgid "Configuration successfully updated." 96 msgstr " La configuration a étémise à jour avec succès."97 98 #: index.php:761159 msgstr "Configuration mise à jour avec succès." 1160 1161 #: options.php:68 99 1162 msgid "Plugin activation" 100 1163 msgstr "Activation de l'extension" 101 1164 102 #: index.php:811165 #: options.php:73 103 1166 msgid "Enable Agora" 104 1167 msgstr "Activer Agora" 105 1168 106 #: index.php:881169 #: options.php:80 107 1170 msgid "Presentation options" 108 1171 msgstr "Options de présentation" 109 1172 110 #: index.php:89 111 msgid "Required field" 112 msgstr "Champ obligatoire" 113 114 #: index.php:90 1173 #: options.php:83 115 1174 msgid "Agora announce:" 116 msgstr "Connexion à l'Agora :" 117 118 #: index.php:97 1175 msgstr "Annonce de l'Agora" 1176 1177 #: options.php:93 1178 msgid "Display %s messages per feed" 1179 msgstr "Afficher %s messages par fil" 1180 1181 #: options.php:104 119 1182 msgid "Save configuration" 120 1183 msgstr "Enregistrer la configuration" 121 1184 122 #: inc/class.agora.php:23 123 msgid "pending" 124 msgstr "en attente" 125 126 #: inc/class.agora.php:24 127 msgid "suspended" 128 msgstr "suspendu" 129 130 #: inc/class.agora.php:25 131 msgid "active" 132 msgstr "actif" 133 134 #: inc/class.agora.php:151 135 msgid "Cannot login. Check." 136 msgstr "Mauvais login. Vérifier." 137 138 #: inc/class.agora.php:155 139 msgid "User is not a member of forum" 140 msgstr "Cet utilisateur n'est pas membre de l'agora" 141 142 #: inc/class.agora.php:190 143 msgid "Account confirmation request on Agora" 144 msgstr "Demande de compte pour l'agora" 145 146 #: inc/class.agora.php:192 147 #, php-format 148 msgid "Welcome to the forum of %s" 149 msgstr "Bienvenue sur le forum de %s" 150 151 #: inc/class.agora.php:193 152 msgid "To activate your account and verify your e-mail address, please click on the following link:" 153 msgstr "Pour activer votre compte et vérifier votre adresse email, cliquez sur le lien suivant :" 154 155 #: inc/class.agora.php:197 156 msgid "Your indormations:" 157 msgstr "Vos informations :" 158 159 #: inc/class.agora.php:198 160 #, php-format 161 msgid "Login: %s" 162 msgstr "Utilisateur : %s" 163 164 #: inc/class.agora.php:199 165 #, php-format 166 msgid "Password: %s" 167 msgstr "Mot de passe : %s" 168 169 #: inc/class.agora.php:200 1185 #: thread.php:80 1186 #: thread.php:83 1187 #: thread.php:86 1188 msgid "Most used" 1189 msgstr "Plus utilisées" 1190 1191 #: thread.php:80 1192 #: thread.php:84 1193 msgid "Available" 1194 msgstr "Disponible" 1195 1196 #: thread.php:103 1197 msgid "This thread does not exist." 1198 msgstr "Cette discussion n'existe pas." 1199 1200 #: thread.php:134 1201 msgid "next thread" 1202 msgstr "discussion suivante" 1203 1204 #: thread.php:141 1205 msgid "previous thread" 1206 msgstr "discussion précédente" 1207 1208 #: thread.php:290 1209 msgid "Are you sure you want to delete this thread?" 1210 msgstr "Êtes-vous sûr de vouloir supprimer cette discussion ?" 1211 1212 #: thread.php:312 1213 msgid "Thread has been successfully updated." 1214 msgstr "La discusssion a été mise à jour avec succès." 1215 1216 #: thread.php:315 1217 msgid "Thread has been successfully created." 1218 msgstr "La discussion a été créée avec succès." 1219 1220 #: thread.php:318 1221 msgid "File has been successfully attached." 1222 msgstr "Fichier attaché avec succès." 1223 1224 #: thread.php:321 1225 msgid "Attachment has been successfully removed." 1226 msgstr "Pièce jointe retirée avec succès." 1227 1228 #: thread.php:331 1229 msgid "Don't forget to validate your XHTML conversion by saving your post." 1230 msgstr "Enregistrez votre billet pour valider la transformation en XHTML." 1231 1232 #: thread.php:338 1233 msgid "View thread" 1234 msgstr "Visualiser la discussion" 1235 1236 #: thread.php:345 1237 msgid "Preview thread" 1238 msgstr "Prévisualier la discussion" 1239 1240 #: thread.php:383 1241 msgid "Thread status:" 1242 msgstr "État de la discussion :" 1243 1244 #: thread.php:396 1245 msgid "Accept messages" 1246 msgstr "Accepter les messages" 1247 1248 #: thread.php:398 1249 msgid "Selected thread" 1250 msgstr "Discussion sélectionnée" 1251 1252 #: thread.php:400 1253 msgid "Thread lang:" 1254 msgstr "Langue de la discussion :" 1255 1256 #: thread.php:403 1257 msgid "Thread password:" 1258 msgstr "Mot de passe de la discussion :" 1259 1260 #: thread.php:408 1261 msgid "Basename:" 1262 msgstr "URL spécifique :" 1263 1264 #: thread.php:412 1265 msgid "Warning: If you set the URL manually, it may conflict with another thread." 1266 msgstr "Attention : si vous indiquez l'URL manuellement, celle-ci peut entrer en conflit avec une autre discussion." 1267 1268 #: thread.php:435 1269 msgid "open" 1270 msgstr "ouvrir" 1271 1272 #: thread.php:439 1273 msgid "remove" 1274 msgstr "supprimer" 1275 1276 #: thread.php:448 1277 msgid "No attachment." 1278 msgstr "Aucune pièce jointe" 1279 1280 #: thread.php:450 1281 msgid "Add files to this page" 1282 msgstr "Ajouter un fichier à la page" 1283 1284 #: thread.php:465 1285 msgid "Excerpt:" 1286 msgstr "Extrait :" 1287 1288 msgid "Forum" 1289 msgstr "Forum" 1290 170 1291 msgid "Agora connection:" 171 1292 msgstr "Connexion à l'Agora :" 172 1293 173 #: inc/class.agora.php:203 174 msgid "If you have received this mail in error, you do not need to take any action to cancel the account." 175 msgstr "" 176 177 #: inc/class.agora.php:204 178 msgid "The account will not be activated, and you will not receive any further emails." 179 msgstr "" 180 181 #: inc/class.agora.php:205 182 msgid "If clicking the link above does not work, copy and paste the URL in a new browser window instead." 183 msgstr "" 184 185 #: inc/class.agora.php:207 186 msgid "Thank you for particape to our agora." 187 msgstr "" 188 189 #: inc/class.agora.php:209 190 msgid "This is a post-only mailing. Replies to this message are not monitored or answered." 191 msgstr "" 192 193 #: inc/class.agora.php:725 194 msgid "You are not allowed to close this thread" 195 msgstr "" 196 197 #: inc/class.agora.php:743 198 msgid "You are not allowed to mark this entry as closed" 199 msgstr "" 200 201 #: inc/class.agora.template.php:339 202 msgid "no thread" 203 msgstr "aucun sujet" 204 205 #: inc/class.agora.template.php:340 206 msgid "one thread" 207 msgstr "un sujet" 208 209 #: inc/class.agora.template.php:341 210 #, php-format 211 msgid "%d threads" 212 msgstr "%d sujets" 213 214 #: inc/class.agora.template.php:372 215 msgid "no answer" 216 msgstr "aucune réponse" 217 218 #: inc/class.agora.template.php:373 219 msgid "one answer" 220 msgstr "une réponse" 221 222 #: inc/class.agora.template.php:374 223 #, php-format 224 msgid "%d answers" 225 msgstr "%d réponses" 226 227 #: inc/class.agora.log.php:105 228 #: inc/class.agora.log.php:111 229 #: inc/class.agora.log.php:133 230 msgid "No such log ID" 231 msgstr "" 232 233 #: inc/class.agora.log.php:145 234 msgid "No log message" 235 msgstr "" 236 237 #, fuzzy 238 #~ msgid "Login succesfull. You will be redirected automatically to the %s" 239 #~ msgstr "Connexion réussie. Se rendre à l' %s" 240 1294 msgid "no message" 1295 msgstr "aucun message" 1296 1297 msgid "one message" 1298 msgstr "un message" 1299
Note: See TracChangeset
for help on using the changeset viewer.