Resource icon

XenForo 2 CinVin: Style & Meta Tweaks (use attachments for og:image & others) 1.1.1

No permission to download
Release 1.1.1 is to fix an issue discovered with the 1.1.0 release that appeared on a production site but not on our test site. No other changes, please refer to the 1.1.0 release notes.
Changes for the 1.1.0 release...
  • Version: Bumped up to 1.1.0
  • New option: Use the thread title as the og:description if the first post of the thread has no text.
  • Changed: When the option to use the first available attachment as the og:image is turned on then the post ID associated with the attachment will be added as a parameter to the image URL. Thanks @chromaniac & @btmgreg for bringing this to my attention.
  • Bug fix: The option to use the thread's 'cover image' as the og:image if no attachments were found was being enabled even if the option in the ACP was turned off, fixed to go by the ACP setting.
  • Changed: The option to use the thread's 'cover image' as the og:image if no attachments were found has been flagged to only show in the ACP if the 'advanced options view' has been enabled. Note: This option may be removed in the future.
If you are using the option to use attachments as the og:image if available then it is highly recommended to update because of the bug fix for the option to use thread's 'cover image' if no attachments are found.
Changes for the 1.0.9 release...
  • Renamed add-on from [CinVin] Style Tweaks to [CinVin] Style & Meta Tweaks
  • Requires XF 2.2.x or above - Supporting multiple XF versions is not something that will be attempted and so, as a rule of thumb, the target will always be the current XF version.
  • New option for changing the phrase in the XF 'article' template from the default View full article to View more.
  • New option for using the Metadata Logo in the XF 'article' template if no other images are found to be displayed.
  • New option to use XF 'article' cover image as the threads OG image.
This contains two minor changes. Note this is 1.0.8, the 1.0.7 release has been jumped over.
  • Fixed a bug causing a broken div if the option to show the back button in the navbar was turned off. Thanks to @chromaniac for reporting it. 👍
  • Changed the template modification (TMS) for thread_view with the OG:IMAGE from priority 10 to 88. For most people this won't make a difference but the default XF priority is 10 and by leaving it at the default there is a conflict between this and the Themehouse Featured Threads add-on.
New options added since the last public release.... :)
  • Added new option to override the default ".png" file extension when using your own emoji CDN location. If you aren't using 'native' emoji and are using a custom CDN location then this option allows you to use SVG images or other extensions.
  • Added new option to insert an OPENSEARCH metatag.
  • Added new option to change the "What's New" icon in the menu bar (the default 'lightning bolt' icon) to link to "New Posts" instead.
An update is needed for XF 2.1.6 -- If you are running a version of CinVin Style Tweaks earlier then 1.0.4 and you are running XF 2.1.6 then you need to do this update!

Starting with XF 2.1.6, XF now includes the mainEntityOfPage and Publisher tags.
If you running an earlier version of CinVin Style Tweaks then you will have duplicate Publisher and mainEntityOfPage meta tags inserted in your pages resulting in a validation error.

Starting with 1.0.4 this add-on no longer adds those tags but it does change the mainEntityOfPage type to be 'DiscussionFormPosting' and the id to be the thread URL.
The [publisher] and [mainentityofpage] meta tags are now generated on the thread view pages See the thread linked below at XenForo for the details.

Here's an example of how it shows at Cameraderie; the new tags are inserted above the datepublished tag.
Code:
        <script type="application/ld+json">
        {
            "@context": "https://schema.org",
            "@type": "DiscussionForumPosting",
            "@id": "https:\/\/cameraderie.org\/threads\/show-reflections.252\/",
            "headline": "Show \"Reflections\"",
            "articleBody": "For example: of your life, of how you look like, of...anything. \r\nI took this picture with G1 plus 14-45 lens, I like the reflections of the bridge into the water of a canal.\r\nLooking forward to your pics, thanks in advance.",
            "articleSection": "Herman's Genres",
            "author": {
                "@type": "Person",
                "name": "Herman"
            },
            "discussionUrl": "https:\/\/cameraderie.org\/threads\/show-reflections.252\/",
"mainEntityOfPage": {
    "@type": "DiscussionForumPosting",
    "@id": "https:\/\/cameraderie.org\/threads\/show-reflections.252\/"
},
"publisher": {
    "@type": "Organization",
    "name": "Cameraderie",
    "logo": {
        "@type": "ImageObject",
        "url": "https:\/\/cameraderie.org\/styles\/cameraderie\/scfb.png"
    }
},
"datePublished": "2010-07-31",
            "dateModified": "2019-09-07",
            "image": "https:\/\/cameraderie.org\/data\/avatars\/l\/0\/53.jpg?1424144756",
            "interactionStatistic": {
                "@type": "InteractionCounter",
                "interactionType": "https://schema.org/ReplyAction",
                "userInteractionCount": 259
            }
        }
        </script>
This update is just to fix the add-on release number. With this I've also changed it from being an "alpha" & "beta" release to a gold 1.0.0 release.

If you are using any version prior to this you will need to uninstall it and install this as a fresh copy. The alternative would be to manually change the version number in your xf-addons table for this to "1000070" and then installing this version as a a rebuild. Unless you are comfortable with touching your datatables directly I recommend just uninstalling and re-installing.
Top