Resource icon

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

No permission to download

Kevin

Code Monkey
Staff member
Kevin submitted a new resource:

Styles Tweaks (use attachments for og:image & others) - Options for several meta tags and miscellaneous display tweaks.

This is a collection of several options related to XenForo meta tags and miscellaneous display tweaks. This is how, for example, we are using attachments for the og:image at Cameraderie photography forum and here at Alien Soup.

After installing go into your XF Options page and look for "CinVin - Style Tweaks" to change your settings.

Unfurl Description Length
Enter the maximum length to use for the...

Read more about this resource...
 
Kevin updated Styles Tweaks (use attachments for og:image & others) with a new update entry:

Fixed Version Number, Changed Release Status

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...

Read the rest of this update entry...
 
Kevin updated Styles Tweaks (use attachments for og:image & others) with a new update entry:

Now includes 'Publisher' & 'MainEntityOfPage' tags on thread view

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:
...

Read the rest of this update entry...
 
Hello, i have used this but i have some problems with

  • Inferred Property
    The 'og:image' property should be explicitly provided, even if a value can be inferred from other tags.
  • Missing Properties
    The following required properties are missing: og:image
im using xf 2.1.6
 
  • Inferred Property
    The 'og:image' property should be explicitly provided, even if a value can be inferred from other tags.
  • Missing Properties
    The following required properties are missing: og:image
If you have the default meta image set in XF and if you allow guests to view attachments, and if those images are big enough (eg: you shouldn't try to use a tiny icon image or something else as the OG image), the the og:image tag will always be present. The add-on first tries to use the first acceptable attachment as the image and if none are found then it'll fall back to using the normal XF default meta image.
 
Kevin updated Styles Tweaks (use attachments for og:image & others) with a new update entry:

Updated for XF 2.1.6

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...

Read the rest of this update entry...
 
Kevin updated Style Tweaks (use attachments for og:image & others) with a new update entry:

New options for emoji CDN file extension, What's New icon, and OpenSearch tag.

New options added since the last public release.... :smiley:
  • 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...

Read the rest of this update entry...
 
thanks for this add-on. seems to work well. simply curious. whether support for hotlinked image can be added. thanks again!

update: noticed just now that if i keep `Show Back Option in Nav Bar` disabled, forum layout breaks with too much space between the header and content. Can be seen here.
 
Last edited:
thanks for this add-on. seems to work well. simply curious. whether support for hotlinked image can be added. thanks again!

update: noticed just now that if i keep `Show Back Option in Nav Bar` disabled, forum layout breaks with too much space between the header and content. Can be seen here.
I'll take a look this weekend, there's a chance the template modification isn't behaving as expected with the option turned off.
 
Kevin updated Style Tweaks (use attachments for og:image & others) with a new update entry:

Fix for disabling 'show back button', changed TMS priority to avoid conflict

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...

Read the rest of this update entry...
 
If you have the default meta image set in XF and if you allow guests to view attachments, and if those images are big enough (eg: you shouldn't try to use a tiny icon image or something else as the OG image), the the og:image tag will always be present. The add-on first tries to use the first acceptable attachment as the image and if none are found then it'll fall back to using the normal XF default meta image.


Hello

What is the definition of an "acceptable image" please?

Mine is still pulling through OG image. The pictures are quite large. Running XF 2.1.8
 
Hello

What is the definition of an "acceptable image" please?

Mine is still pulling through OG image. The pictures are quite large. Running XF 2.1.8
Would you be able to give a sample URL (feel free to send a PM if you prefer). If I recall correctly without looking at the code there's some checks a minimum dimension size of the image as some platforms like Twitter & Facebook have minimum requirements.

Also, are your attachments viewable to guests?
 
So far everything seems to be working. If you notice anything please let me know. I've been using the betas and, if there are any conflicts, they haven't popped up yet.

A really useful mod, it's very handy.

It works fine in XF2.2 with DISCUSSION type nodes, but it doesn't work with ARTICLE nodes, any chance these could be included in the mod ?
 
Having troubles getting the thread image to show anything but a black box as you see in the attached photo. Am i missing something?

ftg.png
 
It works fine in XF2.2 with DISCUSSION type nodes, but it doesn't work with ARTICLE nodes, any chance these could be included in the mod ?
At the moment I can't think of any reason it wouldn't work but I'll take a look.
 
@gibsta Experimenting on my test 2.2.x install the OG image is being set to the attachment as expected even for "article" thread types. Do you have an example where it isn't working?
 
Back
Top