Update Aug 26, 2011
Today I pushed out version 0.2.4 which has script fixes for link insertion & cross domain support for IE (tested with 8 & 9). It’s the go version. Those two issues with IE were the only things we found since 0.2.3.
Update Aug 11, 2011
Today I pushed out version 0.2.3 which is a release candidate. Essentially everything is done with the plugin but more extensive/wider use may reveal a bug. Updates/additions:
- Several script fixes
- filter for uses custom caps with the custom taxonomies document_taxonomy_capabilities
- If you have selected text in the post editor and insert a document link, the selected text is used as the link text for the document link
- translation support
Over the weekend I released the beta version of the Document Repository plugin.I’ve labeled it as a beta because I have a bit more work to do on it. However, the current version does work and only lacks a few minor things like translation support, etc. Over the next week or so I will be rolling those final touches in. I’ll update this post accordingly.
The main goal of the plugin is to provide a central repository of documents for a website using WordPress as a CMS. Many organizations implementing a CMS update their documents on an ongoing basis. Using the default media handling in a WordPress would mean updating URLs to uploaded documents throughout the website’s content as new versions of documents were uploaded. The document repository does not contain any workflow, collaboration, version control or approval features. If you are looking for a document authoring collaboration tool, please see WP Document Revisions.
The Document Repository implements a custom post type and custom attachments to achieve document revisioning where the permalink to the latest version of the document persists for the life of the document post (although the permalink is editable). The permalink to the current version of the document is
Earlier versions of the document are also available via permalink
Assuming there is an attachment available for downloading, a request to either of the permalinks above generates a direct download of the associated document.
The Document Repository plugin was developed in collaboration with the University of Mary Washington.
In a single WP install, activate the document repository and any of the included optional plugins you wish.
In a network,
- activate the document repository on one site in the network. Do not network activate it unless you want all the sites in the network to be document repositories.
- if you are implementing the custom taxonomies, activate that plugin on the document repository site.
- if you are implementing the custom roles, activate that plugin on the document repository site.
- if you are implementing the network extras, network activate that plugin.
The document repository plugin adds a Document post type to the WP dashboard. When editing a document post, enter a title and description/abstract which will be shown in search results in the document repository site. Click on the media button to open the media library. In the media library upload the document file. Once uploaded, click the finish button to return to the Document post.
The custom taxonomy plugin is included as a sample of implementing custom taxonomies with Document posts. It requires a document be given a term from all the custom taxonomies before allowing the document to be published. If you modify the taxonomy plugin to suit your implementation, copy it out of the document-repository folder and rename the PHP class to avoid duplicate classes and having your version overwritten by an update.
The custom roles plugin adds an Roles screen under the Documents menu. Add your roles through this screen. Then edit the site users’ profiles and assign the appropriate roles to the editors, authors & contributors. Once these roles are assigned, editors will only have edit permission on their own Document posts and authors & contributors that have the same Document role as they do. Site admins & super admins have access to all the document posts.
The extras plugin adds a media button to the media buttons in the edit post & page screens. Clicking this button opens a custom media screen to a search feature for the document repository. Documents can be searched by text string (same as default WP search), tag and/or custom taxonomy (if active on the document site). An Insert into Post link is provided for each Document.