Forum Activity for @ken-rich

Ken Rich
@ken-rich
08/01/21 07:23:00AM
926 posts

Found bug in metatag module


Design and Skin Customization

Not to complicate the above (which will work well for most Jamroom users), I have added an "else" statement to the code in the meta.tpl to take care of the profile index pages.

{if isset($meta)}
{foreach from=$meta key="mname" item="mvalue"}
<meta property="{$mname}" content="{$mvalue}">
{/foreach}
{else}
{if $current_url == "{$jamroom_url}/{$profile_url}"}
{jrCore_include template="profile_meta.tpl"}
{/if}
{/if}

The code for the profile_meta.tpl I added to skins made available to normal profiles is:

{jrCore_module_url module="jrProfile" assign="murl"}
<meta property="og:title" content="{$profile_name}" />
<meta property="og:url" content="{$current_url|replace:"http:":"`$method`:"}" />
<meta property="og:type" content="website" />
			{capture name="aboutuser" assign="aboutuser_row"}
			    {literal}
			        {if isset($_items)}
			            {foreach $_items as $item}
            			    {$item.user_signup_question_2}
			            {/foreach}
			        {/if}
			    {/literal}
			{/capture}
{jrCore_list module="jrUser" profile_id=$_profile_id template=$aboutuser_row assign="abtuser"}         
 {if isset($abtuser) && strlen($abtuser) > 0}			    
<meta property="og:description" content="{$abtuser|jrCore_strip_html|jrCore_entity_string|truncate:300}" />	  	
{/if}
<meta property="og:image" content="{$jamroom_url}/{$murl}/image/profile_image/{$_profile_id}/xlarge" />
<meta property="og:updated_time" content="{$smarty.now}" />


I added a different profile_meta.tpl into the skins made available to profiles created by power users. This is because the "about us" is from the user account and not specific to the individual profiles created by it. So the "bio" field is specified instead of the "about us" for those profiles.

{jrCore_module_url module="jrProfile" assign="murl"}
<meta property="og:title" content="{$profile_name}" />
<meta property="og:url" content="{$current_url|replace:"http:":"`$method`:"}" />
<meta property="og:type" content="website" />
{if isset($profile_bio) && strlen($profile_bio) > 0}
<meta property="og:description" content="{$profile_bio|jrCore_strip_html|jrCore_entity_string|truncate:300}" />
{/if}
<meta property="og:image" content="{$jamroom_url}/{$murl}/image/profile_image/{$_profile_id}/xlarge" />
<meta property="og:updated_time" content="{$smarty.now}" />

I am finding that this approach works quite well for my needs though I suspect a "real programmer" could find a more "elegant" solution.
Ken Rich
@ken-rich
08/01/21 06:55:37AM
926 posts

Found bug in metatag module


Design and Skin Customization

The "proof is in the pudding" as they say.
This is my test page - https://indiegospel.net/submissions
Ken Rich
@ken-rich
08/01/21 06:53:25AM
926 posts

Found bug in metatag module


Design and Skin Customization

I have done more experiments and confirmed that the code should be:

{if isset($meta)}
{foreach from=$meta key="mname" item="mvalue"}
<meta property="{$mname}" content="{$mvalue}">
{/foreach}
{/if}

If you include the name= key either before or after the property= key, the Facebook debugger gives this warning for all tags specified.

"The following meta tags are specified using 'name' instead of 'property' and will be ignored unless specified using the 'property' key: "

I have my meta.tpl altered accordingly, with only property, no name key. I created all the required tags for my test page and the Facebook Debugger is no longer ignoring them and giving the warning above.

If I do the code the way Jamroom is suggesting for the proposed meta.tpl revision, I get a warning that the tags are being ignored and are therefore inferred from whatever exists on the page.
Ken Rich
@ken-rich
07/30/21 05:08:28AM
926 posts

Found bug in metatag module


Design and Skin Customization

Hi Michael,

If you click "Show All Warnings" it then shows that the OG image is being ignored. I'll copy and paste the warnings plus attach as a screenshot.

caution-solidWarnings That Should Be Fixed
Missing Properties
The following required properties are missing: og:url, og:type, og:title, fb:app_id
Tag specified as 'name' instead of 'property'
The following meta tags are specified using 'name' instead of 'property' and will be ignored unless specified using the 'property' key: og:image, og:description

===========================

The noteworthy part (for me) is that the og:image is being ignored and the reason why is given. This is despite the fact that I just changed the og:image using the metatag manager with the new code installed in the meta.tpl
og-image.PNG og-image.PNG - 41KB
Ken Rich
@ken-rich
07/30/21 04:53:29AM
926 posts

Play Counts - Stream Counts


Off Topic

OK - thanks Paul I appreciate it...
Ken Rich
@ken-rich
07/29/21 07:51:47PM
926 posts

Found bug in metatag module


Design and Skin Customization

Hmmmm... I did a test using the new code in the meta.tpl

I used the metatag module to change the OG image for this page - https://indiegospel.net/submissions

At the Facebook debugger I did see the image change but I still got the same error that the OG image was specified by name instead of property and would be ignored. Still, it inferred the right image.

What the scraper saw exactly was:

<meta name="og:image" property="og:image" content="https://indiegospel.net/profile/image/profile_image/1301/original/_v=1499964721">

I'm thinking the code might need to be adjusted to leave out meta name altogether and just use property?

{if isset($meta)}
{foreach from=$meta key="mname" item="mvalue"}
<meta property="{$mname}" content="{$mvalue}">
{/foreach}
{/if}

Am I out in left field or does that seem like it might work?
Ken Rich
@ken-rich
07/29/21 01:45:03PM
926 posts

Found bug in metatag module


Design and Skin Customization

Ah - I know exactly where that spot is. That's where I added an else to get my profile index to have meta tags.
Thanks...
Ken Rich
@ken-rich
07/29/21 01:40:53PM
926 posts

Skin Cloning Broken?


Design and Skin Customization

My integrity check won't run. My server guy has since said he knows the why of both problems but just can't seem to find the time to fix it. Thanks For responding. Jamroom hosting is starting to look good again - lol.
Ken Rich
@ken-rich
07/28/21 04:20:51PM
926 posts

Play Counts - Stream Counts


Off Topic

It seems like there is an algorithm designed to only increment the counter once per unique IP but not on replays from the same IP (or perhaps session cookie).

I get complaints from artists who think the counter is broken (stuck) and I would prefer to have all plays counted regardless of IP or session cookie.

Is there a way for me to override this algorithm and if so where would I find that? I am using the Midnight Player - if that makes a difference.
updated by @ken-rich: 11/04/21 01:00:35PM
Ken Rich
@ken-rich
07/27/21 04:57:39PM
926 posts

Found Bug in Profile Tags


Design and Skin Customization

I tested and it works perfectly now.

Is anyone going to update the metatag module?

Tags are being ignored because they are using the old "name" convention instead of "property". I put it in the forum but no one responded.
  5