Closed (fixed)
Project:
Bookmark Us
Version:
4.7.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 Nov 2006 at 16:01 UTC
Updated:
25 Nov 2006 at 11:53 UTC
function bookmark_us_block_code() {
global $base_url;
$path = drupal_get_path('module', 'bookmark_us');
$bmarkus_stitle = variable_get('bookmark_us_site', t('Bookmark Website'));
$bmarkus_ptitle = variable_get('bookmark_us_page', t('Bookmark Page'));
$bmarkus_icons = variable_get('bookmark_us_icons', 1);
$sitename = variable_get('site_name', 'drupal');
$slogan = variable_get('site_slogan', '');
$pagetitle = strip_tags(drupal_get_title());
$head_title = $pagetitle ? $pagetitle . ' | ' . $sitename : $sitename;
$output = '';
$output .= drupal_add_js($path . '/bookmark_us.js');
if($bmarkus_icons) $output .= '<img src="' . $base_url. "/". $path . '/bookmark_site.gif" alt="' . $bmarkus_stitle . '" align="absmiddle" />';
$output .= ' ';
$output .= '<script type="text/javascript"> displayLink("1","' . $base_url . '","' . $sitename . '","' . $bmarkus_stitle . '"); </script>';
$output .= '<br />';
if($bmarkus_icons) $output .= '<img src="' . $base_url. "/". $path . '/bookmark_page.gif" alt="' . $bmarkus_ptitle . '" align="absmiddle" />';
$output .= ' ';
$output .= '<script type="text/javascript"> displayLink("3","","' . $head_title . '","' . $bmarkus_ptitle . '"); </script>';
return $output;
line $output .= drupal_add_js($path . '/bookmark_us.js'); won't do anything because it is called after drupal call to drupal_get_html_head and thus no additional scripts are put into html header.
this needs fixing but i have no idea where drupal_add_js($path . '/bookmark_us.js') should be to assure outputing bookmark_us.js script tag to the browser.
Comments
Comment #1
Gurpartap Singh commentedBut the module seems to work fine most where. Can you be yor configuration/changes specific?
Comment #2
siliconmind commentedi have no idea why this is happening. i've installed bookmark_us on clean install of drupal 4.7.4. the line i mentioned, with call to drupal_add_js has no effect and the bookmark_us.js script is never added to the page head.
Comment #3
Gurpartap Singh commentedPlease reopen is necessary. Seems to work fine.
Comment #4
Gurpartap Singh commented