- HTML to place inside the sidebar:
+ get('sbedit_field_html'); ?>
-
Creating PHP blocks in demo mode is disabled for security reasons.
+
get('sbedit_field_php_disabled'); ?>
-
- WARNING: If you don't know what you're doing, or if you are not fluent in PHP, stop now and choose a different block type. You will brick your Enano installation if you are not careful here.
- ALWAYS remember to write secure code! The Enano team is not responsible if someone drops all your tables because of an SQL injection vulnerability in your sidebar code. You are probably better off using the template-formatted block type.
-
-
-
- It is especially important to note that this code is NOT checked for errors! If there is a syntax error in your code here, it will prevent any pages from loading AT ALL. So you need to use an external PHP editor (like jEdit ) to check your syntax before you hit save.
- You have been warned.
-
-
- Also, you should avoid using output buffering functions (ob_[start|end|get_contents|clean]) here, because Enano uses those to track output from this script.
-
-
- The standard <?php and ?> tags work here. Don't use an initial "<?php" or it will cause a parse error.
-
-
- PHP code:
-
+ get('sbedit_field_php'); ?>
+
@@ -2510,7 +2494,7 @@
- Plugin:
+ get('sbedit_field_plugin'); ?>
@@ -2526,8 +2510,8 @@
-
-
+
+
@@ -2558,7 +2542,7 @@
$template->footer();
exit;
}
- echo 'Item moved.
';
+ echo '' . $lang->get('sbedit_msg_block_moved') . '
';
break;
case 'delete':
$query = $db->sql_query('DELETE FROM '.table_prefix.'sidebar WHERE item_id=' . intval($_GET['id']) . ';'); // Already checked for injection attempts ;-)
@@ -2573,7 +2557,7 @@
ob_end_clean();
die('GOOD');
}
- echo 'Item deleted.
';
+ echo '' . $lang->get('sbedit_msg_block_deleted') . '
';
break;
case 'disenable';
$q = $db->sql_query('SELECT item_enabled FROM '.table_prefix.'sidebar WHERE item_id=' . intval($_GET['id']) . ';');
@@ -2683,7 +2667,7 @@
$c = preg_replace('#(.*?) #is', '\\2 ', $c);
break;
case BLOCK_PLUGIN:
- $c = ($template->fetch_block($row['block_content'])) ? $template->fetch_block($row['block_content']) : 'Can\'t find plugin block';
+ $c = ($template->fetch_block($row['block_content'])) ? $template->fetch_block($row['block_content']) : $lang->get('sbedit_msg_plugin_not_loaded');
break;
}
die('var status = \'GOOD\'; var content = unescape(\''.hexencode($c).'\');');
@@ -2700,11 +2684,11 @@
$parser->assign_vars(Array(
'HREF'=>'#',
'FLAGS'=>'onclick="return false;"',
- 'TEXT'=>'Change theme'
+ 'TEXT' => $lang->get('sidebar_btn_changestyle')
));
$template->tpl_strings['THEME_LINK'] = $parser->run();
$parser->assign_vars(Array(
- 'TEXT'=>'Log out',
+ 'TEXT' => $lang->get('sidebar_btn_logout'),
));
$template->tpl_strings['LOGOUT_LINK'] = $parser->run();
@@ -2763,20 +2747,20 @@
break;
case BLOCK_PLUGIN:
$parser = $template->makeParserText($vars['sidebar_section_raw']);
- $c = ($template->fetch_block($row['block_content'])) ? $template->fetch_block($row['block_content']) : 'Can\'t find plugin block';
+ $c = ($template->fetch_block($row['block_content'])) ? $template->fetch_block($row['block_content']) : $lang->get('sbedit_msg_plugin_not_loaded');
break;
}
$block_name = $row['block_name']; // $template->tplWikiFormat($row['block_name']);
if ( empty($block_name) )
- $block_name = '<Unnamed>';
- $t = '' . $block_name . ' ';
- if($row['item_enabled'] == 0) $t .= ' (disabled) ';
- else $t .= ' (disabled) ';
+ $block_name = '<' . $lang->get('sbedit_note_block_unnamed') . '>';
+ $t = '' . $block_name . ' ';
+ if($row['item_enabled'] == 0) $t .= ' ' . $lang->get('sbedit_note_block_disabled') . ' ';
+ else $t .= ' ' . $lang->get('sbedit_note_block_disabled') . ' ';
$side = ( $row['sidebar_id'] == SIDEBAR_LEFT ) ? SIDEBAR_RIGHT : SIDEBAR_LEFT;
- $tb = '
-
-
- ';
+ $tb = '
+
+
+ ';
$as = '';
$ae = ' '.$tb;
$parser->assign_vars(Array('CONTENT'=>$c,'TITLE'=>$t,'ADMIN_START'=>$as,'ADMIN_END'=>$ae));
@@ -2794,10 +2778,10 @@
echo " ";
echo '
';