Skip to content

Instantly share code, notes, and snippets.

View codeboxr's full-sized avatar
🎯
Focusing

Codeboxr codeboxr

🎯
Focusing
View GitHub Profile
else if(JRequest::getCmd('option') == 'com_content') {
//var_dump($context);
if(!($context == 'com_content.article' || $context == 'com_content.category')) {return; }
$comcontent = true;
if($this->_floatcontent && (JRequest::getCmd('view') == 'article') && $float){$float = true;}else{$float = false;}
$this->_floatpos = $this->_floatposcontent;
$this->_floathmargin = $this->_floathmargincontent;
$this->_floatvmargin = $this->_floatvmargincontent;
//$this->_floatdistance = $this->_floatdistancecontent;
@codeboxr
codeboxr / gist:6171227
Created August 7, 2013 04:40
Com_k2 default open graph fix
//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);