Shareable Draft Content
The unpublished drafts cannot be shared by using the present system. Hence, the user has to share the draft using external entities or services like cloud (Google drive and Dropbox), physical storage or by simple email. To overcome this drawback the proposed solution is to enable draft sharing using Joomla by making use of a sharable link (as seen in Google Drive/Dropbox). Anyone having this link would be able to view the draft. The basic idea is to enable draft sharing in a Joomla work environment and thus overcome the existing drawbacks and enhance the functionalities of the Joomla! CMS
I am Nikita Dhiman.
Currently a final year Computer Engineer student at St. John College of Engineering and Technology, Mumbai, India. I am familiar with Joomla development environment and also with version control systems like Git. I am proficient in C, HTML, and PHP and have decent knowledge of Java and Python.
I was introduced to Joomla! two years ago while studying content management systems and web development. Since then Joomla caught my attention and have used Joomla for mini projects and also advised start-ups who use Joomla as a CMS to enhance their website’s visibility using SEO.
This article intends to be an introduction about “Shareable Draft Content”, my project for Google Summer of Code 2016 with Joomla.
In Content Management Systems which have different levels of users, the administrator holds the highest rights on whatsoever in the system. The documents/articles saved by the administrator for publishing at a later period of time can be viewed by the administrator only and not by any other user of the system. Similar is the case with other users on that system, whose saved work in form of draft cannot be shared with others until it has been published or that level of rights are been granted to him/her.
The unpublished drafts cannot be shared by using the present system. Hence, the user has to share the draft using external entities or services like cloud (Google drive and Dropbox), physical storage or by simple email. Being a web developer myself I am well aware of the fact that it is a cumbersome process to manage content which usually requires suggestions from multiple people in the organization. Also it will not be feasible to publish the article first and then ask for the suggestion and make changes to the article every time a new suggestion comes up.
To overcome this drawback the proposed solution is to enable draft sharing using Joomla by making use of a sharable link (as seen in Google Drive/Dropbox). Anyone having this link would be able to view the draft. The basic idea is to enable draft sharing in a Joomla work environment and thus overcome the existing drawbacks and enhance the functionalities of the Joomla! CMS over other content management systems like WordPress and Drupal to name a few who currently do not support this functionality.
The Share button:
The user might want to share the draft at the time of writing the draft or when he/she has finished writing the draft and have saved it with other articles. Hence, it is necessary to provide this option of draft sharing at all the possible locations. The ‘share’ option will be provided at two locations; at the editor page and the article page but the preview option would be available only at the editor page. Multiple selection is not possible here, only one draft can be shared at a given time or only one draft can be accessed.
Share Button location 1
Share Button location 2
This feature would emphasize on generating a share link for the draft, this link would be visible at the preview UI of the draft from where it can be copy pasted and shared to different users and subsequently suggestions for improvement of the draft can be gathered. This link would be present as the UI page URL from where it can be copy-pasted else at the end of the preview page there would be an option for shortened URL. The user can give this shortened URL instead that would be available at the right side of the page and the same would be stored in the database. It is important to note that no editing rights would be granted to the user.
Share link and Shortened URL
Managing the shared drafts:
“My Shared Drafts” would contain the information of all the drafts that has been shared using a shareable link, it would also contain the information about the date and time at which the draft was shared. At the main page of articles, the user would be able to differentiate amongst the shared article by shared tag on them.
If user wishes to discard any shared draft, he can simply select the draft and hit ‘Discard Share’ button. Multiple selection would be possible here. Whenever a share is discarded, all the records about the share file are deleted from the share table in the database and when the discarded share link is used it will give an error message showing that content is no longer shared.
There might be instances when the shared draft is modified by the user, this won’t discard the original shared link but the same link would be stored in the database (as the database uses the file storage path, the new file would be stored in the same path. Hence, the same link would be valid) and used for further sharing. When all the possible suggestions have been gathered and incorporated in the shared draft (the main objective of draft sharing), the user will then publish the draft. The shared link would then redirect the user to the webpage where the article has been published. At this stage the draft creator would have the right to disable/discard the share URL when ‘draft’ status changes to ‘published’ else the share URL will direct the users to the webpage.
As mentioned before, the shared drafts would be differentiated from the other drafts by ‘shared’ tag on them. Whenever the user tries to publish the draft which was previously shared, a pop-up window ask the user whether he wishes to update the share URL or would like to discard the share. If the user opts for updating the share URL then the same would be replaced by the link of the webpage where the article would be published in the ‘share table’ of the database. The shared shortened URL would now act as the link to the webpage.
I am grateful to the entire Joomla community for their valuable suggestions during the application process. My mentors Roland Dalmulder, Achal Agarwal and Ashwin Date for helping me understand this project better. I wish to implement all the mentioned features within the timeline of GSoC and prepare documentations for the same, this would help future developers to enhance this functionality.
In my next article, I would be writing about the initial experience of coding period in GSoC and the progress on the project. In my third article, I would be writing about the implementation in brief manner and also about the initial user response for this functionality.
The progress on this project can be tracked here: https://github.com/joomla-projects/gsoc16_shareable-draft-content
By accepting you will be accessing a service provided by a third-party external to https://magazine.joomla.org/