public function init() { $this->title = $this->title ? Yii::t($this->translate, CHtml::encode($this->title)) : 'Опубликовать в Живой ленте Google'; $this->url = $this->url ? 'data-url="' . urlencode($this->url) . '"' : ''; $this->imageUrl = $this->imageUrl ? 'data-imageurl="' . urlencode($this->imageUrl) . '"' : ''; $this->locale = CHtml::encode($this->locale); parent::init(); }
public function init() { if (!$this->user) { throw new CException('Укажите учетную запись в Твиттере для виджета TwitterFollowMeButton! user => @youTwitterAccount!'); } $this->color = array_key_exists(strtolower($this->color), $this->_validColors) ? $this->_validColors[strtolower($this->color)] : self::WHITE; $this->type = in_array(strtolower($this->type), $this->_validTypes) ? strtolower($this->type) : 'follow_me'; parent::init(); }
public function init() { if (!in_array($this->type, $this->validTypes)) { $this->type = 'button_count'; } $this->text = CHtml::encode(Yii::t($this->translate, $this->text)); $this->url = $this->url ? "?share_url=" . urlencode($this->url) . "" : ''; parent::init(); }
public function init() { if (!in_array($this->style, $this->validStyles)) { $this->style = 'normal'; } $this->style = 'tweetmeme_style = "' . CHtml::encode($this->style) . '";'; $this->url = $this->url ? 'tweetmeme_url = ' . urlencode($this->url) . ';' : ''; $this->source = 'tweetmeme_source = "' . CHtml::encode($this->source) . '";'; $this->service = 'tweetmeme_source = "' . CHtml::encode($this->service) . '";'; $this->api = 'tweetmeme_source = "' . CHtml::encode($this->api) . '";'; parent::init(); }
public function init() { if (!in_array($this->type, $this->validTypes)) { $this->type = 'round'; } $this->text = CHtml::encode(Yii::t($this->translate, $this->text)); if ($this->type == 'custom') { $this->text = '<img src=\\"http://vk.com/images/vk32.png?1\\" />'; } if ($this->url && $this->url != 'false') { $this->url = '{url:"' . urlencode($this->url) . '"}'; } parent::init(); }
public function init() { $this->type = in_array(strtolower($this->type), $this->_validTypes) ? $this->type : 'horizontal'; $this->lang = in_array(strtolower($this->lang), $this->_validTypes) ? $this->lang : 'en'; parent::init(); }