From bd5be67c3b90484a01502f53ba5ec53285fa83d0 Mon Sep 17 00:00:00 2001 From: Jeremy Trojan Date: Mon, 13 Jun 2011 02:44:24 -0700 Subject: Issues #1186680 and #1182214 --- fblikebutton.module | 6 +++--- 1 file 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'), -- cgit v1.2.3