diff options
author | Silvio <silvio@socioambiental.org> | 2018-07-03 17:03:05 -0300 |
---|---|---|
committer | Silvio <silvio@socioambiental.org> | 2018-07-03 17:03:05 -0300 |
commit | 10f23b7572cfa605c15e8c7fef21c7234ce32976 (patch) | |
tree | e8bddf0b3ba13da21a85c7003bf51e44c3edcd34 | |
parent | d452474775e48c1a0f036f115231df0f8a0d275a (diff) | |
download | timelinejs-develop.tar.gz timelinejs-develop.tar.bz2 |
Do not show embed code if already embededdevelop
-rw-r--r-- | timelinejs.module | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/timelinejs.module b/timelinejs.module index 1afff83..441f8f9 100644 --- a/timelinejs.module +++ b/timelinejs.module @@ -210,7 +210,7 @@ function timelinejs_widget($nid = NULL, $width = '960px', $height = '500px') { $output .= '<title>' . t('Timeline: @title', array('@title' => $node->title)) . '</title>'; $output .= '<script type="text/javascript">timelineWidget = true;</script>'; $output .= '</head><body class="widget timeline-widget" style="height: 100%; margin: 0px;">'; - $output .= timelinejs($nid, $width, $height); + $output .= timelinejs($nid, $width, $height, FALSE); $output .= '</body></html>'; // Avoid themeable output. @@ -221,7 +221,7 @@ function timelinejs_widget($nid = NULL, $width = '960px', $height = '500px') { /** * Menu callback. */ -function timelinejs($nid = NULL, $width = '960px', $height = '600px') { +function timelinejs($nid = NULL, $width = '960px', $height = '600px', $embed = TRUE) { global $language; global $theme; global $base_url; @@ -275,10 +275,12 @@ function timelinejs($nid = NULL, $width = '960px', $height = '600px') { 'library_path' => $library_path, )); - $output .= theme('timelinejs_embed', array( - 'nid' => $nid, - 'lang' => $language->language, - )); + if ($embed) { + $output .= theme('timelinejs_embed', array( + 'nid' => $nid, + 'lang' => $language->language, + )); + } return $output; } |