/cool-fb-likebox.php

  1. <?php 
  2.  
  3.  
  4. /** 
  5.   
  6.   
  7. Plugin Name: Bliss Facebook Likebox 
  8.   
  9.   
  10. Plugin URI: http://www.yizhantech.com/ 
  11.   
  12.   
  13. Description: Shows Static Facebook Like Box that pops out with Smooth Jquery Hover Effect 
  14.   
  15.   
  16. Version: 2.0 
  17.   
  18.   
  19. Author: Yizhan 
  20.   
  21.   
  22. Author URI: http://www.yizhantech.com/ 
  23.   
  24.   
  25. License: GPL3 
  26.   
  27.   
  28. */ 
  29.  
  30.  
  31. /** 
  32.   
  33.   
  34. Copyright 2012 Dasari Harish (email : harish@way2blogging.org) 
  35.   
  36.   
  37.  
  38.   
  39.   
  40. This program is free software; you can redistribute it and/or modify 
  41.   
  42.   
  43. it under the terms of the GNU General Public License, version 2, as  
  44.   
  45.   
  46. published by the Free Software Foundation. 
  47.   
  48.   
  49.  
  50.   
  51.   
  52. This program is distributed in the hope that it will be useful,  
  53.   
  54.   
  55. but WITHOUT ANY WARRANTY; without even the implied warranty of 
  56.   
  57.   
  58. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
  59.   
  60.   
  61. GNU General Public License for more details. 
  62.   
  63.   
  64.  
  65.   
  66.   
  67. You should have received a copy of the GNU General Public License 
  68.   
  69.   
  70. along with this program; if not, write to the Free Software 
  71.   
  72.   
  73. Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 
  74.   
  75.   
  76. */ 
  77.  
  78.  
  79.  
  80.  
  81.  
  82. if(function_exists('plugin_dir_url')) { 
  83.  
  84.  
  85. define('bfblDIR', plugin_dir_url(__FILE__)); 
  86.  
  87.  
  88. } else { 
  89.  
  90.  
  91. define('bfblDIR', get_bloginfo('wpurl') . "/wp-content/plugins/bliss-facebook-likebox/"); 
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99. if(!class_exists('BlissFacebookLikeBox')) { 
  100.  
  101.  
  102. class BlissFacebookLikeBox { 
  103.  
  104.  
  105.  
  106.  
  107.  
  108. function BlissFacebookLikeBox() { 
  109.  
  110.  
  111. // Adding admin action 
  112.  
  113.  
  114. add_action('admin_menu', array($this, 'bliss_facebook_likebox_page_admin_action')); 
  115.  
  116.  
  117. // Plugin Activation Hook 
  118.  
  119.  
  120. register_activation_hook( __FILE__, array($this, 'bfbl_install')); 
  121.  
  122.  
  123. // Plugin Deactivation Hook 
  124.  
  125.  
  126. register_deactivation_hook( __FILE__, array($this, 'bfbl_uninstall')); 
  127.  
  128.  
  129. // Adding Ajax Action 
  130.  
  131.  
  132. add_action('wp_ajax_save_bfbl_options', array($this, 'bfbl_ajax_save_options')); 
  133.  
  134.  
  135.  
  136.  
  137. // Update Default option after Activation 
  138.  
  139.  
  140. function bfbl_install() { 
  141.  
  142.  
  143. $bfbl_options = get_option("bfbl_options"); 
  144.  
  145.  
  146. $bfbl_options['enablebfbl'] = "yes";  
  147.  
  148.  
  149. $bfbl_options['fbpageurl'] = "http://facebook.com/wordpress"; 
  150.  
  151.  
  152. $bfbl_options['likeboxwidth'] = "300"; 
  153.  
  154.  
  155. $bfbl_options['likeboxheight'] = "300"; 
  156.  
  157.  
  158. $bfbl_options['likeboxposition'] = "left"; 
  159.  
  160.  
  161. $bfbl_options['likeboxoffset'] = "350"; 
  162.  
  163.  
  164. $bfbl_options['likeboxbgcolor'] = "#d5dcfa"; 
  165.  
  166.  
  167. $bfbl_options['likeboxbordercolor'] = "#fab957"; 
  168.  
  169.  
  170. $bfbl_options['likeboxbadgebgcolor'] = "#3B5998"; 
  171.  
  172.  
  173. $bfbl_options['likeboxcolorscheme'] = "light"; 
  174.  
  175.  
  176. $bfbl_options['displaycredit'] = "0"; 
  177.  
  178.  
  179. update_option("bfbl_options", $bfbl_options); 
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187. // Remove Plugin Option after Deactivation  
  188.  
  189.  
  190. function bfbl_uninstall() { 
  191.  
  192.  
  193. delete_option("bfbl_options"); 
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201. // Admin Action callback function 
  202.  
  203.  
  204. function bliss_facebook_likebox_page_admin_action() { 
  205.  
  206.  
  207. // Adding option page 
  208.  
  209.  
  210. $bliss_facebook_likebox_page = add_options_page( 
  211.  
  212.  
  213. "Bliss Facebook Likebox Options",  
  214.  
  215.  
  216. "Bliss Facebook Likebox",  
  217.  
  218.  
  219. "activate_plugins",  
  220.  
  221.  
  222. "bliss_facebook_likebox",  
  223.  
  224.  
  225. array($this, "bliss_facebook_likebox_adminpage") 
  226.  
  227.  
  228. ); 
  229.  
  230.  
  231.  
  232.  
  233.  
  234. // Priniting Admin Scripts and Styles 
  235.  
  236.  
  237. add_action("admin_print_scripts-{$bliss_facebook_likebox_page}", array($this, "bliss_facebook_likebox_adminscripts")); 
  238.  
  239.  
  240. add_action("admin_print_styles-{$bliss_facebook_likebox_page}", array($this, "bliss_facebook_likebox_adminstyles")); 
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248. // Add scripts Styles to  
  249.  
  250.  
  251. function bfbl_add_scripts() { 
  252.  
  253.  
  254. $get_opt = get_option("bfbl_options"); 
  255.  
  256.  
  257. if(!is_admin() && $get_opt['enablebfbl'] == "yes") { 
  258.  
  259.  
  260. $get_wp_ver = get_bloginfo("version"); 
  261.  
  262.  
  263. if(version_compare($get_wp_ver, "2.7", ">")) { 
  264.  
  265.  
  266. add_action("wp_print_scripts", array($this, "bliss_facebook_likebox_scripts")); 
  267.  
  268.  
  269. add_action("wp_print_styles", array($this, "bliss_facebook_likebox_styles")); 
  270.  
  271.  
  272. add_action("wp_footer", array($this, "bliss_facebook_likebox_html")); 
  273.  
  274.  
  275. } else { 
  276.  
  277.  
  278. add_action("wp_head", array($this, "bfbl_wp_head_scripts")); 
  279.  
  280.  
  281. add_action("wp_footer", array($this, "bliss_facebook_likebox_html")); 
  282.  
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296. // Generation Admin Options Page 
  297.  
  298.  
  299. function bliss_facebook_likebox_adminpage() { 
  300.  
  301.  
  302. if(isset($_POST['action']) && $_POST['action'] == "save_bfbl_options") { 
  303.  
  304.  
  305. $this->save_bliss_facebook_likebox_options("post"); 
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313. $print_option = get_option("bfbl_options"); 
  314.  
  315.  
  316. $selected = " selected=\"selected\""; 
  317.  
  318.  
  319. ?> 
  320.  
  321.  
  322. <div class="wrap" id="bfbl_wrap"> 
  323.  
  324.  
  325. <div class="icon32" id="icon-plugins"></div><h2><?php _e("Bliss Facebook Likebox Options");?></h2> 
  326.  
  327.  
  328. <?php 
  329.  
  330.  
  331. if(isset($_GET['saved']) && $_GET['saved'] == "true") { 
  332.  
  333.  
  334. echo '<div class="updated fade"><p>'; 
  335.  
  336.  
  337. _e("Bliss Facebook Likebox Options are Saved!"); 
  338.  
  339.  
  340. echo '</p></div>'; 
  341.  
  342.  
  343.  
  344.  
  345. ?> 
  346.  
  347.  
  348. <form action="" method="POST" enctype="multipart/form-data" id="bfbl_form"> 
  349.  
  350.  
  351. <fieldset> 
  352.  
  353.  
  354. <legend><?php _e("Bliss Facebook Like box Settings");?></legend> 
  355.  
  356.  
  357.  
  358.  
  359.  
  360. <table> 
  361.  
  362.  
  363. <tr> 
  364.  
  365.  
  366. <td><label for="enablebfbl"><?php _e("Enable Facebook Popup Likebox?");?></label></td> 
  367.  
  368.  
  369. <td><input type="checkbox" name="enablebfbl" value="yes" id="enablebfbl" <?php if($print_option['enablebfbl']=="yes") echo "checked='checked'";?> style="width:auto;"/> </td> 
  370.  
  371.  
  372. </tr> 
  373.  
  374.  
  375. <tr> 
  376.  
  377.  
  378. <td><label for="displaycredit"><?php _e("Display Credits?");?></label></td> 
  379.  
  380.  
  381. <td><input type="checkbox" name="displaycredit" value="1" id="displaycredit" <?php if($print_option['displaycredit']=="1") echo "checked='checked'";?> style="width:auto;"/> </td> 
  382.  
  383.  
  384. </tr> 
  385.  
  386.  
  387. <tr> 
  388.  
  389.  
  390. <td><label for="fbpageurl"><?php _e("Facebook Page URL");?></label></td> 
  391.  
  392.  
  393. <td><input type="text" name="fbpageurl" value="<?php echo $print_option['fbpageurl'];?>" id="fbpageurl"/> </td> 
  394.  
  395.  
  396. </tr> 
  397.  
  398.  
  399. <tr> 
  400.  
  401.  
  402. <td><label for="likeboxwidth"><?php _e("Likebox Width");?></label></td> 
  403.  
  404.  
  405. <td><input type="text" name="likeboxwidth" id="likeboxwidth" value="<?php echo $print_option['likeboxwidth'];?>"/> px</td> 
  406.  
  407.  
  408. </tr> 
  409.  
  410.  
  411. <tr> 
  412.  
  413.  
  414. <td><label for="likeboxheight"><?php _e("Likebox Height");?></label></td> 
  415.  
  416.  
  417. <td><input type="text" name="likeboxheight" id="likeboxheight" value="<?php echo $print_option['likeboxheight'];?>"/> px</td> 
  418.  
  419.  
  420. </tr> 
  421.  
  422.  
  423. <tr> 
  424.  
  425.  
  426. <td><label for="likeboxcolorscheme"><?php _e("Likebox Color Scheme");?></label></td> 
  427.  
  428.  
  429. <td><select name="likeboxcolorscheme" id="likeboxcolorscheme"> 
  430.  
  431.  
  432. <option value="light"<?php if($print_option['likeboxcolorscheme'] == "light") echo $selected;?> ><?php _e("Light");?></option> 
  433.  
  434.  
  435. <option value="dark"<?php if($print_option['likeboxcolorscheme'] == "dark") echo $selected;?>><?php _e("Dark");?></option> 
  436.  
  437.  
  438. </select></td> 
  439.  
  440.  
  441. </tr> 
  442.  
  443.  
  444. <tr> 
  445.  
  446.  
  447. <td><label for="likeboxbgcolor"><?php _e("Likebox Background Color");?></label></td> 
  448.  
  449.  
  450. <td><input type="text" name="likeboxbgcolor" id="likeboxbgcolor" value="<?php echo $print_option['likeboxbgcolor'];?>" class="bfblColorpicker"/> <span class="bfblColorpreview"></span></td> 
  451.  
  452.  
  453. </tr> 
  454.  
  455.  
  456. <tr> 
  457.  
  458.  
  459. <td><label for="likeboxbordercolor"><?php _e("Likebox Border Color");?></label></td> 
  460.  
  461.  
  462. <td><input type="text" name="likeboxbordercolor" id="likeboxbordercolor" value="<?php echo $print_option['likeboxbordercolor'];?>" class="bfblColorpicker"/> <span class="bfblColorpreview"></span></td> 
  463.  
  464.  
  465. </tr> 
  466.  
  467.  
  468. </table> 
  469.  
  470.  
  471.  
  472.  
  473.  
  474. </fieldset> 
  475.  
  476.  
  477.  
  478.  
  479.  
  480. <fieldset> 
  481.  
  482.  
  483. <legend><?php _e("Styling Options");?></legend> 
  484.  
  485.  
  486. <table> 
  487.  
  488.  
  489. <tr> 
  490.  
  491.  
  492. <td><label for="likeboxposition"><?php _e("Likebox Position");?></label></td> 
  493.  
  494.  
  495. <td><select name="likeboxposition" id="likeboxposition"> 
  496.  
  497.  
  498. <option value="left"<?php if($print_option['likeboxposition'] == "left") echo $selected;?>><?php _e("Left");?></option> 
  499.  
  500.  
  501. <option value="right"<?php if($print_option['likeboxposition'] == "right") echo $selected;?>><?php _e("Right");?></option> 
  502.  
  503.  
  504. <option value="bottom"<?php if($print_option['likeboxposition'] == "bottom") echo $selected;?>><?php _e("Bottom");?></option> 
  505.  
  506.  
  507. <option value="top"<?php if($print_option['likeboxposition'] == "top") echo $selected;?>><?php _e("Top");?></option> 
  508.  
  509.  
  510. </select></td> 
  511.  
  512.  
  513. </tr> 
  514.  
  515.  
  516. <tr> 
  517.  
  518.  
  519. <td><label for="likeboxoffset"><?php _e("Position Offset");?></label></td> 
  520.  
  521.  
  522. <td><input type="text" name="likeboxoffset" id="likeboxoffset" value="<?php echo $print_option['likeboxoffset'];?>"/> px</td> 
  523.  
  524.  
  525. </tr> 
  526.  
  527.  
  528. <tr> 
  529.  
  530.  
  531. <td><label for="likeboxbadgebgcolor"><?php _e("Facebook Badge Color");?></label></td> 
  532.  
  533.  
  534. <td><input type="text" name="likeboxbadgebgcolor" id="likeboxbadgebgcolor" value="<?php echo $print_option['likeboxbadgebgcolor'];?>"class="bfblColorpicker"/> <span class="bfblColorpreview"></span></td> 
  535.  
  536.  
  537. </tr> 
  538.  
  539.  
  540. </table> 
  541.  
  542.  
  543. </fieldset> 
  544.  
  545.  
  546.  
  547.  
  548.  
  549. <div class="submitwrap"> 
  550.  
  551.  
  552. <input type="submit" value="<?php _e("Save Options");?>" class="button-secondary" id="bfblSaveButton"/> 
  553.  
  554.  
  555. <input type="hidden" name="action" value="save_bfbl_options" /> 
  556.  
  557.  
  558. <?php if(function_exists("wp_nonce_field")) { wp_nonce_field("bliss_facebook_likebox");} ?> 
  559.  
  560.  
  561. </div> 
  562.  
  563.  
  564. </form> 
  565.  
  566.  
  567. <div class="bfbl_footer"> 
  568.  
  569.  
  570. Please Share this Plugin : <a href="https://twitter.com/share" class="twitter-share-button" data-url="http://www.bliss.com/" data-text="Static FaceBook Pop Out Like Box WordPress Plugin Static FaceBook Pop Out Like Box WordPress Plugin" data-via="way2blogging">Tweet</a><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> <a name="fb_share" share_url="http://www.blissdrive.com"></a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script> 
  571.  
  572.  
  573. <br/> 
  574.  
  575.  
  576. <p>Plugin by <a href="http://www.bliss.com/" target="_blank">Blissdrive</a>. Visit the <a href="http://www.bliss.com">Support Page</a> for Plugin Support.</p> 
  577.  
  578.  
  579. </div> 
  580.  
  581.  
  582. <div id="ajax_save_popup" style="display:none;"></div> 
  583.  
  584.  
  585. </div><!-- end #bfbl_wrap --> 
  586.  
  587.  
  588. <?php 
  589.  
  590.  
  591.  
  592.  
  593.  
  594.  
  595.  
  596. // Ajax Callback Function 
  597.  
  598.  
  599. function bfbl_ajax_save_options() { 
  600.  
  601.  
  602. // Ajax Security check 
  603.  
  604.  
  605. if(function_exists('wp_verify_nonce')) { 
  606.  
  607.  
  608. if (!wp_verify_nonce($_POST['bfbl_Ajax_nonce'], "bfbl_Ajax_nonce")) die ('Error!!!');  
  609.  
  610.  
  611.  
  612.  
  613. if(isset($_POST['action']) && $_POST['action'] == "save_bfbl_options") { 
  614.  
  615.  
  616. $this->save_bliss_facebook_likebox_options("ajax"); 
  617.  
  618.  
  619.  
  620.  
  621. die('-1'); 
  622.  
  623.  
  624.  
  625.  
  626.  
  627.  
  628.  
  629. // Save the Options 
  630.  
  631.  
  632. function save_bliss_facebook_likebox_options($method) { 
  633.  
  634.  
  635. // Security check 
  636.  
  637.  
  638. if(function_exists("check_admin_referer")) { 
  639.  
  640.  
  641. check_admin_referer("bliss_facebook_likebox"); 
  642.  
  643.  
  644.  
  645.  
  646. // Options array 
  647.  
  648.  
  649. $options = array("enablebfbl", "displaycredit", "fbpageurl", "likeboxwidth", "likeboxheight", "likeboxposition", "likeboxbgcolor", "likeboxbadgebgcolor", "likeboxbordercolor", "likeboxcolorscheme", "likeboxoffset"); 
  650.  
  651.  
  652. // New Options array 
  653.  
  654.  
  655. $newoptions = array(); 
  656.  
  657.  
  658. foreach($options as $opt) { 
  659.  
  660.  
  661. if(isset($_REQUEST[$opt])) { 
  662.  
  663.  
  664. $newoptions[$opt] = $_REQUEST[$opt]; 
  665.  
  666.  
  667.  
  668.  
  669.  
  670.  
  671. // Update Options with New Options 
  672.  
  673.  
  674. update_option("bfbl_options", $newoptions); 
  675.  
  676.  
  677. // Redirections 
  678.  
  679.  
  680. if($method == "post") { 
  681.  
  682.  
  683. header("Location:options-general.php?page=bliss_facebook_likebox&saved=true"); 
  684.  
  685.  
  686.  
  687.  
  688. // Stop 
  689.  
  690.  
  691. die('1'); 
  692.  
  693.  
  694.  
  695.  
  696.  
  697.  
  698.  
  699. // Enqueue Plugin Scripts 
  700.  
  701.  
  702. function bliss_facebook_likebox_scripts() { 
  703.  
  704.  
  705. wp_enqueue_script("bliss-facebook-likebox", bfblDIR ."bliss-facebook-likebox.js", array("jquery"), "1.0.0", false ); 
  706.  
  707.  
  708.  
  709.  
  710.  
  711.  
  712.  
  713. // Enqueue Plugin Styles 
  714.  
  715.  
  716. function bliss_facebook_likebox_styles() { 
  717.  
  718.  
  719. wp_enqueue_style("bliss-facebook-likebox", bfblDIR ."bliss-facebook-likebox.css"); 
  720.  
  721.  
  722.  
  723.  
  724.  
  725.  
  726.  
  727. // Insert Scripts for Older versions 
  728.  
  729.  
  730. function bfbl_wp_head_scripts() { 
  731.  
  732.  
  733. $dir = get_bloginfo("wpurl"); 
  734.  
  735.  
  736. echo "\n<link rel=\"stylesheet\" type=\"text/css\" href=\"{$dir}/wp-content/plugins/bliss-facebook-likebox/bliss-facebook-likebox.css\" media=\"all\" />\n<script type=\"text/javascript\">/*<![CDATA[*/if (typeof jQuery == 'undefined') {document.write(unescape(\"%3Cscript src='http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js' type='text/javascript'%3E%3C/script%3E\"));} /*]]>*/</script>\n<script type=\"text/javascript\" src=\"{$dir}/wp-content/plugins/bliss-facebook-likebox/bliss-facebook-likebox.js\"></script>\n"; 
  737.  
  738.  
  739.  
  740.  
  741.  
  742.  
  743.  
  744. // Enqueue Admin Scripts 
  745.  
  746.  
  747. function bliss_facebook_likebox_adminscripts() { 
  748.  
  749.  
  750. //wp_enqueue_script('jquery'); 
  751.  
  752.  
  753. wp_enqueue_script("bliss-facebook-likebox-colorpicker", bfblDIR ."admin/js/colorpicker.js", array("jquery"), "1.0.1", false); 
  754.  
  755.  
  756. wp_enqueue_script("bliss-facebook-likebox-admin", bfblDIR ."admin/admin-options.js", array("jquery"), "1.0.1", false); 
  757.  
  758.  
  759. wp_localize_script("bliss-facebook-likebox-admin", "bfblSettings", array( "bfblAjaxurl" => admin_url("admin-ajax.php"), "bfblAjaxnonce" => wp_create_nonce("bfbl_Ajax_nonce"))); 
  760.  
  761.  
  762.  
  763.  
  764.  
  765.  
  766.  
  767. // Enqueue Admin Styles 
  768.  
  769.  
  770. function bliss_facebook_likebox_adminstyles() { 
  771.  
  772.  
  773. wp_enqueue_style("bliss-facebook-likebox-colorpicker", bfblDIR ."admin/css/colorpicker.css"); 
  774.  
  775.  
  776. wp_enqueue_style("bliss-facebook-likebox-admin", bfblDIR ."admin/admin-options.css"); 
  777.  
  778.  
  779.  
  780.  
  781.  
  782.  
  783.  
  784. // Print HTML 
  785.  
  786.  
  787. function bliss_facebook_likebox_html() { 
  788.  
  789.  
  790. $get_bfbl_options = get_option("bfbl_options"); 
  791.  
  792.  
  793. $url = urlencode($get_bfbl_options['fbpageurl']); 
  794.  
  795.  
  796. $width = $get_bfbl_options['likeboxwidth']; 
  797.  
  798.  
  799. $height = $get_bfbl_options['likeboxheight']; 
  800.  
  801.  
  802. $colorscheme = $get_bfbl_options['likeboxcolorscheme']; 
  803.  
  804.  
  805. $backgroundcolor = $get_bfbl_options['likeboxbgcolor']; 
  806.  
  807.  
  808. $position = "bfbl_".$get_bfbl_options['likeboxposition']; 
  809.  
  810.  
  811. $badgebgcolor = $get_bfbl_options['likeboxbadgebgcolor']; 
  812.  
  813.  
  814. $offset = $get_bfbl_options['likeboxoffset']; 
  815.  
  816.  
  817. $bordercolor = urlencode($get_bfbl_options['likeboxbordercolor']); 
  818.  
  819.  
  820. echo " 
  821.  
  822.  
  823. <div id=\"bfblikebox\" class=\"{$position}\" style=\"display:none;width:{$width}px; height:{$height}px;\" data-offset=\"{$offset}px\" data-width=\"{$width}px\" data-height=\"{$height}px\"> 
  824.  
  825.  
  826. <div class=\"bfblbadge\" style=\"background-color:{$badgebgcolor};\"></div> 
  827.  
  828.  
  829.  
  830.  
  831.  
  832. <iframe  
  833.  
  834.  
  835. <?php function display_credits() { 
  836.  
  837.  
  838. src=\"//www.facebook.com/plugins/likebox.php?href={$url}&width={$width}&height={$height}&colorscheme={$colorscheme}&show_faces=true&border_color={$bordercolor}&stream=false&header=false\" scrolling=\"no\" frameborder=\"0\" style=\"border:none; overflow:hidden; width:{$width}px; height:{$height}px;background:{$backgroundcolor};\" allowTransparency=\"true\"> 
  839.  
  840.  
  841. </iframe> 
  842.  
  843.  
  844.  
  845.  
  846.  
  847. </div> 
  848.  
  849.  
  850. "; 
  851.  
  852.  
  853.  
  854.  
  855.  
  856. //display credits scripts 
  857.  
  858.  
  859. function display_credits() { 
  860.  
  861.  
  862. $get_opt = get_option("bfbl_options"); 
  863.  
  864.  
  865. if($get_opt['displaycredit'] =="1") { 
  866.  
  867.  
  868. echo '<div align="center"><small>Provided by <a href="http://es.enfsolar.com/">panel solar</a></small></div>'; 
  869.  
  870.  
  871. } else{ 
  872. echo '<div align="center" class="credits_off"><small>Provided by <a href="http://es.enfsolar.com/">panel solar</a></small></div>'; 
  873.  
  874.  
  875.  
  876.  
  877. display_credits(); 
  878.  
  879.  
  880.  
  881.  
  882. }// end Class 
  883.  
  884.  
  885. }// end class_exists 
  886.  
  887.  
  888.  
  889.  
  890.  
  891. // New Bliss Facebook Likebox 
  892.  
  893.  
  894. $bfbl = new BlissFacebookLikeBox(); 
  895.  
  896.  
  897.  
  898.  
  899.  
  900. // Add Scripts 
  901.  
  902.  
  903. $bfbl->bfbl_add_scripts(); 
  904.  
  905.  
  906. ?> 
.