fatecano_sp 0 Denunciar post Postado Outubro 21, 2011 Olá, utilizo o plugin Facebook Comments for WordPress e tive um problema quanto à largura do box na página. Tentei mexer no CSS do WordPress mas não resolveu, uso o Tema: Premium News. Alguém sabe o que pode estar acontecendo? Gente, sou iniciante mesmo e não tenho experiência nenhuma com qualquer linguagem de programação. Assim como nunca tive blog, seja WP, Bloguer ou algum outro. Essa agora é a minha primeira experiência! Por isso que conto tanto com a ajuda de vocês. Vou postar algumas informações a mais pra ver se alguém me da alguma luz. Folha de estilos (style.css) /* Theme Name: Original Premium News Theme URI: http://www.woothemes.com/ Description: Original Premium News by WooThemes Version: 2.4.5 Author: WooThemes Author URI: http://www.woothemes.com/ Copyright: (c) 2009 WooThemes. License: GNU General Public License v2.0 License URI: http://www.gnu.org/licenses/gpl-2.0.html */ /*========= SETUP =========*/ *{ border: 0; margin: 0; padding: 0; } body{ background: url(images/bgr.gif) #bcbcbc repeat-x top; color: #000000; font: 0.8em Arial,Helvetica,Sans-Serif; } a{ color: #ff7800; text-decoration: none; } a:hover{ text-decoration: underline; } input,select,textarea{ border: #999999 1px solid; font-size: 12px; padding: 2px; } select{ padding: 0; } li{ list-style: none; } /*========= LAYOUT =========*/ #page{ background: #ffffff; margin: 0 auto; width: 960px; } /*--- Main Columns ---*/ #columns{ margin: 20px 0 0; padding: 0 15px 25px; } .col1{ float: left; width: 550px; } .col2{ float: right; width: 350px; } /*--- Sub Columns ---*/ .subcol{ width: 160px; } .subcol h2{ color: #607676; font-size: 14px; padding: 0 0 10px; } /*========= HEADER =========*/ /*- Page Navigation -*/ .sub-menu, ul.children { visibility: visible !important; display: block !important; } /* Make sure the sub-menus are visible and don't conflict with the Easing jQuery plugin. */ #nav{ background: #000000; height: 30px; padding: 4px 0 0; } #nav-left { float:left; display:inline; width:570px; } #nav-right { float:right; display:inline; width:370px; } #nav ul { position: relative; height: 26px; overflow: hidden; padding-left:10px; } #nav ul li { float: left; list-style: none; font-weight:bold; font-size:14px; } #nav ul li.back { background-color: #333333; width: 9px; height: 30px; z-index: 8; position: absolute; } #nav ul li a { text-decoration: none; color: #dddddd; outline: none; text-align: center; top: 6px; text-transform: uppercase; letter-spacing: 0; z-index: 10; display: block; float: left; height: 26px; position: relative; overflow: hidden; margin: auto 15px !important; margin: auto 7px; } #nav ul li a:hover, #nav ul li a:active, #nav ul li a:visited { border: none; } /*- Category Navigation -*/ .nav2, .nav2 * { margin:0; padding:0; } .nav2 { height: 35px; border-bottom:3px solid #B3B3B3; font-weight:bold; font-size:15px; position:relative; } .nav2 ul { background:#fff; /*IE6 needs this*/ float: left; position:relative; } .nav2 li { line-height: 35px; float: left; list-style:none; z-index:999; } .nav2 li.current ul { z-index: 999; } .nav2 li.sfHover ul, ul.nav2 li:hover ul { z-index: 1000; background: #B3B3B3; color: #ffffff; text-decoration: none; } .nav2 li li { } .nav2 a { color: #000000; display: block; padding: 0 13px; } .nav2 li ul { left:0; top:-999em; position:absolute; width:960px; } .nav2 li ul ul { left: auto; top:-999em; position:absolute; width:200px; margin-top: -2px; } .nav2 li ul ul li { line-height: 20px; padding-bottom: 10px; } .nav2 li:hover, .nav2 li.sfHover, .nav2 li.current, .nav2 a:focus, .nav2 a:hover, .nav2 a:active { color: #FF7800; text-decoration: none; background: #B3B3B3; } .nav2 li.sfHover a, .nav2 li.current a, .nav2 a:focus, .nav2 a:hover, .nav2 a:active { border-bottom: none; } .nav2 li li.current a { font-weight: bold; } .nav2 li li:hover, .nav2 li li a:focus, .nav2 li li a:hover, .nav2 li li a:active { } .nav2 li:hover ul, /* pure CSS hover is removed below */ body .nav2 li.current ul, /* this must be more specific than the .superfish override below */ ul.nav2 li.sfHover ul { top:2.5em; } .nav2 li:hover li ul, .nav2 li.sfHover li ul { top:-999em; } .nav2 li li:hover ul, /* pure CSS hover is removed below */ ul.nav2 li li.sfHover ul { top:2.5em; } /*following rule negates pure CSS hovers so submenu remains hidden and JS controls when and how it appears*/ .superfish li:hover ul, .superfish li li:hover ul { top: -999em; } /*.nav2 li.sfHover ul { display: block !important; visibility: visible !important; }*/ /*- Search -*/ #search{ background: #333333; border: 1px solid #b3b3b3; float: right; height: 23px; margin: 0 15px 0 0; padding: 0 10px 0 0; width:325px; } * html #search{ margin-right: 8px; } #search input{ background: transparent; border: 0; color: #b3b3b3; float: left; font-size: 13px; margin: 2px 0 0; padding: 2px 2px 2px 10px; width:288px; } #search .btn{ margin: 3px 0 0 5px; padding: 0; width: auto; } /*- Header -*/ #header{ background: url(images/hl-dot.gif) repeat-x bottom; height: 92px; padding: 0 0 2px; } /*- Logo -*/ #header h1{ float: left; display:inline; } #header h1 a{ display: block; height: 93px; width: 389px; } /*- RSS -*/ #rss{ float: right; font-size: 12px; padding: 16px 15px 0 0; text-align: right; width: 285px; } #rss a{ color: #b3b3b3; } #rss ul{ float: left; margin: 13px 0 0; width: 220px; } #rss li{ margin: 0 0 3px; padding: 0 0 5px; } #rss img{ float: right; } /*========= FEATURED POSTS (FRONT-PAGE) =========*/ .featured{ background: #dddddd; height: 200px; margin: 0 0 10px; overflow: hidden; position:relative; } .featured h2{ font-size: 11px; padding: 10px 0; } .featured h3{ font-size: 14px; padding: 0 0 10px 0; } .featured h3 a { color:#000; } .featured h3 a:hover { color:#FF7800; } .featured p { margin-bottom:10px; } .featured-img{ margin: 0 10px 0 0; width:350px; height:200px; float:left; display:inline; } #ribbon{ width:138px; height:138px; position:absolute; right:200px; top:0; } #featured-th{ height: 57px; margin: 0 0 30px; } #featured-th img{ margin: 0; border:none; } #featured-th .idTabs { list-style:none; } #featured-th .idTabs li { float:left; display:inline; margin-right:12px; } #featured-th .idTabs li.last { margin-right:0px !important; } .featured-content { margin-left:367px; padding-right:10px; } /*========= FEATURED VIDEOS (FRONT-PAGE) =========*/ #video-frame { background:#DDD; float:left; width:550px; height:auto; margin-bottom:30px; } .video-left { float:left; width:350px !important; display:inline; } .video-left p { padding:0px !important; margin:0px !important; } .video-left h2 { display:none; } .video-right { float:right; width:200px; display:inline; padding-top:7px; } .video-right h2{ color: #ff7800; font-size:1.3em; line-height:1.2em; font-weight:bold; padding: 0 0 0 10px !important; margin:0 !important; } .video-right p{ color: #000; font-size:0.9em; line-height:0.8em; font-weight:bold; padding: 0 0 7px 10px !important; margin:0 !important; } .video-right .idTabs { border-top:1px solid #FFF; list-style:none; margin:5px 0px 0px 0px; padding:0px; } .video-right .idTabs li { margin:0px; border-bottom:1px solid #FFF; background:#DDD; line-height:10px; } .video-right .idTabs li a { color:#000; font-weight:bold; font-family:Tahoma, Arial; font-size:12px; text-decoration:none; display:block; padding:10px 10px; } .video-right .idTabs li a:hover { background:#C0C0C0 url(images/ico-watch.gif) right center no-repeat !important; } .video-right .selected { background:#C0C0C0 url(images/ico-watch.gif) right center no-repeat !important; } /*========= BLOG POST STYLING =========*/ /*=== Small Box Post ===*/ .post{ margin: 0; } .post h2{ font-size: 1em; padding: 0 0 5px; } .post h3{ font-size: 1.3em; } .post h3 a{ color: #000000; } .post p{ padding: 0 0 15px; } .post p.posted{ color: #c0c0c0; } /*- Box -*/ .box{ border-top: 3px solid #c0c0c0; clear: both; height: 1%; margin: 0 0 20px; padding: 15px 0 20px; } .box .post{ width: 260px; } .box .post h2{ font-size: .85em; } .box .post h3{ font-size: 1em; } .box .post p.posted{ font-size: .85em; } /*=== Traditional Blog Post ===*/ .post-alt{ margin: 0 0 15px 0; padding-bottom:15px; background: url(images/hl-dot.gif) repeat-x bottom; } .post-alt h2{ font-size: 1.1em; padding: 0 0 5px; } .post-alt h3{ font-size: 1.4em; } .post-alt h3 a{ color: #000000; } .post-alt p{ padding: 0 0 15px; } .post-alt p.posted{ color: #c0c0c0; } /*=== Buttons ===*/ .continue{ background: url(images/ico-arrow.gif) no-repeat left; padding: 0 0 0 13px; font-weight:bold; } .comments { padding-bottom:0px !important; } .comments a{ background: url(images/ico-comm.gif) no-repeat left; color: #000000; padding: 0 0 0 20px; font-weight:bold; } a.more{ background: url(images/ico-arrow2.gif) no-repeat right; color: #c0c0c0; font-size: 1.2em; font-weight: bold; padding: 0 20px 0 0; } /*=== Traditional Blog Post ===*/ .navigation { } .navigation a { color: #c0c0c0; font-size: 1.2em; font-weight: bold; } .alignleft{ display:inline; float:left; } .alignright{ display:inline; float:right; } /*========= ARCHIVE SPECIFIC =========*/ #archivebox { background:#EEE; padding:10px; width:530px; margin-bottom:25px; } #archivebox h2 { font-size:1.5em; color:#000; } #archivebox h2 em{ color:#C0C0C0 !important; font-style:normal; } .archivefeed { margin-top:5px; } .archivefeed a { background:url(images/ico-arcfeed.gif) center left no-repeat; padding-left:20px; color:#000; font-weight:bold; } .arclist{ border-top: 3px solid #c0c0c0; border-bottom: 3px solid #c0c0c0; margin: 0 0 15px; padding: 10px 0 10px; width: 260px; } .arclist h2{ color: #000; font-size: 18px; padding: 0 0 10px 0 !important; } .arclist ul li{ padding:0 0 7px 10px; color:#c0c0c0; font-size:14px; font-weight:bold; } /*========= SINGLE POST SPECIFIC =========*/ .singletags { margin-top:5px; font-weight:bold; color:#C0C0C0; } .entry p{ text-align:left; font-size:12px; line-height:20px; } .entry blockquote { padding: 3px 15px; background: #def3ff; border: 1px solid #0253b8; margin: 5px auto 15px auto; color:#000; width:85%; } .entry blockquote p { font-size:12px; padding: 5px 0px; margin: 5px 0px; line-height: 20px; } .entry img { padding: 2px 2px 2px 2px; background:#DDD; border: solid 1px #C0C0C0; } .entry ul, .entry ol { margin-bottom:15px; font-size:12px; line-height:20px; } .entry ul li ul, .entry ol li ol{ margin-bottom:0px; padding-top:3px; } .entry ul li { list-style:circle inside !important; margin-left:15px; padding:3px 0px; } .entry ul li ul li { list-style:disc inside !important; } .entry ol li { list-style:decimal inside !important; font-size:12px; padding:3px 0px; } .entry ol li ol li { list-style:decimal-leading-zero inside !important; } /*========= COMMENTS =========*/ h2.commh2{ font-size: 1.4em; padding: 0 0 5px; font-weight:bold !important; } ol.commentlist{ margin: 10px 0 20px; padding: 0; list-style: none; font-size: 12px; line-height: 20px; } ol.commentlist p{ margin-bottom:10px; line-height: 20px; } ol.commentlist cite{ font-style: normal; font-weight: bold; } ol.commentlist li{ padding: 20px 10px 10px 10px; } ol.commentlist li.alt{ padding: 10px 10px 0 10px !important; background:#DDD; border:1px solid #C0C0C0; } /*========= SIDEBAR =========*/ /*- Sidebar Tabs - Popular, Comentários, Destaques, Nuvem de Tags -*/ .sideTabs { border-bottom:1px solid #C0C0C0; height:31px; width:350px; float:left; display:block; } .sideTabs .idTabs{ font-size: 12px; height: 30px; letter-spacing: -1px; } .sideTabs .idTabs li{ float: left; font-size: 13px; line-height: 30px; } .sideTabs .idTabs li a{ background: #eeeeee; border: 1px solid #eeeeee; border-bottom: 0; color: #c0c0c0; display: block; margin: 0 2px 0 0; padding: 0 10px; font-weight:bold; } .sideTabs .idTabs li a:hover, .sideTabs .idTabs .selected{ background: #dddddd; border: 1px solid #c0c0c0; border-bottom:1px solid #ddd; color: #373737; text-decoration: none; } .navbox{ background: #dddddd; border: 1px solid #c0c0c0; border-top: 0; margin: -2px 0 25px; padding: 10px 10px 0; position: relative; } .list1,list3,list4{ padding-bottom:12px; } .list1 li,.list3 li,.list4 li{ background: url(images/ico-star.gif) no-repeat left center; padding: 6px 0 6px 25px; border-bottom:1px dashed #C0C0C0; } .list1 li a,.list3 li a,.list4 li a{ color: #000000; } .list3 li { background: url(images/ico-mostcomm.gif) no-repeat left center !important; } .list4 li { background: url(images/ico-feat.gif) no-repeat left center !important; } /*- Ads -*/ .ads{ border: 1px solid #eeeeee; height: 125px; margin: 0 0 25px; padding: 10px; } .ads img{ float: left; margin: 0 14px 0 0; } .ads img.last{ margin: 0 !important; } /*- Flickr -*/ .flickr{ background: #fafafa; border: 1px solid #c0c0c0; margin: 0 0 25px; padding: 10px 0px; } .flickr .flickr_badge_image img { float:left; display:inline; padding-left:10px; padding-bottom:5px; } .flickr h2{ color: #ff7800; font-size: 14px; height: 21px; margin: 0 0 10px 0px; padding-left:10px; } .flickr h2 span{ float: left; } .flickr h2 img{ float: right; margin: 0 2px; } .flickr h2 em{ color: #848382; float: right; font-style: normal; } .flickr-ar { margin:10px 10px 0px 0px !important; padding:0px !important; text-align:right; } /*=== DropDown Lists ===*/ .catlist{ border-bottom: 3px solid #c0c0c0; margin: 0 0 15px; padding: 0 0 10px; width: 160px; } .catlist h2{ color: #ff7800; font-size: 14px; padding: 0 20px 0 0 !important; background:url(images/ico-catlist.gif) center right no-repeat; } .list-alt { padding-top:10px; } .list-alt li{ margin: 0 0 7px; } .list-alt li a{ color: #000000; } /*=== Styling Widget Lists ===*/ .widget h2 { text-transform:uppercase; } .widget ul { background: url(images/hl-dot.gif) repeat-x bottom; margin: 0 0 15px; padding: 10px 0 7px; } .widget ul li{ margin: 0 0 7px; } .widget ul li a{ color: #000000; } /*========= FOOTER =========*/ #footer{ background: #000000; clear: both; color: #b3b3b3; height: 35px; line-height: 35px; padding: 0 15px; } #footer a{ color: #b3b3b3; } #footer img { vertical-align:middle; } /*========= MISC =========*/ .fix{ clear: both; height: 1px; margin: 0 0 -1px; overflow: hidden; } .hl{ background: url(images/hl-dot.gif) repeat-x bottom; } .hl-full{ background: url(images/hl-dot-full.gif) repeat-x bottom; float:left; clear:both; height:2px; width:100%; margin:20px 0 25px !important; margin:10px 0 15px; padding:0 !important; } .hl2{ border-bottom: 3px solid #c0c0c0; } .hl3{ border-top: 3px solid #c0c0c0; padding: 10px 0 0; } .blog{ width:100% !important; float:left; } .between{ height:2px; margin-bottom:15px; } .fl{ float: left; } .fr{ float: right; } .ac{ text-align: center; } .ar{ text-align: right; } .th{ border: 1px solid #c0c0c0; float: left; margin: 0 10px 0 0; padding: 3px; } .gravatar { float:left; border: 1px solid #000; margin-right: 10px; } /*=== Gravity forms ===*/ .gfield { margin-bottom: 10px; } .gform_wrapper .top_label .gfield_label { display:block;float:left; padding-right:20px; width: 80px; margin: 5px 0px 4px !important; } .gform_wrapper input.button { padding: 5px 10px 6px !important; border: 0px !important; } .gform_wrapper input { padding: 5px 3px !important; } .gform_wrapper .top_label input.large, .gform_wrapper .top_label select.large, .gform_wrapper .top_label textarea.textarea { width: 300px !important; padding: 7px 3px !important; } .gform_wrapper .entry img, .gform_wrapper img.thumbnail { padding: 0px !important; border: 0px !important; } ul.top_label .clear-multi { clear: none !important; } .gform_wrapper .gfield_checkbox, .gform_wrapper .gfield_radio { margin-left: 120px !important; } img.ui-datepicker-trigger { border: 0px; padding: 0px; } .entry .gform_wrapper .gfield_checkbox li, .gform_wrapper .gfield_radio li { list-style: none !important; } Editando facebook-comments-for-wordpress/facebook-comments.php (ativo) <?php /* Plugin Name: Facebook Comments for WordPress Plugin URI: http://we8u.com/facebook-comments Description: Allows your visitors to comment on posts using their Facebook profile. Supports custom styles, notifications, combined comment counts, etc. Author: we8u Version: 3.1.3 Author URI: http://we8u.com/ */ define('FBCOMMENTS_ERRORS', false); # Set to true while developing, false for a release define('FBCOMMENTS_VER', '3.1.3'); define('FBCOMMENTS_REQUIRED_PHP_VER', '5.0.0'); define('FBCOMMENTS_AUTHOR', 'we8u'); define('FBCOMMENTS_WEBPAGE', 'http://we8u.com/facebook-comments/'); define('FBCOMMENTS_PATH', plugins_url('facebook-comments-for-wordpress/')); define('FBCOMMENTS_CSS_ADMIN', FBCOMMENTS_PATH . 'css/facebook-comments.css'); define('FBCOMMENTS_CSS_HIDEWPCOMMENTS', FBCOMMENTS_PATH . 'css/facebook-comments-hidewpcomments.css'); define('FBCOMMENTS_CSS_HIDEFBLINK', FBCOMMENTS_PATH . 'css/facebook-comments-hidefblink.css'); define('FBCOMMENTS_CSS_HIDELIKE', FBCOMMENTS_PATH . 'css/facebook-comments-hidelike.css'); define('FBCOMMENTS_CSS_DARKSITE', FBCOMMENTS_PATH . 'css/facebook-comments-darksite.css'); define('FBCOMMENTS_CSS_HIDELIKEANDDARKSITE', FBCOMMENTS_PATH . 'css/facebook-comments-custom.css'); define('FBCOMMENTS_CSS_WIDGETS', FBCOMMENTS_PATH . 'css/facebook-comments-widgets.css'); if (FBCOMMENTS_ERRORS) { error_reporting(E_ALL); # Ensure all errors and warnings are verbose } # Include common functions require_once 'facebook-comments-core.php'; require_once 'facebook-comments-recentcomments.php'; require_once 'facebook-comments-combinecomments.php'; require_once 'facebook-comments-display.php'; require_once 'scripts/facebook.php'; # Facebook API wrapper wp_enqueue_script('jquery'); /********************************** Globals **********************************/ global $fbComments_defaults; $fbComments_defaults = array( 'appId' => '', 'appSecret' => '', 'accessToken' => null, 'xid' => fbComments_getRandXid(), 'includeFbJs' => true, 'includeFbJsOldWay' => false, 'includeFbmlLangAttr' => true, 'includeOpenGraphLangAttr' => true, 'includeOpenGraphMeta' => true, 'includeFbComments' => true, 'hideWpComments' => false, 'combineCommentCounts' => true, 'notify' => true, 'language' => 'en_US', 'displayTitle' => true, 'title' => 'facebook comments:', 'numPosts' => 10, 'width' => 500, 'displayLocation' => 'before', 'displayPagesOrPosts' => 'posts', 'publishToWall' => true, 'reverseOrder' => false, 'hideFbLikeButton' => false, 'containerCss' => 'margin: 20px 0;', 'titleCss' => 'margin-bottom: 15px; font-size: 140%; font-weight: bold; border-bottom: 2px solid #000; padding-bottom: 5px;', 'darkSite' => '', 'noBox' => false, 'dashNumComments' => 10, 'v1plusv2' => false, // 'newUser' => false, 'notifyUserList' => '', 'showDBWidget' => false, 'enableCache' => false, 'commentVersion' => 'new', 'fbCommentCount' => true, 'v2ccstyle' => 'border:none; overflow:hidden; width:130px; padding-left:-15px; height:12px;', 'indexLikebtn' => array( 'display' => 'none', 'layout' => 'button_count', 'showFaces' => true, 'width' => 450, 'verb' => 'like', 'font' => 'arial', 'color' => 'light', 'style' => 'height: 25px; width: 150px; border: medium none; overflow: hidden;' ), 'like' => array( 'layout' => 'standard', 'showFaces' => true, 'width' => 450, 'verb' => 'like', 'font' => 'arial', 'color' => 'light', 'style' => 'height: 62px; width: 100%;' ) ); /********************************** Activation hooks/actions **********************************/ # make sure default settings get loaded on plugin updates $oldver = get_option('fbComments_ver'); if (is_admin() && $oldver != FBCOMMENTS_VER) { fbComments_doUpdate(); } register_activation_hook(__FILE__, 'fbComments_init_hack'); register_deactivation_hook(__FILE__, 'fbComments_deactivate_hack'); # hack may not be needed here register_uninstall_hook(__FILE__, 'fbComments_uninit_hack'); # or here # stupid wordpress, can't call function in an included file in activation hook? function fbComments_init_hack() { fbComments_init(); } function fbComments_deactivate_hack() { fbComments_deactivate(); } function fbComments_uninit_hack() { fbComments_uninit(); } global $fbc_options; # main options array in wp database options table $fbc_options = get_option('fbComments'); # Display a message prompting the user to enter a Facebook application ID and secret upon plugin activation (if they aren't already set) if (get_option('fbComments_displayAppIdWarning')) { add_action('admin_notices', create_function( '', "echo '<div class=\"error\"><p><strong>".sprintf(__('The Facebook comments box will not be included in your posts until you set a valid application ID and application secret. Please <a href="%s">set your application ID and secret now</a> using the options page.', 'facebook-comments'), admin_url('options-general.php?page=facebook-comments'))."</strong></p></div>';" ) ); # display the message only upon activation update_option('fbComments_displayAppIdWarning', false); } # Enqueue correct stylesheet if user wants to hide the WordPress commenting form if ($fbc_options['hideWpComments']) { function fbComments_enqueueHideWpCommentsCss() { wp_register_style('fbComments_hideWpComments', FBCOMMENTS_CSS_HIDEWPCOMMENTS, array(), FBCOMMENTS_VER); wp_enqueue_style('fbComments_hideWpComments'); } add_action('init', 'fbComments_enqueueHideWpCommentsCss'); } # Add appropriate language attributes (must use get_option() because $fbc_options[] isn't available at this point) if (($fbc_options['includeFbmlLangAttr']) || ($fbc_options['includeOpenGraphLangAttr'])) { function fbComments_includeLangAttrs($attributes='') { $opts = get_option('fbComments'); if ($opts['includeFbmlLangAttr']) { $attributes .= ' xmlns:fb="http://www.facebook.com/2008/fbml"'; } if ($opts['includeOpenGraphLangAttr']) { $attributes .= ' xmlns:og="http://opengraphprotocol.org/schema/"'; } return $attributes; } add_filter('language_attributes', 'fbComments_includeLangAttrs'); } # Add OpenGraph meta information if ($fbc_options['includeOpenGraphMeta']) { function fbComments_addOpenGraphMeta() { global $wp_query; global $fbc_options; $postId = $wp_query->post->ID; $postTitle = single_post_title('', false); $postUrl = get_permalink($postId); $siteName = get_bloginfo('name'); $appId = $fbc_options['appId']; if (strlen($fbc_options['notifyUserList']) > 0) { echo "<meta property='fb:admins' content='{$fbc_options['notifyUserList']}'>"; } echo "<meta property='og:title' content='$postTitle' />", "<meta property='og:site_name' content='$siteName' />", "<meta property='og:url' content='$postUrl' />", "<meta property='og:type' content='article' />", "<meta property='fb:app_id' content='$appId'>\n"; } add_action('wp_head', 'fbComments_addOpenGraphMeta'); } /********************************** Settings page **********************************/ add_action('admin_init', 'fbComments_adminPage_init' ); add_action('admin_menu', 'fbComments_adminPage'); # Init plugin options to white list our options function fbComments_adminPage_init() { register_setting('fbComments_options', 'fbComments', 'fbComments_sanatize'); } # Add settings page function fbComments_adminPage() { add_options_page(__('Facebook Comments for WordPress Options'), __('Facebook Comments'), 'manage_options', 'facebook-comments', 'fbComments_includeAdminPage'); } # Draw the settings page function fbComments_includeAdminPage() { include('facebook-comments-admin.php'); } # Sanitize and validate input. Accepts an array, returns a sanitized array. function fbComments_sanatize($input) { $input['title'] = esc_attr($input['title']); $input['containerCss'] = esc_attr($input['containerCss']); $input['titleCss'] = esc_attr($input['titleCss']); $input['dashNumComments'] = absint($input['dashNumComments']); $input['numPosts'] = absint($input['numPosts']); $input['width'] = absint($input['width']); return $input; } # add "Settings" link to plugin on plugins page add_filter('plugin_action_links', 'fbComments_settingsLink', 0, 2); function fbComments_settingsLink($actionLinks, $file) { if (($file == 'facebook-comments-for-wordpress/facebook-comments.php') && function_exists('admin_url')) { $settingsLink = '<a href="' . admin_url('options-general.php?page=facebook-comments') . '">' . __('Settings') . '</a>'; # Add 'Settings' link to plugin's action links array_unshift($actionLinks, $settingsLink); } return $actionLinks; } # display changelog on "Plugins" page add_action('after_plugin_row', 'display_changelog', 50, 2); # make sure both are set to avoid fatal error upon getting fbapi if (empty($fbc_options['appId']) || empty($fbc_options['appSecret'])) { fbComments_log("App ID or secret not set, not loading widgets"); } else { # hook for admin dashboard widget add_action('init', 'fbcomments_dashboard_widget_init'); # load jquery add_action('wp_dashboard_setup', 'fbcomments_add_dashboard_widgets'); # register FBCRC_Widget widget add_filter('the_posts', 'conditionally_add_scripts_and_styles'); # the_posts gets triggered before wp_head add_action('widgets_init', create_function('', 'return register_widget("FBCRC_Widget");')); } /********************************** Program entry point **********************************/ # Ensure we're able to display the comment box if ($fbc_options['includeFbComments']) { add_filter('comments_array', 'facebook_comments'); } # Display like button on index if ('top' == $fbc_options['indexLikebtn']['display'] || 'bottom' == $fbc_options['indexLikebtn']['display']) { add_filter('the_content', 'fbc_show_like_index'); } # Display facebook comment count instead of WordPress one if ($fbc_options['fbCommentCount'] && $fbc_options['commentVersion'] == 'v2') { add_filter('comments_number', 'fbc_facebook_comment_count'); # Else combine the Facebook and WordPress comment counts, if desired } else if ($fbc_options['combineCommentCounts'] && !empty($fbc_options['appId']) && !empty($fbc_options['appSecret']) && $fbc_options['commentVersion'] != 'v2') { # we don't want comment caching to load if it's useless--as it is with v2 add_filter('get_comments_number', 'fbComments_combineCommentCounts'); } ?> Compartilhar este post Link para o post Compartilhar em outros sites
fatecano_sp 0 Denunciar post Postado Outubro 21, 2011 Tirei um print pra facilitar a visualização. Gostaria de deixar a caixa de comentário da mesma largura dessa coluna. Obs.: 1) dei uma olhada rápida nas regras do fórum e não vi nada sobre o tamanho das imagens postadas, 2) caso alguém vá reparar o conteúdo o site, eles são todos fictícios já que o site está sendo feito para teste. Compartilhar este post Link para o post Compartilhar em outros sites