How to make dataTables search file tags

DataTables have their own search box to filter files. This only uses file meta data that is actually visivle in the table. If you want to search for file tags that are not included in the table, you have to use WP-Filebase’s search form:

Add %search_form% to your dataTables template header:

%search_form%
%print_script:jquery-dataTables%
%print_style:jquery-dataTables%
<table id="wpfb-data-table-%uid%">
<thead>
<tr><th scope="col">Name</th><th scope="col">Size</th><th scope="col">Hits</th></tr>
</thead>
<tbody>

Add the bFilter parameter when initializin dataTable in the footer:

</tbody>
</table>
<script type="text/javascript" charset="utf-8">
jQuery(document).ready(function() {
jQuery('#wpfb-data-table-%uid%').dataTable({
"bFilter": false
});
} );
</script>
VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)

2 thoughts on “How to make dataTables search file tags

  1. coco says:
    VN:F [1.9.22_1171]
    Rating: 0 (from 0 votes)

    Hi,

    In which file can I specify the colums, which I want to Show up?

    Thanks for the info.

    1. renoovodesign says:
      VN:F [1.9.22_1171]
      Rating: 0 (from 0 votes)

      Under Manage Templates menu item, click File and edit data-table template for the actual rows.
      For the column header names, click File List and edit the data-table template there.

      I’ve created a duplicate of the existing data-table template so I can mess around as much as I want.

Leave a Reply

Your email address will not be published. Required fields are marked *