Related Topics


[Video CMS v4]Facebook Og tags for Channels [Solved]  (Read 2014 times) Print

1 B


hunt07777  November 03, 2013, 04:16:43 AM

Mario...
I want to highlight the channels and share them on facebook...
So how do I do the code for...

<meta property="og:image" content="CHANNEL IMAGE" />
<meta property="og:description" content="CHANNEL DESCRIPTION"/>
<meta property="og:title" content="CHANNEL TITLE" />

so that the above code only appears on /channel/ header??

for channel only??

this way I can share, and users can share the channels..

Thanks bud... I really believe this would be a great improvement for the platform.

Appreciate you Mario!!!

Logged


@Mario  November 03, 2013, 11:46:19 AM


In tpl.global.php under the same thing for videos add:

Code
if(com() == channel) {
global $channel;
$meta .= '
<meta property="og:image" content="'.thumb_fix($channel->picture).'" />
<meta property="og:description" content="'._html($channel->cat_name).'"/>
<meta property="og:title" content="'._html($channel->cat_desc).'" />';
}

Logged
Hello!
If you wish to learn how to start coding on the PHPVibe Video CMS head to the blog.

Please use the search before opening a new topic!


hunt07777  November 10, 2013, 02:28:43 AM

I noticed that the title code and the description code were reversed above..
Tested it.. and it works great!!!

I added it right before...  if(com() == video) {  ...


Great Job Mario...

Plus I also noticed that the images on the channels will import any size which is perfect for Facebook Social Sharing!!!

Great Job Mario!!!

Topic Solved!!!

Logged


@Mario  November 10, 2013, 02:53:07 PM

Glad to help!

Logged
Hello!
If you wish to learn how to start coding on the PHPVibe Video CMS head to the blog.

Please use the search before opening a new topic!