Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Go to(windows style path) joomla root/components/com_k2/views/item/view.html.php
- // and comment line from 445 to 455
- /*
- $document->setMetaData('og:url', $uri->toString());
- $document->setMetaData('og:title', htmlspecialchars($document->getTitle(), ENT_QUOTES, 'UTF-8'));
- $document->setMetaData('og:type', 'Article');
- $facebookImage = 'image'.$params->get('facebookImage', 'Small');
- if ($item->$facebookImage && JFile::exists(JPATH_SITE.$item->$facebookImage))
- {
- $image = substr(JURI::root(), 0, -1).str_replace(JURI::root(true), '', $item->$facebookImage);
- $document->setMetaData('og:image', $image);
- $document->setMetaData('image', $image);
- }
- $document->setMetaData('og:description', htmlspecialchars(strip_tags($document->getDescription()), ENT_QUOTES, 'UTF-8'));
- */
- For joomla root/components/com_k2/views/latestโ/view.html.php
- comment line from line 256 - 261
- // Set Facebook meta data
- /*
- $document = JFactory::getDocument();
- $uri = JURI::getInstance();
- $document->setMetaData('og:url', $uri->toString());
- $document->setMetaData('og:title', (K2_JVERSION == '15') ? htmlspecialchars($document->getTitle(), ENT_QUOTES, 'UTF-8') : $document->getTitle());
- $document->setMetaData('og:type', 'website');
- $document->setMetaData('og:description', strip_tags($document->getDescription()));
- */
- For joomla root/components/com_k2/views/itemlist/view.html.php line 690 to 701
- // Set Facebook meta data
- /*
- $document = JFactory::getDocument();
- $uri = JURI::getInstance();
- $document->setMetaData('og:url', $uri->toString());
- $document->setMetaData('og:title', (K2_JVERSION == '15') ? htmlspecialchars($document->getTitle(), ENT_QUOTES, 'UTF-8') : $document->getTitle());
- $document->setMetaData('og:type', 'website');
- if ($task == 'category' && $this->category->image && strpos($this->category->image, 'placeholder/category.png') === false)
- {
- $image = substr(JURI::root(), 0, -1).str_replace(JURI::root(true), '', $this->category->image);
- $document->setMetaData('og:image', $image);
- $document->setMetaData('image', $image);
- }
- $document->setMetaData('og:description', strip_tags($document->getDescription()));
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement