Zeile 6 | Zeile 6 |
---|
* Website: http://mybb.com * License: http://mybb.com/about/license *
|
* Website: http://mybb.com * License: http://mybb.com/about/license *
|
* $Id: templates.php 5150 2010-07-31 01:46:18Z RyanGordon $
| * $Id$
|
*/
// Disallow direct access to this file for security reasons
| */
// Disallow direct access to this file for security reasons
|
Zeile 60 | Zeile 60 |
---|
'description' => $lang->find_updated_desc ); }
|
'description' => $lang->find_updated_desc ); }
|
else if(($sid && !$mybb->input['action']) || $mybb->input['action'] == "edit_set" || $mybb->input['action'] == "edit_template")
| else if(($sid && !$mybb->input['action']) || $mybb->input['action'] == "edit_set" || $mybb->input['action'] == "check_set" || $mybb->input['action'] == "edit_template")
|
{ $sub_tabs['manage_templates'] = array( 'title' => $lang->manage_templates,
| { $sub_tabs['manage_templates'] = array( 'title' => $lang->manage_templates,
|
Zeile 385 | Zeile 385 |
---|
{ $errors[] = $lang->error_missing_title; }
|
{ $errors[] = $lang->error_missing_title; }
|
| // Are we trying to do malicious things in our template? if(check_template($mybb->input['template'])) { $errors[] = $lang->error_security_problem; }
|
if(!$errors) { $query = $db->simple_select("templates", "*", "tid='{$mybb->input['tid']}'");
| if(!$errors) { $query = $db->simple_select("templates", "*", "tid='{$mybb->input['tid']}'");
|
Zeile 423 | Zeile 429 |
---|
else { // Global template set
|
else { // Global template set
|
$db->update_query("templates", $template_array, "tid='{$template['tid']}' AND sid != '-2'");
| $db->update_query("templates", $template_array, "tid='{$template['tid']}' AND sid != '-2'");
|
} $plugins->run_hooks("admin_style_templates_edit_template_commit");
| } $plugins->run_hooks("admin_style_templates_edit_template_commit");
|
Zeile 461 | Zeile 467 |
---|
else { if($mybb->input['from'] == "diff_report")
|
else { if($mybb->input['from'] == "diff_report")
|
{
| {
|
admin_redirect("index.php?module=style-templates&action=find_updated");
|
admin_redirect("index.php?module=style-templates&action=find_updated");
|
}
| }
|
else { admin_redirect("index.php?module=style-templates&sid=".intval($mybb->input['sid']).$expand_str2."#group_{$group}");
| else { admin_redirect("index.php?module=style-templates&sid=".intval($mybb->input['sid']).$expand_str2."#group_{$group}");
|
Zeile 474 | Zeile 480 |
---|
if($errors) {
|
if($errors) {
|
$page->output_inline_error($errors);
| |
$template = $mybb->input; } else
| $template = $mybb->input; } else
|
Zeile 498 | Zeile 503 |
---|
if($mybb->input['from'] == "diff_report") { $page->add_breadcrumb_item($lang->find_updated, "index.php?module=style-templates&action=find_updated");
|
if($mybb->input['from'] == "diff_report") { $page->add_breadcrumb_item($lang->find_updated, "index.php?module=style-templates&action=find_updated");
|
}
| }
|
$page->add_breadcrumb_item($lang->edit_template_breadcrumb.$template['title'], "index.php?module=style-templates&sid={$sid}"); $page->output_header($lang->edit_template);
|
$page->add_breadcrumb_item($lang->edit_template_breadcrumb.$template['title'], "index.php?module=style-templates&sid={$sid}"); $page->output_header($lang->edit_template);
|
|
|
$sub_tabs = array(); if($mybb->input['from'] == "diff_report")
| $sub_tabs = array(); if($mybb->input['from'] == "diff_report")
|
Zeile 511 | Zeile 517 |
---|
$sub_tabs['find_updated'] = array( 'title' => $lang->find_updated, 'link' => "index.php?module=style-templates&action=find_updated"
|
$sub_tabs['find_updated'] = array( 'title' => $lang->find_updated, 'link' => "index.php?module=style-templates&action=find_updated"
|
);
| );
|
$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=".intval($template['sid'])."&sid2=-2", );
|
$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=".intval($template['sid'])."&sid2=-2", );
|
}
| }
|
$sub_tabs['edit_template'] = array( 'title' => $lang->edit_template, 'link' => "index.php?module=style-templates&action=edit_template&title=".htmlspecialchars_uni($template['title']).$expand_str,
| $sub_tabs['edit_template'] = array( 'title' => $lang->edit_template, 'link' => "index.php?module=style-templates&action=edit_template&title=".htmlspecialchars_uni($template['title']).$expand_str,
|
Zeile 526 | Zeile 532 |
---|
); $page->output_nav_tabs($sub_tabs, 'edit_template');
|
); $page->output_nav_tabs($sub_tabs, 'edit_template');
|
| if($errors) { $page->output_inline_error($errors); }
|
$form = new Form("index.php?module=style-templates&action=edit_template{$expand_str}", "post", "edit_template"); echo $form->generate_hidden_field('tid', $template['tid'])."\n";
| $form = new Form("index.php?module=style-templates&action=edit_template{$expand_str}", "post", "edit_template"); echo $form->generate_hidden_field('tid', $template['tid'])."\n";
|
Zeile 537 | Zeile 548 |
---|
$form_container = new FormContainer($lang->edit_template_breadcrumb.$template['title']); $form_container->output_row($lang->template_name, $lang->template_name_desc, $form->generate_text_box('title', $template['title'], array('id' => 'title')), 'title');
|
$form_container = new FormContainer($lang->edit_template_breadcrumb.$template['title']); $form_container->output_row($lang->template_name, $lang->template_name_desc, $form->generate_text_box('title', $template['title'], array('id' => 'title')), 'title');
|
|
|
// Force users to save the default template to a specific set, rather than the "global" templates - where they can delete it if($template['sid'] == "-2") {
| // Force users to save the default template to a specific set, rather than the "global" templates - where they can delete it if($template['sid'] == "-2") {
|
Zeile 545 | Zeile 556 |
---|
}
$form_container->output_row($lang->template_set, $lang->template_set_desc, $form->generate_select_box('sid', $template_sets, $sid));
|
}
$form_container->output_row($lang->template_set, $lang->template_set_desc, $form->generate_select_box('sid', $template_sets, $sid));
|
|
|
$form_container->output_row("", "", $form->generate_text_area('template', $template['template'], array('id' => 'template', 'class' => 'codepress mybb', 'style' => 'width: 100%; height: 500px;'))); $form_container->end();
| $form_container->output_row("", "", $form->generate_text_area('template', $template['template'], array('id' => 'template', 'class' => 'codepress mybb', 'style' => 'width: 100%; height: 500px;'))); $form_container->end();
|
Zeile 557 | Zeile 568 |
---|
$form->end(); if($admin_options['codepress'] != 0)
|
$form->end(); if($admin_options['codepress'] != 0)
|
{
| {
|
echo "<script type=\"text/javascript\"> Event.observe('edit_template', 'submit', function() {
| echo "<script type=\"text/javascript\"> Event.observe('edit_template', 'submit', function() {
|
Zeile 614 | Zeile 625 |
---|
// Select all templates with that search term $query = $db->query("
|
// Select all templates with that search term $query = $db->query("
|
SELECT t.tid, t.title, t.sid
| SELECT t.tid, t.title, t.sid, t.template
|
FROM ".TABLE_PREFIX."templates t LEFT JOIN ".TABLE_PREFIX."templatesets s ON (t.sid=s.sid) LEFT JOIN ".TABLE_PREFIX."templates t2 ON (t.title=t2.title AND t2.sid='1')
| FROM ".TABLE_PREFIX."templates t LEFT JOIN ".TABLE_PREFIX."templatesets s ON (t.sid=s.sid) LEFT JOIN ".TABLE_PREFIX."templates t2 ON (t.title=t2.title AND t2.sid='1')
|
Zeile 649 | Zeile 660 |
---|
{ // Do replacement $newtemplate = str_ireplace($mybb->input['find'], $mybb->input['replace'], $template['template']);
|
{ // Do replacement $newtemplate = str_ireplace($mybb->input['find'], $mybb->input['replace'], $template['template']);
|
if($newtemplate != $template['template'])
| if($newtemplate != $template['template'] && check_template($newtemplate) === false)
|
{ // If the template is different, that means the search term has been found. if(trim($mybb->input['replace']) != "")
|
{ // If the template is different, that means the search term has been found. if(trim($mybb->input['replace']) != "")
|
{ if($template['sid'] == -2)
| { if($template['sid'] == -2)
|
{ // The template is a master template. We have to make a new custom template. $new_template = array(
| { // The template is a master template. We have to make a new custom template. $new_template = array(
|
Zeile 692 | Zeile 703 |
---|
{ $label = $lang->sprintf($lang->search_found, $template['title']); $url = "index.php?module=style-templates&action=edit_template&title=".urlencode($template['title'])."&sid={$template['sid']}";
|
{ $label = $lang->sprintf($lang->search_found, $template['title']); $url = "index.php?module=style-templates&action=edit_template&title=".urlencode($template['title'])."&sid={$template['sid']}";
|
}
| }
|
} } else { // Just show that the term was found if($template['sid'] == -2)
|
} } else { // Just show that the term was found if($template['sid'] == -2)
|
{ $label = $lang->sprintf($lang->search_found, $template['title']);
| { $label = $lang->sprintf($lang->search_found, $template['title']);
|
} else {
| } else {
|
Zeile 712 | Zeile 723 |
---|
$table->construct_cell($label, array("width" => "85%")); if($sid == -2)
|
$table->construct_cell($label, array("width" => "85%")); if($sid == -2)
|
{
| {
|
$popup = new PopupMenu("template_{$template['tid']}", $lang->options); foreach($template_sets as $set_sid => $title)
| $popup = new PopupMenu("template_{$template['tid']}", $lang->options); foreach($template_sets as $set_sid => $title)
|
Zeile 724 | Zeile 735 |
---|
} $table->construct_cell($popup->fetch(), array("class" => "align_center"));
|
} $table->construct_cell($popup->fetch(), array("class" => "align_center"));
|
}
| }
|
else { $table->construct_cell("<a href=\"{$url}\">{$lang->edit}</a>", array("class" => "align_center")); } $table->construct_row();
|
else { $table->construct_cell("<a href=\"{$url}\">{$lang->edit}</a>", array("class" => "align_center")); } $table->construct_row();
|
}
| }
|
if($count == 1) {
| if($count == 1) {
|
Zeile 807 | Zeile 818 |
---|
$template['modified'] = false; } $templatessets[$template['sid']][$template['title']] = $template;
|
$template['modified'] = false; } $templatessets[$template['sid']][$template['title']] = $template;
|
}
| }
|
$page->add_breadcrumb_item($lang->search_replace);
| $page->add_breadcrumb_item($lang->search_replace);
|
Zeile 845 | Zeile 856 |
---|
if($set_sid < 0) continue; $popup->add_item($lang->edit_in." ".htmlspecialchars_uni($title), "index.php?module=style-templates&action=edit_template&title=".urlencode($template['title'])."&sid={$set_sid}");
|
if($set_sid < 0) continue; $popup->add_item($lang->edit_in." ".htmlspecialchars_uni($title), "index.php?module=style-templates&action=edit_template&title=".urlencode($template['title'])."&sid={$set_sid}");
|
}
| }
|
} else {
| } else {
|
Zeile 901 | Zeile 912 |
---|
<script type="text/javascript"> CodePress.language = \'php\'; </script>';
|
<script type="text/javascript"> CodePress.language = \'php\'; </script>';
|
}
| }
|
$page->add_breadcrumb_item($lang->search_replace); $page->output_header($lang->search_replace);
| $page->add_breadcrumb_item($lang->search_replace); $page->output_header($lang->search_replace);
|
Zeile 914 | Zeile 925 |
---|
$form_container = new FormContainer($lang->search_replace); $form_container->output_row($lang->search_for, "", $form->generate_text_area('find', $mybb->input['find'], array('id' => 'find', 'class' => 'codepress mybb', 'style' => 'width: 100%; height: 200px;')));
|
$form_container = new FormContainer($lang->search_replace); $form_container->output_row($lang->search_for, "", $form->generate_text_area('find', $mybb->input['find'], array('id' => 'find', 'class' => 'codepress mybb', 'style' => 'width: 100%; height: 200px;')));
|
|
|
$form_container->output_row($lang->replace_with, "", $form->generate_text_area('replace', $mybb->input['replace'], array('id' => 'replace', 'class' => 'codepress mybb', 'style' => 'width: 100%; height: 200px;'))); $form_container->end(); $buttons[] = $form->generate_submit_button($lang->find_and_replace);
|
$form_container->output_row($lang->replace_with, "", $form->generate_text_area('replace', $mybb->input['replace'], array('id' => 'replace', 'class' => 'codepress mybb', 'style' => 'width: 100%; height: 200px;'))); $form_container->end(); $buttons[] = $form->generate_submit_button($lang->find_and_replace);
|
$form->output_submit_wrapper($buttons);
| $form->output_submit_wrapper($buttons);
|
$form->end(); echo "<br />";
| $form->end(); echo "<br />";
|
Zeile 997 | Zeile 1008 |
---|
$query = $db->simple_select("templatesets", "*", "", array('order_by' => 'title')); while($templateset = $db->fetch_array($query))
|
$query = $db->simple_select("templatesets", "*", "", array('order_by' => 'title')); while($templateset = $db->fetch_array($query))
|
{
| {
|
$templatesets[$templateset['sid']] = $templateset; }
| $templatesets[$templateset['sid']] = $templateset; }
|
Zeile 1042 | Zeile 1053 |
---|
} foreach($templates as $template)
|
} foreach($templates as $template)
|
{
| {
|
$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}&from=diff_report");
|
$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}&from=diff_report");
|
$popup->add_item($lang->diff_report, "index.php?module=style-templates&action=diff_report&title=".urlencode($template['title'])."&sid1=".$template['sid']."&sid2=-2");
| $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%'));
| $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%'));
|
Zeile 1065 | Zeile 1076 |
---|
{ $table->output(); }
|
{ $table->output(); }
|
} }
| } }
|
$page->output_footer(); }
| $page->output_footer(); }
|
Zeile 1082 | Zeile 1093 |
---|
if(!$set['sid']) { flash_message($lang->error_invalid_template_set, 'error');
|
if(!$set['sid']) { flash_message($lang->error_invalid_template_set, 'error');
|
admin_redirect("index.php?module=style-templates"); }
| admin_redirect("index.php?module=style-templates"); }
|
// Is there a theme attached to this set? $query = $db->simple_select("themes", "properties"); while($theme = $db->fetch_array($query))
|
// Is there a theme attached to this set? $query = $db->simple_select("themes", "properties"); while($theme = $db->fetch_array($query))
|
{
| {
|
$properties = @unserialize($theme['properties']); if($properties['templateset'] == $sid) {
| $properties = @unserialize($theme['properties']); if($properties['templateset'] == $sid) {
|
Zeile 1096 | Zeile 1107 |
---|
admin_redirect("index.php?module=style-templates"); break; }
|
admin_redirect("index.php?module=style-templates"); break; }
|
} // User clicked no if($mybb->input['no']) {
| } // User clicked no if($mybb->input['no']) {
|
admin_redirect("index.php?module=style-templates"); }
|
admin_redirect("index.php?module=style-templates"); }
|
|
|
if($mybb->request_method == "post") { // Delete the templateset
| if($mybb->request_method == "post") { // Delete the templateset
|
Zeile 1117 | Zeile 1128 |
---|
log_admin_action($set['sid'], $set['title']);
flash_message($lang->success_template_set_deleted, 'success');
|
log_admin_action($set['sid'], $set['title']);
flash_message($lang->success_template_set_deleted, 'success');
|
admin_redirect("index.php?module=style-templates");
| admin_redirect("index.php?module=style-templates");
|
} else { $page->output_confirm_action("index.php?module=style-templates&action=delete_set&sid={$set['sid']}", $lang->confirm_template_set_deletion);
|
} else { $page->output_confirm_action("index.php?module=style-templates&action=delete_set&sid={$set['sid']}", $lang->confirm_template_set_deletion);
|
}
| }
|
}
| }
|
Zeile 1135 | Zeile 1146 |
---|
FROM ".TABLE_PREFIX."templates t LEFT JOIN ".TABLE_PREFIX."templatesets s ON(t.sid=s.sid) WHERE t.title='".$db->escape_string($mybb->input['title'])."' AND t.sid > '-2' AND t.sid = '{$sid}'
|
FROM ".TABLE_PREFIX."templates t LEFT JOIN ".TABLE_PREFIX."templatesets s ON(t.sid=s.sid) WHERE t.title='".$db->escape_string($mybb->input['title'])."' AND t.sid > '-2' AND t.sid = '{$sid}'
|
"); $template = $db->fetch_array($query); // Does the template not exist? if(!$template) { flash_message($lang->error_invalid_template, 'error'); admin_redirect("index.php?module=style-templates"); } // User clicked no if($mybb->input['no']) { admin_redirect("index.php?module=style-templates&sid={$template['sid']}{$expand_str2}"); }
if($mybb->request_method == "post")
| "); $template = $db->fetch_array($query); // Does the template not exist? if(!$template) { flash_message($lang->error_invalid_template, 'error'); admin_redirect("index.php?module=style-templates"); } // User clicked no if($mybb->input['no']) { admin_redirect("index.php?module=style-templates&sid={$template['sid']}{$expand_str2}"); }
if($mybb->request_method == "post")
|
{ // Delete the template $db->delete_query("templates", "tid='{$template['tid']}'");
| { // Delete the template $db->delete_query("templates", "tid='{$template['tid']}'");
|
Zeile 1171 | Zeile 1182 |
---|
}
if($mybb->input['action'] == "diff_report")
|
}
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'])
|
// Compares a template of sid1 with that of sid2, if no sid1, it is assumed -2 if(!$mybb->input['sid1'])
|
{
| {
|
$mybb->input['sid1'] = -2;
|
$mybb->input['sid1'] = -2;
|
}
| }
|
if($mybb->input['sid2'] == -2)
|
if($mybb->input['sid2'] == -2)
|
{
| {
|
$sub_tabs['find_updated'] = array( 'title' => $lang->find_updated, 'link' => "index.php?module=style-templates&action=find_updated" );
|
$sub_tabs['find_updated'] = array( 'title' => $lang->find_updated, 'link' => "index.php?module=style-templates&action=find_updated" );
|
| }
if(!$mybb->input['from']) { $mybb->input['from'] = 0;
|
} $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($mybb->input['title'])."&sid1=".intval($mybb->input['sid1'])."&sid2=".intval($mybb->input['sid2']),
| 'link' => "index.php?module=style-templates&action=diff_report&title=".$db->escape_string($mybb->input['title'])."&from=".$mybb->input['from']."sid1=".intval($mybb->input['sid1'])."&sid2=".intval($mybb->input['sid2']),
|
'description' => $lang->diff_report_desc );
|
'description' => $lang->diff_report_desc );
|
|
|
$plugins->run_hooks("admin_style_templates_diff_report"); $query = $db->simple_select("templates", "*", "title='".$db->escape_string($mybb->input['title'])."' AND sid='".intval($mybb->input['sid1'])."'");
| $plugins->run_hooks("admin_style_templates_diff_report"); $query = $db->simple_select("templates", "*", "title='".$db->escape_string($mybb->input['title'])."' AND sid='".intval($mybb->input['sid1'])."'");
|
Zeile 1234 | Zeile 1250 |
---|
$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.": ".$template1['title'], "index.php?module=style-templates&action=diff_report&title=".$db->escape_string($mybb->input['title'])."&sid1=".intval($mybb->input['sid1'])."&sid2=".intval($mybb->input['sid2']));
| $page->add_breadcrumb_item($lang->diff_report.": ".$template1['title'], "index.php?module=style-templates&action=diff_report&title=".$db->escape_string($mybb->input['title'])."&from=".$mybb->input['from']."&sid1=".intval($mybb->input['sid1'])."&sid2=".intval($mybb->input['sid2']));
|
$page->output_header($lang->template_sets);
| $page->output_header($lang->template_sets);
|
Zeile 1242 | Zeile 1258 |
---|
$table = new Table;
|
$table = new Table;
|
$table->construct_header("<ins>".$lang->master_updated_ins."</ins><br /><del>".$lang->master_updated_del."</del>");
| if($mybb->input['from']) { $table->construct_header("<ins>".$lang->master_updated_ins."</ins><br /><del>".$lang->master_updated_del."</del>"); } else { $table->construct_header("<ins>".$lang->master_updated_del."</ins><br /><del>".$lang->master_updated_ins."</del>"); }
|
$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']); $page->output_footer();
|
$table->output($lang->template_diff_analysis.": ".$template1['title']); $page->output_footer();
|
}
| }
|
if($mybb->input['action'] == "revert") { $plugins->run_hooks("admin_style_templates_revert");
|
if($mybb->input['action'] == "revert") { $plugins->run_hooks("admin_style_templates_revert");
|
|
|
$query = $db->query(" SELECT t.*, s.title as set_title FROM ".TABLE_PREFIX."templates t
| $query = $db->query(" SELECT t.*, s.title as set_title FROM ".TABLE_PREFIX."templates t
|
Zeile 1269 | Zeile 1292 |
---|
{ flash_message($lang->error_invalid_template, 'error'); admin_redirect("index.php?module=style-templates");
|
{ flash_message($lang->error_invalid_template, 'error'); admin_redirect("index.php?module=style-templates");
|
}
| }
|
// User clicked no if($mybb->input['no'])
| // User clicked no if($mybb->input['no'])
|
Zeile 1307 | Zeile 1330 |
---|
if($mybb->input['sid'] && !$mybb->input['action']) { $plugins->run_hooks("admin_style_templates_set");
|
if($mybb->input['sid'] && !$mybb->input['action']) { $plugins->run_hooks("admin_style_templates_set");
|
|
|
$table = new Table;
|
$table = new Table;
|
$page->extra_header .= '<script type="text/javascript"> Event.observe(document, "dom:loaded", function() { var lastelement = \'\'; link_preview_template_list = $$(\'a.preview_template_list\'); link_preview_template_list.each(function(element) { Event.observe(element, "mouseover", function(event) { if(lastelement != \'\') { $(lastelement).hide(); } listelement = Event.element(event); $(listelement.id.replace("preview_", "")).show(); lastelement = listelement.id.replace("preview_", ""); } ); Event.observe(element, "mouseout", function(event) { listelement = Event.element(event); $(listelement.id.replace("preview_", "")).hide(); lastelement = \'\'; } ); }); }); </script>';
| |
$page->add_breadcrumb_item($template_sets[$sid], "index.php?module=style-templates&sid={$sid}");
| $page->add_breadcrumb_item($template_sets[$sid], "index.php?module=style-templates&sid={$sid}");
|
Zeile 1524 | Zeile 1535 |
---|
} else if(isset($group['templates']) && count($group['templates']) > 0) {
|
} else if(isset($group['templates']) && count($group['templates']) > 0) {
|
$table->construct_cell("<strong><a href=\"index.php?module=style-templates&sid={$sid}{$group['expand_str']}#group_{$group['gid']}\" class=\"preview_template_list\" id=\"preview_template_list_{$group['gid']}\">{$group['title']}</a></strong>"); $table->construct_cell("<a href=\"index.php?module=style-templates&sid={$sid}{$group['expand_str']}#group_{$group['gid']}\">{$expand}</a>", array("class" => "align_center")); $table->construct_row(array("class" => "alt_row", "id" => "group_".$group['gid'], "name" => "group_".$group['gid']));
| $table->construct_cell("<strong><a href=\"index.php?module=style-templates&sid={$sid}{$group['expand_str']}#group_{$group['gid']}\">{$group['title']}</a></strong>"); $table->construct_cell("<a href=\"index.php?module=style-templates&sid={$sid}{$group['expand_str']}#group_{$group['gid']}\">{$expand}</a>", array("class" => "align_center")); $table->construct_row(array("class" => "alt_row", "id" => "group_".$group['gid'], "name" => "group_".$group['gid']));
|
} }
| } }
|
Zeile 1549 | Zeile 1560 |
---|
{ $tbits = unserialize($theme['properties']); $themes[$tbits['templateset']][$theme['tid']] = $theme['name'];
|
{ $tbits = unserialize($theme['properties']); $themes[$tbits['templateset']][$theme['tid']] = $theme['name'];
|
}
| }
|
$template_sets = array(); $template_sets[-1]['title'] = $lang->global_templates;
| $template_sets = array(); $template_sets[-1]['title'] = $lang->global_templates;
|
Zeile 1573 | Zeile 1584 |
---|
$table->construct_cell("<a href=\"index.php?module=style-templates&sid=-1\">{$lang->expand_templates}</a>", array("class" => "align_center")); $table->construct_row(); continue;
|
$table->construct_cell("<a href=\"index.php?module=style-templates&sid=-1\">{$lang->expand_templates}</a>", array("class" => "align_center")); $table->construct_row(); continue;
|
}
| }
|
if($themes[$set['sid']]) {
| if($themes[$set['sid']]) {
|
Zeile 1583 | Zeile 1594 |
---|
{ $used_by_note .= $comma.$theme_name; $comma = $lang->comma;
|
{ $used_by_note .= $comma.$theme_name; $comma = $lang->comma;
|
} } else
| } } else
|
{ $used_by_note = $lang->not_used_by_any_themes; }
| { $used_by_note = $lang->not_used_by_any_themes; }
|
Zeile 1621 | Zeile 1632 |
---|
$page->output_footer(); }
|
$page->output_footer(); }
|
| |
?>
| ?>
|