Advertisement
mitsol

jsocialintegration_og_tags_for_k2

Sep 16th, 2014
363
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.28 KB | None | 0 0
  1. go to components/com_k2/views/item/view.html.php page in your site and comment lines 551 to 565 as follows -
  2. /*
  3. $document->setMetaData('og:url', $uri->toString());
  4. $document->setMetaData('og:title', (K2_JVERSION == '15') ? htmlspecialchars($document->getTitle(), ENT_QUOTES, 'UTF-8') : $document->getTitle());
  5. $document->setMetaData('og:type', 'article');
  6. $facebookImage = 'image'.$params->get('facebookImage', 'Small');
  7. if ($item->$facebookImage)
  8. {
  9. $parts = parse_url($item->$facebookImage);
  10. if (JFile::exists(JPATH_SITE.$parts['path']))
  11. {
  12. $image = substr(JURI::root(), 0, -1).str_replace(JURI::root(true), '', $item->$facebookImage);
  13. $document->setMetaData('og:image', $image);
  14. $document->setMetaData('image', $image);
  15. }
  16. }
  17. $document->setMetaData('og:description', strip_tags($document->getDescription()));
  18. */
  19. ---------------------------------------------------------------------------------------------------
  20. go to components/com_k2/views/itemlist/view.html.php page in your site and comment lines 700 to 709 as follows -
  21. /*
  22. $document->setMetaData('og:url', $uri->toString());
  23. $document->setMetaData('og:title', (K2_JVERSION == '15') ? htmlspecialchars($document->getTitle(), ENT_QUOTES, 'UTF-8') : $document->getTitle());
  24. $document->setMetaData('og:type', 'website');
  25. if ($task == 'category' && $this->category->image && strpos($this->category->image, 'placeholder/category.png') === false)
  26. {
  27. $image = substr(JURI::root(), 0, -1).str_replace(JURI::root(true), '', $this->category->image);
  28. $document->setMetaData('og:image', $image);
  29. $document->setMetaData('image', $image);
  30. }
  31. $document->setMetaData('og:description', strip_tags($document->getDescription()));
  32. */
  33. ------------------------------------------------------------------------------------------------------
  34. go to components/com_k2/views/latest/view.html.php page in your site and comment lines 274 to 277 as follows -
  35. /*
  36. $document->setMetaData('og:url', $uri->toString());
  37. $document->setMetaData('og:title', (K2_JVERSION == '15') ? htmlspecialchars($document->getTitle(), ENT_QUOTES, 'UTF-8') : $document->getTitle());
  38. $document->setMetaData('og:type', 'website');
  39. $document->setMetaData('og:description', strip_tags($document->getDescription()));
  40. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement