что куда ставить
у меня такой плагин:
-------
<?php
/**------------------------------------------------------------------------
# plg_socbuttons - Social Share Buttons Plugin Content for Joomla 1.5
# author RcReated.com
# copyright - Copyright (C) 2011 RcReated.com. All Rights Reserved.
# @license -
http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
# Websites:
http://RcReated.com# Technical Support: Joomla Blog -
http://nauca.com.ua/plugins/socbuttons/-------------------------------------------------------------------------**/
/**------------------------------------------------------------------------
* file: socbuttons.php 1.0.0 00001, June 2011 20:00:00 RcReated $
* package: Social Share Buttons Plugin Content
------------------------------------------------------------------------**/
//No direct access!
defined('_JEXEC') or die('Restricted access');
jimport('joomla.plugin.plugin');
class plgContentSocButtons extends JPlugin
{
public function __construct($subject, $params){
parent::__construct($subject, $params); }
public function onBeforeDisplayContent(&$article, &$params, $limitstart)
{
//if($article == 'com_content'){
//hide plugin on category
$exclusion_categories = $this->params->get('fb_categories', 0);
$categoriesArray = explode(",",$exclusion_categories);
if(!empty($exclusion_categories)){
if(strlen(array_search($article->catid, $categoriesArray))){
return false;
}
}
//hide plugin on article
$exclusion_articles = $this->params->get('fb_articles', '');
$articlesArray = explode(",",$exclusion_articles);
if(!empty($exclusion_articles)){
if(strlen(array_search($article->id, $articlesArray))){
return false;
}
}
//plugin
require_once(JPATH_BASE.DS.'components'.DS.'com_content'.DS.'helpers'.DS.'route.php');
$Itemid = JRequest::getVar("Itemid","1");
$show =true;
$current=JURI::current();
if($row->id){
$link = JRoute::_(ContentHelperRoute::getArticleRoute($row->id, $row->catid));
$jURI = & JURI::getInstance();
$link = $jURI->getScheme()."://".$jURI->getHost().$link;
}else{
$jURI =& JURI::getInstance();
$link = $jURI->toString();
}
if ((JRequest :: getVar('view')) <> 'article'){
$show=false;
}
if ($show){
if(isset($article->slug)){
$current =$jURI->toString(array('scheme', 'host', 'port')).JRoute::_(ContentHelperRoute::getArticleRoute($article->slug, $article->catslug, $article->sectionid),true);
}
//setting CSS
$fblike_type = $this->params->get('fblike_type');
if($fblike_type == 'button_count'){
$widthtype= 75;
$heighttype = 20;
}else{
$widthtype= 47;
$heighttype = 60;
}
$twitter_type = $this->params->get('twitter_type');
if($twitter_type == 'Horizontal Count'){
$widthweet= 96;
}else{
$widthweet= 55;
}
$Google_type = $this->params->get('Google_type');
if($Google_type == 'medium'){
$Google_top = 60;
}else{
$Google_top=60;
}
$Vk_id = $this->params->get('vk_id', '');
$Vk_type = $this->params->get('Vk_type');
if($Vk_type == 'button'){
$vk_height = 140;
$vk_margin = 10;
}else{
$vk_height = 45;
$vk_margin = 0;
}
//code plugin
$html = '';
$html .= '<div style="clear:both;"></div>';
$html .= '<div style="padding-top: 10px; overflow: hidden; float: '.$this->params->get('fb_align', 'left').';">';
if($this->params->get('FacebookShareButton')==1){
$html .= '<div class="itp-share-fb" style="float: left;">
<a name="fb_share" type="'.$this->params->get('FacebookShareType').'" share_url="' . $link . '">Share</a><script src="
http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>
</div>
';
}else{
$html .='';
}
if($this->params->get('fblike')==1){
$html .= '<div style="margin-left: 10px; width: '.$widthtype.'px; height :'.$heighttype.'px; float: left;">';
$html .='<iframe src="
http://www.facebook.com/plugins/like.php?locale=en_US&href='.rawurlencode($link).'&layout='.$fblike_type.'&show_faces=true&action=like&colorscheme=light" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width: '.$widthtype.'px; height :'.$heighttype.'px;" allowTransparency="true"></iframe>';
$html .= '</div>';
}else{
$html .='';
}
if($this->params->get('twitter')==1){
$html .='<div style="width: '.$widthweet.'px !important; float: left; margin-left: 10px;">';
$html .= '<a href="
http://twitter.com/share" class="twitter-share-button" style="width: '.$widthweet.'px;" data-url="'.$link.'" data-count="'.$twitter_type.'" >Twitter</a><script src="
http://platform.twitter.com/widgets.js" type="text/javascript"></script>';
$html .= '</div>';
}else{
$html .='';
}
if($this->params->get('Google')==1){
$html .='<div style="width: '.$Google_top.'px !important; float: left; margin-left: 10px; border: none;">';
$html .= '<script type="text/javascript" src="
http://apis.google.com/js/plusone.js"></script><g:plusone size="'.$Google_type.'"></g:plusone>';
$html .= '</div>';
}else{
$html .='';
}
if($this->params->get('Vk')==1){
$html .='<div style="width: '.$vk_height.'px !important; float: left; border: none; margin-left: '.$vk_margin.'px;">';
$html .= '<script type="text/javascript" src="
http://userapi.com/js/api/openapi.js"></script><script type="text/javascript">
VK.init({apiId:'.$Vk_id.', onlyWidgets: true});</script>';
$html .='<div id="vk_like"></div>';
$html .='<script type="text/javascript">VK.Widgets.Like("vk_like", {type: "'.$Vk_type.'"});</script>';
$html .= '</div>';
}else{
$html .='';
}
if($this->params->get('MM')==1){
$html .='<div style="width: 150px !important; float: left; margin-left: 10px; border: none;">';
$html .= '<a target="_blank" class="mrc__plugin_like_button" href="
http://connect.mail.ru/share" data-mrc-config={type:button,width:150}>Поделиться</a>';
$html .='<script src="
http://cdn.connect.mail.ru/js/loader.js" type="text/javascript" charset="UTF-8"></script>';
$html .= '</div>';
}else{
$html .='';
}
}
//end plugin
//show plugin
$position = $this->params->get('fb_position', 'above');
//var_dump($row->text);
//var_dump($row->fulltext);
//var_dump($row->introtext);
if($position == 'above'){
$article->text=$html.$article->text;
}else{
$article->text.=$html;
}
//}
return;
}
}
?>
----------