@@ 177-194 (lines=18) @@ | ||
174 | } |
|
175 | } |
|
176 | ||
177 | public function _make_like_buttons_google($url = '') { |
|
178 | ||
179 | $settings = $this->settings; |
|
180 | ||
181 | if ($settings['gg_like'] == 1) { |
|
182 | \CI_Controller::get_instance()->template->registerJsScript( |
|
183 | "<script type='text/javascript' src='https://apis.google.com/js/plusone.js'> |
|
184 | {lang: 'ru', parsetags: 'explicit' } |
|
185 | </script>", |
|
186 | 'before' |
|
187 | ); |
|
188 | return "<!-- Place this tag where you want the +1 button to render. --> |
|
189 | <div class='g-plusone' data-size='medium' data-href='$url'></div> |
|
190 | ||
191 | <!-- Place this render call where appropriate. --> |
|
192 | <script type='text/javascript'>gapi.plusone.go();</script>"; |
|
193 | } |
|
194 | } |
|
195 | ||
196 | public function _make_like_buttons_twitter($url = '') { |
|
197 | ||
@@ 196-208 (lines=13) @@ | ||
193 | } |
|
194 | } |
|
195 | ||
196 | public function _make_like_buttons_twitter($url = '') { |
|
197 | ||
198 | $settings = $this->settings; |
|
199 | ||
200 | if ($settings['twitter_like'] == 1) { |
|
201 | \CI_Controller::get_instance()->template->registerJsScript( |
|
202 | '<script async="async" defer="defer">!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)) |
|
203 | {js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script></li>', |
|
204 | 'before' |
|
205 | ); |
|
206 | return '<a href="https://twitter.com/share" class="twitter-share-button" data-url="' . $url . '">Tweet</a>'; |
|
207 | } |
|
208 | } |
|
209 | ||
210 | public function _make_like_buttons($url = '') { |
|
211 |