Zeile 242 | Zeile 242 |
---|
$sid = -1; }
|
$sid = -1; }
|
| $template['title'] = "";
|
$template['template'] = ""; $template['sid'] = $sid; }
| $template['template'] = ""; $template['sid'] = $sid; }
|
Zeile 389 | Zeile 390 |
---|
} }
|
} }
|
if($mybb->input['sid'])
| if(!empty($mybb->input['sid']))
|
{ $page->add_breadcrumb_item($template_sets[$sid], "index.php?module=style-templates&sid={$sid}{$expand_str}");
|
{ $page->add_breadcrumb_item($template_sets[$sid], "index.php?module=style-templates&sid={$sid}{$expand_str}");
|
}
| }
|
$page->add_breadcrumb_item($lang->add_template_group); $page->output_header($lang->add_template_group); $page->output_nav_tabs($sub_tabs, 'add_template_group');
|
$page->add_breadcrumb_item($lang->add_template_group); $page->output_header($lang->add_template_group); $page->output_nav_tabs($sub_tabs, 'add_template_group');
|
| $template_group = array();
|
if($errors)
|
if($errors)
|
{
| {
|
$template_group = array( 'prefix' => $prefix, 'title' => $title
|
$template_group = array( 'prefix' => $prefix, 'title' => $title
|
);
| );
|
$page->output_inline_error($errors);
|
$page->output_inline_error($errors);
|
| } else { $template_group = array( 'prefix' => null, 'title' => null, );
|
}
$form = new Form("index.php?module=style-templates&action=add_template_group{$expand_str}", "post", "add_template_group");
| }
$form = new Form("index.php?module=style-templates&action=add_template_group{$expand_str}", "post", "add_template_group");
|
Zeile 487 | Zeile 496 |
---|
{ $query = $db->simple_select("templatesets", "title", "sid='{$sid}'"); $mybb->input['title'] = $db->fetch_field($query, "title");
|
{ $query = $db->simple_select("templatesets", "title", "sid='{$sid}'"); $mybb->input['title'] = $db->fetch_field($query, "title");
|
}
| }
|
$form = new Form("index.php?module=style-templates&action=edit_set{$expand_str}", "post", "edit_set"); echo $form->generate_hidden_field("sid", $sid);
$form_container = new FormContainer($lang->edit_set); $form_container->output_row($lang->title, "", $form->generate_text_box('title', $mybb->input['title'], array('id' => 'title')), 'title'); $form_container->end();
|
$form = new Form("index.php?module=style-templates&action=edit_set{$expand_str}", "post", "edit_set"); echo $form->generate_hidden_field("sid", $sid);
$form_container = new FormContainer($lang->edit_set); $form_container->output_row($lang->title, "", $form->generate_text_box('title', $mybb->input['title'], array('id' => 'title')), 'title'); $form_container->end();
|
|
|
$buttons = array(); $buttons[] = $form->generate_submit_button($lang->save);
|
$buttons = array(); $buttons[] = $form->generate_submit_button($lang->save);
|
|
|
$form->output_submit_wrapper($buttons);
$form->end();
| $form->output_submit_wrapper($buttons);
$form->end();
|
Zeile 513 | Zeile 522 |
---|
flash_message($lang->error_missing_input, 'error'); admin_redirect("index.php?module=style-templates"); }
|
flash_message($lang->error_missing_input, 'error'); admin_redirect("index.php?module=style-templates"); }
|
|
|
$plugins->run_hooks("admin_style_templates_edit_template");
if($mybb->request_method == "post")
| $plugins->run_hooks("admin_style_templates_edit_template");
if($mybb->request_method == "post")
|
Zeile 588 | Zeile 597 |
---|
}
// Log admin action
|
}
// Log admin action
|
log_admin_action($template['tid'], $mybb->input['title'], $mybb->input['sid'], $set['title']);
| if(!empty($set['title'])) { $title = $set['title']; } else { $title = null; }
log_admin_action($template['tid'], $mybb->get_input('title'), $mybb->get_input('sid'), $title);
|
flash_message($lang->success_template_saved, 'success');
|
flash_message($lang->success_template_saved, 'success');
|
if($mybb->input['continue'])
| if($mybb->get_input('continue'))
|
{
|
{
|
if($mybb->input['from'] == "diff_report")
| if($mybb->get_input('from') == "diff_report")
|
{ admin_redirect("index.php?module=style-templates&action=edit_template&title=".urlencode($mybb->input['title'])."&sid=".$mybb->get_input('sid', MyBB::INPUT_INT).$expand_str2."&from=diff_report"); }
| { admin_redirect("index.php?module=style-templates&action=edit_template&title=".urlencode($mybb->input['title'])."&sid=".$mybb->get_input('sid', MyBB::INPUT_INT).$expand_str2."&from=diff_report"); }
|
Zeile 605 | Zeile 623 |
---|
} else {
|
} else {
|
if($mybb->input['from'] == "diff_report")
| if($mybb->get_input('from') == "diff_report")
|
{ admin_redirect("index.php?module=style-templates&action=find_updated"); }
| { admin_redirect("index.php?module=style-templates&action=find_updated"); }
|
Zeile 677 | Zeile 695 |
---|
$sub_tabs['diff_report'] = array( 'title' => $lang->diff_report,
|
$sub_tabs['diff_report'] = array( 'title' => $lang->diff_report,
|
'link' => "index.php?module=style-templates&action=diff_report&title=".$db->escape_string($template['title'])."&sid1=".(int)$template['sid']."&sid2=-2",
| 'link' => "index.php?module=style-templates&action=diff_report&title=".urlencode($template['title'])."&sid1=".(int)$template['sid']."&sid2=-2",
|
); }
| ); }
|
Zeile 990 | Zeile 1008 |
---|
} }
|
} }
|
$table->construct_cell($label, array("width" => "85%"));
| $table->construct_cell(htmlspecialchars_uni($label), array("width" => "85%"));
|
if($sid == -2) {
| if($sid == -2) {
|
Zeile 1117 | Zeile 1135 |
---|
foreach($templates as $template) {
|
foreach($templates as $template) {
|
$template['pretty_title'] = $template['title'];
| $template['pretty_title'] = htmlspecialchars_uni($template['title']);
|
$popup = new PopupMenu("template_{$template['tid']}", $lang->options);
| $popup = new PopupMenu("template_{$template['tid']}", $lang->options);
|
Zeile 1144 | Zeile 1162 |
---|
$popup->add_item($lang->revert_to_orig, "index.php?module=style-templates&action=revert&title=".urlencode($template['title'])."&sid={$sid}&my_post_key={$mybb->post_code}", "return AdminCP.deleteConfirmation(this, '{$lang->confirm_template_revertion}')"); }
|
$popup->add_item($lang->revert_to_orig, "index.php?module=style-templates&action=revert&title=".urlencode($template['title'])."&sid={$sid}&my_post_key={$mybb->post_code}", "return AdminCP.deleteConfirmation(this, '{$lang->confirm_template_revertion}')"); }
|
$template['pretty_title'] = "<span style=\"color: green;\">{$template['title']}</span>";
| $template['pretty_title'] = "<span style=\"color: green;\">".htmlspecialchars_uni($template['title'])."</span>";
|
} // This template does not exist in the master list else if(!isset($template['original']) || $template['original'] == false) { $popup->add_item($lang->delete_template, "index.php?module=style-templates&action=delete_template&title=".urlencode($template['title'])."&sid={$sid}&my_post_key={$mybb->post_code}", "return AdminCP.deleteConfirmation(this, '{$lang->confirm_template_deletion}')");
|
} // This template does not exist in the master list else if(!isset($template['original']) || $template['original'] == false) { $popup->add_item($lang->delete_template, "index.php?module=style-templates&action=delete_template&title=".urlencode($template['title'])."&sid={$sid}&my_post_key={$mybb->post_code}", "return AdminCP.deleteConfirmation(this, '{$lang->confirm_template_deletion}')");
|
$template['pretty_title'] = "<span style=\"color: blue;\">{$template['title']}</span>";
| $template['pretty_title'] = "<span style=\"color: blue;\">".htmlspecialchars_uni($template['title'])."</span>";
|
}
$table->construct_cell("<span style=\"padding: 20px;\">{$template['pretty_title']}</span>", array("width" => "85%"));
| }
$table->construct_cell("<span style=\"padding: 20px;\">{$template['pretty_title']}</span>", array("width" => "85%"));
|
Zeile 1207 | Zeile 1225 |
---|
echo $form->generate_hidden_field('type', "templates");
$form_container = new FormContainer($lang->search_replace, 'tfixed');
|
echo $form->generate_hidden_field('type', "templates");
$form_container = new FormContainer($lang->search_replace, 'tfixed');
|
$form_container->output_row($lang->search_for, "", $form->generate_text_area('find', $mybb->input['find'], array('id' => 'find', 'class' => '', 'style' => 'width: 100%; height: 200px;')));
| $form_container->output_row($lang->search_for, "", $form->generate_text_area('find', $mybb->get_input('find'), array('id' => 'find', 'class' => '', 'style' => 'width: 100%; height: 200px;')));
|
|
|
$form_container->output_row($lang->replace_with, "", $form->generate_text_area('replace', $mybb->input['replace'], array('id' => 'replace', 'class' => '', 'style' => 'width: 100%; height: 200px;')));
| $form_container->output_row($lang->replace_with, "", $form->generate_text_area('replace', $mybb->get_input('replace'), array('id' => 'replace', 'class' => '', 'style' => 'width: 100%; height: 200px;')));
|
$form_container->end();
$buttons[] = $form->generate_submit_button($lang->find_and_replace);
| $form_container->end();
$buttons[] = $form->generate_submit_button($lang->find_and_replace);
|
Zeile 1226 | Zeile 1244 |
---|
$form_container = new FormContainer($lang->search_template_names);
|
$form_container = new FormContainer($lang->search_template_names);
|
$form_container->output_row($lang->search_for, "", $form->generate_text_box('title', $mybb->input['title'], array('id' => 'title')), 'title');
| $form_container->output_row($lang->search_for, "", $form->generate_text_box('title', $mybb->get_input('title'), array('id' => 'title')), 'title');
|
$form_container->end();
| $form_container->end();
|
Zeile 1333 | Zeile 1351 |
---|
foreach($templates as $sid => $templates) {
|
foreach($templates as $sid => $templates) {
|
if(!$done_set[$sid])
| if(empty($done_set[$sid]))
|
{ $table->construct_header(htmlspecialchars_uni($templatesets[$sid]['title']), array("colspan" => 2));
| { $table->construct_header(htmlspecialchars_uni($templatesets[$sid]['title']), array("colspan" => 2));
|
Zeile 1348 | Zeile 1366 |
---|
$popup->add_item($lang->diff_report, "index.php?module=style-templates&action=diff_report&title=".urlencode($template['title'])."&sid1=".$template['sid']."&sid2=-2&from=diff_report"); $popup->add_item($lang->revert_to_orig, "index.php?module=style-templates&action=revert&title=".urlencode($template['title'])."&sid={$sid}&from=diff_report&my_post_key={$mybb->post_code}", "return AdminCP.deleteConfirmation(this, '{$lang->confirm_template_revertion}')");
|
$popup->add_item($lang->diff_report, "index.php?module=style-templates&action=diff_report&title=".urlencode($template['title'])."&sid1=".$template['sid']."&sid2=-2&from=diff_report"); $popup->add_item($lang->revert_to_orig, "index.php?module=style-templates&action=revert&title=".urlencode($template['title'])."&sid={$sid}&from=diff_report&my_post_key={$mybb->post_code}", "return AdminCP.deleteConfirmation(this, '{$lang->confirm_template_revertion}')");
|
$table->construct_cell("<a href=\"index.php?module=style-templates&action=edit_template&title=".urlencode($template['title'])."&sid={$sid}&from=diff_report\">{$template['title']}</a>", array('width' => '80%'));
| $table->construct_cell("<a href=\"index.php?module=style-templates&action=edit_template&title=".urlencode($template['title'])."&sid={$sid}&from=diff_report\">".htmlspecialchars_uni($template['title'])."</a>", array('width' => '80%'));
|
$table->construct_cell($popup->fetch(), array("class" => "align_center"));
$table->construct_row(); }
|
$table->construct_cell($popup->fetch(), array("class" => "align_center"));
$table->construct_row(); }
|
if($done_set[$sid] && !$done_output[$sid])
| if(!empty($done_set[$sid]) && empty($done_output[$sid]))
|
{ $done_output[$sid] = 1; if($count == 1)
| { $done_output[$sid] = 1; if($count == 1)
|
Zeile 1383 | Zeile 1401 |
---|
}
// User clicked no
|
}
// User clicked no
|
if($mybb->input['no'])
| if($mybb->get_input('no'))
|
{ admin_redirect("index.php?module=style-templates&sid={$sid}"); }
| { admin_redirect("index.php?module=style-templates&sid={$sid}"); }
|
Zeile 1439 | Zeile 1457 |
---|
}
// User clicked no
|
}
// User clicked no
|
if($mybb->input['no'])
| if($mybb->get_input('no'))
|
{ admin_redirect("index.php?module=style-templates"); }
| { admin_redirect("index.php?module=style-templates"); }
|
Zeile 1484 | Zeile 1502 |
---|
}
// User clicked no
|
}
// User clicked no
|
if($mybb->input['no'])
| if($mybb->get_input('no'))
|
{ admin_redirect("index.php?module=style-templates&sid={$template['sid']}{$expand_str2}"); }
| { admin_redirect("index.php?module=style-templates&sid={$template['sid']}{$expand_str2}"); }
|
Zeile 1513 | Zeile 1531 |
---|
if($mybb->input['action'] == "diff_report") { // Compares a template of sid1 with that of sid2, if no sid1, it is assumed -2
|
if($mybb->input['action'] == "diff_report") { // Compares a template of sid1 with that of sid2, if no sid1, it is assumed -2
|
if(!$mybb->input['sid1'] || !isset($template_sets[$mybb->input['sid1']]))
| if(empty($mybb->input['sid1']) || !isset($template_sets[$mybb->input['sid1']]))
|
{ $mybb->input['sid1'] = -2; }
| { $mybb->input['sid1'] = -2; }
|
Zeile 1532 | Zeile 1550 |
---|
admin_redirect("index.php?module=style-templates"); }
|
admin_redirect("index.php?module=style-templates"); }
|
if(!$mybb->input['from'])
| if(empty($mybb->input['from']))
|
{ $mybb->input['from'] = 0; }
$sub_tabs['diff_report'] = array( 'title' => $lang->diff_report,
|
{ $mybb->input['from'] = 0; }
$sub_tabs['diff_report'] = array( 'title' => $lang->diff_report,
|
'link' => "index.php?module=style-templates&action=diff_report&title=".$db->escape_string($mybb->input['title'])."&from=".htmlspecialchars_uni($mybb->input['from'])."sid1=".$mybb->get_input('sid1', MyBB::INPUT_INT)."&sid2=".$mybb->get_input('sid2', MyBB::INPUT_INT),
| 'link' => "index.php?module=style-templates&action=diff_report&title=".urlencode($mybb->input['title'])."&from=".htmlspecialchars_uni($mybb->input['from'])."sid1=".$mybb->get_input('sid1', MyBB::INPUT_INT)."&sid2=".$mybb->get_input('sid2', MyBB::INPUT_INT),
|
'description' => $lang->diff_report_desc );
| 'description' => $lang->diff_report_desc );
|
Zeile 1587 | Zeile 1605 |
---|
$page->add_breadcrumb_item($lang->find_updated, "index.php?module=style-templates&action=find_updated"); }
|
$page->add_breadcrumb_item($lang->find_updated, "index.php?module=style-templates&action=find_updated"); }
|
$page->add_breadcrumb_item($lang->diff_report.": ".htmlspecialchars_uni($template1['title']), "index.php?module=style-templates&action=diff_report&title=".$db->escape_string($mybb->input['title'])."&from=".htmlspecialchars_uni($mybb->input['from'])."&sid1=".$mybb->get_input('sid1', MyBB::INPUT_INT)."&sid2=".$mybb->get_input('sid2', MyBB::INPUT_INT));
| $page->add_breadcrumb_item($lang->diff_report.": ".htmlspecialchars_uni($template1['title']), "index.php?module=style-templates&action=diff_report&title=".urlencode($mybb->input['title'])."&from=".htmlspecialchars_uni($mybb->input['from'])."&sid1=".$mybb->get_input('sid1', MyBB::INPUT_INT)."&sid2=".$mybb->get_input('sid2', MyBB::INPUT_INT));
|
$page->output_header($lang->template_sets);
| $page->output_header($lang->template_sets);
|
Zeile 1607 | Zeile 1625 |
---|
$table->construct_cell("<pre class=\"differential\">".$renderer->render($diff)."</pre>"); $table->construct_row();
|
$table->construct_cell("<pre class=\"differential\">".$renderer->render($diff)."</pre>"); $table->construct_row();
|
$table->output($lang->template_diff_analysis.": ".$template1['title']);
| $table->output($lang->template_diff_analysis.": ".htmlspecialchars_uni($template1['title']));
|
$page->output_footer(); }
| $page->output_footer(); }
|
Zeile 1630 | Zeile 1648 |
---|
}
// User clicked no
|
}
// User clicked no
|
if($mybb->input['no'])
| if($mybb->get_input('no'))
|
{ admin_redirect("index.php?module=style-templates&sid={$template['sid']}{$expand_str2}"); }
| { admin_redirect("index.php?module=style-templates&sid={$template['sid']}{$expand_str2}"); }
|
Zeile 1664 | Zeile 1682 |
---|
} }
|
} }
|
if($mybb->input['sid'] && !$mybb->input['action'])
| if(!empty($mybb->input['sid']) && !$mybb->input['action'])
|
{ if(!isset($template_sets[$mybb->input['sid']])) {
| { if(!isset($template_sets[$mybb->input['sid']])) {
|
Zeile 1695 | Zeile 1713 |
---|
$popup->add_item($lang->full_edit, "index.php?module=style-templates&action=edit_template&title=".urlencode($template['title'])."&sid=-1"); $popup->add_item($lang->delete_template, "index.php?module=style-templates&action=delete_template&title=".urlencode($template['title'])."&sid=-1&my_post_key={$mybb->post_code}", "return AdminCP.deleteConfirmation(this, '{$lang->confirm_template_deletion}')");
|
$popup->add_item($lang->full_edit, "index.php?module=style-templates&action=edit_template&title=".urlencode($template['title'])."&sid=-1"); $popup->add_item($lang->delete_template, "index.php?module=style-templates&action=delete_template&title=".urlencode($template['title'])."&sid=-1&my_post_key={$mybb->post_code}", "return AdminCP.deleteConfirmation(this, '{$lang->confirm_template_deletion}')");
|
$table->construct_cell("<a href=\"index.php?module=style-templates&action=edit_template&title=".urlencode($template['title'])."&sid=-1\">{$template['title']}</a>");
| $table->construct_cell("<a href=\"index.php?module=style-templates&action=edit_template&title=".urlencode($template['title'])."&sid=-1\">".htmlspecialchars_uni($template['title'])."</a>");
|
$table->construct_cell($popup->fetch(), array("class" => "align_center"));
$table->construct_row();
| $table->construct_cell($popup->fetch(), array("class" => "align_center"));
$table->construct_row();
|
Zeile 1876 | Zeile 1894 |
---|
foreach($templates as $template) {
|
foreach($templates as $template) {
|
$template['pretty_title'] = $template['title'];
| $template['pretty_title'] = htmlspecialchars_uni($template['title']);
|
$popup = new PopupMenu("template_{$template['tid']}", $lang->options); $popup->add_item($lang->full_edit, "index.php?module=style-templates&action=edit_template&title=".urlencode($template['title'])."&sid={$sid}{$expand_str}");
| $popup = new PopupMenu("template_{$template['tid']}", $lang->options); $popup->add_item($lang->full_edit, "index.php?module=style-templates&action=edit_template&title=".urlencode($template['title'])."&sid={$sid}{$expand_str}");
|
Zeile 1890 | Zeile 1908 |
---|
$popup->add_item($lang->revert_to_orig, "index.php?module=style-templates&action=revert&title=".urlencode($template['title'])."&sid={$sid}&my_post_key={$mybb->post_code}{$expand_str}", "return AdminCP.deleteConfirmation(this, '{$lang->confirm_template_revertion}')"); }
|
$popup->add_item($lang->revert_to_orig, "index.php?module=style-templates&action=revert&title=".urlencode($template['title'])."&sid={$sid}&my_post_key={$mybb->post_code}{$expand_str}", "return AdminCP.deleteConfirmation(this, '{$lang->confirm_template_revertion}')"); }
|
$template['pretty_title'] = "<span style=\"color: green;\">{$template['title']}</span>";
| $template['pretty_title'] = "<span style=\"color: green;\">".htmlspecialchars_uni($template['title'])."</span>";
|
} // This template does not exist in the master list else if(isset($template['original']) && $template['original'] == false) { $popup->add_item($lang->delete_template, "index.php?module=style-templates&action=delete_template&title=".urlencode($template['title'])."&sid={$sid}&my_post_key={$mybb->post_code}{$expand_str}", "return AdminCP.deleteConfirmation(this, '{$lang->confirm_template_deletion}')");
|
} // This template does not exist in the master list else if(isset($template['original']) && $template['original'] == false) { $popup->add_item($lang->delete_template, "index.php?module=style-templates&action=delete_template&title=".urlencode($template['title'])."&sid={$sid}&my_post_key={$mybb->post_code}{$expand_str}", "return AdminCP.deleteConfirmation(this, '{$lang->confirm_template_deletion}')");
|
$template['pretty_title'] = "<span style=\"color: blue;\">{$template['title']}</span>";
| $template['pretty_title'] = "<span style=\"color: blue;\">".htmlspecialchars_uni($template['title'])."</span>";
|
}
$table->construct_cell("<span style=\"padding-left: 20px;\"><a href=\"index.php?module=style-templates&action=edit_template&title=".urlencode($template['title'])."&sid={$sid}{$expand_str}\" >{$template['pretty_title']}</a></span>");
| }
$table->construct_cell("<span style=\"padding-left: 20px;\"><a href=\"index.php?module=style-templates&action=edit_template&title=".urlencode($template['title'])."&sid={$sid}{$expand_str}\" >{$template['pretty_title']}</a></span>");
|
Zeile 1967 | Zeile 1985 |
---|
continue; }
|
continue; }
|
if($themes[$set['sid']])
| if(!empty($themes[$set['sid']]))
|
{ $used_by_note = $lang->used_by; $comma = "";
| { $used_by_note = $lang->used_by; $comma = "";
|
Zeile 1995 | Zeile 2013 |
---|
{ $popup->add_item($lang->edit_template_set, "index.php?module=style-templates&action=edit_set&sid={$set['sid']}");
|
{ $popup->add_item($lang->edit_template_set, "index.php?module=style-templates&action=edit_set&sid={$set['sid']}");
|
if(!$themes[$set['sid']])
| if(empty($themes[$set['sid']]))
|
{ $popup->add_item($lang->delete_template_set, "index.php?module=style-templates&action=delete_set&sid={$set['sid']}&my_post_key={$mybb->post_code}", "return AdminCP.deleteConfirmation(this, '{$lang->confirm_template_set_deletion}')"); }
| { $popup->add_item($lang->delete_template_set, "index.php?module=style-templates&action=delete_set&sid={$set['sid']}&my_post_key={$mybb->post_code}", "return AdminCP.deleteConfirmation(this, '{$lang->confirm_template_set_deletion}')"); }
|