Hello,

I wanted to display custom html for when the timer completes. However, using the following, it didn't work:

theme('jstimer', array(
'widget_name' => 'jst_timer',
'widget_args' => array(
'current_server_time' => date('c', time()),
'datetime' => date("c", $cooldown_expire),
'format_txt' => '%mins%:%secs%',
'complete' => "blah blah blah",
)

));

I was referring widget/jst_timer.module:511

$valid_atts = array('datetime', 'dir', 'format_txt', 'format_num', 'threshold', 'timer_complete_message', 'tc_redir', 'tc_redir_delay', 'tc_msg', 'interval', 'current_server_time');

to pick up the complete parameter. When I tried to use the tc_msg parameter, it did display the message using an alert dialog.

If I change the string complete within the valid_atts and my array parameter to 'timer_complete_message', then it seems to use the provided text.

I am not sure if this is a bug or if I am just not using the correct variable.

Comments

jvandervort’s picture

Issue summary: View changes
Status: Active » Fixed

Going through old issues...

A bug, fixed in dev.

You should be something like this.

theme('jstimer', array(
'widget_name' => 'jst_timer',
'widget_args' => array(
'current_server_time' => date('c', time()),
'datetime' => date("c", $cooldown_expire),
'format_txt' => '%mins%:%secs%',
'timer_complete_message' => "blah blah blah"
)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

TygrLili’s picture

Hello,

Turns out this issue is actually not fixed in either 7.x-1.4 nor the current dev. I have attempted to customize a timer complete message, and the customization does not apply. As mentioned in the original issue, alert message customization does function as expected, but customizations to the regular complete message do nothing.