• Welcome to PHPVIBE Forums. Please log in.

[ Video Sharing CMS v4 ] Facebook Og tags for Channels [Solved]

Started by hunt07777,

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

hunt07777Topic starter

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!!!
  •  

Marius P.


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

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).'" />';
}
Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

hunt07777Topic starter

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!!!
  •  

Marius P.

Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

Similar topics (7)