Zeile 18 | Zeile 18 |
---|
require_once MYBB_ADMIN_DIR."inc/functions_themes.php";
$page->extra_header .= "
|
require_once MYBB_ADMIN_DIR."inc/functions_themes.php";
$page->extra_header .= "
|
<script language=\"Javascript\" type=\"text/javascript\">
| <script type=\"text/javascript\">
|
//<![CDATA[ var save_changes_lang_string = '{$lang->save_changes_js}'; var delete_lang_string = '{$lang->delete}';
| //<![CDATA[ var save_changes_lang_string = '{$lang->save_changes_js}'; var delete_lang_string = '{$lang->delete}';
|
Zeile 340 | Zeile 340 |
---|
$properties = unserialize($theme['properties']); $xml = "<?xml version=\"1.0\" encoding=\"{$lang->settings['charset']}\"?".">\r\n";
|
$properties = unserialize($theme['properties']); $xml = "<?xml version=\"1.0\" encoding=\"{$lang->settings['charset']}\"?".">\r\n";
|
$xml .= "<theme name=\"".$theme['name']."\" version=\"".$mybb->version_code."\">\r\n";
| $xml .= "<theme name=\"".htmlspecialchars_uni($theme['name'])."\" version=\"".$mybb->version_code."\">\r\n";
|
$xml .= "\t<properties>\r\n"; foreach($properties as $property => $value) {
| $xml .= "\t<properties>\r\n"; foreach($properties as $property => $value) {
|
Zeile 467 | Zeile 467 |
---|
$theme['name'] = rawurlencode($theme['name']); header("Content-disposition: attachment; filename=".$theme['name']."-theme.xml");
|
$theme['name'] = rawurlencode($theme['name']); header("Content-disposition: attachment; filename=".$theme['name']."-theme.xml");
|
header("Content-Length: ".my_strlen($xml));
| |
header("Content-type: application/octet-stream");
|
header("Content-type: application/octet-stream");
|
| header("Content-Length: ".strlen($xml));
|
header("Pragma: no-cache"); header("Expires: 0"); echo $xml;
| header("Pragma: no-cache"); header("Expires: 0"); echo $xml;
|
Zeile 1103 | Zeile 1103 |
---|
$stylesheets[basename($file)] = $stylesheet2; }
|
$stylesheets[basename($file)] = $stylesheet2; }
|
$this_stylesheet = $stylesheets[$stylesheet['cachefile']];
| if(!array_key_exists($stylesheet['cachefile'], $stylesheets) && array_key_exists("css.php?stylesheet=".$stylesheet['tid'], $stylesheets)) { $stylesheet['cachefile'] = "css.php?stylesheet=".$stylesheet['tid']; } $this_stylesheet = $stylesheets[$stylesheet['cachefile']];
|
unset($stylesheets); if($mybb->request_method == "post")
| unset($stylesheets); if($mybb->request_method == "post")
|
Zeile 1122 | Zeile 1127 |
---|
} $attached = array();
|
} $attached = array();
|
|
|
if($mybb->input['attach'] == 1) { // Our stylesheet is attached to custom pages in MyBB
| if($mybb->input['attach'] == 1) { // Our stylesheet is attached to custom pages in MyBB
|
Zeile 1140 | Zeile 1145 |
---|
{ // We have custom actions for attached files $actions_list = $mybb->input['action_list_'.$attached_id];
|
{ // We have custom actions for attached files $actions_list = $mybb->input['action_list_'.$attached_id];
|
}
| }
|
if($actions_list) { $attached_to .= "?".$actions_list;
| if($actions_list) { $attached_to .= "?".$actions_list;
|
Zeile 1151 | Zeile 1156 |
---|
} } }
|
} } }
|
|
|
// Update Stylesheet $update_array = array( 'name' => $db->escape_string($mybb->input['name']),
|
// Update Stylesheet $update_array = array( 'name' => $db->escape_string($mybb->input['name']),
|
'attachedto' => $db->escape_string(implode('|', $attached)), 'lastmodified' => TIME_NOW
| 'attachedto' => $db->escape_string(implode('|', $attached))
|
);
|
);
|
if($stylesheet['name'] != $mybb->input['name']) {
| if($stylesheet['name'] != $mybb->input['name']) {
|
$update_array['cachefile'] = $db->escape_string(str_replace('/', '', $mybb->input['name'])); }
| $update_array['cachefile'] = $db->escape_string(str_replace('/', '', $mybb->input['name'])); }
|
Zeile 1169 | Zeile 1173 |
---|
// If the name changed, re-cache our stylesheet if($stylesheet['name'] != $mybb->input['name']) {
|
// If the name changed, re-cache our stylesheet if($stylesheet['name'] != $mybb->input['name']) {
|
| $db->update_query("themestylesheets", array('lastmodified' => TIME_NOW), "sid='{$stylesheet['sid']}'", 1);
|
if(!cache_stylesheet($theme['tid'], str_replace('/', '', $mybb->input['name']), $theme['stylesheet'])) { $db->update_query("themestylesheets", array('cachefile' => "css.php?stylesheet={$stylesheet['sid']}"), "sid='{$stylesheet['sid']}'", 1);
| if(!cache_stylesheet($theme['tid'], str_replace('/', '', $mybb->input['name']), $theme['stylesheet'])) { $db->update_query("themestylesheets", array('cachefile' => "css.php?stylesheet={$stylesheet['sid']}"), "sid='{$stylesheet['sid']}'", 1);
|
Zeile 1251 | Zeile 1256 |
---|
$global_checked[1] = ""; foreach($applied_to as $name => $actions)
|
$global_checked[1] = ""; foreach($applied_to as $name => $actions)
|
{
| {
|
$short_name = substr($name, 0, -4);
$action_list = "";
| $short_name = substr($name, 0, -4);
$action_list = "";
|
Zeile 1308 | Zeile 1313 |
---|
function checkAction(id) { var checked = \'\';
|
function checkAction(id) { var checked = \'\';
|
|
|
$$(\'.\'+id+\'s_check\').each(function(e) { if(e.checked == true)
| $$(\'.\'+id+\'s_check\').each(function(e) { if(e.checked == true)
|
Zeile 1337 | Zeile 1342 |
---|
echo $form->generate_hidden_field("file", htmlspecialchars_uni($stylesheet['name']))."<br />\n"; echo $form->generate_hidden_field("tid", $theme['tid'])."<br />\n";
|
echo $form->generate_hidden_field("file", htmlspecialchars_uni($stylesheet['name']))."<br />\n"; echo $form->generate_hidden_field("tid", $theme['tid'])."<br />\n";
|
|
|
$form_container = new FormContainer("{$lang->edit_stylesheet_properties_for} ".htmlspecialchars_uni($stylesheet['name'])); $form_container->output_row($lang->file_name, $lang->file_name_desc, $form->generate_text_box('name', $mybb->input['name'], array('id' => 'name', 'style' => 'width: 200px;')), 'name');
|
$form_container = new FormContainer("{$lang->edit_stylesheet_properties_for} ".htmlspecialchars_uni($stylesheet['name'])); $form_container->output_row($lang->file_name, $lang->file_name_desc, $form->generate_text_box('name', $mybb->input['name'], array('id' => 'name', 'style' => 'width: 200px;')), 'name');
|
$form_container->output_row($lang->attached_to, $lang->attached_to_desc, $actions);
| $form_container->output_row($lang->attached_to, $lang->attached_to_desc, $actions);
|
$form_container->end(); $buttons[] = $form->generate_submit_button($lang->save_stylesheet_properties);
| $form_container->end(); $buttons[] = $form->generate_submit_button($lang->save_stylesheet_properties);
|
Zeile 1351 | Zeile 1356 |
---|
echo '<script type="text/javascript" src="./jscripts/themes.js"></script>'; echo '<script type="text/javascript">
|
echo '<script type="text/javascript" src="./jscripts/themes.js"></script>'; echo '<script type="text/javascript">
|
|
|
Event.observe(window, "load", function() { //<![CDATA[ new ThemeSelector(\''.$count.'\'); }); //]]> </script>';
|
Event.observe(window, "load", function() { //<![CDATA[ new ThemeSelector(\''.$count.'\'); }); //]]> </script>';
|
|
|
$form->end();
|
$form->end();
|
|
|
$page->output_footer(); }
// Shows the page where you can actually edit a particular selector or the whole stylesheet if($mybb->input['action'] == "edit_stylesheet" && (!$mybb->input['mode'] || $mybb->input['mode'] == "simple"))
|
$page->output_footer(); }
// Shows the page where you can actually edit a particular selector or the whole stylesheet if($mybb->input['action'] == "edit_stylesheet" && (!$mybb->input['mode'] || $mybb->input['mode'] == "simple"))
|
{ // Fetch the theme we want to edit this stylesheet in $query = $db->simple_select("themes", "*", "tid='".intval($mybb->input['tid'])."'"); $theme = $db->fetch_array($query); if(!$theme['tid']) { flash_message($lang->error_invalid_theme, 'error'); admin_redirect("index.php?module=style/themes"); } $parent_list = make_parent_theme_list($theme['tid']); $parent_list = implode(',', $parent_list); if(!$parent_list) { $parent_list = 1; } $query = $db->simple_select("themestylesheets", "*", "name='".$db->escape_string($mybb->input['file'])."' AND tid IN ({$parent_list})", array('order_by' => 'tid', 'order_dir' => 'desc', 'limit' => 1)); $stylesheet = $db->fetch_array($query); // Does the theme not exist? if(!$stylesheet['sid']) { flash_message($lang->error_invalid_stylesheet, 'error'); admin_redirect("index.php?module=style/themes"); }
if($mybb->request_method == "post") { $sid = $stylesheet['sid'];
| { // Fetch the theme we want to edit this stylesheet in $query = $db->simple_select("themes", "*", "tid='".intval($mybb->input['tid'])."'"); $theme = $db->fetch_array($query); if(!$theme['tid']) { flash_message($lang->error_invalid_theme, 'error'); admin_redirect("index.php?module=style/themes"); } $parent_list = make_parent_theme_list($theme['tid']); $parent_list = implode(',', $parent_list); if(!$parent_list) { $parent_list = 1; } $query = $db->simple_select("themestylesheets", "*", "name='".$db->escape_string($mybb->input['file'])."' AND tid IN ({$parent_list})", array('order_by' => 'tid', 'order_dir' => 'desc', 'limit' => 1)); $stylesheet = $db->fetch_array($query); // Does the theme not exist? if(!$stylesheet['sid']) { flash_message($lang->error_invalid_stylesheet, 'error'); admin_redirect("index.php?module=style/themes"); }
if($mybb->request_method == "post") { $sid = $stylesheet['sid'];
|
// Theme & stylesheet theme ID do not match, editing inherited - we copy to local theme if($theme['tid'] != $stylesheet['tid'])
|
// Theme & stylesheet theme ID do not match, editing inherited - we copy to local theme if($theme['tid'] != $stylesheet['tid'])
|
{
| {
|
$sid = copy_stylesheet_to_theme($stylesheet, $theme['tid']);
|
$sid = copy_stylesheet_to_theme($stylesheet, $theme['tid']);
|
}
| }
|
// Insert the modified CSS $new_stylesheet = $stylesheet['stylesheet'];
| // Insert the modified CSS $new_stylesheet = $stylesheet['stylesheet'];
|
Zeile 1416 | Zeile 1421 |
---|
foreach($mybb->input['css_bits'] as $field => $value) { if(!trim($value) || !trim($field))
|
foreach($mybb->input['css_bits'] as $field => $value) { if(!trim($value) || !trim($field))
|
{
| {
|
continue; }
| continue; }
|
Zeile 1435 | Zeile 1440 |
---|
// Now we have the new stylesheet, save it $updated_stylesheet = array(
|
// Now we have the new stylesheet, save it $updated_stylesheet = array(
|
| "cachefile" => $db->escape_string($stylesheet['name']),
|
"stylesheet" => $db->escape_string(unfix_css_urls($new_stylesheet)), "lastmodified" => TIME_NOW );
| "stylesheet" => $db->escape_string(unfix_css_urls($new_stylesheet)), "lastmodified" => TIME_NOW );
|
Zeile 1469 | Zeile 1475 |
---|
{ echo "1"; exit;
|
{ echo "1"; exit;
|
} }
| } }
|
// Has the file on the file system been modified? if(resync_stylesheet($stylesheet))
|
// Has the file on the file system been modified? if(resync_stylesheet($stylesheet))
|
{
| {
|
// Need to refetch new stylesheet as it was modified $query = $db->simple_select("themestylesheets", "stylesheet", "sid='{$stylesheet['sid']}'"); $stylesheet['stylesheet'] = $db->fetch_field($query, 'stylesheet');
| // Need to refetch new stylesheet as it was modified $query = $db->simple_select("themestylesheets", "stylesheet", "sid='{$stylesheet['sid']}'"); $stylesheet['stylesheet'] = $db->fetch_field($query, 'stylesheet');
|
Zeile 1489 | Zeile 1495 |
---|
flash_message($lang->error_cannot_parse, 'error'); admin_redirect("index.php?module=style/themes&action=edit_stylesheet&tid={$theme['tid']}&file=".htmlspecialchars_uni($stylesheet['name'])."&mode=advanced"); exit;
|
flash_message($lang->error_cannot_parse, 'error'); admin_redirect("index.php?module=style/themes&action=edit_stylesheet&tid={$theme['tid']}&file=".htmlspecialchars_uni($stylesheet['name'])."&mode=advanced"); exit;
|
}
| }
|
// Fetch list of all of the stylesheets for this theme $file_stylesheets = unserialize($theme['stylesheets']);
| // Fetch list of all of the stylesheets for this theme $file_stylesheets = unserialize($theme['stylesheets']);
|
Zeile 1501 | Zeile 1507 |
---|
foreach($file_stylesheets as $file => $action_stylesheet) { if($file == 'inherited')
|
foreach($file_stylesheets as $file => $action_stylesheet) { if($file == 'inherited')
|
{
| {
|
continue; } foreach($action_stylesheet as $action => $style) { foreach($style as $stylesheet2)
|
continue; } foreach($action_stylesheet as $action => $style) { foreach($style as $stylesheet2)
|
{
| {
|
$stylesheets[$stylesheet2]['applied_to'][$file][] = $action; if(is_array($file_stylesheets['inherited'][$file."_".$action]) && in_array($stylesheet2, array_keys($file_stylesheets['inherited'][$file."_".$action]))) {
| $stylesheets[$stylesheet2]['applied_to'][$file][] = $action; if(is_array($file_stylesheets['inherited'][$file."_".$action]) && in_array($stylesheet2, array_keys($file_stylesheets['inherited'][$file."_".$action]))) {
|
Zeile 1544 | Zeile 1550 |
---|
<script type=\"text/javascript\"> var my_post_key = '".$mybb->post_code."'; </script>";
|
<script type=\"text/javascript\"> var my_post_key = '".$mybb->post_code."'; </script>";
|
|
|
$page->add_breadcrumb_item(htmlspecialchars_uni($theme['name']), "index.php?module=style/themes&action=edit&tid={$mybb->input['tid']}"); $page->add_breadcrumb_item("{$lang->editing} ".htmlspecialchars_uni($stylesheet['name']), "index.php?module=style/themes&action=edit_stylesheet&tid={$mybb->input['tid']}&file=".htmlspecialchars_uni($mybb->input['file'])."&mode=simple");
| $page->add_breadcrumb_item(htmlspecialchars_uni($theme['name']), "index.php?module=style/themes&action=edit&tid={$mybb->input['tid']}"); $page->add_breadcrumb_item("{$lang->editing} ".htmlspecialchars_uni($stylesheet['name']), "index.php?module=style/themes&action=edit_stylesheet&tid={$mybb->input['tid']}&file=".htmlspecialchars_uni($mybb->input['file'])."&mode=simple");
|
Zeile 1617 | Zeile 1623 |
---|
$table = new Table; $table->construct_cell("<div style=\"float: right;\">".$form->generate_text_box('css_bits[background]', $properties['background'], array('id' => 'css_bits[background]', 'style' => 'width: 260px;'))."</div><div><strong>{$lang->background}</strong></div>", array('style' => 'width: 20%;')); $table->construct_cell("<strong>{$lang->extra_css_atribs}</strong><br /><div style=\"align: center;\">".$form->generate_text_area('css_bits[extra]', $properties['extra'], array('id' => 'css_bits[extra]', 'style' => 'width: 98%;', 'rows' => '19'))."</div>", array('rowspan' => 8));
|
$table = new Table; $table->construct_cell("<div style=\"float: right;\">".$form->generate_text_box('css_bits[background]', $properties['background'], array('id' => 'css_bits[background]', 'style' => 'width: 260px;'))."</div><div><strong>{$lang->background}</strong></div>", array('style' => 'width: 20%;')); $table->construct_cell("<strong>{$lang->extra_css_atribs}</strong><br /><div style=\"align: center;\">".$form->generate_text_area('css_bits[extra]', $properties['extra'], array('id' => 'css_bits[extra]', 'style' => 'width: 98%;', 'rows' => '19'))."</div>", array('rowspan' => 8));
|
$table->construct_row();
| $table->construct_row();
|
$table->construct_cell("<div style=\"float: right;\">".$form->generate_text_box('css_bits[color]', $properties['color'], array('id' => 'css_bits[color]', 'style' => 'width: 260px;'))."</div><div><strong>{$lang->color}</strong></div>", array('style' => 'width: 40%;')); $table->construct_row(); $table->construct_cell("<div style=\"float: right;\">".$form->generate_text_box('css_bits[width]', $properties['width'], array('id' => 'css_bits[width]', 'style' => 'width: 260px;'))."</div><div><strong>{$lang->width}</strong></div>", array('style' => 'width: 40%;'));
| $table->construct_cell("<div style=\"float: right;\">".$form->generate_text_box('css_bits[color]', $properties['color'], array('id' => 'css_bits[color]', 'style' => 'width: 260px;'))."</div><div><strong>{$lang->color}</strong></div>", array('style' => 'width: 40%;')); $table->construct_row(); $table->construct_cell("<div style=\"float: right;\">".$form->generate_text_box('css_bits[width]', $properties['width'], array('id' => 'css_bits[width]', 'style' => 'width: 260px;'))."</div><div><strong>{$lang->width}</strong></div>", array('style' => 'width: 40%;'));
|
Zeile 1626 | Zeile 1632 |
---|
$table->construct_row(); $table->construct_cell("<div style=\"float: right;\">".$form->generate_text_box('css_bits[font_size]', $properties['font-size'], array('id' => 'css_bits[font_size]', 'style' => 'width: 260px;'))."</div><div><strong>{$lang->font_size}</strong></div>", array('style' => 'width: 40%;')); $table->construct_row();
|
$table->construct_row(); $table->construct_cell("<div style=\"float: right;\">".$form->generate_text_box('css_bits[font_size]', $properties['font-size'], array('id' => 'css_bits[font_size]', 'style' => 'width: 260px;'))."</div><div><strong>{$lang->font_size}</strong></div>", array('style' => 'width: 40%;')); $table->construct_row();
|
$table->construct_cell("<div style=\"float: right;\">".$form->generate_text_box('css_bits[font_style]', $properties['font-style'], array('id' => 'css_bits[font_style]', 'style' => 'width: 260px;'))."</div><div><strong>{$lang->font_style}</strong></div>", array('style' => 'width: 40%;')); $table->construct_row(); $table->construct_cell("<div style=\"float: right;\">".$form->generate_text_box('css_bits[font_weight]', $properties['font-weight'], array('id' => 'css_bits[font_weight]', 'style' => 'width: 260px;'))."</div><div><strong>{$lang->font_weight}</strong></div>", array('style' => 'width: 40%;'));
| $table->construct_cell("<div style=\"float: right;\">".$form->generate_text_box('css_bits[font_style]', $properties['font-style'], array('id' => 'css_bits[font_style]', 'style' => 'width: 260px;'))."</div><div><strong>{$lang->font_style}</strong></div>", array('style' => 'width: 40%;')); $table->construct_row(); $table->construct_cell("<div style=\"float: right;\">".$form->generate_text_box('css_bits[font_weight]', $properties['font-weight'], array('id' => 'css_bits[font_weight]', 'style' => 'width: 260px;'))."</div><div><strong>{$lang->font_weight}</strong></div>", array('style' => 'width: 40%;'));
|
$table->construct_row(); $table->construct_cell("<div style=\"float: right;\">".$form->generate_text_box('css_bits[text_decoration]', $properties['text-decoration'], array('id' => 'css_bits[text_decoration]', 'style' => 'width: 260px;'))."</div><div><strong>{$lang->text_decoration}</strong></div>", array('style' => 'width: 40%;')); $table->construct_row();
|
$table->construct_row(); $table->construct_cell("<div style=\"float: right;\">".$form->generate_text_box('css_bits[text_decoration]', $properties['text-decoration'], array('id' => 'css_bits[text_decoration]', 'style' => 'width: 260px;'))."</div><div><strong>{$lang->text_decoration}</strong></div>", array('style' => 'width: 40%;')); $table->construct_row();
|
|
|
$table->output(htmlspecialchars_uni($editable_selector['class_name'])."<span id=\"saved\" style=\"color: #FEE0C6;\"></span>"); echo "</div>";
|
$table->output(htmlspecialchars_uni($editable_selector['class_name'])."<span id=\"saved\" style=\"color: #FEE0C6;\"></span>"); echo "</div>";
|
|
|
$buttons[] = $form->generate_reset_button($lang->reset); $buttons[] = $form->generate_submit_button($lang->save_changes, array('id' => 'save', 'name' => 'save')); $buttons[] = $form->generate_submit_button($lang->save_changes_and_close, array('id' => 'save_close', 'name' => 'save_close'));
| $buttons[] = $form->generate_reset_button($lang->reset); $buttons[] = $form->generate_submit_button($lang->save_changes, array('id' => 'save', 'name' => 'save')); $buttons[] = $form->generate_submit_button($lang->save_changes_and_close, array('id' => 'save_close', 'name' => 'save_close'));
|
Zeile 1645 | Zeile 1651 |
---|
echo '<script type="text/javascript" src="./jscripts/themes.js"></script>'; echo '<script type="text/javascript">
|
echo '<script type="text/javascript" src="./jscripts/themes.js"></script>'; echo '<script type="text/javascript">
|
|
|
Event.observe(window, "load", function() { //<![CDATA[ new ThemeSelector("./index.php?module=style/themes&action=xmlhttp_stylesheet", "./index.php?module=style/themes&action=edit_stylesheet", $("selector"), $("stylesheet"), "'.htmlspecialchars_uni($mybb->input['file']).'", $("selector_form"), "'.$mybb->input['tid'].'");
| Event.observe(window, "load", function() { //<![CDATA[ new ThemeSelector("./index.php?module=style/themes&action=xmlhttp_stylesheet", "./index.php?module=style/themes&action=edit_stylesheet", $("selector"), $("stylesheet"), "'.htmlspecialchars_uni($mybb->input['file']).'", $("selector_form"), "'.$mybb->input['tid'].'");
|
Zeile 1654 | Zeile 1660 |
---|
</script>';
$form->end();
|
</script>';
$form->end();
|
|
|
$page->output_footer(); }
| $page->output_footer(); }
|
Zeile 1690 | Zeile 1696 |
---|
if($mybb->request_method == "post") { $sid = $stylesheet['sid'];
|
if($mybb->request_method == "post") { $sid = $stylesheet['sid'];
|
|
|
// Theme & stylesheet theme ID do not match, editing inherited - we copy to local theme if($theme['tid'] != $stylesheet['tid']) {
| // Theme & stylesheet theme ID do not match, editing inherited - we copy to local theme if($theme['tid'] != $stylesheet['tid']) {
|
Zeile 1699 | Zeile 1705 |
---|
// Now we have the new stylesheet, save it $updated_stylesheet = array(
|
// Now we have the new stylesheet, save it $updated_stylesheet = array(
|
| "cachefile" => $db->escape_string($stylesheet['name']),
|
"stylesheet" => $db->escape_string(unfix_css_urls($mybb->input['stylesheet'])), "lastmodified" => TIME_NOW );
| "stylesheet" => $db->escape_string(unfix_css_urls($mybb->input['stylesheet'])), "lastmodified" => TIME_NOW );
|
Zeile 1725 | Zeile 1732 |
---|
else { admin_redirect("index.php?module=style/themes&action=edit&tid={$theme['tid']}");
|
else { admin_redirect("index.php?module=style/themes&action=edit&tid={$theme['tid']}");
|
}
| }
|
}
|
}
|
|
|
// Fetch list of all of the stylesheets for this theme $file_stylesheets = unserialize($theme['stylesheets']);
|
// Fetch list of all of the stylesheets for this theme $file_stylesheets = unserialize($theme['stylesheets']);
|
|
|
$stylesheets = array(); $inherited_load = array(); // Now we loop through the list of stylesheets for each file foreach($file_stylesheets as $file => $action_stylesheet)
|
$stylesheets = array(); $inherited_load = array(); // Now we loop through the list of stylesheets for each file foreach($file_stylesheets as $file => $action_stylesheet)
|
{
| {
|
if($file == 'inherited') { continue;
| if($file == 'inherited') { continue;
|
Zeile 1777 | Zeile 1784 |
---|
$this_stylesheet = $stylesheets[$stylesheet['name']]; unset($stylesheets);
|
$this_stylesheet = $stylesheets[$stylesheet['name']]; unset($stylesheets);
|
$page->extra_header .= '
| if($admin_options['codepress'] != 0) { $page->extra_header .= '
|
<link type="text/css" href="./jscripts/codepress/languages/codepress-css.css" rel="stylesheet" id="cp-lang-style" /> <script type="text/javascript" src="./jscripts/codepress/codepress.js"></script> <script type="text/javascript"> CodePress.language = \'css\'; </script>';
|
<link type="text/css" href="./jscripts/codepress/languages/codepress-css.css" rel="stylesheet" id="cp-lang-style" /> <script type="text/javascript" src="./jscripts/codepress/codepress.js"></script> <script type="text/javascript"> CodePress.language = \'css\'; </script>';
|
| }
|
$page->add_breadcrumb_item(htmlspecialchars_uni($theme['name']), "index.php?module=style/themes&action=edit&tid={$mybb->input['tid']}"); $page->add_breadcrumb_item("{$lang->editing} ".htmlspecialchars_uni($stylesheet['name']), "index.php?module=style/themes&action=edit_stylesheet&tid={$mybb->input['tid']}&file=".htmlspecialchars_uni($mybb->input['file'])."&mode=advanced");
| $page->add_breadcrumb_item(htmlspecialchars_uni($theme['name']), "index.php?module=style/themes&action=edit&tid={$mybb->input['tid']}"); $page->add_breadcrumb_item("{$lang->editing} ".htmlspecialchars_uni($stylesheet['name']), "index.php?module=style/themes&action=edit_stylesheet&tid={$mybb->input['tid']}&file=".htmlspecialchars_uni($mybb->input['file'])."&mode=advanced");
|
Zeile 1844 | Zeile 1854 |
---|
$form->end();
|
$form->end();
|
echo "<script language=\"Javascript\" type=\"text/javascript\">
| if($admin_options['codepress'] != 0) { echo "<script type=\"text/javascript\">
|
Event.observe('edit_stylesheet', 'submit', function() { if($('stylesheet_cp')) {
| Event.observe('edit_stylesheet', 'submit', function() { if($('stylesheet_cp')) {
|
Zeile 1855 | Zeile 1867 |
---|
} }); </script>";
|
} }); </script>";
|
| }
|
$page->output_footer(); }
| $page->output_footer(); }
|
Zeile 2055 | Zeile 2068 |
---|
} }
|
} }
|
$page->extra_header .= '
| if($admin_options['codepress'] != 0) { $page->extra_header .= '
|
<link type="text/css" href="./jscripts/codepress/languages/codepress-css.css" rel="stylesheet" id="cp-lang-style" /> <script type="text/javascript" src="./jscripts/codepress/codepress.js"></script> <script type="text/javascript"> CodePress.language = \'css\'; </script>';
|
<link type="text/css" href="./jscripts/codepress/languages/codepress-css.css" rel="stylesheet" id="cp-lang-style" /> <script type="text/javascript" src="./jscripts/codepress/codepress.js"></script> <script type="text/javascript"> CodePress.language = \'css\'; </script>';
|
| }
|
$page->add_breadcrumb_item(htmlspecialchars_uni($theme['name']), "index.php?module=style/themes&action=edit&tid={$mybb->input['tid']}");
|
$page->add_breadcrumb_item(htmlspecialchars_uni($theme['name']), "index.php?module=style/themes&action=edit&tid={$mybb->input['tid']}");
|
$page->add_breadcrumb_item("Add Stylesheet");
| $page->add_breadcrumb_item($lang->add_stylesheet);
|
$page->output_header("{$lang->themes} - {$lang->add_stylesheet}");
| $page->output_header("{$lang->themes} - {$lang->add_stylesheet}");
|
Zeile 2252 | Zeile 2268 |
---|
$form->output_submit_wrapper($buttons);
|
$form->output_submit_wrapper($buttons);
|
echo "<script language=\"Javascript\" type=\"text/javascript\">
| if($admin_options['codepress'] != 0) { echo "<script type=\"text/javascript\">
|
Event.observe('add_stylesheet', 'submit', function() { if($('stylesheet_cp')) {
| Event.observe('add_stylesheet', 'submit', function() { if($('stylesheet_cp')) {
|
Zeile 2263 | Zeile 2281 |
---|
} }); </script>\n";
|
} }); </script>\n";
|
| }
|
echo '<script type="text/javascript" src="./jscripts/themes.js"></script>'; echo '<script type="text/javascript"> Event.observe(window, "load", function() {
| echo '<script type="text/javascript" src="./jscripts/themes.js"></script>'; echo '<script type="text/javascript"> Event.observe(window, "load", function() {
|
Zeile 2273 | Zeile 2292 |
---|
}); //]]> </script>';
|
}); //]]> </script>';
|
|
|
$form->end(); $page->output_footer();
| $form->end(); $page->output_footer();
|
Zeile 2281 | Zeile 2300 |
---|
if($mybb->input['action'] == "set_default") {
|
if($mybb->input['action'] == "set_default") {
|
| if(!verify_post_check($mybb->input['my_post_key'])) { flash_message($lang->invalid_post_verify_key2, 'error'); admin_redirect("index.php?module=style/themes"); }
|
$query = $db->simple_select("themes", "*", "tid='".intval($mybb->input['tid'])."'"); $theme = $db->fetch_array($query);
| $query = $db->simple_select("themes", "*", "tid='".intval($mybb->input['tid'])."'"); $theme = $db->fetch_array($query);
|