Dotclear

Changeset 3065


Ignore:
Timestamp:
08/02/11 00:19:10 (12 years ago)
Author:
JcDenis
Message:

lastpostsExtend 2011.08.01

  • Added support of plugin muppet (post types)
  • Try to fix date compare on sql request
Location:
plugins/lastpostsExtend
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • plugins/lastpostsExtend/_admin.php

    r2143 r3065  
    33# This file is part of lastpostsExtend, a plugin for Dotclear 2. 
    44#  
    5 # Copyright (c) 2009-2010 JC Denis and contributors 
     5# Copyright (c) 2009-2011 JC Denis and contributors 
    66# jcdenis@gdwd.com 
    77#  
  • plugins/lastpostsExtend/_define.php

    r2562 r3065  
    33# This file is part of lastpostsExtend, a plugin for Dotclear 2. 
    44#  
    5 # Copyright (c) 2009-2010 JC Denis and contributors 
     5# Copyright (c) 2009-2011 JC Denis and contributors 
    66# jcdenis@gdwd.com 
    77#  
     
    1717     /* Description*/    "Widget like lastposts with extended options", 
    1818     /* Author */        "JC Denis", 
    19      /* Version */       '0.10', 
     19     /* Version */       '2011.08.01', 
    2020     /* Permissions */   'admin' 
    2121); 
    22      /* date */          #20100819 
    2322?> 
  • plugins/lastpostsExtend/_public.php

    r2143 r3065  
    33# This file is part of lastpostsExtend, a plugin for Dotclear 2. 
    44#  
    5 # Copyright (c) 2009-2010 JC Denis and contributors 
     5# Copyright (c) 2009-2011 JC Denis and contributors 
    66# jcdenis@gdwd.com 
    77#  
  • plugins/lastpostsExtend/_widgets.php

    r2562 r3065  
    33# This file is part of lastpostsExtend, a plugin for Dotclear 2. 
    44#  
    5 # Copyright (c) 2009-2010 JC Denis and contributors 
     5# Copyright (c) 2009-2011 JC Denis and contributors 
    66# jcdenis@gdwd.com 
    77#  
     
    3535          ); 
    3636          # type 
     37          $posttypes = array( 
     38               __('Post') => 'post', 
     39               __('Page') => 'page', 
     40               __('Gallery') => 'galitem' 
     41          ); 
     42          # plugin muppet types 
     43          if ($core->plugins->moduleExists('muppet')) { 
     44               $muppet_types = muppet::getPostTypes(); 
     45               if(is_array($muppet_types) && !empty($muppet_types)) { 
     46                
     47                    foreach($muppet_types as $k => $v) { 
     48                         $posttypes[$v['name']] = $k; 
     49                    } 
     50               } 
     51          } 
    3752          $w->lastpostsextend->setting( 
    3853               'posttype', 
     
    4055               'post', 
    4156               'combo', 
    42                array( 
    43                     __('Post') => 'post', 
    44                     __('Page') => 'page', 
    45                     __('Gallery') => 'galitem' 
    46                ) 
     57               $posttypes 
    4758          ); 
    4859          # Category (post and page have same category) 
     
    233244          { 
    234245               $params['sql'] .=  
     246               "AND post_creadt < post_upddt ". 
     247               "AND post_dt < post_upddt "; 
     248/* 
     249               $params['sql'] .=  
    235250               "AND TIMESTAMP(post_creadt ,'DD-MM-YYYY HH24:MI:SS') < TIMESTAMP(post_upddt ,'DD-MM-YYYY HH24:MI:SS') ". 
    236251               "AND TIMESTAMP(post_dt ,'DD-MM-YYYY HH24:MI:SS') < TIMESTAMP(post_upddt ,'DD-MM-YYYY HH24:MI:SS') "; 
    237  
     252*/ 
    238253               $params['order'] = $w->sortby == 'date' ? 'post_upddt ' : $w->sortby.' '; 
    239254          } 
  • plugins/lastpostsExtend/release.txt

    r2562 r3065  
     12011.08.01 
     2 * Added support of plugin muppet (post types) 
     3 * Try to fix date compare on sql request 
     4 
    150.10 20100819 
    26 * Sort by comments (annso) 
Note: See TracChangeset for help on using the changeset viewer.

Sites map