ReseauxSociauxController

The Eewee responsive design ReseauxSociauxController class.

Defined (1)

The class is defined in the following location(s).

/inc/controllers/ReseauxSociauxController.php  
  1. class ReseauxSociauxController{ 
  2.  
  3. public $tbl_reseauxSociaux = array( 
  4. "facebook" => array( 
  5. "img_small" => "facebook_s.png",  
  6. "img_medium" => "facebook_m.png",  
  7. "img_big" => "facebook_b.png",  
  8. "url" => RS_URL_FACEBOOK 
  9. ),  
  10. "twitter" => array( 
  11. "img_small" => "twitter_s.png",  
  12. "img_medium" => "twitter_m.png",  
  13. "img_big" => "twitter_b.png",  
  14. "url" => RS_URL_TWITTER 
  15. ),  
  16. "flickr" => array( 
  17. "img_small" => "flickr_s.png",  
  18. "img_medium" => "flickr_m.png",  
  19. "img_big" => "flickr_b.png",  
  20. "url" => RS_URL_FLICKR 
  21. ); 
  22.  
  23. /** 
  24. *  
  25. * init 
  26. * @param string $typeRs fb, tw 
  27. */ 
  28. public function __construct($typeRs="") { 
  29. if( $typeRs == "fb" ) { 
  30. add_action( 'wp_footer', array($this, 'fbSdkJs') ); 
  31.  
  32. /** 
  33. *  
  34. * twitter : widget profil 
  35. * SOURCE : http://www.presse-citron.net/10-facons-dintegrer-twitter-dans-un-site-ou-un-blog 
  36. * SOURCE : http://twitter.com/about/resources/widgets 
  37. * SOURCE : http://twitter.com/about/resources/widgets/widget_profile 
  38. */ 
  39. public function twWidgetProfil($user='michaeldumontet', $qty='10', $w='auto', $h='320', $themeBg='01488e', $themeCo='ffffff', $tweetsBg='ffffff', $tweetsCo='000000', $tweetsLi='08C') { 
  40. return " 
  41. <script charset='utf-8' src='http://widgets.twimg.com/j/2/widget.js'></script> 
  42. <script> 
  43. new TWTR.Widget({ 
  44. version: 2,  
  45. type: 'profile',  
  46. rpp: '".$qty."',  
  47. interval: 30000,  
  48. width: '".$w."',  
  49. height: '".$h."',  
  50. theme: { 
  51. shell: { 
  52. background: '#".$themeBg."',  
  53. color: '#".$themeCo."' 
  54. },  
  55. tweets: { 
  56. background: '#".$tweetsBg."',  
  57. color: '#".$tweetsCo."',  
  58. links: '#".$tweetsLi."' 
  59. },  
  60. features: { 
  61. scrollbar: true,  
  62. loop: false,  
  63. live: true,  
  64. behavior: 'all' 
  65. }).render().setUser('".$user."').start(); 
  66. </script>"; 
  67.  
  68. /** 
  69. * Source : www.twitter.com/widgets 
  70. */ 
  71. public function getTwitter($name='michaeldumontet', $id='252776483901276161') { 
  72. return ' 
  73. <a class="twitter-timeline" href="https://twitter.com/'.$name.'" data-widget-id="'.$id.'">Tweets de @'.$name.'</a> 
  74. <script>!function(d, s, id) {var js, fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)) {js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js, fjs);}}(document, "script", "twitter-wjs");</script>'; 
  75.  
  76. /** 
  77. *  
  78. * addthis : inclusion de btn facebook & twitter 
  79. */ 
  80. public function addthis($style='') { 
  81. switch( $style ) { 
  82. case 1 : 
  83. $a = ' 
  84. <!-- AddThis Button BEGIN --> 
  85. <div class="addthis_toolbox addthis_default_style "> 
  86. <a class="addthis_button_facebook_like" fb:like:layout="button_count"></a> 
  87. <a class="addthis_button_tweet"></a> 
  88. <a class="addthis_button_pinterest_pinit"></a> 
  89. <a class="addthis_counter addthis_pill_style"></a> 
  90. </div> 
  91. <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=xa-502e537211945a40"></script> 
  92. <!-- AddThis Button END --> 
  93. '; 
  94. break; 
  95.  
  96. case 2 : 
  97. $a = ' 
  98. <!-- AddThis Button BEGIN --> 
  99. <div class="addthis_toolbox addthis_default_style addthis_32x32_style"> 
  100. <a class="addthis_button_preferred_1"></a> 
  101. <a class="addthis_button_preferred_2"></a> 
  102. <a class="addthis_button_preferred_3"></a> 
  103. <a class="addthis_button_preferred_4"></a> 
  104. <a class="addthis_button_compact"></a> 
  105. <a class="addthis_counter addthis_bubble_style"></a> 
  106. </div> 
  107. <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=xa-502e54a22284fbfd"></script> 
  108. <!-- AddThis Button END --> 
  109. '; 
  110. break;  
  111.  
  112. case 3 : 
  113. $a = ' 
  114. <!-- AddThis Button BEGIN --> 
  115. <div class="addthis_toolbox addthis_default_style "> 
  116. <a class="addthis_button_preferred_1"></a> 
  117. <a class="addthis_button_preferred_2"></a> 
  118. <a class="addthis_button_preferred_3"></a> 
  119. <a class="addthis_button_preferred_4"></a> 
  120. <a class="addthis_button_compact"></a> 
  121. <a class="addthis_counter addthis_bubble_style"></a> 
  122. </div> 
  123. <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=xa-502e54be6f687682"></script> 
  124. <!-- AddThis Button END --> 
  125. '; 
  126. break; 
  127.  
  128. case 4 : 
  129. $a = ' 
  130. <!-- AddThis Button BEGIN --> 
  131. <div class="addthis_toolbox addthis_floating_style addthis_counter_style" style="left:50px;top:50px;"> 
  132. <a class="addthis_button_facebook_like" fb:like:layout="box_count"></a> 
  133. <a class="addthis_button_tweet" tw:count="vertical"></a> 
  134. <a class="addthis_button_google_plusone" g:plusone:size="tall"></a> 
  135. <a class="addthis_counter"></a> 
  136. </div> 
  137. <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=xa-502e54e73e497699"></script> 
  138. <!-- AddThis Button END --> 
  139. '; 
  140. break;  
  141.  
  142. case 5 : 
  143. $a = ' 
  144. <!-- AddThis Button BEGIN --> 
  145. <div class="addthis_toolbox addthis_floating_style addthis_32x32_style" style="left:50px;top:50px;"> 
  146. <a class="addthis_button_preferred_1"></a> 
  147. <a class="addthis_button_preferred_2"></a> 
  148. <a class="addthis_button_preferred_3"></a> 
  149. <a class="addthis_button_preferred_4"></a> 
  150. <a class="addthis_button_compact"></a> 
  151. </div> 
  152. <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=xa-502e550b3542b598"></script> 
  153. <!-- AddThis Button END --> 
  154. '; 
  155. break;  
  156.  
  157. case 6 : 
  158. $a = ' 
  159. <!-- AddThis Button BEGIN --> 
  160. <div class="addthis_toolbox addthis_floating_style addthis_16x16_style" style="left:50px;top:50px;"> 
  161. <a class="addthis_button_preferred_1"></a> 
  162. <a class="addthis_button_preferred_2"></a> 
  163. <a class="addthis_button_preferred_3"></a> 
  164. <a class="addthis_button_preferred_4"></a> 
  165. <a class="addthis_button_compact"></a> 
  166. </div> 
  167. <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=xa-502e552155e213ba"></script> 
  168. <!-- AddThis Button END --> 
  169. '; 
  170. break; 
  171.  
  172. default : 
  173. $a = ' 
  174. <!-- AddThis Button BEGIN --> 
  175. <a class="addthis_button" href="http://www.addthis.com/bookmark.php?v=250&pubid=xa-502e553a6b623739"><img src="http://s7.addthis.com/static/btn/v2/lg-share-en.gif" width="125" height="16" alt="Bookmark and Share" style="border:0"/></a> 
  176. <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=xa-502e553a6b623739"></script> 
  177. <!-- AddThis Button END --> 
  178. '; 
  179.  
  180. return $a; 
  181.  
  182. /** 
  183. * fb : inclusion de la lib facebook 
  184. */ 
  185. public function fbSdkJs() { 
  186. ?> 
  187. <!-- BEGIN - FACEBOOK --> 
  188. <div id='fb-root'></div> 
  189. <script>(function(d, s, id) { 
  190. var js, fjs = d.getElementsByTagName(s)[0]; 
  191. if (d.getElementById(id)) return; 
  192. js = d.createElement(s); js.id = id; 
  193. js.src = '//connect.facebook.net/fr_FR/all.js#xfbml=1'; 
  194. fjs.parentNode.insertBefore(js, fjs); 
  195. }(document, 'script', 'facebook-jssdk'));</script> 
  196. <!-- END - FACEBOOK --> 
  197. <?php 
  198.  
  199. /** 
  200. * fb : comments 
  201. */ 
  202. public function fbComments() { 
  203. return '<div class="fb-comments" data-href="http://www.eewee.fr" data-num-posts="2" data-width="600"></div>'; 
  204.  
  205. /** 
  206. * fb : Like Box 
  207. * @param string $namePage 
  208. * @param int $w 
  209. * @param int $h 
  210. * @param bool $showfaces 
  211. * @param bool $stream 
  212. * @param bool $header 
  213. * @return string  
  214. */ 
  215. public function fbLikeBox($namePage='eeweefr', $w='auto', $h='410', $showfaces='true', $stream='true', $header='false') { 
  216. return '<div class="fb-like-box" data-href="http://www.facebook.com/'.$namePage.'" data-width="'.$w.'" data-height="'.$h.'" data-show-faces="'.$showfaces.'" data-stream="'.$stream.'" data-header="'.$header.'"></div>'; 
  217.  
  218. }//fin class