Advertisement:

Author Topic: The Open Graph protocol  (Read 412 times)

Hartenheer

  • Guest
The Open Graph protocol
« on: June 12, 2018, 10:22:24 am »
On my forum I had The Open Graph protocol.
I would also like that on the Osclass site.
But do not know where to put it.
Who can advise me on this?
{see example below}

Op mijn forum had ik The Open Graph protocol staan.
Ik zou dat ook graag op de Osclass site willen.
Maar ik weet niet waar ik het moet plaatsen.
Wie kan me hierbij adviseren?
{zie voorbeeld onderaan}

Code: [Select]
<html prefix="og: http://ogp.me/ns#">
<head>
<title>The Rock (1996)</title>
<meta property="og:title" content="The Rock" />
<meta property="og:type" content="video.movie" />
<meta property="og:url" content="http://www.imdb.com/title/tt0117500/" />
<meta property="og:image" content="http://ia.media-imdb.com/images/rock.jpg" />
...
</head>
...
</html>

p206ab

  • Sr. Member
  • ****
  • Posts: 343
Re: The Open Graph protocol
« Reply #1 on: June 12, 2018, 02:12:25 pm »
I have it in common/head.php of my theme.

Code: [Select]
    <meta property="og:title" content="<?php echo osc_item_title() ; ?>" />
    <meta property="og:description" content="<?php echo osc_highlight(strip_tags(osc_item_description()), 140) ; ?>" />
    <?php if( osc_count_item_resources() > ) { ?>
        <meta property="og:image" content="<?php echo osc_resource_url(); ?>" />
    <?php } else { ?>
        <meta property="og:image" content="<?php echo osc_current_web_theme_url('images/no-photo.gif') ; ?>" />
    <?php } ?