I get this error when I try to go to current theme in the admin panel. Im not sure what I can do, please help me out.
LainaaTemplate Parse Error!
There was a problem loading the /Themes/default/Settings.template.php template or language file. Please check the syntax and try again - remember, single quotes (') often have to be escaped with a slash (\). To see more specific error information from PHP, try accessing the file directly.
You may want to try to refresh this page or use the default theme.
Parse error: syntax error, unexpected T_DOUBLE_ARROW in .../Themes/default/Settings.template.php on line 16
7:
8:
9: //CW: Build dynamic list of karma modes
10:
11: $karma_mode_options = array();
12:
13: $karmaModeNames = explode('|', $txt['karma_user_modes']);
14: $numKarmaModes = count($karmaModeNames);
15:
16: array_push($karma_mode_options, 0 => $txt['karma_mode_none']);
17: for ($value = 0; $value < $numKarmaModes; ++$value) {
18: array_push($karma_mode_options, ($value + 1) => $karmaModeNames[$value]);
19: }
20:
My default theme looks like this:
$txt['karma_mode_none']);
for ($value = 0; $value < $numKarmaModes; ++$value) {
array_push($karma_mode_options, ($value + 1) => $karmaModeNames[$value]);
}
$context['theme_options'] = array(
array(
'id' => 'show_board_desc',
'label' => $txt[732],
'default' => true,
),
array(
'id' => 'show_children',
'label' => $txt['show_children'],
'default' => true,
),
array(
'id' => 'show_no_avatars',
'label' => $txt['show_no_avatars'],
'default' => true,
),
array(
'id' => 'show_no_signatures',
'label' => $txt['show_no_signatures'],
'default' => true,
),
array(
'id' => 'show_no_censored',
'label' => $txt['show_no_censored'],
'default' => true,
),
array(
'id' => 'return_to_post',
'label' => $txt['return_to_post'],
'default' => true,
),
array(
'id' => 'no_new_reply_warning',
'label' => $txt['no_new_reply_warning'],
'default' => true,
),
array(
'id' => 'view_newest_first',
'label' => $txt['recent_posts_at_top'],
'default' => true,
),
array(
'id' => 'view_newest_pm_first',
'label' => $txt['recent_pms_at_top'],
'default' => true,
),
array(
'id' => 'popup_messages',
'label' => $txt['popup_messages'],
'default' => true,
),
array(
'id' => 'copy_to_outbox',
'label' => $txt['copy_to_outbox'],
'default' => true,
),
array(
'id' => 'auto_notify',
'label' => $txt['auto_notify'],
'default' => true,
),
array(
'id' => 'calendar_start_day',
'label' => $txt['calendar_start_day'],
'options' => array(
0 => $txt['days'][0],
1 => $txt['days'][1],
6 => $txt['days'][6],
),
'default' => true,
),
array(
'id' => 'karma_mode',
'label' => $txt['karma_mode'],
'options' => $karma_mode_options,
'default' => true,
),
array(
'id' => 'display_quick_reply',
'label' => $txt['display_quick_reply'],
'options' => array(
0 => $txt['display_quick_reply1'],
1 => $txt['display_quick_reply2'],
2 => $txt['display_quick_reply3']
),
'default' => true,
),
array(
'id' => 'karma_mode',
'label' => $txt['karma_mode'],
'options' => $karma_mode_options,
'default' => true,
),
array(
'id' => 'display_quick_mod',
'label' => $txt['display_quick_mod'],
'options' => array(
0 => $txt['display_quick_mod_none'],
1 => $txt['display_quick_mod_check'],
2 => $txt['display_quick_mod_image'],
),
'default' => true,
),
array(
'id' => 'karma_mode',
'label' => $txt['karma_mode'],
'options' => $karma_mode_options,
'default' => true,
),
array(
'id' => 'num_topics_page',
'label' => $txt['admin_num_topics'],
'options' => array(
'default' => '0',
10 => '10',
25 => '25',
50 => '50',
75 => '75',
100 => '100',
),
'default' => true,
),
array(
'id' => 'karma_mode',
'label' => $txt['karma_mode'],
'options' => $karma_mode_options,
'default' => true,
),
array(
'id' => 'num_posts_page',
'label' => $txt['admin_num_posts'],
'options' => array(
'default' => '0',
10 => '10',
25 => '25',
50 => '50',
75 => '75',
100 => '100',
),
'default' => true,
),
array(
'id' => 'karma_mode',
'label' => $txt['karma_mode'],
'options' => $karma_mode_options,
'default' => true,
),
);
}
function template_settings()
{
global $context, $settings, $options, $scripturl, $txt;
$context['theme_settings'] = array(
array(
'id' => 'header_logo_url',
'label' => $txt['header_logo_url'],
'description' => $txt['header_logo_url_desc'],
'type' => 'text',
),
array(
'id' => 'number_recent_posts',
'label' => $txt['number_recent_posts'],
'description' => $txt['number_recent_posts_desc'],
'type' => 'number',
),
array(
'id' => 'display_who_viewing',
'label' => $txt['who_display_viewing'],
'options' => array(
0 => $txt['who_display_viewing_off'],
1 => $txt['who_display_viewing_numbers'],
2 => $txt['who_display_viewing_names'],
),
),
array(
'id' => 'smiley_sets_default',
'label' => $txt['smileys_default_set_for_theme'],
'options' => $context['smiley_sets'],
),
array(
'id' => 'show_modify',
'label' => $txt[383],
),
array(
'id' => 'show_member_bar',
'label' => $txt[510],
),
array(
'id' => 'linktree_link',
'label' => $txt[522],
),
array(
'id' => 'show_profile_buttons',
'label' => $txt[523],
),
array(
'id' => 'show_mark_read',
'label' => $txt[618],
),
array(
'id' => 'linktree_inline',
'label' => $txt['smf105'],
'description' => $txt['smf106'],
),
array(
'id' => 'show_sp1_info',
'label' => $txt['smf200'],
),
array(
'id' => 'allow_no_censored',
'label' => $txt['allow_no_censored'],
),
array(
'id' => 'show_bbc',
'label' => $txt[740],
),
array(
'id' => 'additional_options_collapsable',
'label' => $txt['additional_options_collapsable'],
),
array(
'id' => 'enable_news',
'label' => $txt[379],
),
array(
'id' => 'show_newsfader',
'label' => $txt[387],
),
array(
'id' => 'newsfader_time',
'label' => $txt[739],
'type' => 'number',
),
array(
'id' => 'show_user_images',
'label' => $txt[384],
),
array(
'id' => 'show_blurb',
'label' => $txt[385],
),
array(
'id' => 'show_latest_member',
'label' => $txt[382],
),
array(
'id' => 'use_image_buttons',
'label' => $txt[521],
),
array(
'id' => 'show_gender',
'label' => $txt[386],
),
array(
'id' => 'hide_post_group',
'label' => $txt['hide_post_group'],
'description' => $txt['hide_post_group_desc'],
),
);
}
?>
I'm gonna guess it should be this:
for ($value = 0; $value < $numKarmaModes; ++$value) {
array_push($karma_mode_options, array(($value + 1) => $karmaModeNames[$value]));
}
But that's a guess... since you can only push a mixed var (string, integer, boolean) and the => is used with array references.... so I'm thinking that's the only change you need to make.