46 lines
1.5 KiB
PHP
46 lines
1.5 KiB
PHP
<?php
|
|
/**
|
|
* SOTESHOP/stAddThisPlugin
|
|
*
|
|
* Ten plik należy do aplikacji stAddThisPlugin opartej na licencji (Open License SOTE) Otwarta Licencja SOTE.
|
|
* Nie zmieniaj tego pliku, jeśli chcesz korzystać z automatycznych aktualizacji oprogramowania.
|
|
* Jeśli chcesz wprowadzać swoje modyfikacje do programu, zapoznaj się z dokumentacją, jak zmieniać
|
|
* oprogramowanie bez zmiany kodu bazowego http://www.sote.pl/modifications
|
|
*
|
|
* @package stAddThisPlugin
|
|
* @subpackage actions
|
|
* @copyright SOTE (www.sote.pl)
|
|
* @license http://www.sote.pl/license/open (Open License SOTE) Otwarta Licencja SOTE
|
|
* @version $Id$
|
|
* @author Krzysztof Bebło <krzysztof.beblo@sote.pl>
|
|
*/
|
|
|
|
/**
|
|
* Klasa stAddThisFrontendComponents
|
|
*
|
|
* @package stAddThisPlugin
|
|
* @subpackage actions
|
|
*/
|
|
class stAddThisFrontendComponents extends sfComponents
|
|
{
|
|
|
|
public function executeShareButtons()
|
|
{
|
|
|
|
$this->config = stConfig::getInstance(sfContext::getInstance(), 'stAddThisBackend');
|
|
$addthis_config = $this->config->load();
|
|
$this->user = $addthis_config['user'];
|
|
|
|
if (!$this->user || ($this->getContext()->getController()->getTheme()->getVersion() >= 7))
|
|
{
|
|
return sfView::NONE;
|
|
}
|
|
if (isset($addthis_config[$this->view]) && empty($addthis_config[$this->view])) return sfView::NONE;
|
|
|
|
$this->smarty = new stSmarty('stAddThisFrontend');
|
|
$lang = $this->getUser()->getCulture();
|
|
$lang = explode("_",$this->getUser()->getCulture());
|
|
$this->lang = $lang[0];
|
|
|
|
}
|
|
} |