PK œqhYî¶J‚ßF ßF ) nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/
| Dir : /home/jairosvt/public_html/afmedios.com/plugins/content/ |
| Server: Linux server2.noticiasdecolima.com 4.18.0-553.30.1.el8_10.x86_64 #1 SMP Tue Nov 26 02:30:26 EST 2024 x86_64 IP: 107.161.180.42 |
| Dir : /home/jairosvt/public_html/afmedios.com/plugins/content/jlike.php |
<?php
/**
* jLike plug-in for Joomla!
* jLike extention display the Facebook like button
*
* @author $Author: Ajay Lulia $
* @copyright Joomla Service Provider - 2010
* @package plgjLike.zip
* @license GNU GPLv2 <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>
* @link http://www.joomlaserviceprovider.com
* @version $Id: jLike.php $
*/
// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );
$mainframe->registerEvent( 'onPrepareContent', 'plgContentjLike' );
function plgContentjLike( &$row, &$params, $page=0 )
{
global $option;
$view = JRequest::getVar('view');
$layout = JRequest::getVar('layout');
$db =& JFactory::getDBO();
// Get plugin info
$plugin =& JPluginHelper::getPlugin('content', 'jlike');
$pluginParams = new JParameter( $plugin->params );
// check whether plugin has been unpublished
if ( !$pluginParams->get( 'enabled', 1 ) ) {
return true;
}
if ( $pluginParams->get( 'fb_other_component', 1 ) && $option != "com_content"){
return true;
}
$frontPage = $pluginParams->get( 'fb_frontpage', 0 );
if (!$frontPage && $option == "com_content" && $view == "frontpage") {
return true;
}
$sectionBlog = $pluginParams->get( 'fb_section_blog', 0 );
if(!$sectionBlog && $option == "com_content" && $view == "section" && $layout == "blog"){
return true;
}
$sectionList = $pluginParams->get( 'fb_section_list', 0 );
if(!$sectionList && $option == "com_content" && $view == "section" && $layout != "blog"){
return true;
}
$categoryBlog = $pluginParams->get( 'fb_category_blog', 0 );
if(!$categoryBlog && $option == "com_content" && $view == "category" && $layout == "blog"){
return true;
}
$categoryList = $pluginParams->get( 'fb_category_list', 0 );
if(!$categoryList && $option == "com_content" && $view == "category" && $layout != "blog"){
return true;
}
$sections = $pluginParams->get( 'fb_sections', '' );
if($sections){
$sectionsArray = explode(",",$sections);
if(strlen(array_search($row->sectionid,$sectionsArray))){
return true;
}
}
$categories = $pluginParams->get( 'fb_categories', '' );
if($categories){
$categoriesArray = explode(",",$categories);
if(strlen(array_search($row->catid,$categoriesArray))){
return true;
}
}
$articles = $pluginParams->get( 'fb_articles', '' );
if($articles){
$articlesArray = explode(",",$articles);
if(strlen(array_search($row->id,$articlesArray))){
return true;
}
}
require_once(JPATH_BASE.DS.'components'.DS.'com_content'.DS.'helpers'.DS.'route.php');
$Itemid = JRequest::getVar("Itemid","1");
if($row->id){
$link = JRoute::_(ContentHelperRoute::getArticleRoute($row->id,$row->catid,$row->sectionid));
$jURI =& JURI::getInstance();
$link = $jURI->getScheme()."://".$jURI->getHost().$link;
} else {
$jURI =& JURI::getInstance();
$link = $jURI->toString();
}
$html = '';
$html .= "<div style=\"clear:both;\"></div>";
$html .= "<div style=\"width:".$pluginParams->get('fb_width').";text-align:".$pluginParams->get('fb_align').";height:".$pluginParams->get('fb_height')."px;\">";
if($pluginParams->get('fb_type')=="like"){
if($pluginParams->get('fb_code') == "iframe"){
$font = '';
if($pluginParams->get('fb_font')){
$font = "&font=".$pluginParams->get('fb_font');
}
$sho_faces = ($pluginParams->get('fb_show_faces')=="yes")?"true":"false";
$html .= "<iframe src=\"http://www.facebook.com/plugins/like.php?href=" . urlencode($link)."&layout=".$pluginParams->get('fb_layout')."&show_faces=".$sho_faces."&width=".$pluginParams->get('fb_width')."&action=".$pluginParams->get('fb_action')."&colorscheme=".$pluginParams->get('fb_color').$font ."\" scrolling=\"no\" frameborder=\"0\" style=\"border:none; overflow:hidden; width:".$pluginParams->get('fb_width')."px; height:".$pluginParams->get('fb_height')."px\"></iframe>";
}
} else if($pluginParams->get('fb_type')=="share"){
$html .= '<a name="fb_share" type="box_count" style="float:'.$pluginParams->get('fb_align').';" share_url="' . $link . '"></a>'.'<script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>';
}
$html .= "</div>";
$position = $pluginParams->get('fb_position', 1);
if ($position) {
// display after content
$row->text .= $html;
} else {
// display before content
$row->text = $html . $row->text;
}
return;
}
?>