-
AuthorPosts
-
nedzad grebovic Friend
nedzad grebovic
- Join date:
- July 2014
- Posts:
- 325
- Downloads:
- 12
- Uploads:
- 118
- Thanks:
- 83
- Thanked:
- 2 times in 1 posts
March 11, 2015 at 8:46 am #562560Trust me or not, I can not find Crest, I am googling 15 minutes 🙁
jooservices Friendjooservices
- Join date:
- October 2014
- Posts:
- 8556
- Downloads:
- 0
- Uploads:
- 130
- Thanked:
- 1245 times in 1121 posts
March 11, 2015 at 8:47 am #562561Hi there
Here is my sample
<meta property="og:type" content="article" />
<meta property="og:title" content="Joomla! Testing" />
<meta property="og:site_name" content="JOOdevelopment" />
<meta property="og:url" content="http://joodevelopment.com/joomla/" /><meta property="og:locale:locale" content="en_gb" />
<meta property="og:locale:alternate" content="en_gb" />
<meta property="og:determiner" content="auto" />
<meta property="article:published_time" content="2011-01-01 00:00:01" />
<meta property="article:modified_time" content="2013-10-15 14:57:20" />
<meta property="article:section" content="Joomla!" /><meta property="fb:app_id" content="630890023654561" />
<meta property="fb:admins" content="100002155587121" />I have implemented for com_content&view=article to extract more data from article
// Get article object
$model = JModelLegacy::getInstance('article', 'ContentModel');
$item = $model->getItem($id);
$item->images = new JRegistry($item->images);
$image = new CrexOpengraphObjectImage(array('src' => $item->images->get('image_intro')));
if ($image->isValid())
{
$this->_opengraph->add('og:image', $image->getProperties());
}
$image = new CrexOpengraphObjectImage(array('src' => $item->images->get('image_fulltext')));
if ($image->isValid())
{
$this->_opengraph->add('og:image', $image->getProperties());
}
// Load DOM from intro & full text
$this->_document = str_get_dom($item->introtext . $item->fulltext);
$this->_opengraph->set('og:title', $item->title);
if ($item->introtext != '')
{
$this->_opengraph->set('og:description', strip_tags($item->introtext));
} elseif ($item->fulltext != '')
{
$this->_opengraph->set('og:description', strip_tags($item->fulltext));
}// Article
$this->_opengraph->set('article:published_time', $item->publish_up);
$this->_opengraph->set('article:modified_time', $item->modified);
if ($item->publish_down != '0000-00-00 00:00:00')
{
$this->_opengraph->set('article:expiration_time', $item->publish_down);
}//$this->_opengraph->set('article:author', $item->author);
$this->_opengraph->set('article:section', $item->category_title);
$tags = explode(',', $item->metakey);
foreach ($tags as $tag)
{
$this->_opengraph->add('article:tag', array(
'article:tag' => $tag
));
}It also supported for ALL opengraph as well.
// Facebook
$this->_opengraph->set('fb:app_id', $this->_params->get('fb:app_id', '630890023654561'));
$this->_opengraph->add('fb:admins', array(
'fb:admins' => $this->_params->get('fb:admins', '100002155587121')
));
// Android
$this->_opengraph->set('al:android:url', $this->_params->get('al:android:url'));
$this->_opengraph->set('al:android:package', $this->_params->get('al:android:package'));
$this->_opengraph->set('al:android:app_name', $this->_params->get('al:android:app_name'));
$this->_opengraph->set('al:android:class', $this->_params->get('al:android:class'));
// iOS
$this->_opengraph->set('al:ios:url', $this->_params->get('al:ios:url'));
$this->_opengraph->set('al:ios:app_store_id', $this->_params->get('al:ios:app_store_id'));
$this->_opengraph->set('al:ios:app_name', $this->_params->get('al:ios:app_name'));
// iPad
$this->_opengraph->set('al:ipad:url', $this->_params->get('al:ipad:url'));
$this->_opengraph->set('al:ipad:app_store_id', $this->_params->get('al:ipad:app_store_id'));
$this->_opengraph->set('al:ipad:app_name', $this->_params->get('al:ipad:app_name'));
// iPhone
$this->_opengraph->set('al:iphone:url', $this->_params->get('al:iphone:url'));
$this->_opengraph->set('al:iphone:app_store_id', $this->_params->get('al:iphone:app_store_id'));
$this->_opengraph->set('al:iphone:app_name', $this->_params->get('al:iphone:app_name'));
//
$this->_opengraph->set('al:web:url', $this->_params->get('al:web:url'));
$this->_opengraph->set('al:web:should_fallback', $this->_params->get('al:web:should_fallback'));
// Windows
$this->_opengraph->set('al:windows:url', $this->_params->get('al:windows:url'));
$this->_opengraph->set('al:windows:package_family_name', $this->_params->get('al:windows:package_family_name'));
$this->_opengraph->set('al:windows:app_id', $this->_params->get('al:windows:app_id'));
$this->_opengraph->set('al:windows:app_name', $this->_params->get('al:windows:app_name'));
// Windows Phone
$this->_opengraph->set('al:windows_phone:url', $this->_params->get('al:windows_phone:url'));
$this->_opengraph->set('al:windows_phone:app_id', $this->_params->get('al:windows_phone:app_id'));
$this->_opengraph->set('al:windows_phone:app_name', $this->_params->get('al:windows_phone:app_name'));
// Windows Universal
$this->_opengraph->set('al:windows_universal:url', $this->_params->get('al:windows_universal:url'));
$this->_opengraph->set('al:windows_universal:package_family_name', $this->_params->get('al:windows_universal:package_family_name'));
$this->_opengraph->set('al:windows_universal:app_id', $this->_params->get('al:windows_universal:app_id'));
$this->_opengraph->set('al:windows_universal:app_name', $this->_params->get('al:windows_universal:app_name'));
// Facebook Profile
$this->_opengraph->set('fb:profile_id', $this->_params->get('fb:profile_id', '100002155587121'));
// Audio
$this->_opengraph->set('og:audio', array(
'og:audio:url' => $this->_params->get('og:audio:url'),
'og:audio:secure_url' => $this->_params->get('og:audio:secure_url'),
'og:audio:type' => $this->_params->get('og:audio:type')
));
// Description
$this->_opengraph->set('og:description', $this->_params->get('og:description', JFactory::getConfig()->get('MetaDesc')));
// Determine
$this->_opengraph->set('og:determiner', $this->_params->get('og:determiner', 'auto'));
// Restrictions
$this->_opengraph->add('og:restrictions', array(
'og:restrictions:country:allowed' => $this->_params->get('og:restrictions:country:allowed'),
'og:restrictions:country:disallowed' => $this->_params->get('og:restrictions:country:disallowed')
));
$this->_opengraph->set('og:restrictions:age', $this->_params->get('og:restrictions:age'));
$this->_opengraph->add('og:restrictions:content', array(
'og:restrictions:content' => $this->_params->get('og:restrictions:content')));
$this->_opengraph->add('og:rich_attachment', $this->_params->get('og:rich_attachment'));And of course you can implement your own way 😉
Thank you,
Viet Vujooservices Friendjooservices
- Join date:
- October 2014
- Posts:
- 8556
- Downloads:
- 0
- Uploads:
- 130
- Thanked:
- 1245 times in 1121 posts
March 11, 2015 at 8:52 am #562564<em>@nedzad72 462754 wrote:</em><blockquote>Trust me or not, I can not find Crest, I am googling 15 minutes :(</blockquote>
Hi there
Here you are:
https://github.com/jooservices/CrexOpengraph
It’s public and free on git 😉Thank you,
Viet Vu1 user says Thank You to jooservices for this useful post
nedzad grebovic Friendnedzad grebovic
- Join date:
- July 2014
- Posts:
- 325
- Downloads:
- 12
- Uploads:
- 118
- Thanks:
- 83
- Thanked:
- 2 times in 1 posts
March 11, 2015 at 8:55 am #562565You have to bee kiding me 🙂 I am not code-braker, just a regular mechanical enginner 😀 😀
nedzad grebovic Friendnedzad grebovic
- Join date:
- July 2014
- Posts:
- 325
- Downloads:
- 12
- Uploads:
- 118
- Thanks:
- 83
- Thanked:
- 2 times in 1 posts
March 11, 2015 at 9:04 am #562566nedzad grebovic Friendnedzad grebovic
- Join date:
- July 2014
- Posts:
- 325
- Downloads:
- 12
- Uploads:
- 118
- Thanks:
- 83
- Thanked:
- 2 times in 1 posts
March 11, 2015 at 9:07 am #562567<em>@jooservices 462755 wrote:</em><blockquote>Hi there
Here is my sample
<meta property="og:type" content="article" />
<meta property="og:title" content="Joomla! Testing" />
<meta property="og:site_name" content="JOOdevelopment" />
<meta property="og:url" content="http://joodevelopment.com/joomla/" /><meta property="og:locale:locale" content="en_gb" />
<meta property="og:locale:alternate" content="en_gb" />
<meta property="og:determiner" content="auto" />
<meta property="article:published_time" content="2011-01-01 00:00:01" />
<meta property="article:modified_time" content="2013-10-15 14:57:20" />
<meta property="article:section" content="Joomla!" /><meta property="fb:app_id" content="630890023654561" />
<meta property="fb:admins" content="100002155587121" />I have implemented for com_content&view=article to extract more data from article
// Get article object
$model = JModelLegacy::getInstance('article', 'ContentModel');
$item = $model->getItem($id);
$item->images = new JRegistry($item->images);
$image = new CrexOpengraphObjectImage(array('src' => $item->images->get('image_intro')));
if ($image->isValid())
{
$this->_opengraph->add('og:image', $image->getProperties());
}
$image = new CrexOpengraphObjectImage(array('src' => $item->images->get('image_fulltext')));
if ($image->isValid())
{
$this->_opengraph->add('og:image', $image->getProperties());
}
// Load DOM from intro & full text
$this->_document = str_get_dom($item->introtext . $item->fulltext);
$this->_opengraph->set('og:title', $item->title);
if ($item->introtext != '')
{
$this->_opengraph->set('og:description', strip_tags($item->introtext));
} elseif ($item->fulltext != '')
{
$this->_opengraph->set('og:description', strip_tags($item->fulltext));
}// Article
$this->_opengraph->set('article:published_time', $item->publish_up);
$this->_opengraph->set('article:modified_time', $item->modified);
if ($item->publish_down != '0000-00-00 00:00:00')
{
$this->_opengraph->set('article:expiration_time', $item->publish_down);
}//$this->_opengraph->set('article:author', $item->author);
$this->_opengraph->set('article:section', $item->category_title);
$tags = explode(',', $item->metakey);
foreach ($tags as $tag)
{
$this->_opengraph->add('article:tag', array(
'article:tag' => $tag
));
}It also supported for ALL opengraph as well.
// Facebook
$this->_opengraph->set('fb:app_id', $this->_params->get('fb:app_id', '630890023654561'));
$this->_opengraph->add('fb:admins', array(
'fb:admins' => $this->_params->get('fb:admins', '100002155587121')
));
// Android
$this->_opengraph->set('al:android:url', $this->_params->get('al:android:url'));
$this->_opengraph->set('al:android:package', $this->_params->get('al:android:package'));
$this->_opengraph->set('al:android:app_name', $this->_params->get('al:android:app_name'));
$this->_opengraph->set('al:android:class', $this->_params->get('al:android:class'));
// iOS
$this->_opengraph->set('al:ios:url', $this->_params->get('al:ios:url'));
$this->_opengraph->set('al:ios:app_store_id', $this->_params->get('al:ios:app_store_id'));
$this->_opengraph->set('al:ios:app_name', $this->_params->get('al:ios:app_name'));
// iPad
$this->_opengraph->set('al:ipad:url', $this->_params->get('al:ipad:url'));
$this->_opengraph->set('al:ipad:app_store_id', $this->_params->get('al:ipad:app_store_id'));
$this->_opengraph->set('al:ipad:app_name', $this->_params->get('al:ipad:app_name'));
// iPhone
$this->_opengraph->set('al:iphone:url', $this->_params->get('al:iphone:url'));
$this->_opengraph->set('al:iphone:app_store_id', $this->_params->get('al:iphone:app_store_id'));
$this->_opengraph->set('al:iphone:app_name', $this->_params->get('al:iphone:app_name'));
//
$this->_opengraph->set('al:web:url', $this->_params->get('al:web:url'));
$this->_opengraph->set('al:web:should_fallback', $this->_params->get('al:web:should_fallback'));
// Windows
$this->_opengraph->set('al:windows:url', $this->_params->get('al:windows:url'));
$this->_opengraph->set('al:windows:package_family_name', $this->_params->get('al:windows:package_family_name'));
$this->_opengraph->set('al:windows:app_id', $this->_params->get('al:windows:app_id'));
$this->_opengraph->set('al:windows:app_name', $this->_params->get('al:windows:app_name'));
// Windows Phone
$this->_opengraph->set('al:windows_phone:url', $this->_params->get('al:windows_phone:url'));
$this->_opengraph->set('al:windows_phone:app_id', $this->_params->get('al:windows_phone:app_id'));
$this->_opengraph->set('al:windows_phone:app_name', $this->_params->get('al:windows_phone:app_name'));
// Windows Universal
$this->_opengraph->set('al:windows_universal:url', $this->_params->get('al:windows_universal:url'));
$this->_opengraph->set('al:windows_universal:package_family_name', $this->_params->get('al:windows_universal:package_family_name'));
$this->_opengraph->set('al:windows_universal:app_id', $this->_params->get('al:windows_universal:app_id'));
$this->_opengraph->set('al:windows_universal:app_name', $this->_params->get('al:windows_universal:app_name'));
// Facebook Profile
$this->_opengraph->set('fb:profile_id', $this->_params->get('fb:profile_id', '100002155587121'));
// Audio
$this->_opengraph->set('og:audio', array(
'og:audio:url' => $this->_params->get('og:audio:url'),
'og:audio:secure_url' => $this->_params->get('og:audio:secure_url'),
'og:audio:type' => $this->_params->get('og:audio:type')
));
// Description
$this->_opengraph->set('og:description', $this->_params->get('og:description', JFactory::getConfig()->get('MetaDesc')));
// Determine
$this->_opengraph->set('og:determiner', $this->_params->get('og:determiner', 'auto'));
// Restrictions
$this->_opengraph->add('og:restrictions', array(
'og:restrictions:country:allowed' => $this->_params->get('og:restrictions:country:allowed'),
'og:restrictions:country:disallowed' => $this->_params->get('og:restrictions:country:disallowed')
));
$this->_opengraph->set('og:restrictions:age', $this->_params->get('og:restrictions:age'));
$this->_opengraph->add('og:restrictions:content', array(
'og:restrictions:content' => $this->_params->get('og:restrictions:content')));
$this->_opengraph->add('og:rich_attachment', $this->_params->get('og:rich_attachment'));And of course you can implement your own way 😉
Thank you,
Viet Vu</blockquote>What to do with this?
I become tired of “FB friendly”, and I belive you are more tired of me 😀jooservices Friendjooservices
- Join date:
- October 2014
- Posts:
- 8556
- Downloads:
- 0
- Uploads:
- 130
- Thanked:
- 1245 times in 1121 posts
March 11, 2015 at 9:17 am #562572Hi there
# Ok topic is solved here
# My plugin actually is open for developer and end user to implement their own way 😉
But yes, i’ll provide basic functions as well.Thank you,
Viet Vu1 user says Thank You to jooservices for this useful post
nedzad grebovic Friendnedzad grebovic
- Join date:
- July 2014
- Posts:
- 325
- Downloads:
- 12
- Uploads:
- 118
- Thanks:
- 83
- Thanked:
- 2 times in 1 posts
March 11, 2015 at 9:44 am #562577OK mate 🙂
In best interests of my and your time is abandon this template 🙂
Thanks for all your time and help mate!
🙂Natia Gabrichidze FriendNatia Gabrichidze
- Join date:
- September 2014
- Posts:
- 27
- Downloads:
- 7
- Uploads:
- 2
- Thanks:
- 8
March 11, 2015 at 1:45 pm #562631Can someone suggest how to solve this problem please? @nedzad72 @jooservices
nedzad grebovic Friendnedzad grebovic
- Join date:
- July 2014
- Posts:
- 325
- Downloads:
- 12
- Uploads:
- 118
- Thanks:
- 83
- Thanked:
- 2 times in 1 posts
March 11, 2015 at 1:51 pm #562632I have new post at:
because Image is still mismach and also I have eternely slow site now:
http://www.joomlart.com/forums/topic/eternal-get-to-facebook/
AuthorPostsThis topic contains 25 replies, has 5 voices, and was last updated by nedzad grebovic 9 years, 8 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum