Not much but this code will remove fblike button from specific nodes
( not thoroughly tested and needs review and improvements :) )

in fblikebutton_admin_settings:

$form['fblikebutton_node_ids'] = array(
    '#type' => 'textfield',
    '#title' => t('Don\'t Display the Like button on these nodes'),
    '#default_value' => variable_get('fblikebutton_node_ids', ''),
    '#description' => t('This nodes will not have the "like" button automatically added to them.').'<br />'.
                      '<b>'.t('USE \',\' BETWEEN NODES NUMBERS. EX: 12345,21312, ').'</b>',
  );

in fblikebutton_nodeapi:

//get the array with the nodes from where the like button will be excluded 
$sNodesNotShow = variable_get('fblikebutton_node_ids', '');
$aNodesNotShow = explode(',',$sNodesNotShow);
      
//remove the facebook like button from some nodes  
if (in_array($node->nid, $aNodesNotShow)) {
     break;
}

Comments

jerdiggity’s picture

Good idea -- I like it.

cata.vancea’s picture

Glad you like it !

I also like your module and I have made made some adjustments for my needs :9 this was one of them !

THX !

tony barnes’s picture

Version: 6.x-1.6 » 7.x-1.2

Thanks for this, in 7.x-1.2 this needed a little tweaking - in fblikebuttonadmin.inc, do the same as step one, basically add in the $form['fblikebutton_node_ids'] = array bit below:

function fblikebutton_admin_settings() {
  $fblikebutton_node_options = node_type_get_names();
  $form['fblikebutton_node_types'] = array(
    '#type' => 'checkboxes',
    '#title' => t('Display the Like button on these content types:'),
    '#options' => $fblikebutton_node_options,
    '#default_value' => variable_get('fblikebutton_node_types', array('article')),
    '#description' => t('Each of these content types will have the "like" button automatically added to them.'),
  );
  $form['fblikebutton_node_ids'] = array(
    '#type' => 'textfield',
    '#title' => t('Don\'t Display the Like button on these nodes'),
    '#default_value' => variable_get('fblikebutton_node_ids', ''),
    '#description' => t('This nodes will not have the "like" button automatically added to them.').'<br />'.
                      '<b>'.t('USE \',\' BETWEEN NODES NUMBERS. EX: 12345,21312, ').'</b>',
  );
..........
..........
..........

Then in fblikebutton.module, look for:

if ($show) {
    if ($showonteasers == 0) {
      if ($view_mode == 'teaser') {
        $node->content['fblikebutton_field'] = NULL;
      }
      if ($view_mode == 'full') {
        $node->content['fblikebutton_field'] = array(
          '#markup' => _fblikebutton_field($webpage_to_like, $conf),
          '#weight' => $likebutton_weight,
        );
      }
    }
    elseif ($showonteasers == 1) {
      if ($view_mode == 'teaser' || $view_mode == 'full') {
        $node->content['fblikebutton_field'] = array(
         '#markup' => _fblikebutton_field($webpage_to_like, $conf),
        '#weight' => $likebutton_weight,
        );
      }
    }
  }
}

change to:

if ($show) {
    if ($showonteasers == 0) {
      if ($view_mode == 'teaser') {
        $node->content['fblikebutton_field'] = NULL;
      }
      if ($view_mode == 'full') {
        $node->content['fblikebutton_field'] = array(
          '#markup' => _fblikebutton_field($webpage_to_like, $conf),
          '#weight' => $likebutton_weight,
        );
        if (in_array($node->nid, $aNodesNotShow)) {
            $node->content['fblikebutton_field'] = NULL;;
        }
      }
    }
    elseif ($showonteasers == 1) {
      if ($view_mode == 'teaser' || $view_mode == 'full') {
        $node->content['fblikebutton_field'] = array(
         '#markup' => _fblikebutton_field($webpage_to_like, $conf),
        '#weight' => $likebutton_weight,
        );
      }
    }
  }
}

Works a charm (as far as I can tell!!)

AcidRam’s picture

Hello :)

@ catalin.vancea

I'm looking to remove the like button and hide the page from public,for a mafiawars group page at facebook.com .

I see where I can add people as admins but any one could post on the page im thinking due to the fact it might be open ,and not a hidden or closed group.because maybe the like button or settings for the page . In script that is needed to hide and remove from public view.

I use greasemonkey ./mafiawars addon .

Im a little new to this type of script (above) that you were kind too your post.
Where can I post this script or should I ask what runs the script ? for this to work so that i can follow your instructions 200%.

plato1123’s picture

This is all swell but if you have a multi-site config with a number of independent sysadmins you can't give them php access :'( Is there no CSS solution to this? I'm going to have to create an adjacent div with negative margins just to hide a (duplicate) fblike widget. This should be part of the module config.

edit: CSS didn't really do it, I ended up putting an iframe over the top (a youtube video) and it hides it in firefox and chrome but in IE the like widget floats on top of the youtube video (which is kind of a trip)

edit2: It seems like an easy way to solve this would be to have the like button appear in a div with a unique ID

binaryjc’s picture

Version: 7.x-1.2 » 6.x-2.2

so which changes should I make if I'm using version 6.x-2.2??