AVH Extended Categories Widgets - Version 3.0

Version Description

Download this release

Release Info

Developer petervanderdoes
Plugin Icon wp plugin AVH Extended Categories Widgets
Version 3.0
Comparing to
See all releases

Code changes from version 2.3.3 to 3.0

2.8/avh-ec.client.php CHANGED
@@ -1,7 +1,41 @@
1
  <?php
2
- // Include all the classes we use.
3
- require (dirname( __FILE__ ) . '/class/avh-ec.core.php');
4
- require (dirname( __FILE__ ) . '/class/avh-ec.widgets.php');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
 
6
  /**
7
  * Initialize the plugin
@@ -11,8 +45,8 @@ function avhextendedcategories_init ()
11
  {
12
  // Admin
13
  if ( is_admin() ) {
14
- require (dirname( __FILE__ ) . '/class/avh-ec.admin.php');
15
- $avhec_admin = & new AVH_EC_Admin( );
16
  }
17
  add_action( 'widgets_init', 'avhextendedcategories_widgets_init' );
18
 
@@ -30,6 +64,7 @@ function avhextendedcategories_widgets_init ()
30
  {
31
  register_widget( 'WP_Widget_AVH_ExtendedCategories_Normal' );
32
  register_widget( 'WP_Widget_AVH_ExtendedCategories_Top' );
 
33
  }
34
 
35
  add_action( 'plugins_loaded', 'avhextendedcategories_init' );
1
  <?php
2
+ /**
3
+ * Singleton Class
4
+ *
5
+ */
6
+ class AVH_EC_Singleton
7
+ {
8
+
9
+ /**
10
+ *
11
+ * @param $class
12
+ * @param $arg1
13
+ */
14
+ function &getInstance ( $class, $arg1 = null )
15
+ {
16
+ static $instances = array (); // array of instance names
17
+ if ( array_key_exists( $class, $instances ) ) {
18
+ $instance = & $instances[$class];
19
+ } else {
20
+ if ( ! class_exists( $class ) ) {
21
+ switch ( $class )
22
+ {
23
+ case 'AVH_EC_Core' :
24
+ require_once (AVHEC_WORKING_DIR . '/class/avh-ec.core.php');
25
+ break;
26
+ case 'AVH_EC_Category_Group' :
27
+ require_once (AVHEC_WORKING_DIR . '/class/avh-ec.category-group.php');
28
+ break;
29
+ }
30
+ }
31
+ $instances[$class] = new $class( $arg1 );
32
+ $instance = & $instances[$class];
33
+ }
34
+ return $instance;
35
+ } // getInstance
36
+ } // singleton
37
+
38
+ require_once (AVHEC_WORKING_DIR . '/class/avh-ec.widgets.php');
39
 
40
  /**
41
  * Initialize the plugin
45
  {
46
  // Admin
47
  if ( is_admin() ) {
48
+ require_once (AVHEC_WORKING_DIR . '/class/avh-ec.admin.php');
49
+ $avhec_admin = new AVH_EC_Admin();
50
  }
51
  add_action( 'widgets_init', 'avhextendedcategories_widgets_init' );
52
 
64
  {
65
  register_widget( 'WP_Widget_AVH_ExtendedCategories_Normal' );
66
  register_widget( 'WP_Widget_AVH_ExtendedCategories_Top' );
67
+ register_widget( 'WP_Widget_AVH_ExtendedCategories_Category_Group' );
68
  }
69
 
70
  add_action( 'plugins_loaded', 'avhextendedcategories_init' );
2.8/class/avh-ec.admin.php CHANGED
@@ -1,28 +1,171 @@
1
  <?php
2
  class AVH_EC_Admin
3
  {
 
 
 
 
4
  var $core;
5
- var $pagehook_OptionsPage;
 
 
 
 
 
 
 
6
  var $message;
7
 
 
 
 
 
8
  function __construct ()
9
  {
10
 
11
  // Initialize the plugin
12
- $this->core = & AVHExtendedCategoriesCore::getInstance();
 
 
 
13
 
14
  // Admin menu
15
  add_action( 'admin_menu', array (&$this, 'actionAdminMenu' ) );
16
  add_filter( 'plugin_action_links_extended-categories-widget/widget_extended_categories.php', array (&$this, 'filterPluginActions' ), 10, 2 );
17
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
  return;
19
  }
20
 
 
 
 
 
21
  function AVH_EC_Admin ()
22
  {
23
  $this->__construct();
24
  }
25
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
  /**
27
  * Add the Tools and Options to the Management and Options page repectively
28
  *
@@ -32,48 +175,131 @@ class AVH_EC_Admin
32
  function actionAdminMenu ()
33
  {
34
 
35
- $this->pagehook_OptionsPage = add_options_page( 'AVH Extended Categories', 'AVH Extended Categories', 'manage_options', 'avhec_options', array (&$this, 'doPageOptions' ) );
36
- add_action( 'load-' . $this->pagehook_OptionsPage, array (&$this, 'actionLoadpagehook_OptionsPage' ) );
 
 
 
 
 
37
 
 
 
 
 
 
38
  }
39
 
40
- function actionLoadpagehook_OptionsPage ()
 
 
 
 
41
  {
42
  // Add metaboxes
43
- add_meta_box( 'avhecBoxOptions', __( 'Options', 'avh-ec' ), array (&$this, 'metaboxOptions' ), $this->pagehook_OptionsPage, 'normal', 'core' );
44
- add_meta_box( 'avhecBoxTranslation', __( 'Translation', 'avh-ec' ), array (&$this, 'metaboxTranslation' ), $this->pagehook_OptionsPage, 'normal', 'core' );
45
 
46
  add_filter( 'screen_layout_columns', array (&$this, 'filterScreenLayoutColumns' ), 10, 2 );
47
 
48
- wp_enqueue_style( 'avhecadmin', $this->core->info['plugin_url'] . '/inc/avh-ec.admin.css', array (), $this->core->version, 'screen' );
49
- wp_admin_css( 'css/dashboard' );
50
  wp_enqueue_script( 'common' );
51
  wp_enqueue_script( 'wp-lists' );
52
  wp_enqueue_script( 'postbox' );
 
 
 
 
 
53
  }
54
 
55
  /**
56
- * Sets the amount of columns wanted for a particuler screen
57
  *
58
- * @WordPress filter screen_meta_screen
59
- * @param $screen
60
- * @return strings
61
  */
62
-
63
- function filterScreenLayoutColumns ( $columns, $screen )
64
  {
65
- if ( $screen == $this->pagehook_OptionsPage ) {
66
- $columns[$this->pagehook_OptionsPage] = 2;
 
 
 
 
 
 
 
 
 
 
 
 
 
67
  }
68
- return $columns;
69
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
70
  }
71
 
72
- function doPageOptions ()
 
 
 
 
 
73
  {
74
  global $screen_layout_columns;
75
 
76
- $options_general[] = array ('avhec[general][selectcategory]', '<em>Select Category</em> Alternative', 'text', 20, 'Alternative text for Select Category.' );
 
 
 
 
 
 
 
 
 
 
77
  if ( isset( $_POST['updateoptions'] ) ) {
78
  check_admin_referer( 'avh_ec_generaloptions' );
79
 
@@ -88,32 +314,42 @@ class AVH_EC_Admin
88
  $option_key = rtrim( $option[0], ']' );
89
  $option_key = substr( $option_key, strpos( $option_key, '][' ) + 2 );
90
 
91
- switch ( $section ) {
 
92
  case 'general' :
 
93
  $current_value = $options[$section][$option_key];
94
  break;
95
  }
96
  // Every field in a form is set except unchecked checkboxes. Set an unchecked checkbox to 0.
97
  $newval = (isset( $formoptions[$section][$option_key] ) ? attribute_escape( $formoptions[$section][$option_key] ) : 0);
98
  if ( $newval != $current_value ) { // Only process changed fields.
99
- switch ( $section ) {
 
100
  case 'general' :
 
101
  $options[$section][$option_key] = $newval;
102
  break;
103
  }
104
  }
105
  }
106
  $this->core->saveOptions( $options );
107
- $this->message = __( 'Options saved', 'avhfdas' );
108
  $this->status = 'updated fade';
109
 
110
  }
111
  $this->displayMessage();
112
 
113
  $actual_options = $this->core->getOptions();
 
 
 
 
 
114
 
115
  $hide2 = '';
116
- switch ( $screen_layout_columns ) {
 
117
  case 2 :
118
  $width = 'width:49%;';
119
  break;
@@ -125,9 +361,11 @@ class AVH_EC_Admin
125
  $data['actual_options'] = $actual_options;
126
 
127
  // This box can't be unselectd in the the Screen Options
128
- add_meta_box( 'avhecBoxDonations', 'Donations', array (&$this, 'metaboxDonations' ), $this->pagehook_OptionsPage, 'side', 'core' );
 
129
  $hide2 = '';
130
- switch ( $screen_layout_columns ) {
 
131
  case 2 :
132
  $width = 'width:49%;';
133
  break;
@@ -138,41 +376,31 @@ class AVH_EC_Admin
138
 
139
  echo '<div class="wrap avhec-wrap">';
140
  echo $this->displayIcon( 'index' );
141
- echo '<h2>' . 'AVH Extended Categories' . '</h2>';
142
  $admin_base_url = $this->core->info['siteurl'] . '/wp-admin/admin.php?page=';
143
- echo '<form name="avhec-generaloptions" id="avhec-generaloptions" method="POST" action="' . $admin_base_url . 'avhec_options' . '" accept-charset="utf-8" >';
144
  wp_nonce_field( 'avh_ec_generaloptions' );
145
- wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false );
146
- wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false );
147
 
148
  echo ' <div id="dashboard-widgets-wrap">';
149
  echo ' <div id="dashboard-widgets" class="metabox-holder">';
150
  echo ' <div class="postbox-container" style="' . $width . '">' . "\n";
151
- do_meta_boxes( $this->pagehook_OptionsPage, 'normal', $data );
152
  echo " </div>";
153
  echo ' <div class="postbox-container" style="' . $hide2 . $width . '">' . "\n";
154
- do_meta_boxes( $this->pagehook_OptionsPage, 'side', $data );
155
  echo ' </div>';
156
  echo ' </div>';
157
 
158
  echo '<br class="clear"/>';
159
  echo ' </div>'; //dashboard-widgets-wrap
160
- echo '<p class="submit"><input class="button-primary" type="submit" name="updateoptions" value="' . __( 'Save Changes', 'avhf-ec' ) . '" /></p>';
161
  echo '</form>';
162
 
163
  echo '</div>'; // wrap
164
 
165
 
166
- echo '<script type="text/javascript">' . "\n";
167
- echo ' //<![CDATA[' . "\n";
168
- echo ' jQuery(document).ready( function($) {' . "\n";
169
- echo ' $(\'.if-js-closed\').removeClass(\'if-js-closed\').addClass(\'closed\');' . "\n";
170
- echo ' // postboxes setup' . "\n";
171
- echo ' postboxes.add_postbox_toggles(\'avhfdas-menu-overview\');' . "\n";
172
- echo ' });' . "\n";
173
- echo ' //]]>' . "\n";
174
- echo '</script>';
175
-
176
  $this->printAdminFooter();
177
  }
178
 
@@ -185,6 +413,314 @@ class AVH_EC_Admin
185
  echo $this->printOptions( $data['options_general'], $data['actual_options'] );
186
  }
187
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
188
  /**
189
  * Translation Metabox
190
  * @return unknown_type
@@ -200,8 +736,10 @@ class AVH_EC_Admin
200
  echo '</p>';
201
  echo '<p>';
202
  echo '<span class="b">Available Languages</span></p><p>';
203
- echo 'Czech - Čeština (cs_CZ) by Dirty Mind - <a href="http://dirtymind.ic.cz" target="_blank">http://dirtymind.ic.cz</a><br />';
204
- echo 'Spanish - Español (es_ES) in Launchpad<br/>';
 
 
205
  echo '</p>';
206
  }
207
 
@@ -213,17 +751,90 @@ class AVH_EC_Admin
213
  {
214
  echo '<p>If you enjoy this plug-in please consider a donation. There are several ways you can show your appreciation</p>';
215
  echo '<p>';
216
- echo '<span class="b">Amazon Wish List</span><br />';
 
 
 
217
  echo 'You can send me something from my <a href="http://www.amazon.com/gp/registry/wishlist/1U3DTWZ72PI7W?tag=avh-donation-20">Amazon Wish List</a>';
218
  echo '</p>';
219
  echo '<p>';
220
  echo '<span class="b">Through Paypal.</span><br />';
221
- echo 'Click on the Donate button and you will be directed to Paypal where you can make your donation and you don\'t need to have a Paypal account to make a donation.';
222
- echo '<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=S85FXJ9EBHAF2&lc=US&item_name=AVH%20Plugins&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted" target="_blank" title="Donate">';
223
  echo '<img src="https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif" alt="Donate"/></a>';
224
  echo '</p>';
225
  }
226
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
227
  /**
228
  * Adds Settings next to the plugin actions
229
  *
@@ -232,22 +843,215 @@ class AVH_EC_Admin
232
  */
233
  function filterPluginActions ( $links, $file )
234
  {
235
- static $this_plugin;
236
-
237
- if ( ! $this_plugin )
238
- $this_plugin = $this->core->getBaseDirectory( plugin_basename( $this->core->info['plugin_dir'] ) );
239
- if ( $file )
240
- $file = $this->core->getBaseDirectory( $file );
241
- if ( $file == $this_plugin ) {
242
- $settings_link = '<a href="options-general.php?page=avhec_options">' . __( 'Settings', 'avh-ec' ) . '</a>';
243
- array_unshift( $links, $settings_link ); // before other links
244
- //$links = array_merge ( array ( $settings_link ), $links ); // before other links
245
- }
246
  return $links;
247
 
248
  }
249
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
250
  ############## Admin WP Helper ##############
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
251
  /**
252
  * Display plugin Copyright
253
  *
@@ -270,7 +1074,7 @@ class AVH_EC_Admin
270
  $status = $this->status;
271
  $this->message = $this->status = ''; // Reset
272
  }
273
- if ( $message ) {
274
  $status = ($status != '') ? $status : 'updated fade';
275
  echo '<div id="message" class="' . $status . '">';
276
  echo '<p><strong>' . $message . '</strong></p></div>';
@@ -298,14 +1102,15 @@ class AVH_EC_Admin
298
  $output .= '<tr style="vertical-align: top;"><td class="helper" colspan="2">' . $option[4] . '</td></tr>' . "\n";
299
  continue;
300
  }
301
- switch ( $option[2] ) {
 
302
  case 'checkbox' :
303
  $input_type = '<input type="checkbox" id="' . $option[0] . '" name="' . $option[0] . '" value="' . attribute_escape( $option[3] ) . '" ' . $this->isChecked( '1', $option_actual[$section][$option_key] ) . ' />' . "\n";
304
  $explanation = $option[4];
305
  break;
306
  case 'dropdown' :
307
- $selvalue = explode( '/', $option[3] );
308
- $seltext = explode( '/', $option[4] );
309
  $seldata = '';
310
  foreach ( ( array ) $selvalue as $key => $sel ) {
311
  $seldata .= '<option value="' . $sel . '" ' . (($option_actual[$section][$option_key] == $sel) ? 'selected="selected"' : '') . ' >' . ucfirst( $seltext[$key] ) . '</option>' . "\n";
@@ -314,16 +1119,27 @@ class AVH_EC_Admin
314
  $explanation = $option[5];
315
  break;
316
  case 'text-color' :
317
- $input_type = '<input type="text" ' . (($option[3] > 50) ? ' style="width: 95%" ' : '') . 'id="' . $option[0] . '" name="' . $option[0] . '" value="' . attribute_escape( $option_actual[$section][$option_key] ) . '" size="' . $option[3] . '" /><div class="box_color ' . $option[0] . '"></div>' . "\n";
318
  $explanation = $option[4];
319
  break;
320
  case 'textarea' :
321
- $input_type = '<textarea rows="' . $option[5] . '" ' . (($option[3] > 50) ? ' style="width: 95%" ' : '') . 'id="' . $option[0] . '" name="' . $option[0] . '" size="' . $option[3] . '" />' . attribute_escape( $option_actual[$section][$option_key] ) . '</textarea>';
 
 
 
 
 
 
 
 
 
 
 
322
  $explanation = $option[4];
323
  break;
324
  case 'text' :
325
  default :
326
- $input_type = '<input type="text" ' . (($option[3] > 50) ? ' style="width: 95%" ' : '') . 'id="' . $option[0] . '" name="' . $option[0] . '" value="' . attribute_escape( $option_actual[$section][$option_key] ) . '" size="' . $option[3] . '" />' . "\n";
327
  $explanation = $option[4];
328
  break;
329
  }
@@ -355,10 +1171,37 @@ class AVH_EC_Admin
355
  return $return;
356
  }
357
 
 
 
 
 
 
358
  function displayIcon ( $icon )
359
  {
360
  return ('<div class="icon32" id="icon-' . $icon . '"><br/></div>');
361
  }
362
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
363
  }
364
  ?>
1
  <?php
2
  class AVH_EC_Admin
3
  {
4
+ /**
5
+ *
6
+ * @var AVH_EC_Core
7
+ */
8
  var $core;
9
+
10
+ /**
11
+ *
12
+ * @var AVH_EC_Category_Group
13
+ */
14
+ var $catgrp;
15
+
16
+ var $hooks = array ();
17
  var $message;
18
 
19
+ /**
20
+ * PHP5 constructor
21
+ *
22
+ */
23
  function __construct ()
24
  {
25
 
26
  // Initialize the plugin
27
+ $this->core = & AVH_EC_Singleton::getInstance( 'AVH_EC_Core' );
28
+ $this->catgrp = & AVH_EC_Singleton::getInstance( 'AVH_EC_Category_Group' );
29
+
30
+ add_action( 'wp_ajax_delete-group', array (&$this, 'ajaxDeleteGroup' ) );
31
 
32
  // Admin menu
33
  add_action( 'admin_menu', array (&$this, 'actionAdminMenu' ) );
34
  add_filter( 'plugin_action_links_extended-categories-widget/widget_extended_categories.php', array (&$this, 'filterPluginActions' ), 10, 2 );
35
 
36
+ // Register Style and Scripts
37
+ $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '.dev' : '';
38
+ wp_register_script( 'avhec-categorygroup-js', AVHEC_PLUGIN_URL . '/js/avh-ec.categorygroup' . $suffix . '.js', array ('jquery' ), $this->core->version, true );
39
+ wp_register_style( 'avhec-admin-css', AVHEC_PLUGIN_URL . '/css/avh-ec.admin.css', array ('wp-admin' ), $this->core->version, 'screen' );
40
+
41
+ // Metaboxes for the Category Group on the post and page pages
42
+ add_meta_box( 'avhec_category_group_box_ID', __( 'Category Group', 'avh-ec' ), array (&$this, 'metaboxPostCategoryGroup' ), 'post', 'side', 'core' );
43
+ add_meta_box( 'avhec_category_group_box_ID', __( 'Category Group', 'avh-ec' ), array (&$this, 'metaboxPostCategoryGroup' ), 'page', 'side', 'core' );
44
+
45
+ // Actions used for editing posts
46
+ add_action( 'load-post.php', array (&$this, 'actionLoadPostPage' ) );
47
+ add_action( 'load-page.php', array (&$this, 'actionLoadPostPage' ) );
48
+ add_action( 'save_post', array (&$this, 'actionSaveCategoryGroupTaxonomy' ) );
49
+
50
+ // Actions related to adding and deletes categories
51
+ add_action( "created_category", array ($this, 'actionCreatedCategory' ), 10, 2 );
52
+ add_action( "delete_category", array ($this, 'actionDeleteCategory' ), 10, 2 );
53
+
54
+ add_filter( 'manage_categories_group_columns', array (&$this, 'filterManageCategoriesGroupColumns' ) );
55
+ add_filter( 'explain_nonce_delete-avhecgroup', array (&$this, 'filterExplainNonceDeleteGroup' ), 10, 2 );
56
+
57
  return;
58
  }
59
 
60
+ /**
61
+ * PHP4 Constructor
62
+ *
63
+ */
64
  function AVH_EC_Admin ()
65
  {
66
  $this->__construct();
67
  }
68
 
69
+ /**
70
+ * Shows a metabox on the page post.php and page.php
71
+ * This function gets called in edit-form-advanced.php
72
+ *
73
+ * @param $post
74
+ */
75
+ function metaboxPostCategoryGroup ( $post )
76
+ {
77
+ $options = $this->core->getOptions();
78
+ echo '<p id=\'avhec-cat-group\'';
79
+
80
+ echo '<input type="hidden" name="avhec_category_group_nonce" id="avhec_category_group_nonce" value="' . wp_create_nonce( 'avhec_category_group_nonce' ) . '" />';
81
+
82
+ // Get all the taxonomy terms
83
+ $category_groups = get_terms( $this->catgrp->taxonomy_name, array ('hide_empty' => FALSE ) );
84
+
85
+ echo ' <select name=\'post_avhec_category_group\' id=\'post_avhec_category_group\' class=\'postform\'>';
86
+ $current_category_group = wp_get_object_terms( $post->ID, $this->catgrp->taxonomy_name );
87
+
88
+ foreach ( $category_groups as $group ) {
89
+ if ( ! is_wp_error( $current_category_group ) && ! empty( $current_category_group ) && ! strcmp( $group->term_id, $current_category_group[0]->term_id ) ) {
90
+ echo '<option value="' . $group->term_id . '" selected=\'selected\'>' . $group->name . "</option>\n";
91
+ } else {
92
+ if ( empty( $current_category_group ) && $options['cat_group']['default_group'] == $group->term_id ) {
93
+ echo '<option value="' . $group->term_id . '" selected=\'selected\'>' . $group->name . "</option>\n";
94
+ } else {
95
+ echo '<option value="' . $group->term_id . '">' . $group->name . "</option>\n";
96
+ }
97
+ }
98
+ }
99
+ echo '</select>';
100
+ echo '<em>Selecting the group \'none\' will not show the widget on the page.</em>';
101
+ echo '</p>';
102
+ }
103
+
104
+ /**
105
+ * Called when the post/page is saved. It associates the selected Category Group with the post
106
+ *
107
+ * @param $post_id
108
+ * @return
109
+ */
110
+ function actionSaveCategoryGroupTaxonomy ( $post_id )
111
+ {
112
+ if ( ! wp_verify_nonce( $_POST['avhec_category_group_nonce'], 'avhec_category_group_nonce' ) ) {
113
+ return $post_id;
114
+ }
115
+
116
+ // verify if this is an auto save routine. If it is our form has not been submitted, so we dont want to do anything
117
+ if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )
118
+ return $post_id;
119
+
120
+ // Check permissions
121
+ if ( 'page' == $_POST['post_type'] ) {
122
+ if ( ! current_user_can( 'edit_page', $post_id ) )
123
+ return $post_id;
124
+ } else {
125
+ if ( ! current_user_can( 'edit_post', $post_id ) )
126
+ return $post_id;
127
+ }
128
+
129
+ // OK, we're authenticated: we need to find and save the data
130
+ $group_term_id = ( int ) $_POST['post_avhec_category_group'];
131
+ wp_set_object_terms( $post_id, $group_term_id, $this->catgrp->taxonomy_name );
132
+
133
+ return $post_id;
134
+
135
+ }
136
+
137
+ /**
138
+ * When a category is created this function is called to add the new category to the group all
139
+ * @param $term_id
140
+ * @param $term_taxonomy_id
141
+ */
142
+ function actionCreatedCategory ( $term_id, $term_taxonomy_id )
143
+ {
144
+ $group_id = $this->catgrp->getTermIDBy( 'slug', 'all' );
145
+ $this->catgrp->setCategoriesForGroup( $group_id, ( array ) $term_id );
146
+ }
147
+
148
+ /**
149
+ * When a category is deleted this function is called so the category is deleted from every group as well.
150
+ *
151
+ * @param object $term
152
+ * @param int $term_taxonomy_id
153
+ */
154
+ function actionDeleteCategory ( $term_id, $term_taxonomy_id )
155
+ {
156
+ $this->catgrp->doDeleteCategoryFromGroup( $term_id );
157
+ }
158
+
159
+ /**
160
+ * Enqueues the style on the post.php and page.php pages
161
+ * @WordPress Action load-$pagenow
162
+ *
163
+ */
164
+ function actionLoadPostPage ()
165
+ {
166
+ wp_enqueue_style( 'avhec-admin-css' );
167
+ }
168
+
169
  /**
170
  * Add the Tools and Options to the Management and Options page repectively
171
  *
175
  function actionAdminMenu ()
176
  {
177
 
178
+ // Add menu system
179
+ $folder = $this->core->getBaseDirectory( AVHEC_PLUGIN_DIR );
180
+ add_menu_page( 'AVH Extended Categories', 'AVH Extended Categories', 'manage_options', $folder, array (&$this, 'doMenuOverview' ) );
181
+ $this->hooks['menu_overview'] = add_submenu_page( $folder, 'AVH Extended Categories: ' . __( 'Overview', 'avh-ec' ), __( 'Overview', 'avh-ec' ), 'manage_options', $folder, array (&$this, 'doMenuOverview' ) );
182
+ $this->hooks['menu_general'] = add_submenu_page( $folder, 'AVH Extended Categories: ' . __( 'General Options', 'avh-ec' ), __( 'General Options', 'avh-ec' ), 'manage_options', 'avhec-general', array (&$this, 'doMenuGeneral' ) );
183
+ $this->hooks['menu_category_groups'] = add_submenu_page( $folder, 'AVH Extended Categories: ' . __( 'Category Groups', 'avh-ec' ), __( 'Category Groups', 'avh-ec' ), 'manage_options', 'avhec-grouped', array (&$this, 'doMenuCategoryGroup' ) );
184
+ $this->hooks['menu_faq'] = add_submenu_page( $folder, 'AVH Extended Categories:' . __( 'F.A.Q', 'avh-ec' ), __( 'F.A.Q', 'avh-ec' ), 'manage_options', 'avhec-faq', array (&$this, 'doMenuFAQ' ) );
185
 
186
+ // Add actions for menu pages
187
+ add_action( 'load-' . $this->hooks['menu_overview'], array (&$this, 'actionLoadPageHook_Overview' ) );
188
+ add_action( 'load-' . $this->hooks['menu_general'], array (&$this, 'actionLoadPageHook_General' ) );
189
+ add_action( 'load-' . $this->hooks['menu_category_groups'], array (&$this, 'actionLoadPageHook_CategoryGroup' ) );
190
+ add_action( 'load-' . $this->hooks['menu_faq'], array (&$this, 'actionLoadPageHook_faq' ) );
191
  }
192
 
193
+ /**
194
+ * Setup everything needed for the Overview page
195
+ *
196
+ */
197
+ function actionLoadPageHook_Overview ()
198
  {
199
  // Add metaboxes
200
+ add_meta_box( 'avhecBoxCategoryGroupList', __( 'Group Overview', 'avh-ec' ), array (&$this, 'metaboxCategoryGroupList' ), $this->hooks['menu_overview'], 'normal', 'core' );
 
201
 
202
  add_filter( 'screen_layout_columns', array (&$this, 'filterScreenLayoutColumns' ), 10, 2 );
203
 
204
+ // WordPress core Styles and Scripts
 
205
  wp_enqueue_script( 'common' );
206
  wp_enqueue_script( 'wp-lists' );
207
  wp_enqueue_script( 'postbox' );
208
+ wp_admin_css( 'css/dashboard' );
209
+
210
+ // Plugin Style and Scripts
211
+ wp_enqueue_script( 'avhec-categorygroup-js' );
212
+ wp_enqueue_style( 'avhec-admin-css' );
213
  }
214
 
215
  /**
216
+ * Menu Page Overview
217
  *
218
+ * @return none
 
 
219
  */
220
+ function doMenuOverview ()
 
221
  {
222
+ global $screen_layout_columns;
223
+
224
+ // This box can't be unselectd in the the Screen Options
225
+ add_meta_box( 'avhecBoxAnnouncements', __( 'Announcements', 'avh-ec' ), array (&$this, 'metaboxAnnouncements' ), $this->hooks['menu_overview'], 'side', '' );
226
+ add_meta_box( 'avhecBoxDonations', __( 'Donations', 'avh-ec' ), array (&$this, 'metaboxDonations' ), $this->hooks['menu_overview'], 'side', '' );
227
+
228
+ $hide2 = '';
229
+ switch ( $screen_layout_columns )
230
+ {
231
+ case 2 :
232
+ $width = 'width:49%;';
233
+ break;
234
+ default :
235
+ $width = 'width:98%;';
236
+ $hide2 = 'display:none;';
237
  }
 
238
 
239
+ echo '<div class="wrap avhec-wrap">';
240
+ echo $this->displayIcon( 'index' );
241
+ echo '<h2>' . 'AVH Extended Categories - ' . __( 'Overview', 'avh-ec' ) . '</h2>';
242
+ echo ' <div id="dashboard-widgets-wrap">';
243
+ echo ' <div id="dashboard-widgets" class="metabox-holder">';
244
+ echo ' <div class="postbox-container" style="' . $width . '">' . "\n";
245
+ do_meta_boxes( $this->hooks['menu_overview'], 'normal', '' );
246
+ echo " </div>";
247
+ echo ' <div class="postbox-container" style="' . $hide2 . $width . '">' . "\n";
248
+ do_meta_boxes( $this->hooks['menu_overview'], 'side', '' );
249
+ echo ' </div>';
250
+ echo ' </div>';
251
+
252
+ echo '<br class="clear"/>';
253
+ echo ' </div>'; //dashboard-widgets-wrap
254
+ echo '</div>'; // wrap
255
+
256
+
257
+ $this->printMetaboxGeneralNonces();
258
+ $this->printMetaboxJS( 'overview' );
259
+ $this->printAdminFooter();
260
+ }
261
+
262
+ /**
263
+ * Setup everything needed for the General Options page
264
+ *
265
+ */
266
+ function actionLoadPageHook_General ()
267
+ {
268
+ // Add metaboxes
269
+ add_meta_box( 'avhecBoxOptions', __( 'Options', 'avh-ec' ), array (&$this, 'metaboxOptions' ), $this->hooks['menu_general'], 'normal', 'core' );
270
+
271
+ add_filter( 'screen_layout_columns', array (&$this, 'filterScreenLayoutColumns' ), 10, 2 );
272
+
273
+ // WordPress core Styles and Scripts
274
+ wp_enqueue_script( 'common' );
275
+ wp_enqueue_script( 'wp-lists' );
276
+ wp_enqueue_script( 'postbox' );
277
+ wp_admin_css( 'css/dashboard' );
278
+
279
+ // Plugin Style and Scripts
280
+ wp_enqueue_style( 'avhec-admin-css' );
281
  }
282
 
283
+ /**
284
+ * Menu Page General Options
285
+ *
286
+ * @return none
287
+ */
288
+ function doMenuGeneral ()
289
  {
290
  global $screen_layout_columns;
291
 
292
+ $groups = get_terms( $this->catgrp->taxonomy_name, array ('hide_empty' => FALSE ) );
293
+ foreach ( $groups as $group ) {
294
+ $group_id[] = $group->term_id;
295
+ $groupname[] = $group->name;
296
+ }
297
+
298
+ $options_general[] = array ('avhec[general][alternative_name_select_category]', '<em>Select Category</em> Alternative', 'text', 20, 'Alternative text for Select Category.' );
299
+ $options_general[] = array ('avhec[cat_group][home_group]', 'Home Group', 'dropdown', $group_id, $groupname, 'Select which group to show on the home page.<br />Selecting the group \'none\' will not show the widget on the page.' );
300
+ $options_general[] = array ('avhec[cat_group][no_group]', 'Nonexistence Group', 'dropdown', $group_id, $groupname, 'Select which group to show when there is no group associated with the post.<br />Selecting the group \'none\' will not show the widget on the page.' );
301
+ $options_general[] = array ('avhec[cat_group][default_group]', 'Default Group', 'dropdown', $group_id, $groupname, 'Select which group will be the default group when editing a post.<br />Selecting the group \'none\' will not show the widget on the page.' );
302
+
303
  if ( isset( $_POST['updateoptions'] ) ) {
304
  check_admin_referer( 'avh_ec_generaloptions' );
305
 
314
  $option_key = rtrim( $option[0], ']' );
315
  $option_key = substr( $option_key, strpos( $option_key, '][' ) + 2 );
316
 
317
+ switch ( $section )
318
+ {
319
  case 'general' :
320
+ case 'cat_group' :
321
  $current_value = $options[$section][$option_key];
322
  break;
323
  }
324
  // Every field in a form is set except unchecked checkboxes. Set an unchecked checkbox to 0.
325
  $newval = (isset( $formoptions[$section][$option_key] ) ? attribute_escape( $formoptions[$section][$option_key] ) : 0);
326
  if ( $newval != $current_value ) { // Only process changed fields.
327
+ switch ( $section )
328
+ {
329
  case 'general' :
330
+ case 'cat_group' :
331
  $options[$section][$option_key] = $newval;
332
  break;
333
  }
334
  }
335
  }
336
  $this->core->saveOptions( $options );
337
+ $this->message = __( 'Options saved', 'avh-ec' );
338
  $this->status = 'updated fade';
339
 
340
  }
341
  $this->displayMessage();
342
 
343
  $actual_options = $this->core->getOptions();
344
+ foreach ( $actual_options['cat_group'] as $key => $value ) {
345
+ if ( ! (in_array( $value, ( array ) $group_id )) ) {
346
+ $actual_options['cat_group'][$key] = $this->catgrp->getTermIDBy( 'slug', 'none' );
347
+ }
348
+ }
349
 
350
  $hide2 = '';
351
+ switch ( $screen_layout_columns )
352
+ {
353
  case 2 :
354
  $width = 'width:49%;';
355
  break;
361
  $data['actual_options'] = $actual_options;
362
 
363
  // This box can't be unselectd in the the Screen Options
364
+ add_meta_box( 'avhecBoxDonations', __( 'Donations', 'avh-ec' ), array (&$this, 'metaboxDonations' ), $this->hooks['menu_general'], 'side', 'core' );
365
+
366
  $hide2 = '';
367
+ switch ( $screen_layout_columns )
368
+ {
369
  case 2 :
370
  $width = 'width:49%;';
371
  break;
376
 
377
  echo '<div class="wrap avhec-wrap">';
378
  echo $this->displayIcon( 'index' );
379
+ echo '<h2>' . 'AVH Extended Categories - ' . __( 'General Options', 'avh-ec' ) . '</h2>';
380
  $admin_base_url = $this->core->info['siteurl'] . '/wp-admin/admin.php?page=';
381
+ echo '<form name="avhec-generaloptions" id="avhec-generaloptions" method="POST" action="' . $admin_base_url . 'avhec-general' . '" accept-charset="utf-8" >';
382
  wp_nonce_field( 'avh_ec_generaloptions' );
 
 
383
 
384
  echo ' <div id="dashboard-widgets-wrap">';
385
  echo ' <div id="dashboard-widgets" class="metabox-holder">';
386
  echo ' <div class="postbox-container" style="' . $width . '">' . "\n";
387
+ do_meta_boxes( $this->hooks['menu_general'], 'normal', $data );
388
  echo " </div>";
389
  echo ' <div class="postbox-container" style="' . $hide2 . $width . '">' . "\n";
390
+ do_meta_boxes( $this->hooks['menu_general'], 'side', $data );
391
  echo ' </div>';
392
  echo ' </div>';
393
 
394
  echo '<br class="clear"/>';
395
  echo ' </div>'; //dashboard-widgets-wrap
396
+ echo '<p class="submit"><input class="button" type="submit" name="updateoptions" value="' . __( 'Save Changes', 'avhf-ec' ) . '" /></p>';
397
  echo '</form>';
398
 
399
  echo '</div>'; // wrap
400
 
401
 
402
+ $this->printMetaboxGeneralNonces();
403
+ $this->printMetaboxJS( 'general' );
 
 
 
 
 
 
 
 
404
  $this->printAdminFooter();
405
  }
406
 
413
  echo $this->printOptions( $data['options_general'], $data['actual_options'] );
414
  }
415
 
416
+ /**
417
+ * Setup everything needed for the Category Group page
418
+ *
419
+ */
420
+ function actionLoadPageHook_CategoryGroup ()
421
+ {
422
+
423
+ // Add metaboxes
424
+ add_meta_box( 'avhecBoxCategoryGroupAdd', __( 'Add Group', 'avh-ec' ), array (&$this, 'metaboxCategoryGroupAdd' ), $this->hooks['menu_category_groups'], 'normal', 'core' );
425
+ add_meta_box( 'avhecBoxCategoryGroupList', __( 'Group Overview', 'avh-ec' ), array (&$this, 'metaboxCategoryGroupList' ), $this->hooks['menu_category_groups'], 'side', 'core' );
426
+
427
+ add_filter( 'screen_layout_columns', array (&$this, 'filterScreenLayoutColumns' ), 10, 2 );
428
+
429
+ // WordPress core Styles and Scripts
430
+ wp_enqueue_script( 'common' );
431
+ wp_enqueue_script( 'wp-lists' );
432
+ wp_enqueue_script( 'postbox' );
433
+ wp_enqueue_script( 'avhec-categorygroup-js' );
434
+ wp_admin_css( 'css/dashboard' );
435
+
436
+ // Plugin Style and Scripts
437
+ wp_enqueue_style( 'avhec-admin-css' );
438
+ }
439
+
440
+ /**
441
+ * Menu Page Category Group
442
+ *
443
+ * @return none
444
+ */
445
+ function doMenuCategoryGroup ()
446
+ {
447
+ global $screen_layout_columns;
448
+
449
+ $data_add_group_default = array ('name' => '', 'slug' => '', 'description' => '' );
450
+ $data_add_group_new = $data_add_group_default;
451
+
452
+ $options_add_group[] = array ('avhec_add_group[add][name]', ' Group Name', 'text', 20, 'The name is used to identify the group.' );
453
+ $options_add_group[] = array ('avhec_edit_group[add][slug]', ' Slug Group', 'text', 20, 'The “slug” is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.' );
454
+ $options_add_group[] = array ('avhec_add_group[add][description]', ' Description', 'textarea', 40, 'Description is not prominent by default.', 5 );
455
+
456
+ $options_edit_group[] = array ('avhec_edit_group[edit][name]', ' Group Name', 'text', 20, 'The name is used to identify the group.' );
457
+ $options_edit_group[] = array ('avhec_edit_group[edit][slug]', ' Slug Group', 'text', 20, 'The “slug” is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.' );
458
+ $options_edit_group[] = array ('avhec_edit_group[edit][description]', ' Description', 'textarea', 40, 'Description is not prominent by default.', 5 );
459
+ $options_edit_group[] = array ('avhec_edit_group[edit][categories]', ' Categories', 'catlist', 0, 'Select categories to be included in the group.' );
460
+
461
+ if ( isset( $_POST['addgroup'] ) ) {
462
+ check_admin_referer( 'avh_ec_addgroup' );
463
+
464
+ $formoptions = $_POST['avhec_add_group'];
465
+
466
+ $data_add_group_new['name'] = $formoptions['add']['name'];
467
+ $data_add_group_new['slug'] = empty( $formoptions['add']['slug'] ) ? sanitize_title( $data_add_group_new['name'] ) : sanitize_title( $formoptions['add']['slug'] );
468
+ $data_add_group_new['decsription'] = $formoptions['add']['description'];
469
+
470
+ $id = $this->catgrp->getTermIDBy( 'slug', $data_add_group_new['slug'] );
471
+ if ( ! $id ) {
472
+ $group_id = $this->catgrp->doInsertGroup( $data_add_group_new['name'], array ('description' => $data_add_group_new['description'], 'slug' => $data_add_group_new['slug'] ) );
473
+ $this->catgrp->setCategoriesForGroup( $group_id );
474
+ $this->message = __( 'Category group saved', 'avh-ec' );
475
+ $this->status = 'updated fade';
476
+ $data_add_group_new = $data_add_group_default;
477
+
478
+ } else {
479
+ $group = $this->catgrp->getGroup( $id );
480
+ $this->message = __( 'Category group conflicts with ', 'avh-ec' ) . $group->name;
481
+ $this->message .= '<br />' . __( 'Same slug is used. ', 'avh-ec' );
482
+ $this->status = 'error';
483
+
484
+ }
485
+ $this->displayMessage();
486
+ }
487
+ $data_add_group['add'] = $data_add_group_new;
488
+ $data['add'] = array ('form' => $options_add_group, 'data' => $data_add_group );
489
+
490
+ if ( isset( $_GET['action'] ) ) {
491
+ $action = $_GET['action'];
492
+
493
+ switch ( $action )
494
+ {
495
+ case 'edit' :
496
+ $group_id = ( int ) $_GET['group_ID'];
497
+ $group = $this->catgrp->getGroup( $group_id );
498
+ $cats = $this->catgrp->getCategoriesFromGroup( $group_id );
499
+
500
+ $data_edit_group['edit'] = array ('group_id' => $group_id, 'name' => $group->name, 'slug' => $group->slug, 'description' => $group->description, 'categories' => $cats );
501
+ $data['edit'] = array ('form' => $options_edit_group, 'data' => $data_edit_group );
502
+
503
+ add_meta_box( 'avhecBoxCategoryGroupEdit', __( 'Edit Group', 'avh-ec' ) . ': ' . $group->name, array (&$this, 'metaboxCategoryGroupEdit' ), $this->hooks['menu_category_groups'], 'normal', 'low' );
504
+ break;
505
+ case 'delete' :
506
+ if ( ! isset( $_GET['group_ID'] ) ) {
507
+ wp_redirect( $this->getBackLink() );
508
+ exit();
509
+ }
510
+
511
+ $group_id = ( int ) $_GET['group_ID'];
512
+ check_admin_referer( 'delete-avhecgroup_' . $group_id );
513
+
514
+ if ( ! current_user_can( 'manage_categories' ) ) {
515
+ wp_die( __( 'Cheatin&#8217; uh?' ) );
516
+ }
517
+ $this->catgrp->doDeleteGroup( $group_id );
518
+ break;
519
+ default :
520
+ ;
521
+ break;
522
+ }
523
+ }
524
+
525
+ if ( isset( $_POST['editgroup'] ) ) {
526
+ check_admin_referer( 'avh_ec_editgroup' );
527
+
528
+ $formoptions = $_POST['avhec_edit_group'];
529
+ $selected_categories = $_POST['post_category'];
530
+
531
+ $group_id = ( int ) $_POST['avhec-group_id'];
532
+ $group = $this->catgrp->getGroup( $group_id );
533
+ if ( is_object( $group ) ) {
534
+ $id = wp_update_term( $group->term_id, $this->catgrp->taxonomy_name, array ('name' => $formoptions['edit']['name'], 'slug' => $formoptions['edit']['slug'], 'description' => $formoptions['edit']['description'] ) );
535
+ if ( ! is_wp_error( $id ) ) {
536
+ $this->catgrp->setCategoriesForGroup( $group_id, $selected_categories );
537
+ $this->message = __( 'Category group updated', 'avh-ec' );
538
+ $this->status = 'updated fade';
539
+ } else {
540
+ $this->message = __( 'Category group not updated', 'avh-ec' );
541
+ $this->message .= '<br />' . __( 'Duplicate slug detected', 'avh-ec' );
542
+ $this->status = 'error';
543
+ }
544
+ } else {
545
+ $this->message = __( 'Unknown category group', 'avh-ec' );
546
+ $this->status = 'error';
547
+ }
548
+ $this->displayMessage();
549
+ }
550
+
551
+ $hide2 = '';
552
+ switch ( $screen_layout_columns )
553
+ {
554
+ case 2 :
555
+ $width = 'width:49%;';
556
+ break;
557
+ default :
558
+ $width = 'width:98%;';
559
+ $hide2 = 'display:none;';
560
+ }
561
+
562
+ // This box can't be unselectd in the the Screen Options
563
+ //add_meta_box( 'avhecBoxDonations', __( 'Donations', 'avh-ec' ), array (&$this, 'metaboxDonations' ), $this->hooks['menu_category_groups'], 'side', 'core' );
564
+
565
+
566
+ echo '<div class="wrap avhec-wrap">';
567
+ echo $this->displayIcon( 'index' );
568
+ echo '<h2>' . 'AVH Extended Categories - ' . __( 'Category Groups', 'avh-ec' ) . '</h2>';
569
+ $admin_base_url = $this->core->info['siteurl'] . '/wp-admin/admin.php?page=';
570
+
571
+ echo ' <div id="dashboard-widgets-wrap">';
572
+ echo ' <div id="dashboard-widgets" class="metabox-holder">';
573
+
574
+ echo ' <div class="postbox-container" style="' . $width . '">' . "\n";
575
+ do_meta_boxes( $this->hooks['menu_category_groups'], 'normal', $data );
576
+ echo " </div>";
577
+
578
+ echo ' <div class="postbox-container" style="' . $hide2 . $width . '">' . "\n";
579
+ do_meta_boxes( $this->hooks['menu_category_groups'], 'side', $data );
580
+ echo ' </div>';
581
+
582
+ echo ' </div>'; // dashboard-widgets
583
+ echo '<br class="clear" />';
584
+ echo ' </div>'; //dashboard-widgets-wrap
585
+ echo '</div>'; // wrap
586
+
587
+
588
+ $this->printMetaboxGeneralNonces();
589
+ $this->printMetaboxJS( 'grouped' );
590
+ $this->printAdminFooter();
591
+ }
592
+
593
+ /**
594
+ * Metabox for Adding a group
595
+ * @param $data
596
+ */
597
+ function metaboxCategoryGroupAdd ( $data )
598
+ {
599
+ echo '<form name="avhec-addgroup" id="avhec-addgroup" method="POST" action="' . $this->getBackLink() . '" accept-charset="utf-8" >';
600
+ wp_nonce_field( 'avh_ec_addgroup' );
601
+ echo $this->printOptions( $data['add']['form'], $data['add']['data'] );
602
+ echo '<p class="submit"><input class="button" type="submit" name="addgroup" value="' . __( 'Add group', 'avh-ec' ) . '" /></p>';
603
+ echo '</form>';
604
+ }
605
+
606
+ /**
607
+ * Metabox for showing the groups as a list
608
+ *
609
+ * @param $data
610
+ */
611
+ function metaboxCategoryGroupList ( $data )
612
+ {
613
+ echo '<form id="posts-filter" action="" method="get">';
614
+
615
+ echo '<div class="clear"></div>';
616
+
617
+ echo '<table class="widefat fixed" cellspacing="0">';
618
+ echo '<thead>';
619
+ echo '<tr>';
620
+ print_column_headers( 'categories_group' );
621
+ echo '</tr>';
622
+ echo '</thead>';
623
+
624
+ echo '<tfoot>';
625
+ echo '<tr>';
626
+ print_column_headers( 'categories_group', false );
627
+ echo '</tr>';
628
+ echo '</tfoot>';
629
+
630
+ echo '<tbody id="the-list" class="list:group">';
631
+ $this->printCategoryGroupRows();
632
+ echo '</tbody>';
633
+ echo '</table>';
634
+
635
+ echo '<br class="clear" />';
636
+ echo '</form>';
637
+
638
+ //echo '</div>';
639
+ }
640
+
641
+ /**
642
+ * Metabox Category Group Edit
643
+ *
644
+ */
645
+ function metaboxCategoryGroupEdit ( $data )
646
+ {
647
+ echo '<form name="avhec-editgroup" id="avhec-editgroup" method="POST" action="' . $this->getBackLink() . '" accept-charset="utf-8" >';
648
+ wp_nonce_field( 'avh_ec_editgroup' );
649
+ echo $this->printOptions( $data['edit']['form'], $data['edit']['data'] );
650
+ echo '<input type="hidden" value="' . $data['edit']['data']['edit']['group_id'] . '" name="avhec-group_id" id="avhec-group_id">';
651
+ echo '<p class="submit"><input class="button" type="submit" name="editgroup" value="' . __( 'Update group', 'avh-ec' ) . '" /></p>';
652
+ echo '</form>';
653
+ }
654
+
655
+ /**
656
+ * Setup everything needed for the FAQ page
657
+ *
658
+ */
659
+ function actionLoadPageHook_faq ()
660
+ {
661
+
662
+ add_meta_box( 'avhecBoxFAQ', __( 'F.A.Q.', 'avh-ec' ), array (&$this, 'metaboxFAQ' ), $this->hooks['menu_faq'], 'normal', 'core' );
663
+ add_meta_box( 'avhecBoxTranslation', __( 'Translation', 'avh-ec' ), array (&$this, 'metaboxTranslation' ), $this->hooks['menu_faq'], 'normal', 'core' );
664
+
665
+ add_filter( 'screen_layout_columns', array (&$this, 'filterScreenLayoutColumns' ), 10, 2 );
666
+
667
+ // WordPress core Styles and Scripts
668
+ wp_enqueue_script( 'common' );
669
+ wp_enqueue_script( 'wp-lists' );
670
+ wp_enqueue_script( 'postbox' );
671
+ wp_admin_css( 'css/dashboard' );
672
+
673
+ // Plugin Style and Scripts
674
+ wp_enqueue_style( 'avhec-admin-css' );
675
+
676
+ }
677
+
678
+ /**
679
+ * Menu Page FAQ
680
+ *
681
+ * @return none
682
+ */
683
+ function doMenuFAQ ()
684
+ {
685
+ global $screen_layout_columns;
686
+
687
+ // This box can't be unselectd in the the Screen Options
688
+ add_meta_box( 'avhecBoxAnnouncements', __( 'Announcements', 'avh-ec' ), array (&$this, 'metaboxAnnouncements' ), $this->hooks['menu_faq'], 'side', 'core' );
689
+ add_meta_box( 'avhecBoxDonations', __( 'Donations', 'avh-ec' ), array (&$this, 'metaboxDonations' ), $this->hooks['menu_faq'], 'side', 'core' );
690
+
691
+ $hide2 = '';
692
+ switch ( $screen_layout_columns )
693
+ {
694
+ case 2 :
695
+ $width = 'width:49%;';
696
+ break;
697
+ default :
698
+ $width = 'width:98%;';
699
+ $hide2 = 'display:none;';
700
+ }
701
+
702
+ echo '<div class="wrap avhec-wrap">';
703
+ echo $this->displayIcon( 'index' );
704
+ echo '<h2>' . 'AVH Extended Categories - ' . __( 'F.A.Q', 'avh-ec' ) . '</h2>';
705
+ echo ' <div id="dashboard-widgets-wrap">';
706
+ echo ' <div id="dashboard-widgets" class="metabox-holder">';
707
+ echo ' <div class="postbox-container" style="' . $width . '">' . "\n";
708
+ do_meta_boxes( $this->hooks['menu_faq'], 'normal', '' );
709
+ echo ' </div>';
710
+ echo ' <div class="postbox-container" style="' . $hide2 . $width . '">' . "\n";
711
+ do_meta_boxes( $this->hooks['menu_faq'], 'side', '' );
712
+ echo ' </div>';
713
+ echo ' </div>';
714
+ echo '<br class="clear"/>';
715
+ echo ' </div>'; //dashboard-widgets-wrap
716
+ echo '</div>'; // wrap
717
+
718
+
719
+ $this->printMetaboxGeneralNonces();
720
+ $this->printMetaboxJS( 'faq' );
721
+ $this->printAdminFooter();
722
+ }
723
+
724
  /**
725
  * Translation Metabox
726
  * @return unknown_type
736
  echo '</p>';
737
  echo '<p>';
738
  echo '<span class="b">Available Languages</span></p><p>';
739
+ echo 'Czech - Čeština (cs_CZ) in Launchpad - Dirty Mind - <a href="http://dirtymind.ic.cz" target="_blank">http://dirtymind.ic.cz</a><br />';
740
+ echo 'Spanish - Español (es_ES) in Launchpad<br />';
741
+ echo 'Italian - Italiano (it_IT) in Launchpad - Gianni Diurno - <a href="http://gidibao.net" target="_blank">http://gidibao.net</a><br />';
742
+ echo 'French - Français (fr_FR) in Launchpad - BeAlCoSt - <a href="http://www.aclanester56.com/" target="_blank">http://www.aclanester56.com/</a><br />';
743
  echo '</p>';
744
  }
745
 
751
  {
752
  echo '<p>If you enjoy this plug-in please consider a donation. There are several ways you can show your appreciation</p>';
753
  echo '<p>';
754
+ echo '<span class="b">Amazon</span><br />';
755
+ echo 'If you decide to buy something from Amazon click the button.<br />';
756
+ echo '<a href="https://www.amazon.com/?&tag=avh-donation-20" target="_blank" title="Amazon Homepage"><img alt="Amazon Button" src="' . $this->core->info['graphics_url'] . '/us_banner_logow_120x60.gif" /></a></p>';
757
+ echo '<p>';
758
  echo 'You can send me something from my <a href="http://www.amazon.com/gp/registry/wishlist/1U3DTWZ72PI7W?tag=avh-donation-20">Amazon Wish List</a>';
759
  echo '</p>';
760
  echo '<p>';
761
  echo '<span class="b">Through Paypal.</span><br />';
762
+ echo 'Click on the Donate button and you will be directed to Paypal where you can make your donation and you don\'t need to have a Paypal account to make a donation.<br />';
763
+ echo '<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=S85FXJ9EBHAF2&lc=US&item_name=AVH%20Plugins&item_number=fdas&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted" target="_blank" title="Donate">';
764
  echo '<img src="https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif" alt="Donate"/></a>';
765
  echo '</p>';
766
  }
767
 
768
+ /***
769
+ * F.A.Q Metabox
770
+ * @return none
771
+ */
772
+ function metaboxFAQ ()
773
+ {
774
+
775
+ echo '<p>';
776
+ echo '<span class="b">What about support?</span><br />';
777
+ echo 'I created a support site at http://forums.avirtualhome.com where you can ask questions or request features.<br />';
778
+ echo '</p>';
779
+
780
+ echo '<p>';
781
+ echo '<span class="b">What is depth selection?</span><br />';
782
+ echo 'Starting with version 2.0 and WordPress 2.8 you can select how many levels deep you want to show your categories. This option only works when you select Show Hierarchy as well.<br /><br />';
783
+ echo 'Here is how it works: Say you have 5 top level categories and each top level has a number of children. You could manually select all the Top Level categories you want to show but now you can do the following:<br />';
784
+ echo 'You select to display all categories, select to Show hierarchy and select how many levels you want to show, in this case Toplevel only.<br />';
785
+ echo '</p>';
786
+
787
+ }
788
+
789
+ function metaboxAnnouncements ()
790
+ {
791
+ $php5 = version_compare( '5.2', phpversion(), '<' );
792
+ echo '<p>';
793
+ echo '<span class="b">PHP4 Support</span><br />';
794
+ echo 'The next major release of the plugin will no longer support PHP4.<br />';
795
+ echo 'It will be written for PHP 5.2 and ';
796
+ if ( $php5 ) {
797
+ echo 'your blog already runs the needed PHP version. When the new release comes out you can safely update.<br />';
798
+ } else {
799
+ echo 'your blog still runs PHP4. When the new release comes out you can not use it.<br />';
800
+ echo 'I don\'t have a timeline for the next version but consider contacting your host if PHP 5.2 is available.<br />';
801
+ echo 'If your hosts doesn\'t offer PHP 5.2 you might want to consider switching hosts.<br />';
802
+ echo 'A host to consider is <a href="http://www.lunarpages.com/id/pdoes" target="_blank">Lunarpages</a>.';
803
+ echo 'I run my personal blog there and I am very happy with their services. You can get an account with unlimited bandwidth, storage and much more for a low price.';
804
+ }
805
+ echo '</p>';
806
+
807
+ }
808
+
809
+ /**
810
+ * Sets the amount of columns wanted for a particuler screen
811
+ *
812
+ * @WordPress filter screen_meta_screen
813
+ * @param $screen
814
+ * @return strings
815
+ */
816
+
817
+ function filterScreenLayoutColumns ( $columns, $screen )
818
+ {
819
+ switch ( $screen )
820
+ {
821
+ case $this->hooks['menu_overview'] :
822
+ $columns[$this->hooks['menu_overview']] = 2;
823
+ break;
824
+ case $this->hooks['menu_general'] :
825
+ $columns[$this->hooks['menu_general']] = 2;
826
+ break;
827
+ case $this->hooks['menu_category_groups'] :
828
+ $columns[$this->hooks['menu_category_groups']] = 2;
829
+ break;
830
+ case $this->hooks['menu_faq'] :
831
+ $columns[$this->hooks['menu_faq']] = 2;
832
+ break;
833
+
834
+ }
835
+ return $columns;
836
+ }
837
+
838
  /**
839
  * Adds Settings next to the plugin actions
840
  *
843
  */
844
  function filterPluginActions ( $links, $file )
845
  {
846
+ $settings_link = '<a href="admin.php?page=extended-categories-widget">' . __( 'Settings', 'avh-ec' ) . '</a>';
847
+ array_unshift( $links, $settings_link ); // before other links
 
 
 
 
 
 
 
 
 
848
  return $links;
849
 
850
  }
851
 
852
+ /**
853
+ * Creates a new array for columns headers. Used in print_column_headers. The filter is called from get_column_headers
854
+ *
855
+ * @param $columns
856
+ * @return Array
857
+ * @see print_column_headers
858
+ * @see get_column_headers
859
+ */
860
+ function filterManageCategoriesGroupColumns ( $columns )
861
+ {
862
+ $categories_group_columns = array ('name' => __( 'Name', 'avh-ec' ), 'slug' => 'Slug', 'description' => __( 'Description', 'avh-ec' ), 'cat-in-group' => __( 'Categories in the group', 'avh-ec' ) );
863
+ return $categories_group_columns;
864
+ }
865
+
866
+ /**
867
+ * When not using AJAX, this function is called when the deletion fails.
868
+ *
869
+ * @param string $text
870
+ * @param int $group_id
871
+ * @return string
872
+ * @WordPress Filter explain_nonce_$verb-$noun
873
+ * @see wp_explain_nonce
874
+ */
875
+ function filterExplainNonceDeleteGroup ( $text, $group_id )
876
+ {
877
+ $group = get_term( $group_id, $this->catgrp->taxonomy_name, OBJECT, 'display' );
878
+
879
+ $return = sprintf( __( 'Your attempt to delete this group: &#8220;%s&#8221; has failed.' ), $group->name );
880
+ return ($return);
881
+ }
882
+
883
  ############## Admin WP Helper ##############
884
+
885
+
886
+ /**
887
+ * Get the backlink for forms
888
+ *
889
+ * @return strings
890
+ */
891
+ function getBackLink ()
892
+ {
893
+ $page = basename( __FILE__ );
894
+ if ( isset( $_GET['page'] ) && ! empty( $_GET['page'] ) ) {
895
+ $page = preg_replace( '[^a-zA-Z0-9\.\_\-]', '', $_GET['page'] );
896
+ }
897
+
898
+ if ( function_exists( "admin_url" ) )
899
+ return admin_url( basename( $_SERVER["PHP_SELF"] ) ) . "?page=" . $page;
900
+ else
901
+ return $_SERVER['PHP_SELF'] . "?page=" . $page;
902
+ }
903
+
904
+ /**
905
+ * Print all Category Group rows
906
+ *
907
+ * @uses printCategoryGroupRow
908
+ *
909
+ */
910
+ function printCategoryGroupRows ()
911
+ {
912
+ $cat_groups = get_terms( $this->catgrp->taxonomy_name, array ('hide_empty' => FALSE ) );
913
+
914
+ foreach ( $cat_groups as $group ) {
915
+ if ( 'none' != $group->slug ) {
916
+ echo $this->printCategoryGroupRow( $group->term_id, $group->term_taxonomy_id );
917
+ }
918
+ }
919
+ }
920
+
921
+ /**
922
+ * Displays all the information of a group in a row
923
+ * Adds inline link for delete and/or edit.
924
+ *
925
+ * @param int $group_term_id
926
+ * @param int $group_term_taxonomy_id
927
+ */
928
+ function printCategoryGroupRow ( $group_term_id, $group_term_taxonomy_id )
929
+ {
930
+ static $row_class = '';
931
+
932
+ $group = get_term( $group_term_id, $this->catgrp->taxonomy_name, OBJECT, 'display' );
933
+
934
+ $no_edit[$this->catgrp->getTermIDBy( 'slug', 'all' )] = 0;
935
+ $no_delete[$this->catgrp->getTermIDBy( 'slug', 'all' )] = 0;
936
+
937
+ if ( current_user_can( 'manage_categories' ) ) {
938
+ $actions = array ();
939
+ if ( ! array_key_exists( $group->term_id, $no_edit ) ) {
940
+ $edit_link = "admin.php?page=avhec-grouped&amp;action=edit&amp;group_ID=$group->term_id";
941
+ $edit = "<a class='row-title' href='$edit_link' title='" . esc_attr( sprintf( __( 'Edit &#8220;%s&#8221;' ), $group->name ) ) . "'>" . esc_attr( $group->name ) . '</a><br />';
942
+
943
+ $actions['edit'] = '<a href="' . $edit_link . '">' . __( 'Edit' ) . '</a>';
944
+ } else {
945
+ $edit = esc_attr( $group->name );
946
+ }
947
+ if ( ! (array_key_exists( $group->term_id, $no_delete )) ) {
948
+ $actions['delete'] = "<a class='delete:the-list:group-$group->term_id submitdelete' href='" . wp_nonce_url( "admin.php?page=avhec-grouped&amp;action=delete&amp;group_ID=$group->term_id", 'delete-avhecgroup_' . $group->term_id ) . "'>" . __( 'Delete' ) . "</a>";
949
+ }
950
+ $action_count = count( $actions );
951
+ $i = 0;
952
+ $edit .= '<div class="row-actions">';
953
+ foreach ( $actions as $action => $link ) {
954
+ ++ $i;
955
+ ($i == $action_count) ? $sep = '' : $sep = ' | ';
956
+ $edit .= "<span class='$action'>$link$sep</span>";
957
+ }
958
+ $edit .= '</div>';
959
+ } else {
960
+ $edit = $group->name;
961
+ }
962
+
963
+ $row_class = 'alternate' == $row_class ? '' : 'alternate';
964
+ $qe_data = get_term( $group->term_id, $this->catgrp->taxonomy_name, OBJECT, 'edit' );
965
+
966
+ $output = "<tr id='group-$group->term_id' class='iedit $row_class'>";
967
+
968
+ $columns = get_column_headers( 'categories_group' );
969
+ $hidden = get_hidden_columns( 'categories_group' );
970
+ foreach ( $columns as $column_name => $column_display_name ) {
971
+ $class = 'class="' . $column_name . ' column-' . $column_name . '"';
972
+
973
+ $style = '';
974
+ if ( in_array( $column_name, $hidden ) )
975
+ $style = ' style="display:none;"';
976
+
977
+ $attributes = $class . $style;
978
+
979
+ switch ( $column_name )
980
+ {
981
+ case 'cb' :
982
+ $output .= '<th scope="row" class="check-column">';
983
+ if ( ! (array_key_exists( $group->term_id, $no_delete )) ) {
984
+ $output .= '<input type="checkbox" name="delete[]" value="' . $group->term_id . '" />';
985
+ } else {
986
+ $output .= "&nbsp;";
987
+ }
988
+ $output .= '</th>';
989
+ break;
990
+ case 'name' :
991
+ $output .= '<td ' . $attributes . '>' . $edit;
992
+ $output .= '<div class="hidden" id="inline_' . $qe_data->term_id . '">';
993
+ $output .= '<div class="name">' . $qe_data->name . '</div>';
994
+ $output .= '<div class="slug">' . apply_filters( 'editable_slug', $qe_data->slug ) . '</div>';
995
+ $output .= '</div></td>';
996
+ break;
997
+ case 'description' :
998
+ $output .= '<td ' . $attributes . '>' . $qe_data->description . '</td>';
999
+ break;
1000
+ case 'slug' :
1001
+ $output .= "<td $attributes>" . apply_filters( 'editable_slug', $qe_data->slug ) . "</td>";
1002
+ break;
1003
+ case 'cat-in-group' :
1004
+ $cats = $this->catgrp->getCategoriesFromGroup( $group_term_id );
1005
+ $catname = array ();
1006
+ foreach ( $cats as $cat_id ) {
1007
+ $catname[] = get_cat_name( $cat_id );
1008
+ }
1009
+ natsort( $catname );
1010
+ $cat = implode( ', ', $catname );
1011
+ $output .= '<td ' . $attributes . '>' . $cat . '</td>';
1012
+ break;
1013
+
1014
+ }
1015
+ }
1016
+ $output .= '</tr>';
1017
+
1018
+ return $output;
1019
+ }
1020
+
1021
+ /**
1022
+ * Prints the general nonces, used by the AJAX
1023
+ */
1024
+ function printMetaboxGeneralNonces ()
1025
+ {
1026
+ echo '<form style="display:none" method="get" action="">';
1027
+ echo '<p>';
1028
+ wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false );
1029
+ wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false );
1030
+ echo '</p>';
1031
+ echo '</form>';
1032
+
1033
+ }
1034
+
1035
+ /**
1036
+ * Print the Metabox JS for toggling closed and open
1037
+ *
1038
+ * @param $boxid
1039
+ */
1040
+ function printMetaboxJS ( $boxid )
1041
+ {
1042
+ $a = $this->hooks['menu_' . $boxid];
1043
+ echo '<script type="text/javascript">' . "\n";
1044
+ echo ' //<![CDATA[' . "\n";
1045
+ echo ' jQuery(document).ready( function($) {' . "\n";
1046
+ echo ' $(\'.if-js-closed\').removeClass(\'if-js-closed\').addClass(\'closed\');' . "\n";
1047
+ echo ' // postboxes setup' . "\n";
1048
+ echo ' postboxes.add_postbox_toggles(\'' . $a . '\');' . "\n";
1049
+ echo ' });' . "\n";
1050
+ echo ' //]]>' . "\n";
1051
+ echo '</script>';
1052
+
1053
+ }
1054
+
1055
  /**
1056
  * Display plugin Copyright
1057
  *
1074
  $status = $this->status;
1075
  $this->message = $this->status = ''; // Reset
1076
  }
1077
+ if ( isset( $message ) ) {
1078
  $status = ($status != '') ? $status : 'updated fade';
1079
  echo '<div id="message" class="' . $status . '">';
1080
  echo '<p><strong>' . $message . '</strong></p></div>';
1102
  $output .= '<tr style="vertical-align: top;"><td class="helper" colspan="2">' . $option[4] . '</td></tr>' . "\n";
1103
  continue;
1104
  }
1105
+ switch ( $option[2] )
1106
+ {
1107
  case 'checkbox' :
1108
  $input_type = '<input type="checkbox" id="' . $option[0] . '" name="' . $option[0] . '" value="' . attribute_escape( $option[3] ) . '" ' . $this->isChecked( '1', $option_actual[$section][$option_key] ) . ' />' . "\n";
1109
  $explanation = $option[4];
1110
  break;
1111
  case 'dropdown' :
1112
+ $selvalue = $option[3];
1113
+ $seltext = $option[4];
1114
  $seldata = '';
1115
  foreach ( ( array ) $selvalue as $key => $sel ) {
1116
  $seldata .= '<option value="' . $sel . '" ' . (($option_actual[$section][$option_key] == $sel) ? 'selected="selected"' : '') . ' >' . ucfirst( $seltext[$key] ) . '</option>' . "\n";
1119
  $explanation = $option[5];
1120
  break;
1121
  case 'text-color' :
1122
+ $input_type = '<input type="text" ' . (($option[3] > 1) ? ' style="width: 95%" ' : '') . 'id="' . $option[0] . '" name="' . $option[0] . '" value="' . attribute_escape( $option_actual[$section][$option_key] ) . '" size="' . $option[3] . '" /><div class="box_color ' . $option[0] . '"></div>' . "\n";
1123
  $explanation = $option[4];
1124
  break;
1125
  case 'textarea' :
1126
+ $input_type = '<textarea rows="' . $option[5] . '" ' . (($option[3] > 1) ? ' style="width: 95%" ' : '') . 'id="' . $option[0] . '" name="' . $option[0] . '" size="' . $option[3] . '" />' . attribute_escape( $option_actual[$section][$option_key] ) . '</textarea>';
1127
+ $explanation = $option[4];
1128
+ break;
1129
+ case 'catlist' :
1130
+ ob_start();
1131
+ echo '<div id="avhec-catlist">';
1132
+ echo '<ul>';
1133
+ wp_category_checklist( 0, 0, $option_actual[$section][$option_key] );
1134
+ echo '</ul>';
1135
+ echo '</div>';
1136
+ $input_type = ob_get_contents();
1137
+ ob_end_clean();
1138
  $explanation = $option[4];
1139
  break;
1140
  case 'text' :
1141
  default :
1142
+ $input_type = '<input type="text" ' . (($option[3] > 1) ? ' style="width: 95%" ' : '') . 'id="' . $option[0] . '" name="' . $option[0] . '" value="' . attribute_escape( $option_actual[$section][$option_key] ) . '" size="' . $option[3] . '" />' . "\n";
1143
  $explanation = $option[4];
1144
  break;
1145
  }
1171
  return $return;
1172
  }
1173
 
1174
+ /**
1175
+ * Displays the icon on the menu pages
1176
+ *
1177
+ * @param $icon
1178
+ */
1179
  function displayIcon ( $icon )
1180
  {
1181
  return ('<div class="icon32" id="icon-' . $icon . '"><br/></div>');
1182
  }
1183
 
1184
+ /**
1185
+ * Ajax Helper: inline delete of the groups
1186
+ */
1187
+ function ajaxDeleteGroup ()
1188
+ {
1189
+ $group_id = isset( $_POST['id'] ) ? ( int ) $_POST['id'] : 0;
1190
+ check_ajax_referer( 'delete-avhecgroup_' . $group_id );
1191
+
1192
+ if ( ! current_user_can( 'manage_categories' ) ) {
1193
+ die( '-1' );
1194
+ }
1195
+ $check = $this->catgrp->getGroup( $group_id );
1196
+ if ( false === $check ) {
1197
+ die( '1' );
1198
+ }
1199
+
1200
+ if ( $this->catgrp->doDeleteGroup( $group_id ) ) {
1201
+ die( '1' );
1202
+ } else {
1203
+ die( '0' );
1204
+ }
1205
+ }
1206
  }
1207
  ?>
2.8/class/avh-ec.category-group.php ADDED
@@ -0,0 +1,268 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * AVH Extended Categorie Category Group Class
4
+ *
5
+ * @author Peter van der Does
6
+ * @copyright 2010
7
+ */
8
+ class AVH_EC_Category_Group
9
+ {
10
+ /**
11
+ * Taxonomy name
12
+ * @var string
13
+ */
14
+ var $taxonomy_name;
15
+
16
+ /**
17
+ * PHP4 constructor.
18
+ *
19
+ */
20
+ function AVH_EC_Category_Group ()
21
+ {
22
+ return $this->__construct();
23
+ }
24
+
25
+ /**
26
+ * PHP5 Constructor
27
+ * Init the Database Abstraction layer
28
+ *
29
+ */
30
+ function __construct ()
31
+ {
32
+ global $wpdb;
33
+
34
+ register_shutdown_function( array (&$this, '__destruct' ) );
35
+
36
+
37
+ /**
38
+ * Taxonomy name
39
+ * @var string
40
+ */
41
+ $this->taxonomy_name = 'avhec_catgroup';
42
+
43
+ /**
44
+ * Setup Group Categories Taxonomy
45
+ */
46
+ if (!is_taxonomy($this->taxonomy_name)) {
47
+ register_taxonomy( $this->taxonomy_name, 'post', array ('hierarchical' => false, 'label' => __( 'Category Groups', 'avh-ec' ), 'query_var' => true, 'rewrite' => true ) );
48
+ register_taxonomy( $this->taxonomy_name, 'page', array ('hierarchical' => false, 'label' => __( 'Category Groups', 'avh-ec' ), 'query_var' => true, 'rewrite' => true ) );
49
+ }
50
+
51
+ // add DB pointer
52
+ $wpdb->avhec_cat_group = $wpdb->prefix . 'avhec_category_groups';
53
+
54
+ /**
55
+ * Create the table if it doesn't exist.
56
+ *
57
+ */
58
+ if ( $wpdb->get_var( 'show tables like \'' . $wpdb->avhec_cat_group . '\'' ) != $wpdb->avhec_cat_group ) {
59
+ $this->doCreateTable();
60
+ }
61
+
62
+ // Setup the standard groups if the none group does not exists.
63
+ if ( false === $this->getTermIDBy( 'slug', 'none' ) ) {
64
+ $none_group_id = wp_insert_term( 'none', $this->taxonomy_name, array ('description' => 'This group will not show the widget.' ) );
65
+ $all_group_id = wp_insert_term( 'All', $this->taxonomy_name, array ('description' => 'Holds all the categories.' ) );
66
+ $home_group_id = wp_insert_term( 'Home', $this->taxonomy_name, array ('description' => 'This group will be shown on the front page.' ) );
67
+
68
+ // Fill the standard groups with all categories
69
+ $all_categories = $this->getAllCategoriesTermID();
70
+ $this->setCategoriesForGroup( $all_group_id['term_id'], $all_categories );
71
+ $this->setCategoriesForGroup( $home_group_id['term_id'], $all_categories );
72
+ }
73
+ }
74
+
75
+ /**
76
+ * PHP5 style destructor and will run when database object is destroyed.
77
+ *
78
+ * @return bool Always true
79
+ */
80
+ function __destruct ()
81
+ {
82
+ return true;
83
+ }
84
+
85
+ function doCreateTable ()
86
+ {
87
+ global $wpdb;
88
+
89
+ // Setup the DB Tables
90
+ $charset_collate = '';
91
+
92
+ if ( version_compare( mysql_get_server_info(), '4.1.0', '>=' ) ) {
93
+ if ( ! empty( $wpdb->charset ) )
94
+ $charset_collate = 'DEFAULT CHARACTER SET ' . $wpdb->charset;
95
+ if ( ! empty( $wpdb->collate ) )
96
+ $charset_collate .= ' COLLATE ' . $wpdb->collate;
97
+ }
98
+
99
+ $sql = 'CREATE TABLE `' . $wpdb->avhec_cat_group . '` ( `group_term_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `term_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY (`group_term_id`, `term_id`) )' . $charset_collate . ';';
100
+
101
+ $result = $wpdb->query( $sql );
102
+
103
+ }
104
+
105
+ /**
106
+ * Get all groups term_id
107
+ *
108
+ * @return array Term_id
109
+ */
110
+ function getAllCategoriesTermID ()
111
+ {
112
+ $categories = get_categories();
113
+ foreach ( $categories as $category ) {
114
+ $all_cat_id[] = $category->term_id;
115
+ }
116
+ return ($all_cat_id);
117
+ }
118
+
119
+ /**
120
+ * Get the categories from the given group from the DB
121
+ *
122
+ * @param int $group_id The Taxonomy Term ID
123
+ * @return Array|False categories. Will return FALSE, if the row does not exists.
124
+ *
125
+ */
126
+ function getCategoriesFromGroup ( $group_id )
127
+ {
128
+ global $wpdb;
129
+
130
+ // Query database
131
+ $result = $wpdb->get_results( $wpdb->prepare( 'SELECT * FROM ' . $wpdb->terms . ' t, ' . $wpdb->avhec_cat_group . ' cg WHERE t.term_id = cg.term_id AND cg.group_term_id = %d', $group_id ) );
132
+
133
+ if ( is_array( $result ) ) { // Call succeeded
134
+ if ( empty( $result ) ) { // No rows found
135
+ $return = array ();
136
+ } else {
137
+ foreach ( $result as $row ) {
138
+ $return[] = $row->term_id;
139
+ }
140
+ }
141
+ } else {
142
+ $return = false;
143
+ }
144
+ return ($return);
145
+ }
146
+
147
+ /**
148
+ * Set the categories for the given group from the DB. Insert the group if it doesn't exists.
149
+ *
150
+ * @param int $group_id The Taxonomy Term ID
151
+ * @param array $categories The categories
152
+ * @return Object (false if not found)
153
+ *
154
+ */
155
+ function setCategoriesForGroup ( $group_id, $categories = array() )
156
+ {
157
+ global $wpdb;
158
+
159
+ $old_categories = $this->getCategoriesFromGroup( $group_id );
160
+
161
+ if ( ! is_array( $categories ) ) {
162
+ $categories = array ();
163
+ }
164
+ $new_categories = $categories;
165
+ sort($old_categories);
166
+ sort($new_categories);
167
+ // If the new and old values are the same, no need to update.
168
+ if ( $new_categories === $old_categories ) {
169
+ return false;
170
+ }
171
+
172
+ $new = array_diff( $new_categories, $old_categories );
173
+ $removed = array_diff( $old_categories, $new_categories );
174
+
175
+ if ( ! empty( $new ) ) {
176
+ foreach ( $new as $cat_term_id ) {
177
+ $insert[] = '(' . $group_id . ',' . $cat_term_id . ')';
178
+ }
179
+ $value = implode( ',', $insert );
180
+ $sql = 'INSERT INTO ' . $wpdb->avhec_cat_group . ' (group_term_id, term_id) VALUES ' . $value;
181
+ $result = $wpdb->query( $sql );
182
+
183
+ }
184
+
185
+ if ( ! empty( $removed ) ) {
186
+ $delete = implode( ',', $removed );
187
+ $sql = $wpdb->prepare( 'DELETE FROM ' . $wpdb->avhec_cat_group . ' WHERE group_term_id=%d and term_id IN (' . $delete . ')', $group_id );
188
+ $result = $wpdb->query( $sql );
189
+
190
+ }
191
+
192
+ return $result;
193
+ }
194
+
195
+ /**
196
+ * Same as get_term_by, but returns the ID only if found, else false
197
+ * @param string $field
198
+ * @param string $value
199
+ * @return int|boolean
200
+ */
201
+ function getTermIDBy ( $field, $value )
202
+ {
203
+ $row = get_term_by( $field, $value, $this->taxonomy_name );
204
+ if ( false === $row ) {
205
+ $return = false;
206
+ } else {
207
+ $return = ( int ) $row->term_id;
208
+ }
209
+ return ($return);
210
+ }
211
+
212
+ /**
213
+ * Gets all information of a group
214
+ *
215
+ * @param $group_id
216
+ * @return Object|False Returns False when the group doesn't exists.
217
+ */
218
+ function getGroup ( $group_id )
219
+ {
220
+ global $wpdb;
221
+
222
+ $result = get_term( ( int ) $group_id, $this->taxonomy_name );
223
+ if ( null === $result ) {
224
+ $result = false;
225
+ }
226
+ return ($result);
227
+ }
228
+
229
+ /**
230
+ * Inserts a new group
231
+ *
232
+ * @param $term
233
+ * @param array $args
234
+ */
235
+ function doInsertGroup ( $term, $args = array() )
236
+ {
237
+ $row = wp_insert_term( $term, $this->taxonomy_name, $args );
238
+ return ($row['term_id']);
239
+ }
240
+
241
+ /**
242
+ * Deletes a group
243
+ *
244
+ * @param $group_id
245
+ */
246
+ function doDeleteGroup ( $group_id )
247
+ {
248
+
249
+ global $wpdb;
250
+
251
+ $group = $this->getGroup( $group_id );
252
+ $result = $wpdb->query( $wpdb->prepare( 'DELETE FROM ' . $wpdb->avhec_cat_group . ' WHERE group_term_id=%d', $group_id ) );
253
+ $return = wp_delete_term( $group->term_id, $this->taxonomy_name );
254
+ return ($return);
255
+ }
256
+
257
+ /**
258
+ * Deletes the given category from all groups
259
+ *
260
+ * @param $category_id
261
+ */
262
+ function doDeleteCategoryFromGroup ( $category_id )
263
+ {
264
+ global $wpdb;
265
+ $result = $wpdb->query( $wpdb->prepare( 'DELETE FROM ' . $wpdb->avhec_cat_group . ' WHERE term_id=%d', $category_id ) );
266
+ }
267
+ }
268
+ ?>
2.8/class/avh-ec.core.php CHANGED
@@ -1,12 +1,14 @@
1
  <?php
2
- class AVHExtendedCategoriesCore
3
  {
4
  var $version;
5
  var $comment;
6
  var $info;
7
  var $db_options_core;
8
  var $default_options;
9
- var $default_general_options;
 
 
10
  var $options;
11
 
12
  /**
@@ -15,32 +17,36 @@ class AVHExtendedCategoriesCore
15
  */
16
  function __construct ()
17
  {
18
- $this->version = '2.3.3';
 
 
 
 
 
 
19
  $this->comment = '<!-- AVH Extended Categories version ' . $this->version . ' | http://blog.avirtualhome.com/wordpress-plugins/ -->';
20
- $db_version = 1;
21
  $this->db_options_core = 'avhec';
22
 
23
- // Determine installation path & url
24
- $path = str_replace( '\\', '/', dirname( __FILE__ ) );
25
- $path = substr( $path, strpos( $path, 'plugins' ) + 8, strlen( $path ) );
26
- $path = substr( $path, 0, strlen( $path ) - 6 );
27
 
28
  $info['siteurl'] = get_option( 'siteurl' );
 
 
 
29
 
30
- $info['plugin_url'] = WP_PLUGIN_URL;
31
- $info['plugin_dir'] = WP_PLUGIN_DIR;
32
 
33
- if ( $path != 'plugins' ) {
34
- $info['plugin_url'] .= '/' . $path;
35
- $info['plugin_dir'] .= '/' . $path;
36
- }
37
 
38
- $info['lang_dir'] = $path . '/lang';
39
- // Set class property for info
40
- $this->info = array ('home' => get_option( 'home' ), 'siteurl' => $info['siteurl'], 'plugin_url' => $info['plugin_url'], 'plugin_dir' => $info['plugin_dir'], 'lang_dir' => $info['lang_dir'] );
 
 
41
 
42
- $this->default_general_options = array ('version' => $this->version, 'dbversion' => $db_version, 'selectcategory' => '' );
43
- $this->default_options = array ('general' => $this->default_general_options );
44
 
45
  /**
46
  * Set the options for the program
@@ -48,13 +54,14 @@ class AVHExtendedCategoriesCore
48
  */
49
  $this->loadOptions();
50
 
51
- // Check if we have to do upgrades
52
  if ( (! isset( $this->options['general']['dbversion'] )) || $this->options['general']['dbversion'] < $db_version ) {
53
- $this->doUpgrade();
54
  }
55
 
56
  $this->handleTextdomain();
57
 
 
58
  }
59
 
60
  /**
@@ -62,25 +69,11 @@ class AVHExtendedCategoriesCore
62
  *
63
  * @return AVHExtendedCategoriesCore
64
  */
65
- function AVHExtendedCategoriesCore ()
66
  {
67
  $this->__construct();
68
  }
69
 
70
- /**
71
- * Singleton method
72
- *
73
- * @return object
74
- */
75
- function getInstance ()
76
- {
77
- static $_instance;
78
- if ( $_instance === null ) {
79
- $_instance = & new AVHExtendedCategoriesCore( );
80
- }
81
- return $_instance;
82
- }
83
-
84
  /**
85
  * Loads the i18n
86
  *
@@ -93,29 +86,35 @@ class AVHExtendedCategoriesCore
93
 
94
  }
95
 
 
96
  /**
97
  * Checks if running version is newer and do upgrades if necessary
98
  *
99
  * @since 1.2.3
100
  *
101
  */
102
- function doUpgrade ()
103
  {
104
  $options = $this->getOptions();
105
 
106
- // Add none existing sections and/or elements to the data
107
- foreach ( $this->default_data as $section => $default_data ) {
108
- if ( ! array_key_exists( $section, $data ) ) {
109
- $data[$section] = $default_data;
110
  continue;
111
  }
112
  foreach ( $default_data as $element => $default_value ) {
113
- if ( ! array_key_exists( $element, $data[$section] ) ) {
114
- $data[$section][$element] = $default_value;
115
  }
116
  }
117
  }
 
 
 
 
118
  $options['general']['version'] = $this->version;
 
119
  $this->saveOptions( $options );
120
  }
121
 
@@ -145,20 +144,16 @@ class AVHExtendedCategoriesCore
145
  */
146
  function getBaseDirectory ( $directory )
147
  {
148
- //get public directory structure eg "/top/second/third"
149
- $public_directory = dirname( $directory );
150
- //place each directory into array
151
- $directory_array = explode( '/', $public_directory );
152
- //get highest or top level in array of directory strings
153
- $public_base = max( $directory_array );
154
-
155
- return $public_base;
156
  }
157
 
158
  /*********************************
159
- * *
160
  * Methods for variable: options *
161
- * *
162
  ********************************/
163
 
164
  /**
@@ -235,24 +230,24 @@ class AVHExtendedCategoriesCore
235
  * Display or retrieve the HTML dropdown list of categories.
236
  *
237
  * The list of arguments is below:
238
- * 'show_option_all' (string) - Text to display for showing all categories.
239
- * 'show_option_none' (string) - Text to display for showing no categories.
240
- * 'orderby' (string) default is 'ID' - What column to use for ordering the
241
  * categories.
242
- * 'order' (string) default is 'ASC' - What direction to order categories.
243
- * 'show_last_update' (bool|int) default is 0 - See {@link get_categories()}
244
- * 'show_count' (bool|int) default is 0 - Whether to show how many posts are
245
  * in the category.
246
- * 'hide_empty' (bool|int) default is 1 - Whether to hide categories that
247
  * don't have any posts attached to them.
248
- * 'child_of' (int) default is 0 - See {@link get_categories()}.
249
- * 'exclude' (string) - See {@link get_categories()}.
250
- * 'echo' (bool|int) default is 1 - Whether to display or retrieve content.
251
- * 'depth' (int) - The max depth.
252
- * 'tab_index' (int) - Tab index for select element.
253
- * 'name' (string) - The name attribute value for selected element.
254
- * 'class' (string) - The class attribute value for selected element.
255
- * 'selected' (int) - Which category ID is selected.
256
  *
257
  * The 'hierarchical' argument, which is disabled by default, will override the
258
  * depth argument, unless it is true. When the argument is false, it will
@@ -266,15 +261,19 @@ class AVHExtendedCategoriesCore
266
  */
267
  function avh_wp_dropdown_categories ( $args = '', $selectedonly )
268
  {
269
- $mywalker = new AVH_Walker_CategoryDropdown( );
270
 
271
  $defaults = array ('show_option_all' => '', 'show_option_none' => '', 'orderby' => 'id', 'order' => 'ASC', 'show_last_update' => 0, 'show_count' => 0, 'hide_empty' => 1, 'child_of' => 0, 'exclude' => '', 'echo' => 1, 'selected' => 0, 'hierarchical' => 0, 'name' => 'cat', 'class' => 'postform', 'depth' => 0, 'tab_index' => 0, 'walker' => $mywalker );
272
 
273
  $defaults['selected'] = (is_category()) ? get_query_var( 'cat' ) : 0;
274
 
275
  $r = wp_parse_args( $args, $defaults );
276
- $r['include_last_update_time'] = $r['show_last_update'];
277
 
 
 
 
 
 
278
  extract( $r );
279
 
280
  $tab_index_attribute = '';
@@ -282,6 +281,8 @@ class AVHExtendedCategoriesCore
282
  $tab_index_attribute = ' tabindex="' . $tab_index . '"';
283
 
284
  $categories = get_categories( $r );
 
 
285
 
286
  $output = '';
287
  if ( ! empty( $categories ) ) {
@@ -290,16 +291,16 @@ class AVHExtendedCategoriesCore
290
  if ( $show_option_all ) {
291
  $show_option_all = apply_filters( 'list_cats', $show_option_all );
292
  $selected = ('0' === strval( $r['selected'] )) ? " selected='selected'" : '';
293
- $output .= "\t".'<option value="0"' . $selected . '>' . $show_option_all . '</option>' . "\n";
294
  }
295
 
296
  if ( $show_option_none ) {
297
  $show_option_none = apply_filters( 'list_cats', $show_option_none );
298
  $selected = ('-1' === strval( $r['selected'] )) ? " selected='selected'" : '';
299
- $output .= "\t".'<option value="-1"' . $selected . '>' . $show_option_none . '</option>' . "\n";
300
  }
301
 
302
- if ( $hierarchical && (! $selectonly) ) {
303
  $depth = $r['depth']; // Walk the full depth.
304
  } else {
305
  $depth = - 1; // Flat
@@ -320,29 +321,29 @@ class AVHExtendedCategoriesCore
320
  * Display or retrieve the HTML list of categories.
321
  *
322
  * The list of arguments is below:
323
- * 'show_option_all' (string) - Text to display for showing all categories.
324
- * 'orderby' (string) default is 'ID' - What column to use for ordering the
325
  * categories.
326
- * 'order' (string) default is 'ASC' - What direction to order categories.
327
- * 'show_last_update' (bool|int) default is 0 - See {@link
328
  * walk_category_dropdown_tree()}
329
- * 'show_count' (bool|int) default is 0 - Whether to show how many posts are
330
  * in the category.
331
- * 'hide_empty' (bool|int) default is 1 - Whether to hide categories that
332
  * don't have any posts attached to them.
333
- * 'use_desc_for_title' (bool|int) default is 1 - Whether to use the
334
  * description instead of the category title.
335
- * 'feed' - See {@link get_categories()}.
336
- * 'feed_type' - See {@link get_categories()}.
337
- * 'feed_image' - See {@link get_categories()}.
338
- * 'child_of' (int) default is 0 - See {@link get_categories()}.
339
- * 'exclude' (string) - See {@link get_categories()}.
340
- * 'exclude_tree' (string) - See {@link get_categories()}.
341
- * 'echo' (bool|int) default is 1 - Whether to display or retrieve content.
342
- * 'current_category' (int) - See {@link get_categories()}.
343
- * 'hierarchical' (bool) - See {@link get_categories()}.
344
- * 'title_li' (string) - See {@link get_categories()}.
345
- * 'depth' (int) - The max depth.
346
  *
347
  * @since 2.1.0
348
  *
@@ -351,7 +352,8 @@ class AVHExtendedCategoriesCore
351
  */
352
  function avh_wp_list_categories ( $args = '', $selectedonly )
353
  {
354
- $defaults = array ('show_option_all' => '', 'orderby' => 'name', 'order' => 'ASC', 'show_last_update' => 0, 'style' => 'list', 'show_count' => 0, 'hide_empty' => 1, 'use_desc_for_title' => 1, 'child_of' => 0, 'feed' => '', 'feed_type' => '', 'feed_image' => '', 'exclude' => '', 'exclude_tree' => '', 'current_category' => 0, 'hierarchical' => true, 'title_li' => __( 'Categories' ), 'echo' => 1, 'depth' => 0 );
 
355
 
356
  $r = wp_parse_args( $args, $defaults );
357
 
@@ -359,6 +361,10 @@ class AVHExtendedCategoriesCore
359
  $r['pad_counts'] = true;
360
  }
361
 
 
 
 
 
362
  if ( isset( $r['show_date'] ) ) {
363
  $r['include_last_update_time'] = $r['show_date'];
364
  }
@@ -393,7 +399,7 @@ class AVHExtendedCategoriesCore
393
  if ( empty( $r['current_category'] ) && is_category() )
394
  $r['current_category'] = $wp_query->get_queried_object_id();
395
 
396
- if ( $hierarchical && (! $selectonly) ) {
397
  $depth = $r['depth'];
398
  } else {
399
  $depth = - 1; // Flat.
@@ -414,6 +420,11 @@ class AVHExtendedCategoriesCore
414
  }
415
  }
416
 
 
 
 
 
 
417
  class AVH_Walker_CategoryDropdown extends Walker_CategoryDropdown
418
  {
419
 
@@ -491,5 +502,153 @@ class AVH_Walker_CategoryDropdown extends Walker_CategoryDropdown
491
  return $output;
492
  }
493
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
494
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
495
  ?>
1
  <?php
2
+ class AVH_EC_Core
3
  {
4
  var $version;
5
  var $comment;
6
  var $info;
7
  var $db_options_core;
8
  var $default_options;
9
+ var $default_options_general;
10
+ var $default_options_category_group;
11
+
12
  var $options;
13
 
14
  /**
17
  */
18
  function __construct ()
19
  {
20
+ /**
21
+ *
22
+ * @var AVH_EC_Category_Group
23
+ */
24
+ $catgrp = & AVH_EC_Singleton::getInstance( 'AVH_EC_Category_Group' );
25
+
26
+ $this->version = '3.0';
27
  $this->comment = '<!-- AVH Extended Categories version ' . $this->version . ' | http://blog.avirtualhome.com/wordpress-plugins/ -->';
28
+ $db_version = 2;
29
  $this->db_options_core = 'avhec';
30
 
 
 
 
 
31
 
32
  $info['siteurl'] = get_option( 'siteurl' );
33
+ $info['plugin_dir'] = AVHEC_PLUGIN_DIR;
34
+ $info['lang_dir'] = AVHEC_WORKING_DIR . '/lang';
35
+ $info['graphics_url'] = AVHEC_PLUGIN_URL . '/images';
36
 
37
+ // Set class property for info
38
+ $this->info = array ('home' => get_option( 'home' ), 'siteurl' => $info['siteurl'], 'plugin_dir' => $info['plugin_dir'], 'lang_dir' => $info['lang_dir'], 'graphics_url' => $info['graphics_url'] );
39
 
40
+ // Set the default options
41
+ $this->default_options_general = array ('version' => $this->version, 'dbversion' => $db_version, 'alternative_name_select_category' => '' );
 
 
42
 
43
+ // Set the default category group options
44
+ $no_group_id = $catgrp->getTermIDBy( 'slug', 'all' );
45
+ $home_group_id = $catgrp->getTermIDBy( 'slug', 'home' );
46
+ $default_group_id = $catgrp->getTermIDBy( 'slug', 'all' );
47
+ $this->default_options_category_group = array ('no_group' => $no_group_id, 'home_group' => $home_group_id, 'default_group' => $default_group_id );
48
 
49
+ $this->default_options = array ('general' => $this->default_options_general, 'cat_group' => $this->default_options_category_group );
 
50
 
51
  /**
52
  * Set the options for the program
54
  */
55
  $this->loadOptions();
56
 
57
+ // Check if we have to do updates
58
  if ( (! isset( $this->options['general']['dbversion'] )) || $this->options['general']['dbversion'] < $db_version ) {
59
+ $this->doUpdateOptions($db_version);
60
  }
61
 
62
  $this->handleTextdomain();
63
 
64
+ wp_register_style( 'avhec-widget-css', AVHEC_PLUGIN_URL . '/css/avh-ec.widget.css', array (), $this->version, 'screen' );
65
  }
66
 
67
  /**
69
  *
70
  * @return AVHExtendedCategoriesCore
71
  */
72
+ function AVH_EC_Core ()
73
  {
74
  $this->__construct();
75
  }
76
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
77
  /**
78
  * Loads the i18n
79
  *
86
 
87
  }
88
 
89
+
90
  /**
91
  * Checks if running version is newer and do upgrades if necessary
92
  *
93
  * @since 1.2.3
94
  *
95
  */
96
+ function doUpdateOptions ($db_version)
97
  {
98
  $options = $this->getOptions();
99
 
100
+ // Add none existing sections and/or elements to the options
101
+ foreach ( $this->default_options as $section => $default_data ) {
102
+ if ( ! array_key_exists( $section, $options ) ) {
103
+ $options[$section] = $default_data;
104
  continue;
105
  }
106
  foreach ( $default_data as $element => $default_value ) {
107
+ if ( ! array_key_exists( $element, $options[$section] ) ) {
108
+ $options[$section][$element] = $default_value;
109
  }
110
  }
111
  }
112
+
113
+ /**
114
+ * Update the options to the latests versions
115
+ */
116
  $options['general']['version'] = $this->version;
117
+ $options['general']['dbversion'] = $db_version;
118
  $this->saveOptions( $options );
119
  }
120
 
144
  */
145
  function getBaseDirectory ( $directory )
146
  {
147
+ //place each directory into array and get the last element
148
+ $return = end( explode( '/', $directory ) );
149
+
150
+ return $return;
 
 
 
 
151
  }
152
 
153
  /*********************************
154
+ * *
155
  * Methods for variable: options *
156
+ * *
157
  ********************************/
158
 
159
  /**
230
  * Display or retrieve the HTML dropdown list of categories.
231
  *
232
  * The list of arguments is below:
233
+ * 'show_option_all' (string) - Text to display for showing all categories.
234
+ * 'show_option_none' (string) - Text to display for showing no categories.
235
+ * 'orderby' (string) default is 'ID' - What column to use for ordering the
236
  * categories.
237
+ * 'order' (string) default is 'ASC' - What direction to order categories.
238
+ * 'show_last_update' (bool|int) default is 0 - See {@link get_categories()}
239
+ * 'show_count' (bool|int) default is 0 - Whether to show how many posts are
240
  * in the category.
241
+ * 'hide_empty' (bool|int) default is 1 - Whether to hide categories that
242
  * don't have any posts attached to them.
243
+ * 'child_of' (int) default is 0 - See {@link get_categories()}.
244
+ * 'exclude' (string) - See {@link get_categories()}.
245
+ * 'echo' (bool|int) default is 1 - Whether to display or retrieve content.
246
+ * 'depth' (int) - The max depth.
247
+ * 'tab_index' (int) - Tab index for select element.
248
+ * 'name' (string) - The name attribute value for selected element.
249
+ * 'class' (string) - The class attribute value for selected element.
250
+ * 'selected' (int) - Which category ID is selected.
251
  *
252
  * The 'hierarchical' argument, which is disabled by default, will override the
253
  * depth argument, unless it is true. When the argument is false, it will
261
  */
262
  function avh_wp_dropdown_categories ( $args = '', $selectedonly )
263
  {
264
+ $mywalker = new AVH_Walker_CategoryDropdown();
265
 
266
  $defaults = array ('show_option_all' => '', 'show_option_none' => '', 'orderby' => 'id', 'order' => 'ASC', 'show_last_update' => 0, 'show_count' => 0, 'hide_empty' => 1, 'child_of' => 0, 'exclude' => '', 'echo' => 1, 'selected' => 0, 'hierarchical' => 0, 'name' => 'cat', 'class' => 'postform', 'depth' => 0, 'tab_index' => 0, 'walker' => $mywalker );
267
 
268
  $defaults['selected'] = (is_category()) ? get_query_var( 'cat' ) : 0;
269
 
270
  $r = wp_parse_args( $args, $defaults );
 
271
 
272
+ if ( ! isset( $r['pad_counts'] ) && $r['show_count'] && $r['hierarchical'] ) {
273
+ $r['pad_counts'] = true;
274
+ }
275
+
276
+ $r['include_last_update_time'] = $r['show_last_update'];
277
  extract( $r );
278
 
279
  $tab_index_attribute = '';
281
  $tab_index_attribute = ' tabindex="' . $tab_index . '"';
282
 
283
  $categories = get_categories( $r );
284
+ $name = esc_attr( $name );
285
+ $class = esc_attr( $class );
286
 
287
  $output = '';
288
  if ( ! empty( $categories ) ) {
291
  if ( $show_option_all ) {
292
  $show_option_all = apply_filters( 'list_cats', $show_option_all );
293
  $selected = ('0' === strval( $r['selected'] )) ? " selected='selected'" : '';
294
+ $output .= "\t" . '<option value="0"' . $selected . '>' . $show_option_all . '</option>' . "\n";
295
  }
296
 
297
  if ( $show_option_none ) {
298
  $show_option_none = apply_filters( 'list_cats', $show_option_none );
299
  $selected = ('-1' === strval( $r['selected'] )) ? " selected='selected'" : '';
300
+ $output .= "\t" . '<option value="-1"' . $selected . '>' . $show_option_none . '</option>' . "\n";
301
  }
302
 
303
+ if ( $hierarchical && (! $selectedonly) ) {
304
  $depth = $r['depth']; // Walk the full depth.
305
  } else {
306
  $depth = - 1; // Flat
321
  * Display or retrieve the HTML list of categories.
322
  *
323
  * The list of arguments is below:
324
+ * 'show_option_all' (string) - Text to display for showing all categories.
325
+ * 'orderby' (string) default is 'ID' - What column to use for ordering the
326
  * categories.
327
+ * 'order' (string) default is 'ASC' - What direction to order categories.
328
+ * 'show_last_update' (bool|int) default is 0 - See {@link
329
  * walk_category_dropdown_tree()}
330
+ * 'show_count' (bool|int) default is 0 - Whether to show how many posts are
331
  * in the category.
332
+ * 'hide_empty' (bool|int) default is 1 - Whether to hide categories that
333
  * don't have any posts attached to them.
334
+ * 'use_desc_for_title' (bool|int) default is 1 - Whether to use the
335
  * description instead of the category title.
336
+ * 'feed' - See {@link get_categories()}.
337
+ * 'feed_type' - See {@link get_categories()}.
338
+ * 'feed_image' - See {@link get_categories()}.
339
+ * 'child_of' (int) default is 0 - See {@link get_categories()}.
340
+ * 'exclude' (string) - See {@link get_categories()}.
341
+ * 'exclude_tree' (string) - See {@link get_categories()}.
342
+ * 'echo' (bool|int) default is 1 - Whether to display or retrieve content.
343
+ * 'current_category' (int) - See {@link get_categories()}.
344
+ * 'hierarchical' (bool) - See {@link get_categories()}.
345
+ * 'title_li' (string) - See {@link get_categories()}.
346
+ * 'depth' (int) - The max depth.
347
  *
348
  * @since 2.1.0
349
  *
352
  */
353
  function avh_wp_list_categories ( $args = '', $selectedonly )
354
  {
355
+ $mywalker = new AVHEC_Walker_Category();
356
+ $defaults = array ('show_option_all' => '', 'orderby' => 'name', 'order' => 'ASC', 'show_last_update' => 0, 'style' => 'list', 'show_count' => 0, 'hide_empty' => 1, 'use_desc_for_title' => 1, 'child_of' => 0, 'feed' => '', 'feed_type' => '', 'feed_image' => '', 'exclude' => '', 'exclude_tree' => '', 'current_category' => 0, 'hierarchical' => true, 'title_li' => __( 'Categories' ), 'echo' => 1, 'depth' => 0, 'walker' => $mywalker );
357
 
358
  $r = wp_parse_args( $args, $defaults );
359
 
361
  $r['pad_counts'] = true;
362
  }
363
 
364
+ if ( ! isset( $r['pad_counts'] ) && $r['show_count'] && $r['hierarchical'] ) {
365
+ $r['pad_counts'] = true;
366
+ }
367
+
368
  if ( isset( $r['show_date'] ) ) {
369
  $r['include_last_update_time'] = $r['show_date'];
370
  }
399
  if ( empty( $r['current_category'] ) && is_category() )
400
  $r['current_category'] = $wp_query->get_queried_object_id();
401
 
402
+ if ( $hierarchical && (! $selectedonly) ) {
403
  $depth = $r['depth'];
404
  } else {
405
  $depth = - 1; // Flat.
420
  }
421
  }
422
 
423
+ /**
424
+ * Create HTML dropdown list of Categories.
425
+ *
426
+ * @uses Walker
427
+ */
428
  class AVH_Walker_CategoryDropdown extends Walker_CategoryDropdown
429
  {
430
 
502
  return $output;
503
  }
504
  }
505
+ /**
506
+ * Create HTML list of categories.
507
+ *
508
+ * @uses Walker
509
+ */
510
+ class AVHEC_Walker_Category extends Walker
511
+ {
512
+ /**
513
+ * @see Walker::$tree_type
514
+ * @since 2.1.0
515
+ * @var string
516
+ */
517
+ var $tree_type = 'category';
518
+
519
+ /**
520
+ * @see Walker::$db_fields
521
+ * @since 2.1.0
522
+ * @todo Decouple this
523
+ * @var array
524
+ */
525
+ var $db_fields = array ('parent' => 'parent', 'id' => 'term_id' );
526
+
527
+ /**
528
+ * @see Walker::start_lvl()
529
+ * @since 2.1.0
530
+ *
531
+ * @param string $output Passed by reference. Used to append additional content.
532
+ * @param int $depth Depth of category. Used for tab indentation.
533
+ * @param array $args Will only append content if style argument value is 'list'.
534
+ */
535
+ function start_lvl ( &$output, $depth, $args )
536
+ {
537
+ if ( 'list' != $args['style'] )
538
+ return;
539
+
540
+ $indent = str_repeat( "\t", $depth );
541
+ $output .= $indent . '<ul class="children">' . "\n";
542
+ }
543
+
544
+ /**
545
+ * @see Walker::end_lvl()
546
+ * @since 2.1.0
547
+ *
548
+ * @param string $output Passed by reference. Used to append additional content.
549
+ * @param int $depth Depth of category. Used for tab indentation.
550
+ * @param array $args Will only append content if style argument value is 'list'.
551
+ */
552
+ function end_lvl ( &$output, $depth, $args )
553
+ {
554
+ if ( 'list' != $args['style'] )
555
+ return;
556
+
557
+ $indent = str_repeat( "\t", $depth );
558
+ $output .= $indent . '</ul>' . "\n";
559
+ }
560
+
561
+ /**
562
+ * @see Walker::start_el()
563
+ * @since 2.1.0
564
+ *
565
+ * @param string $output Passed by reference. Used to append additional content.
566
+ * @param object $category Category data object.
567
+ * @param int $depth Depth of category in reference to parents.
568
+ * @param array $args
569
+ */
570
+ function start_el ( &$output, $category, $depth, $args )
571
+ {
572
+ extract( $args );
573
+
574
+ $cat_name = esc_attr( $category->name );
575
+ $cat_name = apply_filters( 'list_cats', $cat_name, $category );
576
+ $link = '<div id="avhec-widget-line"><a href="' . get_category_link( $category->term_id ) . '" ';
577
+ if ( $use_desc_for_title == 0 || empty( $category->description ) )
578
+ $link .= 'title="' . sprintf( __( 'View all posts filed under %s' ), $cat_name ) . '"';
579
+ else
580
+ $link .= 'title="' . esc_attr( strip_tags( apply_filters( 'category_description', $category->description, $category ) ) ) . '"';
581
+ $link .= '>';
582
+ $link .= $cat_name . '</a>';
583
+
584
+ if ( (! empty( $feed_image )) || (! empty( $feed )) ) {
585
+ $link .= '<div id="avhec-widget-rss"> ';
586
+
587
+ if ( empty( $feed_image ) )
588
+ $link .= '(';
589
+
590
+ $link .= '<a href="' . get_category_feed_link( $category->term_id, $feed_type ) . '"';
591
 
592
+ if ( empty( $feed ) )
593
+ $alt = ' alt="' . sprintf( __( 'Feed for all posts filed under %s' ), $cat_name ) . '"';
594
+ else {
595
+ $title = ' title="' . $feed . '"';
596
+ $alt = ' alt="' . $feed . '"';
597
+ $name = $feed;
598
+ $link .= $title;
599
+ }
600
+
601
+ $link .= '>';
602
+
603
+ if ( empty( $feed_image ) )
604
+ $link .= $name;
605
+ else
606
+ $link .= '<img src="' . $feed_image . '"' . $alt . $title . ' />';
607
+ $link .= '</a>';
608
+ if ( empty( $feed_image ) )
609
+ $link .= ')';
610
+ $link .= '</div>';
611
+ }
612
+
613
+ if ( isset( $show_count ) && $show_count )
614
+ $link .= '<div id="avhec-widget-count"> (' . intval( $category->count ) . ')</div>';
615
+
616
+ if ( isset( $show_date ) && $show_date ) {
617
+ $link .= ' ' . gmdate( 'Y-m-d', $category->last_update_timestamp );
618
+ }
619
+
620
+ if ( isset( $current_category ) && $current_category )
621
+ $_current_category = get_category( $current_category );
622
+
623
+ if ( 'list' == $args['style'] ) {
624
+ $output .= "\t" . '<li';
625
+ $class = 'cat-item cat-item-' . $category->term_id;
626
+ if ( isset( $current_category ) && $current_category && ($category->term_id == $current_category) )
627
+ $class .= ' current-cat';
628
+ elseif ( isset( $_current_category ) && $_current_category && ($category->term_id == $_current_category->parent) )
629
+ $class .= ' current-cat-parent';
630
+ $output .= ' class="' . $class . '"';
631
+ $output .= '>' . $link . '</div>' . "\n";
632
+ } else {
633
+ $output .= "\t" . $link . '</div><br />' . "\n";
634
+ }
635
+ }
636
+
637
+ /**
638
+ * @see Walker::end_el()
639
+ * @since 2.1.0
640
+ *
641
+ * @param string $output Passed by reference. Used to append additional content.
642
+ * @param object $page Not used.
643
+ * @param int $depth Depth of category. Not used.
644
+ * @param array $args Only uses 'list' for whether should append to output.
645
+ */
646
+ function end_el ( &$output, $page, $depth, $args )
647
+ {
648
+ if ( 'list' != $args['style'] )
649
+ return;
650
+
651
+ $output .= '</li>' . "\n";
652
+ }
653
+ }
654
  ?>
2.8/class/avh-ec.widgets.php CHANGED
@@ -5,6 +5,10 @@
5
  */
6
  class WP_Widget_AVH_ExtendedCategories_Normal extends WP_Widget
7
  {
 
 
 
 
8
  var $core;
9
 
10
  /**
@@ -13,16 +17,18 @@ class WP_Widget_AVH_ExtendedCategories_Normal extends WP_Widget
13
  */
14
  function __construct ()
15
  {
16
- $this->core = & AVHExtendedCategoriesCore::getInstance();
17
 
18
  //Convert the old option widget_extended_categories to widget_extended-categories
19
  $old = get_option( 'widget_extended_categories' );
20
- if ( ! (false === $old) ) {
21
  update_option( 'widget_extended-categories', $old );
22
  delete_option( 'widget_extended_categories' );
23
  }
24
  $widget_ops = array ('description' => __( "An extended version of the default Categories widget.", 'avh-ec' ) );
25
- WP_Widget::__construct( 'extended-categories', __('AVH Extended Categories'), $widget_ops );
 
 
26
  }
27
 
28
  function WP_Widget_AVH_ExtendedCategories_Normal ()
@@ -40,16 +46,17 @@ class WP_Widget_AVH_ExtendedCategories_Normal extends WP_Widget
40
  {
41
  extract( $args );
42
 
43
- $selectedonly = $instance['selectedonly'] ? '1' : '0';
44
- $c = $instance['count'] ? '1' : '0';
45
- $h = $instance['hierarchical'] ? '1' : '0';
46
  $d = $instance['depth'] ? $instance['depth'] : 0;
47
- $e = $instance['hide_empty'] ? '1' : '0';
 
48
  $s = $instance['sort_column'] ? $instance['sort_column'] : 'name';
49
  $o = $instance['sort_order'] ? $instance['sort_order'] : 'asc';
50
  $r = $instance['rssfeed'] ? 'RSS' : '';
51
  $i = $instance['rssimage'] ? $instance['rssimage'] : '';
52
- $invert = $instance['invert_included'] ? '1' : '0';
53
 
54
  if ( empty( $r ) ) {
55
  $i = '';
@@ -82,11 +89,11 @@ class WP_Widget_AVH_ExtendedCategories_Normal extends WP_Widget
82
 
83
  $options = $this->core->getOptions();
84
  $show_option_none = __( 'Select Category', 'avh-ec' );
85
- if ( $options['general']['selectcategory'] ) {
86
- $show_option_none = $options['general']['selectcategory'];
87
  }
88
 
89
- $cat_args = array ($inc_exc => $included_cats, 'orderby' => $s, 'order' => $o, 'show_count' => $c, 'hide_empty' => $e, 'hierarchical' => $h, 'depth' => $d, 'title_li' => '', 'show_option_none' => $show_option_none, 'feed' => $r, 'feed_image' => $i, 'name' => 'extended-categories-select-' . $this->number );
90
  echo $before_widget;
91
  echo $this->core->comment;
92
  echo $before_title . $title . $after_title;
@@ -123,23 +130,24 @@ class WP_Widget_AVH_ExtendedCategories_Normal extends WP_Widget
123
  {
124
  // update the instance's settings
125
  if ( ! isset( $new_instance['submit'] ) ) {
126
- return false;
127
  }
128
 
129
  $instance = $old_instance;
130
 
131
  $instance['title'] = strip_tags( stripslashes( $new_instance['title'] ) );
132
- $instance['selectedonly'] = $new_instance['selectedonly'] ? 1 : 0;
133
- $instance['count'] = $new_instance['count'] ? 1 : 0;
134
- $instance['hierarchical'] = $new_instance['hierarchical'] ? 1 : 0;
135
- $instance['hide_empty'] = $new_instance['hide_empty'] ? 1 : 0;
 
136
  $instance['sort_column'] = strip_tags( stripslashes( $new_instance['sort_column'] ) );
137
  $instance['sort_order'] = strip_tags( stripslashes( $new_instance['sort_order'] ) );
138
  $instance['style'] = strip_tags( stripslashes( $new_instance['style'] ) );
139
- $instance['rssfeed'] = $new_instance['rssfeed'] ? 1 : 0;
140
  $instance['rssimage'] = strip_tags( stripslashes( $new_instance['rssimage'] ) );
141
  if ( array_key_exists( 'all', $new_instance['post_category'] ) ) {
142
- $instance['post_category'] = false;
143
  } else {
144
  $instance['post_category'] = serialize( $new_instance['post_category'] );
145
  }
@@ -147,11 +155,11 @@ class WP_Widget_AVH_ExtendedCategories_Normal extends WP_Widget
147
  if ( $instance['depth'] < 0 || 11 < $instance['depth'] ) {
148
  $instance['depth'] = 0;
149
  }
150
- $instance['invert_included'] = $new_instance['invert_included'] ? 1 : 0;
151
 
152
  // If only the selected categories are to be displayed, this implies a flat view. Can't be hierarchical
153
- if ( 1 == $new_instance['selectedonly'] ) {
154
- $instance['hierarchical'] = 0;
155
  }
156
  return $instance;
157
  }
@@ -173,6 +181,7 @@ class WP_Widget_AVH_ExtendedCategories_Normal extends WP_Widget
173
  $hierarchical = ( bool ) $instance['hierarchical'];
174
  $depth = ( int ) $instance['depth'];
175
  $hide_empty = ( bool ) $instance['hide_empty'];
 
176
  $sort_id = ($instance['sort_column'] == 'ID') ? ' SELECTED' : '';
177
  $sort_name = ($instance['sort_column'] == 'name') ? ' SELECTED' : '';
178
  $sort_count = ($instance['sort_column'] == 'count') ? ' SELECTED' : '';
@@ -182,15 +191,15 @@ class WP_Widget_AVH_ExtendedCategories_Normal extends WP_Widget
182
  $style_drop = ($instance['style'] == 'drop') ? ' SELECTED' : '';
183
  $rssfeed = ( bool ) $instance['rssfeed'];
184
  $rssimage = esc_attr( $instance['rssimage'] );
185
- $selected_cats = ($instance['post_category'] != '') ? unserialize( $instance['post_category'] ) : false;
186
  $invert_included = ( bool ) $instance['invert_included'];
187
 
188
  if ( $depth < 0 || 11 < $depth ) {
189
  $depth = 0;
190
  }
191
 
192
- if (1 == $selectedonly) {
193
- $hierarchical = 0;
194
  }
195
  echo '<p>';
196
  echo '<label for="' . $this->get_field_id( 'title' ) . '">';
@@ -202,19 +211,19 @@ class WP_Widget_AVH_ExtendedCategories_Normal extends WP_Widget
202
  echo '<p>';
203
 
204
  echo '<label for="' . $this->get_field_id( 'selectedonly' ) . '">';
205
- echo '<input class="checkbox" type="checkbox" id="' . $this->get_field_id( 'selectedonly' ) . '" name="' . $this->get_field_name( 'selectedonly' ) . '" ' . $this->core->isChecked( true, $selectedonly ) . ' /> ';
206
  _e( 'Show selected categories only', 'avh-ec' );
207
  echo '</label>';
208
  echo '<br />';
209
 
210
  echo '<label for="' . $this->get_field_id( 'count' ) . '">';
211
- echo '<input class="checkbox" type="checkbox" id="' . $this->get_field_id( 'count' ) . '" name="' . $this->get_field_name( 'count' ) . '" ' . $this->core->isChecked( true, $count ) . ' /> ';
212
  _e( 'Show post counts', 'avh-ec' );
213
  echo '</label>';
214
  echo '<br />';
215
 
216
- echo '<label for="' . $this->get_field_id( 'hierachical' ) . '">';
217
- echo '<input class="checkbox" type="checkbox" id="' . $this->get_field_id( 'hierachical' ) . '" name="' . $this->get_field_name( 'hierarchical' ) . '" ' . $this->core->isChecked( true, $hierarchical ) . ' /> ';
218
  _e( 'Show hierarchy', 'avh-ec' );
219
  echo '</label>';
220
  echo '<br />';
@@ -232,10 +241,16 @@ class WP_Widget_AVH_ExtendedCategories_Normal extends WP_Widget
232
  echo '<br />';
233
 
234
  echo '<label for="' . $this->get_field_id( 'hide_empty' ) . '">';
235
- echo '<input class="checkbox" type="checkbox" id="' . $this->get_field_id( 'hide_empty' ) . '" name="' . $this->get_field_name( 'hide_empty' ) . '" ' . $this->core->isChecked( true, $hide_empty ) . '/> ';
236
  _e( 'Hide empty categories', 'avh-ec' );
237
  echo '</label>';
238
  echo '<br />';
 
 
 
 
 
 
239
  echo '</p>';
240
 
241
  echo '<p>';
@@ -271,7 +286,7 @@ class WP_Widget_AVH_ExtendedCategories_Normal extends WP_Widget
271
  echo '<p>';
272
 
273
  echo '<label for="' . $this->get_field_id( 'rssfeed' ) . '">';
274
- echo '<input class="checkbox" type="checkbox" id="' . $this->get_field_id( 'rssfeed' ) . '" name="' . $this->get_field_name( 'rssfeed' ) . '" ' . $this->core->isChecked( true, $rssfeed ) . '/> ';
275
  _e( 'Show RSS Feed', 'avh-ec' );
276
  echo '</label>';
277
  echo '<br />';
@@ -287,17 +302,17 @@ class WP_Widget_AVH_ExtendedCategories_Normal extends WP_Widget
287
  echo '<ul id="categorychecklist" class="list:category categorychecklist form-no-clear" style="list-style-type: none; margin-left: 5px; padding-left: 0px; margin-bottom: 20px;">';
288
  echo '<li id="' . $this->get_field_id( 'category--1' ) . '" class="popular-category">';
289
  echo '<label for="' . $this->get_field_id( 'post_category' ) . '" class="selectit">';
290
- echo '<input value="all" id="' . $this->get_field_id( 'post_category' ) . '" name="' . $this->get_field_name( 'post_category' ) . '[all]" type="checkbox" ' . $this->core->isChecked( false, $selected_cats ) . '> ';
291
  _e( 'All Categories', 'avh-ec' );
292
  echo '</label>';
293
  echo '</li>';
294
- $this->avh_wp_category_checklist( 0, 0, $selected_cats, false, $this->number, 1 );
295
  echo '</ul>';
296
  echo '</p>';
297
 
298
  echo '<p>';
299
  echo '<label for="' . $this->get_field_id( 'invert_included' ) . '">';
300
- echo '<input class="checkbox" type="checkbox" id="' . $this->get_field_id( 'invert_included' ) . '" name="' . $this->get_field_name( 'invert_included' ) . '" ' . $this->core->isChecked( true, $invert_included ) . '/> ';
301
  _e( 'Exclude the selected categories', 'avh-ec' );
302
  echo '</label>';
303
  echo '<br />';
@@ -315,7 +330,7 @@ class WP_Widget_AVH_ExtendedCategories_Normal extends WP_Widget
315
  * @param array $popular_cats
316
  * @param int $number
317
  */
318
- function avh_wp_category_checklist ( $post_id = 0, $descendants_and_self = 0, $selected_cats = false, $popular_cats = false, $number, $display = 1 )
319
  {
320
  $walker = new AVH_Walker_Category_Checklist( );
321
  $walker->number = $number;
@@ -336,7 +351,7 @@ class WP_Widget_AVH_ExtendedCategories_Normal extends WP_Widget
336
  if ( is_array( $popular_cats ) )
337
  $args['popular_cats'] = $popular_cats;
338
  else
339
- $args['popular_cats'] = get_terms( 'category', array ('fields' => 'ids', 'orderby' => 'count', 'order' => 'DESC', 'number' => 10, 'hierarchical' => false ) );
340
 
341
  if ( $descendants_and_self ) {
342
  $categories = get_categories( "child_of=$descendants_and_self&hierarchical=0&hide_empty=0" );
@@ -362,7 +377,7 @@ class WP_Widget_AVH_ExtendedCategories_Normal extends WP_Widget
362
  // Then the rest of them
363
  echo call_user_func_array( array (&$walker, 'walk' ), array ($categories, 0, $args ) );
364
  } else {
365
- $return( $all_categories );
366
  }
367
  }
368
  }
@@ -373,6 +388,10 @@ class WP_Widget_AVH_ExtendedCategories_Normal extends WP_Widget
373
  */
374
  class WP_Widget_AVH_ExtendedCategories_Top extends WP_Widget
375
  {
 
 
 
 
376
  var $core;
377
 
378
  /**
@@ -381,10 +400,11 @@ class WP_Widget_AVH_ExtendedCategories_Top extends WP_Widget
381
  */
382
  function __construct ()
383
  {
384
- $this->core = & AVHExtendedCategoriesCore::getInstance();
 
385
 
386
  $widget_ops = array ('description' => __( "Shows the top categories.", 'avh-ec' ) );
387
- WP_Widget::__construct( false, __( 'AVH Extended Categories Top' ), $widget_ops );
388
  }
389
 
390
  function WP_Widget_AVH_ExtendedCategories_Top ()
@@ -411,7 +431,8 @@ class WP_Widget_AVH_ExtendedCategories_Top extends WP_Widget
411
  } elseif ( $a < 1 ) {
412
  $a = 1;
413
  }
414
- $c = $instance['count'] ? '1' : '0';
 
415
  $s = $instance['sort_column'] ? $instance['sort_column'] : 'name';
416
  $o = $instance['sort_order'] ? $instance['sort_order'] : 'asc';
417
  $r = $instance['rssfeed'] ? 'RSS' : '';
@@ -427,14 +448,14 @@ class WP_Widget_AVH_ExtendedCategories_Top extends WP_Widget
427
 
428
  $options = $this->core->getOptions();
429
  $show_option_none = __( 'Select Category', 'avh-ec' );
430
- if ( $options['general']['selectcategory'] ) {
431
- $show_option_none = $options['general']['selectcategory'];
432
  }
433
 
434
- $top_cats = get_terms( 'category', array ('fields' => 'ids', 'orderby' => 'count', 'order' => 'DESC', 'number' => $a, 'hierarchical' => false ) );
435
  $included_cats = implode( ",", $top_cats );
436
 
437
- $cat_args = array ('include' => $included_cats, 'orderby' => $s, 'order' => $o, 'show_count' => $c, 'hide_empty' => 0, 'hierarchical' => 0, 'depth' => - 1, 'title_li' => '', 'show_option_none' => $show_option_none, 'feed' => $r, 'feed_image' => $i, 'name' => 'extended-categories-top-select-' . $this->number );
438
  echo $before_widget;
439
  echo $this->core->comment;
440
  echo $before_title . $title . $after_title;
@@ -464,28 +485,29 @@ class WP_Widget_AVH_ExtendedCategories_Top extends WP_Widget
464
  *
465
  * This function should check that $new_instance is set correctly.
466
  * The newly calculated value of $instance should be returned.
467
- * If "false" is returned, the instance won't be saved/updated.
468
  *
469
  * @param array $new_instance New settings for this instance as input by the user via form()
470
  * @param array $old_instance Old settings for this instance
471
- * @return array Settings to save or bool false to cancel saving
472
  */
473
  function update ( $new_instance, $old_instance )
474
  {
475
  // update the instance's settings
476
  if ( ! isset( $new_instance['submit'] ) ) {
477
- return false;
478
  }
479
 
480
  $instance = $old_instance;
481
 
482
  $instance['title'] = strip_tags( stripslashes( $new_instance['title'] ) );
483
  $instance['amount'] = ( int ) $new_instance['amount'];
484
- $instance['count'] = $new_instance['count'] ? 1 : 0;
 
485
  $instance['sort_column'] = strip_tags( stripslashes( $new_instance['sort_column'] ) );
486
  $instance['sort_order'] = strip_tags( stripslashes( $new_instance['sort_order'] ) );
487
  $instance['style'] = strip_tags( stripslashes( $new_instance['style'] ) );
488
- $instance['rssfeed'] = $new_instance['rssfeed'] ? 1 : 0;
489
  $instance['rssimage'] = strip_tags( stripslashes( $new_instance['rssimage'] ) );
490
 
491
  return $instance;
@@ -506,6 +528,7 @@ class WP_Widget_AVH_ExtendedCategories_Top extends WP_Widget
506
  $amount = 5;
507
  }
508
  $count = ( bool ) $instance['count'];
 
509
  $sort_id = ($instance['sort_column'] == 'ID') ? ' SELECTED' : '';
510
  $sort_name = ($instance['sort_column'] == 'name') ? ' SELECTED' : '';
511
  $sort_count = ($instance['sort_column'] == 'count') ? ' SELECTED' : '';
@@ -536,11 +559,17 @@ class WP_Widget_AVH_ExtendedCategories_Top extends WP_Widget
536
 
537
  echo '<p>';
538
  echo '<label for="' . $this->get_field_id( 'count' ) . '">';
539
- echo '<input class="checkbox" type="checkbox" id="' . $this->get_field_id( 'count' ) . '" name="' . $this->get_field_name( 'count' ) . '" ' . $this->core->isChecked( true, $count ) . ' /> ';
540
  _e( 'Show post counts', 'avh-ec' );
541
  echo '</label>';
542
  echo '<br />';
543
 
 
 
 
 
 
 
544
  echo '<label for="' . $this->get_field_id( 'sort_column' ) . '">';
545
  _e( 'Sort by ', 'avh-ec' );
546
  echo '<select id="' . $this->get_field_id( 'sort_column' ) . '" name="' . $this->get_field_name( 'sort_column' ) . '"> ';
@@ -573,7 +602,7 @@ class WP_Widget_AVH_ExtendedCategories_Top extends WP_Widget
573
  echo '<p>';
574
 
575
  echo '<label for="' . $this->get_field_id( 'rssfeed' ) . '">';
576
- echo '<input class="checkbox" type="checkbox" id="' . $this->get_field_id( 'rssfeed' ) . '" name="' . $this->get_field_name( 'rssfeed' ) . '" ' . $this->core->isChecked( true, $rssfeed ) . '/> ';
577
  _e( 'Show RSS Feed', 'avh-ec' );
578
  echo '</label>';
579
  echo '<br />';
@@ -588,6 +617,254 @@ class WP_Widget_AVH_ExtendedCategories_Top extends WP_Widget
588
  }
589
 
590
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
591
  /**
592
  * Class that will display the categories
593
  *
5
  */
6
  class WP_Widget_AVH_ExtendedCategories_Normal extends WP_Widget
7
  {
8
+ /**
9
+ *
10
+ * @var AVH_EC_Core
11
+ */
12
  var $core;
13
 
14
  /**
17
  */
18
  function __construct ()
19
  {
20
+ $this->core = & AVH_EC_Singleton::getInstance( 'AVH_EC_Core' );
21
 
22
  //Convert the old option widget_extended_categories to widget_extended-categories
23
  $old = get_option( 'widget_extended_categories' );
24
+ if ( ! (FALSE === $old) ) {
25
  update_option( 'widget_extended-categories', $old );
26
  delete_option( 'widget_extended_categories' );
27
  }
28
  $widget_ops = array ('description' => __( "An extended version of the default Categories widget.", 'avh-ec' ) );
29
+ WP_Widget::__construct( 'extended-categories', __( 'AVH Extended Categories' ), $widget_ops );
30
+
31
+ wp_enqueue_style( 'avhec-widget-css' );
32
  }
33
 
34
  function WP_Widget_AVH_ExtendedCategories_Normal ()
46
  {
47
  extract( $args );
48
 
49
+ $selectedonly = $instance['selectedonly'] ? TRUE : FALSE;
50
+ $c = $instance['count'] ? TRUE : FALSE;
51
+ $h = $instance['hierarchical'] ? TRUE : FALSE;
52
  $d = $instance['depth'] ? $instance['depth'] : 0;
53
+ $e = $instance['hide_empty'] ? TRUE : FALSE;
54
+ $use_desc_for_title = $instance['use_desc_for_title'] ? TRUE : FALSE;
55
  $s = $instance['sort_column'] ? $instance['sort_column'] : 'name';
56
  $o = $instance['sort_order'] ? $instance['sort_order'] : 'asc';
57
  $r = $instance['rssfeed'] ? 'RSS' : '';
58
  $i = $instance['rssimage'] ? $instance['rssimage'] : '';
59
+ $invert = $instance['invert_included'] ? TRUE : FALSE;
60
 
61
  if ( empty( $r ) ) {
62
  $i = '';
89
 
90
  $options = $this->core->getOptions();
91
  $show_option_none = __( 'Select Category', 'avh-ec' );
92
+ if ( $options['general']['alternative_name_select_category'] ) {
93
+ $show_option_none = $options['general']['alternative_name_select_category'];
94
  }
95
 
96
+ $cat_args = array ($inc_exc => $included_cats, 'orderby' => $s, 'order' => $o, 'show_count' => $c, 'use_desc_for_title' => $use_desc_for_title, 'hide_empty' => $e, 'hierarchical' => $h, 'depth' => $d, 'title_li' => '', 'show_option_none' => $show_option_none, 'feed' => $r, 'feed_image' => $i, 'name' => 'extended-categories-select-' . $this->number );
97
  echo $before_widget;
98
  echo $this->core->comment;
99
  echo $before_title . $title . $after_title;
130
  {
131
  // update the instance's settings
132
  if ( ! isset( $new_instance['submit'] ) ) {
133
+ return FALSE;
134
  }
135
 
136
  $instance = $old_instance;
137
 
138
  $instance['title'] = strip_tags( stripslashes( $new_instance['title'] ) );
139
+ $instance['selectedonly'] = $new_instance['selectedonly'] ? TRUE : FALSE;
140
+ $instance['count'] = $new_instance['count'] ? TRUE : FALSE;
141
+ $instance['hierarchical'] = $new_instance['hierarchical'] ? TRUE : FALSE;
142
+ $instance['hide_empty'] = $new_instance['hide_empty'] ? TRUE : FALSE;
143
+ $instance['use_desc_for_title'] = $new_instance['use_desc_for_title'] ? TRUE : FALSE;
144
  $instance['sort_column'] = strip_tags( stripslashes( $new_instance['sort_column'] ) );
145
  $instance['sort_order'] = strip_tags( stripslashes( $new_instance['sort_order'] ) );
146
  $instance['style'] = strip_tags( stripslashes( $new_instance['style'] ) );
147
+ $instance['rssfeed'] = $new_instance['rssfeed'] ? TRUE : FALSE;
148
  $instance['rssimage'] = strip_tags( stripslashes( $new_instance['rssimage'] ) );
149
  if ( array_key_exists( 'all', $new_instance['post_category'] ) ) {
150
+ $instance['post_category'] = FALSE;
151
  } else {
152
  $instance['post_category'] = serialize( $new_instance['post_category'] );
153
  }
155
  if ( $instance['depth'] < 0 || 11 < $instance['depth'] ) {
156
  $instance['depth'] = 0;
157
  }
158
+ $instance['invert_included'] = $new_instance['invert_included'] ? TRUE : FALSE;
159
 
160
  // If only the selected categories are to be displayed, this implies a flat view. Can't be hierarchical
161
+ if ( TRUE == $new_instance['selectedonly'] ) {
162
+ $instance['hierarchical'] = FALSE;
163
  }
164
  return $instance;
165
  }
181
  $hierarchical = ( bool ) $instance['hierarchical'];
182
  $depth = ( int ) $instance['depth'];
183
  $hide_empty = ( bool ) $instance['hide_empty'];
184
+ $use_desc_for_title = ( bool ) $instance['use_desc_for_title'];
185
  $sort_id = ($instance['sort_column'] == 'ID') ? ' SELECTED' : '';
186
  $sort_name = ($instance['sort_column'] == 'name') ? ' SELECTED' : '';
187
  $sort_count = ($instance['sort_column'] == 'count') ? ' SELECTED' : '';
191
  $style_drop = ($instance['style'] == 'drop') ? ' SELECTED' : '';
192
  $rssfeed = ( bool ) $instance['rssfeed'];
193
  $rssimage = esc_attr( $instance['rssimage'] );
194
+ $selected_cats = ($instance['post_category'] != '') ? unserialize( $instance['post_category'] ) : FALSE;
195
  $invert_included = ( bool ) $instance['invert_included'];
196
 
197
  if ( $depth < 0 || 11 < $depth ) {
198
  $depth = 0;
199
  }
200
 
201
+ if ( TRUE == $selectedonly ) {
202
+ $hierarchical = FALSE;
203
  }
204
  echo '<p>';
205
  echo '<label for="' . $this->get_field_id( 'title' ) . '">';
211
  echo '<p>';
212
 
213
  echo '<label for="' . $this->get_field_id( 'selectedonly' ) . '">';
214
+ echo '<input class="checkbox" type="checkbox" id="' . $this->get_field_id( 'selectedonly' ) . '" name="' . $this->get_field_name( 'selectedonly' ) . '" ' . $this->core->isChecked( TRUE, $selectedonly ) . ' /> ';
215
  _e( 'Show selected categories only', 'avh-ec' );
216
  echo '</label>';
217
  echo '<br />';
218
 
219
  echo '<label for="' . $this->get_field_id( 'count' ) . '">';
220
+ echo '<input class="checkbox" type="checkbox" id="' . $this->get_field_id( 'count' ) . '" name="' . $this->get_field_name( 'count' ) . '" ' . $this->core->isChecked( TRUE, $count ) . ' /> ';
221
  _e( 'Show post counts', 'avh-ec' );
222
  echo '</label>';
223
  echo '<br />';
224
 
225
+ echo '<label for="' . $this->get_field_id( 'hierarchical' ) . '">';
226
+ echo '<input class="checkbox" type="checkbox" id="' . $this->get_field_id( 'hierarchical' ) . '" name="' . $this->get_field_name( 'hierarchical' ) . '" ' . $this->core->isChecked( TRUE, $hierarchical ) . ' /> ';
227
  _e( 'Show hierarchy', 'avh-ec' );
228
  echo '</label>';
229
  echo '<br />';
241
  echo '<br />';
242
 
243
  echo '<label for="' . $this->get_field_id( 'hide_empty' ) . '">';
244
+ echo '<input class="checkbox" type="checkbox" id="' . $this->get_field_id( 'hide_empty' ) . '" name="' . $this->get_field_name( 'hide_empty' ) . '" ' . $this->core->isChecked( TRUE, $hide_empty ) . '/> ';
245
  _e( 'Hide empty categories', 'avh-ec' );
246
  echo '</label>';
247
  echo '<br />';
248
+
249
+ echo '<label for="' . $this->get_field_id( 'use_desc_for_title' ) . '">';
250
+ echo '<input class="checkbox" type="checkbox" id="' . $this->get_field_id( 'use_desc_for_title' ) . '" name="' . $this->get_field_name( 'use_desc_for_title' ) . '" ' . $this->core->isChecked( TRUE, $use_desc_for_title ) . '/> ';
251
+ _e( 'Use description for title', 'avh-ec' );
252
+ echo '</label>';
253
+ echo '<br />';
254
  echo '</p>';
255
 
256
  echo '<p>';
286
  echo '<p>';
287
 
288
  echo '<label for="' . $this->get_field_id( 'rssfeed' ) . '">';
289
+ echo '<input class="checkbox" type="checkbox" id="' . $this->get_field_id( 'rssfeed' ) . '" name="' . $this->get_field_name( 'rssfeed' ) . '" ' . $this->core->isChecked( TRUE, $rssfeed ) . '/> ';
290
  _e( 'Show RSS Feed', 'avh-ec' );
291
  echo '</label>';
292
  echo '<br />';
302
  echo '<ul id="categorychecklist" class="list:category categorychecklist form-no-clear" style="list-style-type: none; margin-left: 5px; padding-left: 0px; margin-bottom: 20px;">';
303
  echo '<li id="' . $this->get_field_id( 'category--1' ) . '" class="popular-category">';
304
  echo '<label for="' . $this->get_field_id( 'post_category' ) . '" class="selectit">';
305
+ echo '<input value="all" id="' . $this->get_field_id( 'post_category' ) . '" name="' . $this->get_field_name( 'post_category' ) . '[all]" type="checkbox" ' . $this->core->isChecked( FALSE, $selected_cats ) . '> ';
306
  _e( 'All Categories', 'avh-ec' );
307
  echo '</label>';
308
  echo '</li>';
309
+ $this->avh_wp_category_checklist( 0, 0, $selected_cats, FALSE, $this->number, 1 );
310
  echo '</ul>';
311
  echo '</p>';
312
 
313
  echo '<p>';
314
  echo '<label for="' . $this->get_field_id( 'invert_included' ) . '">';
315
+ echo '<input class="checkbox" type="checkbox" id="' . $this->get_field_id( 'invert_included' ) . '" name="' . $this->get_field_name( 'invert_included' ) . '" ' . $this->core->isChecked( TRUE, $invert_included ) . '/> ';
316
  _e( 'Exclude the selected categories', 'avh-ec' );
317
  echo '</label>';
318
  echo '<br />';
330
  * @param array $popular_cats
331
  * @param int $number
332
  */
333
+ function avh_wp_category_checklist ( $post_id = 0, $descendants_and_self = 0, $selected_cats = FALSE, $popular_cats = FALSE, $number, $display = 1 )
334
  {
335
  $walker = new AVH_Walker_Category_Checklist( );
336
  $walker->number = $number;
351
  if ( is_array( $popular_cats ) )
352
  $args['popular_cats'] = $popular_cats;
353
  else
354
+ $args['popular_cats'] = get_terms( 'category', array ('fields' => 'ids', 'orderby' => 'count', 'order' => 'DESC', 'number' => 10, 'hierarchical' => FALSE ) );
355
 
356
  if ( $descendants_and_self ) {
357
  $categories = get_categories( "child_of=$descendants_and_self&hierarchical=0&hide_empty=0" );
377
  // Then the rest of them
378
  echo call_user_func_array( array (&$walker, 'walk' ), array ($categories, 0, $args ) );
379
  } else {
380
+ return ($all_categories);
381
  }
382
  }
383
  }
388
  */
389
  class WP_Widget_AVH_ExtendedCategories_Top extends WP_Widget
390
  {
391
+ /**
392
+ *
393
+ * @var AVH_EC_Core
394
+ */
395
  var $core;
396
 
397
  /**
400
  */
401
  function __construct ()
402
  {
403
+ $this->core = & AVH_EC_Singleton::getInstance( 'AVH_EC_Core' );
404
+ wp_enqueue_style( 'avhec-widget-css' );
405
 
406
  $widget_ops = array ('description' => __( "Shows the top categories.", 'avh-ec' ) );
407
+ WP_Widget::__construct( FALSE, __( 'AVH Extended Categories: Top Categories' ), $widget_ops );
408
  }
409
 
410
  function WP_Widget_AVH_ExtendedCategories_Top ()
431
  } elseif ( $a < 1 ) {
432
  $a = 1;
433
  }
434
+ $c = $instance['count'] ? TRUE : FALSE;
435
+ $use_desc_for_title = $instance['use_desc_for_title'] ? TRUE : FALSE;
436
  $s = $instance['sort_column'] ? $instance['sort_column'] : 'name';
437
  $o = $instance['sort_order'] ? $instance['sort_order'] : 'asc';
438
  $r = $instance['rssfeed'] ? 'RSS' : '';
448
 
449
  $options = $this->core->getOptions();
450
  $show_option_none = __( 'Select Category', 'avh-ec' );
451
+ if ( $options['general']['alternative_name_select_category'] ) {
452
+ $show_option_none = $options['general']['alternative_name_select_category'];
453
  }
454
 
455
+ $top_cats = get_terms( 'category', array ('fields' => 'ids', 'orderby' => 'count', 'order' => 'DESC', 'number' => $a, 'hierarchical' => FALSE ) );
456
  $included_cats = implode( ",", $top_cats );
457
 
458
+ $cat_args = array ('include' => $included_cats, 'orderby' => $s, 'order' => $o, 'show_count' => $c, 'use_desc_for_title' => $use_desc_for_title, 'hide_empty' => FALSE, 'hierarchical' => FALSE, 'depth' => - 1, 'title_li' => '', 'show_option_none' => $show_option_none, 'feed' => $r, 'feed_image' => $i, 'name' => 'extended-categories-top-select-' . $this->number );
459
  echo $before_widget;
460
  echo $this->core->comment;
461
  echo $before_title . $title . $after_title;
485
  *
486
  * This function should check that $new_instance is set correctly.
487
  * The newly calculated value of $instance should be returned.
488
+ * If "FALSE" is returned, the instance won't be saved/updated.
489
  *
490
  * @param array $new_instance New settings for this instance as input by the user via form()
491
  * @param array $old_instance Old settings for this instance
492
+ * @return array Settings to save or bool FALSE to cancel saving
493
  */
494
  function update ( $new_instance, $old_instance )
495
  {
496
  // update the instance's settings
497
  if ( ! isset( $new_instance['submit'] ) ) {
498
+ return FALSE;
499
  }
500
 
501
  $instance = $old_instance;
502
 
503
  $instance['title'] = strip_tags( stripslashes( $new_instance['title'] ) );
504
  $instance['amount'] = ( int ) $new_instance['amount'];
505
+ $instance['count'] = $new_instance['count'] ? TRUE : FALSE;
506
+ $instance['use_desc_for_title'] = $new_instance['use_desc_for_title'] ? TRUE : FALSE;
507
  $instance['sort_column'] = strip_tags( stripslashes( $new_instance['sort_column'] ) );
508
  $instance['sort_order'] = strip_tags( stripslashes( $new_instance['sort_order'] ) );
509
  $instance['style'] = strip_tags( stripslashes( $new_instance['style'] ) );
510
+ $instance['rssfeed'] = $new_instance['rssfeed'] ? TRUE : FALSE;
511
  $instance['rssimage'] = strip_tags( stripslashes( $new_instance['rssimage'] ) );
512
 
513
  return $instance;
528
  $amount = 5;
529
  }
530
  $count = ( bool ) $instance['count'];
531
+ $use_desc_for_title = ( bool ) $instance['use_desc_for_title'];
532
  $sort_id = ($instance['sort_column'] == 'ID') ? ' SELECTED' : '';
533
  $sort_name = ($instance['sort_column'] == 'name') ? ' SELECTED' : '';
534
  $sort_count = ($instance['sort_column'] == 'count') ? ' SELECTED' : '';
559
 
560
  echo '<p>';
561
  echo '<label for="' . $this->get_field_id( 'count' ) . '">';
562
+ echo '<input class="checkbox" type="checkbox" id="' . $this->get_field_id( 'count' ) . '" name="' . $this->get_field_name( 'count' ) . '" ' . $this->core->isChecked( TRUE, $count ) . ' /> ';
563
  _e( 'Show post counts', 'avh-ec' );
564
  echo '</label>';
565
  echo '<br />';
566
 
567
+ echo '<label for="' . $this->get_field_id( 'use_desc_for_title' ) . '">';
568
+ echo '<input class="checkbox" type="checkbox" id="' . $this->get_field_id( 'use_desc_for_title' ) . '" name="' . $this->get_field_name( 'use_desc_for_title' ) . '" ' . $this->core->isChecked( TRUE, $use_desc_for_title ) . '/> ';
569
+ _e( 'Use description for title', 'avh-ec' );
570
+ echo '</label>';
571
+ echo '<br />';
572
+
573
  echo '<label for="' . $this->get_field_id( 'sort_column' ) . '">';
574
  _e( 'Sort by ', 'avh-ec' );
575
  echo '<select id="' . $this->get_field_id( 'sort_column' ) . '" name="' . $this->get_field_name( 'sort_column' ) . '"> ';
602
  echo '<p>';
603
 
604
  echo '<label for="' . $this->get_field_id( 'rssfeed' ) . '">';
605
+ echo '<input class="checkbox" type="checkbox" id="' . $this->get_field_id( 'rssfeed' ) . '" name="' . $this->get_field_name( 'rssfeed' ) . '" ' . $this->core->isChecked( TRUE, $rssfeed ) . '/> ';
606
  _e( 'Show RSS Feed', 'avh-ec' );
607
  echo '</label>';
608
  echo '<br />';
617
  }
618
 
619
  }
620
+
621
+ /**
622
+ * Widget Class for displaying the grouped categories
623
+ *
624
+ */
625
+ class WP_Widget_AVH_ExtendedCategories_Category_Group extends WP_Widget
626
+ {
627
+ /**
628
+ *
629
+ * @var AVH_EC_Core
630
+ */
631
+ var $core;
632
+
633
+ /**
634
+ * PHP 5 Constructor
635
+ *
636
+ */
637
+ function __construct ()
638
+ {
639
+ $this->core = & AVH_EC_Singleton::getInstance( 'AVH_EC_Core' );
640
+ wp_enqueue_style( 'avhec-widget-css' );
641
+
642
+ $widget_ops = array ('description' => __( "Shows grouped categories.", 'avh-ec' ) );
643
+ WP_Widget::__construct( FALSE, __( 'AVH Extended Category: Category Group' ), $widget_ops );
644
+ }
645
+
646
+ function WP_Widget_AVH_ExtendedCategories_Category_Group ()
647
+ {
648
+ $this->__construct();
649
+ }
650
+
651
+ /**
652
+ * Display the widget
653
+ *
654
+ * @param unknown_type $args
655
+ * @param unknown_type $instance
656
+ */
657
+ function widget ( $args, $instance )
658
+ {
659
+ global $post;
660
+ $catgrp = new AVH_EC_Category_Group( );
661
+ extract( $args );
662
+
663
+ $c = $instance['count'] ? TRUE : FALSE;
664
+ $e = $instance['hide_empty'] ? TRUE : FALSE;
665
+ $use_desc_for_title = $instance['use_desc_for_title'] ? TRUE : FALSE;
666
+ $s = $instance['sort_column'] ? $instance['sort_column'] : 'name';
667
+ $o = $instance['sort_order'] ? $instance['sort_order'] : 'asc';
668
+ $r = $instance['rssfeed'] ? 'RSS' : '';
669
+ $i = $instance['rssimage'] ? $instance['rssimage'] : '';
670
+
671
+ if ( empty( $r ) ) {
672
+ $i = '';
673
+ }
674
+
675
+ $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? __( 'Categories', 'avh-ec' ) : $instance['title'] );
676
+ $style = empty( $instance['style'] ) ? 'list' : $instance['style'];
677
+
678
+ $options = $this->core->getOptions();
679
+
680
+ $row = array ();
681
+ if ( is_home() ) {
682
+ $row = get_term_by( 'id', $options['cat_group']['home_group'], $catgrp->taxonomy_name ); // Returns FALSE when non-existance. (empty(FALSE)=TRUE)
683
+ } else {
684
+ $terms = wp_get_object_terms( $post->ID, $catgrp->taxonomy_name );
685
+ if ( ! empty( $terms ) ) {
686
+ $row = $terms[0];
687
+ }
688
+ }
689
+
690
+ if ( empty( $row ) ) { // There is no group associated with the post or the home group is empty
691
+ $options = $this->core->options;
692
+ $no_cat_group = $options['cat_group']['no_group'];
693
+ $row = get_term_by( 'id', $no_cat_group, $catgrp->taxonomy_name );
694
+ }
695
+
696
+ if ( ! ('none' == $row->name) ) {
697
+ $group_id = $row->term_id;
698
+ $cats = $catgrp->getCategoriesFromGroup( $group_id );
699
+ $included_cats = implode( ',', $cats );
700
+
701
+ $show_option_none = __( 'Select Category', 'avh-ec' );
702
+ if ( $options['general']['alternative_name_select_category'] ) {
703
+ $show_option_none = $options['general']['alternative_name_select_category'];
704
+ }
705
+
706
+ $cat_args = array ('include' => $included_cats, 'orderby' => $s, 'order' => $o, 'show_count' => $c, 'use_desc_for_title' => $use_desc_for_title, 'hide_empty' => $e, 'hierarchical' => FALSE, 'title_li' => '', 'show_option_none' => $show_option_none, 'feed' => $r, 'feed_image' => $i, 'name' => 'extended-categories-select-' . $this->number );
707
+ echo $before_widget;
708
+ echo $this->core->comment;
709
+ echo $before_title . $title . $after_title;
710
+
711
+ if ( $style == 'list' ) {
712
+ echo '<ul>';
713
+ $this->core->avh_wp_list_categories( $cat_args, TRUE );
714
+ echo '</ul>';
715
+ } else {
716
+ $this->core->avh_wp_dropdown_categories( $cat_args, TRUE );
717
+ echo '<script type=\'text/javascript\'>' . "\n";
718
+ echo '/* <![CDATA[ */' . "\n";
719
+ echo ' var ec_dropdown_' . $this->number . ' = document.getElementById("extended-categories-select-' . $this->number . '");' . "\n";
720
+ echo ' function ec_onCatChange_' . $this->number . '() {' . "\n";
721
+ echo ' if ( ec_dropdown_' . $this->number . '.options[ec_dropdown_' . $this->number . '.selectedIndex].value > 0 ) {' . "\n";
722
+ echo ' location.href = "' . get_option( 'home' ) . '/?cat="+ec_dropdown_' . $this->number . '.options[ec_dropdown_' . $this->number . '.selectedIndex].value;' . "\n";
723
+ echo ' }' . "\n";
724
+ echo ' }' . "\n";
725
+ echo ' ec_dropdown_' . $this->number . '.onchange = ec_onCatChange_' . $this->number . ';' . "\n";
726
+ echo '/* ]]> */' . "\n";
727
+ echo '</script>' . "\n";
728
+ }
729
+ echo $after_widget;
730
+ }
731
+ }
732
+
733
+ /**
734
+ * When Widget Control Form Is Posted
735
+ *
736
+ * @param unknown_type $new_instance
737
+ * @param unknown_type $old_instance
738
+ * @return unknown
739
+ */
740
+ function update ( $new_instance, $old_instance )
741
+ {
742
+ // update the instance's settings
743
+ if ( ! isset( $new_instance['submit'] ) ) {
744
+ return FALSE;
745
+ }
746
+
747
+ $instance = $old_instance;
748
+
749
+ $instance['title'] = strip_tags( stripslashes( $new_instance['title'] ) );
750
+ $instance['count'] = $new_instance['count'] ? TRUE : FALSE;
751
+ $instance['hide_empty'] = $new_instance['hide_empty'] ? TRUE : FALSE;
752
+ $instance['use_desc_for_title'] = $new_instance['use_desc_for_title'] ? TRUE : FALSE;
753
+ $instance['sort_column'] = strip_tags( stripslashes( $new_instance['sort_column'] ) );
754
+ $instance['sort_order'] = strip_tags( stripslashes( $new_instance['sort_order'] ) );
755
+ $instance['style'] = strip_tags( stripslashes( $new_instance['style'] ) );
756
+ $instance['rssfeed'] = $new_instance['rssfeed'] ? TRUE : FALSE;
757
+ $instance['rssimage'] = strip_tags( stripslashes( $new_instance['rssimage'] ) );
758
+ return $instance;
759
+ }
760
+
761
+ /**
762
+ * Display Widget Control Form
763
+ *
764
+ * @param unknown_type $instance
765
+ */
766
+ function form ( $instance )
767
+ {
768
+ // displays the widget admin form
769
+ $instance = wp_parse_args( ( array ) $instance, array ('title' => '', 'rssimage' => '' ) );
770
+
771
+ // Prepare data for display
772
+ $title = esc_attr( $instance['title'] );
773
+ $count = ( bool ) $instance['count'];
774
+ $hide_empty = ( bool ) $instance['hide_empty'];
775
+ $use_desc_for_title = ( bool ) $instance['use_desc_for_title'];
776
+ $sort_id = ($instance['sort_column'] == 'ID') ? ' SELECTED' : '';
777
+ $sort_name = ($instance['sort_column'] == 'name') ? ' SELECTED' : '';
778
+ $sort_count = ($instance['sort_column'] == 'count') ? ' SELECTED' : '';
779
+ $sort_order_a = ($instance['sort_order'] == 'asc') ? ' SELECTED' : '';
780
+ $sort_order_d = ($instance['sort_order'] == 'desc') ? ' SELECTED' : '';
781
+ $style_list = ($instance['style'] == 'list') ? ' SELECTED' : '';
782
+ $style_drop = ($instance['style'] == 'drop') ? ' SELECTED' : '';
783
+ $rssfeed = ( bool ) $instance['rssfeed'];
784
+ $rssimage = esc_attr( $instance['rssimage'] );
785
+
786
+ echo '<p>';
787
+ echo '<label for="' . $this->get_field_id( 'title' ) . '">';
788
+ _e( 'Title', 'avh-ec' );
789
+ echo '<input class="widefat" id="' . $this->get_field_id( 'title' ) . '" name="' . $this->get_field_name( 'title' ) . '" type="text" value="' . $title . '" /> ';
790
+ echo '</label>';
791
+ echo '</p>';
792
+
793
+ echo '<p>';
794
+
795
+ echo '<label for="' . $this->get_field_id( 'count' ) . '">';
796
+ echo '<input class="checkbox" type="checkbox" id="' . $this->get_field_id( 'count' ) . '" name="' . $this->get_field_name( 'count' ) . '" ' . $this->core->isChecked( TRUE, $count ) . ' /> ';
797
+ _e( 'Show post counts', 'avh-ec' );
798
+ echo '</label>';
799
+ echo '<br />';
800
+
801
+ echo '<label for="' . $this->get_field_id( 'hierarchical' ) . '">';
802
+ echo '<input class="checkbox" type="checkbox" id="' . $this->get_field_id( 'hierarchical' ) . '" name="' . $this->get_field_name( 'hierarchical' ) . '" ' . $this->core->isChecked( TRUE, $hierarchical ) . ' /> ';
803
+ _e( 'Show hierarchy', 'avh-ec' );
804
+ echo '</label>';
805
+ echo '<br />';
806
+
807
+ echo '<label for="' . $this->get_field_id( 'hide_empty' ) . '">';
808
+ echo '<input class="checkbox" type="checkbox" id="' . $this->get_field_id( 'hide_empty' ) . '" name="' . $this->get_field_name( 'hide_empty' ) . '" ' . $this->core->isChecked( TRUE, $hide_empty ) . '/> ';
809
+ _e( 'Hide empty categories', 'avh-ec' );
810
+ echo '</label>';
811
+ echo '<br />';
812
+
813
+ echo '<label for="' . $this->get_field_id( 'use_desc_for_title' ) . '">';
814
+ echo '<input class="checkbox" type="checkbox" id="' . $this->get_field_id( 'use_desc_for_title' ) . '" name="' . $this->get_field_name( 'use_desc_for_title' ) . '" ' . $this->core->isChecked( TRUE, $use_desc_for_title ) . '/> ';
815
+ _e( 'Use description for title', 'avh-ec' );
816
+ echo '</label>';
817
+ echo '<br />';
818
+ echo '</p>';
819
+
820
+ echo '<p>';
821
+ echo '<label for="' . $this->get_field_id( 'sort_column' ) . '">';
822
+ _e( 'Sort by ', 'avh-ec' );
823
+ echo '<select id="' . $this->get_field_id( 'sort_column' ) . '" name="' . $this->get_field_name( 'sort_column' ) . '"> ';
824
+ echo '<option value="ID" ' . $sort_id . '>' . __( 'ID', 'avh-ec' ) . '</option>';
825
+ echo '<option value="name" ' . $sort_name . '>' . __( 'Name', 'avh-ec' ) . '</option>';
826
+ echo '<option value="count" ' . $sort_count . '>' . __( 'Count', 'avh-ec' ) . '</option>';
827
+ echo '</select>';
828
+ echo '</label>';
829
+ echo '<br />';
830
+
831
+ echo '<label for="' . $this->get_field_id( 'sort_order' ) . '">';
832
+ _e( 'Sort order ', 'avh-ec' );
833
+ echo '<select id="' . $this->get_field_id( 'sort_order' ) . '" name="' . $this->get_field_name( 'sort_order' ) . '"> ';
834
+ echo '<option value="asc" ' . $sort_order_a . '>' . __( 'Ascending', 'avh-ec' ) . '</option>';
835
+ echo '<option value="desc" ' . $sort_order_d . '>' . __( 'Descending', 'avh-ec' ) . '</option>';
836
+ echo '</select>';
837
+ echo '</label>';
838
+ echo '<br />';
839
+
840
+ echo '<label for="' . $this->get_field_id( 'style' ) . '">';
841
+ _e( 'Display style ', 'avh-ec' );
842
+ echo '<select id="' . $this->get_field_id( 'style' ) . '" name="' . $this->get_field_name( 'style' ) . '"> ';
843
+ echo '<option value="list" ' . $style_list . '>' . __( 'List', 'avh-ec' ) . '</option>';
844
+ echo '<option value="drop" ' . $style_drop . '>' . __( 'Drop down', 'avh-ec' ) . '</option>';
845
+ echo '</select>';
846
+ echo '</label>';
847
+ echo '<br />';
848
+ echo '</p>';
849
+
850
+ echo '<p>';
851
+
852
+ echo '<label for="' . $this->get_field_id( 'rssfeed' ) . '">';
853
+ echo '<input class="checkbox" type="checkbox" id="' . $this->get_field_id( 'rssfeed' ) . '" name="' . $this->get_field_name( 'rssfeed' ) . '" ' . $this->core->isChecked( TRUE, $rssfeed ) . '/> ';
854
+ _e( 'Show RSS Feed', 'avh-ec' );
855
+ echo '</label>';
856
+ echo '<br />';
857
+
858
+ echo '<label for="">';
859
+ _e( 'Path (URI) to RSS image', 'avh-ec' );
860
+ echo '<input class="widefat" id="' . $this->get_field_id( 'rssimage' ) . '" name="' . $this->get_field_name( 'rssimage' ) . '" type="text" value="' . $rssimage . '" />';
861
+ echo '</label>';
862
+ echo '</p>';
863
+
864
+ echo '<input type="hidden" id="' . $this->get_field_id( 'submit' ) . '" name="' . $this->get_field_name( 'submit' ) . '" value="1" />';
865
+ }
866
+ }
867
+
868
  /**
869
  * Class that will display the categories
870
  *
2.8/css/avh-ec.admin.css ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .footer_avhec {
2
+ font-size: 0.8em;
3
+ text-align: center;
4
+ }
5
+
6
+ div.clearer {
7
+ clear: both;
8
+ line-height: 1px;
9
+ font-size: 1px;
10
+ height: 1px;
11
+ }
12
+
13
+ /* Metabox in General */
14
+ table.avhec-options {
15
+ font-size: 11px;
16
+ }
17
+
18
+ #avhecBoxOptions option{
19
+ padding: .5em;
20
+ }
21
+ .avhec-wrap span.description {
22
+ font-size: 11px;
23
+ }
24
+
25
+ .avhec-wrap .b {
26
+ font-weight: bold;
27
+ }
28
+
29
+ #avhec-options input {
30
+ font-size: 11px;
31
+ }
32
+ #avhec-generaloptions input {
33
+ font-size: 11px;
34
+ }
35
+
36
+ /* Metabox Donations*/
37
+ #avhecBoxDonations .inside {
38
+ font-size: 12px;
39
+ }
40
+
41
+ #avhecBoxDonations .versions {
42
+ padding: 6px 10px 12px;
43
+ }
44
+
45
+ /* Metabox Donations*/
46
+ #avhecBoxTranslation .inside {
47
+ font-size: 12px;
48
+ }
49
+
50
+ /* Metabox in post and page */
51
+ #post_avhec_category_group {
52
+ width:100%;
53
+ }
54
+
55
+ #avhec-catlist {
56
+ -moz-border-radius:4px 4px 4px 4px;
57
+ background-color:#FFFFFF;
58
+ border:1px solid #DFDFDF;
59
+ height:20em;
60
+ margin-bottom:-1.8em;
61
+ overflow:auto;
62
+ width:95%;
63
+ }
64
+
65
+ #avhec-catlist ul {
66
+ padding: 3px;
67
+ }
68
+
69
+ #avhec-catlist li ul {
70
+ padding: 0px;
71
+ }
72
+
73
+ #avhec-catlist li {
74
+ margin-bottom: 0px;
75
+ }
2.8/css/avh-ec.widget.css ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* AVH Extended Categories Widget CSS */
2
+
3
+ #avhec-widget-line {
4
+ display: inline-block;
5
+ }
6
+
7
+ #avhec-widget-count {
8
+ display: inline;
9
+ }
10
+
11
+ #avhec-widget-rss {
12
+ display: inline;
13
+ }
2.8/images/us_banner_logow_120x60.gif ADDED
Binary file
2.8/inc/avh-ec.admin.css DELETED
@@ -1,39 +0,0 @@
1
- .footer_avhec {
2
- font-size: 0.8em;
3
- text-align: center;
4
- }
5
-
6
- div.clearer {
7
- clear: both;
8
- line-height: 1px;
9
- font-size: 1px;
10
- height: 1px;
11
- }
12
- .avhec-wrap span.description {
13
- font-size: 11px;
14
- }
15
- #avhec-generaloptions input {
16
- font-size: 11px;
17
- }
18
-
19
- table.avhec-options {
20
- font-size: 11px;
21
- }
22
- .avhfec-wrap .b {
23
- font-weight: bold;
24
- }
25
-
26
- #avhecBoxDonations .b {
27
- font-weight: bold;
28
- }
29
- #avhecBoxDonations .inside {
30
- font-size: 12px;
31
- }
32
-
33
- #avhecBoxDonations .versions {
34
- padding: 6px 10px 12px;
35
- }
36
-
37
- #avhecBoxTranslation .inside {
38
- font-size: 12px;
39
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2.8/js/avh-ec.categorygroup.dev.js ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery(document).ready(function($) {
2
+ var options = false, delBefore, delAfter;
3
+
4
+ delAfter = function( r, settings ) {
5
+ var id = $('cat', r).attr('id'), o;
6
+ for ( o = 0; o < options.length; o++ )
7
+ if ( id == options[o].value )
8
+ options[o] = null;
9
+ };
10
+
11
+ delBefore = function(s) {
12
+ if ( 'undefined' != showNotice )
13
+ return showNotice.warn() ? s : false;
14
+
15
+ return s;
16
+ };
17
+
18
+ $('#the-list').wpList({ delBefore: delBefore });
19
+
20
+ $('.delete a[class^="delete"]').live('click', function(){return false;});
21
+ });
2.8/js/avh-ec.categorygroup.js ADDED
@@ -0,0 +1 @@
 
1
+ jQuery(document).ready(function(d){var b=false,c,a;a=function(f,e){var h=d("cat",f).attr("id"),g;for(g=0;g<b.length;g++){if(h==b[g].value){b[g]=null}}};c=function(e){if("undefined"!=showNotice){return showNotice.warn()?e:false}return e};d("#the-list").wpList({delBefore:c});d('.delete a[class^="delete"]').live("click",function(){return false})});
2.8/lang/avh-ec-cs_CZ.mo CHANGED
Binary file
2.8/lang/avh-ec-cs_CZ.po CHANGED
@@ -1,176 +1,342 @@
1
  msgid ""
2
  msgstr ""
3
- "Project-Id-Version: AVH Extended Categories, Czech, 20-09-2009\n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2009-09-17 14:16-0500\n"
6
  "PO-Revision-Date: \n"
7
  "Last-Translator: Dirty Mind <bluebat@seznam.cz>\n"
8
- "Language-Team: Dirty Mind <bluebat@seznam.cz>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "X-Poedit-Language: Czech\n"
13
- "X-Poedit-Country: CZECH REPUBLIC\n"
14
-
15
- #: ../class/avh-ec.admin.php:43
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  msgid "Options"
17
  msgstr "Nastavení"
18
 
19
- #: ../class/avh-ec.admin.php:44
20
- msgid "Translation"
21
- msgstr "Překlad"
22
-
23
- #: ../class/avh-ec.admin.php:107
24
  msgid "Options saved"
25
  msgstr "Nastavení bylo uloženo"
26
 
27
- #: ../class/avh-ec.admin.php:160
28
  msgid "Save Changes"
29
  msgstr "Uložit změny"
30
 
31
- #: ../class/avh-ec.admin.php:241
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  msgid "Settings"
33
  msgstr "Nastavení"
34
 
35
- #: ../class/avh-ec.core.php:354
36
- #: ../class/avh-ec.widgets.php:62
37
- #: ../class/avh-ec.widgets.php:407
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
38
  msgid "Categories"
39
  msgstr "Rubriky"
40
 
 
41
  #: ../class/avh-ec.core.php:381
42
- #: ../class/avh-ec.core.php:383
43
  msgid "No categories"
44
  msgstr "Žádné rubriky"
45
 
 
 
 
 
 
 
 
 
 
 
46
  #: ../class/avh-ec.widgets.php:24
47
  msgid "An extended version of the default Categories widget."
48
- msgstr "Rozšířená verze základního widgetu Rubriky."
49
 
50
- #: ../class/avh-ec.widgets.php:84
51
- #: ../class/avh-ec.widgets.php:429
 
 
 
 
 
52
  msgid "Select Category"
53
  msgstr "Vybrat rubriku"
54
 
55
- #: ../class/avh-ec.widgets.php:197
56
- #: ../class/avh-ec.widgets.php:524
 
57
  msgid "Title"
58
  msgstr "Název"
59
 
60
- #: ../class/avh-ec.widgets.php:206
61
  msgid "Show selected categories only"
62
  msgstr "Zobrazit pouze vybrané rubriky"
63
 
64
- #: ../class/avh-ec.widgets.php:212
65
- #: ../class/avh-ec.widgets.php:540
 
66
  msgid "Show post counts"
67
  msgstr "Zobrazit počty příspěvků"
68
 
69
- #: ../class/avh-ec.widgets.php:218
 
70
  msgid "Show hierarchy"
71
  msgstr "Zobrazit hierarchii"
72
 
73
- #: ../class/avh-ec.widgets.php:223
74
  msgid "How many levels to show"
75
  msgstr "Počet zobrazovaných úrovní"
76
 
77
- #: ../class/avh-ec.widgets.php:226
78
  msgid "All Levels"
79
  msgstr "Všechny úrovně"
80
 
81
- #: ../class/avh-ec.widgets.php:227
82
  msgid "Toplevel only"
83
  msgstr "Pouze základní úroveň"
84
 
85
- #: ../class/avh-ec.widgets.php:229
86
  msgid "Child "
87
  msgstr "Potomků: "
88
 
89
- #: ../class/avh-ec.widgets.php:236
 
90
  msgid "Hide empty categories"
91
  msgstr "Skrýt prázdné rubriky"
92
 
93
- #: ../class/avh-ec.widgets.php:243
94
- #: ../class/avh-ec.widgets.php:545
 
95
  msgid "Sort by "
96
  msgstr "Setřídit podle"
97
 
98
- #: ../class/avh-ec.widgets.php:245
99
- #: ../class/avh-ec.widgets.php:547
 
100
  msgid "ID"
101
  msgstr "ID"
102
 
103
- #: ../class/avh-ec.widgets.php:246
104
- #: ../class/avh-ec.widgets.php:548
105
- msgid "Name"
106
- msgstr "Jméno"
107
-
108
- #: ../class/avh-ec.widgets.php:247
109
- #: ../class/avh-ec.widgets.php:549
110
  msgid "Count"
111
  msgstr "Počet"
112
 
113
- #: ../class/avh-ec.widgets.php:253
114
- #: ../class/avh-ec.widgets.php:555
 
115
  msgid "Sort order "
116
  msgstr "Způsob řazení"
117
 
118
- #: ../class/avh-ec.widgets.php:255
119
- #: ../class/avh-ec.widgets.php:557
 
120
  msgid "Ascending"
121
  msgstr "Vzestupně"
122
 
123
- #: ../class/avh-ec.widgets.php:256
124
- #: ../class/avh-ec.widgets.php:558
 
125
  msgid "Descending"
126
  msgstr "Sestupně"
127
 
128
- #: ../class/avh-ec.widgets.php:262
129
- #: ../class/avh-ec.widgets.php:564
 
130
  msgid "Display style "
131
  msgstr "Styl zobrazení"
132
 
133
- #: ../class/avh-ec.widgets.php:264
134
- #: ../class/avh-ec.widgets.php:566
 
135
  msgid "List"
136
  msgstr "Seznam"
137
 
138
- #: ../class/avh-ec.widgets.php:265
139
- #: ../class/avh-ec.widgets.php:567
 
140
  msgid "Drop down"
141
  msgstr "Drop down"
142
 
143
- #: ../class/avh-ec.widgets.php:275
144
- #: ../class/avh-ec.widgets.php:577
 
145
  msgid "Show RSS Feed"
146
  msgstr "Ukázat RSS Feed"
147
 
148
- #: ../class/avh-ec.widgets.php:280
149
- #: ../class/avh-ec.widgets.php:582
 
150
  msgid "Path (URI) to RSS image"
151
  msgstr "Cesta (URI) k obrázku RSS"
152
 
153
- #: ../class/avh-ec.widgets.php:286
154
  msgid "Select categories"
155
  msgstr "Vybrat rubriky"
156
 
157
- #: ../class/avh-ec.widgets.php:291
158
  msgid "All Categories"
159
  msgstr "Všechny rubriky"
160
 
161
- #: ../class/avh-ec.widgets.php:301
162
  msgid "Exclude the selected categories"
163
  msgstr "Vyloučit vybrané rubriky"
164
 
165
- #: ../class/avh-ec.widgets.php:386
166
  msgid "Shows the top categories."
167
  msgstr "Zobrazí top rubriky."
168
 
169
- #: ../class/avh-ec.widgets.php:387
170
- msgid "AVH Extended Categories Top"
171
- msgstr "AVH Extended Categories Top"
172
 
173
- #: ../class/avh-ec.widgets.php:531
174
  msgid "How many categories to show"
175
  msgstr "Počet zobrazovaných rubrik"
176
 
 
 
 
 
 
 
 
 
1
  msgid ""
2
  msgstr ""
3
+ "Project-Id-Version: AVH Extended Categories\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2010-01-30 19:59-0500\n"
6
  "PO-Revision-Date: \n"
7
  "Last-Translator: Dirty Mind <bluebat@seznam.cz>\n"
8
+ "Language-Team: \n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Poedit-SourceCharset: utf-8\n"
13
+ "X-Poedit-KeywordsList: __ngettext:1,2;__;_e\n"
14
+ "X-Poedit-Basepath: .\n"
15
+ "Plural-Forms: nplurals=2; plural=n != 1;\n"
16
+ "X-Poedit-SearchPath-0: .\n"
17
+ "X-Poedit-SearchPath-1: ..\n"
18
+
19
+ #: ../class/avh-ec.admin.php:35
20
+ #: ../class/avh-ec.admin.php:36
21
+ msgid "Category Group"
22
+ msgstr "Skupina rubrik"
23
+
24
+ #: ../class/avh-ec.admin.php:174
25
+ #: ../class/avh-ec.admin.php:234
26
+ msgid "Overview"
27
+ msgstr "Přehled"
28
+
29
+ #: ../class/avh-ec.admin.php:175
30
+ #: ../class/avh-ec.admin.php:367
31
+ msgid "General Options"
32
+ msgstr "Základní nastavení"
33
+
34
+ #: ../class/avh-ec.admin.php:176
35
+ #: ../class/avh-ec.admin.php:556
36
+ #: ../class/avh-ec.category-group.php:44
37
+ #: ../class/avh-ec.category-group.php:45
38
+ msgid "Category Groups"
39
+ msgstr "Skupiny rubrik"
40
+
41
+ #: ../class/avh-ec.admin.php:177
42
+ #: ../class/avh-ec.admin.php:692
43
+ msgid "F.A.Q"
44
+ msgstr "F.A.Q."
45
+
46
+ #: ../class/avh-ec.admin.php:193
47
+ #: ../class/avh-ec.admin.php:413
48
+ msgid "Group Overview"
49
+ msgstr "Přehled skupiny"
50
+
51
+ #: ../class/avh-ec.admin.php:218
52
+ #: ../class/avh-ec.admin.php:676
53
+ msgid "Announcements"
54
+ msgstr "Oznámení"
55
+
56
+ #: ../class/avh-ec.admin.php:219
57
+ #: ../class/avh-ec.admin.php:352
58
+ #: ../class/avh-ec.admin.php:677
59
+ msgid "Donations"
60
+ msgstr "Podpořte nás"
61
+
62
+ #: ../class/avh-ec.admin.php:262
63
  msgid "Options"
64
  msgstr "Nastavení"
65
 
66
+ #: ../class/avh-ec.admin.php:330
 
 
 
 
67
  msgid "Options saved"
68
  msgstr "Nastavení bylo uloženo"
69
 
70
+ #: ../class/avh-ec.admin.php:384
71
  msgid "Save Changes"
72
  msgstr "Uložit změny"
73
 
74
+ #: ../class/avh-ec.admin.php:412
75
+ msgid "Add Group"
76
+ msgstr "Přidat skupinu"
77
+
78
+ #: ../class/avh-ec.admin.php:462
79
+ msgid "Category group saved"
80
+ msgstr "Skupina rubrik byla uložena"
81
+
82
+ #: ../class/avh-ec.admin.php:468
83
+ msgid "Category group conflicts with "
84
+ msgstr "Skupina rubrik koliduje s"
85
+
86
+ #: ../class/avh-ec.admin.php:469
87
+ msgid "Same slug is used. "
88
+ msgstr "Toto zjednodušené jméno je již používáno."
89
+
90
+ #: ../class/avh-ec.admin.php:491
91
+ msgid "Edit Group"
92
+ msgstr "Upravit skupinu"
93
+
94
+ #: ../class/avh-ec.admin.php:503
95
+ msgid "Cheatin&#8217; uh?"
96
+ msgstr "Podvádíš?"
97
+
98
+ #: ../class/avh-ec.admin.php:525
99
+ msgid "Category group updated"
100
+ msgstr "Skupina rubrik byla aktualizována"
101
+
102
+ #: ../class/avh-ec.admin.php:528
103
+ msgid "Category group not updated"
104
+ msgstr "Změna skupiny nebyla provedena"
105
+
106
+ #: ../class/avh-ec.admin.php:529
107
+ msgid "Duplicate slug detected"
108
+ msgstr "Kolize stejných zkrácených jmen"
109
+
110
+ #: ../class/avh-ec.admin.php:533
111
+ msgid "Unknown category group"
112
+ msgstr "Neznámá skupina rubrik"
113
+
114
+ #: ../class/avh-ec.admin.php:590
115
+ msgid "Add group"
116
+ msgstr "Přidat skupinu"
117
+
118
+ #: ../class/avh-ec.admin.php:639
119
+ msgid "Update group"
120
+ msgstr "Aktualizovat skupinu"
121
+
122
+ #: ../class/avh-ec.admin.php:650
123
+ msgid "F.A.Q."
124
+ msgstr "F.A.Q."
125
+
126
+ #: ../class/avh-ec.admin.php:651
127
+ msgid "Translation"
128
+ msgstr "Překlad"
129
+
130
+ #: ../class/avh-ec.admin.php:831
131
  msgid "Settings"
132
  msgstr "Nastavení"
133
 
134
+ #: ../class/avh-ec.admin.php:847
135
+ #: ../class/avh-ec.widgets.php:248
136
+ #: ../class/avh-ec.widgets.php:551
137
+ #: ../class/avh-ec.widgets.php:786
138
+ msgid "Name"
139
+ msgstr "Jméno"
140
+
141
+ #: ../class/avh-ec.admin.php:847
142
+ msgid "Description"
143
+ msgstr "Popis"
144
+
145
+ #: ../class/avh-ec.admin.php:847
146
+ msgid "Categories in the group"
147
+ msgstr "Rubriky ve skupině"
148
+
149
+ #: ../class/avh-ec.admin.php:864
150
+ #, php-format
151
+ msgid "Your attempt to delete this group: &#8220;%s&#8221; has failed."
152
+ msgstr "Pokus o smazání skupiny &#8220;%s&#8221; byl neúspěšný."
153
+
154
+ #: ../class/avh-ec.admin.php:926
155
+ #, php-format
156
+ msgid "Edit &#8220;%s&#8221;"
157
+ msgstr "Upravit &#8220;%s&#8221;"
158
+
159
+ #: ../class/avh-ec.admin.php:928
160
+ msgid "Edit"
161
+ msgstr "Upravit"
162
+
163
+ #: ../class/avh-ec.admin.php:933
164
+ msgid "Delete"
165
+ msgstr "Smazat"
166
+
167
+ #: ../class/avh-ec.core.php:346
168
+ #: ../class/avh-ec.widgets.php:64
169
+ #: ../class/avh-ec.widgets.php:410
170
+ #: ../class/avh-ec.widgets.php:644
171
  msgid "Categories"
172
  msgstr "Rubriky"
173
 
174
+ #: ../class/avh-ec.core.php:379
175
  #: ../class/avh-ec.core.php:381
 
176
  msgid "No categories"
177
  msgstr "Žádné rubriky"
178
 
179
+ #: ../class/avh-ec.core.php:566
180
+ #, php-format
181
+ msgid "View all posts filed under %s"
182
+ msgstr "Zobrazit všechny příspěvky pod %s"
183
+
184
+ #: ../class/avh-ec.core.php:581
185
+ #, php-format
186
+ msgid "Feed for all posts filed under %s"
187
+ msgstr "Feed pro všechny příspěvky pod %s"
188
+
189
  #: ../class/avh-ec.widgets.php:24
190
  msgid "An extended version of the default Categories widget."
191
+ msgstr "Rozšířená verze základního widgetu Rubriky (Categories)."
192
 
193
+ #: ../class/avh-ec.widgets.php:25
194
+ msgid "AVH Extended Categories"
195
+ msgstr "AVH Extended Categories"
196
+
197
+ #: ../class/avh-ec.widgets.php:86
198
+ #: ../class/avh-ec.widgets.php:432
199
+ #: ../class/avh-ec.widgets.php:670
200
  msgid "Select Category"
201
  msgstr "Vybrat rubriku"
202
 
203
+ #: ../class/avh-ec.widgets.php:199
204
+ #: ../class/avh-ec.widgets.php:527
205
+ #: ../class/avh-ec.widgets.php:755
206
  msgid "Title"
207
  msgstr "Název"
208
 
209
+ #: ../class/avh-ec.widgets.php:208
210
  msgid "Show selected categories only"
211
  msgstr "Zobrazit pouze vybrané rubriky"
212
 
213
+ #: ../class/avh-ec.widgets.php:214
214
+ #: ../class/avh-ec.widgets.php:543
215
+ #: ../class/avh-ec.widgets.php:764
216
  msgid "Show post counts"
217
  msgstr "Zobrazit počty příspěvků"
218
 
219
+ #: ../class/avh-ec.widgets.php:220
220
+ #: ../class/avh-ec.widgets.php:770
221
  msgid "Show hierarchy"
222
  msgstr "Zobrazit hierarchii"
223
 
224
+ #: ../class/avh-ec.widgets.php:225
225
  msgid "How many levels to show"
226
  msgstr "Počet zobrazovaných úrovní"
227
 
228
+ #: ../class/avh-ec.widgets.php:228
229
  msgid "All Levels"
230
  msgstr "Všechny úrovně"
231
 
232
+ #: ../class/avh-ec.widgets.php:229
233
  msgid "Toplevel only"
234
  msgstr "Pouze základní úroveň"
235
 
236
+ #: ../class/avh-ec.widgets.php:231
237
  msgid "Child "
238
  msgstr "Potomků: "
239
 
240
+ #: ../class/avh-ec.widgets.php:238
241
+ #: ../class/avh-ec.widgets.php:776
242
  msgid "Hide empty categories"
243
  msgstr "Skrýt prázdné rubriky"
244
 
245
+ #: ../class/avh-ec.widgets.php:245
246
+ #: ../class/avh-ec.widgets.php:548
247
+ #: ../class/avh-ec.widgets.php:783
248
  msgid "Sort by "
249
  msgstr "Setřídit podle"
250
 
251
+ #: ../class/avh-ec.widgets.php:247
252
+ #: ../class/avh-ec.widgets.php:550
253
+ #: ../class/avh-ec.widgets.php:785
254
  msgid "ID"
255
  msgstr "ID"
256
 
257
+ #: ../class/avh-ec.widgets.php:249
258
+ #: ../class/avh-ec.widgets.php:552
259
+ #: ../class/avh-ec.widgets.php:787
 
 
 
 
260
  msgid "Count"
261
  msgstr "Počet"
262
 
263
+ #: ../class/avh-ec.widgets.php:255
264
+ #: ../class/avh-ec.widgets.php:558
265
+ #: ../class/avh-ec.widgets.php:793
266
  msgid "Sort order "
267
  msgstr "Způsob řazení"
268
 
269
+ #: ../class/avh-ec.widgets.php:257
270
+ #: ../class/avh-ec.widgets.php:560
271
+ #: ../class/avh-ec.widgets.php:795
272
  msgid "Ascending"
273
  msgstr "Vzestupně"
274
 
275
+ #: ../class/avh-ec.widgets.php:258
276
+ #: ../class/avh-ec.widgets.php:561
277
+ #: ../class/avh-ec.widgets.php:796
278
  msgid "Descending"
279
  msgstr "Sestupně"
280
 
281
+ #: ../class/avh-ec.widgets.php:264
282
+ #: ../class/avh-ec.widgets.php:567
283
+ #: ../class/avh-ec.widgets.php:802
284
  msgid "Display style "
285
  msgstr "Styl zobrazení"
286
 
287
+ #: ../class/avh-ec.widgets.php:266
288
+ #: ../class/avh-ec.widgets.php:569
289
+ #: ../class/avh-ec.widgets.php:804
290
  msgid "List"
291
  msgstr "Seznam"
292
 
293
+ #: ../class/avh-ec.widgets.php:267
294
+ #: ../class/avh-ec.widgets.php:570
295
+ #: ../class/avh-ec.widgets.php:805
296
  msgid "Drop down"
297
  msgstr "Drop down"
298
 
299
+ #: ../class/avh-ec.widgets.php:277
300
+ #: ../class/avh-ec.widgets.php:580
301
+ #: ../class/avh-ec.widgets.php:815
302
  msgid "Show RSS Feed"
303
  msgstr "Ukázat RSS Feed"
304
 
305
+ #: ../class/avh-ec.widgets.php:282
306
+ #: ../class/avh-ec.widgets.php:585
307
+ #: ../class/avh-ec.widgets.php:820
308
  msgid "Path (URI) to RSS image"
309
  msgstr "Cesta (URI) k obrázku RSS"
310
 
311
+ #: ../class/avh-ec.widgets.php:288
312
  msgid "Select categories"
313
  msgstr "Vybrat rubriky"
314
 
315
+ #: ../class/avh-ec.widgets.php:293
316
  msgid "All Categories"
317
  msgstr "Všechny rubriky"
318
 
319
+ #: ../class/avh-ec.widgets.php:303
320
  msgid "Exclude the selected categories"
321
  msgstr "Vyloučit vybrané rubriky"
322
 
323
+ #: ../class/avh-ec.widgets.php:389
324
  msgid "Shows the top categories."
325
  msgstr "Zobrazí top rubriky."
326
 
327
+ #: ../class/avh-ec.widgets.php:390
328
+ msgid "AVH Extended Categories: Top Categories"
329
+ msgstr "AVH Extended Categories: Top rubriky"
330
 
331
+ #: ../class/avh-ec.widgets.php:534
332
  msgid "How many categories to show"
333
  msgstr "Počet zobrazovaných rubrik"
334
 
335
+ #: ../class/avh-ec.widgets.php:612
336
+ msgid "Shows grouped categories."
337
+ msgstr "Zobrazí seskupené rubriky."
338
+
339
+ #: ../class/avh-ec.widgets.php:613
340
+ msgid "AVH Extended Category: Category Group"
341
+ msgstr "AVH Extended Category: Skupina Rubrik"
342
+
2.8/lang/avh-ec-es_ES.mo CHANGED
Binary file
2.8/lang/avh-ec-es_ES.po CHANGED
@@ -6,9 +6,9 @@
6
  msgid ""
7
  msgstr ""
8
  "Project-Id-Version: avhextendedcategories\n"
9
- "Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10
- "POT-Creation-Date: 2009-09-17 14:16-0500\n"
11
- "PO-Revision-Date: 2009-09-25 20:45-0500\n"
12
  "Last-Translator: Peter van der Does <peter@avirtualhome.com>\n"
13
  "Language-Team: Spanish <es@li.org>\n"
14
  "MIME-Version: 1.0\n"
@@ -17,165 +17,335 @@ msgstr ""
17
  "X-Launchpad-Export-Date: 2009-09-26 00:32+0000\n"
18
  "X-Generator: Launchpad (build Unknown)\n"
19
 
20
- #: ../class/avh-ec.admin.php:43
21
- msgid "Options"
 
 
 
 
 
 
 
 
 
 
 
 
22
  msgstr "Opciones"
23
 
24
- #: ../class/avh-ec.admin.php:44
25
- msgid "Translation"
26
- msgstr "Traducción"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
 
28
- #: ../class/avh-ec.admin.php:107
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
  msgid "Options saved"
30
  msgstr "Opciones guardadas"
31
 
32
- #: ../class/avh-ec.admin.php:160
33
  msgid "Save Changes"
34
  msgstr "Guardar cambios"
35
 
36
- #: ../class/avh-ec.admin.php:241
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
  msgid "Settings"
38
  msgstr "Configuración"
39
 
40
- #: ../class/avh-ec.core.php:354
41
- #: ../class/avh-ec.widgets.php:62
42
- #: ../class/avh-ec.widgets.php:407
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
43
  msgid "Categories"
44
  msgstr "Categorías"
45
 
 
46
  #: ../class/avh-ec.core.php:381
47
- #: ../class/avh-ec.core.php:383
48
  msgid "No categories"
49
  msgstr "No hay categorías"
50
 
 
 
 
 
 
 
 
 
 
 
51
  #: ../class/avh-ec.widgets.php:24
52
  msgid "An extended version of the default Categories widget."
53
  msgstr "Una versión extendida del widget de categorías predeterminado."
54
 
55
- #: ../class/avh-ec.widgets.php:84
56
- #: ../class/avh-ec.widgets.php:429
 
 
 
 
 
 
57
  msgid "Select Category"
58
  msgstr "Seleccionar categoría"
59
 
60
- #: ../class/avh-ec.widgets.php:197
61
- #: ../class/avh-ec.widgets.php:524
 
62
  msgid "Title"
63
  msgstr "Título"
64
 
65
- #: ../class/avh-ec.widgets.php:206
66
  msgid "Show selected categories only"
67
  msgstr "Mostrar solo categorías seleccionadas"
68
 
69
- #: ../class/avh-ec.widgets.php:212
70
- #: ../class/avh-ec.widgets.php:540
 
71
  msgid "Show post counts"
72
  msgstr "Mostrar contadores de entradas"
73
 
74
- #: ../class/avh-ec.widgets.php:218
 
75
  msgid "Show hierarchy"
76
  msgstr "Mostrar jerarquía"
77
 
78
- #: ../class/avh-ec.widgets.php:223
79
  msgid "How many levels to show"
80
  msgstr "Cuantos niveles mostrar"
81
 
82
- #: ../class/avh-ec.widgets.php:226
83
  msgid "All Levels"
84
  msgstr "Todos los niveles"
85
 
86
- #: ../class/avh-ec.widgets.php:227
87
  msgid "Toplevel only"
88
  msgstr "Primer nivel"
89
 
90
- #: ../class/avh-ec.widgets.php:229
91
  msgid "Child "
92
  msgstr "Hijo "
93
 
94
- #: ../class/avh-ec.widgets.php:236
 
95
  msgid "Hide empty categories"
96
  msgstr "Esconder categorías vacías"
97
 
98
- #: ../class/avh-ec.widgets.php:243
99
- #: ../class/avh-ec.widgets.php:545
 
100
  msgid "Sort by "
101
  msgstr "Ordenar por "
102
 
103
- #: ../class/avh-ec.widgets.php:245
104
- #: ../class/avh-ec.widgets.php:547
 
105
  msgid "ID"
106
  msgstr "ID"
107
 
108
- #: ../class/avh-ec.widgets.php:246
109
- #: ../class/avh-ec.widgets.php:548
110
- msgid "Name"
111
- msgstr "Nombre"
112
-
113
- #: ../class/avh-ec.widgets.php:247
114
- #: ../class/avh-ec.widgets.php:549
115
  msgid "Count"
116
  msgstr "Número"
117
 
118
- #: ../class/avh-ec.widgets.php:253
119
- #: ../class/avh-ec.widgets.php:555
 
120
  msgid "Sort order "
121
  msgstr "Orden "
122
 
123
- #: ../class/avh-ec.widgets.php:255
124
- #: ../class/avh-ec.widgets.php:557
 
125
  msgid "Ascending"
126
  msgstr "Ascendente"
127
 
128
- #: ../class/avh-ec.widgets.php:256
129
- #: ../class/avh-ec.widgets.php:558
 
130
  msgid "Descending"
131
  msgstr "Descendente"
132
 
133
- #: ../class/avh-ec.widgets.php:262
134
- #: ../class/avh-ec.widgets.php:564
 
135
  msgid "Display style "
136
  msgstr "Estilo de visualización "
137
 
138
- #: ../class/avh-ec.widgets.php:264
139
- #: ../class/avh-ec.widgets.php:566
 
140
  msgid "List"
141
  msgstr "Lista"
142
 
143
- #: ../class/avh-ec.widgets.php:265
144
- #: ../class/avh-ec.widgets.php:567
 
145
  msgid "Drop down"
146
  msgstr "Desplegable"
147
 
148
- #: ../class/avh-ec.widgets.php:275
149
- #: ../class/avh-ec.widgets.php:577
 
150
  msgid "Show RSS Feed"
151
  msgstr "Mostrar RSS feed"
152
 
153
- #: ../class/avh-ec.widgets.php:280
154
- #: ../class/avh-ec.widgets.php:582
 
155
  msgid "Path (URI) to RSS image"
156
  msgstr "Ruta (URI) al RSS feed"
157
 
158
- #: ../class/avh-ec.widgets.php:286
159
  msgid "Select categories"
160
  msgstr "Elija categorías"
161
 
162
- #: ../class/avh-ec.widgets.php:291
163
  msgid "All Categories"
164
  msgstr "Todas las categorías"
165
 
166
- #: ../class/avh-ec.widgets.php:301
167
  msgid "Exclude the selected categories"
168
  msgstr "Excluir las categorías seleccionadas"
169
 
170
- #: ../class/avh-ec.widgets.php:386
171
  msgid "Shows the top categories."
172
  msgstr "Mostrar las principales categorías"
173
 
174
- #: ../class/avh-ec.widgets.php:387
175
- msgid "AVH Extended Categories Top"
 
176
  msgstr "AVH Extended Categories Top"
177
 
178
- #: ../class/avh-ec.widgets.php:531
179
  msgid "How many categories to show"
180
  msgstr "Cuantas categorías mostrar"
181
 
 
 
 
 
 
 
 
 
 
 
6
  msgid ""
7
  msgstr ""
8
  "Project-Id-Version: avhextendedcategories\n"
9
+ "Report-Msgid-Bugs-To: \n"
10
+ "POT-Creation-Date: 2010-01-30 19:59-0500\n"
11
+ "PO-Revision-Date: 2010-01-30 19:59-0500\n"
12
  "Last-Translator: Peter van der Does <peter@avirtualhome.com>\n"
13
  "Language-Team: Spanish <es@li.org>\n"
14
  "MIME-Version: 1.0\n"
17
  "X-Launchpad-Export-Date: 2009-09-26 00:32+0000\n"
18
  "X-Generator: Launchpad (build Unknown)\n"
19
 
20
+ #: ../class/avh-ec.admin.php:35
21
+ #: ../class/avh-ec.admin.php:36
22
+ msgid "Category Group"
23
+ msgstr ""
24
+
25
+ #: ../class/avh-ec.admin.php:174
26
+ #: ../class/avh-ec.admin.php:234
27
+ msgid "Overview"
28
+ msgstr ""
29
+
30
+ #: ../class/avh-ec.admin.php:175
31
+ #: ../class/avh-ec.admin.php:367
32
+ #, fuzzy
33
+ msgid "General Options"
34
  msgstr "Opciones"
35
 
36
+ #: ../class/avh-ec.admin.php:176
37
+ #: ../class/avh-ec.admin.php:556
38
+ #: ../class/avh-ec.category-group.php:44
39
+ #: ../class/avh-ec.category-group.php:45
40
+ #, fuzzy
41
+ msgid "Category Groups"
42
+ msgstr "Categorías"
43
+
44
+ #: ../class/avh-ec.admin.php:177
45
+ #: ../class/avh-ec.admin.php:692
46
+ msgid "F.A.Q"
47
+ msgstr ""
48
+
49
+ #: ../class/avh-ec.admin.php:193
50
+ #: ../class/avh-ec.admin.php:413
51
+ msgid "Group Overview"
52
+ msgstr ""
53
 
54
+ #: ../class/avh-ec.admin.php:218
55
+ #: ../class/avh-ec.admin.php:676
56
+ msgid "Announcements"
57
+ msgstr ""
58
+
59
+ #: ../class/avh-ec.admin.php:219
60
+ #: ../class/avh-ec.admin.php:352
61
+ #: ../class/avh-ec.admin.php:677
62
+ #, fuzzy
63
+ msgid "Donations"
64
+ msgstr "Opciones"
65
+
66
+ #: ../class/avh-ec.admin.php:262
67
+ msgid "Options"
68
+ msgstr "Opciones"
69
+
70
+ #: ../class/avh-ec.admin.php:330
71
  msgid "Options saved"
72
  msgstr "Opciones guardadas"
73
 
74
+ #: ../class/avh-ec.admin.php:384
75
  msgid "Save Changes"
76
  msgstr "Guardar cambios"
77
 
78
+ #: ../class/avh-ec.admin.php:412
79
+ msgid "Add Group"
80
+ msgstr ""
81
+
82
+ #: ../class/avh-ec.admin.php:462
83
+ msgid "Category group saved"
84
+ msgstr ""
85
+
86
+ #: ../class/avh-ec.admin.php:468
87
+ msgid "Category group conflicts with "
88
+ msgstr ""
89
+
90
+ #: ../class/avh-ec.admin.php:469
91
+ msgid "Same slug is used. "
92
+ msgstr ""
93
+
94
+ #: ../class/avh-ec.admin.php:491
95
+ msgid "Edit Group"
96
+ msgstr ""
97
+
98
+ #: ../class/avh-ec.admin.php:503
99
+ msgid "Cheatin&#8217; uh?"
100
+ msgstr ""
101
+
102
+ #: ../class/avh-ec.admin.php:525
103
+ msgid "Category group updated"
104
+ msgstr ""
105
+
106
+ #: ../class/avh-ec.admin.php:528
107
+ msgid "Category group not updated"
108
+ msgstr ""
109
+
110
+ #: ../class/avh-ec.admin.php:529
111
+ msgid "Duplicate slug detected"
112
+ msgstr ""
113
+
114
+ #: ../class/avh-ec.admin.php:533
115
+ msgid "Unknown category group"
116
+ msgstr ""
117
+
118
+ #: ../class/avh-ec.admin.php:590
119
+ msgid "Add group"
120
+ msgstr ""
121
+
122
+ #: ../class/avh-ec.admin.php:639
123
+ msgid "Update group"
124
+ msgstr ""
125
+
126
+ #: ../class/avh-ec.admin.php:650
127
+ msgid "F.A.Q."
128
+ msgstr ""
129
+
130
+ #: ../class/avh-ec.admin.php:651
131
+ msgid "Translation"
132
+ msgstr "Traducción"
133
+
134
+ #: ../class/avh-ec.admin.php:831
135
  msgid "Settings"
136
  msgstr "Configuración"
137
 
138
+ #: ../class/avh-ec.admin.php:847
139
+ #: ../class/avh-ec.widgets.php:248
140
+ #: ../class/avh-ec.widgets.php:551
141
+ #: ../class/avh-ec.widgets.php:786
142
+ msgid "Name"
143
+ msgstr "Nombre"
144
+
145
+ #: ../class/avh-ec.admin.php:847
146
+ msgid "Description"
147
+ msgstr ""
148
+
149
+ #: ../class/avh-ec.admin.php:847
150
+ #, fuzzy
151
+ msgid "Categories in the group"
152
+ msgstr "Categorías"
153
+
154
+ #: ../class/avh-ec.admin.php:864
155
+ #, php-format
156
+ msgid "Your attempt to delete this group: &#8220;%s&#8221; has failed."
157
+ msgstr ""
158
+
159
+ #: ../class/avh-ec.admin.php:926
160
+ #, php-format
161
+ msgid "Edit &#8220;%s&#8221;"
162
+ msgstr ""
163
+
164
+ #: ../class/avh-ec.admin.php:928
165
+ msgid "Edit"
166
+ msgstr ""
167
+
168
+ #: ../class/avh-ec.admin.php:933
169
+ msgid "Delete"
170
+ msgstr ""
171
+
172
+ #: ../class/avh-ec.core.php:346
173
+ #: ../class/avh-ec.widgets.php:64
174
+ #: ../class/avh-ec.widgets.php:410
175
+ #: ../class/avh-ec.widgets.php:644
176
  msgid "Categories"
177
  msgstr "Categorías"
178
 
179
+ #: ../class/avh-ec.core.php:379
180
  #: ../class/avh-ec.core.php:381
 
181
  msgid "No categories"
182
  msgstr "No hay categorías"
183
 
184
+ #: ../class/avh-ec.core.php:566
185
+ #, php-format
186
+ msgid "View all posts filed under %s"
187
+ msgstr ""
188
+
189
+ #: ../class/avh-ec.core.php:581
190
+ #, php-format
191
+ msgid "Feed for all posts filed under %s"
192
+ msgstr ""
193
+
194
  #: ../class/avh-ec.widgets.php:24
195
  msgid "An extended version of the default Categories widget."
196
  msgstr "Una versión extendida del widget de categorías predeterminado."
197
 
198
+ #: ../class/avh-ec.widgets.php:25
199
+ #, fuzzy
200
+ msgid "AVH Extended Categories"
201
+ msgstr "AVH Extended Categories Top"
202
+
203
+ #: ../class/avh-ec.widgets.php:86
204
+ #: ../class/avh-ec.widgets.php:432
205
+ #: ../class/avh-ec.widgets.php:670
206
  msgid "Select Category"
207
  msgstr "Seleccionar categoría"
208
 
209
+ #: ../class/avh-ec.widgets.php:199
210
+ #: ../class/avh-ec.widgets.php:527
211
+ #: ../class/avh-ec.widgets.php:755
212
  msgid "Title"
213
  msgstr "Título"
214
 
215
+ #: ../class/avh-ec.widgets.php:208
216
  msgid "Show selected categories only"
217
  msgstr "Mostrar solo categorías seleccionadas"
218
 
219
+ #: ../class/avh-ec.widgets.php:214
220
+ #: ../class/avh-ec.widgets.php:543
221
+ #: ../class/avh-ec.widgets.php:764
222
  msgid "Show post counts"
223
  msgstr "Mostrar contadores de entradas"
224
 
225
+ #: ../class/avh-ec.widgets.php:220
226
+ #: ../class/avh-ec.widgets.php:770
227
  msgid "Show hierarchy"
228
  msgstr "Mostrar jerarquía"
229
 
230
+ #: ../class/avh-ec.widgets.php:225
231
  msgid "How many levels to show"
232
  msgstr "Cuantos niveles mostrar"
233
 
234
+ #: ../class/avh-ec.widgets.php:228
235
  msgid "All Levels"
236
  msgstr "Todos los niveles"
237
 
238
+ #: ../class/avh-ec.widgets.php:229
239
  msgid "Toplevel only"
240
  msgstr "Primer nivel"
241
 
242
+ #: ../class/avh-ec.widgets.php:231
243
  msgid "Child "
244
  msgstr "Hijo "
245
 
246
+ #: ../class/avh-ec.widgets.php:238
247
+ #: ../class/avh-ec.widgets.php:776
248
  msgid "Hide empty categories"
249
  msgstr "Esconder categorías vacías"
250
 
251
+ #: ../class/avh-ec.widgets.php:245
252
+ #: ../class/avh-ec.widgets.php:548
253
+ #: ../class/avh-ec.widgets.php:783
254
  msgid "Sort by "
255
  msgstr "Ordenar por "
256
 
257
+ #: ../class/avh-ec.widgets.php:247
258
+ #: ../class/avh-ec.widgets.php:550
259
+ #: ../class/avh-ec.widgets.php:785
260
  msgid "ID"
261
  msgstr "ID"
262
 
263
+ #: ../class/avh-ec.widgets.php:249
264
+ #: ../class/avh-ec.widgets.php:552
265
+ #: ../class/avh-ec.widgets.php:787
 
 
 
 
266
  msgid "Count"
267
  msgstr "Número"
268
 
269
+ #: ../class/avh-ec.widgets.php:255
270
+ #: ../class/avh-ec.widgets.php:558
271
+ #: ../class/avh-ec.widgets.php:793
272
  msgid "Sort order "
273
  msgstr "Orden "
274
 
275
+ #: ../class/avh-ec.widgets.php:257
276
+ #: ../class/avh-ec.widgets.php:560
277
+ #: ../class/avh-ec.widgets.php:795
278
  msgid "Ascending"
279
  msgstr "Ascendente"
280
 
281
+ #: ../class/avh-ec.widgets.php:258
282
+ #: ../class/avh-ec.widgets.php:561
283
+ #: ../class/avh-ec.widgets.php:796
284
  msgid "Descending"
285
  msgstr "Descendente"
286
 
287
+ #: ../class/avh-ec.widgets.php:264
288
+ #: ../class/avh-ec.widgets.php:567
289
+ #: ../class/avh-ec.widgets.php:802
290
  msgid "Display style "
291
  msgstr "Estilo de visualización "
292
 
293
+ #: ../class/avh-ec.widgets.php:266
294
+ #: ../class/avh-ec.widgets.php:569
295
+ #: ../class/avh-ec.widgets.php:804
296
  msgid "List"
297
  msgstr "Lista"
298
 
299
+ #: ../class/avh-ec.widgets.php:267
300
+ #: ../class/avh-ec.widgets.php:570
301
+ #: ../class/avh-ec.widgets.php:805
302
  msgid "Drop down"
303
  msgstr "Desplegable"
304
 
305
+ #: ../class/avh-ec.widgets.php:277
306
+ #: ../class/avh-ec.widgets.php:580
307
+ #: ../class/avh-ec.widgets.php:815
308
  msgid "Show RSS Feed"
309
  msgstr "Mostrar RSS feed"
310
 
311
+ #: ../class/avh-ec.widgets.php:282
312
+ #: ../class/avh-ec.widgets.php:585
313
+ #: ../class/avh-ec.widgets.php:820
314
  msgid "Path (URI) to RSS image"
315
  msgstr "Ruta (URI) al RSS feed"
316
 
317
+ #: ../class/avh-ec.widgets.php:288
318
  msgid "Select categories"
319
  msgstr "Elija categorías"
320
 
321
+ #: ../class/avh-ec.widgets.php:293
322
  msgid "All Categories"
323
  msgstr "Todas las categorías"
324
 
325
+ #: ../class/avh-ec.widgets.php:303
326
  msgid "Exclude the selected categories"
327
  msgstr "Excluir las categorías seleccionadas"
328
 
329
+ #: ../class/avh-ec.widgets.php:389
330
  msgid "Shows the top categories."
331
  msgstr "Mostrar las principales categorías"
332
 
333
+ #: ../class/avh-ec.widgets.php:390
334
+ #, fuzzy
335
+ msgid "AVH Extended Categories: Top Categories"
336
  msgstr "AVH Extended Categories Top"
337
 
338
+ #: ../class/avh-ec.widgets.php:534
339
  msgid "How many categories to show"
340
  msgstr "Cuantas categorías mostrar"
341
 
342
+ #: ../class/avh-ec.widgets.php:612
343
+ #, fuzzy
344
+ msgid "Shows grouped categories."
345
+ msgstr "Mostrar las principales categorías"
346
+
347
+ #: ../class/avh-ec.widgets.php:613
348
+ #, fuzzy
349
+ msgid "AVH Extended Category: Category Group"
350
+ msgstr "AVH Extended Categories Top"
351
+
2.8/lang/avh-ec-fr_FR.mo ADDED
Binary file
2.8/lang/avh-ec-fr_FR.po ADDED
@@ -0,0 +1,336 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: AVH Extended Categories\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2010-01-30 19:59-0500\n"
6
+ "PO-Revision-Date: \n"
7
+ "Last-Translator: Peter van der Does <peter@avirtualhome.com>\n"
8
+ "Language-Team: \n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+
13
+ #: ../class/avh-ec.admin.php:35
14
+ #: ../class/avh-ec.admin.php:36
15
+ msgid "Category Group"
16
+ msgstr "Groupe de catégorie"
17
+
18
+ #: ../class/avh-ec.admin.php:174
19
+ #: ../class/avh-ec.admin.php:234
20
+ msgid "Overview"
21
+ msgstr "Présentation"
22
+
23
+ #: ../class/avh-ec.admin.php:175
24
+ #: ../class/avh-ec.admin.php:367
25
+ msgid "General Options"
26
+ msgstr "Options générales"
27
+
28
+ #: ../class/avh-ec.admin.php:176
29
+ #: ../class/avh-ec.admin.php:556
30
+ #: ../class/avh-ec.category-group.php:44
31
+ #: ../class/avh-ec.category-group.php:45
32
+ msgid "Category Groups"
33
+ msgstr "Groupes de catégorie"
34
+
35
+ #: ../class/avh-ec.admin.php:177
36
+ #: ../class/avh-ec.admin.php:692
37
+ msgid "F.A.Q"
38
+ msgstr "FAQ"
39
+
40
+ #: ../class/avh-ec.admin.php:193
41
+ #: ../class/avh-ec.admin.php:413
42
+ msgid "Group Overview"
43
+ msgstr "Group Overview"
44
+
45
+ #: ../class/avh-ec.admin.php:218
46
+ #: ../class/avh-ec.admin.php:676
47
+ msgid "Announcements"
48
+ msgstr "Annonces"
49
+
50
+ #: ../class/avh-ec.admin.php:219
51
+ #: ../class/avh-ec.admin.php:352
52
+ #: ../class/avh-ec.admin.php:677
53
+ msgid "Donations"
54
+ msgstr "Dons"
55
+
56
+ #: ../class/avh-ec.admin.php:262
57
+ msgid "Options"
58
+ msgstr "Options"
59
+
60
+ #: ../class/avh-ec.admin.php:330
61
+ msgid "Options saved"
62
+ msgstr "Options sauvegardées"
63
+
64
+ #: ../class/avh-ec.admin.php:384
65
+ msgid "Save Changes"
66
+ msgstr "Sauver les modifications"
67
+
68
+ #: ../class/avh-ec.admin.php:412
69
+ msgid "Add Group"
70
+ msgstr "Ajouter un groupe"
71
+
72
+ #: ../class/avh-ec.admin.php:462
73
+ msgid "Category group saved"
74
+ msgstr "Groupe de la catégorie sauvegardée"
75
+
76
+ #: ../class/avh-ec.admin.php:468
77
+ msgid "Category group conflicts with "
78
+ msgstr "Groupe de la catégorie en conflit avec"
79
+
80
+ #: ../class/avh-ec.admin.php:469
81
+ msgid "Same slug is used. "
82
+ msgstr "Same slug is used. "
83
+
84
+ #: ../class/avh-ec.admin.php:491
85
+ msgid "Edit Group"
86
+ msgstr "Editer le groupe"
87
+
88
+ #: ../class/avh-ec.admin.php:503
89
+ msgid "Cheatin&#8217; uh?"
90
+ msgstr "Cheatin&#8217; uh?"
91
+
92
+ #: ../class/avh-ec.admin.php:525
93
+ msgid "Category group updated"
94
+ msgstr "Groupe de categorie mis a jour"
95
+
96
+ #: ../class/avh-ec.admin.php:528
97
+ msgid "Category group not updated"
98
+ msgstr "Groupe de catégorie non mis a jour"
99
+
100
+ #: ../class/avh-ec.admin.php:529
101
+ msgid "Duplicate slug detected"
102
+ msgstr "Duplicate slug detected"
103
+
104
+ #: ../class/avh-ec.admin.php:533
105
+ msgid "Unknown category group"
106
+ msgstr "Groupe de catégorie inconnu"
107
+
108
+ #: ../class/avh-ec.admin.php:590
109
+ msgid "Add group"
110
+ msgstr "Ajouter un groupe"
111
+
112
+ #: ../class/avh-ec.admin.php:639
113
+ msgid "Update group"
114
+ msgstr "Groupe mis a jour"
115
+
116
+ #: ../class/avh-ec.admin.php:650
117
+ msgid "F.A.Q."
118
+ msgstr "FAQ"
119
+
120
+ #: ../class/avh-ec.admin.php:651
121
+ msgid "Translation"
122
+ msgstr "Traduction"
123
+
124
+ #: ../class/avh-ec.admin.php:831
125
+ msgid "Settings"
126
+ msgstr "Paramètres"
127
+
128
+ #: ../class/avh-ec.admin.php:847
129
+ #: ../class/avh-ec.widgets.php:248
130
+ #: ../class/avh-ec.widgets.php:551
131
+ #: ../class/avh-ec.widgets.php:786
132
+ msgid "Name"
133
+ msgstr "Nom"
134
+
135
+ #: ../class/avh-ec.admin.php:847
136
+ msgid "Description"
137
+ msgstr "Description"
138
+
139
+ #: ../class/avh-ec.admin.php:847
140
+ msgid "Categories in the group"
141
+ msgstr "Categorie dans le groupe"
142
+
143
+ #: ../class/avh-ec.admin.php:864
144
+ #, php-format
145
+ msgid "Your attempt to delete this group: &#8220;%s&#8221; has failed."
146
+ msgstr "Votre demande pour supprimer ce groupe &#8220;%s&#8221; a échoué"
147
+
148
+ #: ../class/avh-ec.admin.php:926
149
+ #, php-format
150
+ msgid "Edit &#8220;%s&#8221;"
151
+ msgstr "Editer &#8220;%s&#8221;"
152
+
153
+ #: ../class/avh-ec.admin.php:928
154
+ msgid "Edit"
155
+ msgstr "Editer"
156
+
157
+ #: ../class/avh-ec.admin.php:933
158
+ msgid "Delete"
159
+ msgstr "Supprimer"
160
+
161
+ #: ../class/avh-ec.core.php:346
162
+ #: ../class/avh-ec.widgets.php:64
163
+ #: ../class/avh-ec.widgets.php:410
164
+ #: ../class/avh-ec.widgets.php:644
165
+ msgid "Categories"
166
+ msgstr "Categories"
167
+
168
+ #: ../class/avh-ec.core.php:379
169
+ #: ../class/avh-ec.core.php:381
170
+ msgid "No categories"
171
+ msgstr "Pas de catégories"
172
+
173
+ #: ../class/avh-ec.core.php:566
174
+ #, php-format
175
+ msgid "View all posts filed under %s"
176
+ msgstr "Voir tous les posts sous %s"
177
+
178
+ #: ../class/avh-ec.core.php:581
179
+ #, php-format
180
+ msgid "Feed for all posts filed under %s"
181
+ msgstr "Flux pour tous les posts sous %s"
182
+
183
+ #: ../class/avh-ec.widgets.php:24
184
+ msgid "An extended version of the default Categories widget."
185
+ msgstr "Une version étendue de votre widget categorie"
186
+
187
+ #: ../class/avh-ec.widgets.php:25
188
+ msgid "AVH Extended Categories"
189
+ msgstr "AVH Extended Categories"
190
+
191
+ #: ../class/avh-ec.widgets.php:86
192
+ #: ../class/avh-ec.widgets.php:432
193
+ #: ../class/avh-ec.widgets.php:670
194
+ msgid "Select Category"
195
+ msgstr "Selection d'une catégorie"
196
+
197
+ #: ../class/avh-ec.widgets.php:199
198
+ #: ../class/avh-ec.widgets.php:527
199
+ #: ../class/avh-ec.widgets.php:755
200
+ msgid "Title"
201
+ msgstr "Titre"
202
+
203
+ #: ../class/avh-ec.widgets.php:208
204
+ msgid "Show selected categories only"
205
+ msgstr "Montrer que les catégories sélectionnées"
206
+
207
+ #: ../class/avh-ec.widgets.php:214
208
+ #: ../class/avh-ec.widgets.php:543
209
+ #: ../class/avh-ec.widgets.php:764
210
+ msgid "Show post counts"
211
+ msgstr "Montrer les articles comptés"
212
+
213
+ #: ../class/avh-ec.widgets.php:220
214
+ #: ../class/avh-ec.widgets.php:770
215
+ msgid "Show hierarchy"
216
+ msgstr "Montrer la hiérarchie"
217
+
218
+ #: ../class/avh-ec.widgets.php:225
219
+ msgid "How many levels to show"
220
+ msgstr "Combien de niveau a afficher"
221
+
222
+ #: ../class/avh-ec.widgets.php:228
223
+ msgid "All Levels"
224
+ msgstr "Tous les niveaux"
225
+
226
+ #: ../class/avh-ec.widgets.php:229
227
+ msgid "Toplevel only"
228
+ msgstr "Unqiuement le 1er niveau"
229
+
230
+ #: ../class/avh-ec.widgets.php:231
231
+ msgid "Child "
232
+ msgstr "Enfants"
233
+
234
+ #: ../class/avh-ec.widgets.php:238
235
+ #: ../class/avh-ec.widgets.php:776
236
+ msgid "Hide empty categories"
237
+ msgstr "Cacher les catégories vides"
238
+
239
+ #: ../class/avh-ec.widgets.php:245
240
+ #: ../class/avh-ec.widgets.php:548
241
+ #: ../class/avh-ec.widgets.php:783
242
+ msgid "Sort by "
243
+ msgstr "Trié par"
244
+
245
+ #: ../class/avh-ec.widgets.php:247
246
+ #: ../class/avh-ec.widgets.php:550
247
+ #: ../class/avh-ec.widgets.php:785
248
+ msgid "ID"
249
+ msgstr "ID"
250
+
251
+ #: ../class/avh-ec.widgets.php:249
252
+ #: ../class/avh-ec.widgets.php:552
253
+ #: ../class/avh-ec.widgets.php:787
254
+ msgid "Count"
255
+ msgstr "Comptée"
256
+
257
+ #: ../class/avh-ec.widgets.php:255
258
+ #: ../class/avh-ec.widgets.php:558
259
+ #: ../class/avh-ec.widgets.php:793
260
+ msgid "Sort order "
261
+ msgstr "Trié par ordre"
262
+
263
+ #: ../class/avh-ec.widgets.php:257
264
+ #: ../class/avh-ec.widgets.php:560
265
+ #: ../class/avh-ec.widgets.php:795
266
+ msgid "Ascending"
267
+ msgstr "Croissant"
268
+
269
+ #: ../class/avh-ec.widgets.php:258
270
+ #: ../class/avh-ec.widgets.php:561
271
+ #: ../class/avh-ec.widgets.php:796
272
+ msgid "Descending"
273
+ msgstr "Descendant"
274
+
275
+ #: ../class/avh-ec.widgets.php:264
276
+ #: ../class/avh-ec.widgets.php:567
277
+ #: ../class/avh-ec.widgets.php:802
278
+ msgid "Display style "
279
+ msgstr "Afficher les style"
280
+
281
+ #: ../class/avh-ec.widgets.php:266
282
+ #: ../class/avh-ec.widgets.php:569
283
+ #: ../class/avh-ec.widgets.php:804
284
+ msgid "List"
285
+ msgstr "Liste"
286
+
287
+ #: ../class/avh-ec.widgets.php:267
288
+ #: ../class/avh-ec.widgets.php:570
289
+ #: ../class/avh-ec.widgets.php:805
290
+ msgid "Drop down"
291
+ msgstr "Déroulante"
292
+
293
+ #: ../class/avh-ec.widgets.php:277
294
+ #: ../class/avh-ec.widgets.php:580
295
+ #: ../class/avh-ec.widgets.php:815
296
+ msgid "Show RSS Feed"
297
+ msgstr "Afficher le flux RSS"
298
+
299
+ #: ../class/avh-ec.widgets.php:282
300
+ #: ../class/avh-ec.widgets.php:585
301
+ #: ../class/avh-ec.widgets.php:820
302
+ msgid "Path (URI) to RSS image"
303
+ msgstr "Chemin de l'icone RSS"
304
+
305
+ #: ../class/avh-ec.widgets.php:288
306
+ msgid "Select categories"
307
+ msgstr "Selection des catégories"
308
+
309
+ #: ../class/avh-ec.widgets.php:293
310
+ msgid "All Categories"
311
+ msgstr "Toutes les catégories"
312
+
313
+ #: ../class/avh-ec.widgets.php:303
314
+ msgid "Exclude the selected categories"
315
+ msgstr "Ezclure les catégories sélectionnées"
316
+
317
+ #: ../class/avh-ec.widgets.php:389
318
+ msgid "Shows the top categories."
319
+ msgstr "Afficher les catégories principales"
320
+
321
+ #: ../class/avh-ec.widgets.php:390
322
+ msgid "AVH Extended Categories: Top Categories"
323
+ msgstr "AVH Extented Categories : Les catégories principales"
324
+
325
+ #: ../class/avh-ec.widgets.php:534
326
+ msgid "How many categories to show"
327
+ msgstr "Nombre de catégories a afficher"
328
+
329
+ #: ../class/avh-ec.widgets.php:612
330
+ msgid "Shows grouped categories."
331
+ msgstr "Afficher les groupes de catégories"
332
+
333
+ #: ../class/avh-ec.widgets.php:613
334
+ msgid "AVH Extended Category: Category Group"
335
+ msgstr "AVH Extented Category : Groupe de catégorie"
336
+
2.8/lang/avh-ec-it_IT.mo ADDED
Binary file
2.8/lang/avh-ec-it_IT.po ADDED
@@ -0,0 +1,351 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: AVH Extended Categories in italiano\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2010-01-30 17:01-0500\n"
6
+ "PO-Revision-Date: \n"
7
+ "Last-Translator: Gianni Diurno (aka gidibao) <gidibao@gmail.com>\n"
8
+ "Language-Team: Gianni Diurno | http://gidibao.net/ <gidibao@gmail.com>\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Poedit-SourceCharset: utf-8\n"
13
+ "X-Poedit-KeywordsList: __ngettext:1,2;__;_e\n"
14
+ "X-Poedit-Basepath: .\n"
15
+ "Plural-Forms: nplurals=2; plural=n != 1;\n"
16
+ "X-Poedit-Language: Italian\n"
17
+ "X-Poedit-Country: ITALY\n"
18
+ "X-Poedit-SearchPath-0: .\n"
19
+ "X-Poedit-SearchPath-1: ..\n"
20
+
21
+ #: ../class/avh-ec.admin.php:35
22
+ #: ../class/avh-ec.admin.php:36
23
+ msgid "Category Group"
24
+ msgstr ""
25
+
26
+ #: ../class/avh-ec.admin.php:174
27
+ #: ../class/avh-ec.admin.php:234
28
+ msgid "Overview"
29
+ msgstr ""
30
+
31
+ #: ../class/avh-ec.admin.php:175
32
+ #: ../class/avh-ec.admin.php:367
33
+ #, fuzzy
34
+ msgid "General Options"
35
+ msgstr "Opzioni"
36
+
37
+ #: ../class/avh-ec.admin.php:176
38
+ #: ../class/avh-ec.admin.php:556
39
+ #: ../class/avh-ec.category-group.php:44
40
+ #: ../class/avh-ec.category-group.php:45
41
+ #, fuzzy
42
+ msgid "Category Groups"
43
+ msgstr "Categorie"
44
+
45
+ #: ../class/avh-ec.admin.php:177
46
+ #: ../class/avh-ec.admin.php:692
47
+ msgid "F.A.Q"
48
+ msgstr ""
49
+
50
+ #: ../class/avh-ec.admin.php:193
51
+ #: ../class/avh-ec.admin.php:413
52
+ msgid "Group Overview"
53
+ msgstr ""
54
+
55
+ #: ../class/avh-ec.admin.php:218
56
+ #: ../class/avh-ec.admin.php:676
57
+ msgid "Announcements"
58
+ msgstr ""
59
+
60
+ #: ../class/avh-ec.admin.php:219
61
+ #: ../class/avh-ec.admin.php:352
62
+ #: ../class/avh-ec.admin.php:677
63
+ #, fuzzy
64
+ msgid "Donations"
65
+ msgstr "Opzioni"
66
+
67
+ #: ../class/avh-ec.admin.php:262
68
+ msgid "Options"
69
+ msgstr "Opzioni"
70
+
71
+ #: ../class/avh-ec.admin.php:330
72
+ msgid "Options saved"
73
+ msgstr "Le opzioni sono state salvate"
74
+
75
+ #: ../class/avh-ec.admin.php:384
76
+ msgid "Save Changes"
77
+ msgstr "Salva le modifiche"
78
+
79
+ #: ../class/avh-ec.admin.php:412
80
+ msgid "Add Group"
81
+ msgstr ""
82
+
83
+ #: ../class/avh-ec.admin.php:462
84
+ msgid "Category group saved"
85
+ msgstr ""
86
+
87
+ #: ../class/avh-ec.admin.php:468
88
+ msgid "Category group conflicts with "
89
+ msgstr ""
90
+
91
+ #: ../class/avh-ec.admin.php:469
92
+ msgid "Same slug is used. "
93
+ msgstr ""
94
+
95
+ #: ../class/avh-ec.admin.php:491
96
+ msgid "Edit Group"
97
+ msgstr ""
98
+
99
+ #: ../class/avh-ec.admin.php:503
100
+ msgid "Cheatin&#8217; uh?"
101
+ msgstr ""
102
+
103
+ #: ../class/avh-ec.admin.php:525
104
+ msgid "Category group updated"
105
+ msgstr ""
106
+
107
+ #: ../class/avh-ec.admin.php:528
108
+ msgid "Category group not updated"
109
+ msgstr ""
110
+
111
+ #: ../class/avh-ec.admin.php:529
112
+ msgid "Duplicate slug detected"
113
+ msgstr ""
114
+
115
+ #: ../class/avh-ec.admin.php:533
116
+ msgid "Unknown category group"
117
+ msgstr ""
118
+
119
+ #: ../class/avh-ec.admin.php:590
120
+ msgid "Add group"
121
+ msgstr ""
122
+
123
+ #: ../class/avh-ec.admin.php:639
124
+ msgid "Update group"
125
+ msgstr ""
126
+
127
+ #: ../class/avh-ec.admin.php:650
128
+ msgid "F.A.Q."
129
+ msgstr ""
130
+
131
+ #: ../class/avh-ec.admin.php:651
132
+ msgid "Translation"
133
+ msgstr "Traduzione"
134
+
135
+ #: ../class/avh-ec.admin.php:831
136
+ msgid "Settings"
137
+ msgstr "Impostazioni"
138
+
139
+ #: ../class/avh-ec.admin.php:847
140
+ #: ../class/avh-ec.widgets.php:248
141
+ #: ../class/avh-ec.widgets.php:551
142
+ #: ../class/avh-ec.widgets.php:786
143
+ msgid "Name"
144
+ msgstr "nome"
145
+
146
+ #: ../class/avh-ec.admin.php:847
147
+ msgid "Description"
148
+ msgstr ""
149
+
150
+ #: ../class/avh-ec.admin.php:847
151
+ #, fuzzy
152
+ msgid "Categories in the group"
153
+ msgstr "Categorie"
154
+
155
+ #: ../class/avh-ec.admin.php:864
156
+ #, php-format
157
+ msgid "Your attempt to delete this group: &#8220;%s&#8221; has failed."
158
+ msgstr ""
159
+
160
+ #: ../class/avh-ec.admin.php:926
161
+ #, php-format
162
+ msgid "Edit &#8220;%s&#8221;"
163
+ msgstr ""
164
+
165
+ #: ../class/avh-ec.admin.php:928
166
+ msgid "Edit"
167
+ msgstr ""
168
+
169
+ #: ../class/avh-ec.admin.php:933
170
+ msgid "Delete"
171
+ msgstr ""
172
+
173
+ #: ../class/avh-ec.core.php:346
174
+ #: ../class/avh-ec.widgets.php:64
175
+ #: ../class/avh-ec.widgets.php:410
176
+ #: ../class/avh-ec.widgets.php:644
177
+ msgid "Categories"
178
+ msgstr "Categorie"
179
+
180
+ #: ../class/avh-ec.core.php:379
181
+ #: ../class/avh-ec.core.php:381
182
+ msgid "No categories"
183
+ msgstr "Nessuna categoria"
184
+
185
+ #: ../class/avh-ec.core.php:566
186
+ #, php-format
187
+ msgid "View all posts filed under %s"
188
+ msgstr ""
189
+
190
+ #: ../class/avh-ec.core.php:581
191
+ #, php-format
192
+ msgid "Feed for all posts filed under %s"
193
+ msgstr ""
194
+
195
+ #: ../class/avh-ec.widgets.php:24
196
+ msgid "An extended version of the default Categories widget."
197
+ msgstr "Una versione estesa del widget predefinito per le categorie"
198
+
199
+ #: ../class/avh-ec.widgets.php:25
200
+ msgid "AVH Extended Categories"
201
+ msgstr "AVH Extended Categories"
202
+
203
+ #: ../class/avh-ec.widgets.php:86
204
+ #: ../class/avh-ec.widgets.php:432
205
+ #: ../class/avh-ec.widgets.php:670
206
+ msgid "Select Category"
207
+ msgstr "Selezione categoria"
208
+
209
+ #: ../class/avh-ec.widgets.php:199
210
+ #: ../class/avh-ec.widgets.php:527
211
+ #: ../class/avh-ec.widgets.php:755
212
+ msgid "Title"
213
+ msgstr "Titolo"
214
+
215
+ #: ../class/avh-ec.widgets.php:208
216
+ msgid "Show selected categories only"
217
+ msgstr "Mostra le sole categorie selezionate"
218
+
219
+ #: ../class/avh-ec.widgets.php:214
220
+ #: ../class/avh-ec.widgets.php:543
221
+ #: ../class/avh-ec.widgets.php:764
222
+ msgid "Show post counts"
223
+ msgstr "Mostra il computo degli articoli"
224
+
225
+ #: ../class/avh-ec.widgets.php:220
226
+ #: ../class/avh-ec.widgets.php:770
227
+ msgid "Show hierarchy"
228
+ msgstr "Mostra la gerachia"
229
+
230
+ #: ../class/avh-ec.widgets.php:225
231
+ msgid "How many levels to show"
232
+ msgstr "Quanti livelli desideri mostrare?"
233
+
234
+ #: ../class/avh-ec.widgets.php:228
235
+ msgid "All Levels"
236
+ msgstr "tutti i livelli"
237
+
238
+ #: ../class/avh-ec.widgets.php:229
239
+ msgid "Toplevel only"
240
+ msgstr "solo i principali"
241
+
242
+ #: ../class/avh-ec.widgets.php:231
243
+ msgid "Child "
244
+ msgstr "figlio"
245
+
246
+ #: ../class/avh-ec.widgets.php:238
247
+ #: ../class/avh-ec.widgets.php:776
248
+ msgid "Hide empty categories"
249
+ msgstr "Nascondi le categorie vuote"
250
+
251
+ #: ../class/avh-ec.widgets.php:245
252
+ #: ../class/avh-ec.widgets.php:548
253
+ #: ../class/avh-ec.widgets.php:783
254
+ msgid "Sort by "
255
+ msgstr "Disposti per"
256
+
257
+ #: ../class/avh-ec.widgets.php:247
258
+ #: ../class/avh-ec.widgets.php:550
259
+ #: ../class/avh-ec.widgets.php:785
260
+ msgid "ID"
261
+ msgstr "ID"
262
+
263
+ #: ../class/avh-ec.widgets.php:249
264
+ #: ../class/avh-ec.widgets.php:552
265
+ #: ../class/avh-ec.widgets.php:787
266
+ msgid "Count"
267
+ msgstr "conteggio"
268
+
269
+ #: ../class/avh-ec.widgets.php:255
270
+ #: ../class/avh-ec.widgets.php:558
271
+ #: ../class/avh-ec.widgets.php:793
272
+ msgid "Sort order "
273
+ msgstr "Ordine"
274
+
275
+ #: ../class/avh-ec.widgets.php:257
276
+ #: ../class/avh-ec.widgets.php:560
277
+ #: ../class/avh-ec.widgets.php:795
278
+ msgid "Ascending"
279
+ msgstr "ascendente"
280
+
281
+ #: ../class/avh-ec.widgets.php:258
282
+ #: ../class/avh-ec.widgets.php:561
283
+ #: ../class/avh-ec.widgets.php:796
284
+ msgid "Descending"
285
+ msgstr "discendente"
286
+
287
+ #: ../class/avh-ec.widgets.php:264
288
+ #: ../class/avh-ec.widgets.php:567
289
+ #: ../class/avh-ec.widgets.php:802
290
+ msgid "Display style "
291
+ msgstr "Stile"
292
+
293
+ #: ../class/avh-ec.widgets.php:266
294
+ #: ../class/avh-ec.widgets.php:569
295
+ #: ../class/avh-ec.widgets.php:804
296
+ msgid "List"
297
+ msgstr "lista"
298
+
299
+ #: ../class/avh-ec.widgets.php:267
300
+ #: ../class/avh-ec.widgets.php:570
301
+ #: ../class/avh-ec.widgets.php:805
302
+ msgid "Drop down"
303
+ msgstr "menu a cascata"
304
+
305
+ #: ../class/avh-ec.widgets.php:277
306
+ #: ../class/avh-ec.widgets.php:580
307
+ #: ../class/avh-ec.widgets.php:815
308
+ msgid "Show RSS Feed"
309
+ msgstr "Mostra feed RSS"
310
+
311
+ #: ../class/avh-ec.widgets.php:282
312
+ #: ../class/avh-ec.widgets.php:585
313
+ #: ../class/avh-ec.widgets.php:820
314
+ msgid "Path (URI) to RSS image"
315
+ msgstr "Percorso (URI) alla immagine RSS"
316
+
317
+ #: ../class/avh-ec.widgets.php:288
318
+ msgid "Select categories"
319
+ msgstr "Selezione categorie"
320
+
321
+ #: ../class/avh-ec.widgets.php:293
322
+ msgid "All Categories"
323
+ msgstr "Tutte le categorie"
324
+
325
+ #: ../class/avh-ec.widgets.php:303
326
+ msgid "Exclude the selected categories"
327
+ msgstr "Escludi le categorie selezionate"
328
+
329
+ #: ../class/avh-ec.widgets.php:389
330
+ msgid "Shows the top categories."
331
+ msgstr "Mostra le categorie top"
332
+
333
+ #: ../class/avh-ec.widgets.php:390
334
+ #, fuzzy
335
+ msgid "AVH Extended Categories: Top Categories"
336
+ msgstr "AVH Extended Categories Top"
337
+
338
+ #: ../class/avh-ec.widgets.php:534
339
+ msgid "How many categories to show"
340
+ msgstr "Quante categorie desideri mostrare"
341
+
342
+ #: ../class/avh-ec.widgets.php:612
343
+ #, fuzzy
344
+ msgid "Shows grouped categories."
345
+ msgstr "Mostra le categorie top"
346
+
347
+ #: ../class/avh-ec.widgets.php:613
348
+ #, fuzzy
349
+ msgid "AVH Extended Category: Category Group"
350
+ msgstr "AVH Extended Categories Top"
351
+
2.8/lang/avh-ec.po ADDED
@@ -0,0 +1,342 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: AVH Extended Categories\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2010-01-30 19:59-0500\n"
6
+ "PO-Revision-Date: \n"
7
+ "Last-Translator: Peter van der Does <peter@avirtualhome.com>\n"
8
+ "Language-Team: \n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Poedit-SourceCharset: utf-8\n"
13
+ "X-Poedit-KeywordsList: __ngettext:1,2;__;_e\n"
14
+ "X-Poedit-Basepath: .\n"
15
+ "Plural-Forms: nplurals=2; plural=n != 1;\n"
16
+ "X-Poedit-SearchPath-0: .\n"
17
+ "X-Poedit-SearchPath-1: ..\n"
18
+
19
+ #: ../class/avh-ec.admin.php:35
20
+ #: ../class/avh-ec.admin.php:36
21
+ msgid "Category Group"
22
+ msgstr ""
23
+
24
+ #: ../class/avh-ec.admin.php:174
25
+ #: ../class/avh-ec.admin.php:234
26
+ msgid "Overview"
27
+ msgstr ""
28
+
29
+ #: ../class/avh-ec.admin.php:175
30
+ #: ../class/avh-ec.admin.php:367
31
+ msgid "General Options"
32
+ msgstr ""
33
+
34
+ #: ../class/avh-ec.admin.php:176
35
+ #: ../class/avh-ec.admin.php:556
36
+ #: ../class/avh-ec.category-group.php:44
37
+ #: ../class/avh-ec.category-group.php:45
38
+ msgid "Category Groups"
39
+ msgstr ""
40
+
41
+ #: ../class/avh-ec.admin.php:177
42
+ #: ../class/avh-ec.admin.php:692
43
+ msgid "F.A.Q"
44
+ msgstr ""
45
+
46
+ #: ../class/avh-ec.admin.php:193
47
+ #: ../class/avh-ec.admin.php:413
48
+ msgid "Group Overview"
49
+ msgstr ""
50
+
51
+ #: ../class/avh-ec.admin.php:218
52
+ #: ../class/avh-ec.admin.php:676
53
+ msgid "Announcements"
54
+ msgstr ""
55
+
56
+ #: ../class/avh-ec.admin.php:219
57
+ #: ../class/avh-ec.admin.php:352
58
+ #: ../class/avh-ec.admin.php:677
59
+ msgid "Donations"
60
+ msgstr ""
61
+
62
+ #: ../class/avh-ec.admin.php:262
63
+ msgid "Options"
64
+ msgstr ""
65
+
66
+ #: ../class/avh-ec.admin.php:330
67
+ msgid "Options saved"
68
+ msgstr ""
69
+
70
+ #: ../class/avh-ec.admin.php:384
71
+ msgid "Save Changes"
72
+ msgstr ""
73
+
74
+ #: ../class/avh-ec.admin.php:412
75
+ msgid "Add Group"
76
+ msgstr ""
77
+
78
+ #: ../class/avh-ec.admin.php:462
79
+ msgid "Category group saved"
80
+ msgstr ""
81
+
82
+ #: ../class/avh-ec.admin.php:468
83
+ msgid "Category group conflicts with "
84
+ msgstr ""
85
+
86
+ #: ../class/avh-ec.admin.php:469
87
+ msgid "Same slug is used. "
88
+ msgstr ""
89
+
90
+ #: ../class/avh-ec.admin.php:491
91
+ msgid "Edit Group"
92
+ msgstr ""
93
+
94
+ #: ../class/avh-ec.admin.php:503
95
+ msgid "Cheatin&#8217; uh?"
96
+ msgstr ""
97
+
98
+ #: ../class/avh-ec.admin.php:525
99
+ msgid "Category group updated"
100
+ msgstr ""
101
+
102
+ #: ../class/avh-ec.admin.php:528
103
+ msgid "Category group not updated"
104
+ msgstr ""
105
+
106
+ #: ../class/avh-ec.admin.php:529
107
+ msgid "Duplicate slug detected"
108
+ msgstr ""
109
+
110
+ #: ../class/avh-ec.admin.php:533
111
+ msgid "Unknown category group"
112
+ msgstr ""
113
+
114
+ #: ../class/avh-ec.admin.php:590
115
+ msgid "Add group"
116
+ msgstr ""
117
+
118
+ #: ../class/avh-ec.admin.php:639
119
+ msgid "Update group"
120
+ msgstr ""
121
+
122
+ #: ../class/avh-ec.admin.php:650
123
+ msgid "F.A.Q."
124
+ msgstr ""
125
+
126
+ #: ../class/avh-ec.admin.php:651
127
+ msgid "Translation"
128
+ msgstr ""
129
+
130
+ #: ../class/avh-ec.admin.php:831
131
+ msgid "Settings"
132
+ msgstr ""
133
+
134
+ #: ../class/avh-ec.admin.php:847
135
+ #: ../class/avh-ec.widgets.php:248
136
+ #: ../class/avh-ec.widgets.php:551
137
+ #: ../class/avh-ec.widgets.php:786
138
+ msgid "Name"
139
+ msgstr ""
140
+
141
+ #: ../class/avh-ec.admin.php:847
142
+ msgid "Description"
143
+ msgstr ""
144
+
145
+ #: ../class/avh-ec.admin.php:847
146
+ msgid "Categories in the group"
147
+ msgstr ""
148
+
149
+ #: ../class/avh-ec.admin.php:864
150
+ #, php-format
151
+ msgid "Your attempt to delete this group: &#8220;%s&#8221; has failed."
152
+ msgstr ""
153
+
154
+ #: ../class/avh-ec.admin.php:926
155
+ #, php-format
156
+ msgid "Edit &#8220;%s&#8221;"
157
+ msgstr ""
158
+
159
+ #: ../class/avh-ec.admin.php:928
160
+ msgid "Edit"
161
+ msgstr ""
162
+
163
+ #: ../class/avh-ec.admin.php:933
164
+ msgid "Delete"
165
+ msgstr ""
166
+
167
+ #: ../class/avh-ec.core.php:346
168
+ #: ../class/avh-ec.widgets.php:64
169
+ #: ../class/avh-ec.widgets.php:410
170
+ #: ../class/avh-ec.widgets.php:644
171
+ msgid "Categories"
172
+ msgstr ""
173
+
174
+ #: ../class/avh-ec.core.php:379
175
+ #: ../class/avh-ec.core.php:381
176
+ msgid "No categories"
177
+ msgstr ""
178
+
179
+ #: ../class/avh-ec.core.php:566
180
+ #, php-format
181
+ msgid "View all posts filed under %s"
182
+ msgstr ""
183
+
184
+ #: ../class/avh-ec.core.php:581
185
+ #, php-format
186
+ msgid "Feed for all posts filed under %s"
187
+ msgstr ""
188
+
189
+ #: ../class/avh-ec.widgets.php:24
190
+ msgid "An extended version of the default Categories widget."
191
+ msgstr ""
192
+
193
+ #: ../class/avh-ec.widgets.php:25
194
+ msgid "AVH Extended Categories"
195
+ msgstr ""
196
+
197
+ #: ../class/avh-ec.widgets.php:86
198
+ #: ../class/avh-ec.widgets.php:432
199
+ #: ../class/avh-ec.widgets.php:670
200
+ msgid "Select Category"
201
+ msgstr ""
202
+
203
+ #: ../class/avh-ec.widgets.php:199
204
+ #: ../class/avh-ec.widgets.php:527
205
+ #: ../class/avh-ec.widgets.php:755
206
+ msgid "Title"
207
+ msgstr ""
208
+
209
+ #: ../class/avh-ec.widgets.php:208
210
+ msgid "Show selected categories only"
211
+ msgstr ""
212
+
213
+ #: ../class/avh-ec.widgets.php:214
214
+ #: ../class/avh-ec.widgets.php:543
215
+ #: ../class/avh-ec.widgets.php:764
216
+ msgid "Show post counts"
217
+ msgstr ""
218
+
219
+ #: ../class/avh-ec.widgets.php:220
220
+ #: ../class/avh-ec.widgets.php:770
221
+ msgid "Show hierarchy"
222
+ msgstr ""
223
+
224
+ #: ../class/avh-ec.widgets.php:225
225
+ msgid "How many levels to show"
226
+ msgstr ""
227
+
228
+ #: ../class/avh-ec.widgets.php:228
229
+ msgid "All Levels"
230
+ msgstr ""
231
+
232
+ #: ../class/avh-ec.widgets.php:229
233
+ msgid "Toplevel only"
234
+ msgstr ""
235
+
236
+ #: ../class/avh-ec.widgets.php:231
237
+ msgid "Child "
238
+ msgstr ""
239
+
240
+ #: ../class/avh-ec.widgets.php:238
241
+ #: ../class/avh-ec.widgets.php:776
242
+ msgid "Hide empty categories"
243
+ msgstr ""
244
+
245
+ #: ../class/avh-ec.widgets.php:245
246
+ #: ../class/avh-ec.widgets.php:548
247
+ #: ../class/avh-ec.widgets.php:783
248
+ msgid "Sort by "
249
+ msgstr ""
250
+
251
+ #: ../class/avh-ec.widgets.php:247
252
+ #: ../class/avh-ec.widgets.php:550
253
+ #: ../class/avh-ec.widgets.php:785
254
+ msgid "ID"
255
+ msgstr ""
256
+
257
+ #: ../class/avh-ec.widgets.php:249
258
+ #: ../class/avh-ec.widgets.php:552
259
+ #: ../class/avh-ec.widgets.php:787
260
+ msgid "Count"
261
+ msgstr ""
262
+
263
+ #: ../class/avh-ec.widgets.php:255
264
+ #: ../class/avh-ec.widgets.php:558
265
+ #: ../class/avh-ec.widgets.php:793
266
+ msgid "Sort order "
267
+ msgstr ""
268
+
269
+ #: ../class/avh-ec.widgets.php:257
270
+ #: ../class/avh-ec.widgets.php:560
271
+ #: ../class/avh-ec.widgets.php:795
272
+ msgid "Ascending"
273
+ msgstr ""
274
+
275
+ #: ../class/avh-ec.widgets.php:258
276
+ #: ../class/avh-ec.widgets.php:561
277
+ #: ../class/avh-ec.widgets.php:796
278
+ msgid "Descending"
279
+ msgstr ""
280
+
281
+ #: ../class/avh-ec.widgets.php:264
282
+ #: ../class/avh-ec.widgets.php:567
283
+ #: ../class/avh-ec.widgets.php:802
284
+ msgid "Display style "
285
+ msgstr ""
286
+
287
+ #: ../class/avh-ec.widgets.php:266
288
+ #: ../class/avh-ec.widgets.php:569
289
+ #: ../class/avh-ec.widgets.php:804
290
+ msgid "List"
291
+ msgstr ""
292
+
293
+ #: ../class/avh-ec.widgets.php:267
294
+ #: ../class/avh-ec.widgets.php:570
295
+ #: ../class/avh-ec.widgets.php:805
296
+ msgid "Drop down"
297
+ msgstr ""
298
+
299
+ #: ../class/avh-ec.widgets.php:277
300
+ #: ../class/avh-ec.widgets.php:580
301
+ #: ../class/avh-ec.widgets.php:815
302
+ msgid "Show RSS Feed"
303
+ msgstr ""
304
+
305
+ #: ../class/avh-ec.widgets.php:282
306
+ #: ../class/avh-ec.widgets.php:585
307
+ #: ../class/avh-ec.widgets.php:820
308
+ msgid "Path (URI) to RSS image"
309
+ msgstr ""
310
+
311
+ #: ../class/avh-ec.widgets.php:288
312
+ msgid "Select categories"
313
+ msgstr ""
314
+
315
+ #: ../class/avh-ec.widgets.php:293
316
+ msgid "All Categories"
317
+ msgstr ""
318
+
319
+ #: ../class/avh-ec.widgets.php:303
320
+ msgid "Exclude the selected categories"
321
+ msgstr ""
322
+
323
+ #: ../class/avh-ec.widgets.php:389
324
+ msgid "Shows the top categories."
325
+ msgstr ""
326
+
327
+ #: ../class/avh-ec.widgets.php:390
328
+ msgid "AVH Extended Categories: Top Categories"
329
+ msgstr ""
330
+
331
+ #: ../class/avh-ec.widgets.php:534
332
+ msgid "How many categories to show"
333
+ msgstr ""
334
+
335
+ #: ../class/avh-ec.widgets.php:612
336
+ msgid "Shows grouped categories."
337
+ msgstr ""
338
+
339
+ #: ../class/avh-ec.widgets.php:613
340
+ msgid "AVH Extended Category: Category Group"
341
+ msgstr ""
342
+
2.8/lang/avh-ec.pot DELETED
@@ -1,184 +0,0 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: AVH Extended Categories\n"
4
- "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2009-09-28 08:44-0500\n"
6
- "PO-Revision-Date: \n"
7
- "Last-Translator: Peter van der Does <peter@avirtualhome.com>\n"
8
- "Language-Team: \n"
9
- "MIME-Version: 1.0\n"
10
- "Content-Type: text/plain; charset=UTF-8\n"
11
- "Content-Transfer-Encoding: 8bit\n"
12
- "X-Poedit-SourceCharset: utf-8\n"
13
- "X-Poedit-KeywordsList: __ngettext:1,2;__;_e\n"
14
- "X-Poedit-Basepath: .\n"
15
- "Plural-Forms: nplurals=2; plural=n != 1;\n"
16
- "X-Poedit-SearchPath-0: .\n"
17
- "X-Poedit-SearchPath-1: ..\n"
18
-
19
- #: ../class/avh-ec.admin.php:43
20
- msgid "Options"
21
- msgstr ""
22
-
23
- #: ../class/avh-ec.admin.php:44
24
- msgid "Translation"
25
- msgstr ""
26
-
27
- #: ../class/avh-ec.admin.php:107
28
- msgid "Options saved"
29
- msgstr ""
30
-
31
- #: ../class/avh-ec.admin.php:160
32
- msgid "Save Changes"
33
- msgstr ""
34
-
35
- #: ../class/avh-ec.admin.php:242
36
- msgid "Settings"
37
- msgstr ""
38
-
39
- #: ../class/avh-ec.core.php:354
40
- #: ../class/avh-ec.widgets.php:62
41
- #: ../class/avh-ec.widgets.php:407
42
- msgid "Categories"
43
- msgstr ""
44
-
45
- #: ../class/avh-ec.core.php:381
46
- #: ../class/avh-ec.core.php:383
47
- msgid "No categories"
48
- msgstr ""
49
-
50
- #: ../class/avh-ec.widgets.php:24
51
- msgid "An extended version of the default Categories widget."
52
- msgstr ""
53
-
54
- #: ../class/avh-ec.widgets.php:25
55
- msgid "AVH Extended Categories"
56
- msgstr ""
57
-
58
- #: ../class/avh-ec.widgets.php:84
59
- #: ../class/avh-ec.widgets.php:429
60
- msgid "Select Category"
61
- msgstr ""
62
-
63
- #: ../class/avh-ec.widgets.php:197
64
- #: ../class/avh-ec.widgets.php:524
65
- msgid "Title"
66
- msgstr ""
67
-
68
- #: ../class/avh-ec.widgets.php:206
69
- msgid "Show selected categories only"
70
- msgstr ""
71
-
72
- #: ../class/avh-ec.widgets.php:212
73
- #: ../class/avh-ec.widgets.php:540
74
- msgid "Show post counts"
75
- msgstr ""
76
-
77
- #: ../class/avh-ec.widgets.php:218
78
- msgid "Show hierarchy"
79
- msgstr ""
80
-
81
- #: ../class/avh-ec.widgets.php:223
82
- msgid "How many levels to show"
83
- msgstr ""
84
-
85
- #: ../class/avh-ec.widgets.php:226
86
- msgid "All Levels"
87
- msgstr ""
88
-
89
- #: ../class/avh-ec.widgets.php:227
90
- msgid "Toplevel only"
91
- msgstr ""
92
-
93
- #: ../class/avh-ec.widgets.php:229
94
- msgid "Child "
95
- msgstr ""
96
-
97
- #: ../class/avh-ec.widgets.php:236
98
- msgid "Hide empty categories"
99
- msgstr ""
100
-
101
- #: ../class/avh-ec.widgets.php:243
102
- #: ../class/avh-ec.widgets.php:545
103
- msgid "Sort by "
104
- msgstr ""
105
-
106
- #: ../class/avh-ec.widgets.php:245
107
- #: ../class/avh-ec.widgets.php:547
108
- msgid "ID"
109
- msgstr ""
110
-
111
- #: ../class/avh-ec.widgets.php:246
112
- #: ../class/avh-ec.widgets.php:548
113
- msgid "Name"
114
- msgstr ""
115
-
116
- #: ../class/avh-ec.widgets.php:247
117
- #: ../class/avh-ec.widgets.php:549
118
- msgid "Count"
119
- msgstr ""
120
-
121
- #: ../class/avh-ec.widgets.php:253
122
- #: ../class/avh-ec.widgets.php:555
123
- msgid "Sort order "
124
- msgstr ""
125
-
126
- #: ../class/avh-ec.widgets.php:255
127
- #: ../class/avh-ec.widgets.php:557
128
- msgid "Ascending"
129
- msgstr ""
130
-
131
- #: ../class/avh-ec.widgets.php:256
132
- #: ../class/avh-ec.widgets.php:558
133
- msgid "Descending"
134
- msgstr ""
135
-
136
- #: ../class/avh-ec.widgets.php:262
137
- #: ../class/avh-ec.widgets.php:564
138
- msgid "Display style "
139
- msgstr ""
140
-
141
- #: ../class/avh-ec.widgets.php:264
142
- #: ../class/avh-ec.widgets.php:566
143
- msgid "List"
144
- msgstr ""
145
-
146
- #: ../class/avh-ec.widgets.php:265
147
- #: ../class/avh-ec.widgets.php:567
148
- msgid "Drop down"
149
- msgstr ""
150
-
151
- #: ../class/avh-ec.widgets.php:275
152
- #: ../class/avh-ec.widgets.php:577
153
- msgid "Show RSS Feed"
154
- msgstr ""
155
-
156
- #: ../class/avh-ec.widgets.php:280
157
- #: ../class/avh-ec.widgets.php:582
158
- msgid "Path (URI) to RSS image"
159
- msgstr ""
160
-
161
- #: ../class/avh-ec.widgets.php:286
162
- msgid "Select categories"
163
- msgstr ""
164
-
165
- #: ../class/avh-ec.widgets.php:291
166
- msgid "All Categories"
167
- msgstr ""
168
-
169
- #: ../class/avh-ec.widgets.php:301
170
- msgid "Exclude the selected categories"
171
- msgstr ""
172
-
173
- #: ../class/avh-ec.widgets.php:386
174
- msgid "Shows the top categories."
175
- msgstr ""
176
-
177
- #: ../class/avh-ec.widgets.php:387
178
- msgid "AVH Extended Categories Top"
179
- msgstr ""
180
-
181
- #: ../class/avh-ec.widgets.php:531
182
- msgid "How many categories to show"
183
- msgstr ""
184
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
readme.txt CHANGED
@@ -1,24 +1,26 @@
1
- === Extended Categories Widget ===
2
  Contributors: petervanderdoes
3
  Donate link: http://blog.avirtualhome.com/wordpress-plugins/
4
  Tags: extended, categories, widget, top categories
5
  Requires at least: 2.3
6
- Tested up to: 2.9
7
- Stable tag: 2.3.3
8
 
9
- The AVH Extended Categories Widget gives you two widgets for displaying categories.
10
  == Description ==
11
 
12
- The AVH Extended Categories Widget gives you two widgets for displaying categories.
13
 
14
  1. Replacement of the default category widget to allow for greater customization.
15
 
16
  1. A top categories widget. Shows the top X categories. This requires WordPress 2.8 or higher.
17
 
 
 
18
  The replacement widget gives you the following customizable options:
19
 
20
  * Title of the widget.
21
- * Display as List or Dropdown.
22
  * Show number of posts (Count) after the category.
23
  * Hide empty categories.
24
  * Show categories hierarchical.
@@ -32,24 +34,45 @@ The Top Categories widget gives you the following customizable options:
32
 
33
  * Title of the widget.
34
  * How many categories to show.
35
- * Display as List or Dropdown.
36
  * Show number of posts (Count) after the category.
37
  * Sort by ID, Name,Count.
38
  * Sort ascending or descending.
39
  * Show RSS link after the category as text or image.
40
  * Select which categories to show. (Requires WordPress 2.5.1 or higher).
41
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
42
  Translations:
43
- * Czech - Čeština (cs_CZ) by Dirty Mind - http://dirtymind.ic.cz
 
44
  * Spanish - Español (es_ES) in Launchpad
 
 
45
 
46
  == Installation ==
47
 
48
- The Extended Categories Widget can be installed in 3 easy steps:
49
 
50
- 1. Unzip the extended-categories-widget archive and put the directory "extended-categories-widget" into your "plugins" folder (wp-content/plugins/).
51
 
52
- 1. Activate the plugin
53
 
54
  1. Go to the Presentation/Appearance->Widgets page and drag the widget into the sidebar of your choice. Configuration of the widget is done like all other widgets.
55
 
@@ -65,19 +88,34 @@ Starting with version 2.0 and WordPress 2.8 you can select how many levels deep
65
  Here is how it works: Say you have 5 top level categories and each top level has a number of children. You could manually select all the Top Level categories you want to show but now you can do the following:
66
  You select to display all categories, select to Show hierarchy and select how many levels you want to show, in this case Toplevel only.
67
 
68
- = I want to help and translate the plugin =
69
- The .pot file is included with the plugin.
70
  If you have created a language pack, or have an update of an existing one, you can send the [gettext .po and .mo files](http://codex.wordpress.org/Translating_WordPress) to me so that I can include them in future releases.
71
  I'll keep a list of translators and their websites here in the readme.txt and on my website.
72
 
73
- I have also setup a project in Launchpad for translating the plugin. Just visit http://bit.ly/95WyJ
74
 
75
- == Screenshots ==
76
  None
77
 
78
  == Changelog ==
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
79
  = Version 2.3.3 =
80
- * Bugfix: Validation error on dropdown categories.
81
 
82
  = Version 2.3.2 =
83
  * Bugfix: Saving the option didn't work
@@ -93,8 +131,8 @@ None
93
  * Added Czech translation.
94
 
95
  = Version 2.2 =
96
- * RFC: Internationalization of the plugin.
97
- * Bugfix: W3 Validation Errors when using dropdown categories.
98
  * Added option to exclude categories from displaying instead of including them. (Compliments to: Jose Luis Moya - http://www.alsur.es )
99
 
100
  = Version 2.1 =
@@ -115,13 +153,13 @@ None
115
  * With WordPress 2.8 there is a new widget, AVH Extended Categories Top. This will show the top categories based on amount of posts.
116
 
117
  = Version 1.5.1 =
118
- * Bugfix: Compatibility issue with the plugin wp-security-scan
119
 
120
  = Version 1.5 =
121
  * RFC: Option to show RSS feed after categories
122
 
123
  = Version 1.4.1 =
124
- * Bugfix: Problem when using multiple widgets with the dropdown option.
125
 
126
  = Version 1.4 =
127
  * Ability to have up to 9 widgets.
@@ -133,7 +171,7 @@ None
133
  * When no category or an empty category is selected the dropdown menu shows Select Category, like the default category widget.
134
 
135
  = Version 1.1 =
136
- * Dropdown menu didn't work. Page wasn't refreshed with selected category.
137
 
138
  = Version 1.0 =
139
- * Initial version
1
+ === AVH Extended Categories Widgets ===
2
  Contributors: petervanderdoes
3
  Donate link: http://blog.avirtualhome.com/wordpress-plugins/
4
  Tags: extended, categories, widget, top categories
5
  Requires at least: 2.3
6
+ Tested up to: 2.9.1
7
+ Stable tag: 3.0
8
 
9
+ The AVH Extended Categories Widgets gives you three widgets for displaying categories.
10
  == Description ==
11
 
12
+ The AVH Extended Categories Widgets gives you three widgets for displaying categories.
13
 
14
  1. Replacement of the default category widget to allow for greater customization.
15
 
16
  1. A top categories widget. Shows the top X categories. This requires WordPress 2.8 or higher.
17
 
18
+ 1. A Category Group widget. Shows categories from a group which is associated with the post/page that the visitor is looking at. Categories can be added to a group. Multiple groups can be made and every post/page can be associated with a different group. This requires WordPress 2.8 or higher.
19
+
20
  The replacement widget gives you the following customizable options:
21
 
22
  * Title of the widget.
23
+ * Display as List or Drop-down.
24
  * Show number of posts (Count) after the category.
25
  * Hide empty categories.
26
  * Show categories hierarchical.
34
 
35
  * Title of the widget.
36
  * How many categories to show.
37
+ * Display as List or Drop-down.
38
  * Show number of posts (Count) after the category.
39
  * Sort by ID, Name,Count.
40
  * Sort ascending or descending.
41
  * Show RSS link after the category as text or image.
42
  * Select which categories to show. (Requires WordPress 2.5.1 or higher).
43
 
44
+ The Category Group widget gives you the following customizable options:
45
+
46
+ * Title of the widget.
47
+ * Display as List or Drop-down.
48
+ * Show number of posts (Count) after the category.
49
+ * Hide empty categories.
50
+ * Sort by ID, Name,Count.
51
+ * Sort ascending or descending.
52
+ * Show RSS link after the category as text or image.
53
+
54
+ You can set the following options for the Category Group Widget:
55
+
56
+ * Which group to show on the home page.
57
+ * Which group to show when no group is associated with a post. Useful for older posts that don't have the association.
58
+ * Set the default group when editing or creating a post.
59
+
60
+ You can also select not to show the Category Group widget by selecting the group: None
61
+
62
  Translations:
63
+
64
+ * Czech - Čeština (cs_CZ) in Launchpad by Dirty Mind - http://dirtymind.ic.cz
65
  * Spanish - Español (es_ES) in Launchpad
66
+ * Italian - Italiano (it_IT) in Launchpad - Gianni Diurno - http://gidibao.net
67
+ * French - Français (fr_FR) in Launchpad - BeAlCoSt - http://www.aclanester56.com/
68
 
69
  == Installation ==
70
 
71
+ The AVH Extended Categories Widgets can be installed in 3 easy steps:
72
 
73
+ 1. Unzip the extended-categories-widget archive and put the directory "extended-categories-widget" into your "plug-ins" folder (wp-content/plugins/).
74
 
75
+ 1. Activate the plug-in
76
 
77
  1. Go to the Presentation/Appearance->Widgets page and drag the widget into the sidebar of your choice. Configuration of the widget is done like all other widgets.
78
 
88
  Here is how it works: Say you have 5 top level categories and each top level has a number of children. You could manually select all the Top Level categories you want to show but now you can do the following:
89
  You select to display all categories, select to Show hierarchy and select how many levels you want to show, in this case Toplevel only.
90
 
91
+ = I want to help and translate the plug-in =
92
+ The .pot file is included with the plug-in.
93
  If you have created a language pack, or have an update of an existing one, you can send the [gettext .po and .mo files](http://codex.wordpress.org/Translating_WordPress) to me so that I can include them in future releases.
94
  I'll keep a list of translators and their websites here in the readme.txt and on my website.
95
 
96
+ I have also setup a project in Launchpad for translating the plug-in. Just visit http://bit.ly/95WyJ
97
 
98
+ == Screen shots ==
99
  None
100
 
101
  == Changelog ==
102
+
103
+ = Version 3.0 =
104
+ * Renamed the plug-in to AVH Extended Categories Widgets
105
+ * Added new widget: Category Group. You can create groups with categories and associate the group with a post. The widget will show the categories from the group.
106
+ * Added translation: Italian - Italiano (it_IT)
107
+ * Added css file for widgets. Using the CSS you can change the layout of the text.
108
+ * Redid settings. Settings are now a separate menu.
109
+ * Reduced memory foot print.
110
+ * Increased speed.
111
+ * Development improvements.
112
+ * Added uninstall capability.
113
+ * Bugfix: The hierarchy check mark in the widgets would disappear.
114
+ * Bugfix: In drop down list the hierarchy would appear despite the fact that "Show selected categories only" was selected.
115
+ * Note: Some of the translations are not yet complete with version 3.0.
116
+
117
  = Version 2.3.3 =
118
+ * Bugfix: Validation error on drop down categories.
119
 
120
  = Version 2.3.2 =
121
  * Bugfix: Saving the option didn't work
131
  * Added Czech translation.
132
 
133
  = Version 2.2 =
134
+ * RFC: Internationalization of the plug-in.
135
+ * Bugfix: W3 Validation Errors when using drop down categories.
136
  * Added option to exclude categories from displaying instead of including them. (Compliments to: Jose Luis Moya - http://www.alsur.es )
137
 
138
  = Version 2.1 =
153
  * With WordPress 2.8 there is a new widget, AVH Extended Categories Top. This will show the top categories based on amount of posts.
154
 
155
  = Version 1.5.1 =
156
+ * Bugfix: Compatibility issue with the plug-in wp-security-scan
157
 
158
  = Version 1.5 =
159
  * RFC: Option to show RSS feed after categories
160
 
161
  = Version 1.4.1 =
162
+ * Bugfix: Problem when using multiple widgets with the drop down option.
163
 
164
  = Version 1.4 =
165
  * Ability to have up to 9 widgets.
171
  * When no category or an empty category is selected the dropdown menu shows Select Category, like the default category widget.
172
 
173
  = Version 1.1 =
174
+ * Drop down menu didn't work. Page wasn't refreshed with selected category.
175
 
176
  = Version 1.0 =
177
+ * Initial version
uninstall.php ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // This is an include file, all normal WordPress functions will still work.
3
+ // Because the plugin is already deactivated it won't regonize any class declarations.
4
+
5
+
6
+ if ( ! defined( 'ABSPATH' ) && ! defined( 'WP_UNINSTALL_PLUGIN' ) )
7
+ exit();
8
+
9
+ global $wpdb;
10
+ if ( 'extended-categories-widget' == dirname( $file )) {
11
+ delete_option( 'avhec' );
12
+ $db__used_by_plugin = $wpdb->prefix . 'avhec_category_groups';
13
+ $result = $wpdb->query( 'DROP TABLE IF EXISTS `'. $db__used_by_plugin.'`' );
14
+ }
widget_extended_categories.php CHANGED
@@ -1,9 +1,9 @@
1
  <?php
2
  /*
3
- Plugin Name: Extended Category Widget
4
  Plugin URI: http://blog.avirtualhome.com/wordpress-plugins
5
  Description: Replacement of the category widget to allow for greater customization of the category widget.
6
- Version: 2.3.3
7
  Author: Peter van der Does
8
  Author URI: http://blog.avirtualhome.com/
9
 
@@ -27,8 +27,17 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
27
  // Include WordPress version
28
  require (ABSPATH . WPINC . '/version.php');
29
 
 
 
 
 
 
 
 
30
  if ( ( float ) $wp_version >= 2.8 ) {
31
- require (dirname ( __FILE__ ) . '/2.8/avh-ec.client.php');
 
 
32
  } else {
33
  require_once 'widget-pre2.8.php';
34
  }
1
  <?php
2
  /*
3
+ Plugin Name: AVH Extended Categories Widgets
4
  Plugin URI: http://blog.avirtualhome.com/wordpress-plugins
5
  Description: Replacement of the category widget to allow for greater customization of the category widget.
6
+ Version: 3.0
7
  Author: Peter van der Does
8
  Author URI: http://blog.avirtualhome.com/
9
 
27
  // Include WordPress version
28
  require (ABSPATH . WPINC . '/version.php');
29
 
30
+ global $plugin;
31
+ $dir = current( explode( '/', $plugin ) );
32
+ $pluginname = plugin_basename( trim( $plugin ) );
33
+
34
+ define( 'AVHEC_PLUGIN_DIR', WP_PLUGIN_DIR . '/' . $dir );
35
+ define( 'AVHEC_PLUGIN_NAME', $pluginname );
36
+
37
  if ( ( float ) $wp_version >= 2.8 ) {
38
+ define( 'AVHEC_PLUGIN_URL', WP_PLUGIN_URL . '/' . $dir . '/2.8' );
39
+ define( 'AVHEC_WORKING_DIR', AVHEC_PLUGIN_DIR . '/2.8' );
40
+ require (AVHEC_WORKING_DIR . '/avh-ec.client.php');
41
  } else {
42
  require_once 'widget-pre2.8.php';
43
  }