Father, web developer, cyclist and all around rugged man.
erikdmitchell / document-manager Goto Github PK
View Code? Open in Web Editor NEWThe ultimate document manager
The ultimate document manager
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: 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.
Add the following:
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;
}
Allow the bulk import of documents
Add our updater!
Basically a metabox with user levels, we can check to enable access. All can be on by default.
Here are the basic features we would like to have/add:
Create interactive stats that can be exported. They can be viewed, sorted, searched, etc.
Files are intuitively checked out and locked to prevent revisions from colliding.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.