Pull Request is for creation of a share token and storing that token in the #__share_draft database.
Summary of Changes:
A new button is created for 'share', this button would be visible only when article is saved and is placed next to version button.
A function shareTokenGenerate() and shareDraft() are created in the controller, shareTokenGenerate() will generate a random token containing a-z,A-Z and 0-9 but no special characters.
In model file, query has been made to store this token in the database.
Testing Instruction:
Apply the patch, make sure that the #__share_draft db exists. Have used JTables for the same
create a new article and save the article.
3.Once saved, hit share button, the values that should be stored the db are articleId, title of the article and newly generated random token.
Test 1 results:
When the table exists:
{"success":true,"message":"Token Saved","messages":null,"data":"IeOrhUISqtAm3PXV"}
When table does not exists:
{"success":false,"message":"Token not Saved","messages":null,"data":false}
Tasks:
[x] Create controller file article.json.php
[x] Fix the $db in the article model
[x] Fix the storing of token link to store created date and time
[x] Remove the storing of title
[x] Remove the button at the bottom of the article edit page
[x] Move the div below the article title
[x] Alpha-order language strings
[x] Fix the share button URL
[x] Return share link from article model
[x] Check existing token based on article ID
[x] Make link clickable
[x] Complete step 2 from the mentioned steps[review needed]
Pull Request is for creation of a share token and storing that token in the #__share_draft database.
Summary of Changes:
Testing Instruction:
Test 1 results:
Tasks: