• Resolved Alexander Guskov

    (@forcesail)


    Many many thanks for your really great plugin.

    Could you add matadata (schema.org) as parameter for profile and for shortcode as well, please. The tasks are very different even over the same site so it would be very useful to have this opportunity more flexible.

    Many thanks in advance!

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Contributor David Artiss

    (@dartiss)

    I already add metadata to the video – I assume what you’re asking for are parameters to overall the default information and to add your own?

    Thread Starter Alexander Guskov

    (@forcesail)

    Hello David.
    yes, but it’s tunable only in the settings for the whole website. But it would be great to have an ability to manage it to every using of the shortcode.
    So, could you add metadata parameter to the shortcode parameters (I mean something like this:
    [youtube metadata=”yes” controls=2]SJrXgCLgcwY[/youtube]
    [youtube metadata=”no” controls=2]fSQ6a77dAuM[/youtube]

    If you added to profile settings it would be very useful too.

    Plugin Contributor David Artiss

    (@dartiss)

    Okay, yes, that’s easy. But I have a question to help me understand this a little better… why would you need to turn the metadata off on an individual basis?

    Thread Starter Alexander Guskov

    (@forcesail)

    Thank you very much, David.
    It’s easy to explane:
    Generally, to have schema metadata is a great idea! But:
    1) In some cases I need insert the same video into the same page twice. It won’t make google or other parsers happy.
    2) In some cases I want to extend matadata of a video with additional block like
    <div itemprop=”hasPart” itemscope itemtype=”https://schema.org/Clip”&gt;
    This case I’d prefer have video embeded “naked” and “dress” it in metedata by myself. But I’d be happy to do it just sometimes, so this functionality of the plugin is very useful ??

    Plugin Contributor David Artiss

    (@dartiss)

    I understand – thank you for the explanation.

    I’ll add this to the list of enhancements.

    Plugin Contributor David Artiss

    (@dartiss)

    Thread Starter Alexander Guskov

    (@forcesail)

    Many thanks, David!
    You are really great!

    Thread Starter Alexander Guskov

    (@forcesail)

    One wish more but regarding the same subject.
    Would you be so kind to add all parameters of the video that you use for creating metedate (like published and others), to [ vinfo], please.

    Plugin Contributor David Artiss

    (@dartiss)

    Of course – a great idea. I’ll add that to the list.

    Thread Starter Alexander Guskov

    (@forcesail)

    Thank you, David.
    I think you can add published, duration, channelid, channeltitle.

    I’m sorry that I advise you what to do with your code, but I thinks it’s better to explain what do I mean.

    I’d add to api-access.php:
    $return_data = array(
    ….
    ‘channelid’ => ”,
    ‘channeltitle’ => ”,
    ‘duration’ => ”,
    )

    and

    if ( isset( $api_data[‘snippet’][‘channelId’] ) ) {
    $return_data[‘channelid’] = htmlspecialchars( $api_data[‘snippet’][‘channelId’] );
    }
    if ( isset( $api_data[‘snippet’][‘channelTitle’] ) ) {
    $return_data[‘channeltitle’] = htmlspecialchars( $api_data[‘snippet’][‘channelTitle’] );
    }
    if ( isset( $api_data[‘contentDetails’][‘duration’] ) ) {
    $return_data[‘duration’] = htmlspecialchars( $api_data[‘contentDetails’][‘duration’] );
    }`

    and to generate-other-code.php :
    $output = str_ireplace( ‘%published%’, $data[‘published’], $output );
    $output = str_ireplace( ‘%channelid%’, $data[‘channelid’], $output );
    $output = str_ireplace( ‘%channeltitle%’, $data[‘channeltitle’], $output );
    $output = str_ireplace( ‘%duration%’, $data[‘duration’], $output );

    probably would change all str_replace to str_ireplace.

    I’m sorry :)))

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Metadata as parameter’ is closed to new replies.