Permalink
Browse files

moved avatar directory selection into the comments section of the opt…

…ions - removed comma/replaced with dash courtesy kniebremser
  • Loading branch information...
1 parent 70eefd6 commit e7b145cf20cca5f416f59683315e56dc87afa2fd @Frumph committed Oct 16, 2013
Showing with 39 additions and 38 deletions.
  1. +5 −4 comments.php
  2. +33 −33 options/general.php
  3. +1 −1 options/layout.php
View
@@ -66,9 +66,10 @@
</div>
<div class="clear"></div>
</div>
- <?php } ?>
-
- <?php } else { ?>
+<?php
+ }
+ } else {
+?>
<div class="commentnav">
<div class="commentnav-right"><?php next_comments_link(__('Next Comments &uarr;','comicpress')) ?></div>
<div class="commentnav-left"><?php previous_comments_link(__('&darr; Previous Comments','comicpress')) ?></div>
@@ -101,7 +102,7 @@
comment_form($args);
?>
</div>
-<?php } elseif (!comments_open() && (get_comments_number() > 0)) { ?>
+<?php } elseif (!comments_open() && (get_comments_number() > 0) && !is_page()) { ?>
<p class="closed-comments"><?php _e('Comments are closed.','comicpress'); ?></p>
<?php } ?>
</div>
View
@@ -90,39 +90,6 @@
<?php _e('With this enabled, the avatar\'s that are displayed will be jquery modified to look like polaroids randomly tilted.','comicpress'); ?>
</td>
</tr>
- <?php
- $current_avatar_directory = $comicpress_options['avatar_directory'];
- if (empty($current_avatar_directory)) $current_avatar_directory = 'default';
- $avatar_directories = array();
- $dirs_to_search = array_unique(array(comicpress_themeinfo('themepath'), comicpress_themeinfo('stylepath')));
- foreach ($dirs_to_search as $avdir) {
- if (is_dir($avdir . '/images/avatars')) {
- $thisdir = null;
- $thisdir = array();
- $thisdir = glob($avdir. '/images/avatars/*');
- $avatar_directories = array_merge($avatar_directories, $thisdir);
- }
- }
- ?>
- <tr>
- <th scope="row" colspan="2">
- <label for="avatar_directory"><?php _e('Avatar Directory','comicpress'); ?></label>
- <select name="avatar_directory" id="avatar_directory">
- <option class="level-0" value="none" <?php if ($current_avatar_directory == "none") { ?>selected="selected"<?php } ?>>none</option>
- <?php
- foreach ($avatar_directories as $avatar_dirs) {
- if (is_dir($avatar_dirs)) {
- $avatar_dir_name = basename($avatar_dirs); ?>
- <option class="level-0" value="<?php echo $avatar_dir_name; ?>" <?php if ($current_avatar_directory == $avatar_dir_name) { ?>selected="selected"<?php } ?>><?php echo $avatar_dir_name; ?></option>
- <?php }
- }
- ?>
- </select>
- </th>
- <td>
- <?php _e('Choose a directory to get the avatars for default gravatars if someone does not have one. You will have to make these images yourself, or download them from avatar providers. Then make a new directory on your site server to upload them to and select that directory here. <strong>Setting this to \'none\' will disable it from using any special avatar sets.</strong>','comicpress'); ?><br />
- </td>
- </tr>
<tr class="alternate">
<th scope="row"><label for="disable_tags_in_posts"><?php _e('Disable display of <strong>tags</strong> in posts','comicpress'); ?></label></th>
<td>
@@ -212,6 +179,39 @@
<?php _e('Checkmarking this option will make it so that the post(s) on the home page will also display the comments under them, This will ONLY work if you have it set to only display 1 post on the home page. The post count and this must be set to work.','comicpress'); ?>
</td>
</tr>
+<?php
+$current_avatar_directory = $comicpress_options['avatar_directory'];
+if (empty($current_avatar_directory)) $current_avatar_directory = 'default';
+$avatar_directories = array();
+$dirs_to_search = array_unique(array(comicpress_themeinfo('themepath'), comicpress_themeinfo('stylepath')));
+foreach ($dirs_to_search as $avdir) {
+ if (is_dir($avdir . '/images/avatars')) {
+ $thisdir = null;
+ $thisdir = array();
+ $thisdir = glob($avdir. '/images/avatars/*');
+ $avatar_directories = array_merge($avatar_directories, $thisdir);
+ }
+}
+ ?>
+ <tr>
+ <th scope="row" colspan="2">
+ <label for="avatar_directory"><?php _e('Avatar Directory','comicpress'); ?></label>
+ <select name="avatar_directory" id="avatar_directory">
+ <option class="level-0" value="none" <?php if ($current_avatar_directory == "none") { ?>selected="selected"<?php } ?>>none</option>
+<?php
+foreach ($avatar_directories as $avatar_dirs) {
+ if (is_dir($avatar_dirs)) {
+ $avatar_dir_name = basename($avatar_dirs); ?>
+ <option class="level-0" value="<?php echo $avatar_dir_name; ?>" <?php if ($current_avatar_directory == $avatar_dir_name) { ?>selected="selected"<?php } ?>><?php echo $avatar_dir_name; ?></option>
+ <?php }
+}
+ ?>
+ </select>
+ </th>
+ <td>
+ <?php _e('Choose a directory to get the avatars for default gravatars if someone does not have one. You will have to make these images yourself, or download them from avatar providers. Then make a new directory on your site server to upload them to and select that directory here. <strong>Setting this to \'none\' will disable it from using any special avatar sets.</strong>','comicpress'); ?><br />
+ </td>
+ </tr>
</table>
<table class="widefat">
View
@@ -31,7 +31,7 @@ function sshowimage(sel,pic) {
<option class="level-0" value="3cr" <?php if ($comicpress_options['layout'] == '3cr') { ?>selected="selected" <?php } ?>><?php _e('3 Column - Sidebar\'s on Right','comicpress'); ?></option>
<option class="level-0" value="2cl" <?php if ($comicpress_options['layout'] == '2cl') { ?>selected="selected" <?php } ?>><?php _e('2 Column - Sidebar on Left (780px)','comicpress'); ?></option>
<option class="level-0" value="2cr" <?php if ($comicpress_options['layout'] == '2cr') { ?>selected="selected" <?php } ?>><?php _e('2 Column - Sidebar on Right (780px)','comicpress'); ?></option>
- <option class="level-0" value="2clw" <?php if ($comicpress_options['layout'] == '2clw') { ?>selected="selected" <?php } ?>><?php _e('2 Column Wide, Sidebar on Left (980px)', 'comicpress'); ?></option>
+ <option class="level-0" value="2clw" <?php if ($comicpress_options['layout'] == '2clw') { ?>selected="selected" <?php } ?>><?php _e('2 Column Wide - Sidebar on Left (980px)', 'comicpress'); ?></option>
<option class="level-0" value="2crw" <?php if ($comicpress_options['layout'] == '2crw') { ?>selected="selected" <?php } ?>><?php _e('2 Column Wide - Sidebar on Right (980px)','comicpress'); ?></option>
</select>
<br />

0 comments on commit e7b145c

Please sign in to comment.