Skip to content

Commit

Permalink
Merge pull request #9 from iNalgiev/dev
Browse files Browse the repository at this point in the history
* Fixed possible issue with single quotes in the meta description field
  • Loading branch information
iNalgiev authored Oct 15, 2018
2 parents e08eaef + 1594fb0 commit aa9c332
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 13 deletions.
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
![Webtexttool](/resources/images/banner.png)

# Webtexttool for Craft CMS
# Webtexttool for Craft CMS 2.x

Webtexttool is the easiest way to make your website content SEO proof, resulting in higher search engine rankings and more traffic to your website. With webtexttool everyone can create great content and make sure it's SEO proof at the same time.

Expand All @@ -17,7 +17,7 @@ Webtexttool will analyze your content and tell you how to optimize it for maximu
### Keyword analysis & research
Webtexttool will help you find the best keywords for your content. Fill in your keyword to have it analyzed on volume and competition in realtime and also get suggestions on other keywords you could use.

### Text Conversion Optimizer
### Text Conversion Optimizer / Content Quality
This module analyses your content and gives you tips to increase the readability of your text and improve the chances of conversion. Check our [video](https://youtu.be/5NZ6IjHntIQ) to find out more about this module!

### Uptodate SEO rules
Expand Down Expand Up @@ -80,6 +80,9 @@ Yes, of course! If you have any questions, please don’t hesitate to [contact u

## Changelog

### 1.2.3
- Fixed possible issue with single quotes in the meta description field

### 1.2.2
- Added new category for Sentiment score + settings
- Updated Gender rule check: add setting for Neutral
Expand Down Expand Up @@ -122,7 +125,6 @@ Yes, of course! If you have any questions, please don’t hesitate to [contact u
### 1.0.0
- Initial Release


---

Copyright © 2017 Webtexttool <[email protected]>
Expand All @@ -132,3 +134,6 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

---
*This is the Craft 2.x version, for the Craft 3.x version see [link](https://github.com/iNalgiev/craft-webtexttool)*.
2 changes: 1 addition & 1 deletion WebtexttoolPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function getDescription()

public function getVersion()
{
return '1.2.2';
return '1.2.3';
}

public function getDeveloper()
Expand Down
8 changes: 8 additions & 0 deletions releases.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
[
{
"version": "1.2.3",
"downloadUrl": "https://github.com/iNalgiev/webtexttool/archive/1.2.3.zip",
"date": "2018-10-15T16:38:23.000Z",
"notes": [
"Fixed possible issue with single quotes in the meta description field"
]
},
{
"version": "1.2.2",
"downloadUrl": "https://github.com/iNalgiev/webtexttool/archive/1.2.2.zip",
Expand Down
7 changes: 3 additions & 4 deletions resources/js/app-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,9 @@ app.controller("appController", ['$scope', '$http', '$q', '$location',
$scope.authCode = wtt_dashboard.userData !== null ? wtt_dashboard.userData.accessToken : "";
$scope.apiKey = wtt_dashboard.wttApiKey;

if (localStorage.getItem('wtt_token') === "" || localStorage.getItem('wtt_token') === null) {
if ($scope.authCode !== '') {
localStorage.setItem('wtt_token', $scope.authCode);
} else if ($scope.apiKey !== '') {
if (localStorage.getItem('wtt_token') === "" || localStorage.getItem('wtt_token') === null || $scope.authCode !== '') {
localStorage.setItem('wtt_token', $scope.authCode);
if ($scope.apiKey !== '') {
localStorage.setItem('wtt_token', $scope.apiKey);
}
}
Expand Down
13 changes: 9 additions & 4 deletions resources/js/edit-page-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,19 @@ app.controller("editPageController", ['$scope', '$http', '$q', 'stateService', '
var authCode = wtt_globals.userData !== null ? wtt_globals.userData.accessToken : "";
var apiKey = wtt_globals.wttApiKey;

if (localStorage.getItem('wtt_token') === null || localStorage.getItem('wtt_token') === "") {
if (authCode !== '') {
localStorage.setItem('wtt_token', authCode);
} else if (apiKey !== '') {
if (localStorage.getItem('wtt_token') === null || localStorage.getItem('wtt_token') === "" || authCode !== '') {
localStorage.setItem('wtt_token', authCode);
if (apiKey !== '') {
localStorage.setItem('wtt_token', apiKey);
}
}

var metaDescriptionField = document.getElementById('wtt_description');

if(metaDescriptionField !== null && wtt_globals.record !== "") {
metaDescriptionField.value = wtt_globals.record.wttDescription;
}

$scope.promiseMessage = "Loading...";

$scope.loadingPromise = httpService.getData(WttApiBaseUrl + "user/authenticated").then(function (result) {
Expand Down
2 changes: 1 addition & 1 deletion templates/core.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
'</label>' +
'<button type="button" class="wtt-btn-info-d" data-toggle="popover" data-trigger="focus" data-placement="top" data-content="This is the summary of your page that will be shown in the search results and what a potential visitor of your page will see. So it’s important to create a catchy description of your page."><i class="fa fa-question-circle"></i></button>' +
'</div>' +
'<textarea id="wtt_description" placeholder="Page Description" name="wtt_description">' + '{{ record ? record.wttDescription : null }}' + '</textarea>' +
'<textarea id="wtt_description" placeholder="Page Description" name="wtt_description"></textarea>' +
'</div>'
);
});
Expand Down

0 comments on commit aa9c332

Please sign in to comment.