comicpress-core/addons/Core/partials/options-admin.inc

95 lines
4.2 KiB
PHP
Raw Normal View History

<div class="wrap">
<h2><?php _e('ComicPress Config', 'comicpress') ?></h2>
<form method="post">
<input type="hidden" name="cp[_nonce]" value="<?php echo $nonce ?>" />
<table>
<tr>
2009-07-14 00:13:19 +00:00
<th scope="row" valign="top"><?php _e('Master Comic Category', 'comicpress') ?></th>
<td>
<select name="cp[comic_category_id]">
2009-07-08 23:51:02 +00:00
<?php echo $this->create_category_options($root_categories, $this->comicpress->comicpress_options['comic_category_id']) ?>
</select>
</td>
</tr>
<?php foreach (array(
'comic_dimensions' => __('Comic Image Dimensions', 'comicpress'),
'rss_dimensions' => __('RSS Feed Image Dimensions', 'comicpress'),
'archive_dimensions' => __('Archive Image Dimensions', 'comicpress'),
2009-07-14 00:13:19 +00:00
'mini_dimensions' => __('Mini Image Dimensions', 'comicpress'),
) as $field => $name) { ?>
<tr>
2009-07-14 00:13:19 +00:00
<th scope="row" valign="top"><?php echo $name ?></th>
<td>
2009-07-08 23:51:02 +00:00
<?php echo $this->create_dimension_selector('cp[' . $field . ']', $this->comicpress->comicpress_options[$field]) ?>
</td>
</tr>
<?php } ?>
<tr>
2009-07-14 00:13:19 +00:00
<th scope="row" valign="top"><?php _e("Number of blog posts on home page", 'comicpress') ?></th>
<td>
<input type="text" name="cp[blogpost_count]" value="<?php echo $this->comicpress->comicpress_options['blogpost_count'] ?>" size="3" />
</td>
</tr>
2009-07-14 00:13:19 +00:00
<tr>
<th scope="row" valign="top"><?php _e("Set storyline category order", 'comicpress') ?></th>
<td>
<?php
foreach ($this->get_storyline_move_statuses() as $node => $statuses) {
2009-07-14 00:13:19 +00:00
$parts = explode("/", $node);
$category = get_category(end($parts));
if (!empty($category)) {
?>
<div class="storyline" style="padding-left: <?php echo (count($parts) - 2) * 20 ?>px">
<strong><?php echo $category->name ?></strong>
<?php
foreach (array(
"-1" => __("Up", 'comicpress'),
"1" => __("Down", 'comicpress')
) as $direction => $label) {
$status = array_shift($statuses);
if ($status) {
$query = add_query_arg('cp[_nonce]', $nonce);
$query = add_query_arg('cp[category]', $category->term_id, $query);
$query = add_query_arg('cp[move_direction]', $direction, $query); ?>
2009-07-14 00:13:19 +00:00
| <a href="<?php echo $query ?>"><?php echo $label ?></a>
<?php
2009-07-14 00:13:19 +00:00
}
}
?>
</div>
<?php }
}
?>
<p><em>(categories can be modified on the Posts -> Categories page)</em></p>
</td>
</tr>
2009-07-16 01:34:34 +00:00
<tr>
<th scope="row">Insert into comic space:</th>
<td>
<?php foreach (array(
"comic_only" => __("The comic only, with post content below", 'comicpress'),
"post_content" => __("The post content", 'comicpress')
) as $value => $label) { ?>
<label><input type="radio" name="cp[comic_space]" value="<?php echo $value ?>" <?php echo ($this->comicpress->comicpress_options['comic_space'] == $value) ? 'checked="checked"' : "" ?> /> <?php echo $label ?></label><br />
<?php } ?>
</td>
</tr>
2009-07-16 01:55:28 +00:00
<tr>
<th scope="row">Use comic category pages as:</th>
<td>
<?php foreach (array(
"archive_list" => __("The normal way, as a list of posts in that category", 'comicpress'),
"comic_frontpage" => __("As the front page to the comics in that category", 'comicpress')
) as $value => $label) { ?>
<label><input type="radio" name="cp[category_page_usage]" value="<?php echo $value ?>" <?php echo ($this->comicpress->comicpress_options['category_page_usage'] == $value) ? 'checked="checked"' : "" ?> /> <?php echo $label ?></label><br />
<?php } ?>
</td>
</tr>
<tr>
<td>&nbsp;</td>
2009-07-14 00:13:19 +00:00
<td><input type="submit" value="<?php _e("Submit Changes", 'comicpress') ?>" /></td>
</tr>
</table>
</form>
</div>