Dotclear


Ignore:
Timestamp:
02/11/16 15:35:39 (10 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

Cope with sort of "un-attached" media → allows new features as "featured media" plugin. Video and Audio HTML5 element are now used (if possible) rather than Flash object for attachments.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • admin/media.php

    r3165 r3167  
    3131$dir = null; 
    3232 
     33// Attachement type if any 
     34$link_type = !empty($_REQUEST['link_type']) ? $_REQUEST['link_type'] : null; 
     35 
    3336$page = !empty($_GET['page']) ? max(1,(integer) $_GET['page']) : 1; 
    3437$nb_per_page = ((integer) $core->auth->user_prefs->interface->media_by_page ? (integer) $core->auth->user_prefs->interface->media_by_page : 30); 
     
    8588$select = !empty($_REQUEST['select']) ? (integer)$_REQUEST['select'] : 0;  // 0 : none, 1 : single media, >1 : multiple medias 
    8689 
    87 $page_url_params = new ArrayObject(array('popup' => $popup,'select' => $select,'post_id' => $post_id)); 
     90$page_url_params = new ArrayObject(array('popup' => $popup,'select' => $select,'post_id' => $post_id,'link_type' => $link_type)); 
    8891if ($d) { 
    8992     $page_url_params['d'] = $d; 
     
    774777function mediaItemLine($f,$i,$query,$table=false) 
    775778{ 
    776      global $core, $page_url, $popup, $select, $post_id, $plugin_id, $page_url_params; 
     779     global $core, $page_url, $popup, $select, $post_id, $plugin_id, $page_url_params, $link_type; 
    777780 
    778781     $fname = $f->basename; 
     
    830833                    $act .= 
    831834                    '<a class="attach-media" title="'.__('Attach this file to entry').'" href="'. 
    832                     $core->adminurl->get("admin.post.media", array('media_id' => $f->media_id, 'post_id' => $post_id,'attach' => 1)). 
     835                    $core->adminurl->get("admin.post.media", 
     836                         array('media_id' => $f->media_id, 'post_id' => $post_id,'attach' => 1,'link_type' => $link_type)). 
    833837                    '">'. 
    834838                    '<img src="images/plus.png" alt="'.__('Attach this file to entry').'"/>'. 
Note: See TracChangeset for help on using the changeset viewer.

Sites map