aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fblikebutton.module6
1 files changed, 3 insertions, 3 deletions
diff --git a/fblikebutton.module b/fblikebutton.module
index 984f54f..09ffa44 100644
--- a/fblikebutton.module
+++ b/fblikebutton.module
@@ -54,9 +54,9 @@ function fblikebutton_node_view($node, $view_mode) {
$showonteasers = variable_get('fblikebutton_showonteasers', 0);
$full = ($view_mode == 'full') ? TRUE : FALSE;
$show = ( ! empty($types[$node->type]) && user_access('access fblikebutton'));
- $likebase = $base_url . '/';
- $likepath = drupal_get_path_alias(isset($node->uri) ? $node->uri['path'] : sprintf('node/%u', $node->nid));
- $webpage_to_like = $likebase . $likepath;
+ // Thanks to corbacho for supplying the code for the $webpage_to_like variable...
+ // (It was apparently throwing errors/notices the way I had it set up.)
+ $webpage_to_like = url("node/$node->nid", array('absolute' => TRUE));
$likebutton_weight = variable_get('fblikebutton_weight', '0');
$conf = array(
'layout' => variable_get('fblikebutton_layout', 'standard'),