summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio <silvio@socioambiental.org>2012-10-24 18:17:17 -0200
committerSilvio <silvio@socioambiental.org>2012-10-24 18:17:17 -0200
commite218d8117425be29717612a7f009cb3179064a6a (patch)
tree7f37dddb41e74abff84275ed4e85e9136803445f
parent943aa94c965dcfa160c7216cb66bf6f11de38e38 (diff)
downloadtimelinejs-e218d8117425be29717612a7f009cb3179064a6a.tar.gz
timelinejs-e218d8117425be29717612a7f009cb3179064a6a.tar.bz2
Using $base_url at timelinejs source
-rw-r--r--timelinejs.module5
1 files changed, 3 insertions, 2 deletions
diff --git a/timelinejs.module b/timelinejs.module
index bdbfa8d..04593c0 100644
--- a/timelinejs.module
+++ b/timelinejs.module
@@ -151,16 +151,17 @@ function timelinejs_json($nid) {
function timelinejs($nid, $width = '960px', $height = '500px') {
global $language;
global $theme;
+ global $base_url;
$theme_path = drupal_get_path('theme', $theme);
$library_path = drupal_get_path('libraries', 'timelinejs');
- $css = (file_exists($theme_path .'/timeline.css')) ? '/'. $theme_path .'/timeline.css' : '/'. $library_path .'/compiled/css/timeline.css';
+ $css = (file_exists($theme_path .'/timeline.css')) ? '/'. $theme_path .'/timeline.css' : '/'. $library_path .'/compiled/css/timeline.css';
return theme('timelinejs', array(
'width' => $width,
'height' => $height,
- 'source' => '/timelinejs/json/'. (int) $nid,
+ 'source' => $base_url .'/timelinejs/json/'. (int) $nid,
'css' => $css,
'lang' => '/sites/all/libraries/timelinejs/compiled/js/locale/'. $language->language .'.js',
));