solved New Meta Tags

Dazed
Dazed
@dazed
7 years ago
1,022 posts
I was reading about the release of the new meta tag module and from reading it, I thought we would have an item list drop down for all the modules. All I see is one "Item Detail Pages" in the list. Is it better to add meta tags in the actual module or am I missing something?

Thanks!
updated by @dazed: 04/11/17 12:06:45AM
michael
@michael
7 years ago
7,718 posts
What you will see in the modules themselves is a new template item_detail_meta.tpl which will populate the meta details on the details page.

So view an audio item on someones profile, then hit ctrl+u to see the source code and you will see the page has og:tags in the header section. You dont need to do anything.

If you want to do something, check out how the pages look in the facebook debugger and the twitter debugger for each of the content types and offer suggestions here as to how they could be better.

Facebook debugger
https://developers.facebook.com/tools/debug/og/object/

Twitter card validator
https://cards-dev.twitter.com/validator
Dazed
Dazed
@dazed
7 years ago
1,022 posts
Thanks Michael. I forgot I had some code in there to make audio images correct for FB so once I removed that things started to make more sense.

ok so far I am not getting what I expect which means I did not get invited to sprint planning :). I removed all meta tags I had so I could start fresh and then I reset the cache. I go to an artists blog page > click a blog entry to go to a detail page and view the source which displays
<meta property="og:image" content="https://www.site.com/image/img/module/jrBlog/facebook_shared_icon.png"/>

from the detail page:
{if isset($item.blog_image_size) && $item.blog_image_size > 100}
<meta property="og:image" content="{$jamroom_url|replace:"http:":"`$method`:"}/{$murl}/image/blog_image/{$item._item_id}/xxlarge/_v={$item.blog_image_time}"/>
<meta property="og:image:width" content="512"/>
<meta property="og:image:height" content="385"/>
{else}
<meta property="og:image" content="{$jamroom_url}/{jrCore_module_url module="jrImage"}/img/module/jrBlog/facebook_shared_icon.png"/>
<meta property="og:image:width" content="256"/>
<meta property="og:image:height" content="256"/>
{/if}

so it appears that if there is no image added in the blog we default back to a stock shared image. I would have thought we would just use the user image. That part aside though, I do not see a way in the meta tags to set my own image for just the blogs page. If I change it in the module, it will be overwritten each release. can I use the jrBogitem_detail_meta.tpl in the skin to override or is there a way to do it in the meta manager?

Appreciate the help!
Dazed
Dazed
@dazed
7 years ago
1,022 posts
Also I have to say if the image is added to the song etc. you guys rocked it. Nice job on this module.
michael
@michael
7 years ago
7,718 posts
If you make the changes via the TEMPLATE EDITOR in the ACP the changes will survive module updates.

If you make a skin override template for whichever module you want that too will survive upgrades eg /skins/YOUR SKIN/jrAudio_item_detail_meta.tpl

More details here:

Docs: "Altering a Modules Template"
https://www.jamroom.net/the-jamroom-network/documentation/jamroom-developers-guide/1051/altering-a-modules-template

The way I've been trying to think about and setup the meta tags is so that they make the most sense to the reader on wherever they are shared.

So for something like a blog post, if it has an image that represents the post, that is used, if not then an image indicating its a blog post is used.

I've tried to avoid any profile or user information being used, because these may not be relivant to the READER wherever the item is displayed.

Example. Me (michael) shares an audio file from your site, and your profile. The audio file is a song by METALLICA and the title of the song is "and justice for all". When I share that on MY facebook page, the name 'Dazed' and your profile pic really have nothing to do with the content being shared at this point.

My thinking is in order for Dazed to make any sense to the reader on Facebook who probably has never visited your site, they need to have prior knowledge of where the content has been shared from. Which is really not relivant to the reader. If that reader then shares that piece of content, neither 'dazed' or 'michael' are important. The only thing that is important is the content, not that that conent came from dazed and was shared by michael.

I think this is the most efficent way of getting the content dispursed and the interested viewers back to your profile which is when they will first learn about where the content came from.
Dazed
Dazed
@dazed
7 years ago
1,022 posts
Merit in both but I get the logic. Seriously nice job on this update. It is clean and pretty much maintenance free if they post images in the item.

Appreciate the help.
michael
@michael
7 years ago
7,718 posts
see any places that could be better, let us know. :)