Dotclear

Changeset 2141


Ignore:
Timestamp:
03/29/10 08:41:20 (14 years ago)
Author:
Osku
Message:

Plugin agora version 0.5.3 : long time ago since last commit :) ~ please test massively

  • post_type change from threadpost to thread .
  • admin available: manage threads and messages.
  • new widgets: last threads, selected threads, last messages, subscribe, navigation, etc.
  • Thread can be created without category.
  • i18n: french available.
  • fixes

Thank you to report anything

Location:
plugins/agora
Files:
15 added
4 deleted
25 edited

Legend:

Unmodified
Added
Removed
  • plugins/agora/_admin.php

    r1885 r2141  
    44# This file is part of agora, a plugin for Dotclear 2. 
    55#  
    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. 
    89# A copy of this license is available in LICENSE file or at 
    910# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 
     
    1718function agora_dashboard($core,$icons) 
    1819{ 
    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&amp;act=messages">'.sprintf($str_messages,$message_count); 
    2028} 
    2129 
    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&amp;act=options','index.php?pf=agora/icon-small.png', 
    2432          preg_match('/plugin.php\?p=agora(&.*)?$/',$_SERVER['REQUEST_URI']), 
    2533          $core->auth->check('admin',$core->blog->id)); 
     
    2836$core->auth->setPermissionType('moderator',__('can moderate the agora')); 
    2937 
     38# Rest methods 
     39$core->rest->addFunction('getMessageById',array('agoraRestMethods','getMessageById')); 
     40 
     41class 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} 
    3091?> 
  • plugins/agora/_define.php

    r1864 r2141  
    44# This file is part of agora, a plugin for Dotclear 2. 
    55#  
    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. 
    89# A copy of this license is available in LICENSE file or at 
    910# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 
     
    1516$this->registerModule( 
    1617     /* Name */          "Agora", 
    17      /* Description*/    "It is not a forum but almost", 
     18     /* Description*/    "Stuff to build a forum", 
    1819     /* Author */        "Osku, Tomtom (http://blog.zenstyle.fr) and contributors", 
    19      /* Version */       '0.5trunk', 
     20     /* Version */       '0.5.3', 
    2021     /* Permissions */   'admin' 
    2122); 
  • plugins/agora/_install.php

    r1864 r2141  
    44# This file is part of agora, a plugin for Dotclear 2. 
    55#  
    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. 
    89# A copy of this license is available in LICENSE file or at 
    910# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 
     
    2829     ->message_dt             ('timestamp',  0,   false,    'now()') 
    2930     ->message_tz             ('varchar',    128, false,    "'UTC'") 
     31     ->message_creadt         ('timestamp',  0,   false,    'now()') 
    3032     ->message_upddt          ('timestamp',  0,   false,    'now()') 
    3133     ->message_format         ('varchar',    32,  false,    "'xhtml'") 
     
    4850$changes = $si->synchronize($s); 
    4951 
     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 
    5058$core->setVersion('agora',$version); 
    5159return true; 
  • plugins/agora/_prepend.php

    r1882 r2141  
    44# This file is part of agora, a plugin for Dotclear 2. 
    55#  
    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. 
    89# A copy of this license is available in LICENSE file or at 
    910# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 
     
    1617if ($core->blog->settings->agora_flag) 
    1718{ 
    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')); 
    2224     //$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')); 
    3133     //$core->url->register('userlist','agora/userlist','^agora/userlist/(.+)$',array('urlAgora','userlist')); 
    3234     //$core->url->register('recovery','agora/recovery','^agora/recovery(.*)$',array('urlAgora','recovery')); 
    33      $core->url->register('agofeed','agora/feed','^agora/feed/(.+)$',array('urlAgora','feed')); 
     35     $core->url->register('agora_feed','feed/agora','^feed/agora/(.+)$',array('urlAgora','feed')); 
    3436} 
    3537 
    36 $core->setPostType('threadpost','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'); 
    3739 
    3840$__autoload['agora']               = dirname(__FILE__).'/inc/class.agora.php'; 
     
    4547$__autoload['rsExtMessage']        = dirname(__FILE__).'/inc/class.rs.agora.php'; 
    4648 
     49$core->blog->agora = new agora($core,false); 
    4750?> 
  • plugins/agora/_public.php

    r1882 r2141  
    44# This file is part of agora, a plugin for Dotclear 2. 
    55#  
    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. 
    89# A copy of this license is available in LICENSE file or at 
    910# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 
     
    2021 
    2122// URLs 
    22 $core->tpl->addValue('forumURL',array('agoraTemplate','forumURL')); 
     23$core->tpl->addValue('agoraURL',array('agoraTemplate','agoraURL')); 
    2324$core->tpl->addValue('registerURL',array('agoraTemplate','registerURL')); 
    2425$core->tpl->addValue('loginURL',array('agoraTemplate','loginURL')); 
     
    2627$core->tpl->addValue('logoutURL',array('agoraTemplate','logoutURL')); 
    2728$core->tpl->addValue('AgoraFeedURL',array('agoraTemplate','AgoraFeedURL')); 
    28 $core->tpl->addValue('SubforumFeedURL',array('agoraTemplate','SubforumFeedURL')); 
     29$core->tpl->addValue('placeFeedURL',array('agoraTemplate','placeFeedURL')); 
    2930 
    3031 
     
    3435$core->tpl->addValue('RegisterPreviewEmail',array('agoraTemplate','RegisterPreviewEmail')); 
    3536 
    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')); 
    4645 
    4746// Pagination plus (getMessages) 
     
    5554//$core->tpl->addBlock('ForumEntries',array('agoraTemplate','ForumEntries')); 
    5655$core->tpl->addValue('EntryIfClosed',array('agoraTemplate','EntryIfClosed')); 
    57 $core->tpl->addValue('ThreadAnswersCount',array('agoraTemplate','ThreadAnswersCount')); 
     56$core->tpl->addValue('EntryMessageCount',array('agoraTemplate','EntryMessageCount')); 
    5857$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 
    6060$core->tpl->addBlock('IfThreadPreview',array('agoraTemplate','IfThreadPreview')); 
    6161$core->tpl->addValue('ThreadPreviewTitle',array('agoraTemplate','ThreadPreviewTitle')); 
    6262$core->tpl->addValue('ThreadPreviewContent',array('agoraTemplate','ThreadPreviewContent')); 
    63 $core->tpl->addValue('ThreadURL',array('agoraTemplate','ThreadURL')); 
     63//$core->tpl->addValue('ThreadURL',array('agoraTemplate','ThreadURL')); 
    6464$core->tpl->addValue('ThreadCategoryURL',array('agoraTemplate','ThreadCategoryURL')); 
    65 $core->tpl->addValue('AnswerThreadURL',array('agoraTemplate','AnswerThreadURL')); 
     65$core->tpl->addValue('MessageThreadURL',array('agoraTemplate','MessageThreadURL')); 
    6666$core->tpl->addValue('ThreadProfileUserID',array('agoraTemplate','ThreadProfileUserID')); 
    6767$core->tpl->addBlock('ThreadComboSelected',array('agoraTemplate','ThreadComboSelected')); 
     
    9595$core->tpl->addValue('MessageOrderNumber',array('agoraTemplate','MessageOrderNumber')); 
    9696$core->tpl->addValue('MessageAuthorID',array('agoraTemplate','MessageAuthorID')); 
    97 $core->tpl->addValue('MessageAuthor',array('agoraTemplate','MessageAuthor')); 
     97$core->tpl->addValue('MessageAuthorCommonName',array('agoraTemplate','MessageAuthorCommonName')); 
    9898$core->tpl->addValue('MessageDate',array('agoraTemplate','MessageDate')); 
    9999$core->tpl->addValue('MessageTime',array('agoraTemplate','MessageTime')); 
     
    102102$core->tpl->addValue('MessageEditContent',array('agoraTemplate','MessageEditContent')); 
    103103$core->tpl->addValue('MessageProfileUserID',array('agoraTemplate','MessageProfileUserID')); 
     104$core->tpl->addValue('MessageEntryTitle',array('agoraTemplate','MessageEntryTitle')); 
     105$core->tpl->addValue('MessageFeedID',array('agoraTemplate','MessageFeedID')); 
    104106//$core->tpl->addValue('',array('agoraTemplate','')); 
    105107//$core->tpl->addValue('',array('agoraTemplate','')); 
     
    262264          $_ctx->agora_register['pwd'] = ''; 
    263265           
    264           $url = $core->blog->url.$core->url->getBase("forum"); 
     266          $url = $core->blog->url.$core->url->getBase("agora"); 
    265267           
    266268          $register = isset($_POST['ru_login']) && isset($_POST['ru_email']); 
     
    325327                         $core->callBehavior('publicAfterUserCreate',$cur,$user_id); 
    326328                          
     329                         header('Content-Type: text/html; charset=UTF-8'); 
    327330                         http::head(201,'Created'); 
    328331                         header('Content-Type: text/html'); 
     
    471474          { 
    472475               $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()) { 
    475479                    self::p404(); 
    476480               } 
     
    478482               $_ctx->profile_user = new ArrayObject(); 
    479483                
    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; 
    484488               $_ctx->profile_user['pwd'] = ''; 
    485489               $_ctx->profile_user['msg'] = ''; 
     
    574578     public static function old_forum($args) 
    575579     { 
    576           // URL forum/ : home of the forum : see categories aka subforums 
     580          // URL forum/ : home of the forum : see categories aka places 
    577581           
    578582          global $core, $_ctx; 
     
    592596     } 
    593597      
    594      public static function forum($args) 
     598     public static function agora($args) 
    595599     { 
    596600          global $core; 
     
    613617               if (empty($_GET['q'])) { 
    614618                    $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); 
    616620               } else { 
    617621                    self::search(); 
     
    634638     } 
    635639 
    636      public static function subforum($args) 
    637      { 
    638           // URL forum/sub/sub_url : view threads of a subforum 
     640     public static function place($args) 
     641     { 
     642          // URL forum/sub/sub_url : view threads of a place 
    639643          // URL forum/sub/sub_url /newthread/ : write a new thread in the category 
    640644           
     
    649653               self::p404(); 
    650654          } 
    651           $params['without_empty'] = false; 
     655          //$params['without_empty'] = false; 
    652656          $params['cat_url'] = $args; 
     657          $params['post_type'] = 'thread'; 
    653658          //$params['thread_id'] = ''; 
    654659           
     
    713718                    $cur->post_lang = $core->auth->getInfo('user_lang'); 
    714719                    $cur->post_content = $_POST['t_content']; 
    715                     $cur->post_type = 'threadpost'; 
     720                    $cur->post_type = 'thread'; 
    716721                    $cur->post_open_comment = 1; 
    717722                     
     
    719724                    //$cur->thread_id = ''; 
    720725                
    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; 
    722727                    $redir .= strpos($redir,'?') !== false ? '&' : '?'; 
    723728                
     
    745750          } 
    746751          $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); 
    748753          return; 
    749754     } 
     
    777782          $_ctx->thread_preview['rawcontent'] = ''; 
    778783          $_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; 
    780786           
    781787          $thread_new = isset($_POST['t_content']) && isset($_POST['t_title']); 
     
    798804               $_ctx->thread_preview['content'] = $content; 
    799805               $_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; 
    801808                
    802809               if ($preview) 
     
    811818               { 
    812819                    $cur = $core->con->openCursor($core->prefix.'post'); 
     820                    # Magic tweak doesn't work here 
     821                    //$core->blog->settings->system->post_url_format = "{id}"; 
    813822                    $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; 
    815824                    $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); 
    816827                    $cur->post_format = 'wiki'; 
    817828                    $cur->post_status = 1; 
    818829                    $cur->post_lang = $core->auth->getInfo('user_lang'); 
    819830                    $cur->post_content = $_POST['t_content']; 
    820                     $cur->post_type = 'threadpost'; 
     831                    $cur->post_type = 'thread'; 
    821832                    $cur->post_open_comment = 1; 
    822833                    $redir = $core->blog->url.$core->url->getBase("thread").'/'; 
     
    867878          URL forum/thread/id(& or ?)action=open : open the thead : thread->commentsActive : true  
    868879          */ 
    869           $n = self::getPageNumber($args); 
    870            
    871           if ($args == '' && !$n) { 
     880          //$n = self::getPageNumber($args); 
     881           
     882          if ($args == ''){// && !$n) { 
    872883               self::p404(); 
    873884          } 
    874            
    875           if ($n) { 
    876                $GLOBALS['_page_number'] = $n; 
    877           } 
     885          $core->blog->withoutPassword(false); 
     886          //if ($n) { 
     887          //   $GLOBALS['_page_number'] = $n; 
     888          //} 
    878889           
    879890          $user_id = ($core->auth->userID() != false && isset($_SESSION['sess_user_id'])) ? $core->auth->userID() : ''; 
     
    882893          $params = new ArrayObject(); 
    883894          $params['post_url'] = $args; 
    884           $params['post_type'] = 'threadpost'; 
     895          $params['post_type'] = 'thread'; 
    885896           
    886897          //$_ctx->posts = $_ctx->agora->getPostsPlus($params); 
     
    898909          $_ctx->post_preview['rawcontent'] = ''; 
    899910          $_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          } 
    901939 
    902940          $_ctx->message_preview = new ArrayObject(); 
     
    9941032                         $cur->post_title = $_ctx->posts->post_title; 
    9951033                         $cur->post_content = $_POST['p_content']; 
    996                          $cur->post_type =  'threadpost';*/ 
     1034                         $cur->post_type =  'thread';*/ 
    9971035                         $cur = $core->con->openCursor($core->prefix.'message'); 
    9981036                         $cur->user_id = $user_id; 
    9991037                         $cur->message_format = 'wiki'; 
    10001038                         $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'); 
    10011042                         $cur->post_id = $_ctx->posts->post_id; 
    10021043                         $cur->message_status =  1 ; 
     
    10481089          return; 
    10491090     } 
     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     } 
    10501117      
    10511118     public static function removethread($args) 
     
    10681135          $params['post_id'] = $args; 
    10691136          $params['no_content'] = true; 
    1070           $params['post_type'] = 'threadpost'; 
     1137          $params['post_type'] = 'thread'; 
    10711138          //$_ctx->posts = $_ctx->agora->getPostsPlus($params); 
    10721139          $_ctx->posts = $core->blog->getPosts($params); 
     
    10781145           
    10791146          //$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; 
    10811148 
    10821149          $redir .= strpos($redir,'?') !== false ? '&' : '?'; 
     
    11201187           
    11211188          $params['post_id'] = $args ; 
    1122           $params['post_type'] = 'threadpost'; 
     1189          $params['post_type'] = 'thread'; 
    11231190          $_ctx->posts = $core->blog->getPosts($params); 
    11241191 
     
    11341201          $_ctx->thread_preview['preview'] = false; 
    11351202          $_ctx->thread_preview['cat'] = $_ctx->posts->cat_id; 
     1203          $_ctx->thread_preview['not_empty'] = ( $args == '' ) ? false : true; 
    11361204 
    11371205          $p_content = $_ctx->posts->post_content; 
     
    11661234               $_ctx->thread_preview['title'] = $_POST['ed_title']; 
    11671235               $_ctx->thread_preview['cat'] = $_POST['ed_cat']; 
     1236               $_ctx->thread_preview['not_empty'] = true; 
    11681237                
    11691238               if ($preview) 
     
    13881457 
    13891458     public static function feed($args) 
    1390      { 
     1459     { // need review 
    13911460          global $core, $_ctx; 
    13921461           
    13931462          $type = null; 
    1394           $answers = false; 
     1463          $messages = false; 
    13951464          $cat_url = false; 
    1396           $thread_id = null; 
     1465          $post_id = null; 
    13971466          $params = array(); 
    13981467          $subtitle = ''; 
     
    14161485          } 
    14171486 
    1418           if (preg_match('#^(atom|rss2)/answers/([0-9]+)$#',$args,$m)) 
    1419           { 
    1420                # Thread answers feed 
     1487          if (preg_match('#^(atom|rss2)/messages/([0-9]+)$#',$args,$m)) 
     1488          { 
     1489               # Thread messages feed 
    14211490               $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 feed 
     1491               $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 
    14281497               $type = $m[2]; 
     1498               $messages = !empty($m[3]); 
    14291499               if (!empty($m[1])) { 
    14301500                    $cat_url = $m[1]; 
     
    14341504          { 
    14351505               self::p404(); 
     1506               return; 
    14361507          } 
    14371508           
     
    14391510          { 
    14401511               $params['cat_url'] = $cat_url; 
    1441                $params['post_type'] = 'threadpost'; 
    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');            
    14461517                    self::p404(); 
    14471518               } 
     
    14491520               $subtitle = ' - '.$_ctx->categories->cat_title; 
    14501521          } 
    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); 
    14561528                
    14571529               if ($_ctx->posts->isEmpty()) {  
     
    14631535           
    14641536          $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; 
    14681541          } else { 
    14691542               $_ctx->nb_entry_per_page = $core->blog->settings->nb_post_per_feed; 
     
    14841557} 
    14851558 
    1486 class tplAgora 
     1559class widgetsAgora 
    14871560{ 
    14881561     public static function memberWidget($w) 
     
    14901563          global $core; 
    14911564           
    1492           if ($core->url->type != 'subforum' && $core->url->type != 'thread'  
     1565          if ($core->url->type != 'place' && $core->url->type != 'thread'  
    14931566               && $core->url->type != 'agora' && $core->url->type != 'agora-page') { 
    14941567               return; 
    14951568          } 
    14961569           
    1497           $user_displayname = ($core->auth->getInfo('user_displayname') == '' )? '&nbsp;&nbsp;&nbsp;' : $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 .= 
    15001575               ($core->auth->userID() != false && isset($_SESSION['sess_user_id'])) ? 
    15011576               '<li><a href="'.$core->blog->url.$core->url->getBase("newthread").'">'.__('New thread').'</a></li>'. 
    1502                '<li><strong>'.$core->auth->userID().'</strong>&nbsp;{'.$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>'. 
    15041578               '<li><a href="'.$core->blog->url.$core->url->getBase("logout").'">'.__('Logout').'</a></li>' :  
    15051579               '<li><a href="'.$core->blog->url.$core->url->getBase("login").'">'.__('Login').'</a></li>'. 
     
    15451619          return $res; 
    15461620     } 
     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     } 
    15471833} 
    15481834?> 
  • plugins/agora/_widgets.php

    r1844 r2141  
    44# This file is part of agora, a plugin for Dotclear 2. 
    55#  
    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. 
    89# A copy of this license is available in LICENSE file or at 
    910# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 
     
    1112# -- END LICENSE BLOCK ------------------------------------ 
    1213 
    13  
    1414if (!defined('DC_RC_PATH')) { return; } 
    1515 
    1616$core->addBehavior('initWidgets',array('agoraWidgets','initWidgetsAgoraMember')); 
    1717$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')); 
    1823 
    1924class agoraWidgets  
     
    2126     public static function initWidgetsAgoraMember($w) 
    2227     { 
    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')); 
    2530          #$widgets->privateblog->setting('text',__('Text:'),'','textarea'); 
    2631          #$widgets->privateblog->setting('label',__('Button:'),__('Disconnect')); 
     
    3035     public static function initWidgetsAgoraModerate($w) 
    3136     { 
    32           $w->create('moderateAgoraWidget',__('Agora moderation'),array('tplAgora','moderateWidget')); 
     37          $w->create('moderateAgoraWidget',__('Agora: moderation'),array('widgetsAgora','moderateWidget')); 
    3338          $w->moderateAgoraWidget->setting('title',__('Title:'),__('Agora moderation')); 
    3439          #$widgets->privateblog->setting('text',__('Text:'),'','textarea'); 
     
    3641          #$widgets->privateblog->setting('homeonly',__('Home page only'),0,'check'); 
    3742     } 
     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('&nbsp;&nbsp;',$rs->level-1).'&bull; '.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('&nbsp;&nbsp;',$rs->level-1).'&bull; '.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     } 
    3897} 
    3998?> 
  • plugins/agora/default-templates/agora-atom.xml

    r1844 r2141  
    1818  <generator uri="http://dotclear.org/">Dotclear</generator> 
    1919   
    20   <tpl:Entries type="threadpost"> 
     20  <tpl:Entries type="thread"> 
    2121   
    2222  <entry> 
    2323    <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" 
    2525    title="{{tpl:EntryTitle encode_xml="1"}}" /> 
    2626    <id>{{tpl:EntryFeedID}}</id> 
  • plugins/agora/default-templates/agora-rss2.xml

    r1844 r2141  
    1717  <generator>Dotclear</generator> 
    1818   
    19   <tpl:Entries type="threadpost"> 
     19  <tpl:Entries type="thread"> 
    2020   
    2121  <item> 
    2222    <title>{{tpl:EntryTitle encode_xml="1"}}</title> 
    23     <link>{{tpl:ThreadURL}}</link> 
     23    <link>{{tpl:EntryURL}}</link> 
    2424    <guid isPermaLink="false">{{tpl:EntryFeedID}}</guid> 
    2525    <pubDate>{{tpl:EntryDate rfc822="1"}}</pubDate> 
  • plugins/agora/default-templates/editmessage.html

    r1872 r2141  
    99  <title>{{tpl:lang Edit message}} - {{tpl:lang Agora}} - {{tpl:BlogName encode_html="1"}}</title> 
    1010   
    11   <meta name="description" lang="{{tpl:BlogLanguage}}" content="{{tpl:lang Forum}}" /> 
     11  <meta name="description" lang="{{tpl:BlogLanguage}}" content="{{tpl:lang Agora}}" /> 
    1212  <meta name="copyright" content="{{tpl:BlogCopyrightNotice encode_html="1"}}" /> 
    1313  <meta name="author" content="{{tpl:BlogEditor encode_html="1"}}" /> 
     
    2626  <link rel="top" href="{{tpl:BlogURL}}" title="{{tpl:lang Home}}" /> 
    2727  <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> 
    3131   
    3232  <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="{{tpl:BlogFeedURL type="rss2"}}" /> 
  • plugins/agora/default-templates/editpost.html

    r1882 r2141  
    99  <title>{{tpl:lang Edit thread}} - {{tpl:lang Agora}} - {{tpl:BlogName encode_html="1"}}</title> 
    1010   
    11   <meta name="description" lang="{{tpl:BlogLanguage}}" content="{{tpl:lang Forum}}" /> 
     11  <meta name="description" lang="{{tpl:BlogLanguage}}" content="{{tpl:lang Agora}}" /> 
    1212  <meta name="copyright" content="{{tpl:BlogCopyrightNotice encode_html="1"}}" /> 
    1313  <meta name="author" content="{{tpl:BlogEditor encode_html="1"}}" /> 
     
    2626  <link rel="top" href="{{tpl:BlogURL}}" title="{{tpl:lang Home}}" /> 
    2727  <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> 
     29  <link rel="section" href="{{tpl:SubAgoraURL}}" title="{{tpl:CategoryTitle encode_html="1"}}" /> 
     30  </tpl:Categories> 
    3131   
    3232  <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="{{tpl:BlogFeedURL type="rss2"}}" /> 
    3333  <link rel="alternate" type="application/atom+xml" title="Atom 1.0" href="{{tpl:BlogFeedURL type="atom"}}" /> 
    3434  <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}}" /> 
    3635   
    3736  {{tpl:include src="_head.html"}} 
     
    5049  <div id="content-info"> 
    5150 
    52     <h2><a href="{{tpl:forumURL}}">{{tpl:lang Agora}}</a> &rsaquo;  <tpl:Subforums><tpl:ThreadComboSelected> {{tpl:CategoryTitle encode_html="1"}} </tpl:ThreadComboSelected></tpl:Subforums> 
     51    <h2><a href="{{tpl:AgoraURL}}">{{tpl:lang Agora}}</a> &rsaquo;  <tpl:Categories><tpl:ThreadComboSelected> {{tpl:CategoryTitle encode_html="1"}} </tpl:ThreadComboSelected></tpl:Categories> 
    5352     &rsaquo;  <a href="{{tpl:ThreadURL}}">{{tpl:EntryTitle}}</a> 
    5453    </h2> 
     
    8281</p> 
    8382 
    84                          <tpl:Subforums> 
     83                         <tpl:Categories> 
    8584                              <tpl:CategoriesHeader> 
    8685                                      <p class="field"> 
    8786                                   <label for="ed_cat">{{tpl:lang Category}}&nbsp;:</label> 
    8887                                   <select name="ed_cat" id="ed_cat"> 
     88                              <option value=""> 
     89                                   &nbsp; 
     90                              </option> 
    8991                              </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}} 
    9294                                   &bull; {{tpl:CategoryTitle encode_html="1"}} 
    9395                              </option> 
     
    9698                                   </p> 
    9799                              </tpl:CategoriesFooter> 
    98                          </tpl:Subforums> 
     100                         </tpl:Categories> 
    99101 
    100102   
  • plugins/agora/default-templates/login.html

    r1844 r2141  
    2626  <link rel="top" href="{{tpl:BlogURL}}" title="{{tpl:lang Home}}" /> 
    2727  <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> 
    3128   
    3229  {{tpl:include src="_head.html"}} 
     
    4542  <div id="content-info"> 
    4643 
    47   <h2><a href="{{tpl:forumURL}}">{{tpl:lang Agora}}</a> &rsaquo; {{tpl:lang Login}}</h2> 
     44  <h2><a href="{{tpl:agoraURL}}">{{tpl:lang Agora}}</a> &rsaquo; {{tpl:lang Login}}</h2> 
    4845     
    4946  </div> 
     
    6259{{tpl:SysBehavior behavior="publicLoginFormBefore"}} 
    6360 
    64 <p class="field"><label for="li_login">{{tpl:lang login}}&nbsp;:</label> 
     61<p class="field"><label for="li_login">{{tpl:lang Username}}&nbsp;:</label> 
    6562     <input name="li_login" id="li_login" type="text" size="30" maxlength="255" 
    6663     value="" /> 
  • plugins/agora/default-templates/newthread.html

    r1885 r2141  
    99  <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> 
    1010   
    11   <meta name="description" lang="{{tpl:BlogLanguage}}" content="{{tpl:lang Forum}}" /> 
     11  <meta name="description" lang="{{tpl:BlogLanguage}}" content="{{tpl:lang Agora}}" /> 
    1212  <meta name="copyright" content="{{tpl:BlogCopyrightNotice encode_html="1"}}" /> 
    1313  <meta name="author" content="{{tpl:BlogEditor encode_html="1"}}" /> 
     
    1515 
    1616  <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>" /> 
    1818  <meta name="dc.description" lang="{{tpl:BlogLanguage}}" content="{{tpl:BlogDescription remove_html="1"}}" /> 
    1919  <meta name="dc.language" content="{{tpl:BlogLanguage}}" /> 
     
    2626  <link rel="top" href="{{tpl:BlogURL}}" title="{{tpl:lang Home}}" /> 
    2727  <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"}}" /> 
    3030  </tpl:Categories> 
    3131   
     
    3333  <link rel="alternate" type="application/atom+xml" title="Atom 1.0" href="{{tpl:BlogFeedURL type="atom"}}" /> 
    3434  <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}}" /> 
    3635   
    3736  {{tpl:include src="_head.html"}} 
     
    5049  <div id="content-info"> 
    5150 
    52    <h2><a href="{{tpl:forumURL}}">{{tpl:lang Agora}}</a> &rsaquo;<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> &rsaquo;<tpl:IfThreadPreview><tpl:Categories><tpl:placeComboSelected> {{tpl:CategoryTitle encode_html="1"}} </tpl:placeComboSelected></tpl:Categories></tpl:IfThreadPreview></h2> 
    5352     
    5453  </div> 
     
    6261      <tpl:IfThreadPreview> 
    6362        <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> 
    6665            <div class="thread-preview">{{tpl:ThreadPreviewContent}}</div> 
    6766          <p class="buttons"><input type="submit" class="submit" value="{{tpl:lang send}}" /></p> 
     
    7473        {{tpl:SysBehavior behavior="publicThreadFormBeforeContent"}} 
    7574         
    76         <p class="field"><label for="t_title">{{tpl:lang Subject}}&nbsp;:</label> 
     75        <p class="field"><label class="required" for="t_title">{{tpl:lang Subject}}&nbsp;:</label> 
    7776        <input name="t_title" id="t_title" type="text" size="30" maxlength="255" 
    7877        value="{{tpl:ThreadPreviewTitle encode_html="1"}}" /> 
    7978        </p> 
    8079 
    81                          <tpl:Categories> 
    82                               <tpl:CategoriesHeader> 
    83                                       <p class="field"> 
    84                                    <label for="t_cat">{{tpl:lang Category}}&nbsp;:</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                                    &bull; {{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}}&nbsp;:</label> 
     84               <select name="t_cat" id="t_cat"> 
     85          <option value=""> 
     86               &nbsp; 
     87          </option> 
     88          </tpl:CategoriesHeader> 
     89          <option value="{{tpl:placeID}}" <tpl:placeComboSelected> selected=selected  </tpl:placeComboSelected>> 
     90               {{tpl:placeSpacer}} 
     91               &bull; {{tpl:CategoryTitle encode_html="1"}} 
     92          </option> 
     93          <tpl:CategoriesFooter> 
     94               </select> 
     95               </p> 
     96          </tpl:CategoriesFooter> 
     97     </tpl:Categories> 
    9698 
    97         <p class="field"><label for="t_content">{{tpl:lang Message}}&nbsp;:</label> 
     99        <p class="field"><label class="required" for="t_content">{{tpl:lang Message}}&nbsp;:</label> 
    98100        <textarea name="t_content" id="t_content" cols="35" 
    99101        rows="7">{{tpl:ThreadPreviewContent raw="1" encode_html="1"}}</textarea> 
  • plugins/agora/default-templates/profile.html

    r1844 r2141  
    2424  <meta name="dc.format" content="text/html" /> 
    2525   
    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 
    3228  {{tpl:include src="_head.html"}} 
    3329 
     
    4541  <div id="content-info"> 
    4642 
    47   <h2><a href="{{tpl:forumURL}}">{{tpl:lang Agora}}</a> &rsaquo; {{tpl:lang profile}} &rsaquo; {{tpl:ProfileUserID}}</h2> 
     43  <h2><a href="{{tpl:agoraURL}}">{{tpl:lang Agora}}</a> &rsaquo; {{tpl:lang profile}} &rsaquo; {{tpl:ProfileUserID}}</h2> 
    4844     
    4945  </div> 
     
    6561 
    6662</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> 
    6796 
    6897  </div> 
  • plugins/agora/default-templates/profile_me.html

    r1844 r2141  
    2424  <meta name="dc.format" content="text/html" /> 
    2525   
    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}}" /> 
    3127   
    3228  {{tpl:include src="_head.html"}} 
     
    4541  <div id="content-info"> 
    4642 
    47   <h2><a href="{{tpl:forumURL}}">{{tpl:lang Agora}}</a> &rsaquo; {{tpl:lang Profile}} &rsaquo; {{tpl:ProfileUserID}}</h2> 
     43  <h2><a href="{{tpl:agoraURL}}">{{tpl:lang Agora}}</a> &rsaquo; {{tpl:lang Profile}} &rsaquo; {{tpl:ProfileUserID}}</h2> 
    4844     
    4945  </div> 
     
    106102</form> 
    107103 
    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> 
    109138 
    110139</div> <!-- End #main --> 
  • plugins/agora/default-templates/register.html

    r1844 r2141  
    1515 
    1616  <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"}}" /> 
    1818  <meta name="dc.description" lang="{{tpl:BlogLanguage}}" content="{{tpl:BlogDescription remove_html="1"}}" /> 
    1919  <meta name="dc.language" content="{{tpl:BlogLanguage}}" /> 
     
    2525   
    2626  <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 
    3128   
    3229  {{tpl:include src="_head.html"}} 
     
    4542  <div id="content-info"> 
    4643 
    47   <h2><a href="{{tpl:forumURL}}">{{tpl:lang Agora}}</a> &rsaquo; {{tpl:lang Register}}</h2> 
     44  <h2><a href="{{tpl:agoraURL}}">{{tpl:lang Agora}}</a> &rsaquo; {{tpl:lang Register}}</h2> 
    4845     
    4946  </div> 
     
    6966{{tpl:SysBehavior behavior="publicRegisterFormBefore"}} 
    7067 
    71 <p class="field"><label for="ru_login">{{tpl:lang login}}&nbsp;:</label> 
     68<p class="field"><label for="ru_login">{{tpl:lang Username}}&nbsp;:</label> 
    7269     <input name="ru_login" id="ru_login" type="text" size="30" maxlength="255" 
    7370     value="{{tpl:RegisterPreviewLogin encode_html="1"}}" /> 
     
    8178 <p style="display:none"><input name="email2" type="text" size="30" 
    8279maxlength="255" value="" /></p> 
     80 
     81<p class="form-help">{{tpl:lang Username must contain at least 2 characters using letters, numbers or symbols.}}</p> 
    8382 
    8483<!-- # --BEHAVIOR-- publicRegisterFormAfter --> 
  • plugins/agora/default-templates/thread.html

    r1872 r2141  
    99  <title>{{tpl:EntryTitle encode_html="1"}} - {{tpl:lang Agora}} - {{tpl:BlogName encode_html="1"}}</title> 
    1010   
    11   <meta name="description" lang="{{tpl:BlogLanguage}}" content="{{tpl:lang Forum}}" /> 
     11  <meta name="description" lang="{{tpl:BlogLanguage}}" content="{{tpl:lang Agora}}" /> 
    1212  <meta name="copyright" content="{{tpl:BlogCopyrightNotice encode_html="1"}}" /> 
    1313  <meta name="author" content="{{tpl:BlogEditor encode_html="1"}}" /> 
     
    1515 
    1616  <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"}}" /> 
    1818  <meta name="dc.description" lang="{{tpl:BlogLanguage}}" content="{{tpl:BlogDescription remove_html="1"}}" /> 
    1919  <meta name="dc.language" content="{{tpl:BlogLanguage}}" /> 
     
    2626  <link rel="top" href="{{tpl:BlogURL}}" title="{{tpl:lang Home}}" /> 
    2727  <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> 
    3131   
    3232 
    3333  <link rel="alternate" type="application/atom+xml" title="Atom 1.0" href="{{tpl:AgoraFeedURL type="atom"}}" /> 
    3434  <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}}" /> 
    3635   
    3736  {{tpl:include src="_head.html"}} 
     
    5049  <div id="content-info"> 
    5150  
    52     <h2><a href="{{tpl:forumURL}}">{{tpl:lang Agora}}</a> &rsaquo;  <a href="{{tpl:ThreadCategoryURL}}">{{tpl:EntryCategory}}</a> 
     51    <h2><a href="{{tpl:agoraURL}}">{{tpl:lang Agora}}</a><tpl:EntryIf has_category="1"> &rsaquo; <a href="{{tpl:ThreadCategoryURL}}">{{tpl:EntryCategory}}</a></tpl:EntryIf> 
     52 
    5353    </h2> 
    5454     
    5555  </div> 
    5656 
    57 <div id="p" class="post {{tpl:EntryIfSelected}} {{tpl:EntryIfClosed}}"> 
     57<div id="p{{tpl:EntryID}}" class="post {{tpl:EntryIfSelected}} {{tpl:EntryIfClosed}}"> 
    5858     
    5959    <h2 class="post-title">{{tpl:EntryTitle encode_html="1"}}</h2> 
    6060    <!--p class="post-info">{{tpl:CategoryDescription}} </p--> 
    61       <p class="post-info"> 
    62  {{tpl:lang by}} <a href="{{tpl:ThreadProfileUserID}}">{{tpl:EntryAuthorID}}</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>  
    6464<tpl:userIsModo> 
    6565- <a href="{{tpl:ModerationEditThread}}">{{tpl:lang edit}}</a> 
     
    7676     
    7777    </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"> 
    78106      <div id="comments"> 
    79             <tpl:EntryTags type="nb_messages"> 
    80     <h3>{{tpl:TagID}}&nbsp;{{tpl:lang message(s)}}</h3> 
    81     </tpl:EntryTags> 
     107    <h3>{{tpl:EntryMessageCount}}</h3> 
    82108 
    83109<tpl:Messages> 
     
    87113    </tpl:MessagesHeader> 
    88114 
    89       <dt id="c{{tpl:MessageID}}" class="{{tpl:MessageIfOdd}} {{tpl:MessageIfFirst}}"><a 
    90       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> 
    91117      {{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> 
    93119      <tpl:userIsModo> 
    94120      - <a href="{{tpl:ModerationEditMessage}}"> {{tpl:lang edit}}</a> 
     
    113139        <tpl:MessagesFooter> 
    114140      </dl> 
    115       <tpl:agoPagination> 
    116         <p class="pagination"><tpl:agoPaginationIf start="0"><a href="{{tpl:agoPaginationURL offset="-1"}}" class="prev">&#171; 
    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         &#187;</a></tpl:agoPaginationIf></p> 
    121       </tpl:agoPagination> 
     141 
    122142    </tpl:MessagesFooter> 
    123143 
    124144  </tpl:Messages> 
    125    
     145      </div>     <!--#comments --> 
     146 
     147  </tpl:EntryIf> 
     148 
    126149      <tpl:SysIfThreadUpdated> 
    127150      <p class="message" id="pr">{{tpl:lang Status of thread has been modified.}}</p> 
    128151    </tpl:SysIfThreadUpdated> 
    129152   
    130 <tpl:EntryIf comments_active="0"> 
    131  <h3>{{tpl:lang Thread closed}}</h3> 
    132 </tpl:EntryIf> 
    133       </div> 
    134153 
    135154<tpl:EntryIf comments_active="1"> 
     
    137156<tpl:authForm> 
    138157    <!-- # Thread form --> 
    139     <form action="{{tpl:ThreadURL}}#pr" method="post" id="comment-form"> 
     158    <form action="{{tpl:EntryURL}}#pr" method="post" id="comment-form"> 
    140159 
    141160<tpl:SysIfFormError> 
     
    153172      </tpl:IfMessagePreview> 
    154173       
    155       <h3>{{tpl:lang Add an answer}}</h3> 
     174      <h3>{{tpl:lang Add a message}}</h3> 
    156175      <fieldset> 
    157176        <!-- # --BEHAVIOR-- publicAnswerFormBeforeContent --> 
     
    175194    </form> 
    176195</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 
    182200  </tpl:EntryIf> 
    183     
     201  <tpl:EntryIf comments_active="0">{{tpl:lang Thread closed}}</tpl:EntryIf> 
    184202  </div> 
    185203 
     
    194212    {{tpl:Widgets type="extra"}} 
    195213  </div> <!-- End #blogextra --> 
    196 </div> 
     214</div> <!-- End #sidebar --> 
    197215 
    198216</div> <!-- End #wrapper --> 
  • plugins/agora/inc/class.agora.auth.php

    r1844 r2141  
    44# This file is part of agora, a plugin for Dotclear 2. 
    55#  
    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. 
    89# A copy of this license is available in LICENSE file or at 
    910# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 
    1011# 
    1112# -- END LICENSE BLOCK ------------------------------------ 
    12  
    1313class dcPublicAuth extends dcAuth 
    1414{ 
  • plugins/agora/inc/class.agora.behaviors.php

    r1844 r2141  
    44# This file is part of agora, a plugin for Dotclear 2. 
    55#  
    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. 
    89# A copy of this license is available in LICENSE file or at 
    910# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 
  • plugins/agora/inc/class.agora.log.php

    r1844 r2141  
    44# This file is part of agora, a plugin for Dotclear 2. 
    55#  
    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. 
    89# A copy of this license is available in LICENSE file or at 
    910# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 
     
    4647           
    4748          if (!$count_only) { 
    48                $strReq .= 'GROUP BY user_id '; 
     49               //$strReq .= 'GROUP BY user_id '; 
    4950                
    5051               if (!empty($params['order']) && !$count_only) { 
  • plugins/agora/inc/class.agora.php

    r1885 r2141  
    44# This file is part of agora, a plugin for Dotclear 2. 
    55#  
    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. 
    89# A copy of this license is available in LICENSE file or at 
    910# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 
     
    1617     private $message_status = array(); 
    1718      
    18      public function __construct($core) 
     19     public function __construct($core,$public=true) 
    1920     { 
    2021          $this->con =& $core->con; 
     
    3132          $this->message_status['1'] = __('published'); 
    3233           
    33           $this->core->auth = new dcPublicAuth($core); 
     34          if ($public) 
     35          { 
     36               $this->core->auth = new dcPublicAuth($core); 
     37          } 
    3438          $this->core->log = new dcLog($core); 
    3539     } 
     
    8084               $strReq .= 'GROUP BY U.user_id,user_super,user_status,user_pwd,user_name,'. 
    8185               '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 '; 
    8388                
    8489               if (!empty($params['order']) && !$count_only) { 
     
    197202          $link = $this->core->blog->url.$this->core->url->getBase('register'); 
    198203          $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'); 
    201206          $sub = __('Account confirmation request on Agora'); 
    202207          $msg =  
     
    206211          $link.'key='.$key. 
    207212          "\n\n". 
    208           __('Your indormations:'). 
     213          __('Your indormations:')."\n". 
    209214          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". 
    213217          "\n\n". 
    214218          __('If you have received this mail in error, you do not need to take any action to cancel the account.'). 
     
    334338          */ 
    335339          //$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); 
    338347          $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 can 
    360      take the following parameters: 
    361       
    362      - post_type: Get only entries with given type (default "post") 
    363      - cat_url: filter on cat_url field 
    364      - cat_id: filter on cat_id field 
    365      - start: start with a given category 
    366      - level: categories level to retrieve 
    367      - with_empty: filter empty categories 
    368       
    369      @param    params    <b>array</b>        Parameters 
    370      @return   <b>record</b> 
    371      */ 
    372      public function getCategoriesPlus($params=array()) 
    373      { 
    374           // From /inc/core/class.dc.blog.php getCategories 
    375           //Just authorize Empty Categories 
    376           $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 count 
    399           $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 counting 
    454           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)); 
    528348     } 
    529349 
     
    580400          $blog_id = $this->core->blog->id; 
    581401           
    582           if (!empty($res)) 
     402          if (!empty($res) && is_array($res[$blog_id]['p'])) 
    583403          { 
    584404               if (array_key_exists($perm,$res[$blog_id]['p'])) { 
     
    622442          $rs = $this->con->select($strReq); 
    623443           
     444          $cur = $this->con->openCursor($this->prefix.'post'); 
     445           
    624446          if ($rs->isEmpty()) { 
    625447               return; 
    626448          } 
    627449          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); 
    634454           
    635455     } 
     
    656476               $strReq = 
    657477               '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, '. 
    659479               $content_req.' message_status, '. 
    660480               'P.post_title, P.post_url, P.post_type, P.post_dt, './/P.user_id, '. 
     
    701521               } 
    702522          } 
     523 
     524          if (!empty($params['user_id'])) { 
     525               $strReq .= "AND M.user_id = '".$this->con->escape($params['user_id'])."' "; 
     526          } 
    703527           
    704528          if (!empty($params['post_id'])) { 
     
    726550          if (isset($params['q_author'])) { 
    727551               $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."' "; 
    729553          } 
    730554           
     
    771595          $rs->extend('rsExtMessage'); 
    772596           
    773           # --BEHAVIOR-- coreBlogGetComments 
    774           $this->core->callBehavior('agoraBlogGetMessages',$rs); 
     597          # --BEHAVIOR-- agoraGetMessages 
     598          $this->core->callBehavior('agoraGetMessages',$rs); 
    775599           
    776600          return $rs; 
     
    793617                
    794618               $cur->message_id = (integer) $rs->f(0) + 1; 
     619 
     620               $cur->message_creadt = date('Y-m-d H:i:s'); 
    795621               $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'); 
    800623                
    801624               # Post excerpt and content 
     
    876699          } 
    877700           
    878           $cur = $this->con->openCursor($this->prefix.'message'); 
     701          /*$cur = $this->con->openCursor($this->prefix.'message'); 
    879702          $cur->message_status = (integer) $status; 
    880703          $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(); 
    881734     } 
    882735      
     
    923776               throw new Exception(__('No message content')); 
    924777          } 
     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          } 
    925784           
    926785          $message_id = is_int($message_id) ? $message_id : $cur->message_id; 
  • plugins/agora/inc/class.agora.template.php

    r1872 r2141  
    44# This file is part of agora, a plugin for Dotclear 2. 
    55#  
    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. 
    89# A copy of this license is available in LICENSE file or at 
    910# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 
     
    1819     } 
    1920 
    20      public static function forumURL($attr) 
     21     public static function agoraURL($attr) 
    2122     { 
    2223          global $core, $_ctx; 
     
    6768           
    6869          $f = $GLOBALS['core']->tpl->getFilters($attr); 
    69           return '<?php echo '.sprintf($f,'$core->blog->url.$core->url->getBase("agofeed")."/'.$type.'"').'; ?>'; 
     70          return '<?php echo '.sprintf($f,'$core->blog->url.$core->url->getBase("agora_feed")."/'.$type.'"').'; ?>'; 
    7071     } 
    7172 
     
    9798     } 
    9899 
    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) 
    157109     { 
    158110          $type = !empty($attr['type']) ? $attr['type'] : 'atom'; 
     
    163115           
    164116          $f = $GLOBALS['core']->tpl->getFilters($attr); 
    165           return '<?php echo '.sprintf($f,'$core->blog->url.$core->url->getBase("agofeed")."/subforum/".'. 
     117          return '<?php echo '.sprintf($f,'$core->blog->url.$core->url->getBase("agora_feed")."/place/".'. 
    166118          '$_ctx->categories->cat_url."/'.$type.'"').'; ?>'; 
    167119     } 
    168120 
    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'); 
    176162           
    177163          if (isset($attr['none'])) { 
     
    184170               $more = addslashes($attr['more']); 
    185171          } 
    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          } 
    187364           
    188365          return 
     
    196373     } 
    197374 
    198      public static function authForm($attr,$content) 
    199      { 
    200           global $core; 
    201            
    202           return 
    203           '<?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           return 
    213           '<?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           else 
    228           { 
    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           return 
    257           "<?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           return 
    291           "<?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           return 
    321           '<?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           return 
    355           '<?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           return 
    415           '<?php if (!$_ctx->posts->post_open_comment) { '. 
    416           "echo '".addslashes($ret)."'; } ?>"; 
    417      } 
    418  
    419375     public static function PaginationPlus($attr,$content) 
    420376     { 
     
    605561     { 
    606562          global $core; 
    607            
     563           
    608564          $format = (!empty($attr['format'])) ? $attr['format'] :  
    609565               $core->blog->settings->date_format.', '.$core->blog->settings->time_format;  
    610566          $f = $GLOBALS['core']->tpl->getFilters($attr); 
    611            
     567           
    612568          return('<?php echo '.'dt::dt2str(\''.$format.'\','.sprintf($f,'$_ctx->posts->post_creadt'). 
    613569               ',\''.$core->blog->settings->blog_timezone.'\'); ?>'); 
    614570     } 
    615571 
     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 
    616584     public static function userIsModo($attr,$content) 
    617585     { 
     
    629597           
    630598          $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').'; ?>'; 
    632600     } 
    633601 
     
    637605           
    638606          $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').'; ?>'; 
    640608     } 
    641609 
     
    645613           
    646614          $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').'; ?>'; 
    648616     } 
    649617 
     
    653621           
    654622          $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').'; ?>'; 
    656624     } 
    657625 
     
    667635          } 
    668636           
    669           //$_ctx->profile->user_creadt = strtotime($_ctx->profile->user_creadt); 
     637          //$_ctx->users->user_creadt = strtotime($_ctx->users->user_creadt); 
    670638          $iso8601 = !empty($attr['iso8601']); 
    671639          $rfc822 = !empty($attr['rfc822']); 
     
    674642           
    675643          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)").'; ?>'; 
    677645          } 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)").'; ?>'; 
    681649          } 
    682650     } 
     
    693661          } 
    694662           
    695           //$_ctx->profile->user_upddt = strtotime($_ctx->profile->user_upddt); 
     663          //$_ctx->users->user_upddt = strtotime($_ctx->users->user_upddt); 
    696664          $iso8601 = !empty($attr['iso8601']); 
    697665          $rfc822 = !empty($attr['rfc822']); 
     
    700668           
    701669          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)").'; ?>'; 
    703671          } 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)").'; ?>'; 
    707675          } 
    708676     } 
     
    717685          "}\n"; 
    718686 
    719           $lastn = -1; 
     687          $lastn = 0; 
    720688          if (isset($attr['lastn'])) { 
    721689               $lastn = abs((integer) $attr['lastn'])+0; 
    722690          } 
    723691           
    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          } 
    732701                
    733                if (!isset($attr['ignore_pagination']) || $attr['ignore_pagination'] == "0") { 
     702               /*if (!isset($attr['ignore_pagination']) || $attr['ignore_pagination'] == "0") { 
    734703                    $p .= "\$params['limit'] = array(((\$_page_number-1)*\$params['limit']),\$params['limit']);\n"; 
    735704               } else { 
    736705                    $p .= "\$params['limit'] = array(0, \$params['limit']);\n"; 
    737                } 
    738           } 
     706               }*/ 
     707          //} 
    739708           
    740709          if (isset($attr['author'])) { 
     
    772741          } 
    773742 
    774           $sortby = 'post_dt'; 
    775           $order = 'desc'; 
     743          $sortby = 'message_dt'; 
     744          $order = 'asc'; 
    776745          if (isset($attr['sortby'])) { 
    777746               switch ($attr['sortby']) { 
    778                     case 'title': $sortby = 'post_title'; break; 
    779                     case 'selected' : $sortby = 'post_selected'; break; 
    780747                    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; 
    783751               } 
    784752          } 
     
    853821     } 
    854822 
    855      public static function MessageAuthor($attr) 
    856      {//A revoir 
    857           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()').'; ?>'; 
    862830     } 
    863831 
     
    914882          } elseif ($iso8601) { 
    915883               return '<?php echo '.sprintf($f,"\$_ctx->messages->getISO8601Date()").'; ?>'; 
     884/*return '<?php echo "plop" ; ?>';*/ 
    916885          } else { 
    917886               return '<?php echo '.sprintf($f,"\$_ctx->messages->getDate('".$format."')").'; ?>'; 
     
    987956     } 
    988957 
     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 
    989974     public static function agoPagination($attr,$content) 
    990975     { 
     
    10641049     } 
    10651050 
    1066      public static function SubforumID($attr) 
     1051     public static function placeID($attr) 
    10671052     { 
    10681053          global $core, $_ctx; 
     
    10701055     } 
    10711056 
    1072      public static function SubforumSpacer($attr) 
     1057     public static function placeSpacer($attr) 
    10731058     { 
    10741059          global $core, $_ctx; 
     
    10811066     } 
    10821067      
    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"])) : ?>'. 
    10891074          $content. 
    10901075          '<?php endif; ?>'; 
  • plugins/agora/inc/class.agora.utils.php

    r1864 r2141  
    44# This file is part of agora, a plugin for Dotclear 2. 
    55#  
    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. 
    89# A copy of this license is available in LICENSE file or at 
    910# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 
  • plugins/agora/inc/class.rs.agora.php

    r1864 r2141  
    55#  
    66# 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. 
    89# A copy of this license is available in LICENSE file or at 
    910# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 
     
    1112# -- END LICENSE BLOCK ------------------------------------ 
    1213 
    13 class rsExtagora 
    14 { 
    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 continued 
    26            
    27      } 
    28  
    29      public static function getThreadURL($rs) 
    30      { 
    31  
    32  
    33      } 
    34 } 
    3514class rsExtMessage 
    3615{ 
     
    3817     { 
    3918          if ($absolute_urls) { 
    40                return html::absoluteURLs($rs->message_content_xhtml,$rs->getURL()); 
     19               return html::absoluteURLs($rs->message_content_xhtml,$rs->getThreadURL()); 
    4120          } else { 
    4221               return $rs->message_content_xhtml; 
     
    4423     } 
    4524 
    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) 
    4732     { 
    4833          return $rs->core->blog->url.$rs->core->getPostPublicURL( 
     
    7156     public static function getTS($rs) 
    7257     { 
    73           return strtotime($rs->messsage_dt); 
     58          return strtotime($rs->message_dt); 
    7459     } 
    7560      
     
    8368          return dt::rfc822($rs->getTS(),$rs->message_tz); 
    8469     } 
     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     } 
    8580} 
    8681?> 
  • plugins/agora/index.php

    r1882 r2141  
    44# This file is part of agora, a plugin for Dotclear 2. 
    55#  
    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. 
    89# A copy of this license is available in LICENSE file or at 
    910# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 
     
    1112# -- END LICENSE BLOCK ------------------------------------ 
    1213 
    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      try 
     14$act = (!empty($_REQUEST['act']) && $_REQUEST['act'] == 'thread') ? 'thread' : 'options'; 
     15 
     16if ($_REQUEST['act'] == 'thread') { 
     17     include dirname(__FILE__).'/thread.php'; 
     18     return; 
     19}  
     20 
     21if ($_REQUEST['act'] == 'messages') { 
     22     include dirname(__FILE__).'/messages.php'; 
     23     return; 
     24}  
     25 
     26if ($_REQUEST['act'] == 'messages-actions') { 
     27     include dirname(__FILE__).'/messages_actions.php'; //not ready yet 
     28     return; 
     29}  
     30 
     31if ($_REQUEST['act'] == 'options') { 
     32     include dirname(__FILE__).'/options.php'; // to finalize 
     33     return; 
     34} 
     35 
     36if (!defined('DC_CONTEXT_ADMIN')) { return; } 
     37dcPage::check('agora,contentadmin'); 
     38 
     39 
     40/* Pager class 
     41-------------------------------------------------------- */ 
     42class adminThreadList extends adminGenericList 
     43{ 
     44     public function display($page,$nb_per_page,$enclose_block='') 
    4445     { 
    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() 
    6589     { 
    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 
     161try { 
     162     $categories = $core->blog->getCategories(array('post_type'=>'thread')); 
     163} catch (Exception $e) { 
     164     $core->error->add($e->getMessage()); 
     165} 
     166 
     167# Getting authors 
     168try { 
     169     $users = $core->blog->getPostsUsers('thread'); 
     170} catch (Exception $e) { 
     171     $core->error->add($e->getMessage()); 
     172} 
     173 
     174# Getting dates 
     175try { 
     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 
     182try { 
     183     $langs = $core->blog->getLangs(); 
     184} catch (Exception $e) { 
     185     $core->error->add($e->getMessage()); 
     186} 
     187 
     188# Creating filter combo boxes 
     189if (!$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('&nbsp;&nbsp;',$categories->level-1).'&bull; '. 
     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(); 
     253if ($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'); 
     267if ($core->auth->check('admin',$core->blog->id)) 
     268{ 
     269     $combo_action[__('Change')] = array_merge($combo_action[__('Change')], 
     270          array(__('Change author') => 'author')); 
     271} 
     272if ($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 
     293if (!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 
     304if ($user_id !== '' && in_array($user_id,$users_combo)) { 
     305     $params['user_id'] = $user_id; 
     306     $show_filters = true; 
     307} 
     308 
     309# - Categories filter 
     310if ($cat_id !== '' && in_array($cat_id,$categories_combo)) { 
     311     $params['cat_id'] = $cat_id; 
     312     $show_filters = true; 
     313} 
     314 
     315# - Status filter 
     316if ($status !== '' && in_array($status,$status_combo)) { 
     317     $params['post_status'] = $status; 
     318     $show_filters = true; 
     319} 
     320 
     321# - Selected filter 
     322if ($selected !== '' && in_array($selected,$selected_combo)) { 
     323     $params['post_selected'] = $selected; 
     324     $show_filters = true; 
     325} 
     326 
     327# - Month filter 
     328if ($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 
     335if ($lang !== '' && in_array($lang,$lang_combo)) { 
     336     $params['post_lang'] = $lang; 
     337     $show_filters = true; 
     338} 
     339 
     340# - Sortby and order filter 
     341if ($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 
     355try { 
     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-------------------------------------------------------- */ 
    69371?> 
    70372<html> 
    71373<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> 
    73385</head> 
    74386<body> 
    75387<?php 
    76 echo '<h2>'.html::escapeHTML($core->blog->name).' &rsaquo; '.__('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>'; 
     388echo '<h2>'.html::escapeHTML($core->blog->name).' &rsaquo; '.__('Threads'). 
     389' - <a class="button" href="'.$p_url.'&amp;act=thread">'.__('New thread').'</a></h2>'; 
     390 
     391if (!$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} 
    121453?> 
    122454</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 
    16msgid "" 
    27msgstr "" 
    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: 2009-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" 
    813"Language-Team: \n" 
    914"MIME-Version: 1.0\n" 
    10 "Content-Type: text/plain; charset=UTF-8\n" 
    1115"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 
     19msgid "%d threads" 
     20msgstr "%d discussions" 
     21 
     22#: _admin.php:22 
     23msgid "%d thread" 
     24msgstr "%d discussion" 
     25 
     26#: _admin.php:25 
     27msgid "%d messages" 
     28msgstr "%d messages" 
     29 
     30#: _admin.php:25 
     31msgid "%d message" 
     32msgstr "%d message" 
     33 
     34#: _admin.php:30 
     35msgid "agora:config" 
     36msgstr "agora:config" 
     37 
     38#: _admin.php:35 
     39msgid "is an agora member" 
     40msgstr "est membre de l'agora" 
     41 
     42#: _admin.php:36 
     43msgid "can moderate the agora" 
     44msgstr "peut modérer l'agora" 
     45 
     46#: _install.php:55 
     47msgid "<p class=\"message\">Welcome to the Agora.</p>" 
     48msgstr "<p class=\"message\">Bienvenue dans l'agora.</p>" 
     49 
     50#: _public.php:222 
    2151msgid "The e-mail was sent successfully to %s." 
    22 msgstr "L'email a été envoyé avec succès à %s." 
    23  
    24 #: _public.php:204 
     52msgstr "Le message a été envoyé avec succès à %s." 
     53 
     54#: _public.php:238 
    2555msgid "Your new password is in your mailbox." 
    26 msgstr "Votre nouveau mot de passe est dans votre messagerie." 
    27  
    28 #: _public.php:279 
    29 #: _public.php:496 
     56msgstr "Votre nouveau mot de passe est dans votre boîte à lettres." 
     57 
     58#: _public.php:313 
     59#: _public.php:532 
    3060msgid "You must provide a valid email" 
    3161msgstr "Vous devez fournir une adresse email valide" 
    3262 
    33 #: _public.php:284 
    34 #, php-format 
     63#: _public.php:318 
    3564msgid "User \"%s\" already exists." 
    3665msgstr "L'utilisateur \"%s\" existe déjà." 
    3766 
    38 #: _public.php:298 
    39 #, php-format 
     67#: _public.php:333 
    4068msgid "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 
     69msgstr "L'utilisateur %s a été créé avec succès. Vous allez recevoir un email pour activer votre compte." 
     70 
     71#: _public.php:363 
    4572msgid "User %s is already registred. You can log in." 
    4673msgstr "L'utilisateur %s est déjà enregistré. Vous pouvez vous connecter." 
    4774 
    48 #: _public.php:336 
    49 #, php-format 
     75#: _public.php:371 
    5076msgid "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:347 
    54 #: inc/class.agora.php:132 
     77msgstr "L'utilisateur %s est maintenant enregistré. Vous pouvez désormais vous connecter." 
     78 
     79#: _public.php:382 
     80#: inc/class.agora.php:143 
    5581msgid "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:482 
     82msgstr "Ceci est une mauvaise URL de confirmation. L'enregistrement a échoué." 
     83 
     84#: _public.php:518 
    5985msgid "You must confirm your password" 
    6086msgstr "Vous devez confirmer votre mot de passe" 
    6187 
    62 #: _public.php:486 
     88#: _public.php:522 
    6389msgid "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 
     90msgstr "Veuillez vérifier vos mots de passe. Ils ne correspondent pas" 
     91 
     92#: _public.php:549 
    6893msgid "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 
     94msgstr "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 
     107msgid "Home" 
     108msgstr "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 
     115msgid "New thread" 
     116msgstr "Nouvelle discussion" 
     117 
     118#: _public.php:1578 
     119msgid "Logout" 
     120msgstr "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 
     126msgid "Login" 
     127msgstr "Connexion" 
     128 
     129#: _public.php:1580 
     130#: default-templates/register.html:9 
     131#: default-templates/register.html:44 
     132msgid "Register" 
     133msgstr "S'enregistrer" 
     134 
     135#: _public.php:1602 
     136msgid "Close the thread" 
     137msgstr "Fermer la discussion" 
     138 
     139#: _public.php:1603 
     140msgid "Open the thread" 
     141msgstr "Ouvrir la discussion" 
     142 
     143#: _public.php:1606 
     144msgid "Unpin the thread" 
     145msgstr "Dépingler la discussion" 
     146 
     147#: _public.php:1607 
     148msgid "Pin the thread" 
     149msgstr "Épingler la discussion" 
     150 
     151#: _public.php:1811 
     152msgid "This agora's threads %s feed" 
     153msgstr "Fil des discussions de l'agora" 
     154 
     155#: _public.php:1812 
     156msgid "This agora's messages %s feed" 
     157msgstr "Fil des messages de l'agora" 
     158 
     159#: _public.php:1823 
     160#: default-templates/place.html:59 
     161msgid "Threads feed" 
     162msgstr "Fil des discussions" 
     163 
     164#: _public.php:1827 
     165#: default-templates/place.html:62 
     166msgid "Messages feed" 
     167msgstr "Fil des messages" 
     168 
     169#: _widgets.php:28 
     170msgid "Agora: navigation" 
     171msgstr "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 
     181msgid "Title:" 
     182msgstr "Titre :" 
     183 
     184#: _widgets.php:29 
     185msgid "Agora navigation" 
     186msgstr "Navigation" 
     187 
     188#: _widgets.php:30 
     189#: _widgets.php:39 
     190#: _widgets.php:48 
     191msgid "Text:" 
     192msgstr "Texte :" 
     193 
     194#: _widgets.php:31 
     195#: _widgets.php:40 
     196#: _widgets.php:49 
     197msgid "Button:" 
     198msgstr "Bouton :" 
     199 
     200#: _widgets.php:31 
     201#: _widgets.php:40 
     202#: _widgets.php:49 
     203msgid "Disconnect" 
     204msgstr "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 
     213msgid "Home page only" 
     214msgstr "Page d'accueil uniquement" 
     215 
     216#: _widgets.php:37 
     217msgid "Agora: moderation" 
     218msgstr "Agora : modération" 
     219 
     220#: _widgets.php:38 
     221msgid "Agora moderation" 
     222msgstr "Modération de l'agora" 
     223 
     224#: _widgets.php:45 
     225msgid "Agora: categories list" 
     226msgstr "Agora : liste des catégories" 
     227 
     228#: _widgets.php:46 
     229msgid "Agora's sections" 
     230msgstr "Sections de l'agora" 
     231 
     232#: _widgets.php:47 
     233msgid "With entries counts" 
     234msgstr "Afficher le nombre de billets" 
     235 
     236#: _widgets.php:54 
     237msgid "Agora: selected threads" 
     238msgstr "Agora : discussions sélectionnées" 
     239 
     240#: _widgets.php:55 
     241msgid "Selected threads" 
     242msgstr "Discussions à retenir" 
     243 
     244#: _widgets.php:61 
     245msgid "Agora: last threads" 
     246msgstr "Agora : dernières discussions" 
     247 
     248#: _widgets.php:62 
     249#: default-templates/profile.html:66 
     250#: default-templates/profile_me.html:106 
     251msgid "Last threads" 
     252msgstr "Dernières discussions" 
     253 
     254#: _widgets.php:64 
     255#: _widgets.php:79 
     256msgid "Uncategorized" 
     257msgstr "Non catégorisé" 
     258 
     259#: _widgets.php:68 
     260#: _widgets.php:83 
     261#: index.php:405 
     262#: thread.php:379 
     263msgid "Category:" 
     264msgstr "Catégorie :" 
     265 
     266#: _widgets.php:70 
     267msgid "Entries limit:" 
     268msgstr "Nombre de discussions maximum :" 
     269 
     270#: _widgets.php:76 
     271msgid "Agora: last messages" 
     272msgstr "Agora : derniers messages" 
     273 
     274#: _widgets.php:77 
     275#: default-templates/profile.html:83 
     276#: default-templates/profile_me.html:123 
     277msgid "Last messages" 
     278msgstr "Derniers messages" 
     279 
     280#: _widgets.php:85 
     281msgid "Messages limit:" 
     282msgstr "Nombre de messages maximum :" 
     283 
     284#: _widgets.php:92 
     285msgid "Agora: subscribe links" 
     286msgstr "Agora : liens d'abonnement" 
     287 
     288#: _widgets.php:93 
     289msgid "Subscribe" 
     290msgstr "S'abonner" 
     291 
     292#: _widgets.php:94 
     293msgid "Feeds type:" 
     294msgstr "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 
    75338msgid "Agora" 
    76339msgstr "Agora" 
    77340 
    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 
     350msgid "page" 
     351msgstr "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 
     360msgid "Archives" 
     361msgstr "Archives" 
     362 
     363#: default-templates/agora.html:69 
     364msgid "Last thread:" 
     365msgstr "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 
     374msgid "by" 
     375msgstr "par" 
     376 
     377#: default-templates/agora.html:84 
     378msgid "Last message:" 
     379msgstr "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 
     389msgid "on" 
     390msgstr "le" 
     391 
     392#: default-templates/agora.html:109 
     393#: default-templates/place.html:106 
     394#: default-templates/place.html:137 
     395msgid "previous entries" 
     396msgstr "billets précédents" 
     397 
     398#: default-templates/agora.html:110 
     399#: default-templates/place.html:107 
     400#: default-templates/place.html:138 
     401msgid "of" 
     402msgstr "de" 
     403 
     404#: default-templates/agora.html:111 
     405#: default-templates/place.html:108 
     406#: default-templates/place.html:139 
     407msgid "next entries" 
     408msgstr "billets suivants" 
     409 
     410#: default-templates/editmessage.html:9 
     411#: message.php:75 
     412#: message.php:255 
     413msgid "Edit message" 
     414msgstr "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 
     420msgid "finish" 
     421msgstr "terminer" 
     422 
     423#: default-templates/editmessage.html:69 
     424msgid "Edit a message" 
     425msgstr "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 
     432msgid "Message" 
     433msgstr "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 
     440msgid "preview" 
     441msgstr "prévisualiser" 
     442 
     443#: default-templates/editpost.html:9 
     444#: thread.php:124 
     445#: thread.php:374 
     446msgid "Edit thread" 
     447msgstr "Modifier la discussion" 
     448 
     449#: default-templates/editpost.html:64 
     450msgid "Edit the post" 
     451msgstr "Modifier la discussion" 
     452 
     453#: default-templates/editpost.html:71 
     454msgid "Edit a post" 
     455msgstr "Modifier la discussion" 
     456 
     457#: default-templates/editpost.html:78 
     458#: default-templates/newthread.html:75 
     459msgid "Subject" 
     460msgstr "Sujet" 
     461 
     462#: default-templates/editpost.html:86 
     463#: default-templates/newthread.html:83 
     464#: index.php:61 
     465#: index.php:239 
     466msgid "Category" 
     467msgstr "Catégorie" 
     468 
     469#: default-templates/login.html:61 
     470#: default-templates/register.html:68 
     471msgid "Username" 
     472msgstr "Identifiant" 
     473 
     474#: default-templates/login.html:66 
     475msgid "Password" 
     476msgstr "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 
     485msgid "send" 
     486msgstr "envoyer" 
     487 
     488#: default-templates/newthread.html:63 
     489msgid "Your new thread" 
     490msgstr "Votre nouvelle discussion" 
     491 
     492#: default-templates/newthread.html:70 
     493msgid "Add a thread" 
     494msgstr "Ajouter une discussion" 
     495 
     496#: default-templates/place.html:59 
     497msgid "This categorie's threads Atom feed" 
     498msgstr "Fil des discussions de cette catégorie" 
     499 
     500#: default-templates/place.html:62 
     501msgid "This category's messages Atom feed" 
     502msgstr "Fil des messages de cette catégorie" 
     503 
     504#: default-templates/place.html:71 
     505msgid "Subcategories" 
     506msgstr "Sous-catégories" 
     507 
     508#: default-templates/place.html:86 
     509msgid "Announcements" 
     510msgstr "Annonces" 
     511 
     512#: default-templates/place.html:119 
     513#: index.php:374 
     514#: index.php:388 
     515#: thread.php:287 
     516#: thread.php:335 
     517msgid "Threads" 
     518msgstr "Discussions" 
     519 
     520#: default-templates/profile.html:9 
     521#: default-templates/profile_me.html:9 
     522#: default-templates/profile_me.html:43 
     523msgid "Profile" 
     524msgstr "Profil" 
     525 
     526#: default-templates/profile.html:43 
     527msgid "profile" 
     528msgstr "profil" 
     529 
     530#: default-templates/profile.html:49 
     531#: default-templates/profile_me.html:60 
     532msgid "Name or nickname" 
     533msgstr "Nom ou pseudo" 
     534 
     535#: default-templates/profile.html:52 
     536#: default-templates/profile_me.html:70 
     537msgid "Website" 
     538msgstr "Site web" 
     539 
     540#: default-templates/profile.html:55 
     541#: default-templates/profile_me.html:85 
     542msgid "Creation date" 
     543msgstr "Date de création" 
     544 
     545#: default-templates/profile.html:58 
     546#: default-templates/profile_me.html:89 
     547msgid "Update date" 
     548msgstr "Date de mise à jour" 
     549 
     550#: default-templates/profile_me.html:54 
     551msgid "My informations" 
     552msgstr "Mes informations" 
     553 
     554#: default-templates/profile_me.html:65 
     555#: default-templates/register.html:73 
     556msgid "Email address" 
     557msgstr "Adresse email" 
     558 
     559#: default-templates/profile_me.html:75 
     560msgid "New password" 
     561msgstr "Nouveau mot de passe" 
     562 
     563#: default-templates/profile_me.html:80 
     564msgid "Confirm password" 
     565msgstr "Confirmer le mot de passe" 
     566 
     567#: default-templates/profile_me.html:99 
     568#: message.php:293 
     569#: thread.php:480 
     570msgid "save" 
     571msgstr "enregistrer" 
     572 
     573#: default-templates/register.html:55 
     574msgid "Your infos" 
     575msgstr "Vos infos" 
     576 
     577#: default-templates/register.html:62 
     578msgid "Register an account" 
     579msgstr "Enregister un compte" 
     580 
     581#: default-templates/register.html:81 
     582msgid "Username must contain at least 2 characters using letters, numbers or symbols." 
     583msgstr "L'identifiant doit contenir au moins 2 caractères parmi lettres, chiffres et symbôles." 
     584 
     585#: default-templates/thread.html:63 
     586msgid "Permalink" 
     587msgstr "Lien permanent" 
     588 
     589#: default-templates/thread.html:65 
     590#: default-templates/thread.html:120 
     591msgid "edit" 
     592msgstr "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 
     600msgid "delete" 
     601msgstr "supprimer" 
     602 
     603#: default-templates/thread.html:83 
     604#: thread.php:419 
     605msgid "Attachments" 
     606msgstr "Pièces jointes" 
     607 
     608#: default-templates/thread.html:117 
     609msgid "On" 
     610msgstr "Le" 
     611 
     612#: default-templates/thread.html:150 
     613msgid "Status of thread has been modified." 
     614msgstr "Le status des messages a été modifié" 
     615 
     616#: default-templates/thread.html:166 
     617msgid "Your answer" 
     618msgstr "Votre réponse" 
     619 
     620#: default-templates/thread.html:174 
     621msgid "Add a message" 
     622msgstr "Ajouter un message" 
     623 
     624#: default-templates/thread.html:198 
     625msgid "This thread's messages Atom feed" 
     626msgstr "Fil Atom des messages de cette dicussion" 
     627 
     628#: default-templates/thread.html:198 
     629msgid "This thread's messages feed" 
     630msgstr "Fil des messages de cette discussion" 
     631 
     632#: default-templates/thread.html:201 
     633msgid "Thread closed" 
     634msgstr "Discussion close" 
     635 
     636#: inc/class.agora.log.php:106 
     637#: inc/class.agora.log.php:112 
     638#: inc/class.agora.log.php:134 
     639msgid "No such log ID" 
     640msgstr "Aucun log ID" 
     641 
     642#: inc/class.agora.log.php:146 
     643msgid "No log message" 
     644msgstr "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 
     652msgid "pending" 
     653msgstr "en attente" 
     654 
     655#: inc/class.agora.php:26 
     656msgid "suspended" 
     657msgstr "suspendu" 
     658 
     659#: inc/class.agora.php:27 
     660msgid "active" 
     661msgstr "actif" 
     662 
     663#: inc/class.agora.php:29 
     664#: lib/admin.messages.pager.php:89 
     665#: message.php:345 
     666#: thread.php:588 
     667msgid "junk" 
     668msgstr "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 
     675msgid "unpublished" 
     676msgstr "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 
     683msgid "published" 
     684msgstr "publié" 
     685 
     686#: inc/class.agora.php:162 
     687msgid "Cannot login. Empty password." 
     688msgstr "Connexion impossible. Mot de passe vide." 
     689 
     690#: inc/class.agora.php:167 
     691msgid "Cannot login. Check." 
     692msgstr "Connexion impossible. Vérifiez." 
     693 
     694#: inc/class.agora.php:171 
     695msgid "User is not a member of forum" 
     696msgstr "L'utilisateur n'est pas membre de l'agora" 
     697 
     698#: inc/class.agora.php:206 
     699msgid "Account confirmation request on Agora" 
     700msgstr "Confirmation de création compte pour l'Agora" 
     701 
     702#: inc/class.agora.php:208 
     703msgid "Welcome to the forum of %s" 
     704msgstr "Bienvenue sur le forum de %s" 
     705 
     706#: inc/class.agora.php:209 
     707msgid "To activate your account and verify your e-mail address, please click on the following link:" 
     708msgstr "Pour activer le compte, vérifiez votre adresse email, cliquez sur le lien suivant :" 
     709 
     710#: inc/class.agora.php:213 
     711msgid "Your indormations:" 
     712msgstr "Vos informations :" 
     713 
     714#: inc/class.agora.php:214 
     715msgid "Login: %s" 
     716msgstr "Identifiant : %s" 
     717 
     718#: inc/class.agora.php:215 
     719msgid "Password: %s" 
     720msgstr "Mot de passe : %s" 
     721 
     722#: inc/class.agora.php:218 
     723msgid "If you have received this mail in error, you do not need to take any action to cancel the account." 
     724msgstr "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 
     727msgid "The account will not be activated, and you will not receive any further emails." 
     728msgstr "Le compte ne sera pas activé et vous ne recevrez pas d'autre emails." 
     729 
     730#: inc/class.agora.php:220 
     731msgid "If clicking the link above does not work, copy and paste the URL in a new browser window instead." 
     732msgstr "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 
     735msgid "Thank you for particape to our agora." 
     736msgstr "Merci de participer à notre agora." 
     737 
     738#: inc/class.agora.php:224 
     739msgid "This is a post-only mailing. Replies to this message are not monitored or answered." 
     740msgstr "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 
     743msgid "You are not allowed to close this thread" 
     744msgstr "Vous n'êtes pas autorisé à clôre la discussion." 
     745 
     746#: inc/class.agora.php:371 
     747msgid "You are not allowed to mark this entry as closed" 
     748msgstr "Vous n'êtes pas autorisé à marquer la discussion comme close" 
     749 
     750#: inc/class.agora.php:606 
     751msgid "You are not allowed to create an message" 
     752msgstr "Vous n'êtes pas autorisé à créer un message" 
     753 
     754#: inc/class.agora.php:650 
     755msgid "You are not allowed to update comments" 
     756msgstr "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 
     761msgid "No such message ID" 
     762msgstr "Aucun message avec cet ID" 
     763 
     764#: inc/class.agora.php:669 
     765msgid "You are not allowed to update this message" 
     766msgstr "Vous n'êtes pas autorisé à mettre à jour ce message" 
     767 
     768#: inc/class.agora.php:698 
     769msgid "You are not allowed to change this message's status" 
     770msgstr "Vous n'êtes pas autorisé à changer l'état des messages" 
     771 
     772#: inc/class.agora.php:720 
     773msgid "You are not allowed to change this entry status" 
     774msgstr "Vous n'êtes pas autorisé à modifier l'état de cette discussion" 
     775 
     776#: inc/class.agora.php:739 
     777msgid "You are not allowed to delete messages" 
     778msgstr "Vous n'êtes pas autorisé à supprimer ce message" 
     779 
     780#: inc/class.agora.php:761 
     781msgid "You are not allowed to delete this comment" 
     782msgstr "Vous n'êtes pas autorisé à supprimer ce message" 
     783 
     784#: inc/class.agora.php:776 
     785msgid "No message content" 
     786msgstr "Aucun contenu pour le message" 
     787 
     788#: inc/class.agora.php:788 
     789msgid "No message content xhtml" 
     790msgstr "Aucun contenu xhtml pour le message" 
     791 
     792#: inc/class.agora.template.php:159 
     793msgid "no thread" 
     794msgstr "aucune discussion" 
     795 
     796#: inc/class.agora.template.php:160 
     797msgid "one thread" 
     798msgstr "une discussion" 
     799 
     800#: inc/class.agora.template.php:192 
     801msgid "no answer" 
     802msgstr "aucune réponse" 
     803 
     804#: inc/class.agora.template.php:193 
     805msgid "one answer" 
     806msgstr "une réponse" 
     807 
     808#: inc/class.agora.template.php:194 
     809msgid "%d answers" 
     810msgstr "%d réponses" 
     811 
     812#: index.php:48 
     813msgid "No thread" 
     814msgstr "Aucune discussion" 
     815 
     816#: index.php:59 
     817#: index.php:238 
     818#: lib/admin.messages.pager.php:30 
     819msgid "Title" 
     820msgstr "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 
     828msgid "Date" 
     829msgstr "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 
     837msgid "Author" 
     838msgstr "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 
     846msgid "Messages" 
     847msgstr "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 
     856msgid "Status" 
     857msgstr "État" 
     858 
     859#: index.php:71 
     860#: index.php:84 
     861#: lib/admin.messages.pager.php:41 
     862#: lib/admin.messages.pager.php:54 
     863msgid "Page(s)" 
     864msgstr "Page(s)" 
     865 
     866#: index.php:105 
     867msgid "scheduled" 
     868msgstr "programmé" 
     869 
     870#: index.php:115 
     871msgid "None" 
     872msgstr "Aucun" 
     873 
     874#: index.php:120 
     875msgid "protected" 
     876msgstr "protégé" 
     877 
     878#: index.php:125 
     879#: index.php:221 
     880msgid "selected" 
     881msgstr "sélectionné" 
     882 
     883#: index.php:131 
     884msgid "%d attachment" 
     885msgstr "%d annexe" 
     886 
     887#: index.php:131 
     888msgid "%d attachments" 
     889msgstr "%d annexes" 
     890 
     891#: index.php:143 
     892#: lib/admin.messages.pager.php:103 
     893#: message.php:356 
     894#: thread.php:599 
     895msgid "%Y-%m-%d %H:%M" 
     896msgstr "%Y-%m-%d %H:%M" 
     897 
     898#: index.php:222 
     899msgid "not selected" 
     900msgstr "non sélectionné" 
     901 
     902#: index.php:242 
     903msgid "Selected" 
     904msgstr "Sélectionné" 
     905 
     906#: index.php:246 
     907#: messages.php:40 
     908msgid "Descending" 
     909msgstr "Décroissant" 
     910 
     911#: index.php:247 
     912#: messages.php:41 
     913msgid "Ascending" 
     914msgstr "Croissant" 
     915 
     916#: index.php:256 
     917msgid "Publish" 
     918msgstr "Publier" 
     919 
     920#: index.php:257 
     921msgid "Unpublish" 
     922msgstr "Hors ligne" 
     923 
     924#: index.php:258 
     925msgid "Schedule" 
     926msgstr "Programmer" 
     927 
     928#: index.php:259 
     929msgid "Mark as pending" 
     930msgstr "En attente" 
     931 
     932#: index.php:262 
     933msgid "Mark" 
     934msgstr "Marquer" 
     935 
     936#: index.php:263 
     937msgid "Mark as selected" 
     938msgstr "Sélectionné" 
     939 
     940#: index.php:264 
     941msgid "Mark as unselected" 
     942msgstr "Non sélectionné" 
     943 
     944#: index.php:266 
     945#: index.php:269 
     946#: index.php:269 
     947msgid "Change" 
     948msgstr "Changer" 
     949 
     950#: index.php:266 
     951msgid "Change category" 
     952msgstr "Changer la catégorie" 
     953 
     954#: index.php:270 
     955msgid "Change author" 
     956msgstr "Changer l'auteur" 
     957 
     958#: index.php:274 
     959#: index.php:274 
     960msgid "Delete" 
     961msgstr "Supprimer" 
     962 
     963#: index.php:382 
     964msgid "Are you sure you want to delete selected threads?" 
     965msgstr "Ê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 
     971msgid "Filters" 
     972msgstr "Filtres" 
     973 
     974#: index.php:403 
     975#: messages.php:177 
     976msgid "Author:" 
     977msgstr "Auteur :" 
     978 
     979#: index.php:407 
     980#: messages.php:160 
     981msgid "Status:" 
     982msgstr "État :" 
     983 
     984#: index.php:412 
     985msgid "Selected:" 
     986msgstr "Sélectionné :" 
     987 
     988#: index.php:414 
     989msgid "Month:" 
     990msgstr "Mois :" 
     991 
     992#: index.php:416 
     993msgid "Lang:" 
     994msgstr "Langue :" 
     995 
     996#: index.php:421 
     997#: messages.php:168 
     998msgid "Order by:" 
     999msgstr "Trier par :" 
     1000 
     1001#: index.php:423 
     1002#: messages.php:171 
     1003msgid "Sort:" 
     1004msgstr "Trier :" 
     1005 
     1006#: index.php:426 
     1007msgid "Entries per page" 
     1008msgstr "Billets par page" 
     1009 
     1010#: index.php:428 
     1011#: messages.php:182 
     1012msgid "filter" 
     1013msgstr "filtre" 
     1014 
     1015#: index.php:444 
     1016msgid "Selected threads action:" 
     1017msgstr "Action sur les discussions sélectionnées :" 
     1018 
     1019#: index.php:446 
     1020#: messages.php:213 
     1021#: thread.php:551 
     1022msgid "ok" 
     1023msgstr "ok" 
     1024 
     1025#: lib/admin.messages.pager.php:19 
     1026#: thread.php:539 
     1027msgid "No message" 
     1028msgstr "Aucun message" 
     1029 
     1030#: lib/admin.messages.pager.php:107 
     1031#: message.php:360 
     1032#: thread.php:603 
     1033msgid "Edit this message" 
     1034msgstr "Modifier ce message" 
     1035 
     1036#: message.php:26 
     1037msgid "New message" 
     1038msgstr "Nouveau message" 
     1039 
     1040#: message.php:62 
     1041msgid "This message does not exist." 
     1042msgstr "Ce message n'existe pas." 
     1043 
     1044#: message.php:202 
     1045msgid "Are you sure you want to delete this message?" 
     1046msgstr "Êtes-vous sûr de vouloir supprimer les messages sélectionnés" 
     1047 
     1048#: message.php:224 
     1049msgid "Message has been successfully updated." 
     1050msgstr "Le message a été mis à jour avec succès." 
     1051 
     1052#: message.php:227 
     1053msgid "Message has been successfully created." 
     1054msgstr "Le message a été créé avec succès." 
     1055 
     1056#: message.php:236 
     1057msgid "Don't forget to validate your XHTML conversion by saving your message." 
     1058msgstr "Enregistrez votre message pour valider la transformation en XHTML." 
     1059 
     1060#: message.php:260 
     1061msgid "Message status:" 
     1062msgstr "État du message :" 
     1063 
     1064#: message.php:264 
     1065#: thread.php:387 
     1066msgid "Published on:" 
     1067msgstr "Publié le :" 
     1068 
     1069#: message.php:267 
     1070#: thread.php:390 
     1071msgid "Text formating:" 
     1072msgstr "Format du texte :" 
     1073 
     1074#: message.php:269 
     1075#: thread.php:392 
     1076msgid "Convert to XHTML" 
     1077msgstr "Convertir en XHTML" 
     1078 
     1079#: message.php:282 
     1080#: options.php:82 
     1081#: thread.php:461 
     1082#: thread.php:469 
     1083msgid "Required field" 
     1084msgstr "Champ obligatoire" 
     1085 
     1086#: message.php:283 
     1087#: thread.php:470 
     1088msgid "Content:" 
     1089msgstr "Contenu :" 
     1090 
     1091#: message.php:324 
     1092#: thread.php:567 
     1093msgid "IP address" 
     1094msgstr "Adresse IP" 
     1095 
     1096#: messages.php:34 
     1097msgid "Entry title" 
     1098msgstr "Titre du billet" 
     1099 
     1100#: messages.php:98 
     1101#: thread.php:514 
     1102msgid "publish" 
     1103msgstr "publier" 
     1104 
     1105#: messages.php:99 
     1106#: thread.php:515 
     1107msgid "unpublish" 
     1108msgstr "hors ligne" 
     1109 
     1110#: messages.php:100 
     1111#: thread.php:516 
     1112msgid "mark as pending" 
     1113msgstr "en attente" 
     1114 
     1115#: messages.php:101 
     1116#: thread.php:517 
     1117msgid "mark as junk" 
     1118msgstr "indésirable" 
     1119 
     1120#: messages.php:139 
     1121msgid "Are you sure you want to delete these messages?" 
     1122msgstr "Êtes-vous sûr de vouloir supprimer les messages sélectionnés" 
     1123 
     1124#: messages.php:164 
     1125msgid "Messages per page" 
     1126msgstr "Messages par page" 
     1127 
     1128#: messages.php:193 
     1129msgid "You have one spam message." 
     1130msgstr "Vous avez un message spam." 
     1131 
     1132#: messages.php:194 
     1133msgid "Show it." 
     1134msgstr "L'afficher" 
     1135 
     1136#: messages.php:196 
     1137msgid "You have %s spam messages." 
     1138msgstr "Vous avez %s messages spam." 
     1139 
     1140#: messages.php:197 
     1141msgid "Show them." 
     1142msgstr "Les afficher." 
     1143 
     1144#: messages.php:210 
     1145#: thread.php:547 
     1146msgid "Selected messages action:" 
     1147msgstr "Action pour les messages sélectionnés" 
     1148 
     1149#: messages_actions.php:93 
     1150msgid "back" 
     1151msgstr "retour" 
     1152 
     1153#: options.php:30 
    911154msgid "No agora announce." 
    92 msgstr "Aucune annonce pour l'Agora" 
    93  
    94 #: index.php:53 
     1155msgstr "Aucune annonce pour l'agora" 
     1156 
     1157#: options.php:40 
    951158msgid "Configuration successfully updated." 
    96 msgstr "La configuration a été mise à jour avec succès." 
    97  
    98 #: index.php:76 
     1159msgstr "Configuration mise à jour avec succès." 
     1160 
     1161#: options.php:68 
    991162msgid "Plugin activation" 
    1001163msgstr "Activation de l'extension" 
    1011164 
    102 #: index.php:81 
     1165#: options.php:73 
    1031166msgid "Enable Agora" 
    1041167msgstr "Activer Agora" 
    1051168 
    106 #: index.php:88 
     1169#: options.php:80 
    1071170msgid "Presentation options" 
    1081171msgstr "Options de présentation" 
    1091172 
    110 #: index.php:89 
    111 msgid "Required field" 
    112 msgstr "Champ obligatoire" 
    113  
    114 #: index.php:90 
     1173#: options.php:83 
    1151174msgid "Agora announce:" 
    116 msgstr "Connexion à l'Agora :" 
    117  
    118 #: index.php:97 
     1175msgstr "Annonce de l'Agora" 
     1176 
     1177#: options.php:93 
     1178msgid "Display %s messages per feed" 
     1179msgstr "Afficher %s messages par fil" 
     1180 
     1181#: options.php:104 
    1191182msgid "Save configuration" 
    1201183msgstr "Enregistrer la configuration" 
    1211184 
    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 
     1188msgid "Most used" 
     1189msgstr "Plus utilisées" 
     1190 
     1191#: thread.php:80 
     1192#: thread.php:84 
     1193msgid "Available" 
     1194msgstr "Disponible" 
     1195 
     1196#: thread.php:103 
     1197msgid "This thread does not exist." 
     1198msgstr "Cette discussion n'existe pas." 
     1199 
     1200#: thread.php:134 
     1201msgid "next thread" 
     1202msgstr "discussion suivante" 
     1203 
     1204#: thread.php:141 
     1205msgid "previous thread" 
     1206msgstr "discussion précédente" 
     1207 
     1208#: thread.php:290 
     1209msgid "Are you sure you want to delete this thread?" 
     1210msgstr "Êtes-vous sûr de vouloir supprimer cette discussion ?" 
     1211 
     1212#: thread.php:312 
     1213msgid "Thread has been successfully updated." 
     1214msgstr "La discusssion a été mise à jour avec succès." 
     1215 
     1216#: thread.php:315 
     1217msgid "Thread has been successfully created." 
     1218msgstr "La discussion a été créée avec succès." 
     1219 
     1220#: thread.php:318 
     1221msgid "File has been successfully attached." 
     1222msgstr "Fichier attaché avec succès." 
     1223 
     1224#: thread.php:321 
     1225msgid "Attachment has been successfully removed." 
     1226msgstr "Pièce jointe retirée avec succès." 
     1227 
     1228#: thread.php:331 
     1229msgid "Don't forget to validate your XHTML conversion by saving your post." 
     1230msgstr "Enregistrez votre billet pour valider la transformation en XHTML." 
     1231 
     1232#: thread.php:338 
     1233msgid "View thread" 
     1234msgstr "Visualiser la discussion" 
     1235 
     1236#: thread.php:345 
     1237msgid "Preview thread" 
     1238msgstr "Prévisualier la discussion" 
     1239 
     1240#: thread.php:383 
     1241msgid "Thread status:" 
     1242msgstr "État de la discussion :" 
     1243 
     1244#: thread.php:396 
     1245msgid "Accept messages" 
     1246msgstr "Accepter les messages" 
     1247 
     1248#: thread.php:398 
     1249msgid "Selected thread" 
     1250msgstr "Discussion sélectionnée" 
     1251 
     1252#: thread.php:400 
     1253msgid "Thread lang:" 
     1254msgstr "Langue de la discussion :" 
     1255 
     1256#: thread.php:403 
     1257msgid "Thread password:" 
     1258msgstr "Mot de passe de la discussion :" 
     1259 
     1260#: thread.php:408 
     1261msgid "Basename:" 
     1262msgstr "URL spécifique :" 
     1263 
     1264#: thread.php:412 
     1265msgid "Warning: If you set the URL manually, it may conflict with another thread." 
     1266msgstr "Attention : si vous indiquez l'URL manuellement, celle-ci peut entrer en conflit avec une autre discussion." 
     1267 
     1268#: thread.php:435 
     1269msgid "open" 
     1270msgstr "ouvrir" 
     1271 
     1272#: thread.php:439 
     1273msgid "remove" 
     1274msgstr "supprimer" 
     1275 
     1276#: thread.php:448 
     1277msgid "No attachment." 
     1278msgstr "Aucune pièce jointe" 
     1279 
     1280#: thread.php:450 
     1281msgid "Add files to this page" 
     1282msgstr "Ajouter un fichier à la page" 
     1283 
     1284#: thread.php:465 
     1285msgid "Excerpt:" 
     1286msgstr "Extrait :" 
     1287 
     1288msgid "Forum" 
     1289msgstr "Forum" 
     1290 
    1701291msgid "Agora connection:" 
    1711292msgstr "Connexion à l'Agora :" 
    1721293 
    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  
     1294msgid "no message" 
     1295msgstr "aucun message" 
     1296 
     1297msgid "one message" 
     1298msgstr "un message" 
     1299 
Note: See TracChangeset for help on using the changeset viewer.

Sites map