GithubHelp home page GithubHelp logo

document-manager's Introduction

Header

Father, web developer, cyclist and all around rugged man.

💾 Technology

📈 GitHub Stats

Erik GitHub stats

Top Langs

📟 Social

Facebook Twitter Instagram LinkedIn

document-manager's People

Contributors

erikdmitchell avatar

Watchers

 avatar  avatar

document-manager's Issues

Order metaboxes

In documents, it would be nice to custom order the metaboxes. We could add an order param and check it when we add to array.

Secure files and filenames

Secure: filenames are hashed on upload and files are only accessible through WordPress’s proven authentication system

This would mean someone with the URL cannot access the file. We need to check that our login plugin doesn't prevent this.

Integrate CI

Add the following:

  • composer
  • phpcs checks
  • gulp
  • sass
  • min js
  • min css

Custom Folder Issues

Using media_handle_upload, we are able to generate previews and upload the file. The problem is the media library gets goofed up about the file location, thumbnail location, etc.

I found this code that does what media_handle_upload does, but it allows for more customization. We should try it:

function upload_user_file( $file = array() ) {

    require_once( ABSPATH . 'wp-admin/includes/admin.php' );

      $file_return = wp_handle_upload( $file, array('test_form' => false ) );

      if( isset( $file_return['error'] ) || isset( $file_return['upload_error_handler'] ) ) {
          return false;
      } else {

          $filename = $file_return['file'];

          $attachment = array(
              'post_mime_type' => $file_return['type'],
              'post_title' => preg_replace( '/\.[^.]+$/', '', basename( $filename ) ),
              'post_content' => '',
              'post_status' => 'inherit',
              'guid' => $file_return['url']
          );

          $attachment_id = wp_insert_attachment( $attachment, $file_return['url'] );

          require_once(ABSPATH . 'wp-admin/includes/image.php');
          $attachment_data = wp_generate_attachment_metadata( $attachment_id, $filename );
          wp_update_attachment_metadata( $attachment_id, $attachment_data );

          if( 0 < intval( $attachment_id ) ) {
            return $attachment_id;
          }
      }

      return false;
}

Features

Here are the basic features we would like to have/add:

  • Provides a full file history in the form of a revision log
  • Each file gets a permanent, authenticated URL that always points to the latest version
  • Each revision gets its own unique url (e.g.,TPS-Report-revision-3.doc)
  • Files are intuitively checked out and locked to prevent revisions from colliding
  • Secure: filenames are hashed on upload and files are only accessible through WordPress’s proven authentication system
  • Can move document upload folder to location outside of web root to further ensure government- and enterprise-grade security
  • Access control (based on user level)
  • Bulk import
  • Download stats
  • Documents (cpt)
  • Document tags (tax)
  • Document category (tax)

Build Better Stats

Create interactive stats that can be exported. They can be viewed, sorted, searched, etc.

Create a file lock

Files are intuitively checked out and locked to prevent revisions from colliding.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.