From 9826a88694a0f1ad35ed5c9da2287f366ad890f7 Mon Sep 17 00:00:00 2001 From: Silvio Date: Tue, 3 Jul 2018 16:00:22 -0300 Subject: Adds embed code textarea --- timelinejs.module | 16 +++++++++++++++- timelinejs_embed.tpl.php | 3 +++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 timelinejs_embed.tpl.php diff --git a/timelinejs.module b/timelinejs.module index db7034b..1afff83 100644 --- a/timelinejs.module +++ b/timelinejs.module @@ -68,6 +68,13 @@ function timelinejs_theme($existing, $type, $theme, $path) { 'lang_js' => NULL, ), ), + 'timelinejs_embed' => array( + 'template' => 'timelinejs_embed', + 'variables' => array( + 'nid' => NULL, + 'lang' => NULL, + ), + ), 'timelinejs_json' => array( 'template' => 'timelinejs_json', 'variables' => array('headline', 'date', 'text', 'media', 'events'), @@ -252,7 +259,7 @@ function timelinejs($nid = NULL, $width = '960px', $height = '600px') { $height = '100%'; } - return theme('timelinejs', array( + $output = theme('timelinejs', array( 'nid' => $nid, 'lang' => $language->language, 'width' => $width, @@ -267,6 +274,13 @@ function timelinejs($nid = NULL, $width = '960px', $height = '600px') { 'font' => variable_get('timelinejs_font', 'Bevan-PotanoSans'), 'library_path' => $library_path, )); + + $output .= theme('timelinejs_embed', array( + 'nid' => $nid, + 'lang' => $language->language, + )); + + return $output; } /** diff --git a/timelinejs_embed.tpl.php b/timelinejs_embed.tpl.php new file mode 100644 index 0000000..cc5a18a --- /dev/null +++ b/timelinejs_embed.tpl.php @@ -0,0 +1,3 @@ +
+ +: -- cgit v1.2.3