Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Commit

Permalink
[Fixed] Fixed an issue with SEO images not rendering properly via the…
Browse files Browse the repository at this point in the history
… FieldType

[Improved] Explicitly state that the SEO Image must be in JPG, PNG, or GIF format
  • Loading branch information
Andrew Welch committed Jul 19, 2016
1 parent 3e59840 commit 6f8544f
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 16 deletions.
10 changes: 5 additions & 5 deletions DOCS.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ You can also dynamically change any of these SEO Meta fields in your Twig templa
* **Site SEO Name Separator** - The character that should be used to separate the Site SEO Name and Title in the `<title>` tag
* **Site SEO Description** - This should be between 70 and 160 characters (spaces included). Meta descriptions allow you to influence how your web pages are described and displayed in search results. Ensure that all of your web pages have a unique meta description that is explicit and contains your most important keywords.
* **Site SEO Keywords** - Google ignores this tag; though other search engines do look at it. Utilize it carefully, as improper or spammy use most likely will hurt you, or even have your site marked as spam. Avoid overstuffing the keywords and do not include keywords that are not related to the specific page you place them on.
* **Site SEO Image** - This is the image that will be used for display as the global website brand, as well as on Twitter Cards and Facebook OpenGraph that link to the website. It should be an image that displays well when cropped to a square format (for Twitter)
* **Site SEO Image** - This is the image that will be used for display as the global website brand, as well as on Twitter Cards and Facebook OpenGraph that link to the website. The image must be in JPG, PNG, or GIF format.
* **SEO Image Transform** - The image transform to apply to the Site SEO Image.
* **Site Twitter Card Type** - With Twitter Cards, you can attach rich photos and information to Tweets that drive traffic to your website. Users who Tweet links to your content will have a “Card” added to the Tweet that’s visible to all of their followers.
* **Twitter Image Transform** - The image transform to apply to the Twitter SEO Image. Twitter recommends: 120 x 120 pixels minimum size, 1:1 aspect ratio, 1mb max size for Summary Card images, and 280x150 pixels minimum size, 1.86:1 aspect ratio, 1mb max size for Summary Card with Large Image images.
Expand Down Expand Up @@ -144,7 +144,7 @@ There is also a `gtmDataLayerVariableName` variable in `config.php` which allows
* **Alternate Entity Name** - An alternate or nickname for the entity that owns the website
* **Entity Description** - A description of the entity that owns the website
* **Entity URL** - A URL for the entity that owns the website
* **Entity Brand** - An image or logo that represents the entity that owns the website
* **Entity Brand** - An image or logo that represents the entity that owns the website. The image must be in JPG, PNG, or GIF format.
* **Entity Telephone** - The primary contact telephone number for the entity that owns the website
* **Entity Email** - The primary contact email address for the entity that owns the website

Expand Down Expand Up @@ -227,7 +227,7 @@ Leave any fields blank that aren't applicable or which you do not want as part o
* **Alternate Entity Name** - An alternate or nickname for the entity that created the website
* **Entity Description** - A description of the entity that created the website
* **Entity URL** - A URL for the entity that created the website
* **Entity Brand** - An image or logo that represents the entity that created the website
* **Entity Brand** - An image or logo that represents the entity that created the website. The image must be in JPG, PNG, or GIF format.
* **Entity Telephone** - The primary contact telephone number for the entity that created the website
* **Entity Email** - The primary contact email address for the entity that created the website

Expand Down Expand Up @@ -282,7 +282,7 @@ You can also dynamically change any of these SEO Meta fields in your Twig templa
* **SEO Title** - This should be between 10 and 70 characters (spaces included). Make sure your title tag is explicit and contains your most important keywords. Be sure that each page has a unique title tag.
* **SEO Description** - This should be between 70 and 160 characters (spaces included). Meta descriptions allow you to influence how your web pages are described and displayed in search results. Ensure that all of your web pages have a unique meta description that is explicit and contains your most important keywords.
* **SEO Keywords** - Google ignores this tag; though other search engines do look at it. Utilize it carefully, as improper or spammy use most likely will hurt you, or even have your site marked as spam. Avoid overstuffing the keywords and do not include keywords that are not related to the specific page you place them on.
* **SEO Image** - This is the image that will be used for display as the webpage brand for this template, as well as on Twitter Cards and Facebook OpenGraph that link to this page. It should be an image that displays well when cropped to a square format (for Twitter)
* **SEO Image** - This is the image that will be used for display as the webpage brand for this template, as well as on Twitter Cards and Facebook OpenGraph that link to this page. The image must be in JPG, PNG, or GIF format.
* **SEO Image Transform** - The image transform to apply to the Site SEO Image.
* **Twitter Card Type** - With Twitter Cards, you can attach rich photos and information to Tweets that drive traffic to your website. Users who Tweet links to your content will have a “Card” added to the Tweet that’s visible to all of their followers.
* **Twitter Image Transform** - The image transform to apply to the Twitter SEO Image. Twitter recommends: 120 x 120 pixels minimum size, 1:1 aspect ratio, 1mb max size for Summary Card images, and 280x150 pixels minimum size, 1.86:1 aspect ratio, 1mb max size for Summary Card with Large Image images.
Expand Down Expand Up @@ -313,7 +313,7 @@ You can also dynamically change any of these SEO Meta fields in your Twig templa
* **SEO Title** - This should be between 10 and 70 characters (spaces included). Make sure your title tag is explicit and contains your most important keywords. Be sure that each page has a unique title tag.
* **SEO Description** - This should be between 70 and 160 characters (spaces included). Meta descriptions allow you to influence how your web pages are described and displayed in search results. Ensure that all of your web pages have a unique meta description that is explicit and contains your most important keywords.
* **SEO Keywords** - Google ignores this tag; though other search engines do look at it. Utilize it carefully, as improper or spammy use most likely will hurt you, or even have your site marked as spam. Avoid overstuffing the keywords and do not include keywords that are not related to the specific page you place them on.
* **SEO Image** - This is the image that will be used for display as the webpage brand for this template, as well as on Twitter Cards and Facebook OpenGraph that link to this page. It should be an image that displays well when cropped to a square format (for Twitter)
* **SEO Image** - This is the image that will be used for display as the webpage brand for this template, as well as on Twitter Cards and Facebook OpenGraph that link to this page. The image must be in JPG, PNG, or GIF format.
* **SEO Image Transform** - The image transform to apply to the Site SEO Image.
* **Twitter Card Type** - With Twitter Cards, you can attach rich photos and information to Tweets that drive traffic to your website. Users who Tweet links to your content will have a “Card” added to the Tweet that’s visible to all of their followers.
* **Twitter Image Transform** - The image transform to apply to the Twitter SEO Image. Twitter recommends: 120 x 120 pixels minimum size, 1:1 aspect ratio, 1mb max size for Summary Card images, and 280x150 pixels minimum size, 1.86:1 aspect ratio, 1mb max size for Summary Card with Large Image images.
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ Some things to do, and ideas for potential features:

### 1.1.25 -- 2016.07.20

* [Fixed] Fixed an issue with SEO images not rendering properly via the FieldType
* [Improved] Added a fallback if `iconv` is not installed for UTF-8 conversion
* [Improved] Explicitly state that the SEO Image must be in JPG, PNG, or GIF format
* [Improved] Updated the README.md

### 1.1.24 -- 2016.07.18
Expand Down
2 changes: 2 additions & 0 deletions releases.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
"downloadUrl": "https://github.com/nystudio107/seomatic/archive/master.zip",
"date": "2016-07-20T11:00:00-11:00",
"notes": [
"[Fixed] Fixed an issue with SEO images not rendering properly via the FieldType",
"[Improved] Added a fallback if `iconv` is not installed for UTF-8 conversion",
"[Improved] Explicitly state that the SEO Image must be in JPG, PNG, or GIF format",
"[Improved] Updated the README.md"
]
},
Expand Down
2 changes: 1 addition & 1 deletion services/SeomaticService.php
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ public function setEntryMeta($entryMeta, $entryMetaUrl)
$meta['seoDescription'] = $entryMeta->seoDescription;
$meta['seoKeywords'] = $entryMeta->seoKeywords;
if (isset($entryMeta->seoImageId[0]))
$meta['seoImageId'] = $entryMeta->seoImageId[0];
$meta['seoImageId'] = $entryMeta->seoImageId;
else
$meta['seoImageId'] = null;
$meta['canonicalUrl'] = $this->getFullyQualifiedUrl($entryMetaUrl);
Expand Down
4 changes: 2 additions & 2 deletions templates/creator/_edit.twig
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
<div class="field" id="genericCreatorImageId-field">
<div class="heading">
<label for="genericCreatorImageId">{{ "Entity Brand"|t}}{% if craft.isLocalized and creator.locale %}<span class="locale">{{ creator.locale }}</span>{% endif %}</label>
<div class="instructions"><p>{{ "An image or logo that represents the entity that created the website" |t |raw}}</p></div>
<div class="instructions"><p>{{ "An image or logo that represents the entity that created the website. The image must be in JPG, PNG, or GIF format." |t |raw}}</p></div>
</div>
<div class="input">
{% if assetsSourceExists %}
Expand All @@ -153,7 +153,7 @@
name: 'genericCreatorImageId',
elementType: elementType,
criteria: {
'kind': [],
'kind': ['image'],
'localeEnabled': null,
'locale': craft.locale,
},
Expand Down
4 changes: 2 additions & 2 deletions templates/field.twig
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@
<div class="field comboField-wrapper" id="{{ id }}seoImageId-field">
<div class="heading">
<label for="{{ id }}seoImageId">{{ "SEO Image"|t}}{% if locale %}<span class="locale">{{ locale }}</span>{% endif %}</label>
<div class="instructions"><p>{{ "This is the image that will be used for display as the webpage brand for this template, as well as on Twitter Cards and Facebook OpenGraph that link to this page. It should be an image that displays well when cropped to a square format (for Twitter)" |t |raw}}</p></div>
<div class="instructions"><p>{{ "This is the image that will be used for display as the webpage brand for this template, as well as on Twitter Cards and Facebook OpenGraph that link to this page. The image must be in JPG, PNG, or GIF format." |t |raw}}</p></div>
</div>
<div class="source-container"{% if not seoImageIdSourceChangeable %} style="display: none;"{% endif %}>
<div class="source-item">
Expand Down Expand Up @@ -237,7 +237,7 @@
name: name ~ '[seoImageId]',
elementType: elementType,
criteria: {
'kind': [],
'kind': ['image'],
'localeEnabled': null,
'locale': craft.locale,
},
Expand Down
4 changes: 2 additions & 2 deletions templates/identity/_edit.twig
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@
<div class="field" id="genericOwnerImageId-field">
<div class="heading">
<label for="genericOwnerImageId">{{ "Entity Brand"|t}}{% if craft.isLocalized and identity.locale %}<span class="locale">{{ identity.locale }}</span>{% endif %}</label>
<div class="instructions"><p>{{ "An image or logo that represents the entity that owns the website" |t |raw}}</p></div>
<div class="instructions"><p>{{ "An image or logo that represents the entity that owns the website. The image must be in JPG, PNG, or GIF format." |t |raw}}</p></div>
</div>
<div class="input">
{% if assetsSourceExists %}
Expand All @@ -330,7 +330,7 @@
name: 'genericOwnerImageId',
elementType: elementType,
criteria: {
'kind': [],
'kind': ['image'],
'localeEnabled': null,
'locale': craft.locale,
},
Expand Down
4 changes: 2 additions & 2 deletions templates/meta/_main.twig
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
<div class="field" id="seoImageId-field">
<div class="heading">
<label for="seoImageId">{{ "SEO Image"|t}}{% if meta.locale %}<span class="locale">{{ meta.locale }}</span>{% endif %}</label>
<div class="instructions"><p>{{ "This is the image that will be used for display as the webpage brand for this template, as well as on Twitter Cards and Facebook OpenGraph that link to this page. It should be an image that displays well when cropped to a square format (for Twitter)" |t |raw}}</p></div>
<div class="instructions"><p>{{ "This is the image that will be used for display as the webpage brand for this template, as well as on Twitter Cards and Facebook OpenGraph that link to this page. The image must be in JPG, PNG, or GIF format." |t |raw}}</p></div>
</div>
<div class="input">
{% if assetsSourceExists %}
Expand All @@ -89,7 +89,7 @@
name: 'seoImageId',
elementType: elementType,
criteria: {
'kind': [],
'kind': ['image'],
'localeEnabled': null,
'locale': craft.locale,
},
Expand Down
4 changes: 2 additions & 2 deletions templates/site/_edit.twig
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@
<div class="field" id="siteSeoImageId-field">
<div class="heading">
<label for="siteSeoImageId">{{ "Site SEO Image"|t}}{% if craft.isLocalized and siteMeta.locale %}<span class="locale">{{ siteMeta.locale }}</span>{% endif %}</label>
<div class="instructions"><p>{{ "This is the image that will be used for display as the global website brand, as well as on Twitter Cards and Facebook OpenGraph that link to the website. It should be an image that displays well when cropped to a square format (for Twitter)" |t |raw}}</p></div>
<div class="instructions"><p>{{ "This is the image that will be used for display as the global website brand, as well as on Twitter Cards and Facebook OpenGraph that link to the website. The image must be in JPG, PNG, or GIF format." |t |raw}}</p></div>
</div>
<div class="input">
{% if assetsSourceExists %}
Expand All @@ -171,7 +171,7 @@
name: 'siteSeoImageId',
elementType: elementType,
criteria: {
'kind': [],
'kind': ['image'],
'localeEnabled': null,
'locale': craft.locale,
},
Expand Down

0 comments on commit 6f8544f

Please sign in to comment.