Dotclear

Changeset 2394


Ignore:
Timestamp:
06/25/10 07:57:21 (13 years ago)
Author:
JcDenis
Message:

rateIt 2.0-alpha2

  • Fixed (hope so) postgreSQL compatibility
  • Fixed high note on 'double' style
  • Fixed admin crash on non 2.2
Location:
plugins/rateIt
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • plugins/rateIt/_define.php

    r2358 r2394  
    1717     /* Description*/         "Rating system for your blogs", 
    1818     /* Author */             "JC Denis", 
    19      /* Version */            '2.0-alpha', 
     19     /* Version */            '2.0-alpha2', 
    2020     /* Permissions */        'admin' 
    2121); 
    22      /* date */          #20100613 
     22     /* date */          #20100625 
    2323?> 
  • plugins/rateIt/_prepend.php

    r2358 r2394  
    1212 
    1313if (!defined('DC_RC_PATH')){return;} 
     14if (version_compare(DC_VERSION,'2.2-alpha','<')){return;} 
    1415 
    1516global $__autoload, $core; 
  • plugins/rateIt/_public.php

    r2358 r2394  
    270270          "</script> \n". 
    271271          "<script type=\"text/javascript\" src=\"". 
    272                $core->blog->url.$core->url->getBase('rateItmodule')."/js/jquery.rateit.js\"></script> \n". 
     272               $core->blog->url.$core->url->getBase('rateItmodule').'/js/jquery.rateit.js">'. 
     273          "</script> \n". 
    273274          "<script type=\"text/javascript\"> \n". 
    274275          "//<![CDATA[\n". 
     
    526527          if ($w->show_fullnote && in_array($style,array('twin','simple'))) 
    527528          { 
    528                $res .= '<p>'.rateItContext::value('mincount',$type,$id,$rs->mincount).'</p>'; 
     529               $res .= '<p>'.rateItContext::value('maxcount',$type,$id,$rs->maxcount).'</p>'; 
    529530          } 
    530531           
  • plugins/rateIt/default-templates/js/jquery.rateit.js

    r2358 r2394  
    4545                                   $('input.rateit-'+type+'-'+id).rating({readOnly:true}); 
    4646                                   if ($('input.rateit-'+type+'-'+id).hasClass('rateit-loop-prevent')){ 
    47                                         //$('input.rateit-'+type+'-'+id).rating('disable'); 
     47                                        /*$('input.rateit-'+type+'-'+id).rating('disable');*/ 
    4848                                   } 
    4949                                   else{ 
     
    7373                                                       $('*').find('.rateit-fullnote-'+type+'-'+id).each(function(){$(this).text(data.find('item').attr('note')+'/'+data.find('item').attr('quotient'))}); 
    7474                                                        
    75                                                        if (msg_thanks!='') 
     75                                                       if (msg_thanks!=''){ 
    7676                                                            $('*').find('.rateit-linker-'+type+'-'+id).each(function(){$(this).empty().append('<p>'+msg_thanks+'</p>')}); 
    77  
     77                                                       } 
    7878                                                  }else{ 
    7979                                                       alert($(data).find('message').text()); 
  • plugins/rateIt/inc/class.rateit.php

    r2358 r2394  
    289289          { 
    290290               $strReq = 
    291                'SELECT DISTINCT '. 
     291               'SELECT '. 
    292292               'SUM(RI.rateit_note / RI.rateit_quotient) as rateit_sum, '. 
    293293               'MAX(RI.rateit_note / RI.rateit_quotient) as rateit_max, '. 
    294294               'MIN(RI.rateit_note / RI.rateit_quotient) as rateit_min, '. 
     295               'MAX(RI.rateit_time) as rateit_time, '. 
    295296               '(SUM(RI.rateit_note / RI.rateit_quotient) / COUNT(RI.rateit_note)) as rateit_avg, '; 
    296297                
  • plugins/rateIt/inc/modules/lib.rateit.module.category.public.php

    r2358 r2394  
    6666          $p['columns'][] = 'C.cat_title AS title'; 
    6767          $p['columns'][] = 'C.cat_id AS id'; 
    68           if (!isset($p['groups'])) $p['groups'] = array(); 
     68           
    6969          $p['groups'][] = 'C.cat_url'; 
    7070          $p['groups'][] = 'C.cat_title'; 
     71          $p['groups'][] = 'C.cat_id'; 
     72           
    7173          $p['from'] .= ' INNER JOIN '.$core->prefix.'category C ON CAST(C.cat_id as char)=RI.rateit_id '; 
    7274/* 
  • plugins/rateIt/inc/modules/lib.rateit.module.cinecturlink2.public.php

    r2358 r2394  
    5353          $p['columns'][] = 'C.link_title AS title'; 
    5454          $p['columns'][] = 'C.link_id AS id'; 
    55           if (!isset($p['groups'])) $p['groups'] = array(); 
     55           
    5656          $p['groups'][] = 'C.link_id'; 
    5757          $p['groups'][] = 'C.link_title'; 
     58           
    5859          $p['from'] .= ' INNER JOIN '.$core->prefix.'cinecturlink2 C ON CAST(C.link_id as char)=RI.rateit_id '; 
    5960     } 
  • plugins/rateIt/inc/modules/lib.rateit.module.comment.public.php

    r2358 r2394  
    5151           
    5252          $p['columns'][] = $core->con->concat("'".$core->blog->url.$core->getPostPublicUrl('post','')."'",'P.post_url').' AS url'; 
    53           $p['columns'][] = 'P.post_title AS title'; 
     53          $p['columns'][] = 'C.comment_author AS title'; 
    5454          $p['columns'][] = 'C.comment_id AS id'; 
    55           if (!isset($p['groups'])) $p['groups'] = array(); 
     55           
     56          $p['groups'][] = 'C.comment_id'; 
     57          $p['groups'][] = 'C.comment_author'; 
    5658          $p['groups'][] = 'P.post_url'; 
    57           $p['groups'][] = 'P.post_title'; 
     59           
    5860          $p['from'] .= ' INNER JOIN '.$core->prefix.'comment C ON CAST(C.comment_id as char)=RI.rateit_id '; 
    5961          $p['from'] .= ' INNER JOIN '.$core->prefix.'post P ON C.comment_id = P.post_id '; 
  • plugins/rateIt/inc/modules/lib.rateit.module.gallery.admin.php

    r2360 r2394  
    2929          if ($action == 'save_moule_galitem') 
    3030          { 
    31                $core->blog->settings->rateit->put('rateit_galitem_active',!empty(,$_POST['rateit_galitem_active']),'boolean','rateit addon gallery item enabled',true,false); 
     31               $core->blog->settings->rateit->put('rateit_galitem_active',!empty($_POST['rateit_galitem_active']),'boolean','rateit addon gallery item enabled',true,false); 
    3232               $core->blog->settings->rateit->put('rateit_galitemtpl',!empty($_POST['rateit_galitemtpl']),'boolean','rateit template gallery items page',true,false); 
    3333                
  • plugins/rateIt/inc/modules/lib.rateit.module.gallery.public.php

    r2358 r2394  
    104104               $p['columns'][] = 'P.post_title AS title'; 
    105105               $p['columns'][] = 'P.post_id AS id'; 
    106                if (!isset($p['groups'])) $p['groups'] = array(); 
     106                
    107107               $p['groups'][] = 'P.post_url'; 
    108108               $p['groups'][] = 'P.post_title'; 
    109109               $p['groups'][] = 'P.post_id'; 
     110                
    110111               $p['from'] .= ' INNER JOIN '.$core->prefix.'post P ON CAST(P.post_id as char)=RI.rateit_id '; 
    111112               $p['sql'] .= "AND post_type='gal' "; 
     
    124125               $p['columns'][] = 'P.post_title AS title'; 
    125126               $p['columns'][] = 'P.post_id AS id'; 
    126                if (!isset($p['groups'])) $p['groups'] = array(); 
     127                
    127128               $p['groups'][] = 'P.post_url'; 
    128129               $p['groups'][] = 'P.post_title'; 
    129130               $p['groups'][] = 'P.post_id'; 
     131                
    130132               $p['from'] .= ' INNER JOIN '.$core->prefix.'post P ON CAST(P.post_id as char)=RI.rateit_id '; 
    131133               $p['sql'] .= "AND post_type='galitem' "; 
  • plugins/rateIt/inc/modules/lib.rateit.module.post.public.php

    r2358 r2394  
    7070           
    7171          $p['columns'][] = $core->con->concat("'".$core->blog->url.$core->getPostPublicUrl('post','')."'",'P.post_url').' AS url'; 
    72           $p['columns'][] = 'P.post_url AS url'; 
    7372          $p['columns'][] = 'P.post_title AS title'; 
    7473          $p['columns'][] = 'P.post_id AS id'; 
    75           if (!isset($p['groups'])) $p['groups'] = array(); 
     74           
    7675          $p['groups'][] = 'P.post_url'; 
    7776          $p['groups'][] = 'P.post_title'; 
    7877          $p['groups'][] = 'P.post_id'; 
     78           
    7979          $p['from'] .= ' INNER JOIN '.$core->prefix.'post P ON CAST(P.post_id as char)=RI.rateit_id '; 
    8080          $p['sql'] .= " AND P.post_type='post' AND P.post_status = 1 AND P.post_password IS NULL "; 
  • plugins/rateIt/inc/modules/lib.rateit.module.tag.public.php

    r2358 r2394  
    6767          $p['columns'][] = 'M.meta_id AS title'; 
    6868          $p['columns'][] = 'M.meta_id AS id'; 
    69           if (!isset($p['groups'])) $p['groups'] = array(); 
     69           
    7070          $p['groups'][] = 'M.meta_id'; 
     71           
    7172          $p['from'] .= ' INNER JOIN '.$core->prefix.'meta M ON M.meta_id=RI.rateit_id '; 
    7273          $p['sql'] .= "AND M.meta_type='tag' "; 
  • plugins/rateIt/index.php

    r2358 r2394  
    4040dcPage::jsVar('jcToolsBox.prototype.text_wait',__('Please wait')). 
    4141dcPage::jsVar('jcToolsBox.prototype.section',$section). 
    42 "\n//]]>\n</script>\n";; 
     42"\n//]]>\n</script>\n"; 
    4343 
    4444# Common menu 
  • plugins/rateIt/locales/fr/main.lang.php

    r2358 r2394  
    513513 
    514514#inc/modules/lib.rateit.module.post.admin.php:68 
    515 $GLOBALS['__l10n']['Limit to one category:'] = 'Limiter à une caégorie :'; 
     515$GLOBALS['__l10n']['Limit to one category:'] = 'Limiter à une catégorie :'; 
    516516 
    517517#inc/modules/lib.rateit.module.post.admin.php:72 
  • plugins/rateIt/locales/fr/main.po

    r2358 r2394  
    666666#: inc/modules/lib.rateit.module.post.admin.php:68 
    667667msgid "Limit to one category:" 
    668 msgstr "Limiter à une caégorie :" 
     668msgstr "Limiter à une catégorie :" 
    669669 
    670670#: inc/modules/lib.rateit.module.post.admin.php:72 
  • plugins/rateIt/release.txt

    r2358 r2394  
    11x.x.x xxxxxxxx 
    22 - Not added ability to explode post type rating in subcategories 
    3  - Not added other styles of rate (I love /I d'ont love) 
     3 - Not added rating on other post_type (see plugin muppet) 
    44 - Not added public API 
    55 - Not completed modules behaviors (delete/edit category, tag...) 
     6 
     72.0-alpha2 20100625 
     8 * Fixed (hope so) postgreSQL compatibility 
     9 * Fixed high note on 'double' style 
     10 * Fixed admin crash on non 2.2 
    611 
    7122.0-alpha 20100613 
Note: See TracChangeset for help on using the changeset viewer.

Sites map