Dotclear


Ignore:
Timestamp:
11/17/13 20:25:53 (12 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
2.6
Children:
2567:6c11245cbf04, 2568:61c67a7d17fa
Message:

Add some people in CREDITS, remove trailing spaces and tabs.

Location:
plugins/attachments
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • plugins/attachments/_admin.php

    r2360 r2566  
    3838     public static function postHeaders() 
    3939     { 
    40           return  
     40          return 
    4141          '<script type="text/javascript" src="index.php?pf=attachments/js/post.js"></script>'; 
    4242     } 
    43      public static function adminPostFormItems($main,$sidebar,$post)  
     43     public static function adminPostFormItems($main,$sidebar,$post) 
    4444     { 
    4545          if ($post !== null) 
     
    6666                    '<li>'.files::size($f->size).' - '. 
    6767                    '<a href="'.$f->file_url.'">'.__('open').'</a>'.'</li>'. 
    68                      
     68 
    6969                    '<li class="media-action"><a class="attachment-remove" id="attachment-'.$f->media_id.'" '. 
    7070                    'href="post_media.php?post_id='.$post->post_id.'&amp;media_id='.$f->media_id.'&amp;remove=1">'. 
    7171                    '<img src="images/trash.png" alt="'.__('remove').'" /></a>'. 
    7272                    '</li>'. 
    73                      
     73 
    7474                    '</ul>'. 
    7575                    '</div>'; 
    7676               } 
    7777               unset($f); 
    78                 
     78 
    7979               if (empty($post_media)) { 
    8080                    $item .= '<p class="form-note s-attachments">'.__('No attachment.').'</p>'; 
    81                }  
     81               } 
    8282               $item .= '<p class="s-attachments"><a class="button" href="media.php?post_id='.$post->post_id.'">'.__('Add files to this entry').'</a></p>'; 
    8383               $sidebar['metas-box']['items']['attachments']= $item; 
    8484          } 
    8585     } 
    86       
     86 
    8787     public static function adminPostAfterForm($post) { 
    8888          if ($post !== null) 
     
    9898     } 
    9999} 
    100 ?> 
  • plugins/attachments/_define.php

    r2257 r2566  
    2323     ) 
    2424); 
    25 ?> 
  • plugins/attachments/_public.php

    r1280 r2566  
    3131 
    3232class attachmentTpl { 
    33       
     33 
    3434     /*dtd 
    3535     <!ELEMENT tpl:Attachments - - -- Post Attachments loop --> 
     
    4242               '$_ctx->attachments = new ArrayObject($core->media->getPostMedia($_ctx->posts->post_id));'."\n". 
    4343          "?>\n". 
    44            
     44 
    4545          '<?php foreach ($_ctx->attachments as $attach_i => $attach_f) : '. 
    4646          '$GLOBALS[\'attach_i\'] = $attach_i; $GLOBALS[\'attach_f\'] = $attach_f;'. 
     
    4848          $content. 
    4949          '<?php endforeach; $_ctx->attachments = null; unset($attach_i,$attach_f,$_ctx->file_url); ?>'. 
    50            
     50 
    5151          "<?php } ?>\n"; 
    52            
     52 
    5353          return $res; 
    5454     } 
    55       
     55 
    5656     /*dtd 
    5757     <!ELEMENT tpl:AttachmentsHeader - - -- First attachments result container --> 
     
    6464          "<?php endif; ?>"; 
    6565     } 
    66       
     66 
    6767     /*dtd 
    6868     <!ELEMENT tpl:AttachmentsFooter - - -- Last attachments result container --> 
     
    7575          "<?php endif; ?>"; 
    7676     } 
    77       
     77 
    7878     /*dtd 
    7979     <!ELEMENT tpl:AttachmentsIf - - -- Test on attachment fields --> 
     
    8888     { 
    8989          $if = array(); 
    90            
     90 
    9191          $operator = isset($attr['operator']) ? dcTemplate::getOperator($attr['operator']) : '&&'; 
    92            
     92 
    9393          if (isset($attr['is_image'])) { 
    9494               $sign = (boolean) $attr['is_image'] ? '' : '!'; 
    9595               $if[] = $sign.'$attach_f->media_image'; 
    9696          } 
    97            
     97 
    9898          if (isset($attr['has_thumb'])) { 
    9999               $sign = (boolean) $attr['has_thumb'] ? '' : '!'; 
    100100               $if[] = $sign.'isset($attach_f->media_thumb[\'sq\'])'; 
    101101          } 
    102            
     102 
    103103          if (isset($attr['is_mp3'])) { 
    104104               $sign = (boolean) $attr['is_mp3'] ? '==' : '!='; 
    105105               $if[] = '$attach_f->type '.$sign.' "audio/mpeg3"'; 
    106106          } 
    107            
     107 
    108108          if (isset($attr['is_flv'])) { 
    109109               $sign = (boolean) $attr['is_flv'] ? '' : '!'; 
     
    113113                    '$attach_f->type == "video/x-m4v")'; 
    114114          } 
    115            
     115 
    116116          if (count($if) != 0) { 
    117117               return '<?php if('.implode(' '.$operator.' ', (array) $if).') : ?>'.$content.'<?php endif; ?>'; 
     
    120120          } 
    121121     } 
    122       
     122 
    123123     /*dtd 
    124124     <!ELEMENT tpl:AttachmentMimeType - O -- Attachment MIME Type --> 
     
    129129          return '<?php echo '.sprintf($f,'$attach_f->type').'; ?>'; 
    130130     } 
    131       
     131 
    132132     /*dtd 
    133133     <!ELEMENT tpl:AttachmentType - O -- Attachment type --> 
     
    138138          return '<?php echo '.sprintf($f,'$attach_f->media_type').'; ?>'; 
    139139     } 
    140       
     140 
    141141     /*dtd 
    142142     <!ELEMENT tpl:AttachmentFileName - O -- Attachment file name --> 
     
    147147          return '<?php echo '.sprintf($f,'$attach_f->basename').'; ?>'; 
    148148     } 
    149       
     149 
    150150     /*dtd 
    151151     <!ELEMENT tpl:AttachmentSize - O -- Attachment size --> 
     
    162162          return '<?php echo '.sprintf($f,'files::size($attach_f->size)').'; ?>'; 
    163163     } 
    164       
     164 
    165165     /*dtd 
    166166     <!ELEMENT tpl:AttachmentTitle - O -- Attachment title --> 
     
    171171          return '<?php echo '.sprintf($f,'$attach_f->media_title').'; ?>'; 
    172172     } 
    173       
     173 
    174174     /*dtd 
    175175     <!ELEMENT tpl:AttachmentThumbnailURL - O -- Attachment square thumbnail URL --> 
     
    185185          '?>'; 
    186186     } 
    187       
     187 
    188188     /*dtd 
    189189     <!ELEMENT tpl:AttachmentURL - O -- Attachment URL --> 
     
    194194          return '<?php echo '.sprintf($f,'$attach_f->file_url').'; ?>'; 
    195195     } 
    196       
     196 
    197197     public static function MediaURL($attr) 
    198198     { 
     
    200200          return '<?php echo '.sprintf($f,'$_ctx->file_url').'; ?>'; 
    201201     } 
    202       
     202 
    203203     /*dtd 
    204204     <!ELEMENT tpl:EntryAttachmentCount - O -- Number of attachments for entry --> 
     
    214214          $one = 'one attachment'; 
    215215          $more = '%d attachments'; 
    216            
     216 
    217217          if (isset($attr['none'])) { 
    218218               $none = addslashes($attr['none']); 
     
    224224               $more = addslashes($attr['more']); 
    225225          } 
    226            
     226 
    227227          return 
    228228          "<?php if (\$_ctx->posts->countMedia() == 0) {\n". 
     
    246246     } 
    247247} 
    248 ?> 
Note: See TracChangeset for help on using the changeset viewer.

Sites map