Dynamic Widgets - Version 1.4.1

Version Description

This version has 9 features added, 7 bugs fixed and 2 theme workarounds created.

=

Download this release

Release Info

Developer qurl
Plugin Icon wp plugin Dynamic Widgets
Version 1.4.1
Comparing to
See all releases

Code changes from version 1.4.0 to 1.4.1

dynamic-widgets.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin URI: http://www.qurl.nl/dynamic-widgets/
5
  * Description: Dynamic Widgets gives you full control on which pages your widgets will appear. It lets you dynamicly place the widgets on WordPress pages.
6
  * Author: Qurl
7
- * Version: 1.4.0
8
  * Author URI: http://www.qurl.nl/
9
  * Tags: widget, widgets, dynamic, sidebar, custom, rules, admin, conditional tags, wpml, wpec, buddypress
10
  *
@@ -15,7 +15,7 @@
15
  *
16
  * Released under the GPL v.2, http://www.gnu.org/copyleft/gpl.html
17
  *
18
- * @version $Id: dynamic-widgets.php 349959 2011-02-23 19:15:28Z qurl $
19
  * @copyright 2011 Jacco Drabbe
20
  */
21
 
@@ -54,11 +54,12 @@
54
  define('DW_LIST_LIMIT', 20);
55
  define('DW_LIST_STYLE', 'style="overflow:auto;height:240px;"');
56
  define('DW_OLD_METHOD', get_option('dynwid_old_method'));
 
57
  define('DW_MODULES', dirname(__FILE__) . '/' . 'mods/');
58
  define('DW_PLUGIN', dirname(__FILE__) . '/' . 'plugin/');
59
  define('DW_TIME_LIMIT', 86400); // 1 day
60
  define('DW_URL', 'http://www.qurl.nl');
61
- define('DW_VERSION', '1.4.0');
62
  define('DW_VERSION_URL_CHECK', DW_URL . '/wp-content/uploads/php/dw_version.php?v=' . DW_VERSION . '&n=');
63
  define('DW_WPML_API', '/inc/wpml-api.php'); // WPML Plugin support - API file relative to ICL_PLUGIN_PATH
64
  define('DW_WPML_ICON', 'img/wpml_icon.png'); // WPML Plugin support - WPML icon
@@ -83,7 +84,7 @@
83
  $query = "CREATE TABLE IF NOT EXISTS " . $dbtable . " (
84
  id int(11) NOT NULL auto_increment,
85
  widget_id varchar(40) NOT NULL,
86
- maintype varchar(20) NOT NULL,
87
  `name` varchar(40) NOT NULL,
88
  `value` longtext NOT NULL,
89
  PRIMARY KEY (id),
@@ -112,6 +113,23 @@
112
  $query = "ALTER TABLE " . $dbtable . " CHANGE `value` `value` LONGTEXT NOT NULL";
113
  $wpdb->query($query);
114
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
115
  }
116
  update_option('dynwid_version', DW_VERSION);
117
  }
@@ -133,7 +151,7 @@
133
  if ( isset($_GET['action']) && $_GET['action'] == 'edit' ) {
134
  $help = __('Widgets are always displayed by default', DW_L10N_DOMAIN) . ' (' . __('The \'<em>Yes</em>\' selection', DW_L10N_DOMAIN) . ')' . '<br />';
135
  $help .= __('Click on the', DW_L10N_DOMAIN) . ' <img src="' . $DW->plugin_url . 'img/info.gif" alt="info" /> ' . __('next to the options for more info', DW_L10N_DOMAIN) . '.<br />';
136
- $help .= __('The') . ' <span class="hasoptions">*</span> ' . __('next to a section means it has options set.', DW_L10N_DOMAIN);
137
  } else {
138
  $help = '<p><strong>' . __('Static', DW_L10N_DOMAIN) . ' / ' . __('Dynamic', DW_L10N_DOMAIN) . '</strong><br />';
139
  $help .= __('When a widget is', DW_L10N_DOMAIN) . ' <em>' . __('Static', DW_L10N_DOMAIN) . '</em>, ' . __('the widget uses the WordPress default. In other words, it\'s shown everywhere', DW_L10N_DOMAIN) . '.<br />';
@@ -144,7 +162,7 @@
144
  add_contextual_help($screen, $help);
145
 
146
  // Only show meta box in posts panel when there are widgets enabled.
147
- $opt = $DW->getOptions('%','individual');
148
  if ( count($opt) > 0 ) {
149
  add_meta_box('dynwid', __('Dynamic Widgets', DW_L10N_DOMAIN), 'dynwid_add_post_control', 'post', 'side', 'low');
150
  }
@@ -218,25 +236,25 @@
218
  $post = $GLOBALS['post'];
219
  $DW = &$GLOBALS['DW'];
220
 
221
- $opt = $DW->getOptions('%','individual');
222
  echo '<strong>' . __('Apply exception rule to widgets:', DW_L10N_DOMAIN) . '</strong><br /><br />';
223
  foreach ( $opt as $widget ) {
224
  $single_condition = '1';
225
  $checked = '';
226
- $opt_single = $DW->getOptions($widget['widget_id'], 'single');
227
 
228
  // loop through the opts to see if we have a match
229
  foreach ( $opt_single as $widget_opt ) {
230
- if ( $widget_opt['maintype'] == 'single' ) {
231
- $single_condition = $widget_opt['value'];
232
  }
233
- if ( $widget_opt['maintype'] == 'single-post' && $widget_opt['name'] == $post->ID ) {
234
  $checked = ' checked="checked"';
235
  }
236
  }
237
 
238
  $default = ( $single_condition == '0' ) ? __('Off', DW_L10N_DOMAIN) : __('On', DW_L10N_DOMAIN);
239
- echo '<input type="checkbox" id="dw_' . $widget['widget_id'] . '" name="dw-single-post[]" value="' . $widget['widget_id'] . '"' . $checked . ' /> <label for="dw_' . $widget['widget_id'] . '">' . $DW->getName($widget['widget_id']) . __(' (Default: ', DW_L10N_DOMAIN) . $default . ')</label><br />';
240
  }
241
  }
242
 
@@ -248,7 +266,7 @@
248
  $DW = &$GLOBALS['DW'];
249
 
250
  // Only show dynwid row when there are widgets enabled
251
- $opt = $DW->getOptions('%','individual');
252
  if ( count($opt) > 0 ) {
253
 
254
  echo '<tr class="form-field">';
@@ -257,20 +275,20 @@
257
  foreach ( $opt as $widget ) {
258
  $single_condition = '1';
259
  $checked = '';
260
- $opt_single = $DW->getOptions($widget['widget_id'], 'single');
261
 
262
  // loop through the opts to see if we have a match
263
  foreach ( $opt_single as $widget_opt ) {
264
- if ( $widget_opt['maintype'] == 'single' ) {
265
- $single_condition = $widget_opt['value'];
266
  }
267
- if ( $widget_opt['maintype'] == 'single-tag' && $widget_opt['name'] == $_GET['tag_ID'] ) {
268
  $checked = ' checked="checked"';
269
  }
270
  }
271
 
272
- $default = ( $single_condition == '0' ) ? 'Off' : 'On';
273
- echo '<input type="checkbox" style="width:10pt;border:none;" id="dw_' . $widget['widget_id'] . '" name="dw-single-tag[]" value="' . $widget['widget_id'] . '"' . $checked . ' /> <label for="dw_' . $widget['widget_id'] . '">' . $DW->getName($widget['widget_id']) . ' (Default: ' . $default . ')</label><br />';
274
 
275
  } // END foreach opt
276
  echo '</td>';
@@ -330,12 +348,11 @@
330
  $DW = &$GLOBALS['DW'];
331
 
332
  $name = strip_tags($DW->getName($_GET['widget_id']));
 
 
333
 
334
- echo '<div class="updated fade" id="message">';
335
- echo '<p>';
336
- echo '<strong>' . __('Dynamic Widgets Options saved', DW_L10N_DOMAIN) . '</strong> ' . __('for', DW_L10N_DOMAIN) . ' ' . $name;
337
- echo '</p>';
338
- echo '</div>';
339
  }
340
 
341
  /**
@@ -371,7 +388,7 @@
371
  $wpdb = &$GLOBALS['wpdb'];
372
  $dump = array();
373
 
374
- $opt = $DW->getOptions('%', 'wpsc');
375
 
376
  $categories = array();
377
  $table = WPSC_TABLE_PRODUCT_CATEGORIES;
@@ -383,15 +400,15 @@
383
  }
384
 
385
  foreach ( $opt as $widget ) {
386
- $id = $widget['widget_id'];
387
  if (! array_key_exists($id, $dump) ) {
388
- $dump[$id] = array( 'name' => strip_tags($DW->getName($widget['widget_id'])) );
389
  }
390
 
391
- if ( $widget['name'] == 'default' ) {
392
- $dump[$id]['default'] = ( $widget['value'] == '0' ? 'No' : 'Yes' );
393
  } else {
394
- $v = $widget['name'];
395
  $dump[$id][ ] = $categories[$v];
396
  }
397
  }
@@ -519,9 +536,9 @@
519
  }
520
 
521
  // Housekeeping
522
- $opt = $DW->getOptions('%','individual');
523
  foreach ( $opt as $widget ) {
524
- $DW->deleteOption($widget['widget_id'], 'single-post', $post_id);
525
  }
526
 
527
  if ( array_key_exists('dw-single-post', $_POST) ) {
@@ -530,11 +547,11 @@
530
  $default_single = '1';
531
 
532
  foreach ( $opt as $widget_id ) {
533
- $opt_single = $DW->getOptions($widget_id, 'single');
534
  if ( count($opt_single) > 0 ) {
535
  foreach ( $opt_single as $widget ) {
536
- if ( $widget['maintype'] == 'single' ) {
537
- $default_single = $widget['value'];
538
  }
539
  }
540
 
@@ -562,9 +579,9 @@
562
  }
563
 
564
  // Housekeeping
565
- $opt = $DW->getOptions('%', 'individual');
566
  foreach ( $opt as $widget ) {
567
- $DW->deleteOption($widget['widget_id'], 'single-tag', $term_id);
568
  }
569
 
570
  if ( array_key_exists('dw-single-tag', $_POST) ) {
@@ -573,11 +590,11 @@
573
  $default_single = '1';
574
 
575
  foreach ( $opt as $widget_id ) {
576
- $opt_single = $DW->getOptions($widget_id, 'single');
577
  if ( count($opt_single) > 0 ) {
578
  foreach ( $opt_single as $widget ) {
579
- if ( $widget['maintype'] == 'single' ) {
580
- $default_single = $widget['value'];
581
  }
582
  }
583
  }
@@ -653,15 +670,15 @@
653
 
654
  // Now adding the dynwid text & link
655
  echo '<p>' . __('Dynamic Widgets', DW_L10N_DOMAIN) . ': ';
656
- echo '<a style="text-decoration:none;" title="' . __('Edit Dynamic Widgets Options', DW_L10N_DOMAIN) . '" href="themes.php?page=dynwid-config&action=edit&id=' . $widget_id . '&returnurl=' . urlencode(trailingslashit(admin_url()) . 'widgets.php') . '">';
657
  echo ( $DW->hasOptions($widget_id) ) ? __('Dynamic', DW_L10N_DOMAIN) : __('Static', DW_L10N_DOMAIN);
658
  echo '</a>';
659
  if ( $DW->hasOptions($widget_id) ) {
660
  $s = array();
661
- $opt = $DW->getOptions($widget_id, NULL);
662
  foreach ( $opt as $widget ) {
663
- $type = $widget['maintype'];
664
- if ( $type != 'individual' && substr($type, -6) != 'childs' ) {
665
  $single = array('single-author', 'single-category', 'single-tag', 'single-post');
666
  if ( in_array($type, $single) ) {
667
  $type = 'single';
@@ -704,7 +721,7 @@
704
  if ( $DW->listmade ) {
705
  $DW->message('Dynamic Widgets removelist already created');
706
  if ( count($DW->removelist) > 0 ) {
707
- foreach ( $DW->removelist as $sidebar_id => $widgets ){
708
  foreach ( $widgets as $widget_key ){
709
  unset($sidebars[$sidebar_id][$widget_key]);
710
  }
4
  * Plugin URI: http://www.qurl.nl/dynamic-widgets/
5
  * Description: Dynamic Widgets gives you full control on which pages your widgets will appear. It lets you dynamicly place the widgets on WordPress pages.
6
  * Author: Qurl
7
+ * Version: 1.4.1
8
  * Author URI: http://www.qurl.nl/
9
  * Tags: widget, widgets, dynamic, sidebar, custom, rules, admin, conditional tags, wpml, wpec, buddypress
10
  *
15
  *
16
  * Released under the GPL v.2, http://www.gnu.org/copyleft/gpl.html
17
  *
18
+ * @version $Id: dynamic-widgets.php 407379 2011-07-09 11:42:34Z qurl $
19
  * @copyright 2011 Jacco Drabbe
20
  */
21
 
54
  define('DW_LIST_LIMIT', 20);
55
  define('DW_LIST_STYLE', 'style="overflow:auto;height:240px;"');
56
  define('DW_OLD_METHOD', get_option('dynwid_old_method'));
57
+ define('DW_PAGE_LIMIT', get_option('dynwid_page_limit', 500));
58
  define('DW_MODULES', dirname(__FILE__) . '/' . 'mods/');
59
  define('DW_PLUGIN', dirname(__FILE__) . '/' . 'plugin/');
60
  define('DW_TIME_LIMIT', 86400); // 1 day
61
  define('DW_URL', 'http://www.qurl.nl');
62
+ define('DW_VERSION', '1.4.1');
63
  define('DW_VERSION_URL_CHECK', DW_URL . '/wp-content/uploads/php/dw_version.php?v=' . DW_VERSION . '&n=');
64
  define('DW_WPML_API', '/inc/wpml-api.php'); // WPML Plugin support - API file relative to ICL_PLUGIN_PATH
65
  define('DW_WPML_ICON', 'img/wpml_icon.png'); // WPML Plugin support - WPML icon
84
  $query = "CREATE TABLE IF NOT EXISTS " . $dbtable . " (
85
  id int(11) NOT NULL auto_increment,
86
  widget_id varchar(40) NOT NULL,
87
+ maintype varchar(50) NOT NULL,
88
  `name` varchar(40) NOT NULL,
89
  `value` longtext NOT NULL,
90
  PRIMARY KEY (id),
113
  $query = "ALTER TABLE " . $dbtable . " CHANGE `value` `value` LONGTEXT NOT NULL";
114
  $wpdb->query($query);
115
  }
116
+
117
+ /* 1.4.0.5 > Enlarged the maintype field because of addition of CTs */
118
+ if ( version_compare($version, '1.4.0.5', '<') ) {
119
+ $query = "ALTER TABLE " . $dbtable . " CHANGE `maintype` `maintype` VARCHAR(50) NOT NULL";
120
+ $wpdb->query($query);
121
+ }
122
+
123
+ /* 1.4.0.12 > Added MSIE 6 support in browser module
124
+ Need to apply MSIE rule to MSIE6 to keep same behavior. */
125
+ if ( version_compare($version, '1.4.0.12', '<') ) {
126
+ $query = "SELECT widget_id, value FROM " . $dbtable . " WHERE maintype = 'browser' AND name = 'msie'";
127
+ $results = $wpdb->get_results($query);
128
+ foreach ( $results as $myrow ) {
129
+ $query = "INSERT INTO " . $dbtable . "(widget_id, maintype, name, value) VALUES ('" . $myrow->widget_id . "', 'browser', 'msie6', '" . $myrow->value . "')";
130
+ $wpdb->query($query);
131
+ }
132
+ }
133
  }
134
  update_option('dynwid_version', DW_VERSION);
135
  }
151
  if ( isset($_GET['action']) && $_GET['action'] == 'edit' ) {
152
  $help = __('Widgets are always displayed by default', DW_L10N_DOMAIN) . ' (' . __('The \'<em>Yes</em>\' selection', DW_L10N_DOMAIN) . ')' . '<br />';
153
  $help .= __('Click on the', DW_L10N_DOMAIN) . ' <img src="' . $DW->plugin_url . 'img/info.gif" alt="info" /> ' . __('next to the options for more info', DW_L10N_DOMAIN) . '.<br />';
154
+ $help .= __('The') . ' <img src="' . $DW->plugin_url . 'img/checkmark.gif" alt="Checkmark" /> ' . __('next to a section means it has options set.', DW_L10N_DOMAIN);
155
  } else {
156
  $help = '<p><strong>' . __('Static', DW_L10N_DOMAIN) . ' / ' . __('Dynamic', DW_L10N_DOMAIN) . '</strong><br />';
157
  $help .= __('When a widget is', DW_L10N_DOMAIN) . ' <em>' . __('Static', DW_L10N_DOMAIN) . '</em>, ' . __('the widget uses the WordPress default. In other words, it\'s shown everywhere', DW_L10N_DOMAIN) . '.<br />';
162
  add_contextual_help($screen, $help);
163
 
164
  // Only show meta box in posts panel when there are widgets enabled.
165
+ $opt = $DW->getOpt('%','individual');
166
  if ( count($opt) > 0 ) {
167
  add_meta_box('dynwid', __('Dynamic Widgets', DW_L10N_DOMAIN), 'dynwid_add_post_control', 'post', 'side', 'low');
168
  }
236
  $post = $GLOBALS['post'];
237
  $DW = &$GLOBALS['DW'];
238
 
239
+ $opt = $DW->getOpt('%','individual');
240
  echo '<strong>' . __('Apply exception rule to widgets:', DW_L10N_DOMAIN) . '</strong><br /><br />';
241
  foreach ( $opt as $widget ) {
242
  $single_condition = '1';
243
  $checked = '';
244
+ $opt_single = $DW->getOpt($widget->widget_id, 'single');
245
 
246
  // loop through the opts to see if we have a match
247
  foreach ( $opt_single as $widget_opt ) {
248
+ if ( $widget_opt->maintype == 'single' ) {
249
+ $single_condition = $widget_opt->value;
250
  }
251
+ if ( $widget_opt->maintype == 'single-post' && $widget_opt->name == $post->ID ) {
252
  $checked = ' checked="checked"';
253
  }
254
  }
255
 
256
  $default = ( $single_condition == '0' ) ? __('Off', DW_L10N_DOMAIN) : __('On', DW_L10N_DOMAIN);
257
+ echo '<input type="checkbox" id="dw_' . $widget->widget_id . '" name="dw-single-post[]" value="' . $widget->widget_id . '"' . $checked . ' /> <label for="dw_' . $widget->widget_id . '">' . $DW->getName($widget->widget_id) . __(' (Default: ', DW_L10N_DOMAIN) . $default . ')</label><br />';
258
  }
259
  }
260
 
266
  $DW = &$GLOBALS['DW'];
267
 
268
  // Only show dynwid row when there are widgets enabled
269
+ $opt = $DW->getOpt('%','individual');
270
  if ( count($opt) > 0 ) {
271
 
272
  echo '<tr class="form-field">';
275
  foreach ( $opt as $widget ) {
276
  $single_condition = '1';
277
  $checked = '';
278
+ $opt_single = $DW->getOpt($widget->widget_id, 'single');
279
 
280
  // loop through the opts to see if we have a match
281
  foreach ( $opt_single as $widget_opt ) {
282
+ if ( $widget_opt->maintype == 'single' ) {
283
+ $single_condition = $widget_opt->value;
284
  }
285
+ if ( $widget_opt->maintype == 'single-tag' && $widget_opt->name == $_GET['tag_ID'] ) {
286
  $checked = ' checked="checked"';
287
  }
288
  }
289
 
290
+ $default = ( $single_condition == '0' ) ? __('Off', DW_L10N_DOMAIN) : __('On', DW_L10N_DOMAIN);
291
+ echo '<input type="checkbox" style="width:10pt;border:none;" id="dw_' . $widget->widget_id . '" name="dw-single-tag[]" value="' . $widget->widget_id . '"' . $checked . ' /> <label for="dw_' . $widget->widget_id . '">' . $DW->getName($widget->widget_id) . ' (' . __('Default', DW_L10N_DOMAIN) . ': ' . $default . ')</label><br />';
292
 
293
  } // END foreach opt
294
  echo '</td>';
348
  $DW = &$GLOBALS['DW'];
349
 
350
  $name = strip_tags($DW->getName($_GET['widget_id']));
351
+ $lead = __('Dynamic Widgets Options saved', DW_L10N_DOMAIN);
352
+ $msg = __('for', DW_L10N_DOMAIN) . ' ' . $name;
353
 
354
+ $mbox = new DWMessageBox();
355
+ $mbox->create($lead, $msg);
 
 
 
356
  }
357
 
358
  /**
388
  $wpdb = &$GLOBALS['wpdb'];
389
  $dump = array();
390
 
391
+ $opt = $DW->getOpt('%', 'wpsc');
392
 
393
  $categories = array();
394
  $table = WPSC_TABLE_PRODUCT_CATEGORIES;
400
  }
401
 
402
  foreach ( $opt as $widget ) {
403
+ $id = $widget->widget_id;
404
  if (! array_key_exists($id, $dump) ) {
405
+ $dump[$id] = array( 'name' => strip_tags($DW->getName($widget->widget_id)) );
406
  }
407
 
408
+ if ( $widget->name == 'default' ) {
409
+ $dump[$id]['default'] = ( $widget->value == '0' ? 'No' : 'Yes' );
410
  } else {
411
+ $v = $widget->name;
412
  $dump[$id][ ] = $categories[$v];
413
  }
414
  }
536
  }
537
 
538
  // Housekeeping
539
+ $opt = $DW->getOpt('%','individual');
540
  foreach ( $opt as $widget ) {
541
+ $DW->deleteOption($widget->widget_id, 'single-post', $post_id);
542
  }
543
 
544
  if ( array_key_exists('dw-single-post', $_POST) ) {
547
  $default_single = '1';
548
 
549
  foreach ( $opt as $widget_id ) {
550
+ $opt_single = $DW->getOpt($widget_id, 'single');
551
  if ( count($opt_single) > 0 ) {
552
  foreach ( $opt_single as $widget ) {
553
+ if ( $widget->maintype == 'single' ) {
554
+ $default_single = $widget->value;
555
  }
556
  }
557
 
579
  }
580
 
581
  // Housekeeping
582
+ $opt = $DW->getOpt('%', 'individual');
583
  foreach ( $opt as $widget ) {
584
+ $DW->deleteOption($widget->widget_id, 'single-tag', $term_id);
585
  }
586
 
587
  if ( array_key_exists('dw-single-tag', $_POST) ) {
590
  $default_single = '1';
591
 
592
  foreach ( $opt as $widget_id ) {
593
+ $opt_single = $DW->getOpt($widget_id, 'single');
594
  if ( count($opt_single) > 0 ) {
595
  foreach ( $opt_single as $widget ) {
596
+ if ( $widget->maintype == 'single' ) {
597
+ $default_single = $widget->value;
598
  }
599
  }
600
  }
670
 
671
  // Now adding the dynwid text & link
672
  echo '<p>' . __('Dynamic Widgets', DW_L10N_DOMAIN) . ': ';
673
+ echo '<a style="text-decoration:none;" title="' . __('Edit Dynamic Widgets Options', DW_L10N_DOMAIN) . '" href="themes.php?page=dynwid-config&action=edit&id=' . $widget_id . '&returnurl=widgets.php' . '">';
674
  echo ( $DW->hasOptions($widget_id) ) ? __('Dynamic', DW_L10N_DOMAIN) : __('Static', DW_L10N_DOMAIN);
675
  echo '</a>';
676
  if ( $DW->hasOptions($widget_id) ) {
677
  $s = array();
678
+ $opt = $DW->getOpt($widget_id, NULL);
679
  foreach ( $opt as $widget ) {
680
+ $type = $widget->maintype;
681
+ if ( $type != 'individual' && substr($type, -6) != 'childs' && ! preg_match('/.*-tax_.*/', $type) ) {
682
  $single = array('single-author', 'single-category', 'single-tag', 'single-post');
683
  if ( in_array($type, $single) ) {
684
  $type = 'single';
721
  if ( $DW->listmade ) {
722
  $DW->message('Dynamic Widgets removelist already created');
723
  if ( count($DW->removelist) > 0 ) {
724
+ foreach ( $DW->removelist as $sidebar_id => $widgets ) {
725
  foreach ( $widgets as $widget_key ){
726
  unset($sidebars[$sidebar_id][$widget_key]);
727
  }
dynwid_admin_edit.php CHANGED
@@ -2,15 +2,62 @@
2
  /**
3
  * dynwid_admin_edit.php - Options settings
4
  *
5
- * @version $Id: dynwid_admin_edit.php 348295 2011-02-20 20:13:21Z qurl $
6
  * @copyright 2011 Jacco Drabbe
7
  */
8
 
9
  // WPML Plugin support
10
  if ( defined('ICL_PLUGIN_PATH') && file_exists(ICL_PLUGIN_PATH . DW_WPML_API) ) {
11
  $DW->wpml = TRUE;
 
12
  $wpml_icon = '<img src="' . $DW->plugin_url . DW_WPML_ICON . '" alt="WMPL" title="Dynamic Widgets syncs with other languages of these pages via WPML" style="position:relative;top:2px;" />';
13
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  ?>
15
 
16
  <style type="text/css">
@@ -55,31 +102,40 @@ h4 {
55
  }
56
  </style>
57
 
58
- <?php if ( isset($_POST['dynwid_save']) && $_POST['dynwid_save'] == 'yes' ) { ?>
59
- <div class="updated fade" id="message">
60
- <p>
61
- <strong><?php _e('Widget options saved.', DW_L10N_DOMAIN); ?></strong> <a href="themes.php?page=dynwid-config"><?php _e('Return', DW_L10N_DOMAIN); ?></a> <?php _e('to Dynamic Widgets overview', DW_L10N_DOMAIN); ?>.
62
- </p>
63
- </div>
64
- <?php } else if ( isset($_GET['work']) && $_GET['work'] == 'none' ) { ?>
65
- <div class="error" id="message">
66
- <p><?php echo __('Dynamic does not mean static hiding of a widget.', DW_L10N_DOMAIN) . ' ' . __('Hint', DW_L10N_DOMAIN) . ': '; ?><a href="widgets.php"><?php _e('Remove', DW_L10N_DOMAIN); ?></a> <?php _e('the widget from the sidebar', DW_L10N_DOMAIN); ?>.</p>
67
- </div>
68
- <?php } else if ( isset($_GET['work']) && $_GET['work'] == 'nonedate' ) { ?>
69
- <div class="error" id="message">
70
- <p><?php _e('The From date can\'t be later than the To date.', DW_L10N_DOMAIN); ?></p>
71
- </div>
72
-
73
- <?php } ?>
 
 
74
 
75
  <h3><?php _e('Edit options for the widget', DW_L10N_DOMAIN); ?>: <em><?php echo $DW->getName($_GET['id']); ?></em></h3>
76
  <?php echo ( DW_DEBUG ) ? '<pre>ID = ' . $_GET['id'] . '</pre><br />' : ''; ?>
77
 
 
 
 
 
 
 
 
78
  <form action="<?php echo trailingslashit(admin_url()) . 'themes.php?page=dynwid-config&action=edit&id=' . $_GET['id']; ?>" method="post">
79
  <?php wp_nonce_field('plugin-name-action_edit_' . $_GET['id']); ?>
80
  <input type="hidden" name="dynwid_save" value="yes" />
81
  <input type="hidden" name="widget_id" value="<?php echo $_GET['id']; ?>" />
82
- <input type="hidden" name="returnurl" value="<?php echo ( isset($_GET['returnurl']) ? urldecode($_GET['returnurl']) : '' ); ?>" />
83
 
84
  <div id="dynwid">
85
  <?php
@@ -88,6 +144,7 @@ h4 {
88
  'date' => 'Date',
89
  'wpml' => 'Language (WPML)',
90
  'useragent' => 'UserAgent',
 
91
  'frontpage' => 'Front Page',
92
  'single' => 'Single Posts',
93
  'attachment' => 'Attachment',
@@ -111,12 +168,17 @@ h4 {
111
  ?>
112
 
113
  </div><!-- end dynwid -->
 
 
 
 
 
114
 
115
  <br />
116
  <div style="float:left">
117
  <input class="button-primary" type="submit" value="<?php _e('Save'); ?>" /> &nbsp;&nbsp;
118
  </div>
119
- <?php $url = (! empty($_GET['returnurl']) ? urldecode($_GET['returnurl']) : trailingslashit(admin_url()) ) . 'themes.php?page=dynwid-config'; ?>
120
  <div style="float:left">
121
  <input class="button-secondary" type="button" value="<?php _e('Return', DW_L10N_DOMAIN); ?>" onclick="location.href='<?php echo $url; ?>'" />
122
  </div>
@@ -126,17 +188,17 @@ h4 {
126
  <script type="text/javascript">
127
  /* <![CDATA[ */
128
  function chkInPosts() {
129
- var posts = <?php echo count($single_post_act); ?>;
130
- var tags = <?php echo count($single_tag_act); ?>;
131
 
132
- if ( (posts > 0 || tags > 0) && jQuery('#individual').attr('checked') == false ) {
133
  if ( confirm('Are you sure you want to disable the exception rule for individual posts and tags?\nThis will remove the options set to individual posts and/or tags for this widget.\nOk = Yes; No = Cancel') ) {
134
  swChb(cAuthors, false);
135
  swChb(cCat, false);
136
  } else {
137
  jQuery('#individual').attr('checked', true);
138
  }
139
- } else if ( icount > 0 && jQuery('#individual').attr('checked') ) {
140
  if ( confirm('Are you sure you want to enable the exception rule for individual posts and tags?\nThis will remove the exceptions set for Author and/or Category on single posts for this widget.\nOk = Yes; No = Cancel') ) {
141
  swChb(cAuthors, true);
142
  swChb(cCat, true);
@@ -144,7 +206,7 @@ h4 {
144
  } else {
145
  jQuery('#individual').attr('checked', false);
146
  }
147
- } else if ( jQuery('#individual').attr('checked') ) {
148
  swChb(cAuthors, true);
149
  swChb(cCat, true);
150
  } else {
@@ -154,31 +216,31 @@ h4 {
154
  }
155
 
156
  function chkChild(pid) {
157
- if ( jQuery('#page_act_'+pid).attr('checked') == false ) {
158
- jQuery('#child_'+pid).attr('checked', false);
159
  }
160
  }
161
 
162
  function chkParent(pid) {
163
- if ( jQuery('#child_'+pid).attr('checked') == true ) {
164
  jQuery('#page_act_'+pid).attr('checked', true);
165
  }
166
  }
167
 
168
  function chkCPChild(type, pid) {
169
- if ( jQuery('#'+type+'_act_'+pid).attr('checked') == false ) {
170
- jQuery('#'+type+'_child_'+pid).attr('checked', false);
171
  }
172
  }
173
 
174
  function chkCPParent(type, pid) {
175
- if ( jQuery('#'+type+'_child_'+pid).attr('checked') == true ) {
176
  jQuery('#'+type+'_act_'+pid).attr('checked', true);
177
  }
178
  }
179
 
180
  function ci(id) {
181
- if ( jQuery('#'+id).attr('checked') ) {
182
  icount++;
183
  } else {
184
  icount--;
@@ -228,19 +290,29 @@ h4 {
228
  }
229
  }
230
 
 
 
 
 
 
 
 
 
 
231
  var cAuthors = new Array(<?php echo implode(', ', $js_author_array); ?>);
232
  var cCat = new Array(<?php echo implode(', ', $js_category_array); ?>);
233
  var cRole = new Array(<?php echo implode(', ' , $jsroles); ?>);
234
  var cDate = new Array('date_start', 'date_end');
235
  var icount = <?php echo $js_count; ?>;
 
236
 
237
- if ( jQuery('#role-yes').attr('checked') ) {
238
  swChb(cRole, true);
239
  }
240
- if ( jQuery('#date-yes').attr('checked') ) {
241
  swTxt(cDate, true);
242
  }
243
- if ( jQuery('#individual').attr('checked') ) {
244
  swChb(cAuthors, true);
245
  swChb(cCat, true);
246
  }
2
  /**
3
  * dynwid_admin_edit.php - Options settings
4
  *
5
+ * @version $Id: dynwid_admin_edit.php 403464 2011-07-01 20:30:55Z qurl $
6
  * @copyright 2011 Jacco Drabbe
7
  */
8
 
9
  // WPML Plugin support
10
  if ( defined('ICL_PLUGIN_PATH') && file_exists(ICL_PLUGIN_PATH . DW_WPML_API) ) {
11
  $DW->wpml = TRUE;
12
+ require(DW_PLUGIN . 'wpml.php');
13
  $wpml_icon = '<img src="' . $DW->plugin_url . DW_WPML_ICON . '" alt="WMPL" title="Dynamic Widgets syncs with other languages of these pages via WPML" style="position:relative;top:2px;" />';
14
  }
15
+
16
+ // Functions used in more modules
17
+ function getCatChilds($arr, $id, $i) {
18
+ $cat = get_categories( array('hide_empty' => FALSE, 'child_of' => $id) );
19
+ foreach ($cat as $c ) {
20
+ if (! in_array($c->cat_ID, $i) && $c->category_parent == $id ) {
21
+ $i[ ] = $c->cat_ID;
22
+ $arr[$c->cat_ID] = array();
23
+ $a = &$arr[$c->cat_ID];
24
+ $a = getCatChilds($a, $c->cat_ID, &$i);
25
+ }
26
+ }
27
+ return $arr;
28
+ }
29
+
30
+ function prtCat($categories, $category_act, $single = FALSE) {
31
+ $DW = $GLOBALS['DW'];
32
+
33
+ foreach ( $categories as $pid => $childs ) {
34
+ $run = TRUE;
35
+
36
+ if ( $DW->wpml ) {
37
+ $wpml_id = dw_wpml_get_id($pid, 'tax_category');
38
+ if ( $wpml_id > 0 && $wpml_id <> $pid ) {
39
+ $run = FALSE;
40
+ }
41
+ }
42
+
43
+ if ( $run ) {
44
+ $cat = get_category($pid);
45
+ echo '<div style="position:relative;left:15px;">';
46
+ echo '<input type="checkbox" id="' . ( $single ? 'single_' : '' ) . 'category_act_' . $cat->cat_ID . '" name="' . ( $single ? 'single_' : '' ) . 'category_act[]" value="' . $cat->cat_ID . '" ' . ( isset($category_act) && count($category_act) > 0 && in_array($cat->cat_ID, $category_act) ? 'checked="checked"' : '' ) . ( $single ? ' onclick="ci(\'single_category_act_' . $cat->cat_ID . '\')"' : '' ) . ' /> <label for="' . ( $single ? 'single_' : '' ) . 'category_act_' . $cat->cat_ID . '">' . $cat->name . '</label><br />';
47
+
48
+ if ( count($childs) > 0 ) {
49
+ prtCat($childs, $category_act, $single);
50
+ }
51
+ echo '</div>';
52
+ }
53
+ }
54
+ }
55
+
56
+ // For JS exclOff
57
+ $excl = array();
58
+ foreach ( $DW->overrule_maintype as $m ) {
59
+ $excl[ ] = "'" . $m . "'";
60
+ }
61
  ?>
62
 
63
  <style type="text/css">
102
  }
103
  </style>
104
 
105
+ <?php
106
+ if ( isset($_POST['dynwid_save']) && $_POST['dynwid_save'] == 'yes' ) {
107
+ $mbox = new DWMessageBox();
108
+ $lead = __('Widget options saved.', DW_L10N_DOMAIN);
109
+ $msg = '<a href="themes.php?page=dynwid-config">' . __('Return', DW_L10N_DOMAIN) . '</a> ' . __('to Dynamic Widgets overview', DW_L10N_DOMAIN);
110
+ $mbox->create($lead, $msg);
111
+ } else if ( isset($_GET['work']) && $_GET['work'] == 'none' ) {
112
+ $mbox = new DWMessageBox('error');
113
+ $text = __('Dynamic does not mean static hiding of a widget.', DW_L10N_DOMAIN) . ' ' . __('Hint', DW_L10N_DOMAIN) . ': <a href="widgets.php">' . __('Remove', DW_L10N_DOMAIN) . '</a>' . __('the widget from the sidebar', DW_L10N_DOMAIN) . '.';
114
+ $mbox->setMessage($text);
115
+ $mbox->output();
116
+ } else if ( isset($_GET['work']) && $_GET['work'] == 'nonedate' ) {
117
+ $mbox = new DWMessageBox('error');
118
+ $text = __('The From date can\'t be later than the To date.', DW_L10N_DOMAIN);
119
+ $mbox->setMessage($text);
120
+ $mbox->output();
121
+ }
122
+ ?>
123
 
124
  <h3><?php _e('Edit options for the widget', DW_L10N_DOMAIN); ?>: <em><?php echo $DW->getName($_GET['id']); ?></em></h3>
125
  <?php echo ( DW_DEBUG ) ? '<pre>ID = ' . $_GET['id'] . '</pre><br />' : ''; ?>
126
 
127
+ <div style="border-color: #E3E3E3;border-radius: 6px 6px 6px 6px;border-style: solid;border-width: 1px;padding: 5px;">
128
+ <b><?php _e('Quick settings', DW_L10N_DOMAIN); ?></b>
129
+ <p>
130
+ <a href="#" onclick="setOff(); return false;"><?php _e('Set all options to \'No\''); ?></a> (<?php _e('Except overriding options like Role, Date, etc.'); ?>)
131
+ </p>
132
+ </div><br />
133
+
134
  <form action="<?php echo trailingslashit(admin_url()) . 'themes.php?page=dynwid-config&action=edit&id=' . $_GET['id']; ?>" method="post">
135
  <?php wp_nonce_field('plugin-name-action_edit_' . $_GET['id']); ?>
136
  <input type="hidden" name="dynwid_save" value="yes" />
137
  <input type="hidden" name="widget_id" value="<?php echo $_GET['id']; ?>" />
138
+ <input type="hidden" name="returnurl" value="<?php echo ( isset($_GET['returnurl']) ? trailingslashit(admin_url()) . $_GET['returnurl'] : '' ); ?>" />
139
 
140
  <div id="dynwid">
141
  <?php
144
  'date' => 'Date',
145
  'wpml' => 'Language (WPML)',
146
  'useragent' => 'UserAgent',
147
+ 'tpl' => 'Templates',
148
  'frontpage' => 'Front Page',
149
  'single' => 'Single Posts',
150
  'attachment' => 'Attachment',
168
  ?>
169
 
170
  </div><!-- end dynwid -->
171
+ <br /><br />
172
+
173
+ <!-- <div>
174
+ Save as a quick setting <input type="text" name="qsetting" value="" />
175
+ </div> //-->
176
 
177
  <br />
178
  <div style="float:left">
179
  <input class="button-primary" type="submit" value="<?php _e('Save'); ?>" /> &nbsp;&nbsp;
180
  </div>
181
+ <?php $url = (! empty($_GET['returnurl']) ? trailingslashit(admin_url()) . $_GET['returnurl'] : trailingslashit(admin_url()) . 'themes.php?page=dynwid-config' ); ?>
182
  <div style="float:left">
183
  <input class="button-secondary" type="button" value="<?php _e('Return', DW_L10N_DOMAIN); ?>" onclick="location.href='<?php echo $url; ?>'" />
184
  </div>
188
  <script type="text/javascript">
189
  /* <![CDATA[ */
190
  function chkInPosts() {
191
+ var posts = <?php echo $opt_single_post->count; ?>;
192
+ var tags = <?php echo $opt_single_tag->count; ?>;
193
 
194
+ if ( (posts > 0 || tags > 0) && jQuery('#individual').is(':checked') == false ) {
195
  if ( confirm('Are you sure you want to disable the exception rule for individual posts and tags?\nThis will remove the options set to individual posts and/or tags for this widget.\nOk = Yes; No = Cancel') ) {
196
  swChb(cAuthors, false);
197
  swChb(cCat, false);
198
  } else {
199
  jQuery('#individual').attr('checked', true);
200
  }
201
+ } else if ( icount > 0 && jQuery('#individual').is(':checked') ) {
202
  if ( confirm('Are you sure you want to enable the exception rule for individual posts and tags?\nThis will remove the exceptions set for Author and/or Category on single posts for this widget.\nOk = Yes; No = Cancel') ) {
203
  swChb(cAuthors, true);
204
  swChb(cCat, true);
206
  } else {
207
  jQuery('#individual').attr('checked', false);
208
  }
209
+ } else if ( jQuery('#individual').is(':checked') ) {
210
  swChb(cAuthors, true);
211
  swChb(cCat, true);
212
  } else {
216
  }
217
 
218
  function chkChild(pid) {
219
+ if ( jQuery('#page_act_'+pid).is(':checked') == false ) {
220
+ jQuery('#page_childs_act_'+pid).attr('checked', false);
221
  }
222
  }
223
 
224
  function chkParent(pid) {
225
+ if ( jQuery('#page_childs_act_'+pid).is(':checked') == true ) {
226
  jQuery('#page_act_'+pid).attr('checked', true);
227
  }
228
  }
229
 
230
  function chkCPChild(type, pid) {
231
+ if ( jQuery('#'+type+'_act_'+pid).is(':checked') == false ) {
232
+ jQuery('#'+type+'_childs_act_'+pid).attr('checked', false);
233
  }
234
  }
235
 
236
  function chkCPParent(type, pid) {
237
+ if ( jQuery('#'+type+'_childs_act_'+pid).is(':checked') == true ) {
238
  jQuery('#'+type+'_act_'+pid).attr('checked', true);
239
  }
240
  }
241
 
242
  function ci(id) {
243
+ if ( jQuery('#'+id).is(':checked') ) {
244
  icount++;
245
  } else {
246
  icount--;
290
  }
291
  }
292
 
293
+ function setOff() {
294
+ jQuery(':radio').each( function() {
295
+ if ( jQuery(this).val() == 'no' && jQuery.inArray(jQuery(this).attr('name'), exclOff) == -1 ) {
296
+ jQuery(this).attr('checked', true);
297
+ };
298
+ });
299
+ alert('All options set to \'No\'.\nDon\'t forget to make changes, otherwise you\'ll receive an error when saving.');
300
+ }
301
+
302
  var cAuthors = new Array(<?php echo implode(', ', $js_author_array); ?>);
303
  var cCat = new Array(<?php echo implode(', ', $js_category_array); ?>);
304
  var cRole = new Array(<?php echo implode(', ' , $jsroles); ?>);
305
  var cDate = new Array('date_start', 'date_end');
306
  var icount = <?php echo $js_count; ?>;
307
+ var exclOff = new Array(<?php echo implode(', ', $excl); ?>);
308
 
309
+ if ( jQuery('#role-yes').is(':checked') ) {
310
  swChb(cRole, true);
311
  }
312
+ if ( jQuery('#date-yes').is(':checked') ) {
313
  swTxt(cDate, true);
314
  }
315
+ if ( jQuery('#individual').is(':checked') ) {
316
  swChb(cAuthors, true);
317
  swChb(cCat, true);
318
  }
dynwid_admin_overview.php CHANGED
@@ -2,34 +2,45 @@
2
  /**
3
  * dynwid_admin_overview.php - Overview page
4
  *
5
- * @version $Id: dynwid_admin_overview.php 348295 2011-02-20 20:13:21Z qurl $
6
  * @copyright 2011 Jacco Drabbe
7
  */
8
 
9
- // Special case: Reset action needs to go back to overview.
10
- if ( isset($_GET['action']) && $_GET['action'] == 'reset' ) {
11
- check_admin_referer('plugin-name-action_reset_' . $_GET['id']);
12
- $DW->resetOptions($_GET['id']);
13
- ?>
14
- <div class="updated fade" id="message">
15
- <p>
16
- <strong><?php _e('Widget options have been reset to default.', DW_L10N_DOMAIN); ?></strong><br />
17
- </p>
18
- </div>
19
- <?php
20
- }
21
- if ( isset($_GET['action']) && $_GET['action'] == 'dynwid_set_method' ) {
22
- if ( $_GET['oldmethod'] == 'on' ) {
23
- update_option('dynwid_old_method', TRUE);
24
- } else {
25
- update_option('dynwid_old_method', FALSE);
26
- }
27
- ?>
28
- <div class="updated fade" id="message">
29
- <p><strong><?php echo __('Method set to', DW_L10N_DOMAIN) . ' ' . ( get_option('dynwid_old_method') ? '\''. __('OLD', DW_L10N_DOMAIN) .'\'' : '\'' . __('FILTER', DW_L10N_DOMAIN) . '\'' ); ?>.</strong></p>
30
- </div>
31
- <?php
32
- }
 
 
 
 
 
 
 
 
 
 
 
33
 
34
  foreach ( $DW->sidebars as $sidebar_id => $widgets ) {
35
  if ( count($widgets) > 0 ) {
@@ -116,14 +127,29 @@
116
  <form id="dynwid_method" action="" method="get">
117
  <input type="hidden" name="page" value="dynwid-config" />
118
  <input type="hidden" name="action" value="dynwid_set_method" />
119
- <input type="checkbox" id="oldmethod" name="oldmethod" <?php echo ( get_option('dynwid_old_method') ? 'checked="checked"' : '' ) ?> onchange="document.getElementById('dynwid_method').submit();" /> <label for="oldmethod"><?php _e('Use \'OLD\' method', DW_L10N_DOMAIN); ?></label>
120
  </form>
121
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
122
 
123
  <?php if ( defined('WPSC_TABLE_PRODUCT_CATEGORIES') ) { ?>
124
  <!-- WPEC dump //--><br /><br />
125
  <?php _e('When upgrading to WPEC 3.8 the Dynamic Widgets rules for WPEC are lost. The WPEC dump gives you an overview of the rules before the update.'); ?><br />
126
- <span style="color:red;font-weight:bold;"><?php _e('WARNING'); ?></span> <?php _e('This only works correct when you did not add or change anything in the Dynamic Widgets rules.'); ?>
127
  <br /><br />
128
  <div id="wpec_dump">
129
  <form action="" method="get">
2
  /**
3
  * dynwid_admin_overview.php - Overview page
4
  *
5
+ * @version $Id: dynwid_admin_overview.php 403464 2011-07-01 20:30:55Z qurl $
6
  * @copyright 2011 Jacco Drabbe
7
  */
8
 
9
+ if ( isset($_GET['action']) ) {
10
+ $mbox = new DWMessageBox();
11
+
12
+ switch ( $_GET['action'] ) {
13
+ case 'dynwid_set_method':
14
+ if ( $_GET['oldmethod'] == 'on' ) {
15
+ update_option('dynwid_old_method', TRUE);
16
+ } else {
17
+ update_option('dynwid_old_method', FALSE);
18
+ }
19
+
20
+ $text = __('Method set to', DW_L10N_DOMAIN) . ' ' . ( get_option('dynwid_old_method') ? '\''. __('OLD', DW_L10N_DOMAIN) .'\'' : '\'' . __('FILTER', DW_L10N_DOMAIN) . '\'' );
21
+ $mbox->create($text, '');
22
+ break;
23
+
24
+ case 'dynwid_set_page_limit':
25
+ $limit = (int) $_GET['page_limit'];
26
+ if ( $limit > 0 ) {
27
+ update_option('dynwid_page_limit', $limit);
28
+ $text = __('Page limit set to', DW_L10N_DOMAIN) . ' ' . $limit . '.';
29
+ $mbox->create($text, '');
30
+ } else {
31
+ $text = __('ERROR', DW_L10N_DOMAIN) . ': ' . strip_tags($_GET['page_limit']) . ' ' . __('is not a valid limit.', DW_L10N_DOMAIN);
32
+ $mbox->type = 'error';
33
+ $mbox->create($text, '');
34
+ }
35
+ break;
36
+
37
+ case 'reset':
38
+ check_admin_referer('plugin-name-action_reset_' . $_GET['id']);
39
+ $DW->resetOptions($_GET['id']);
40
+ $mbox->create(__('Widget options have been reset to default.', DW_L10N_DOMAIN), '');
41
+ break;
42
+ } // switch
43
+ }
44
 
45
  foreach ( $DW->sidebars as $sidebar_id => $widgets ) {
46
  if ( count($widgets) > 0 ) {
127
  <form id="dynwid_method" action="" method="get">
128
  <input type="hidden" name="page" value="dynwid-config" />
129
  <input type="hidden" name="action" value="dynwid_set_method" />
130
+ <input type="checkbox" id="oldmethod" name="oldmethod" <?php echo ( get_option('dynwid_old_method') ? 'checked="checked"' : '' ) ?> onchange="jQuery('#dynwid_method').submit();" /> <label for="oldmethod"><?php _e('Use \'OLD\' method', DW_L10N_DOMAIN); ?></label>
131
  </form>
132
  </div>
133
+ <br />
134
+
135
+ <!-- page limit //-->
136
+ <div id ="page_limit">
137
+ <form action="" method="get">
138
+ <input type="hidden" name="page" value="dynwid-config" />
139
+ <input type="hidden" name="action" value="dynwid_set_page_limit" />
140
+ <b><?php _e('Page limit') ?></b>: <input type="text" name="page_limit" value="<?php echo ( isset($_GET['page_limit']) ) ? $_GET['page_limit'] : DW_PAGE_LIMIT; ?>" style="width:50px" maxlength="4" /> <input class="button-primary" type="submit" value="<? _e('Save'); ?>" />
141
+ <br />
142
+ <?php _e('The page limit sets the limit of number of pages to prevent a timeout when building the hierarchical tree. When the number of pages is above this limit, a flat list will be displayed which is less time consuming.', DW_L10N_DOMAIN); ?>
143
+ <br />
144
+ <?php echo __('Currently the number of pages is', DW_L10N_DOMAIN) . ' ' . count(get_pages()); ?>.
145
+ </form>
146
+ </div>
147
+ <br />
148
 
149
  <?php if ( defined('WPSC_TABLE_PRODUCT_CATEGORIES') ) { ?>
150
  <!-- WPEC dump //--><br /><br />
151
  <?php _e('When upgrading to WPEC 3.8 the Dynamic Widgets rules for WPEC are lost. The WPEC dump gives you an overview of the rules before the update.'); ?><br />
152
+ <span style="color:red;font-weight:bold;"><?php _e('WARNING', DW_L10N_DOMAIN); ?></span> <?php _e('This only works correct when you did not add or change anything in the Dynamic Widgets rules.', DW_L10N_DOMAIN); ?>
153
  <br /><br />
154
  <div id="wpec_dump">
155
  <form action="" method="get">
dynwid_admin_save.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * dynwid_admin_save.php - Saving options to the database
4
  *
5
- * @version $Id: dynwid_admin_save.php 348295 2011-02-20 20:13:21Z qurl $
6
  * @copyright 2011 Jacco Drabbe
7
  */
8
 
@@ -16,7 +16,12 @@
16
  die();
17
  }
18
  // Browser
19
- if ( $_POST['browser'] == 'no' && count($_POST['role_act']) == 0 ) {
 
 
 
 
 
20
  wp_redirect( $_SERVER['REQUEST_URI'] . '&work=none' );
21
  die();
22
  }
@@ -87,6 +92,13 @@
87
  $DW->addSingleOption($_POST['widget_id'], 'browser');
88
  }
89
 
 
 
 
 
 
 
 
90
  // Front Page
91
  if ( isset($_POST['front-page']) && $_POST['front-page'] == 'no' ) {
92
  $DW->addSingleOption($_POST['widget_id'], 'front-page');
@@ -179,8 +191,23 @@
179
  // Custom Types (WP >= 3.0)
180
  if ( version_compare($GLOBALS['wp_version'], '3.0', '>=') && isset($_POST['post_types']) ) {
181
  foreach ( $_POST['post_types'] as $type ) {
 
 
 
 
 
 
 
 
 
 
 
182
  $act_field = $type . '_act';
183
- if ( count($_POST[$act_field]) > 0 ) {
 
 
 
 
184
  $DW->addMultiOption($_POST['widget_id'], $type, $_POST[$type], $_POST[$act_field]);
185
  } else if ( $_POST[$type] == 'no' ) {
186
  $DW->addSingleOption($_POST['widget_id'], $type);
@@ -197,6 +224,14 @@
197
  }
198
  $DW->addMultiOption($_POST['widget_id'], $type . '-childs', $_POST[$type], $childs_act);
199
  }
 
 
 
 
 
 
 
 
200
  }
201
 
202
  if ( isset($_POST['cp_archive_act']) && count($_POST['cp_archive_act']) > 0 ) {
@@ -206,6 +241,23 @@
206
  }
207
  }
208
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
209
  // WPML PLugin support
210
  if ( isset($_POST['wpml_act']) && count($_POST['wpml_act']) > 0 ) {
211
  $DW->addMultiOption($_POST['widget_id'], 'wpml', $_POST['wpml'], $_POST['wpml_act']);
2
  /**
3
  * dynwid_admin_save.php - Saving options to the database
4
  *
5
+ * @version $Id: dynwid_admin_save.php 379244 2011-04-30 18:37:13Z qurl $
6
  * @copyright 2011 Jacco Drabbe
7
  */
8
 
16
  die();
17
  }
18
  // Browser
19
+ if ( $_POST['browser'] == 'no' && count($_POST['browser_act']) == 0 ) {
20
+ wp_redirect( $_SERVER['REQUEST_URI'] . '&work=none' );
21
+ die();
22
+ }
23
+ // Template
24
+ if ( $_POST['tpl'] == 'no' && count($_POST['tpl_act']) == 0 ) {
25
  wp_redirect( $_SERVER['REQUEST_URI'] . '&work=none' );
26
  die();
27
  }
92
  $DW->addSingleOption($_POST['widget_id'], 'browser');
93
  }
94
 
95
+ // Template
96
+ if ( isset($_POST['tpl_act']) && count($_POST['tpl_act']) > 0 ) {
97
+ $DW->addMultiOption($_POST['widget_id'], 'tpl', $_POST['tpl'], $_POST['tpl_act']);
98
+ } else if ( isset($_POST['tpl']) && $_POST['tpl'] == 'no' ) {
99
+ $DW->addSingleOption($_POST['widget_id'], 'tpl');
100
+ }
101
+
102
  // Front Page
103
  if ( isset($_POST['front-page']) && $_POST['front-page'] == 'no' ) {
104
  $DW->addSingleOption($_POST['widget_id'], 'front-page');
191
  // Custom Types (WP >= 3.0)
192
  if ( version_compare($GLOBALS['wp_version'], '3.0', '>=') && isset($_POST['post_types']) ) {
193
  foreach ( $_POST['post_types'] as $type ) {
194
+ // Check taxonomies
195
+ $taxonomy = FALSE;
196
+ $tax_list = get_object_taxonomies($type);
197
+ foreach ( $tax_list as $tax ) {
198
+ $act_tax_field = $type . '-tax_' . $tax . '_act';
199
+ if ( isset($_POST[$act_tax_field]) && count($_POST[$act_tax_field]) > 0 ) {
200
+ $taxonomy = TRUE;
201
+ break;
202
+ }
203
+ }
204
+
205
  $act_field = $type . '_act';
206
+ if ( count($_POST[$act_field]) > 0 || $taxonomy ) {
207
+ if (! is_array($_POST[$act_field]) ) {
208
+ $_POST[$act_field] = array();
209
+ }
210
+
211
  $DW->addMultiOption($_POST['widget_id'], $type, $_POST[$type], $_POST[$act_field]);
212
  } else if ( $_POST[$type] == 'no' ) {
213
  $DW->addSingleOption($_POST['widget_id'], $type);
224
  }
225
  $DW->addMultiOption($_POST['widget_id'], $type . '-childs', $_POST[$type], $childs_act);
226
  }
227
+
228
+ // -- Taxonomies
229
+ foreach ( $tax_list as $tax ) {
230
+ $act_tax_field = $type . '-tax_' . $tax . '_act';
231
+ if ( isset($_POST[$act_tax_field]) && count($_POST[$act_tax_field]) > 0 ) {
232
+ $DW->addMultiOption($_POST['widget_id'], $type . '-tax_' . $tax, $_POST[$type], $_POST[$act_tax_field]);
233
+ }
234
+ }
235
  }
236
 
237
  if ( isset($_POST['cp_archive_act']) && count($_POST['cp_archive_act']) > 0 ) {
241
  }
242
  }
243
 
244
+ // Custom Taxonomies (WP >= 3.0)
245
+ if ( version_compare($GLOBALS['wp_version'], '3.0', '>=') && isset($_POST['taxonomy']) ) {
246
+ foreach ( $_POST['taxonomy'] as $tax ) {
247
+ $type = 'tax_' . $tax;
248
+ $act_field = $type . '_act';
249
+ if ( count($_POST[$act_field]) > 0 ) {
250
+ if (! is_array($_POST[$act_field]) ) {
251
+ $_POST[$act_field] = array();
252
+ }
253
+
254
+ $DW->addMultiOption($_POST['widget_id'], $type, $_POST[$type], $_POST[$act_field]);
255
+ } else if ( $_POST[$type] == 'no' ) {
256
+ $DW->addSingleOption($_POST['widget_id'], $type);
257
+ }
258
+ }
259
+ }
260
+
261
  // WPML PLugin support
262
  if ( isset($_POST['wpml_act']) && count($_POST['wpml_act']) > 0 ) {
263
  $DW->addMultiOption($_POST['widget_id'], 'wpml', $_POST['wpml'], $_POST['wpml_act']);
dynwid_class.php CHANGED
@@ -1,15 +1,108 @@
1
  <?php
2
  /**
3
- * dynwid_class.php - Dynamic Widgets Class (PHP5)
4
  *
5
- * @version $Id: dynwid_class.php 348295 2011-02-20 20:13:21Z qurl $
6
  * @copyright 2011 Jacco Drabbe
7
  */
8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  class dynWid {
10
  public $bp; // BuddyPress Plugin support
11
  public $bp_groups; // BuddyPress Plugin support (groups)
12
  public $custom_post_type;
 
13
  private $dbtable;
14
  public $dwoptions;
15
  public $dynwid_list;
@@ -22,6 +115,7 @@
22
  public $registered_widgets;
23
  public $removelist;
24
  public $sidebars;
 
25
  public $plugin_url;
26
  public $useragent;
27
  public $userrole;
@@ -38,9 +132,10 @@
38
  }
39
 
40
  $this->custom_post_type = FALSE;
 
41
  $this->firstmessage = TRUE;
42
  $this->listmade = FALSE;
43
- $this->overrule_maintype = array('date', 'role', 'browser', 'wpml');
44
  $this->registered_sidebars = $GLOBALS['wp_registered_sidebars'];
45
  $this->registered_widget_controls = &$GLOBALS['wp_registered_widget_controls'];
46
  $this->registered_widgets = &$GLOBALS['wp_registered_widgets'];
@@ -53,6 +148,7 @@
53
  'role' => __('Role'),
54
  'date' => __('Date'),
55
  'browser' => __('Browser', DW_L10N_DOMAIN),
 
56
  'wpml' => __('Language', DW_L10N_DOMAIN),
57
  'front-page' => __('Front Page', DW_L10N_DOMAIN),
58
  'single' => __('Single Posts', DW_L10N_DOMAIN),
@@ -63,7 +159,10 @@
63
  'archive' => __('Archive Pages', DW_L10N_DOMAIN),
64
  'e404' => __('Error Page', DW_L10N_DOMAIN),
65
  'search' => __('Search page', DW_L10N_DOMAIN),
66
- 'wpsc' => __('WPSC Category', DW_L10N_DOMAIN)
 
 
 
67
  );
68
 
69
  // Adding Custom Post Types to $this->dwoptions
@@ -76,6 +175,12 @@
76
  foreach ( $post_types as $ctid ) {
77
  $this->dwoptions[key($post_types)] = $ctid->label;
78
  }
 
 
 
 
 
 
79
  }
80
 
81
  // DB init
@@ -118,6 +223,8 @@
118
  }
119
 
120
  public function addMultiOption($widget_id, $maintype, $default, $act) {
 
 
121
  if ( $default == 'no' ) {
122
  $opt_default = '0';
123
  $opt_act = '1';
@@ -126,11 +233,22 @@
126
  $opt_act = '0';
127
  }
128
 
129
- $query = "INSERT INTO " . $this->dbtable . "
 
 
 
 
 
 
 
 
 
 
130
  (widget_id, maintype, name, value)
131
  VALUES
132
  ('" . $widget_id . "', '" . $maintype . "', 'default', '" . $opt_default . "')";
133
- $this->wpdb->query($query);
 
134
  foreach ( $act as $option ) {
135
  $query = "INSERT INTO " . $this->dbtable . "
136
  (widget_id, maintype, name, value)
@@ -181,9 +299,9 @@
181
  }
182
 
183
  public function deleteOption($widget_id, $maintype, $name = '') {
184
- $query = "DELETE FROM " . $this->dbtable . " WHERE widget_id = '" .$widget_id . "' AND maintype = '" .$maintype ."'";
185
  if (! empty($name) ) {
186
- $query .= " AND (name = '" . $name . "' OR name = 'default')";
187
  }
188
  $this->wpdb->query($query);
189
  }
@@ -205,6 +323,8 @@
205
  return 'category';
206
  } else if ( function_exists('is_post_type_archive') && is_post_type_archive() ) {
207
  return 'cp_archive'; // must be before is_archive(), otherwise detects as 'archive' in WP 3.1.0
 
 
208
  } else if ( is_archive() && ! is_category() && ! is_author() ) {
209
  return 'archive';
210
  } else if ( is_404() ) {
@@ -249,9 +369,7 @@
249
 
250
  public function dumpOpt($opt) {
251
  if ( DW_DEBUG && count($opt) > 0 ) {
252
- echo '<pre>';
253
- print_r($opt);
254
- echo '</pre>';
255
  }
256
  }
257
 
@@ -267,6 +385,7 @@
267
  OR maintype = 'role'
268
  OR maintype = 'date'
269
  OR maintype = 'browser'
 
270
  OR maintype = 'wpml'";
271
  $results = $this->wpdb->get_results($query);
272
  foreach ( $results as $myrow ) {
@@ -280,7 +399,11 @@
280
  if ( $is_gecko ) {
281
  return 'gecko';
282
  } else if ( $is_IE ) {
283
- return 'msie';
 
 
 
 
284
  } else if ( $is_opera ) {
285
  return 'opera';
286
  } else if ( $is_NS4 ) {
@@ -294,6 +417,18 @@
294
  }
295
  }
296
 
 
 
 
 
 
 
 
 
 
 
 
 
297
  public function getName($id, $type = 'W') {
298
  switch ( $type ) {
299
  case 'S':
@@ -320,7 +455,7 @@
320
  return $name;
321
  }
322
 
323
- public function getOptions($widget_id, $maintype, $admin = TRUE) {
324
  $opt = array();
325
 
326
  if ( $admin ) {
@@ -339,6 +474,35 @@
339
  OR maintype = 'role'
340
  OR maintype = 'date'
341
  OR maintype = 'browser'
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
342
  OR maintype = 'wpml')
343
  ORDER BY maintype, name";
344
  }
@@ -353,7 +517,7 @@
353
  }
354
 
355
  return $opt;
356
- }
357
 
358
  public function getParents($type, $arr, $id) {
359
  if ( $type == 'page' ) {
1
  <?php
2
  /**
3
+ * dynwid_class.php - Dynamic Widgets Classes (PHP5)
4
  *
5
+ * @version $Id: dynwid_class.php 403464 2011-07-01 20:30:55Z qurl $
6
  * @copyright 2011 Jacco Drabbe
7
  */
8
 
9
+ class DWMessageBox {
10
+ private $leadtext;
11
+ private $message;
12
+ public $type;
13
+
14
+ public function __construct($type = 'notify') {
15
+ $this->type = $type;
16
+ }
17
+
18
+ public function create($lead, $msg) {
19
+ $this->setlead($lead);
20
+ $this->setMessage($msg);
21
+ $this->output();
22
+ }
23
+
24
+ public function output() {
25
+ switch ( $this->type ) {
26
+ case 'error':
27
+ $class = 'error';
28
+ break;
29
+ default:
30
+ $class = 'updated fade';
31
+ }
32
+
33
+ echo '<div class="' . $class . '" id="message">';
34
+ echo '<p>';
35
+ if (! empty($this->leadtext) ) {
36
+ echo '<strong>' . $this->leadtext . '</strong> ';
37
+ }
38
+ echo $this->message;
39
+ echo '</p>';
40
+ echo '</div>';
41
+ }
42
+
43
+ public function setLead($text) {
44
+ $this->leadtext = $text;
45
+ }
46
+
47
+ public function setMessage($text) {
48
+ $this->message = $text;
49
+ }
50
+ }
51
+
52
+ class DWOpts {
53
+ public $act;
54
+ public $checked = 'checked="checked"';
55
+ public $count;
56
+ public $default;
57
+ private $type;
58
+
59
+ public function __construct($result, $type) {
60
+ $this->act = array();
61
+ $this->count = count($result);
62
+ $this->type = $type;
63
+ if ( $this->count > 0 ) {
64
+ foreach ( $result as $condition ) {
65
+ if ( $condition->maintype == $this->type ) {
66
+ if ( $condition->name == 'default' || empty($condition->name) ) {
67
+ $this->default = $condition->value;
68
+ } else {
69
+ $this->act[ ] = $condition->name;
70
+ }
71
+ }
72
+ }
73
+ } else {
74
+ $this->default = '1';
75
+ }
76
+
77
+ // in some cases the default is (still) null
78
+ if ( is_null($this->default) ) {
79
+ $this->default = '1';
80
+ $this->count = 0;
81
+ }
82
+ }
83
+
84
+ public function selectNo() {
85
+ if ( $this->default == '0' ) {
86
+ return TRUE;
87
+ } else {
88
+ return FALSE;
89
+ }
90
+ }
91
+
92
+ public function selectYes() {
93
+ if ( $this->default == '1' ) {
94
+ return TRUE;
95
+ } else {
96
+ return FALSE;
97
+ }
98
+ }
99
+ }
100
+
101
  class dynWid {
102
  public $bp; // BuddyPress Plugin support
103
  public $bp_groups; // BuddyPress Plugin support (groups)
104
  public $custom_post_type;
105
+ public $custom_taxonomy;
106
  private $dbtable;
107
  public $dwoptions;
108
  public $dynwid_list;
115
  public $registered_widgets;
116
  public $removelist;
117
  public $sidebars;
118
+ public $template;
119
  public $plugin_url;
120
  public $useragent;
121
  public $userrole;
132
  }
133
 
134
  $this->custom_post_type = FALSE;
135
+ $this->custom_taxonomy = FALSE;
136
  $this->firstmessage = TRUE;
137
  $this->listmade = FALSE;
138
+ $this->overrule_maintype = array('date', 'role', 'browser', 'tpl', 'wpml');
139
  $this->registered_sidebars = $GLOBALS['wp_registered_sidebars'];
140
  $this->registered_widget_controls = &$GLOBALS['wp_registered_widget_controls'];
141
  $this->registered_widgets = &$GLOBALS['wp_registered_widgets'];
148
  'role' => __('Role'),
149
  'date' => __('Date'),
150
  'browser' => __('Browser', DW_L10N_DOMAIN),
151
+ 'tpl' => __('Templates', DW_L10N_DOMAIN),
152
  'wpml' => __('Language', DW_L10N_DOMAIN),
153
  'front-page' => __('Front Page', DW_L10N_DOMAIN),
154
  'single' => __('Single Posts', DW_L10N_DOMAIN),
159
  'archive' => __('Archive Pages', DW_L10N_DOMAIN),
160
  'e404' => __('Error Page', DW_L10N_DOMAIN),
161
  'search' => __('Search page', DW_L10N_DOMAIN),
162
+ 'wpsc' => __('WPSC Category', DW_L10N_DOMAIN),
163
+ 'cp_archive' => __('Custom Post Type Archives', DW_L10N_DOMAIN),
164
+ 'bp' => __('BuddyPress', DW_L10N_DOMAIN),
165
+ 'bp-group' => __('BuddyPress Groups', DW_L10N_DOMAIN)
166
  );
167
 
168
  // Adding Custom Post Types to $this->dwoptions
175
  foreach ( $post_types as $ctid ) {
176
  $this->dwoptions[key($post_types)] = $ctid->label;
177
  }
178
+
179
+ // Adding Custom Taxonomies to $this->dwoptions
180
+ $taxonomy = get_taxonomies($args, 'objects', 'and');
181
+ foreach ( $taxonomy as $tax_id => $tax ) {
182
+ $this->dwoptions['tax_' . $tax_id] = $tax->label;
183
+ }
184
  }
185
 
186
  // DB init
223
  }
224
 
225
  public function addMultiOption($widget_id, $maintype, $default, $act) {
226
+ $insert = TRUE;
227
+
228
  if ( $default == 'no' ) {
229
  $opt_default = '0';
230
  $opt_act = '1';
233
  $opt_act = '0';
234
  }
235
 
236
+ // Check single-post or single-option coming from post or tag screen
237
+ if ( $maintype == 'single-post' || $maintype == 'single-tag' ) {
238
+ $query = "SELECT COUNT(1) AS total FROM " . $this->dbtable . " WHERE widget_id = '" . $widget_id . "' AND maintype = '" . $maintype . "' AND name = 'default'";
239
+ $count = $this->wpdb->get_var($this->wpdb->prepare($query));
240
+ if ( $count > 0 ) {
241
+ $insert = FALSE;
242
+ }
243
+ }
244
+
245
+ if ( $insert ) {
246
+ $query = "INSERT INTO " . $this->dbtable . "
247
  (widget_id, maintype, name, value)
248
  VALUES
249
  ('" . $widget_id . "', '" . $maintype . "', 'default', '" . $opt_default . "')";
250
+ $this->wpdb->query($query);
251
+ }
252
  foreach ( $act as $option ) {
253
  $query = "INSERT INTO " . $this->dbtable . "
254
  (widget_id, maintype, name, value)
299
  }
300
 
301
  public function deleteOption($widget_id, $maintype, $name = '') {
302
+ $query = "DELETE FROM " . $this->dbtable . " WHERE widget_id = '" . $widget_id . "' AND maintype = '" . $maintype ."'";
303
  if (! empty($name) ) {
304
+ $query .= " AND name = '" . $name . "'";
305
  }
306
  $this->wpdb->query($query);
307
  }
323
  return 'category';
324
  } else if ( function_exists('is_post_type_archive') && is_post_type_archive() ) {
325
  return 'cp_archive'; // must be before is_archive(), otherwise detects as 'archive' in WP 3.1.0
326
+ } else if ( function_exists('is_tax') && is_tax() ) {
327
+ return 'tax_archive';
328
  } else if ( is_archive() && ! is_category() && ! is_author() ) {
329
  return 'archive';
330
  } else if ( is_404() ) {
369
 
370
  public function dumpOpt($opt) {
371
  if ( DW_DEBUG && count($opt) > 0 ) {
372
+ var_dump($opt);
 
 
373
  }
374
  }
375
 
385
  OR maintype = 'role'
386
  OR maintype = 'date'
387
  OR maintype = 'browser'
388
+ OR maintype = 'tpl'
389
  OR maintype = 'wpml'";
390
  $results = $this->wpdb->get_results($query);
391
  foreach ( $results as $myrow ) {
399
  if ( $is_gecko ) {
400
  return 'gecko';
401
  } else if ( $is_IE ) {
402
+ if ( strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 6.') !== FALSE ) {
403
+ return 'msie6';
404
+ } else {
405
+ return 'msie';
406
+ }
407
  } else if ( $is_opera ) {
408
  return 'opera';
409
  } else if ( $is_NS4 ) {
417
  }
418
  }
419
 
420
+ public function getDWOpt($widget_id, $maintype) {
421
+ if ( $maintype == 'home' ) {
422
+ $maintype = 'page';
423
+ }
424
+ $query = "SELECT widget_id, maintype, name, value FROM " . $this->dbtable . "
425
+ WHERE widget_id LIKE '" . $widget_id . "'
426
+ AND maintype LIKE '" . $maintype . "%'
427
+ ORDER BY maintype, name";
428
+ $results = new DWOpts($this->wpdb->get_results($query), $maintype);
429
+ return $results;
430
+ }
431
+
432
  public function getName($id, $type = 'W') {
433
  switch ( $type ) {
434
  case 'S':
455
  return $name;
456
  }
457
 
458
+ public function getOpt($widget_id, $maintype, $admin = TRUE) {
459
  $opt = array();
460
 
461
  if ( $admin ) {
474
  OR maintype = 'role'
475
  OR maintype = 'date'
476
  OR maintype = 'browser'
477
+ OR maintype = 'tpl'
478
+ OR maintype = 'wpml')
479
+ ORDER BY maintype, name";
480
+ }
481
+
482
+ $results = $this->wpdb->get_results($query);
483
+ return $results;
484
+ }
485
+
486
+ /* public function getOptions($widget_id, $maintype, $admin = TRUE) {
487
+ $opt = array();
488
+
489
+ if ( $admin ) {
490
+ $query = "SELECT widget_id, maintype, name, value FROM " . $this->dbtable . "
491
+ WHERE widget_id LIKE '" . $widget_id . "'
492
+ AND maintype LIKE '" . $maintype . "%'
493
+ ORDER BY maintype, name";
494
+
495
+ } else {
496
+ if ( $maintype == 'home' ) {
497
+ $maintype = 'page';
498
+ }
499
+ $query = "SELECT widget_id, maintype, name, value FROM " . $this->dbtable . "
500
+ WHERE widget_id LIKE '" . $widget_id . "'
501
+ AND (maintype LIKE '" . $maintype . "%'
502
+ OR maintype = 'role'
503
+ OR maintype = 'date'
504
+ OR maintype = 'browser'
505
+ OR maintype = 'tpl'
506
  OR maintype = 'wpml')
507
  ORDER BY maintype, name";
508
  }
517
  }
518
 
519
  return $opt;
520
+ } */
521
 
522
  public function getParents($type, $arr, $id) {
523
  if ( $type == 'page' ) {
dynwid_class_php4.php CHANGED
@@ -1,16 +1,118 @@
1
  <?php
2
  /**
3
- * dynwid_class_php4.php - Dynamic Widgets Class for PHP4
4
  * Needs at least PHP 4.1.0
5
  *
6
- * @version $Id: dynwid_class_php4.php 348295 2011-02-20 20:13:21Z qurl $
7
  * @copyright 2011 Jacco Drabbe
8
  */
9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  class dynWid {
11
  var $bp; /* BuddyPress Plugin support */
12
  var $bp_groups; /* BuddyPress Plugin support (groups) */
13
  var $custom_post_type;
 
14
  var $dbtable; /* private */
15
  var $enabled;
16
  var $dwoptions;
@@ -23,6 +125,7 @@
23
  var $registered_widgets;
24
  var $removelist;
25
  var $sidebars;
 
26
  var $plugin_url;
27
  var $useragent;
28
  var $userrole;
@@ -44,9 +147,10 @@
44
  }
45
 
46
  $this->custom_post_type = FALSE;
 
47
  $this->firstmessage = TRUE;
48
  $this->listmade = FALSE;
49
- $this->overrule_maintype = array('date', 'role', 'browser', 'wpml');
50
  $this->registered_sidebars = $GLOBALS['wp_registered_sidebars'];
51
  $this->registered_widget_controls = &$GLOBALS['wp_registered_widget_controls'];
52
  $this->registered_widgets = &$GLOBALS['wp_registered_widgets'];
@@ -59,6 +163,7 @@
59
  'role' => __('Role'),
60
  'date' => __('Date'),
61
  'browser' => __('Browser', DW_L10N_DOMAIN),
 
62
  'wpml' => __('Language', DW_L10N_DOMAIN),
63
  'front-page' => __('Front Page', DW_L10N_DOMAIN),
64
  'single' => __('Single Posts', DW_L10N_DOMAIN),
@@ -69,7 +174,10 @@
69
  'archive' => __('Archive Pages', DW_L10N_DOMAIN),
70
  'e404' => __('Error Page', DW_L10N_DOMAIN),
71
  'search' => __('Search page', DW_L10N_DOMAIN),
72
- 'wpsc' => __('WPSC Category', DW_L10N_DOMAIN)
 
 
 
73
  );
74
 
75
  // Adding Custom Post Types to $this->dwoptions
@@ -82,6 +190,12 @@
82
  foreach ( $post_types as $ctid ) {
83
  $this->dwoptions[key($post_types)] = $ctid->label;
84
  }
 
 
 
 
 
 
85
  }
86
 
87
  // DB init
@@ -124,26 +238,39 @@
124
  }
125
 
126
  function addMultiOption($widget_id, $maintype, $default, $act) {
127
- if ( $default == 'no' ) {
128
- $opt_default = '0';
129
- $opt_act = '1';
130
- } else {
131
- $opt_default = '1';
132
- $opt_act = '0';
133
- }
134
 
135
- $query = "INSERT INTO " . $this->dbtable . "
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
136
  (widget_id, maintype, name, value)
137
  VALUES
138
  ('" . $widget_id . "', '" . $maintype . "', 'default', '" . $opt_default . "')";
139
- $this->wpdb->query($query);
140
- foreach ( $act as $option ) {
141
- $query = "INSERT INTO " . $this->dbtable . "
 
142
  (widget_id, maintype, name, value)
143
  VALUES
144
  ('" . $widget_id . "', '" . $maintype . "', '" . $option . "', '" . $opt_act . "')";
145
- $this->wpdb->query($query);
146
- }
147
  }
148
 
149
  function addSingleOption($widget_id, $maintype, $value = '0') {
@@ -188,11 +315,11 @@
188
  }
189
 
190
  function deleteOption($widget_id, $maintype, $name = '') {
191
- $query = "DELETE FROM " . $this->dbtable . " WHERE widget_id = '" .$widget_id . "' AND maintype = '" .$maintype ."'";
192
- if (! empty($name) ) {
193
- $query .= " AND (name = '" . $name . "' OR name = 'default')";
194
- }
195
- $this->wpdb->query($query);
196
  }
197
 
198
  function detectPage() {
@@ -212,6 +339,8 @@
212
  return 'category';
213
  } else if ( function_exists('is_post_type_archive') && is_post_type_archive() ) {
214
  return 'cp_archive'; // must be before is_archive(), otherwise detects as 'archive' in WP 3.1.0
 
 
215
  } else if ( is_archive() && ! is_category() && ! is_author() ) {
216
  return 'archive';
217
  } else if ( is_404() ) {
@@ -255,11 +384,9 @@
255
  }
256
 
257
  function dumpOpt($opt) {
258
- if ( DW_DEBUG && count($opt) > 0 ) {
259
- echo '<pre>';
260
- print_r($opt);
261
- echo '</pre>';
262
- }
263
  }
264
 
265
  // replacement for createList() to make the worker faster
@@ -274,6 +401,7 @@
274
  OR maintype = 'role'
275
  OR maintype = 'date'
276
  OR maintype = 'browser'
 
277
  OR maintype = 'wpml'";
278
  $results = $this->wpdb->get_results($query);
279
  foreach ( $results as $myrow ) {
@@ -288,7 +416,11 @@
288
  if ( $is_gecko ) {
289
  return 'gecko';
290
  } else if ( $is_IE ) {
291
- return 'msie';
 
 
 
 
292
  } else if ( $is_opera ) {
293
  return 'opera';
294
  } else if ( $is_NS4 ) {
@@ -302,6 +434,18 @@
302
  }
303
  }
304
 
 
 
 
 
 
 
 
 
 
 
 
 
305
  function getName($id, $type = 'W') {
306
  switch ( $type ) {
307
  case 'S':
@@ -328,7 +472,34 @@
328
  return $name;
329
  }
330
 
331
- function getOptions($widget_id, $maintype, $admin = TRUE) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
332
  $opt = array();
333
 
334
  if ( $admin ) {
@@ -347,6 +518,7 @@
347
  OR maintype = 'role'
348
  OR maintype = 'date'
349
  OR maintype = 'browser'
 
350
  OR maintype = 'wpml')
351
  ORDER BY maintype, name";
352
  }
@@ -361,7 +533,7 @@
361
  }
362
 
363
  return $opt;
364
- }
365
 
366
  function getParents($type, $arr, $id) {
367
  if ( $type == 'page' ) {
1
  <?php
2
  /**
3
+ * dynwid_class_php4.php - Dynamic Widgets Classes for PHP4
4
  * Needs at least PHP 4.1.0
5
  *
6
+ * @version $Id: dynwid_class_php4.php 403464 2011-07-01 20:30:55Z qurl $
7
  * @copyright 2011 Jacco Drabbe
8
  */
9
 
10
+ class DWMessageBox {
11
+ var $leadtext; /* private */
12
+ var $message; /* private */
13
+ var $type;
14
+
15
+ function DWMessageBox($type = 'notify') {
16
+ $this->__construct($type);
17
+ }
18
+
19
+ function __construct($type) {
20
+ $this->type = $type;
21
+ }
22
+
23
+ function create($lead, $msg) {
24
+ $this->setlead($lead);
25
+ $this->setMessage($msg);
26
+ $this->output();
27
+ }
28
+
29
+ function output() {
30
+ switch ( $this->type ) {
31
+ case 'error':
32
+ $class = 'error';
33
+ break;
34
+ default:
35
+ $class = 'updated fade';
36
+ }
37
+
38
+ echo '<div class="' . $class . '" id="message">';
39
+ echo '<p>';
40
+ if (! empty($this->leadtext) ) {
41
+ echo '<strong>' . $this->leadtext . '</strong> ';
42
+ }
43
+ echo $this->message;
44
+ echo '</p>';
45
+ echo '</div>';
46
+ }
47
+
48
+ function setLead($text) {
49
+ $this->leadtext = $text;
50
+ }
51
+
52
+ function setMessage($text) {
53
+ $this->message = $text;
54
+ }
55
+ }
56
+
57
+ class DWOpts {
58
+ var $act;
59
+ var $checked = 'checked="checked"';
60
+ var $count;
61
+ var $default;
62
+ var $type; /* private */
63
+
64
+ /* Old constructor redirect to new constructor */
65
+ function DWOpts($result, $type) {
66
+ $this->__construct($result, $type);
67
+ }
68
+
69
+ function __construct($result, $type) {
70
+ $this->act = array();
71
+ $this->count = count($result);
72
+ $this->type = $type;
73
+ if ( $this->count > 0 ) {
74
+ foreach ( $result as $condition ) {
75
+ if ( $condition->maintype == $this->type ) {
76
+ if ( $condition->name == 'default' || empty($condition->name) ) {
77
+ $this->default = $condition->value;
78
+ } else {
79
+ $this->act[ ] = $condition->name;
80
+ }
81
+ }
82
+ }
83
+ } else {
84
+ $this->default = '1';
85
+ }
86
+
87
+ // in some cases the default is (still) null
88
+ if ( is_null($this->default) ) {
89
+ $this->default = '1';
90
+ $this->count = 0;
91
+ }
92
+ }
93
+
94
+ function selectNo() {
95
+ if ( $this->default == '0' ) {
96
+ return TRUE;
97
+ } else {
98
+ return FALSE;
99
+ }
100
+ }
101
+
102
+ function selectYes() {
103
+ if ( $this->default == '1' ) {
104
+ return TRUE;
105
+ } else {
106
+ return FALSE;
107
+ }
108
+ }
109
+ }
110
+
111
  class dynWid {
112
  var $bp; /* BuddyPress Plugin support */
113
  var $bp_groups; /* BuddyPress Plugin support (groups) */
114
  var $custom_post_type;
115
+ var $custom_taxonomy;
116
  var $dbtable; /* private */
117
  var $enabled;
118
  var $dwoptions;
125
  var $registered_widgets;
126
  var $removelist;
127
  var $sidebars;
128
+ var $template;
129
  var $plugin_url;
130
  var $useragent;
131
  var $userrole;
147
  }
148
 
149
  $this->custom_post_type = FALSE;
150
+ $this->custom_taxonomy = FALSE;
151
  $this->firstmessage = TRUE;
152
  $this->listmade = FALSE;
153
+ $this->overrule_maintype = array('date', 'role', 'browser', 'tpl', 'wpml');
154
  $this->registered_sidebars = $GLOBALS['wp_registered_sidebars'];
155
  $this->registered_widget_controls = &$GLOBALS['wp_registered_widget_controls'];
156
  $this->registered_widgets = &$GLOBALS['wp_registered_widgets'];
163
  'role' => __('Role'),
164
  'date' => __('Date'),
165
  'browser' => __('Browser', DW_L10N_DOMAIN),
166
+ 'tpl' => __('Templates', DW_L10N_DOMAIN),
167
  'wpml' => __('Language', DW_L10N_DOMAIN),
168
  'front-page' => __('Front Page', DW_L10N_DOMAIN),
169
  'single' => __('Single Posts', DW_L10N_DOMAIN),
174
  'archive' => __('Archive Pages', DW_L10N_DOMAIN),
175
  'e404' => __('Error Page', DW_L10N_DOMAIN),
176
  'search' => __('Search page', DW_L10N_DOMAIN),
177
+ 'wpsc' => __('WPSC Category', DW_L10N_DOMAIN),
178
+ 'cp_archive' => __('Custom Post Type Archives', DW_L10N_DOMAIN),
179
+ 'bp' => __('BuddyPress', DW_L10N_DOMAIN),
180
+ 'bp-group' => __('BuddyPress Groups', DW_L10N_DOMAIN)
181
  );
182
 
183
  // Adding Custom Post Types to $this->dwoptions
190
  foreach ( $post_types as $ctid ) {
191
  $this->dwoptions[key($post_types)] = $ctid->label;
192
  }
193
+
194
+ // Adding Custom Taxonomies to $this->dwoptions
195
+ $taxonomy = get_taxonomies($args, 'objects', 'and');
196
+ foreach ( $taxonomy as $tax_id => $tax ) {
197
+ $this->dwoptions['tax_' . $tax_id] = $tax->label;
198
+ }
199
  }
200
 
201
  // DB init
238
  }
239
 
240
  function addMultiOption($widget_id, $maintype, $default, $act) {
241
+ $insert = TRUE;
 
 
 
 
 
 
242
 
243
+ if ( $default == 'no' ) {
244
+ $opt_default = '0';
245
+ $opt_act = '1';
246
+ } else {
247
+ $opt_default = '1';
248
+ $opt_act = '0';
249
+ }
250
+
251
+ // Check single-post or single-option coming from post or tag screen
252
+ if ( $maintype == 'single-post' || $maintype == 'single-tag' ) {
253
+ $query = "SELECT COUNT(1) AS total FROM " . $this->dbtable . " WHERE widget_id = '" . $widget_id . "' AND maintype = '" . $maintype . "' AND name = 'default'";
254
+ $count = $this->wpdb->get_var($this->wpdb->prepare($query));
255
+ if ( $count > 0 ) {
256
+ $insert = FALSE;
257
+ }
258
+ }
259
+
260
+ if ( $insert ) {
261
+ $query = "INSERT INTO " . $this->dbtable . "
262
  (widget_id, maintype, name, value)
263
  VALUES
264
  ('" . $widget_id . "', '" . $maintype . "', 'default', '" . $opt_default . "')";
265
+ $this->wpdb->query($query);
266
+ }
267
+ foreach ( $act as $option ) {
268
+ $query = "INSERT INTO " . $this->dbtable . "
269
  (widget_id, maintype, name, value)
270
  VALUES
271
  ('" . $widget_id . "', '" . $maintype . "', '" . $option . "', '" . $opt_act . "')";
272
+ $this->wpdb->query($query);
273
+ }
274
  }
275
 
276
  function addSingleOption($widget_id, $maintype, $value = '0') {
315
  }
316
 
317
  function deleteOption($widget_id, $maintype, $name = '') {
318
+ $query = "DELETE FROM " . $this->dbtable . " WHERE widget_id = '" . $widget_id . "' AND maintype = '" . $maintype ."'";
319
+ if (! empty($name) ) {
320
+ $query .= " AND name = '" . $name . "'";
321
+ }
322
+ $this->wpdb->query($query);
323
  }
324
 
325
  function detectPage() {
339
  return 'category';
340
  } else if ( function_exists('is_post_type_archive') && is_post_type_archive() ) {
341
  return 'cp_archive'; // must be before is_archive(), otherwise detects as 'archive' in WP 3.1.0
342
+ } else if ( function_exists('is_tax') && is_tax() ) {
343
+ return 'tax_archive';
344
  } else if ( is_archive() && ! is_category() && ! is_author() ) {
345
  return 'archive';
346
  } else if ( is_404() ) {
384
  }
385
 
386
  function dumpOpt($opt) {
387
+ if ( DW_DEBUG && count($opt) > 0 ) {
388
+ var_dump($opt);
389
+ }
 
 
390
  }
391
 
392
  // replacement for createList() to make the worker faster
401
  OR maintype = 'role'
402
  OR maintype = 'date'
403
  OR maintype = 'browser'
404
+ OR maintype = 'tpl'
405
  OR maintype = 'wpml'";
406
  $results = $this->wpdb->get_results($query);
407
  foreach ( $results as $myrow ) {
416
  if ( $is_gecko ) {
417
  return 'gecko';
418
  } else if ( $is_IE ) {
419
+ if ( strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 6.') !== FALSE ) {
420
+ return 'msie6';
421
+ } else {
422
+ return 'msie';
423
+ }
424
  } else if ( $is_opera ) {
425
  return 'opera';
426
  } else if ( $is_NS4 ) {
434
  }
435
  }
436
 
437
+ function getDWOpt($widget_id, $maintype) {
438
+ if ( $maintype == 'home' ) {
439
+ $maintype = 'page';
440
+ }
441
+ $query = "SELECT widget_id, maintype, name, value FROM " . $this->dbtable . "
442
+ WHERE widget_id LIKE '" . $widget_id . "'
443
+ AND maintype LIKE '" . $maintype . "%'
444
+ ORDER BY maintype, name";
445
+ $results = new DWOpts($this->wpdb->get_results($query), $maintype);
446
+ return $results;
447
+ }
448
+
449
  function getName($id, $type = 'W') {
450
  switch ( $type ) {
451
  case 'S':
472
  return $name;
473
  }
474
 
475
+ function getOpt($widget_id, $maintype, $admin = TRUE) {
476
+ $opt = array();
477
+
478
+ if ( $admin ) {
479
+ $query = "SELECT widget_id, maintype, name, value FROM " . $this->dbtable . "
480
+ WHERE widget_id LIKE '" . $widget_id . "'
481
+ AND maintype LIKE '" . $maintype . "%'
482
+ ORDER BY maintype, name";
483
+
484
+ } else {
485
+ if ( $maintype == 'home' ) {
486
+ $maintype = 'page';
487
+ }
488
+ $query = "SELECT widget_id, maintype, name, value FROM " . $this->dbtable . "
489
+ WHERE widget_id LIKE '" . $widget_id . "'
490
+ AND (maintype LIKE '" . $maintype . "%'
491
+ OR maintype = 'role'
492
+ OR maintype = 'date'
493
+ OR maintype = 'browser'
494
+ OR maintype = 'tpl'
495
+ OR maintype = 'wpml')
496
+ ORDER BY maintype, name";
497
+ }
498
+ $results = $this->wpdb->get_results($query);
499
+ return $results;
500
+ }
501
+
502
+ /* function getOptions($widget_id, $maintype, $admin = TRUE) {
503
  $opt = array();
504
 
505
  if ( $admin ) {
518
  OR maintype = 'role'
519
  OR maintype = 'date'
520
  OR maintype = 'browser'
521
+ OR maintype = 'tpl'
522
  OR maintype = 'wpml')
523
  ORDER BY maintype, name";
524
  }
533
  }
534
 
535
  return $opt;
536
+ } */
537
 
538
  function getParents($type, $arr, $id) {
539
  if ( $type == 'page' ) {
dynwid_init_worker.php CHANGED
@@ -3,7 +3,7 @@
3
  /**
4
  * dynwid_init_worker.php
5
  *
6
- * @version $Id: dynwid_init_worker.php 348295 2011-02-20 20:13:21Z qurl $
7
  * @copyright 2011 Jacco Drabbe
8
  */
9
 
@@ -22,7 +22,7 @@
22
 
23
  $wpmlang = wpml_get_default_language();
24
  $curlang = wpml_get_current_language();
25
- $wpml = TRUE;
26
  $DW->message('WPML language: ' . $curlang);
27
 
28
  if ( $wpmlang != $curlang ) {
@@ -35,7 +35,7 @@
35
 
36
  $DW->message('User has role(s): ' . implode(', ', $DW->userrole));
37
 
38
- $custom_post_type = FALSE;
39
  $DW->whereami = $DW->detectPage();
40
  $DW->message('Page is ' . $DW->whereami);
41
 
@@ -68,8 +68,17 @@
68
  require_once(DW_PLUGIN . 'wpsc.php');
69
  }
70
  } else if ( defined('BP_VERSION') ) { // BuddyPress Plugin Support -- else if needed, otherwise WPEC pages are detected as BP
 
71
  $bp = &$GLOBALS['bp'];
72
- if (! empty($bp->current_component) ) {
 
 
 
 
 
 
 
 
73
  if ( $bp->current_component == 'groups' && ! empty($bp->current_item) ) {
74
  $DW->bp_groups = TRUE;
75
  $DW->whereami = 'bp-group';
@@ -83,6 +92,15 @@
83
  }
84
  }
85
 
 
 
 
 
 
 
 
 
 
86
  if ( $DW->whereami == 'archive' ) {
87
  // WPSC/WPEC Plugin Support
88
  if ( defined('WPSC_VERSION') && version_compare(WPSC_VERSION, '3.8', '>=') ) {
3
  /**
4
  * dynwid_init_worker.php
5
  *
6
+ * @version $Id: dynwid_init_worker.php 366469 2011-03-29 18:33:49Z qurl $
7
  * @copyright 2011 Jacco Drabbe
8
  */
9
 
22
 
23
  $wpmlang = wpml_get_default_language();
24
  $curlang = wpml_get_current_language();
25
+ // $wpml = TRUE;
26
  $DW->message('WPML language: ' . $curlang);
27
 
28
  if ( $wpmlang != $curlang ) {
35
 
36
  $DW->message('User has role(s): ' . implode(', ', $DW->userrole));
37
 
38
+ // $custom_post_type = FALSE;
39
  $DW->whereami = $DW->detectPage();
40
  $DW->message('Page is ' . $DW->whereami);
41
 
68
  require_once(DW_PLUGIN . 'wpsc.php');
69
  }
70
  } else if ( defined('BP_VERSION') ) { // BuddyPress Plugin Support -- else if needed, otherwise WPEC pages are detected as BP
71
+ require_once(DW_PLUGIN . 'bp.php');
72
  $bp = &$GLOBALS['bp'];
73
+
74
+ /*
75
+ Array of BP components needed as a workaround for certain themes claiming an invalid BP component,
76
+ confusing DW by detecting BP, when it should be Page.
77
+ */
78
+ $components = dw_get_bp_components();
79
+ $bp_components = array_keys($components);
80
+
81
+ if (! empty($bp->current_component) && in_array($bp->current_component, $bp_components) ) {
82
  if ( $bp->current_component == 'groups' && ! empty($bp->current_item) ) {
83
  $DW->bp_groups = TRUE;
84
  $DW->whereami = 'bp-group';
92
  }
93
  }
94
 
95
+ if ( $DW->whereami == 'tax_archive' ) {
96
+ $wp_query = $GLOBALS['wp_query'];
97
+ $taxonomy = $wp_query->get('taxonomy');
98
+
99
+ $DW->custom_taxonomy = TRUE;
100
+ $DW->whereami = 'tax_' . $taxonomy;
101
+ $DW->message('Page changed to tax_'. $taxonomy. ' (term: ' . $wp_query->get_queried_object_id() . ')');
102
+ }
103
+
104
  if ( $DW->whereami == 'archive' ) {
105
  // WPSC/WPEC Plugin Support
106
  if ( defined('WPSC_VERSION') && version_compare(WPSC_VERSION, '3.8', '>=') ) {
dynwid_worker.php CHANGED
@@ -2,13 +2,18 @@
2
  /**
3
  * dynwid_worker.php - The worker does the actual work.
4
  *
5
- * @version $Id: dynwid_worker.php 348295 2011-02-20 20:13:21Z qurl $
6
  * @copyright 2011 Jacco Drabbe
7
  */
8
 
9
  $DW->message('Worker START');
10
  $DW->message('WhereAmI = ' . $DW->whereami);
11
 
 
 
 
 
 
12
  // WPML Plugin support
13
  if ( defined('ICL_PLUGIN_PATH') ) {
14
  $wpml_api = ICL_PLUGIN_PATH . DW_WPML_API;
@@ -21,29 +26,30 @@
21
 
22
  foreach ( $sidebars as $sidebar_id => $widgets ) {
23
  // Only processing active sidebars with widgets
24
- if ( $sidebar_id != 'wp_inactive_widgets' && count($widgets) > 0 ) {
25
  foreach ( $widgets as $widget_key => $widget_id ) {
26
  // Check if the widget has options set
27
  if ( in_array($widget_id, $DW->dynwid_list) ) {
28
  $act = array();
29
- $opt = $DW->getOptions($widget_id, $DW->whereami, FALSE);
30
  $DW->message('Number of rules to check for widget ' . $widget_id . ': ' . count($opt));
31
  $display = TRUE;
32
  $role = TRUE;
33
  $date = TRUE;
34
  $browser = TRUE;
 
35
  $wpml = TRUE;
36
 
37
  foreach ( $opt as $condition ) {
38
- if ( empty($condition['name']) && $condition['value'] == '0' ) {
39
  $DW->message('Default for ' . $widget_id . ' set to FALSE (rule D1)');
40
  $display = FALSE;
41
  $other = TRUE;
42
  break;
43
- } else if (! in_array($condition['maintype'], $DW->overrule_maintype) ) {
44
  // Get default value
45
- if ( $condition['name'] == 'default' ) {
46
- $default = $condition['value'];
47
  if ( $default == '0' ) {
48
  $DW->message('Default for ' . $widget_id . ' set to FALSE (rule D2)');
49
  $display = FALSE;
@@ -54,20 +60,23 @@
54
  $other = FALSE;
55
  }
56
  } else {
57
- $act[ ] = $condition['name'];
58
  }
59
- } else if ( $condition['maintype'] == 'role' && $condition['name'] == 'default' ) {
60
  $DW->message('Default for ' . $widget_id . ' set to FALSE (rule R1)');
61
  $role = FALSE;
62
- } else if ( $condition['maintype'] == 'date' && $condition['name'] == 'default' ) {
63
  $DW->message('Default for ' . $widget_id . ' set to FALSE (rule DT1)');
64
  $date = FALSE;
65
- } else if ( $condition['maintype'] == 'browser' && $condition['name'] == 'default' ) {
66
- $DW->message('Default for ' . $widget_id . ' set to ' . ( (bool) $condition['value'] ? 'TRUE' : 'FALSE' ) . ' (rule DB1)');
67
- $browser = (bool) $condition['value'];
68
- } else if ( $condition['maintype'] == 'wpml' && $condition['name'] == 'default' ) {
69
- $DW->message('Default for ' . $widget_id . ' set to ' . ( (bool) $condition['value'] ? 'TRUE' : 'FALSE' ) . ' (rule DML1)');
70
- $wpml = (bool) $condition['value'];
 
 
 
71
  }
72
  }
73
 
@@ -76,7 +85,7 @@
76
  // Role exceptions
77
  if (! $role ) {
78
  foreach ( $opt as $condition ) {
79
- if ( $condition['maintype'] == 'role' && in_array($condition['name'], $DW->userrole) ) {
80
  $DW->message('Role set to TRUE (rule ER1)');
81
  $role = TRUE;
82
  }
@@ -87,14 +96,14 @@
87
  if (! $date ) {
88
  $dates = array();
89
  foreach ( $opt as $condition ) {
90
- if ( $condition['maintype'] == 'date' ) {
91
- switch ( $condition['name'] ) {
92
  case 'date_start':
93
- $date_start = $condition['value'];
94
  break;
95
 
96
  case 'date_end':
97
- $date_end = $condition['value'];
98
  break;
99
  }
100
  }
@@ -125,31 +134,39 @@
125
  // WPML
126
  if ( isset($curlang) ) {
127
  foreach ( $opt as $condition ) {
128
- if ( $condition['maintype'] == 'wpml' && $condition['name'] == $curlang ) {
129
- (bool) $wpml_tmp = $condition['value'];
130
  }
131
  }
132
 
133
  if ( isset($wpml_tmp) && $wpml_tmp != $wpml ) {
134
- $DW->message('Exception triggered for WPML language, sets display to ' . ( $wpml_tmp ? 'TRUE' : 'FALSE' ) . ' (rule EML1)');
135
  $wpml = $wpml_tmp;
136
  }
137
  }
138
  unset($wpml_tmp);
139
 
140
- // Browser
141
  foreach ( $opt as $condition ) {
142
- if ( $condition['maintype'] == 'browser' && $condition['name'] == $DW->useragent ) {
143
- (bool) $browser_tmp = $condition['value'];
 
 
144
  }
145
  }
146
 
147
  if ( isset($browser_tmp) && $browser_tmp != $browser ) {
148
- $DW->message('Exception triggered for browser, sets display to ' . ( $wpml_tmp ? 'TRUE' : 'FALSE' ) . ' (rule EB1)');
149
  $browser = $browser_tmp;
150
  }
151
  unset($browser_tmp);
152
 
 
 
 
 
 
 
153
  // For debug messages
154
  $e = ( $other ) ? 'TRUE' : 'FALSE';
155
 
@@ -161,24 +178,43 @@
161
  $id = $post->ID;
162
  $DW->message('PostID: ' . $id);
163
  if ( $DW->wpml ) {
164
- $id = dw_wpml_get_id($id, 'post_' . $post_type);
165
  $DW->message('WPML ObjectID: ' . $id);
166
  }
167
 
 
 
168
  foreach ( $opt as $condition ) {
169
- if ( $condition['name'] != 'default' ) {
170
- switch ( $condition['maintype'] ) {
171
  case $DW->whereami:
172
- $act_custom[ ] = $condition['name'];
173
  break;
174
 
175
  case $DW->whereami . '-childs':
176
- $act_childs[ ] = $condition['name'];
177
  break;
178
  }
179
  }
180
  }
181
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
182
  if ( in_array($id, $act_custom) ) {
183
  $display = $other;
184
  $DW->message('Exception triggered for ' . $widget_id . ' sets display to ' . $e . ' (rule ECP1)');
@@ -188,8 +224,39 @@
188
  $display = $other;
189
  $DW->message('Exception triggered for ' . $widget_id . ' sets display to ' . $e . ' (rule ECP2)');
190
  }
 
 
 
 
 
 
 
 
 
191
  }
 
192
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
193
  } else {
194
  // no custom post type
195
  switch ( $DW->whereami ) {
@@ -224,22 +291,22 @@
224
 
225
  // Split out the conditions
226
  foreach ( $opt as $condition ) {
227
- if ( $condition['name'] != 'default' ) {
228
- switch ( $condition['maintype'] ) {
229
  case 'single-author':
230
- $act_author[ ] = $condition['name'];
231
  break;
232
 
233
  case 'single-category':
234
- $act_category[ ] = $condition['name'];
235
  break;
236
 
237
  case 'single-tag':
238
- $act_tag[ ] = $condition['name'];
239
  break;
240
 
241
  case 'single-post':
242
- $act_post[ ] = $condition['name'];
243
  break;
244
  } // END switch
245
  }
@@ -313,14 +380,14 @@
313
  }
314
 
315
  foreach ( $opt as $condition ) {
316
- if ( $condition['name'] != 'default' ) {
317
- switch ( $condition['maintype'] ) {
318
  case 'page':
319
- $act_page[ ] = $condition['name'];
320
  break;
321
 
322
  case 'page-childs':
323
- $act_childs[ ] = $condition['name'];
324
  break;
325
  }
326
  }
@@ -404,8 +471,8 @@
404
  // We have to split out the conditions as we don't want the bp-groups to interfere
405
  $act = array();
406
  foreach ( $opt as $condition ) {
407
- if ( $condition['name'] != 'default' && $condition['maintype'] == 'bp' ) {
408
- $act[ ] = $condition['name'];
409
  }
410
  }
411
 
@@ -426,6 +493,12 @@
426
  if ( is_dw_bp_group($act) ) {
427
  $display = $other;
428
  $DW->message('Exception triggered for ' . $widget_id . ' sets display to ' . $e . ' (rule EBPG1)');
 
 
 
 
 
 
429
  }
430
  }
431
  break;
@@ -435,7 +508,7 @@
435
  } // END if/else ( $DW->custom_post_type )
436
  } /* END if ( count($opt) > 0 ) */
437
 
438
- if (! $display || ! $role || ! $date || ! $browser || ! $wpml ) {
439
  $DW->message('Removed ' . $widget_id . ' from display, SID = ' . $sidebar_id . ' / WID = ' . $widget_id . ' / KID = ' . $widget_key);
440
  if ( DW_OLD_METHOD ) {
441
  unset($DW->registered_widgets[$widget_id]);
2
  /**
3
  * dynwid_worker.php - The worker does the actual work.
4
  *
5
+ * @version $Id: dynwid_worker.php 403464 2011-07-01 20:30:55Z qurl $
6
  * @copyright 2011 Jacco Drabbe
7
  */
8
 
9
  $DW->message('Worker START');
10
  $DW->message('WhereAmI = ' . $DW->whereami);
11
 
12
+ // Template
13
+ $tpl = get_page_template();
14
+ $DW->template = basename($tpl);
15
+ $DW->message('Template = ' . $DW->template);
16
+
17
  // WPML Plugin support
18
  if ( defined('ICL_PLUGIN_PATH') ) {
19
  $wpml_api = ICL_PLUGIN_PATH . DW_WPML_API;
26
 
27
  foreach ( $sidebars as $sidebar_id => $widgets ) {
28
  // Only processing active sidebars with widgets
29
+ if ( $sidebar_id != 'wp_inactive_widgets' && count($widgets) > 0 && is_array($widgets) ) {
30
  foreach ( $widgets as $widget_key => $widget_id ) {
31
  // Check if the widget has options set
32
  if ( in_array($widget_id, $DW->dynwid_list) ) {
33
  $act = array();
34
+ $opt = $DW->getOpt($widget_id, $DW->whereami, FALSE);
35
  $DW->message('Number of rules to check for widget ' . $widget_id . ': ' . count($opt));
36
  $display = TRUE;
37
  $role = TRUE;
38
  $date = TRUE;
39
  $browser = TRUE;
40
+ $tpl = TRUE;
41
  $wpml = TRUE;
42
 
43
  foreach ( $opt as $condition ) {
44
+ if ( empty($condition->name) && $condition->value == '0' && $condition->maintype == $DW->whereami ) {
45
  $DW->message('Default for ' . $widget_id . ' set to FALSE (rule D1)');
46
  $display = FALSE;
47
  $other = TRUE;
48
  break;
49
+ } else if (! in_array($condition->maintype, $DW->overrule_maintype) ) {
50
  // Get default value
51
+ if ( $condition->name == 'default' ) {
52
+ $default = $condition->value;
53
  if ( $default == '0' ) {
54
  $DW->message('Default for ' . $widget_id . ' set to FALSE (rule D2)');
55
  $display = FALSE;
60
  $other = FALSE;
61
  }
62
  } else {
63
+ $act[ ] = $condition->name;
64
  }
65
+ } else if ( $condition->maintype == 'role' && $condition->name == 'default' ) {
66
  $DW->message('Default for ' . $widget_id . ' set to FALSE (rule R1)');
67
  $role = FALSE;
68
+ } else if ( $condition->maintype == 'date' && $condition->name == 'default' ) {
69
  $DW->message('Default for ' . $widget_id . ' set to FALSE (rule DT1)');
70
  $date = FALSE;
71
+ } else if ( $condition->maintype == 'browser' && $condition->name == 'default' ) {
72
+ $DW->message('Default for ' . $widget_id . ' set to ' . ( (bool) ($condition->value) ? 'TRUE' : 'FALSE' ) . ' (rule DB1)');
73
+ $browser = (bool) $condition->value;
74
+ } else if ( $condition->maintype == 'tpl' && $condition->name == 'default' ) {
75
+ $DW->message('Default for ' . $widget_id . ' set to ' . ( (bool) ($condition->value) ? 'TRUE' : 'FALSE' ) . ' (rule DTPL1)');
76
+ $tpl = (bool) $condition->value;
77
+ } else if ( $condition->maintype == 'wpml' && $condition->name == 'default' ) {
78
+ $DW->message('Default for ' . $widget_id . ' set to ' . ( (bool) ($condition->value) ? 'TRUE' : 'FALSE' ) . ' (rule DML1)');
79
+ $wpml = (bool) $condition->value;
80
  }
81
  }
82
 
85
  // Role exceptions
86
  if (! $role ) {
87
  foreach ( $opt as $condition ) {
88
+ if ( $condition->maintype == 'role' && in_array($condition->name, $DW->userrole) ) {
89
  $DW->message('Role set to TRUE (rule ER1)');
90
  $role = TRUE;
91
  }
96
  if (! $date ) {
97
  $dates = array();
98
  foreach ( $opt as $condition ) {
99
+ if ( $condition->maintype == 'date' ) {
100
+ switch ( $condition->name ) {
101
  case 'date_start':
102
+ $date_start = $condition->value;
103
  break;
104
 
105
  case 'date_end':
106
+ $date_end = $condition->value;
107
  break;
108
  }
109
  }
134
  // WPML
135
  if ( isset($curlang) ) {
136
  foreach ( $opt as $condition ) {
137
+ if ( $condition->maintype == 'wpml' && $condition->name == $curlang ) {
138
+ (bool) $wpml_tmp = $condition->value;
139
  }
140
  }
141
 
142
  if ( isset($wpml_tmp) && $wpml_tmp != $wpml ) {
143
+ $DW->message('Exception triggered for WPML language, sets display to ' . ( ($wpml_tmp) ? 'TRUE' : 'FALSE' ) . ' (rule EML1)');
144
  $wpml = $wpml_tmp;
145
  }
146
  }
147
  unset($wpml_tmp);
148
 
149
+ // Browser and Template
150
  foreach ( $opt as $condition ) {
151
+ if ( $condition->maintype == 'browser' && $condition->name == $DW->useragent ) {
152
+ (bool) $browser_tmp = $condition->value;
153
+ } else if ( $condition->maintype == 'tpl' && $condition->name == $DW->template ) {
154
+ (bool) $tpl_tmp = $condition->value;
155
  }
156
  }
157
 
158
  if ( isset($browser_tmp) && $browser_tmp != $browser ) {
159
+ $DW->message('Exception triggered for browser, sets display to ' . ( ($browser_tmp) ? 'TRUE' : 'FALSE' ) . ' (rule EB1)');
160
  $browser = $browser_tmp;
161
  }
162
  unset($browser_tmp);
163
 
164
+ if ( isset($tpl_tmp) && $tpl_tmp != $tpl ) {
165
+ $DW->message('Exception triggered for template, sets display to ' . ( ($tpl_tmp) ? 'TRUE' : 'FALSE' ) . ' (rule ETPL1)');
166
+ $tpl = $tpl_tmp;
167
+ }
168
+ unset($tpl_tmp);
169
+
170
  // For debug messages
171
  $e = ( $other ) ? 'TRUE' : 'FALSE';
172
 
178
  $id = $post->ID;
179
  $DW->message('PostID: ' . $id);
180
  if ( $DW->wpml ) {
181
+ $id = dw_wpml_get_id($id, 'post_' . $DW->whereami);
182
  $DW->message('WPML ObjectID: ' . $id);
183
  }
184
 
185
+ $act_custom = array();
186
+ $act_childs = array();
187
  foreach ( $opt as $condition ) {
188
+ if ( $condition->name != 'default' ) {
189
+ switch ( $condition->maintype ) {
190
  case $DW->whereami:
191
+ $act_custom[ ] = $condition->name;
192
  break;
193
 
194
  case $DW->whereami . '-childs':
195
+ $act_childs[ ] = $condition->name;
196
  break;
197
  }
198
  }
199
  }
200
 
201
+ $act_tax = array();
202
+ foreach ( get_object_taxonomies($DW->whereami) as $t ) {
203
+ $m = $DW->whereami . '-tax_' . $t;
204
+ foreach ( $opt as $condition ) {
205
+ if ( $condition->maintype == $m ) {
206
+ if (! key_exists($t, $act_tax) ) {
207
+ $act_tax[$t] = array();
208
+ }
209
+ if ( $condition->name != 'default' ) {
210
+ $act_tax[$t][ ] = $condition->name;
211
+ }
212
+ }
213
+ }
214
+ }
215
+
216
+ $term = wp_get_object_terms($id, get_object_taxonomies($DW->whereami), array('fields' => 'all'));
217
+
218
  if ( in_array($id, $act_custom) ) {
219
  $display = $other;
220
  $DW->message('Exception triggered for ' . $widget_id . ' sets display to ' . $e . ' (rule ECP1)');
224
  $display = $other;
225
  $DW->message('Exception triggered for ' . $widget_id . ' sets display to ' . $e . ' (rule ECP2)');
226
  }
227
+ } else if ( count($act_tax) > 0 ) {
228
+ // bcause $id has already been moved to default language, term doesn't need to be converted. WPML takes care of default language term
229
+ foreach ( $term as $t ) {
230
+ if ( is_array($act_tax[$t->taxonomy]) && in_array($t->term_id, $act_tax[$t->taxonomy]) ) {
231
+ $display = $other;
232
+ $DW->message('Exception triggered for ' . $widget_id . ' sets display to ' . $e . ' (rule ECP3)');
233
+ break;
234
+ }
235
+ }
236
  }
237
+ unset($act_custom, $act_childs, $act_tax);
238
  }
239
+ } else if ( $DW->custom_taxonomy ) { // Custom Taxonomy Archive
240
+ $wp_query = $GLOBALS['wp_query'];
241
+ $term = $wp_query->get_queried_object_id();
242
+ if ( $DW->wpml ) {
243
+ $term = dw_wpml_get_id($term, $DW->whereami);
244
+ $DW->message('WPML ObjectID: ' . $term);
245
+ }
246
+
247
+ $act_custom = array();
248
+
249
+ foreach ( $opt as $condition ) {
250
+ if ( $condition->name != 'default' && $condition->maintype == $DW->whereami ) {
251
+ $act_custom[ ] = $condition->name;
252
+ }
253
+ }
254
+
255
+ if ( in_array($term, $act_custom) ) {
256
+ $display = $other;
257
+ $DW->message('Exception triggered for ' . $widget_id . ' sets display to ' . $e . ' (rule ECT1)');
258
+ }
259
+ unset($act_custom);
260
  } else {
261
  // no custom post type
262
  switch ( $DW->whereami ) {
291
 
292
  // Split out the conditions
293
  foreach ( $opt as $condition ) {
294
+ if ( $condition->name != 'default' ) {
295
+ switch ( $condition->maintype ) {
296
  case 'single-author':
297
+ $act_author[ ] = $condition->name;
298
  break;
299
 
300
  case 'single-category':
301
+ $act_category[ ] = $condition->name;
302
  break;
303
 
304
  case 'single-tag':
305
+ $act_tag[ ] = $condition->name;
306
  break;
307
 
308
  case 'single-post':
309
+ $act_post[ ] = $condition->name;
310
  break;
311
  } // END switch
312
  }
380
  }
381
 
382
  foreach ( $opt as $condition ) {
383
+ if ( $condition->name != 'default' ) {
384
+ switch ( $condition->maintype ) {
385
  case 'page':
386
+ $act_page[ ] = $condition->name;
387
  break;
388
 
389
  case 'page-childs':
390
+ $act_childs[ ] = $condition->name;
391
  break;
392
  }
393
  }
471
  // We have to split out the conditions as we don't want the bp-groups to interfere
472
  $act = array();
473
  foreach ( $opt as $condition ) {
474
+ if ( $condition->name != 'default' && $condition->maintype == 'bp' ) {
475
+ $act[ ] = $condition->name;
476
  }
477
  }
478
 
493
  if ( is_dw_bp_group($act) ) {
494
  $display = $other;
495
  $DW->message('Exception triggered for ' . $widget_id . ' sets display to ' . $e . ' (rule EBPG1)');
496
+ } else if ( is_dw_bp_group_forum($act) ) {
497
+ $display = $other;
498
+ $DW->message('Exception triggered for ' . $widget_id . ' sets display to ' . $e . ' (rule EBPG2)');
499
+ } else if ( is_dw_bp_group_members($act) ) {
500
+ $display = $other;
501
+ $DW->message('Exception triggered for ' . $widget_id . ' sets display to ' . $e . ' (rule EBPG3)');
502
  }
503
  }
504
  break;
508
  } // END if/else ( $DW->custom_post_type )
509
  } /* END if ( count($opt) > 0 ) */
510
 
511
+ if (! $display || ! $role || ! $date || ! $browser || ! $tpl || ! $wpml ) {
512
  $DW->message('Removed ' . $widget_id . ' from display, SID = ' . $sidebar_id . ' / WID = ' . $widget_id . ' / KID = ' . $widget_key);
513
  if ( DW_OLD_METHOD ) {
514
  unset($DW->registered_widgets[$widget_id]);
locale/dynamic-widgets-nl.mo CHANGED
Binary file
locale/dynamic-widgets-nl.po CHANGED
@@ -2,7 +2,7 @@ msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Dynamic Widgets NL\n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2011-01-29 23:19+0100\n"
6
  "PO-Revision-Date: \n"
7
  "Last-Translator: Jacco\n"
8
  "Language-Team: \n"
@@ -12,393 +12,456 @@ msgstr ""
12
  "X-Poedit-Language: Dutch\n"
13
  "X-Poedit-Country: NETHERLANDS\n"
14
 
15
- #: ../dynwid_class_php4.php:58
16
- #: ../dynwid_class.php:52
17
  msgid "Role"
18
  msgstr "Rol"
19
 
20
- #: ../dynwid_class_php4.php:59
21
- #: ../dynwid_class.php:53
22
  msgid "Date"
23
  msgstr "Datum"
24
 
25
- #: ../dynwid_class_php4.php:60
26
- #: ../dynwid_class.php:54
27
  msgid "Browser"
28
  msgstr "Browser"
29
 
30
- #: ../dynwid_class_php4.php:61
31
- #: ../dynwid_class.php:55
 
 
 
 
 
32
  msgid "Language"
33
  msgstr "Taal"
34
 
35
- #: ../dynwid_class_php4.php:62
36
- #: ../dynwid_class.php:56
37
- #: ../mods/frontpage_module.php:20
38
  msgid "Front Page"
39
  msgstr "Startpagina"
40
 
41
- #: ../dynwid_class_php4.php:63
42
- #: ../dynwid_class.php:57
43
- #: ../mods/single_module.php:80
44
  msgid "Single Posts"
45
  msgstr "Berichten"
46
 
47
- #: ../dynwid_class_php4.php:64
48
- #: ../dynwid_class.php:58
49
- #: ../mods/attachment_module.php:20
50
  msgid "Attachments"
51
  msgstr "Bijlagen"
52
 
53
- #: ../dynwid_class_php4.php:65
54
- #: ../dynwid_class.php:59
55
  msgid "Pages"
56
  msgstr "Pagina's"
57
 
58
- #: ../dynwid_class_php4.php:66
59
- #: ../dynwid_class.php:60
60
  msgid "Author Pages"
61
  msgstr "Auteur pagina's"
62
 
63
- #: ../dynwid_class_php4.php:67
64
- #: ../dynwid_class.php:61
65
- #: ../mods/category_module.php:33
66
  msgid "Category Pages"
67
  msgstr "Categorie pagina's"
68
 
69
- #: ../dynwid_class_php4.php:68
70
- #: ../dynwid_class.php:62
71
- #: ../mods/archive_module.php:20
72
  msgid "Archive Pages"
73
  msgstr "Archief pagina's"
74
 
75
- #: ../dynwid_class_php4.php:69
76
- #: ../dynwid_class.php:63
77
- #: ../mods/error_module.php:20
78
  msgid "Error Page"
79
  msgstr "Foutmeldings pagina"
80
 
81
- #: ../dynwid_class_php4.php:70
82
- #: ../dynwid_class.php:64
83
  msgid "Search page"
84
  msgstr "Zoek pagina"
85
 
86
- #: ../dynwid_class_php4.php:71
87
- #: ../dynwid_class.php:65
88
  msgid "WPSC Category"
89
  msgstr "WPSC Categorie"
90
 
91
- #: ../dynwid_admin.php:18
92
- #: ../dynamic-widgets.php:125
93
- #: ../dynamic-widgets.php:148
94
- #: ../dynamic-widgets.php:247
95
- #: ../dynamic-widgets.php:647
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
96
  msgid "Dynamic Widgets"
97
  msgstr "Dynamische Widgets"
98
 
99
- #: ../dynwid_admin.php:25
100
  msgid "<b>WARNING</b> STRICT sql mode in effect. Dynamic Widgets might not work correctly. Please disable STRICT sql mode."
101
  msgstr "<b>LET OP</b> STRICT sql mode gedecteerd. Dynamische Widgets werkt mogelijk niet correct. U wordt aangeraden STRICT sql mode uit te schakelen."
102
 
103
- #: ../dynwid_admin.php:45
104
  msgid "Oops! Something went terrible wrong. Please reinstall Dynamic Widgets."
105
  msgstr "Oeps! Er is een onhelstelbare fout opgetreden. U wordt aangeraden om Dynamische Widgets opnieuw te installeren."
106
 
107
- #: ../dynwid_admin.php:53
108
- #: ../dynwid_admin_overview.php:28
109
  msgid "OLD"
110
  msgstr "OUD"
111
 
112
- #: ../dynwid_admin.php:53
113
- #: ../dynwid_admin_overview.php:28
114
  msgid "FILTER"
115
  msgstr "FILTER"
116
 
117
- #: ../dynamic-widgets.php:133
118
  msgid "Widgets are always displayed by default"
119
  msgstr "Widgets worden standaard altijd getoond"
120
 
121
- #: ../dynamic-widgets.php:133
122
  msgid "The '<em>Yes</em>' selection"
123
  msgstr "De '<em>Ja</em>' selectie"
124
 
125
- #: ../dynamic-widgets.php:134
126
  msgid "Click on the"
127
  msgstr "Klik op de"
128
 
129
- #: ../dynamic-widgets.php:134
130
  msgid "next to the options for more info"
131
  msgstr "bij de opties voor meer informatie"
132
 
133
- #: ../dynamic-widgets.php:135
134
  msgid "The"
135
  msgstr "De"
136
 
137
- #: ../dynamic-widgets.php:135
138
  msgid "next to a section means it has options set."
139
  msgstr "houdt in dat er opties gekozen zijn."
140
 
141
- #: ../dynamic-widgets.php:137
142
- #: ../dynamic-widgets.php:138
143
- #: ../dynamic-widgets.php:141
144
- #: ../dynamic-widgets.php:649
145
- #: ../dynwid_admin_overview.php:73
146
  msgid "Static"
147
  msgstr "Statisch"
148
 
149
- #: ../dynamic-widgets.php:137
150
- #: ../dynamic-widgets.php:139
151
- #: ../dynamic-widgets.php:649
152
- #: ../dynwid_admin_overview.php:73
153
  msgid "Dynamic"
154
  msgstr "Dyamisch"
155
 
156
- #: ../dynamic-widgets.php:138
157
  msgid "When a widget is"
158
  msgstr "Wanneer een widget"
159
 
160
- #: ../dynamic-widgets.php:138
161
  msgid "the widget uses the WordPress default. In other words, it's shown everywhere"
162
  msgstr "de widget staat op de standaard instelling. Met andere woorden, deze wordt overal getoond"
163
 
164
- #: ../dynamic-widgets.php:139
165
  msgid "A widget is"
166
  msgstr "Een widget is"
167
 
168
- #: ../dynamic-widgets.php:139
169
  msgid "when there are options set, i.e. not showing on the front page."
170
  msgstr "als er opties gewijzigd zijn, bijvoorbeeld niet tonen op de startpagina."
171
 
172
- #: ../dynamic-widgets.php:140
173
- #: ../dynwid_admin_overview.php:67
174
  msgid "Reset"
175
  msgstr "Herstellen"
176
 
177
- #: ../dynamic-widgets.php:141
178
  msgid "Reset makes the widget return to"
179
  msgstr "Herstellen zorgt ervoor dat de widget teruggezet wordt naar"
180
 
181
- #: ../dynamic-widgets.php:200
182
  msgid "Settings"
183
  msgstr "Instellingen"
184
 
185
- #: ../dynamic-widgets.php:214
186
  msgid "Apply exception rule to widgets:"
187
  msgstr "Maak uitzonderingsregel voor widget:"
188
 
189
- #: ../dynamic-widgets.php:230
 
190
  msgid "Off"
191
  msgstr "Uit"
192
 
193
- #: ../dynamic-widgets.php:230
 
194
  msgid "On"
195
  msgstr "Aan"
196
 
197
- #: ../dynamic-widgets.php:231
198
  msgid " (Default: "
199
  msgstr "(Standaard"
200
 
201
- #: ../dynamic-widgets.php:328
 
 
 
 
202
  msgid "Dynamic Widgets Options saved"
203
  msgstr "Dynamische Widget opties bewaard"
204
 
205
- #: ../dynamic-widgets.php:328
206
  msgid "for"
207
  msgstr "voor"
208
 
209
- #: ../dynamic-widgets.php:648
210
  msgid "Edit Dynamic Widgets Options"
211
  msgstr "Wijzig Dynamische Widget opties"
212
 
213
- #: ../dynamic-widgets.php:673
214
  msgid "and"
215
  msgstr "en"
216
 
217
- #: ../dynamic-widgets.php:679
218
  msgid "Options set for"
219
  msgstr "Opties voor"
220
 
221
- #: ../dynamic-widgets.php:679
222
  msgid "Option set for"
223
  msgstr "Optie voor"
224
 
225
- #: ../dynwid_admin_edit.php:60
226
  msgid "Widget options saved."
227
  msgstr "Widget opties bewaard"
228
 
229
- #: ../dynwid_admin_edit.php:60
230
- #: ../dynwid_admin_edit.php:120
231
  msgid "Return"
232
  msgstr "Terug"
233
 
234
- #: ../dynwid_admin_edit.php:60
235
  msgid "to Dynamic Widgets overview"
236
  msgstr "naar Dynamische Widgets overzicht"
237
 
238
- #: ../dynwid_admin_edit.php:65
239
  msgid "Dynamic does not mean static hiding of a widget."
240
  msgstr "Dynamisch houdt niet in het statisch verbergen van een widget."
241
 
242
- #: ../dynwid_admin_edit.php:65
243
  msgid "Hint"
244
  msgstr "Hint"
245
 
246
- #: ../dynwid_admin_edit.php:65
247
  msgid "Remove"
248
  msgstr "Verwijderen"
249
 
250
- #: ../dynwid_admin_edit.php:65
251
  msgid "the widget from the sidebar"
252
  msgstr "de widget in de sidebar"
253
 
254
- #: ../dynwid_admin_edit.php:69
255
  msgid "The From date can't be later than the To date."
256
  msgstr "The 'van' datum kan niet later zijn dan de 'tot' datum."
257
 
258
- #: ../dynwid_admin_edit.php:74
259
  msgid "Edit options for the widget"
260
  msgstr "Wijzig de opties voor de widget"
261
 
262
- #: ../dynwid_admin_edit.php:116
 
 
 
 
 
 
 
 
 
 
 
 
 
263
  msgid "Save"
264
  msgstr "Opslaan"
265
 
266
- #: ../dynwid_admin_overview.php:15
267
- msgid "Widget options have been reset to default."
268
- msgstr "De widget opties zijn hersteld naar standaard"
269
-
270
- #: ../dynwid_admin_overview.php:28
271
  msgid "Method set to"
272
  msgstr "Methode is nu"
273
 
274
- #: ../dynwid_admin_overview.php:36
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
275
  msgid "Inactive Widgets"
276
  msgstr "Inactieve Widgets"
277
 
278
- #: ../dynwid_admin_overview.php:59
279
- #: ../dynwid_admin_overview.php:62
280
  msgid "Edit this widget options"
281
  msgstr "Wijzig de widget opties voor"
282
 
283
- #: ../dynwid_admin_overview.php:62
284
  msgid "Edit"
285
  msgstr "Wijzig"
286
 
287
- #: ../dynwid_admin_overview.php:67
288
  msgid "Reset widget to Static"
289
  msgstr "Zet de widget terug naar statisch"
290
 
291
- #: ../dynwid_admin_overview.php:88
292
  msgid "Advanced"
293
  msgstr "Geavanceerd"
294
 
295
- #: ../dynwid_admin_overview.php:93
296
  msgid "wp_head() check:"
297
  msgstr "wp_head() controle:"
298
 
299
- #: ../dynwid_admin_overview.php:98
300
  msgid "wp_head() is NOT called (at the most obvious place)"
301
  msgstr "wp_head() is NIET gevonden (op de meest voor de hand liggende plaats)"
302
 
303
- #: ../dynwid_admin_overview.php:102
304
  msgid "wp_head() is called"
305
  msgstr "wp_head() is gevonden"
306
 
307
- #: ../dynwid_admin_overview.php:106
308
  msgid "Unable to determine if wp_head() is called"
309
  msgstr "Het is niet mogelijk om te bepalen of wp_head() gevonden kan worden"
310
 
311
- #: ../dynwid_admin_overview.php:118
312
  msgid "Use 'OLD' method"
313
  msgstr "Gebruik 'OUDE' methode"
314
 
315
- #: ../dynwid_admin_overview.php:124
 
 
 
 
 
 
 
 
 
 
 
 
316
  msgid "When upgrading to WPEC 3.8 the Dynamic Widgets rules for WPEC are lost. The WPEC dump gives you an overview of the rules before the update."
317
  msgstr "Wanneer u upgrade naar WPEC 3.8 dan zullen de Dynamische Widget regels voor WPEC verloren gaan. De WPEC dump geeft u een overzicht van de regels voor de update."
318
 
319
- #: ../dynwid_admin_overview.php:125
320
  msgid "WARNING"
321
  msgstr "WAARSCHUWING"
322
 
323
- #: ../dynwid_admin_overview.php:125
324
  msgid "This only works correct when you did not add or change anything in the Dynamic Widgets rules."
325
  msgstr "Dit werkt alleen correct als u geen Dyamische Widget regels toegevoegd of verwijderd heeft."
326
 
327
- #: ../dynwid_admin_overview.php:130
328
  msgid "Create WPEC dump"
329
  msgstr "Maak WPEC dump"
330
 
331
- #: ../dynwid_admin_overview.php:137
332
  msgid "For debugging purposes it is possible you're asked to create a dump. Click the 'Create dump' button and save the text file."
333
  msgstr "Voor foutopsporing is het mogelijk dat u gevraagd wordt om een dump te maken. Klik de 'Dump maken' knop en sla het tekst bestand op."
334
 
335
- #: ../dynwid_admin_overview.php:142
336
  msgid "Create dump"
337
  msgstr "Dump maken"
338
 
339
- #: ../dynwid_admin_overview.php:149
340
  msgid "When you deceide not to use this plugin anymore (sorry to hear that!). You can cleanup all settings and data related to this plugin by clicking on the 'Uninstall' button. This process is irreversible! After the cleanup the plugin is deactivated automaticly."
341
  msgstr "Wanneer u besluit om deze plugin niet meer te gebruiken (erg jammer!), kunt u alle instellingen en andere data van deze plugin verwijderen door op de 'Deinstalleer' knop te drukken. Dit proces is onomkeerbaar! Na het verwijderen zal de plugin automatisch uitgeschakeld worden."
342
 
343
- #: ../dynwid_admin_overview.php:154
344
  msgid "Uninstall"
345
  msgstr "Deinstalleer"
346
 
347
- #: ../mods/search_module.php:21
348
  msgid "Search Page"
349
  msgstr "Zoek pagina"
350
 
351
- #: ../mods/search_module.php:23
352
  msgid "Show widget on the search page?"
353
  msgstr "Toon de widget op de zoekpagina?"
354
 
355
- #: ../mods/search_module.php:25
356
- #: ../mods/category_module.php:37
357
- #: ../mods/single_module.php:91
358
- #: ../mods/attachment_module.php:24
359
- #: ../mods/error_module.php:24
360
- #: ../mods/frontpage_module.php:31
361
- #: ../mods/archive_module.php:29
362
  msgid "Yes"
363
  msgstr "Ja"
364
 
365
- #: ../mods/search_module.php:26
366
- #: ../mods/category_module.php:38
367
- #: ../mods/single_module.php:92
368
- #: ../mods/attachment_module.php:25
369
- #: ../mods/error_module.php:25
370
- #: ../mods/frontpage_module.php:32
371
- #: ../mods/archive_module.php:30
372
  msgid "No"
373
  msgstr "Nee"
374
 
375
- #: ../mods/category_module.php:35
376
  msgid "Show widget default on category pages?"
377
  msgstr "Toon de widget standaard op de categorie pagina's?"
378
 
379
- #: ../mods/category_module.php:39
380
  msgid "Except the categories"
381
  msgstr "Behalve de categoriën"
382
 
383
- #: ../mods/single_module.php:75
384
  msgid "Posts: "
385
  msgstr "Posts:"
386
 
387
- #: ../mods/single_module.php:75
388
  msgid "Tags: "
389
  msgstr "Tags:"
390
 
391
- #: ../mods/single_module.php:82
392
  msgid "Show widget default on single posts?"
393
  msgstr "De widget bij de berichten tonen?"
394
 
395
- #: ../mods/single_module.php:82
396
- #: ../mods/single_module.php:96
397
- #: ../mods/archive_module.php:22
398
  msgid "Click to toggle info"
399
  msgstr "Klik om info weer te geven of te verbergen"
400
 
401
- #: ../mods/single_module.php:86
402
  msgid ""
403
  "When you use an author <b>AND</b> a category exception, both rules in the condition must be met. Otherwise the exception rule won't be applied.\n"
404
  " \t\t\t\t\tIf you want to use the rules in a logical OR condition. Add the same widget again and apply the other rule to that.\n"
@@ -408,11 +471,11 @@ msgstr ""
408
  " \t\t\t\t\tAls u de regels in een logische OR wilt gebruiken kunt u de widget opnieuw toevoegen en daarop dan de andere regel toepassen.\n"
409
  " \t\t\t\t\t"
410
 
411
- #: ../mods/single_module.php:95
412
  msgid "Make exception rule available to individual posts and tags."
413
  msgstr "Maak de uitzonderings regel beschikbaar voor individuele berichten en tags"
414
 
415
- #: ../mods/single_module.php:99
416
  msgid ""
417
  "When you enable this option, you have the ability to apply the exception rule for <em>Single Posts</em> to tags and individual posts.\n"
418
  "\t\t\t\t\t\tYou can set the exception rule for tags in the single Edit Tag Panel (go to <a href=\"edit-tags.php?taxonomy=post_tag\">Post Tags</a>,\n"
@@ -428,27 +491,27 @@ msgstr ""
428
  " \t\t\t\t\tLet er op dat uitzonderings regels voor auteur en categorie worden verwijderd.\n"
429
  " \t\t\t\t"
430
 
431
- #: ../mods/single_module.php:116
432
  msgid "Except the posts by author"
433
  msgstr "Behalve de berichten van"
434
 
435
- #: ../mods/single_module.php:127
436
  msgid "Except the posts in category"
437
  msgstr "Behalve de berichten in de categorie"
438
 
439
- #: ../mods/attachment_module.php:22
440
  msgid "Show widget on attachment pages"
441
  msgstr "Toon de widget op bijlage pagina's"
442
 
443
- #: ../mods/error_module.php:22
444
  msgid "Show widget on the error page?"
445
  msgstr "Toon de widget op de foutmeldings pagina?"
446
 
447
- #: ../mods/frontpage_module.php:22
448
  msgid "Show widget on the front page?"
449
  msgstr "De widget op de startpagina tonen?"
450
 
451
- #: ../mods/frontpage_module.php:26
452
  msgid ""
453
  "This option only applies when your front page is set to display your latest posts (See Settings &gt; Reading).<br />\n"
454
  "\t\t\t\t\t\tWhen a static page is set, you can use the options for the static pages below.\n"
@@ -458,86 +521,111 @@ msgstr ""
458
  "\t\t\t\t\t\tWanneer deze optie op statische pagina staat, kunt u gebruik maken van de onderstaande pagina opties.\n"
459
  "\t\t\t\t\t"
460
 
461
- #: ../mods/archive_module.php:22
462
  msgid "Show widget on archive pages"
463
  msgstr "Toon de widget op archief pagina's"
464
 
465
- #: ../mods/archive_module.php:26
466
  msgid "This option does not include Author and Category Pages."
467
  msgstr "Deze optie bevat niet auteurs en categorie pagina's"
468
 
469
- #: ../mods/pages_module.php:42
 
 
 
 
 
 
 
 
470
  #: ../mods/custompost_module.php:45
471
  msgid "All childs"
472
  msgstr "Alle kinderen"
473
 
474
- #: ../mods/pages_module.php:92
475
- #: ../mods/pages_module.php:95
476
  msgid "Front page"
477
  msgstr "Startpagina"
478
 
479
- #: ../mods/pages_module.php:92
480
- #: ../mods/pages_module.php:97
481
  msgid "Posts page"
482
  msgstr "Posts pagina"
483
 
484
- #: ../mods/pages_module.php:107
485
  msgid "Show widget default on static pages?"
486
  msgstr "Toon de widget op pagina's?"
487
 
488
- #: ../mods/pages_module.php:112
 
489
  msgid ""
490
  "Checking the \"All childs\" option, makes the exception rule apply\n"
491
- "\t\t\t\tto the parent and all items under it in all levels. Also future items\n"
492
- "\t\t\t\tunder the parent. It's not possible to apply an exception rule to\n"
493
- "\t\t\t\t\"All childs\" without the parent."
494
  msgstr "Door gebruik te maken van de \"Alle kinderen\" optie, wordt de uitzonderingsregel toegepast op de ouder en alle daaronder liggende item in alle levels. Ook toekomstige items onder de ouder. Het is niet mogelijk om de uitzonderingsregel toe te passen zonder de ouder."
495
 
496
- #: ../mods/pages_module.php:122
 
 
 
 
 
 
497
  msgid "Except the page(s)"
498
  msgstr "Behalve de pagina('s)"
499
 
500
- #: ../mods/author_module.php:35
501
  msgid "Show widget default on author pages?"
502
  msgstr "Toon de widget op auteurs pagina's?"
503
 
504
- #: ../mods/author_module.php:39
505
  msgid "Except the author(s)"
506
  msgstr "Behalve van"
507
 
508
- #: ../mods/bp_module.php:51
509
- msgid "BuddyPress"
510
- msgstr "BuddyPress"
511
-
512
  #: ../mods/bp_module.php:53
513
  msgid "Show widget default on BuddyPress pages?"
514
  msgstr "Toon de widget op BuddyPress pagina's?"
515
 
516
  #: ../mods/bp_module.php:57
517
- msgid "Except on the compontents pages"
 
518
  msgstr "Behalve op de componenten pagina's"
519
 
520
- #: ../mods/bp_module.php:91
521
- msgid "BuddyPress Groups"
522
- msgstr "BuddyPress Groepen"
523
 
524
- #: ../mods/bp_module.php:93
 
 
 
 
 
 
 
 
525
  msgid "Show widget default on BuddyPress Group pages?"
526
  msgstr "Toon de widget op BuddyPress Groep pagina's?"
527
 
528
- #: ../mods/bp_module.php:97
529
  msgid "Except in the groups"
530
  msgstr "Behalve in de groepen"
531
 
 
 
 
 
 
532
  #: ../mods/role_module.php:10
533
  msgid "Anonymous"
534
  msgstr "Anoniem"
535
 
536
- #: ../mods/role_module.php:41
537
  msgid "Show widget to everybody?"
538
  msgstr "Toon de widget aan iedereen?"
539
 
540
- #: ../mods/role_module.php:45
541
  msgid ""
542
  "Setting options by role is very powerfull. It can override all other options!<br />\n"
543
  "\t\t\t\t\t\tUsers who are not logged in, get the <em>Anonymous</em> role."
@@ -545,7 +633,7 @@ msgstr ""
545
  "De rol opties zijn zeer bijzonder. Ze kunnen alle andere opties overstijgen!<br />\n"
546
  "\t\t\t\t\t\tGebruikers die niet ingelogd zijn, krijgen de <em>anonieme</em> rol."
547
 
548
- #: ../mods/role_module.php:50
549
  msgid "only to"
550
  msgstr "alleen aan"
551
 
@@ -553,56 +641,85 @@ msgstr "alleen aan"
553
  msgid "(and other Gecko based)"
554
  msgstr "(en andere op Gecko gebaseerd)"
555
 
556
- #: ../mods/useragent_module.php:16
557
  msgid "Other / Unknown / Not detected"
558
  msgstr "Andere / Onbekend / Niet gedetecteerd"
559
 
560
- #: ../mods/useragent_module.php:43
561
  msgid "Show widget with all browsers?"
562
  msgstr "De widget tonen met alle browsers?"
563
 
564
- #: ../mods/useragent_module.php:47
565
  msgid "Browser detection is never 100% accurate."
566
  msgstr "Browser detectie is nooit 100% accuraat"
567
 
568
- #: ../mods/useragent_module.php:52
569
  msgid "Except the browser(s)"
570
  msgstr "Behalve de browser(s)"
571
 
572
- #: ../mods/custompost_module.php:107
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
573
  msgid "Custom Post Type"
574
  msgstr "Custom Post Type"
575
 
576
- #: ../mods/custompost_module.php:109
577
  msgid "Show widget on"
578
  msgstr "Toon de widget op"
579
 
580
- #: ../mods/custompost_module.php:124
581
- #: ../mods/custompost_module.php:167
 
 
 
 
 
582
  msgid "Except for"
583
  msgstr "Behalve voor"
584
 
585
- #: ../mods/custompost_module.php:159
586
- msgid "Custom Post Type Archives"
587
- msgstr "Custom Post Type Archief"
588
 
589
- #: ../mods/custompost_module.php:161
590
  msgid "Show widget on Custom Post Type Archives"
591
  msgstr "Toon de widget op de Custom Post Type archief pagina?"
592
 
593
- #: ../mods/date_module.php:31
 
 
 
 
 
 
 
 
594
  msgid "Show widget always?"
595
  msgstr "Altijd de widget tonen?"
596
 
597
- #: ../mods/date_module.php:35
598
  msgid "Next to the above role option, the date option is also very powerfull. You've been warned!"
599
  msgstr "Net zoals de bovenstaande opties, is de datum opties zeer bijzonder. U bent gewaarschuwd!"
600
 
601
- #: ../mods/date_module.php:36
602
  msgid "Enter dates in the YYYY-MM-DD format. You can also use the calender by clicking on the"
603
  msgstr "Voer datum in volgens hets JJJJ-MM-DD formaat. U kunt ook de kalander gebruiken door te klikken op"
604
 
605
- #: ../mods/date_module.php:37
606
  msgid ""
607
  "Date ranges can be made by entering a From AND a To date<br />\n"
608
  " \t\t\t\t\tWhen you want the widget to be displayed from a specific date, only fill in the From date<br />\n"
@@ -614,35 +731,35 @@ msgstr ""
614
  " \t\t\t\t\tWanneer u de widget vanaf een bepaalde datum niet meer wilt tonen, vul dan alleen de 'tot' datum in.\n"
615
  " \t\t\t\t"
616
 
617
- #: ../mods/date_module.php:44
618
  msgid "only"
619
  msgstr "alleen"
620
 
621
- #: ../mods/date_module.php:48
622
  msgid "From"
623
  msgstr "Van"
624
 
625
- #: ../mods/date_module.php:52
626
  msgid "To"
627
  msgstr "Tot"
628
 
629
- #: ../mods/wpec_module.php:39
630
  msgid "Show widget default on WPSC categories?"
631
  msgstr "Toon de widget standaard in de WPSC categoriën?"
632
 
633
- #: ../mods/wpml_module.php:37
634
  msgid "Language (WPML)"
635
  msgstr "Taal (WPML)"
636
 
637
- #: ../mods/wpml_module.php:39
638
  msgid "Show widget default on all languages?"
639
  msgstr "Toon de widget voor alle talen?"
640
 
641
- #: ../mods/wpml_module.php:43
642
  msgid "Using this option can override all other options."
643
  msgstr "Door gebruik te maken van deze opties kan deze alle andere opties overstijgen."
644
 
645
- #: ../mods/wpml_module.php:48
646
  msgid "Except the languages"
647
  msgstr "Behalve de talen"
648
 
2
  msgstr ""
3
  "Project-Id-Version: Dynamic Widgets NL\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2011-06-30 22:01+0100\n"
6
  "PO-Revision-Date: \n"
7
  "Last-Translator: Jacco\n"
8
  "Language-Team: \n"
12
  "X-Poedit-Language: Dutch\n"
13
  "X-Poedit-Country: NETHERLANDS\n"
14
 
15
+ #: ../dynwid_class_php4.php:157
16
+ #: ../dynwid_class.php:142
17
  msgid "Role"
18
  msgstr "Rol"
19
 
20
+ #: ../dynwid_class_php4.php:158
21
+ #: ../dynwid_class.php:143
22
  msgid "Date"
23
  msgstr "Datum"
24
 
25
+ #: ../dynwid_class_php4.php:159
26
+ #: ../dynwid_class.php:144
27
  msgid "Browser"
28
  msgstr "Browser"
29
 
30
+ #: ../dynwid_class_php4.php:160
31
+ #: ../dynwid_class.php:145
32
+ msgid "Templates"
33
+ msgstr "Sjablomen"
34
+
35
+ #: ../dynwid_class_php4.php:161
36
+ #: ../dynwid_class.php:146
37
  msgid "Language"
38
  msgstr "Taal"
39
 
40
+ #: ../dynwid_class_php4.php:162
41
+ #: ../dynwid_class.php:147
42
+ #: ../mods/frontpage_module.php:13
43
  msgid "Front Page"
44
  msgstr "Startpagina"
45
 
46
+ #: ../dynwid_class_php4.php:163
47
+ #: ../dynwid_class.php:148
48
+ #: ../mods/single_module.php:53
49
  msgid "Single Posts"
50
  msgstr "Berichten"
51
 
52
+ #: ../dynwid_class_php4.php:164
53
+ #: ../dynwid_class.php:149
54
+ #: ../mods/attachment_module.php:12
55
  msgid "Attachments"
56
  msgstr "Bijlagen"
57
 
58
+ #: ../dynwid_class_php4.php:165
59
+ #: ../dynwid_class.php:150
60
  msgid "Pages"
61
  msgstr "Pagina's"
62
 
63
+ #: ../dynwid_class_php4.php:166
64
+ #: ../dynwid_class.php:151
65
  msgid "Author Pages"
66
  msgstr "Auteur pagina's"
67
 
68
+ #: ../dynwid_class_php4.php:167
69
+ #: ../dynwid_class.php:152
70
+ #: ../mods/category_module.php:17
71
  msgid "Category Pages"
72
  msgstr "Categorie pagina's"
73
 
74
+ #: ../dynwid_class_php4.php:168
75
+ #: ../dynwid_class.php:153
76
+ #: ../mods/archive_module.php:12
77
  msgid "Archive Pages"
78
  msgstr "Archief pagina's"
79
 
80
+ #: ../dynwid_class_php4.php:169
81
+ #: ../dynwid_class.php:154
82
+ #: ../mods/error_module.php:12
83
  msgid "Error Page"
84
  msgstr "Foutmeldings pagina"
85
 
86
+ #: ../dynwid_class_php4.php:170
87
+ #: ../dynwid_class.php:155
88
  msgid "Search page"
89
  msgstr "Zoek pagina"
90
 
91
+ #: ../dynwid_class_php4.php:171
92
+ #: ../dynwid_class.php:156
93
  msgid "WPSC Category"
94
  msgstr "WPSC Categorie"
95
 
96
+ #: ../dynwid_class_php4.php:172
97
+ #: ../dynwid_class.php:157
98
+ msgid "Custom Post Type Archives"
99
+ msgstr "Custom Post Type Archief"
100
+
101
+ #: ../dynwid_class_php4.php:173
102
+ #: ../dynwid_class.php:158
103
+ msgid "BuddyPress"
104
+ msgstr "BuddyPress"
105
+
106
+ #: ../dynwid_class_php4.php:174
107
+ #: ../dynwid_class.php:159
108
+ msgid "BuddyPress Groups"
109
+ msgstr "BuddyPress Groepen"
110
+
111
+ #: ../dynwid_admin.php:19
112
+ #: ../dynamic-widgets.php:144
113
+ #: ../dynamic-widgets.php:167
114
+ #: ../dynamic-widgets.php:273
115
+ #: ../dynamic-widgets.php:672
116
  msgid "Dynamic Widgets"
117
  msgstr "Dynamische Widgets"
118
 
119
+ #: ../dynwid_admin.php:26
120
  msgid "<b>WARNING</b> STRICT sql mode in effect. Dynamic Widgets might not work correctly. Please disable STRICT sql mode."
121
  msgstr "<b>LET OP</b> STRICT sql mode gedecteerd. Dynamische Widgets werkt mogelijk niet correct. U wordt aangeraden STRICT sql mode uit te schakelen."
122
 
123
+ #: ../dynwid_admin.php:46
124
  msgid "Oops! Something went terrible wrong. Please reinstall Dynamic Widgets."
125
  msgstr "Oeps! Er is een onhelstelbare fout opgetreden. U wordt aangeraden om Dynamische Widgets opnieuw te installeren."
126
 
127
+ #: ../dynwid_admin.php:54
128
+ #: ../dynwid_admin_overview.php:20
129
  msgid "OLD"
130
  msgstr "OUD"
131
 
132
+ #: ../dynwid_admin.php:54
133
+ #: ../dynwid_admin_overview.php:20
134
  msgid "FILTER"
135
  msgstr "FILTER"
136
 
137
+ #: ../dynamic-widgets.php:152
138
  msgid "Widgets are always displayed by default"
139
  msgstr "Widgets worden standaard altijd getoond"
140
 
141
+ #: ../dynamic-widgets.php:152
142
  msgid "The '<em>Yes</em>' selection"
143
  msgstr "De '<em>Ja</em>' selectie"
144
 
145
+ #: ../dynamic-widgets.php:153
146
  msgid "Click on the"
147
  msgstr "Klik op de"
148
 
149
+ #: ../dynamic-widgets.php:153
150
  msgid "next to the options for more info"
151
  msgstr "bij de opties voor meer informatie"
152
 
153
+ #: ../dynamic-widgets.php:154
154
  msgid "The"
155
  msgstr "De"
156
 
157
+ #: ../dynamic-widgets.php:154
158
  msgid "next to a section means it has options set."
159
  msgstr "houdt in dat er opties gekozen zijn."
160
 
161
+ #: ../dynamic-widgets.php:156
162
+ #: ../dynamic-widgets.php:157
163
+ #: ../dynamic-widgets.php:160
164
+ #: ../dynamic-widgets.php:674
165
+ #: ../dynwid_admin_overview.php:85
166
  msgid "Static"
167
  msgstr "Statisch"
168
 
169
+ #: ../dynamic-widgets.php:156
170
+ #: ../dynamic-widgets.php:158
171
+ #: ../dynamic-widgets.php:674
172
+ #: ../dynwid_admin_overview.php:85
173
  msgid "Dynamic"
174
  msgstr "Dyamisch"
175
 
176
+ #: ../dynamic-widgets.php:157
177
  msgid "When a widget is"
178
  msgstr "Wanneer een widget"
179
 
180
+ #: ../dynamic-widgets.php:157
181
  msgid "the widget uses the WordPress default. In other words, it's shown everywhere"
182
  msgstr "de widget staat op de standaard instelling. Met andere woorden, deze wordt overal getoond"
183
 
184
+ #: ../dynamic-widgets.php:158
185
  msgid "A widget is"
186
  msgstr "Een widget is"
187
 
188
+ #: ../dynamic-widgets.php:158
189
  msgid "when there are options set, i.e. not showing on the front page."
190
  msgstr "als er opties gewijzigd zijn, bijvoorbeeld niet tonen op de startpagina."
191
 
192
+ #: ../dynamic-widgets.php:159
193
+ #: ../dynwid_admin_overview.php:79
194
  msgid "Reset"
195
  msgstr "Herstellen"
196
 
197
+ #: ../dynamic-widgets.php:160
198
  msgid "Reset makes the widget return to"
199
  msgstr "Herstellen zorgt ervoor dat de widget teruggezet wordt naar"
200
 
201
+ #: ../dynamic-widgets.php:226
202
  msgid "Settings"
203
  msgstr "Instellingen"
204
 
205
+ #: ../dynamic-widgets.php:240
206
  msgid "Apply exception rule to widgets:"
207
  msgstr "Maak uitzonderingsregel voor widget:"
208
 
209
+ #: ../dynamic-widgets.php:256
210
+ #: ../dynamic-widgets.php:290
211
  msgid "Off"
212
  msgstr "Uit"
213
 
214
+ #: ../dynamic-widgets.php:256
215
+ #: ../dynamic-widgets.php:290
216
  msgid "On"
217
  msgstr "Aan"
218
 
219
+ #: ../dynamic-widgets.php:257
220
  msgid " (Default: "
221
  msgstr "(Standaard"
222
 
223
+ #: ../dynamic-widgets.php:291
224
+ msgid "Default"
225
+ msgstr "Standaard"
226
+
227
+ #: ../dynamic-widgets.php:351
228
  msgid "Dynamic Widgets Options saved"
229
  msgstr "Dynamische Widget opties bewaard"
230
 
231
+ #: ../dynamic-widgets.php:352
232
  msgid "for"
233
  msgstr "voor"
234
 
235
+ #: ../dynamic-widgets.php:673
236
  msgid "Edit Dynamic Widgets Options"
237
  msgstr "Wijzig Dynamische Widget opties"
238
 
239
+ #: ../dynamic-widgets.php:698
240
  msgid "and"
241
  msgstr "en"
242
 
243
+ #: ../dynamic-widgets.php:704
244
  msgid "Options set for"
245
  msgstr "Opties voor"
246
 
247
+ #: ../dynamic-widgets.php:704
248
  msgid "Option set for"
249
  msgstr "Optie voor"
250
 
251
+ #: ../dynwid_admin_edit.php:108
252
  msgid "Widget options saved."
253
  msgstr "Widget opties bewaard"
254
 
255
+ #: ../dynwid_admin_edit.php:109
256
+ #: ../dynwid_admin_edit.php:183
257
  msgid "Return"
258
  msgstr "Terug"
259
 
260
+ #: ../dynwid_admin_edit.php:109
261
  msgid "to Dynamic Widgets overview"
262
  msgstr "naar Dynamische Widgets overzicht"
263
 
264
+ #: ../dynwid_admin_edit.php:113
265
  msgid "Dynamic does not mean static hiding of a widget."
266
  msgstr "Dynamisch houdt niet in het statisch verbergen van een widget."
267
 
268
+ #: ../dynwid_admin_edit.php:113
269
  msgid "Hint"
270
  msgstr "Hint"
271
 
272
+ #: ../dynwid_admin_edit.php:113
273
  msgid "Remove"
274
  msgstr "Verwijderen"
275
 
276
+ #: ../dynwid_admin_edit.php:113
277
  msgid "the widget from the sidebar"
278
  msgstr "de widget in de sidebar"
279
 
280
+ #: ../dynwid_admin_edit.php:118
281
  msgid "The From date can't be later than the To date."
282
  msgstr "The 'van' datum kan niet later zijn dan de 'tot' datum."
283
 
284
+ #: ../dynwid_admin_edit.php:124
285
  msgid "Edit options for the widget"
286
  msgstr "Wijzig de opties voor de widget"
287
 
288
+ #: ../dynwid_admin_edit.php:128
289
+ msgid "Quick settings"
290
+ msgstr "Snelle instellingen"
291
+
292
+ #: ../dynwid_admin_edit.php:130
293
+ msgid "Set all options to 'No'"
294
+ msgstr "Zet alle opties op 'Nee'"
295
+
296
+ #: ../dynwid_admin_edit.php:130
297
+ msgid "Except overriding options like Role, Date, etc."
298
+ msgstr "Behalve overstijgende opties zoals Rol, Datum, enz."
299
+
300
+ #: ../dynwid_admin_edit.php:179
301
+ #: ../dynwid_admin_overview.php:140
302
  msgid "Save"
303
  msgstr "Opslaan"
304
 
305
+ #: ../dynwid_admin_overview.php:20
 
 
 
 
306
  msgid "Method set to"
307
  msgstr "Methode is nu"
308
 
309
+ #: ../dynwid_admin_overview.php:28
310
+ msgid "Page limit set to"
311
+ msgstr "Pagina limiet staat nu op"
312
+
313
+ #: ../dynwid_admin_overview.php:31
314
+ msgid "ERROR"
315
+ msgstr "FOUT"
316
+
317
+ #: ../dynwid_admin_overview.php:31
318
+ msgid "is not a valid limit."
319
+ msgstr "is geen geldige limiet"
320
+
321
+ #: ../dynwid_admin_overview.php:40
322
+ msgid "Widget options have been reset to default."
323
+ msgstr "De widget opties zijn hersteld naar standaard"
324
+
325
+ #: ../dynwid_admin_overview.php:48
326
  msgid "Inactive Widgets"
327
  msgstr "Inactieve Widgets"
328
 
329
+ #: ../dynwid_admin_overview.php:71
330
+ #: ../dynwid_admin_overview.php:74
331
  msgid "Edit this widget options"
332
  msgstr "Wijzig de widget opties voor"
333
 
334
+ #: ../dynwid_admin_overview.php:74
335
  msgid "Edit"
336
  msgstr "Wijzig"
337
 
338
+ #: ../dynwid_admin_overview.php:79
339
  msgid "Reset widget to Static"
340
  msgstr "Zet de widget terug naar statisch"
341
 
342
+ #: ../dynwid_admin_overview.php:100
343
  msgid "Advanced"
344
  msgstr "Geavanceerd"
345
 
346
+ #: ../dynwid_admin_overview.php:105
347
  msgid "wp_head() check:"
348
  msgstr "wp_head() controle:"
349
 
350
+ #: ../dynwid_admin_overview.php:110
351
  msgid "wp_head() is NOT called (at the most obvious place)"
352
  msgstr "wp_head() is NIET gevonden (op de meest voor de hand liggende plaats)"
353
 
354
+ #: ../dynwid_admin_overview.php:114
355
  msgid "wp_head() is called"
356
  msgstr "wp_head() is gevonden"
357
 
358
+ #: ../dynwid_admin_overview.php:118
359
  msgid "Unable to determine if wp_head() is called"
360
  msgstr "Het is niet mogelijk om te bepalen of wp_head() gevonden kan worden"
361
 
362
+ #: ../dynwid_admin_overview.php:130
363
  msgid "Use 'OLD' method"
364
  msgstr "Gebruik 'OUDE' methode"
365
 
366
+ #: ../dynwid_admin_overview.php:140
367
+ msgid "Page limit"
368
+ msgstr "Pagina limiet"
369
+
370
+ #: ../dynwid_admin_overview.php:142
371
+ msgid "The page limit sets the limit of number of pages to prevent a timeout when building the hierarchical tree. When the number of pages is above this limit, a flat list will be displayed which is less time consuming."
372
+ msgstr "De pagina limiet stelt de limiet in van het aantal pagina's om een timeout te voorkomen tijdens het opbouwen van de hierarchiesche boom. Wanneer het aantal pagina's boven de li miet uitkomt zal er een platte lijst getoond worden die minder tijdrovend is."
373
+
374
+ #: ../dynwid_admin_overview.php:144
375
+ msgid "Currently the number of pages is"
376
+ msgstr "Momenteel is het aantal pagina's"
377
+
378
+ #: ../dynwid_admin_overview.php:151
379
  msgid "When upgrading to WPEC 3.8 the Dynamic Widgets rules for WPEC are lost. The WPEC dump gives you an overview of the rules before the update."
380
  msgstr "Wanneer u upgrade naar WPEC 3.8 dan zullen de Dynamische Widget regels voor WPEC verloren gaan. De WPEC dump geeft u een overzicht van de regels voor de update."
381
 
382
+ #: ../dynwid_admin_overview.php:152
383
  msgid "WARNING"
384
  msgstr "WAARSCHUWING"
385
 
386
+ #: ../dynwid_admin_overview.php:152
387
  msgid "This only works correct when you did not add or change anything in the Dynamic Widgets rules."
388
  msgstr "Dit werkt alleen correct als u geen Dyamische Widget regels toegevoegd of verwijderd heeft."
389
 
390
+ #: ../dynwid_admin_overview.php:157
391
  msgid "Create WPEC dump"
392
  msgstr "Maak WPEC dump"
393
 
394
+ #: ../dynwid_admin_overview.php:164
395
  msgid "For debugging purposes it is possible you're asked to create a dump. Click the 'Create dump' button and save the text file."
396
  msgstr "Voor foutopsporing is het mogelijk dat u gevraagd wordt om een dump te maken. Klik de 'Dump maken' knop en sla het tekst bestand op."
397
 
398
+ #: ../dynwid_admin_overview.php:169
399
  msgid "Create dump"
400
  msgstr "Dump maken"
401
 
402
+ #: ../dynwid_admin_overview.php:176
403
  msgid "When you deceide not to use this plugin anymore (sorry to hear that!). You can cleanup all settings and data related to this plugin by clicking on the 'Uninstall' button. This process is irreversible! After the cleanup the plugin is deactivated automaticly."
404
  msgstr "Wanneer u besluit om deze plugin niet meer te gebruiken (erg jammer!), kunt u alle instellingen en andere data van deze plugin verwijderen door op de 'Deinstalleer' knop te drukken. Dit proces is onomkeerbaar! Na het verwijderen zal de plugin automatisch uitgeschakeld worden."
405
 
406
+ #: ../dynwid_admin_overview.php:181
407
  msgid "Uninstall"
408
  msgstr "Deinstalleer"
409
 
410
+ #: ../mods/search_module.php:13
411
  msgid "Search Page"
412
  msgstr "Zoek pagina"
413
 
414
+ #: ../mods/search_module.php:15
415
  msgid "Show widget on the search page?"
416
  msgstr "Toon de widget op de zoekpagina?"
417
 
418
+ #: ../mods/search_module.php:17
419
+ #: ../mods/category_module.php:21
420
+ #: ../mods/single_module.php:64
421
+ #: ../mods/attachment_module.php:16
422
+ #: ../mods/error_module.php:16
423
+ #: ../mods/frontpage_module.php:24
424
+ #: ../mods/archive_module.php:21
425
  msgid "Yes"
426
  msgstr "Ja"
427
 
428
+ #: ../mods/search_module.php:18
429
+ #: ../mods/category_module.php:22
430
+ #: ../mods/single_module.php:65
431
+ #: ../mods/attachment_module.php:17
432
+ #: ../mods/error_module.php:17
433
+ #: ../mods/frontpage_module.php:25
434
+ #: ../mods/archive_module.php:22
435
  msgid "No"
436
  msgstr "Nee"
437
 
438
+ #: ../mods/category_module.php:19
439
  msgid "Show widget default on category pages?"
440
  msgstr "Toon de widget standaard op de categorie pagina's?"
441
 
442
+ #: ../mods/category_module.php:23
443
  msgid "Except the categories"
444
  msgstr "Behalve de categoriën"
445
 
446
+ #: ../mods/single_module.php:47
447
  msgid "Posts: "
448
  msgstr "Posts:"
449
 
450
+ #: ../mods/single_module.php:47
451
  msgid "Tags: "
452
  msgstr "Tags:"
453
 
454
+ #: ../mods/single_module.php:55
455
  msgid "Show widget default on single posts?"
456
  msgstr "De widget bij de berichten tonen?"
457
 
458
+ #: ../mods/single_module.php:55
459
+ #: ../mods/single_module.php:69
460
+ #: ../mods/archive_module.php:14
461
  msgid "Click to toggle info"
462
  msgstr "Klik om info weer te geven of te verbergen"
463
 
464
+ #: ../mods/single_module.php:59
465
  msgid ""
466
  "When you use an author <b>AND</b> a category exception, both rules in the condition must be met. Otherwise the exception rule won't be applied.\n"
467
  " \t\t\t\t\tIf you want to use the rules in a logical OR condition. Add the same widget again and apply the other rule to that.\n"
471
  " \t\t\t\t\tAls u de regels in een logische OR wilt gebruiken kunt u de widget opnieuw toevoegen en daarop dan de andere regel toepassen.\n"
472
  " \t\t\t\t\t"
473
 
474
+ #: ../mods/single_module.php:68
475
  msgid "Make exception rule available to individual posts and tags."
476
  msgstr "Maak de uitzonderings regel beschikbaar voor individuele berichten en tags"
477
 
478
+ #: ../mods/single_module.php:72
479
  msgid ""
480
  "When you enable this option, you have the ability to apply the exception rule for <em>Single Posts</em> to tags and individual posts.\n"
481
  "\t\t\t\t\t\tYou can set the exception rule for tags in the single Edit Tag Panel (go to <a href=\"edit-tags.php?taxonomy=post_tag\">Post Tags</a>,\n"
491
  " \t\t\t\t\tLet er op dat uitzonderings regels voor auteur en categorie worden verwijderd.\n"
492
  " \t\t\t\t"
493
 
494
+ #: ../mods/single_module.php:89
495
  msgid "Except the posts by author"
496
  msgstr "Behalve de berichten van"
497
 
498
+ #: ../mods/single_module.php:100
499
  msgid "Except the posts in category"
500
  msgstr "Behalve de berichten in de categorie"
501
 
502
+ #: ../mods/attachment_module.php:14
503
  msgid "Show widget on attachment pages"
504
  msgstr "Toon de widget op bijlage pagina's"
505
 
506
+ #: ../mods/error_module.php:14
507
  msgid "Show widget on the error page?"
508
  msgstr "Toon de widget op de foutmeldings pagina?"
509
 
510
+ #: ../mods/frontpage_module.php:15
511
  msgid "Show widget on the front page?"
512
  msgstr "De widget op de startpagina tonen?"
513
 
514
+ #: ../mods/frontpage_module.php:19
515
  msgid ""
516
  "This option only applies when your front page is set to display your latest posts (See Settings &gt; Reading).<br />\n"
517
  "\t\t\t\t\t\tWhen a static page is set, you can use the options for the static pages below.\n"
521
  "\t\t\t\t\t\tWanneer deze optie op statische pagina staat, kunt u gebruik maken van de onderstaande pagina opties.\n"
522
  "\t\t\t\t\t"
523
 
524
+ #: ../mods/archive_module.php:14
525
  msgid "Show widget on archive pages"
526
  msgstr "Toon de widget op archief pagina's"
527
 
528
+ #: ../mods/archive_module.php:18
529
  msgid "This option does not include Author and Category Pages."
530
  msgstr "Deze optie bevat niet auteurs en categorie pagina's"
531
 
532
+ #: ../mods/pages_module.php:14
533
+ msgid "The static page module failed to load."
534
+ msgstr "The statische pagina module kon niet geladen worden."
535
+
536
+ #: ../mods/pages_module.php:16
537
+ msgid "This is probably because building the hierarchical tree took too long.<br />Decrease the limit of number of pages in the advanced settings."
538
+ msgstr "Dit komt waarschijnlijk doordat het opbouwen van de hierarchiesche boom te lang duurde.<br />Verlaag de limiet van het aantal pagina's in de geavanceerde instellingen."
539
+
540
+ #: ../mods/pages_module.php:43
541
  #: ../mods/custompost_module.php:45
542
  msgid "All childs"
543
  msgstr "Alle kinderen"
544
 
545
+ #: ../mods/pages_module.php:81
546
+ #: ../mods/pages_module.php:84
547
  msgid "Front page"
548
  msgstr "Startpagina"
549
 
550
+ #: ../mods/pages_module.php:81
551
+ #: ../mods/pages_module.php:86
552
  msgid "Posts page"
553
  msgstr "Posts pagina"
554
 
555
+ #: ../mods/pages_module.php:92
556
  msgid "Show widget default on static pages?"
557
  msgstr "Toon de widget op pagina's?"
558
 
559
+ #: ../mods/pages_module.php:98
560
+ #, fuzzy
561
  msgid ""
562
  "Checking the \"All childs\" option, makes the exception rule apply\n"
563
+ "\t\t\t\t\tto the parent and all items under it in all levels. Also future items\n"
564
+ "\t\t\t\t\tunder the parent. It's not possible to apply an exception rule to\n"
565
+ "\t\t\t\t\t\"All childs\" without the parent."
566
  msgstr "Door gebruik te maken van de \"Alle kinderen\" optie, wordt de uitzonderingsregel toegepast op de ouder en alle daaronder liggende item in alle levels. Ook toekomstige items onder de ouder. Het is niet mogelijk om de uitzonderingsregel toe te passen zonder de ouder."
567
 
568
+ #: ../mods/pages_module.php:103
569
+ msgid ""
570
+ "Unfortunately the childs-function has been disabled\n"
571
+ "\t\t\t\t\tbecause you have more than 500 pages."
572
+ msgstr "Helaas is de kind-optie uitgeschakeldomdat er meer dan 500 pagina's geregistreerd zijn."
573
+
574
+ #: ../mods/pages_module.php:113
575
  msgid "Except the page(s)"
576
  msgstr "Behalve de pagina('s)"
577
 
578
+ #: ../mods/author_module.php:19
579
  msgid "Show widget default on author pages?"
580
  msgstr "Toon de widget op auteurs pagina's?"
581
 
582
+ #: ../mods/author_module.php:23
583
  msgid "Except the author(s)"
584
  msgstr "Behalve van"
585
 
 
 
 
 
586
  #: ../mods/bp_module.php:53
587
  msgid "Show widget default on BuddyPress pages?"
588
  msgstr "Toon de widget op BuddyPress pagina's?"
589
 
590
  #: ../mods/bp_module.php:57
591
+ #, fuzzy
592
+ msgid "Except on the components pages"
593
  msgstr "Behalve op de componenten pagina's"
594
 
595
+ #: ../mods/bp_module.php:76
596
+ msgid "Forum Index"
597
+ msgstr "Forum-overzicht"
598
 
599
+ #: ../mods/bp_module.php:77
600
+ msgid "Forum Topics"
601
+ msgstr "Forum onderwerpen"
602
+
603
+ #: ../mods/bp_module.php:78
604
+ msgid "Members Index"
605
+ msgstr "Gebruikersoverzicht"
606
+
607
+ #: ../mods/bp_module.php:83
608
  msgid "Show widget default on BuddyPress Group pages?"
609
  msgstr "Toon de widget op BuddyPress Groep pagina's?"
610
 
611
+ #: ../mods/bp_module.php:90
612
  msgid "Except in the groups"
613
  msgstr "Behalve in de groepen"
614
 
615
+ #: ../mods/bp_module.php:99
616
+ #, fuzzy
617
+ msgid "Except in the group pages"
618
+ msgstr "Behalve in de groepen"
619
+
620
  #: ../mods/role_module.php:10
621
  msgid "Anonymous"
622
  msgstr "Anoniem"
623
 
624
+ #: ../mods/role_module.php:25
625
  msgid "Show widget to everybody?"
626
  msgstr "Toon de widget aan iedereen?"
627
 
628
+ #: ../mods/role_module.php:29
629
  msgid ""
630
  "Setting options by role is very powerfull. It can override all other options!<br />\n"
631
  "\t\t\t\t\t\tUsers who are not logged in, get the <em>Anonymous</em> role."
633
  "De rol opties zijn zeer bijzonder. Ze kunnen alle andere opties overstijgen!<br />\n"
634
  "\t\t\t\t\t\tGebruikers die niet ingelogd zijn, krijgen de <em>anonieme</em> rol."
635
 
636
+ #: ../mods/role_module.php:34
637
  msgid "only to"
638
  msgstr "alleen aan"
639
 
641
  msgid "(and other Gecko based)"
642
  msgstr "(en andere op Gecko gebaseerd)"
643
 
644
+ #: ../mods/useragent_module.php:17
645
  msgid "Other / Unknown / Not detected"
646
  msgstr "Andere / Onbekend / Niet gedetecteerd"
647
 
648
+ #: ../mods/useragent_module.php:28
649
  msgid "Show widget with all browsers?"
650
  msgstr "De widget tonen met alle browsers?"
651
 
652
+ #: ../mods/useragent_module.php:32
653
  msgid "Browser detection is never 100% accurate."
654
  msgstr "Browser detectie is nooit 100% accuraat"
655
 
656
+ #: ../mods/useragent_module.php:37
657
  msgid "Except the browser(s)"
658
  msgstr "Behalve de browser(s)"
659
 
660
+ #: ../mods/tpl_module.php:23
661
+ msgid "Show widget on every template?"
662
+ msgstr "Toon de widget in alle sjablomen?"
663
+
664
+ #: ../mods/tpl_module.php:27
665
+ msgid "This options takes precedence above other options like Pages and/or Single Posts."
666
+ msgstr "Deze opties hebben voorrang op de andere opties zoals Pagina's en Posts."
667
+
668
+ #: ../mods/tpl_module.php:32
669
+ msgid "Except the templates"
670
+ msgstr "Behalve in de sjablomen"
671
+
672
+ #: ../mods/tpl_module.php:34
673
+ msgid "Default Template"
674
+ msgstr "Standaard sjabloom"
675
+
676
+ #: ../mods/custompost_module.php:81
677
  msgid "Custom Post Type"
678
  msgstr "Custom Post Type"
679
 
680
+ #: ../mods/custompost_module.php:83
681
  msgid "Show widget on"
682
  msgstr "Toon de widget op"
683
 
684
+ #: ../mods/custompost_module.php:90
685
+ msgid "All exceptions (Titles and Taxonomies) work in a logical OR condition. That means when one of the exceptions is met, the exception rule is applied."
686
+ msgstr "Alle uitzonderingen (titels en taxonomy) werken onafhankelijk van elkaar in een zgn. logische OR conditie. Dit houdt in dat wanneer een uitzondering voorkomt, de regel wordt toegepast."
687
+
688
+ #: ../mods/custompost_module.php:97
689
+ #: ../mods/custompost_module.php:160
690
+ #: ../mods/custompost_module.php:193
691
  msgid "Except for"
692
  msgstr "Behalve voor"
693
 
694
+ #: ../mods/custompost_module.php:117
695
+ msgid "Except for Custom Taxonomy"
696
+ msgstr "Behalve voor Custom Taxonomy"
697
 
698
+ #: ../mods/custompost_module.php:154
699
  msgid "Show widget on Custom Post Type Archives"
700
  msgstr "Toon de widget op de Custom Post Type archief pagina?"
701
 
702
+ #: ../mods/custompost_module.php:183
703
+ msgid "Custom Taxonomy Archive"
704
+ msgstr "Custom Taxonomy Archief"
705
+
706
+ #: ../mods/custompost_module.php:185
707
+ msgid "Show widget on Custom Taxonomy Archive"
708
+ msgstr "Toon de widget op de Custom Taxonomy archief pagina?"
709
+
710
+ #: ../mods/date_module.php:32
711
  msgid "Show widget always?"
712
  msgstr "Altijd de widget tonen?"
713
 
714
+ #: ../mods/date_module.php:36
715
  msgid "Next to the above role option, the date option is also very powerfull. You've been warned!"
716
  msgstr "Net zoals de bovenstaande opties, is de datum opties zeer bijzonder. U bent gewaarschuwd!"
717
 
718
+ #: ../mods/date_module.php:37
719
  msgid "Enter dates in the YYYY-MM-DD format. You can also use the calender by clicking on the"
720
  msgstr "Voer datum in volgens hets JJJJ-MM-DD formaat. U kunt ook de kalander gebruiken door te klikken op"
721
 
722
+ #: ../mods/date_module.php:38
723
  msgid ""
724
  "Date ranges can be made by entering a From AND a To date<br />\n"
725
  " \t\t\t\t\tWhen you want the widget to be displayed from a specific date, only fill in the From date<br />\n"
731
  " \t\t\t\t\tWanneer u de widget vanaf een bepaalde datum niet meer wilt tonen, vul dan alleen de 'tot' datum in.\n"
732
  " \t\t\t\t"
733
 
734
+ #: ../mods/date_module.php:45
735
  msgid "only"
736
  msgstr "alleen"
737
 
738
+ #: ../mods/date_module.php:49
739
  msgid "From"
740
  msgstr "Van"
741
 
742
+ #: ../mods/date_module.php:53
743
  msgid "To"
744
  msgstr "Tot"
745
 
746
+ #: ../mods/wpec_module.php:23
747
  msgid "Show widget default on WPSC categories?"
748
  msgstr "Toon de widget standaard in de WPSC categoriën?"
749
 
750
+ #: ../mods/wpml_module.php:16
751
  msgid "Language (WPML)"
752
  msgstr "Taal (WPML)"
753
 
754
+ #: ../mods/wpml_module.php:18
755
  msgid "Show widget default on all languages?"
756
  msgstr "Toon de widget voor alle talen?"
757
 
758
+ #: ../mods/wpml_module.php:22
759
  msgid "Using this option can override all other options."
760
  msgstr "Door gebruik te maken van deze opties kan deze alle andere opties overstijgen."
761
 
762
+ #: ../mods/wpml_module.php:27
763
  msgid "Except the languages"
764
  msgstr "Behalve de talen"
765
 
locale/dynamic-widgets.pot CHANGED
@@ -2,8 +2,8 @@ msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Dynamic Widgets\n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2011-01-29 23:19+0100\n"
6
- "PO-Revision-Date: 2011-01-29 23:20+0100\n"
7
  "Last-Translator: Jacco\n"
8
  "Language-Team: \n"
9
  "MIME-Version: 1.0\n"
@@ -16,411 +16,474 @@ msgstr ""
16
  "X-Poedit-SearchPath-0: ..\n"
17
 
18
  # WordPress MO
19
- #: ../dynwid_class_php4.php:58
20
- #: ../dynwid_class.php:52
21
  msgid "Role"
22
  msgstr ""
23
 
24
  # WordPress MO
25
- #: ../dynwid_class_php4.php:59
26
- #: ../dynwid_class.php:53
27
  msgid "Date"
28
  msgstr ""
29
 
30
- #: ../dynwid_class_php4.php:60
31
- #: ../dynwid_class.php:54
32
  msgid "Browser"
33
  msgstr ""
34
 
35
- #: ../dynwid_class_php4.php:61
36
- #: ../dynwid_class.php:55
 
 
 
 
 
37
  msgid "Language"
38
  msgstr ""
39
 
40
- #: ../dynwid_class_php4.php:62
41
- #: ../dynwid_class.php:56
42
- #: ../mods/frontpage_module.php:20
43
  msgid "Front Page"
44
  msgstr ""
45
 
46
- #: ../dynwid_class_php4.php:63
47
- #: ../dynwid_class.php:57
48
- #: ../mods/single_module.php:80
49
  msgid "Single Posts"
50
  msgstr ""
51
 
52
- #: ../dynwid_class_php4.php:64
53
- #: ../dynwid_class.php:58
54
- #: ../mods/attachment_module.php:20
55
  msgid "Attachments"
56
  msgstr ""
57
 
58
  # WordPress MO
59
- #: ../dynwid_class_php4.php:65
60
- #: ../dynwid_class.php:59
61
  msgid "Pages"
62
  msgstr ""
63
 
64
- #: ../dynwid_class_php4.php:66
65
- #: ../dynwid_class.php:60
66
  msgid "Author Pages"
67
  msgstr ""
68
 
69
- #: ../dynwid_class_php4.php:67
70
- #: ../dynwid_class.php:61
71
- #: ../mods/category_module.php:33
72
  msgid "Category Pages"
73
  msgstr ""
74
 
75
- #: ../dynwid_class_php4.php:68
76
- #: ../dynwid_class.php:62
77
- #: ../mods/archive_module.php:20
78
  msgid "Archive Pages"
79
  msgstr ""
80
 
81
- #: ../dynwid_class_php4.php:69
82
- #: ../dynwid_class.php:63
83
- #: ../mods/error_module.php:20
84
  msgid "Error Page"
85
  msgstr ""
86
 
87
- #: ../dynwid_class_php4.php:70
88
- #: ../dynwid_class.php:64
89
  msgid "Search page"
90
  msgstr ""
91
 
92
- #: ../dynwid_class_php4.php:71
93
- #: ../dynwid_class.php:65
94
  msgid "WPSC Category"
95
  msgstr ""
96
 
97
- #: ../dynwid_admin.php:18
98
- #: ../dynamic-widgets.php:125
99
- #: ../dynamic-widgets.php:148
100
- #: ../dynamic-widgets.php:247
101
- #: ../dynamic-widgets.php:647
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
102
  msgid "Dynamic Widgets"
103
  msgstr ""
104
 
105
- #: ../dynwid_admin.php:25
106
  msgid "<b>WARNING</b> STRICT sql mode in effect. Dynamic Widgets might not work correctly. Please disable STRICT sql mode."
107
  msgstr ""
108
 
109
- #: ../dynwid_admin.php:45
110
  msgid "Oops! Something went terrible wrong. Please reinstall Dynamic Widgets."
111
  msgstr ""
112
 
113
- #: ../dynwid_admin.php:53
114
- #: ../dynwid_admin_overview.php:28
115
  msgid "OLD"
116
  msgstr ""
117
 
118
- #: ../dynwid_admin.php:53
119
- #: ../dynwid_admin_overview.php:28
120
  msgid "FILTER"
121
  msgstr ""
122
 
123
- #: ../dynamic-widgets.php:133
124
  msgid "Widgets are always displayed by default"
125
  msgstr ""
126
 
127
- #: ../dynamic-widgets.php:133
128
  msgid "The '<em>Yes</em>' selection"
129
  msgstr ""
130
 
131
- #: ../dynamic-widgets.php:134
132
  msgid "Click on the"
133
  msgstr ""
134
 
135
- #: ../dynamic-widgets.php:134
136
  msgid "next to the options for more info"
137
  msgstr ""
138
 
139
- #: ../dynamic-widgets.php:135
140
  msgid "The"
141
  msgstr ""
142
 
143
- #: ../dynamic-widgets.php:135
144
  msgid "next to a section means it has options set."
145
  msgstr ""
146
 
147
- #: ../dynamic-widgets.php:137
148
- #: ../dynamic-widgets.php:138
149
- #: ../dynamic-widgets.php:141
150
- #: ../dynamic-widgets.php:649
151
- #: ../dynwid_admin_overview.php:73
152
  msgid "Static"
153
  msgstr ""
154
 
155
- #: ../dynamic-widgets.php:137
156
- #: ../dynamic-widgets.php:139
157
- #: ../dynamic-widgets.php:649
158
- #: ../dynwid_admin_overview.php:73
159
  msgid "Dynamic"
160
  msgstr ""
161
 
162
- #: ../dynamic-widgets.php:138
163
  msgid "When a widget is"
164
  msgstr ""
165
 
166
- #: ../dynamic-widgets.php:138
167
  msgid "the widget uses the WordPress default. In other words, it's shown everywhere"
168
  msgstr ""
169
 
170
- #: ../dynamic-widgets.php:139
171
  msgid "A widget is"
172
  msgstr ""
173
 
174
- #: ../dynamic-widgets.php:139
175
  msgid "when there are options set, i.e. not showing on the front page."
176
  msgstr ""
177
 
178
- #: ../dynamic-widgets.php:140
179
- #: ../dynwid_admin_overview.php:67
180
  msgid "Reset"
181
  msgstr ""
182
 
183
- #: ../dynamic-widgets.php:141
184
  msgid "Reset makes the widget return to"
185
  msgstr ""
186
 
187
  # WordPress MO
188
- #: ../dynamic-widgets.php:200
189
  msgid "Settings"
190
  msgstr ""
191
 
192
- #: ../dynamic-widgets.php:214
193
  msgid "Apply exception rule to widgets:"
194
  msgstr ""
195
 
196
- #: ../dynamic-widgets.php:230
 
197
  msgid "Off"
198
  msgstr ""
199
 
200
- #: ../dynamic-widgets.php:230
 
201
  msgid "On"
202
  msgstr ""
203
 
204
- #: ../dynamic-widgets.php:231
205
  msgid " (Default: "
206
  msgstr ""
207
 
208
- #: ../dynamic-widgets.php:328
 
 
 
 
209
  msgid "Dynamic Widgets Options saved"
210
  msgstr ""
211
 
212
- #: ../dynamic-widgets.php:328
213
  msgid "for"
214
  msgstr ""
215
 
216
- #: ../dynamic-widgets.php:648
217
  msgid "Edit Dynamic Widgets Options"
218
  msgstr ""
219
 
220
- #: ../dynamic-widgets.php:673
221
  msgid "and"
222
  msgstr ""
223
 
224
- #: ../dynamic-widgets.php:679
225
  msgid "Options set for"
226
  msgstr ""
227
 
228
- #: ../dynamic-widgets.php:679
229
  msgid "Option set for"
230
  msgstr ""
231
 
232
- #: ../dynwid_admin_edit.php:60
233
  msgid "Widget options saved."
234
  msgstr ""
235
 
236
- #: ../dynwid_admin_edit.php:60
237
- #: ../dynwid_admin_edit.php:120
238
  msgid "Return"
239
  msgstr ""
240
 
241
- #: ../dynwid_admin_edit.php:60
242
  msgid "to Dynamic Widgets overview"
243
  msgstr ""
244
 
245
- #: ../dynwid_admin_edit.php:65
246
  msgid "Dynamic does not mean static hiding of a widget."
247
  msgstr ""
248
 
249
- #: ../dynwid_admin_edit.php:65
250
  msgid "Hint"
251
  msgstr ""
252
 
253
- #: ../dynwid_admin_edit.php:65
254
  msgid "Remove"
255
  msgstr ""
256
 
257
- #: ../dynwid_admin_edit.php:65
258
  msgid "the widget from the sidebar"
259
  msgstr ""
260
 
261
- #: ../dynwid_admin_edit.php:69
262
  msgid "The From date can't be later than the To date."
263
  msgstr ""
264
 
265
- #: ../dynwid_admin_edit.php:74
266
  msgid "Edit options for the widget"
267
  msgstr ""
268
 
 
 
 
 
 
 
 
 
 
 
 
 
269
  # WordPress MO
270
- #: ../dynwid_admin_edit.php:116
 
271
  msgid "Save"
272
  msgstr ""
273
 
274
- #: ../dynwid_admin_overview.php:15
275
- msgid "Widget options have been reset to default."
276
  msgstr ""
277
 
278
  #: ../dynwid_admin_overview.php:28
279
- msgid "Method set to"
 
 
 
 
 
 
 
 
 
 
 
 
280
  msgstr ""
281
 
282
- #: ../dynwid_admin_overview.php:36
283
  msgid "Inactive Widgets"
284
  msgstr ""
285
 
286
- #: ../dynwid_admin_overview.php:59
287
- #: ../dynwid_admin_overview.php:62
288
  msgid "Edit this widget options"
289
  msgstr ""
290
 
291
  # WordPress MO
292
- #: ../dynwid_admin_overview.php:62
293
  msgid "Edit"
294
  msgstr ""
295
 
296
- #: ../dynwid_admin_overview.php:67
297
  msgid "Reset widget to Static"
298
  msgstr ""
299
 
300
- #: ../dynwid_admin_overview.php:88
301
  msgid "Advanced"
302
  msgstr ""
303
 
304
- #: ../dynwid_admin_overview.php:93
305
  msgid "wp_head() check:"
306
  msgstr ""
307
 
308
- #: ../dynwid_admin_overview.php:98
309
  msgid "wp_head() is NOT called (at the most obvious place)"
310
  msgstr ""
311
 
312
- #: ../dynwid_admin_overview.php:102
313
  msgid "wp_head() is called"
314
  msgstr ""
315
 
316
- #: ../dynwid_admin_overview.php:106
317
  msgid "Unable to determine if wp_head() is called"
318
  msgstr ""
319
 
320
- #: ../dynwid_admin_overview.php:118
321
  msgid "Use 'OLD' method"
322
  msgstr ""
323
 
324
- #: ../dynwid_admin_overview.php:124
 
 
 
 
 
 
 
 
 
 
 
 
325
  msgid "When upgrading to WPEC 3.8 the Dynamic Widgets rules for WPEC are lost. The WPEC dump gives you an overview of the rules before the update."
326
  msgstr ""
327
 
328
- #: ../dynwid_admin_overview.php:125
329
  msgid "WARNING"
330
  msgstr ""
331
 
332
- #: ../dynwid_admin_overview.php:125
333
  msgid "This only works correct when you did not add or change anything in the Dynamic Widgets rules."
334
  msgstr ""
335
 
336
- #: ../dynwid_admin_overview.php:130
337
  msgid "Create WPEC dump"
338
  msgstr ""
339
 
340
- #: ../dynwid_admin_overview.php:137
341
  msgid "For debugging purposes it is possible you're asked to create a dump. Click the 'Create dump' button and save the text file."
342
  msgstr ""
343
 
344
- #: ../dynwid_admin_overview.php:142
345
  msgid "Create dump"
346
  msgstr ""
347
 
348
- #: ../dynwid_admin_overview.php:149
349
  msgid "When you deceide not to use this plugin anymore (sorry to hear that!). You can cleanup all settings and data related to this plugin by clicking on the 'Uninstall' button. This process is irreversible! After the cleanup the plugin is deactivated automaticly."
350
  msgstr ""
351
 
352
- #: ../dynwid_admin_overview.php:154
353
  msgid "Uninstall"
354
  msgstr ""
355
 
356
- #: ../mods/search_module.php:21
357
  msgid "Search Page"
358
  msgstr ""
359
 
360
- #: ../mods/search_module.php:23
361
  msgid "Show widget on the search page?"
362
  msgstr ""
363
 
364
  # WordPress MO
365
- #: ../mods/search_module.php:25
366
- #: ../mods/category_module.php:37
367
- #: ../mods/single_module.php:91
368
- #: ../mods/attachment_module.php:24
369
- #: ../mods/error_module.php:24
370
- #: ../mods/frontpage_module.php:31
371
- #: ../mods/archive_module.php:29
372
  msgid "Yes"
373
  msgstr ""
374
 
375
  # WordPress MO
376
- #: ../mods/search_module.php:26
377
- #: ../mods/category_module.php:38
378
- #: ../mods/single_module.php:92
379
- #: ../mods/attachment_module.php:25
380
- #: ../mods/error_module.php:25
381
- #: ../mods/frontpage_module.php:32
382
- #: ../mods/archive_module.php:30
383
  msgid "No"
384
  msgstr ""
385
 
386
- #: ../mods/category_module.php:35
387
  msgid "Show widget default on category pages?"
388
  msgstr ""
389
 
390
- #: ../mods/category_module.php:39
391
  msgid "Except the categories"
392
  msgstr ""
393
 
394
- #: ../mods/single_module.php:75
395
  msgid "Posts: "
396
  msgstr ""
397
 
398
- #: ../mods/single_module.php:75
399
  msgid "Tags: "
400
  msgstr ""
401
 
402
- #: ../mods/single_module.php:82
403
  msgid "Show widget default on single posts?"
404
  msgstr ""
405
 
406
- #: ../mods/single_module.php:82
407
- #: ../mods/single_module.php:96
408
- #: ../mods/archive_module.php:22
409
  msgid "Click to toggle info"
410
  msgstr ""
411
 
412
- #: ../mods/single_module.php:86
413
  msgid ""
414
  "When you use an author <b>AND</b> a category exception, both rules in the condition must be met. Otherwise the exception rule won't be applied.\n"
415
  " \t\t\t\t\tIf you want to use the rules in a logical OR condition. Add the same widget again and apply the other rule to that.\n"
416
  " \t\t\t\t\t"
417
  msgstr ""
418
 
419
- #: ../mods/single_module.php:95
420
  msgid "Make exception rule available to individual posts and tags."
421
  msgstr ""
422
 
423
- #: ../mods/single_module.php:99
424
  msgid ""
425
  "When you enable this option, you have the ability to apply the exception rule for <em>Single Posts</em> to tags and individual posts.\n"
426
  "\t\t\t\t\t\tYou can set the exception rule for tags in the single Edit Tag Panel (go to <a href=\"edit-tags.php?taxonomy=post_tag\">Post Tags</a>,\n"
@@ -430,120 +493,142 @@ msgid ""
430
  " \t\t\t\t"
431
  msgstr ""
432
 
433
- #: ../mods/single_module.php:116
434
  msgid "Except the posts by author"
435
  msgstr ""
436
 
437
- #: ../mods/single_module.php:127
438
  msgid "Except the posts in category"
439
  msgstr ""
440
 
441
- #: ../mods/attachment_module.php:22
442
  msgid "Show widget on attachment pages"
443
  msgstr ""
444
 
445
- #: ../mods/error_module.php:22
446
  msgid "Show widget on the error page?"
447
  msgstr ""
448
 
449
- #: ../mods/frontpage_module.php:22
450
  msgid "Show widget on the front page?"
451
  msgstr ""
452
 
453
- #: ../mods/frontpage_module.php:26
454
  msgid ""
455
  "This option only applies when your front page is set to display your latest posts (See Settings &gt; Reading).<br />\n"
456
  "\t\t\t\t\t\tWhen a static page is set, you can use the options for the static pages below.\n"
457
  "\t\t\t\t\t"
458
  msgstr ""
459
 
460
- #: ../mods/archive_module.php:22
461
  msgid "Show widget on archive pages"
462
  msgstr ""
463
 
464
- #: ../mods/archive_module.php:26
465
  msgid "This option does not include Author and Category Pages."
466
  msgstr ""
467
 
468
- #: ../mods/pages_module.php:42
 
 
 
 
 
 
 
 
469
  #: ../mods/custompost_module.php:45
470
  msgid "All childs"
471
  msgstr ""
472
 
473
- #: ../mods/pages_module.php:92
474
- #: ../mods/pages_module.php:95
475
  msgid "Front page"
476
  msgstr ""
477
 
478
- #: ../mods/pages_module.php:92
479
- #: ../mods/pages_module.php:97
480
  msgid "Posts page"
481
  msgstr ""
482
 
483
- #: ../mods/pages_module.php:107
484
  msgid "Show widget default on static pages?"
485
  msgstr ""
486
 
487
- #: ../mods/pages_module.php:112
488
  msgid ""
489
  "Checking the \"All childs\" option, makes the exception rule apply\n"
490
- "\t\t\t\tto the parent and all items under it in all levels. Also future items\n"
491
- "\t\t\t\tunder the parent. It's not possible to apply an exception rule to\n"
492
- "\t\t\t\t\"All childs\" without the parent."
493
  msgstr ""
494
 
495
- #: ../mods/pages_module.php:122
 
 
 
 
 
 
496
  msgid "Except the page(s)"
497
  msgstr ""
498
 
499
- #: ../mods/author_module.php:35
500
  msgid "Show widget default on author pages?"
501
  msgstr ""
502
 
503
- #: ../mods/author_module.php:39
504
  msgid "Except the author(s)"
505
  msgstr ""
506
 
507
- #: ../mods/bp_module.php:51
508
- msgid "BuddyPress"
509
- msgstr ""
510
-
511
  #: ../mods/bp_module.php:53
512
  msgid "Show widget default on BuddyPress pages?"
513
  msgstr ""
514
 
515
  #: ../mods/bp_module.php:57
516
- msgid "Except on the compontents pages"
517
  msgstr ""
518
 
519
- #: ../mods/bp_module.php:91
520
- msgid "BuddyPress Groups"
 
 
 
 
 
 
 
 
521
  msgstr ""
522
 
523
- #: ../mods/bp_module.php:93
524
  msgid "Show widget default on BuddyPress Group pages?"
525
  msgstr ""
526
 
527
- #: ../mods/bp_module.php:97
528
  msgid "Except in the groups"
529
  msgstr ""
530
 
 
 
 
 
531
  # WordPress MO
532
  #: ../mods/role_module.php:10
533
  msgid "Anonymous"
534
  msgstr ""
535
 
536
- #: ../mods/role_module.php:41
537
  msgid "Show widget to everybody?"
538
  msgstr ""
539
 
540
- #: ../mods/role_module.php:45
541
  msgid ""
542
  "Setting options by role is very powerfull. It can override all other options!<br />\n"
543
  "\t\t\t\t\t\tUsers who are not logged in, get the <em>Anonymous</em> role."
544
  msgstr ""
545
 
546
- #: ../mods/role_module.php:50
547
  msgid "only to"
548
  msgstr ""
549
 
@@ -551,56 +636,85 @@ msgstr ""
551
  msgid "(and other Gecko based)"
552
  msgstr ""
553
 
554
- #: ../mods/useragent_module.php:16
555
  msgid "Other / Unknown / Not detected"
556
  msgstr ""
557
 
558
- #: ../mods/useragent_module.php:43
559
  msgid "Show widget with all browsers?"
560
  msgstr ""
561
 
562
- #: ../mods/useragent_module.php:47
563
  msgid "Browser detection is never 100% accurate."
564
  msgstr ""
565
 
566
- #: ../mods/useragent_module.php:52
567
  msgid "Except the browser(s)"
568
  msgstr ""
569
 
570
- #: ../mods/custompost_module.php:107
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
571
  msgid "Custom Post Type"
572
  msgstr ""
573
 
574
- #: ../mods/custompost_module.php:109
575
  msgid "Show widget on"
576
  msgstr ""
577
 
578
- #: ../mods/custompost_module.php:124
579
- #: ../mods/custompost_module.php:167
 
 
 
 
 
580
  msgid "Except for"
581
  msgstr ""
582
 
583
- #: ../mods/custompost_module.php:159
584
- msgid "Custom Post Type Archives"
585
  msgstr ""
586
 
587
- #: ../mods/custompost_module.php:161
588
  msgid "Show widget on Custom Post Type Archives"
589
  msgstr ""
590
 
591
- #: ../mods/date_module.php:31
 
 
 
 
 
 
 
 
592
  msgid "Show widget always?"
593
  msgstr ""
594
 
595
- #: ../mods/date_module.php:35
596
  msgid "Next to the above role option, the date option is also very powerfull. You've been warned!"
597
  msgstr ""
598
 
599
- #: ../mods/date_module.php:36
600
  msgid "Enter dates in the YYYY-MM-DD format. You can also use the calender by clicking on the"
601
  msgstr ""
602
 
603
- #: ../mods/date_module.php:37
604
  msgid ""
605
  "Date ranges can be made by entering a From AND a To date<br />\n"
606
  " \t\t\t\t\tWhen you want the widget to be displayed from a specific date, only fill in the From date<br />\n"
@@ -608,35 +722,35 @@ msgid ""
608
  " \t\t\t\t"
609
  msgstr ""
610
 
611
- #: ../mods/date_module.php:44
612
  msgid "only"
613
  msgstr ""
614
 
615
- #: ../mods/date_module.php:48
616
  msgid "From"
617
  msgstr ""
618
 
619
- #: ../mods/date_module.php:52
620
  msgid "To"
621
  msgstr ""
622
 
623
- #: ../mods/wpec_module.php:39
624
  msgid "Show widget default on WPSC categories?"
625
  msgstr ""
626
 
627
- #: ../mods/wpml_module.php:37
628
  msgid "Language (WPML)"
629
  msgstr ""
630
 
631
- #: ../mods/wpml_module.php:39
632
  msgid "Show widget default on all languages?"
633
  msgstr ""
634
 
635
- #: ../mods/wpml_module.php:43
636
  msgid "Using this option can override all other options."
637
  msgstr ""
638
 
639
- #: ../mods/wpml_module.php:48
640
  msgid "Except the languages"
641
  msgstr ""
642
 
2
  msgstr ""
3
  "Project-Id-Version: Dynamic Widgets\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2011-06-30 22:01+0100\n"
6
+ "PO-Revision-Date: 2011-06-30 22:01+0100\n"
7
  "Last-Translator: Jacco\n"
8
  "Language-Team: \n"
9
  "MIME-Version: 1.0\n"
16
  "X-Poedit-SearchPath-0: ..\n"
17
 
18
  # WordPress MO
19
+ #: ../dynwid_class_php4.php:157
20
+ #: ../dynwid_class.php:142
21
  msgid "Role"
22
  msgstr ""
23
 
24
  # WordPress MO
25
+ #: ../dynwid_class_php4.php:158
26
+ #: ../dynwid_class.php:143
27
  msgid "Date"
28
  msgstr ""
29
 
30
+ #: ../dynwid_class_php4.php:159
31
+ #: ../dynwid_class.php:144
32
  msgid "Browser"
33
  msgstr ""
34
 
35
+ #: ../dynwid_class_php4.php:160
36
+ #: ../dynwid_class.php:145
37
+ msgid "Templates"
38
+ msgstr ""
39
+
40
+ #: ../dynwid_class_php4.php:161
41
+ #: ../dynwid_class.php:146
42
  msgid "Language"
43
  msgstr ""
44
 
45
+ #: ../dynwid_class_php4.php:162
46
+ #: ../dynwid_class.php:147
47
+ #: ../mods/frontpage_module.php:13
48
  msgid "Front Page"
49
  msgstr ""
50
 
51
+ #: ../dynwid_class_php4.php:163
52
+ #: ../dynwid_class.php:148
53
+ #: ../mods/single_module.php:53
54
  msgid "Single Posts"
55
  msgstr ""
56
 
57
+ #: ../dynwid_class_php4.php:164
58
+ #: ../dynwid_class.php:149
59
+ #: ../mods/attachment_module.php:12
60
  msgid "Attachments"
61
  msgstr ""
62
 
63
  # WordPress MO
64
+ #: ../dynwid_class_php4.php:165
65
+ #: ../dynwid_class.php:150
66
  msgid "Pages"
67
  msgstr ""
68
 
69
+ #: ../dynwid_class_php4.php:166
70
+ #: ../dynwid_class.php:151
71
  msgid "Author Pages"
72
  msgstr ""
73
 
74
+ #: ../dynwid_class_php4.php:167
75
+ #: ../dynwid_class.php:152
76
+ #: ../mods/category_module.php:17
77
  msgid "Category Pages"
78
  msgstr ""
79
 
80
+ #: ../dynwid_class_php4.php:168
81
+ #: ../dynwid_class.php:153
82
+ #: ../mods/archive_module.php:12
83
  msgid "Archive Pages"
84
  msgstr ""
85
 
86
+ #: ../dynwid_class_php4.php:169
87
+ #: ../dynwid_class.php:154
88
+ #: ../mods/error_module.php:12
89
  msgid "Error Page"
90
  msgstr ""
91
 
92
+ #: ../dynwid_class_php4.php:170
93
+ #: ../dynwid_class.php:155
94
  msgid "Search page"
95
  msgstr ""
96
 
97
+ #: ../dynwid_class_php4.php:171
98
+ #: ../dynwid_class.php:156
99
  msgid "WPSC Category"
100
  msgstr ""
101
 
102
+ #: ../dynwid_class_php4.php:172
103
+ #: ../dynwid_class.php:157
104
+ msgid "Custom Post Type Archives"
105
+ msgstr ""
106
+
107
+ #: ../dynwid_class_php4.php:173
108
+ #: ../dynwid_class.php:158
109
+ msgid "BuddyPress"
110
+ msgstr ""
111
+
112
+ #: ../dynwid_class_php4.php:174
113
+ #: ../dynwid_class.php:159
114
+ msgid "BuddyPress Groups"
115
+ msgstr ""
116
+
117
+ #: ../dynwid_admin.php:19
118
+ #: ../dynamic-widgets.php:144
119
+ #: ../dynamic-widgets.php:167
120
+ #: ../dynamic-widgets.php:273
121
+ #: ../dynamic-widgets.php:672
122
  msgid "Dynamic Widgets"
123
  msgstr ""
124
 
125
+ #: ../dynwid_admin.php:26
126
  msgid "<b>WARNING</b> STRICT sql mode in effect. Dynamic Widgets might not work correctly. Please disable STRICT sql mode."
127
  msgstr ""
128
 
129
+ #: ../dynwid_admin.php:46
130
  msgid "Oops! Something went terrible wrong. Please reinstall Dynamic Widgets."
131
  msgstr ""
132
 
133
+ #: ../dynwid_admin.php:54
134
+ #: ../dynwid_admin_overview.php:20
135
  msgid "OLD"
136
  msgstr ""
137
 
138
+ #: ../dynwid_admin.php:54
139
+ #: ../dynwid_admin_overview.php:20
140
  msgid "FILTER"
141
  msgstr ""
142
 
143
+ #: ../dynamic-widgets.php:152
144
  msgid "Widgets are always displayed by default"
145
  msgstr ""
146
 
147
+ #: ../dynamic-widgets.php:152
148
  msgid "The '<em>Yes</em>' selection"
149
  msgstr ""
150
 
151
+ #: ../dynamic-widgets.php:153
152
  msgid "Click on the"
153
  msgstr ""
154
 
155
+ #: ../dynamic-widgets.php:153
156
  msgid "next to the options for more info"
157
  msgstr ""
158
 
159
+ #: ../dynamic-widgets.php:154
160
  msgid "The"
161
  msgstr ""
162
 
163
+ #: ../dynamic-widgets.php:154
164
  msgid "next to a section means it has options set."
165
  msgstr ""
166
 
167
+ #: ../dynamic-widgets.php:156
168
+ #: ../dynamic-widgets.php:157
169
+ #: ../dynamic-widgets.php:160
170
+ #: ../dynamic-widgets.php:674
171
+ #: ../dynwid_admin_overview.php:85
172
  msgid "Static"
173
  msgstr ""
174
 
175
+ #: ../dynamic-widgets.php:156
176
+ #: ../dynamic-widgets.php:158
177
+ #: ../dynamic-widgets.php:674
178
+ #: ../dynwid_admin_overview.php:85
179
  msgid "Dynamic"
180
  msgstr ""
181
 
182
+ #: ../dynamic-widgets.php:157
183
  msgid "When a widget is"
184
  msgstr ""
185
 
186
+ #: ../dynamic-widgets.php:157
187
  msgid "the widget uses the WordPress default. In other words, it's shown everywhere"
188
  msgstr ""
189
 
190
+ #: ../dynamic-widgets.php:158
191
  msgid "A widget is"
192
  msgstr ""
193
 
194
+ #: ../dynamic-widgets.php:158
195
  msgid "when there are options set, i.e. not showing on the front page."
196
  msgstr ""
197
 
198
+ #: ../dynamic-widgets.php:159
199
+ #: ../dynwid_admin_overview.php:79
200
  msgid "Reset"
201
  msgstr ""
202
 
203
+ #: ../dynamic-widgets.php:160
204
  msgid "Reset makes the widget return to"
205
  msgstr ""
206
 
207
  # WordPress MO
208
+ #: ../dynamic-widgets.php:226
209
  msgid "Settings"
210
  msgstr ""
211
 
212
+ #: ../dynamic-widgets.php:240
213
  msgid "Apply exception rule to widgets:"
214
  msgstr ""
215
 
216
+ #: ../dynamic-widgets.php:256
217
+ #: ../dynamic-widgets.php:290
218
  msgid "Off"
219
  msgstr ""
220
 
221
+ #: ../dynamic-widgets.php:256
222
+ #: ../dynamic-widgets.php:290
223
  msgid "On"
224
  msgstr ""
225
 
226
+ #: ../dynamic-widgets.php:257
227
  msgid " (Default: "
228
  msgstr ""
229
 
230
+ #: ../dynamic-widgets.php:291
231
+ msgid "Default"
232
+ msgstr ""
233
+
234
+ #: ../dynamic-widgets.php:351
235
  msgid "Dynamic Widgets Options saved"
236
  msgstr ""
237
 
238
+ #: ../dynamic-widgets.php:352
239
  msgid "for"
240
  msgstr ""
241
 
242
+ #: ../dynamic-widgets.php:673
243
  msgid "Edit Dynamic Widgets Options"
244
  msgstr ""
245
 
246
+ #: ../dynamic-widgets.php:698
247
  msgid "and"
248
  msgstr ""
249
 
250
+ #: ../dynamic-widgets.php:704
251
  msgid "Options set for"
252
  msgstr ""
253
 
254
+ #: ../dynamic-widgets.php:704
255
  msgid "Option set for"
256
  msgstr ""
257
 
258
+ #: ../dynwid_admin_edit.php:108
259
  msgid "Widget options saved."
260
  msgstr ""
261
 
262
+ #: ../dynwid_admin_edit.php:109
263
+ #: ../dynwid_admin_edit.php:183
264
  msgid "Return"
265
  msgstr ""
266
 
267
+ #: ../dynwid_admin_edit.php:109
268
  msgid "to Dynamic Widgets overview"
269
  msgstr ""
270
 
271
+ #: ../dynwid_admin_edit.php:113
272
  msgid "Dynamic does not mean static hiding of a widget."
273
  msgstr ""
274
 
275
+ #: ../dynwid_admin_edit.php:113
276
  msgid "Hint"
277
  msgstr ""
278
 
279
+ #: ../dynwid_admin_edit.php:113
280
  msgid "Remove"
281
  msgstr ""
282
 
283
+ #: ../dynwid_admin_edit.php:113
284
  msgid "the widget from the sidebar"
285
  msgstr ""
286
 
287
+ #: ../dynwid_admin_edit.php:118
288
  msgid "The From date can't be later than the To date."
289
  msgstr ""
290
 
291
+ #: ../dynwid_admin_edit.php:124
292
  msgid "Edit options for the widget"
293
  msgstr ""
294
 
295
+ #: ../dynwid_admin_edit.php:128
296
+ msgid "Quick settings"
297
+ msgstr ""
298
+
299
+ #: ../dynwid_admin_edit.php:130
300
+ msgid "Set all options to 'No'"
301
+ msgstr ""
302
+
303
+ #: ../dynwid_admin_edit.php:130
304
+ msgid "Except overriding options like Role, Date, etc."
305
+ msgstr ""
306
+
307
  # WordPress MO
308
+ #: ../dynwid_admin_edit.php:179
309
+ #: ../dynwid_admin_overview.php:140
310
  msgid "Save"
311
  msgstr ""
312
 
313
+ #: ../dynwid_admin_overview.php:20
314
+ msgid "Method set to"
315
  msgstr ""
316
 
317
  #: ../dynwid_admin_overview.php:28
318
+ msgid "Page limit set to"
319
+ msgstr ""
320
+
321
+ #: ../dynwid_admin_overview.php:31
322
+ msgid "ERROR"
323
+ msgstr ""
324
+
325
+ #: ../dynwid_admin_overview.php:31
326
+ msgid "is not a valid limit."
327
+ msgstr ""
328
+
329
+ #: ../dynwid_admin_overview.php:40
330
+ msgid "Widget options have been reset to default."
331
  msgstr ""
332
 
333
+ #: ../dynwid_admin_overview.php:48
334
  msgid "Inactive Widgets"
335
  msgstr ""
336
 
337
+ #: ../dynwid_admin_overview.php:71
338
+ #: ../dynwid_admin_overview.php:74
339
  msgid "Edit this widget options"
340
  msgstr ""
341
 
342
  # WordPress MO
343
+ #: ../dynwid_admin_overview.php:74
344
  msgid "Edit"
345
  msgstr ""
346
 
347
+ #: ../dynwid_admin_overview.php:79
348
  msgid "Reset widget to Static"
349
  msgstr ""
350
 
351
+ #: ../dynwid_admin_overview.php:100
352
  msgid "Advanced"
353
  msgstr ""
354
 
355
+ #: ../dynwid_admin_overview.php:105
356
  msgid "wp_head() check:"
357
  msgstr ""
358
 
359
+ #: ../dynwid_admin_overview.php:110
360
  msgid "wp_head() is NOT called (at the most obvious place)"
361
  msgstr ""
362
 
363
+ #: ../dynwid_admin_overview.php:114
364
  msgid "wp_head() is called"
365
  msgstr ""
366
 
367
+ #: ../dynwid_admin_overview.php:118
368
  msgid "Unable to determine if wp_head() is called"
369
  msgstr ""
370
 
371
+ #: ../dynwid_admin_overview.php:130
372
  msgid "Use 'OLD' method"
373
  msgstr ""
374
 
375
+ #: ../dynwid_admin_overview.php:140
376
+ msgid "Page limit"
377
+ msgstr ""
378
+
379
+ #: ../dynwid_admin_overview.php:142
380
+ msgid "The page limit sets the limit of number of pages to prevent a timeout when building the hierarchical tree. When the number of pages is above this limit, a flat list will be displayed which is less time consuming."
381
+ msgstr ""
382
+
383
+ #: ../dynwid_admin_overview.php:144
384
+ msgid "Currently the number of pages is"
385
+ msgstr ""
386
+
387
+ #: ../dynwid_admin_overview.php:151
388
  msgid "When upgrading to WPEC 3.8 the Dynamic Widgets rules for WPEC are lost. The WPEC dump gives you an overview of the rules before the update."
389
  msgstr ""
390
 
391
+ #: ../dynwid_admin_overview.php:152
392
  msgid "WARNING"
393
  msgstr ""
394
 
395
+ #: ../dynwid_admin_overview.php:152
396
  msgid "This only works correct when you did not add or change anything in the Dynamic Widgets rules."
397
  msgstr ""
398
 
399
+ #: ../dynwid_admin_overview.php:157
400
  msgid "Create WPEC dump"
401
  msgstr ""
402
 
403
+ #: ../dynwid_admin_overview.php:164
404
  msgid "For debugging purposes it is possible you're asked to create a dump. Click the 'Create dump' button and save the text file."
405
  msgstr ""
406
 
407
+ #: ../dynwid_admin_overview.php:169
408
  msgid "Create dump"
409
  msgstr ""
410
 
411
+ #: ../dynwid_admin_overview.php:176
412
  msgid "When you deceide not to use this plugin anymore (sorry to hear that!). You can cleanup all settings and data related to this plugin by clicking on the 'Uninstall' button. This process is irreversible! After the cleanup the plugin is deactivated automaticly."
413
  msgstr ""
414
 
415
+ #: ../dynwid_admin_overview.php:181
416
  msgid "Uninstall"
417
  msgstr ""
418
 
419
+ #: ../mods/search_module.php:13
420
  msgid "Search Page"
421
  msgstr ""
422
 
423
+ #: ../mods/search_module.php:15
424
  msgid "Show widget on the search page?"
425
  msgstr ""
426
 
427
  # WordPress MO
428
+ #: ../mods/search_module.php:17
429
+ #: ../mods/category_module.php:21
430
+ #: ../mods/single_module.php:64
431
+ #: ../mods/attachment_module.php:16
432
+ #: ../mods/error_module.php:16
433
+ #: ../mods/frontpage_module.php:24
434
+ #: ../mods/archive_module.php:21
435
  msgid "Yes"
436
  msgstr ""
437
 
438
  # WordPress MO
439
+ #: ../mods/search_module.php:18
440
+ #: ../mods/category_module.php:22
441
+ #: ../mods/single_module.php:65
442
+ #: ../mods/attachment_module.php:17
443
+ #: ../mods/error_module.php:17
444
+ #: ../mods/frontpage_module.php:25
445
+ #: ../mods/archive_module.php:22
446
  msgid "No"
447
  msgstr ""
448
 
449
+ #: ../mods/category_module.php:19
450
  msgid "Show widget default on category pages?"
451
  msgstr ""
452
 
453
+ #: ../mods/category_module.php:23
454
  msgid "Except the categories"
455
  msgstr ""
456
 
457
+ #: ../mods/single_module.php:47
458
  msgid "Posts: "
459
  msgstr ""
460
 
461
+ #: ../mods/single_module.php:47
462
  msgid "Tags: "
463
  msgstr ""
464
 
465
+ #: ../mods/single_module.php:55
466
  msgid "Show widget default on single posts?"
467
  msgstr ""
468
 
469
+ #: ../mods/single_module.php:55
470
+ #: ../mods/single_module.php:69
471
+ #: ../mods/archive_module.php:14
472
  msgid "Click to toggle info"
473
  msgstr ""
474
 
475
+ #: ../mods/single_module.php:59
476
  msgid ""
477
  "When you use an author <b>AND</b> a category exception, both rules in the condition must be met. Otherwise the exception rule won't be applied.\n"
478
  " \t\t\t\t\tIf you want to use the rules in a logical OR condition. Add the same widget again and apply the other rule to that.\n"
479
  " \t\t\t\t\t"
480
  msgstr ""
481
 
482
+ #: ../mods/single_module.php:68
483
  msgid "Make exception rule available to individual posts and tags."
484
  msgstr ""
485
 
486
+ #: ../mods/single_module.php:72
487
  msgid ""
488
  "When you enable this option, you have the ability to apply the exception rule for <em>Single Posts</em> to tags and individual posts.\n"
489
  "\t\t\t\t\t\tYou can set the exception rule for tags in the single Edit Tag Panel (go to <a href=\"edit-tags.php?taxonomy=post_tag\">Post Tags</a>,\n"
493
  " \t\t\t\t"
494
  msgstr ""
495
 
496
+ #: ../mods/single_module.php:89
497
  msgid "Except the posts by author"
498
  msgstr ""
499
 
500
+ #: ../mods/single_module.php:100
501
  msgid "Except the posts in category"
502
  msgstr ""
503
 
504
+ #: ../mods/attachment_module.php:14
505
  msgid "Show widget on attachment pages"
506
  msgstr ""
507
 
508
+ #: ../mods/error_module.php:14
509
  msgid "Show widget on the error page?"
510
  msgstr ""
511
 
512
+ #: ../mods/frontpage_module.php:15
513
  msgid "Show widget on the front page?"
514
  msgstr ""
515
 
516
+ #: ../mods/frontpage_module.php:19
517
  msgid ""
518
  "This option only applies when your front page is set to display your latest posts (See Settings &gt; Reading).<br />\n"
519
  "\t\t\t\t\t\tWhen a static page is set, you can use the options for the static pages below.\n"
520
  "\t\t\t\t\t"
521
  msgstr ""
522
 
523
+ #: ../mods/archive_module.php:14
524
  msgid "Show widget on archive pages"
525
  msgstr ""
526
 
527
+ #: ../mods/archive_module.php:18
528
  msgid "This option does not include Author and Category Pages."
529
  msgstr ""
530
 
531
+ #: ../mods/pages_module.php:14
532
+ msgid "The static page module failed to load."
533
+ msgstr ""
534
+
535
+ #: ../mods/pages_module.php:16
536
+ msgid "This is probably because building the hierarchical tree took too long.<br />Decrease the limit of number of pages in the advanced settings."
537
+ msgstr ""
538
+
539
+ #: ../mods/pages_module.php:43
540
  #: ../mods/custompost_module.php:45
541
  msgid "All childs"
542
  msgstr ""
543
 
544
+ #: ../mods/pages_module.php:81
545
+ #: ../mods/pages_module.php:84
546
  msgid "Front page"
547
  msgstr ""
548
 
549
+ #: ../mods/pages_module.php:81
550
+ #: ../mods/pages_module.php:86
551
  msgid "Posts page"
552
  msgstr ""
553
 
554
+ #: ../mods/pages_module.php:92
555
  msgid "Show widget default on static pages?"
556
  msgstr ""
557
 
558
+ #: ../mods/pages_module.php:98
559
  msgid ""
560
  "Checking the \"All childs\" option, makes the exception rule apply\n"
561
+ "\t\t\t\t\tto the parent and all items under it in all levels. Also future items\n"
562
+ "\t\t\t\t\tunder the parent. It's not possible to apply an exception rule to\n"
563
+ "\t\t\t\t\t\"All childs\" without the parent."
564
  msgstr ""
565
 
566
+ #: ../mods/pages_module.php:103
567
+ msgid ""
568
+ "Unfortunately the childs-function has been disabled\n"
569
+ "\t\t\t\t\tbecause you have more than 500 pages."
570
+ msgstr ""
571
+
572
+ #: ../mods/pages_module.php:113
573
  msgid "Except the page(s)"
574
  msgstr ""
575
 
576
+ #: ../mods/author_module.php:19
577
  msgid "Show widget default on author pages?"
578
  msgstr ""
579
 
580
+ #: ../mods/author_module.php:23
581
  msgid "Except the author(s)"
582
  msgstr ""
583
 
 
 
 
 
584
  #: ../mods/bp_module.php:53
585
  msgid "Show widget default on BuddyPress pages?"
586
  msgstr ""
587
 
588
  #: ../mods/bp_module.php:57
589
+ msgid "Except on the components pages"
590
  msgstr ""
591
 
592
+ #: ../mods/bp_module.php:76
593
+ msgid "Forum Index"
594
+ msgstr ""
595
+
596
+ #: ../mods/bp_module.php:77
597
+ msgid "Forum Topics"
598
+ msgstr ""
599
+
600
+ #: ../mods/bp_module.php:78
601
+ msgid "Members Index"
602
  msgstr ""
603
 
604
+ #: ../mods/bp_module.php:83
605
  msgid "Show widget default on BuddyPress Group pages?"
606
  msgstr ""
607
 
608
+ #: ../mods/bp_module.php:90
609
  msgid "Except in the groups"
610
  msgstr ""
611
 
612
+ #: ../mods/bp_module.php:99
613
+ msgid "Except in the group pages"
614
+ msgstr ""
615
+
616
  # WordPress MO
617
  #: ../mods/role_module.php:10
618
  msgid "Anonymous"
619
  msgstr ""
620
 
621
+ #: ../mods/role_module.php:25
622
  msgid "Show widget to everybody?"
623
  msgstr ""
624
 
625
+ #: ../mods/role_module.php:29
626
  msgid ""
627
  "Setting options by role is very powerfull. It can override all other options!<br />\n"
628
  "\t\t\t\t\t\tUsers who are not logged in, get the <em>Anonymous</em> role."
629
  msgstr ""
630
 
631
+ #: ../mods/role_module.php:34
632
  msgid "only to"
633
  msgstr ""
634
 
636
  msgid "(and other Gecko based)"
637
  msgstr ""
638
 
639
+ #: ../mods/useragent_module.php:17
640
  msgid "Other / Unknown / Not detected"
641
  msgstr ""
642
 
643
+ #: ../mods/useragent_module.php:28
644
  msgid "Show widget with all browsers?"
645
  msgstr ""
646
 
647
+ #: ../mods/useragent_module.php:32
648
  msgid "Browser detection is never 100% accurate."
649
  msgstr ""
650
 
651
+ #: ../mods/useragent_module.php:37
652
  msgid "Except the browser(s)"
653
  msgstr ""
654
 
655
+ #: ../mods/tpl_module.php:23
656
+ msgid "Show widget on every template?"
657
+ msgstr ""
658
+
659
+ #: ../mods/tpl_module.php:27
660
+ msgid "This options takes precedence above other options like Pages and/or Single Posts."
661
+ msgstr ""
662
+
663
+ #: ../mods/tpl_module.php:32
664
+ msgid "Except the templates"
665
+ msgstr ""
666
+
667
+ #: ../mods/tpl_module.php:34
668
+ msgid "Default Template"
669
+ msgstr ""
670
+
671
+ #: ../mods/custompost_module.php:81
672
  msgid "Custom Post Type"
673
  msgstr ""
674
 
675
+ #: ../mods/custompost_module.php:83
676
  msgid "Show widget on"
677
  msgstr ""
678
 
679
+ #: ../mods/custompost_module.php:90
680
+ msgid "All exceptions (Titles and Taxonomies) work in a logical OR condition. That means when one of the exceptions is met, the exception rule is applied."
681
+ msgstr ""
682
+
683
+ #: ../mods/custompost_module.php:97
684
+ #: ../mods/custompost_module.php:160
685
+ #: ../mods/custompost_module.php:193
686
  msgid "Except for"
687
  msgstr ""
688
 
689
+ #: ../mods/custompost_module.php:117
690
+ msgid "Except for Custom Taxonomy"
691
  msgstr ""
692
 
693
+ #: ../mods/custompost_module.php:154
694
  msgid "Show widget on Custom Post Type Archives"
695
  msgstr ""
696
 
697
+ #: ../mods/custompost_module.php:183
698
+ msgid "Custom Taxonomy Archive"
699
+ msgstr ""
700
+
701
+ #: ../mods/custompost_module.php:185
702
+ msgid "Show widget on Custom Taxonomy Archive"
703
+ msgstr ""
704
+
705
+ #: ../mods/date_module.php:32
706
  msgid "Show widget always?"
707
  msgstr ""
708
 
709
+ #: ../mods/date_module.php:36
710
  msgid "Next to the above role option, the date option is also very powerfull. You've been warned!"
711
  msgstr ""
712
 
713
+ #: ../mods/date_module.php:37
714
  msgid "Enter dates in the YYYY-MM-DD format. You can also use the calender by clicking on the"
715
  msgstr ""
716
 
717
+ #: ../mods/date_module.php:38
718
  msgid ""
719
  "Date ranges can be made by entering a From AND a To date<br />\n"
720
  " \t\t\t\t\tWhen you want the widget to be displayed from a specific date, only fill in the From date<br />\n"
722
  " \t\t\t\t"
723
  msgstr ""
724
 
725
+ #: ../mods/date_module.php:45
726
  msgid "only"
727
  msgstr ""
728
 
729
+ #: ../mods/date_module.php:49
730
  msgid "From"
731
  msgstr ""
732
 
733
+ #: ../mods/date_module.php:53
734
  msgid "To"
735
  msgstr ""
736
 
737
+ #: ../mods/wpec_module.php:23
738
  msgid "Show widget default on WPSC categories?"
739
  msgstr ""
740
 
741
+ #: ../mods/wpml_module.php:16
742
  msgid "Language (WPML)"
743
  msgstr ""
744
 
745
+ #: ../mods/wpml_module.php:18
746
  msgid "Show widget default on all languages?"
747
  msgstr ""
748
 
749
+ #: ../mods/wpml_module.php:22
750
  msgid "Using this option can override all other options."
751
  msgstr ""
752
 
753
+ #: ../mods/wpml_module.php:27
754
  msgid "Except the languages"
755
  msgstr ""
756
 
mods/archive_module.php CHANGED
@@ -2,22 +2,14 @@
2
  /**
3
  * Archive Module
4
  *
5
- * @version $Id: archive_module.php 348295 2011-02-20 20:13:21Z qurl $
6
  * @copyright 2011 Jacco Drabbe
7
  */
8
 
9
- $archive_yes_selected = 'checked="checked"';
10
- $opt_archive = $DW->getOptions($_GET['id'], 'archive');
11
- if ( count($opt_archive) > 0 ) {
12
- $archive_condition = $opt_archive[0]['value'];
13
- if ( $archive_condition == '0' ) {
14
- $archive_no_selected = $archive_yes_selected;
15
- unset($archive_yes_selected);
16
- }
17
- }
18
  ?>
19
 
20
- <h4><b><?php _e('Archive Pages', DW_L10N_DOMAIN); ?></b><?php echo ( count($opt_archive) > 0 ? ' <img src="' . $DW->plugin_url . 'img/checkmark.gif" alt="Checkmark" />' : '' ); ?></h4>
21
  <div class="dynwid_conf">
22
  <?php _e('Show widget on archive pages', DW_L10N_DOMAIN); ?> <img src="<?php echo $DW->plugin_url; ?>img/info.gif" alt="info" title="<?php _e('Click to toggle info', DW_L10N_DOMAIN); ?>" onclick="divToggle('archive')" /><br />
23
  <?php $DW->dumpOpt($opt_archive); ?>
@@ -26,6 +18,6 @@
26
  <?php _e('This option does not include Author and Category Pages.', DW_L10N_DOMAIN); ?>
27
  </div>
28
  </div>
29
- <input type="radio" name="archive" value="yes" id="archive-yes" <?php echo ( isset($archive_yes_selected) ? $archive_yes_selected : '' ); ?> /> <label for="archive-yes"><?php _e('Yes'); ?></label>
30
- <input type="radio" name="archive" value="no" id="archive-no" <?php echo ( isset($archive_no_selected) ? $archive_no_selected : '' ); ?> /> <label for="archive-no"><?php _e('No'); ?></label>
31
  </div><!-- end dynwid_conf -->
2
  /**
3
  * Archive Module
4
  *
5
+ * @version $Id: archive_module.php 402236 2011-06-28 20:46:55Z qurl $
6
  * @copyright 2011 Jacco Drabbe
7
  */
8
 
9
+ $opt_archive = $DW->getDWOpt($_GET['id'], 'archive');
 
 
 
 
 
 
 
 
10
  ?>
11
 
12
+ <h4><b><?php _e('Archive Pages', DW_L10N_DOMAIN); ?></b><?php echo ( $opt_archive->count > 0 ) ? ' <img src="' . $DW->plugin_url . 'img/checkmark.gif" alt="Checkmark" />' : ''; ?></h4>
13
  <div class="dynwid_conf">
14
  <?php _e('Show widget on archive pages', DW_L10N_DOMAIN); ?> <img src="<?php echo $DW->plugin_url; ?>img/info.gif" alt="info" title="<?php _e('Click to toggle info', DW_L10N_DOMAIN); ?>" onclick="divToggle('archive')" /><br />
15
  <?php $DW->dumpOpt($opt_archive); ?>
18
  <?php _e('This option does not include Author and Category Pages.', DW_L10N_DOMAIN); ?>
19
  </div>
20
  </div>
21
+ <input type="radio" name="archive" value="yes" id="archive-yes" <?php echo ( $opt_archive->selectYes() ) ? $opt_archive->checked : ''; ?> /> <label for="archive-yes"><?php _e('Yes'); ?></label>
22
+ <input type="radio" name="archive" value="no" id="archive-no" <?php echo ( $opt_archive->selectNo() ) ? $opt_archive->checked : ''; ?> /> <label for="archive-no"><?php _e('No'); ?></label>
23
  </div><!-- end dynwid_conf -->
mods/attachment_module.php CHANGED
@@ -2,25 +2,17 @@
2
  /**
3
  * Attachment Module
4
  *
5
- * @version $Id: attachment_module.php 348295 2011-02-20 20:13:21Z qurl $
6
  * @copyright 2011 Jacco Drabbe
7
  */
8
 
9
- $attachment_yes_selected = 'checked="checked"';
10
- $opt_attachment = $DW->getOptions($_GET['id'], 'attachment');
11
- if ( count($opt_attachment) > 0 ) {
12
- $attachment_condition = $opt_attachment[0]['value'];
13
- if ( $attachment_condition == '0' ) {
14
- $attachment_no_selected = $attachment_yes_selected;
15
- unset($attachment_yes_selected);
16
- }
17
- }
18
  ?>
19
 
20
- <h4><b><?php _e('Attachments', DW_L10N_DOMAIN); ?></b><?php echo ( count($opt_attachment) > 0 ? ' <img src="' . $DW->plugin_url . 'img/checkmark.gif" alt="Checkmark" />' : '' ); ?></h4>
21
  <div class="dynwid_conf">
22
  <?php _e('Show widget on attachment pages', DW_L10N_DOMAIN); ?>?<br />
23
  <?php $DW->dumpOpt($opt_attachment); ?>
24
- <input type="radio" name="attachment" value="yes" id="attachment-yes" <?php echo ( isset($attachment_yes_selected) ? $attachment_yes_selected : '' ); ?> /> <label for="attachment-yes"><?php _e('Yes'); ?></label>
25
- <input type="radio" name="attachment" value="no" id="attachment-no" <?php echo ( isset($attachment_no_selected) ? $attachment_no_selected : '' ); ?> /> <label for="attachment-no"><?php _e('No'); ?></label>
26
  </div><!-- end dynwid_conf -->
2
  /**
3
  * Attachment Module
4
  *
5
+ * @version $Id: attachment_module.php 402236 2011-06-28 20:46:55Z qurl $
6
  * @copyright 2011 Jacco Drabbe
7
  */
8
 
9
+ $opt_attachment = $DW->getDWOpt($_GET['id'], 'attachment');
 
 
 
 
 
 
 
 
10
  ?>
11
 
12
+ <h4><b><?php _e('Attachments', DW_L10N_DOMAIN); ?></b><?php echo ( $opt_attachment->count > 0 ) ? ' <img src="' . $DW->plugin_url . 'img/checkmark.gif" alt="Checkmark" />' : ''; ?></h4>
13
  <div class="dynwid_conf">
14
  <?php _e('Show widget on attachment pages', DW_L10N_DOMAIN); ?>?<br />
15
  <?php $DW->dumpOpt($opt_attachment); ?>
16
+ <input type="radio" name="attachment" value="yes" id="attachment-yes" <?php echo ( $opt_attachment->selectYes() ) ? $opt_attachment->checked : ''; ?> /> <label for="attachment-yes"><?php _e('Yes'); ?></label>
17
+ <input type="radio" name="attachment" value="no" id="attachment-no" <?php echo ( $opt_attachment->selectNo() ) ? $opt_attachment->checked : ''; ?> /> <label for="attachment-no"><?php _e('No'); ?></label>
18
  </div><!-- end dynwid_conf -->
mods/author_module.php CHANGED
@@ -2,43 +2,27 @@
2
  /**
3
  * Author Module
4
  *
5
- * @version $Id: author_module.php 348295 2011-02-20 20:13:21Z qurl $
6
  * @copyright 2011 Jacco Drabbe
7
  */
8
 
9
- $author_yes_selected = 'checked="checked"';
10
- $opt_author = $DW->getOptions($_GET['id'], 'author');
11
- if ( count($opt_author) > 0 ) {
12
- $author_act = array();
13
- foreach ( $opt_author as $author_condition ) {
14
- if ( $author_condition['name'] == 'default' || empty($author_condition['name']) ) {
15
- $author_default = $author_condition['value'];
16
- } else {
17
- $author_act[ ] = $author_condition['name'];
18
- }
19
- }
20
 
21
- if ( $author_default == '0' ) {
22
- $author_no_selected = $author_yes_selected;
23
- unset($author_yes_selected);
24
- }
25
- }
26
-
27
- $authors = get_users_of_blog();
28
  if ( count($authors) > DW_LIST_LIMIT ) {
29
  $author_condition_select_style = DW_LIST_STYLE;
30
  }
31
  ?>
32
 
33
- <h4><b><?php _e('Author Pages', DW_L10N_DOMAIN); ?></b><?php echo ( count($opt_author) > 0 ? ' <img src="' . $DW->plugin_url . 'img/checkmark.gif" alt="Checkmark" />' : '' ); ?></h4>
34
  <div class="dynwid_conf">
35
  <?php _e('Show widget default on author pages?', DW_L10N_DOMAIN); ?><br />
36
  <?php $DW->dumpOpt($opt_author); ?>
37
- <input type="radio" name="author" value="yes" id="author-yes" <?php echo ( isset($author_yes_selected) ? $author_yes_selected : '' ); ?> /> <label for="author-yes"><?php _e('Yes'); ?></label>
38
- <input type="radio" name="author" value="no" id="author-no" <?php echo ( isset($author_no_selected) ? $author_no_selected : '' ); ?> /> <label for="author-no"><?php _e('No'); ?></label><br />
39
  <?php _e('Except the author(s)', DW_L10N_DOMAIN); ?>:<br />
40
- <div id="author-select" class="condition-select" <?php echo ( isset($author_condition_select_style) ? $author_condition_select_style : '' ); ?>>
41
  <?php foreach ( $authors as $author ) { ?>
42
- <input type="checkbox" id="author_act_<?php echo $author->ID; ?>" name="author_act[]" value="<?php echo $author->ID; ?>" <?php echo ( isset($author_act) && count($author_act) > 0 && in_array($author->ID,$author_act) ) ? 'checked="checked"' : ''; ?> /> <label for="author_act_<?php echo $author->ID; ?>"><?php echo $author->display_name; ?></label><br />
43
  <?php } ?></div>
44
  </div><!-- end dynwid_conf -->
2
  /**
3
  * Author Module
4
  *
5
+ * @version $Id: author_module.php 402236 2011-06-28 20:46:55Z qurl $
6
  * @copyright 2011 Jacco Drabbe
7
  */
8
 
9
+ $opt_author = $DW->getDWOpt($_GET['id'], 'author');
 
 
 
 
 
 
 
 
 
 
10
 
11
+ $authors = get_users( array('who' => 'author') );
 
 
 
 
 
 
12
  if ( count($authors) > DW_LIST_LIMIT ) {
13
  $author_condition_select_style = DW_LIST_STYLE;
14
  }
15
  ?>
16
 
17
+ <h4><b><?php _e('Author Pages', DW_L10N_DOMAIN); ?></b><?php echo ( $opt_author->count > 0 ) ? ' <img src="' . $DW->plugin_url . 'img/checkmark.gif" alt="Checkmark" />' : ''; ?></h4>
18
  <div class="dynwid_conf">
19
  <?php _e('Show widget default on author pages?', DW_L10N_DOMAIN); ?><br />
20
  <?php $DW->dumpOpt($opt_author); ?>
21
+ <input type="radio" name="author" value="yes" id="author-yes" <?php echo ( $opt_author->selectYes() ) ? $opt_author->checked : ''; ?> /> <label for="author-yes"><?php _e('Yes'); ?></label>
22
+ <input type="radio" name="author" value="no" id="author-no" <?php echo ( $opt_author->selectNo() ) ? $opt_author->checked : ''; ?> /> <label for="author-no"><?php _e('No'); ?></label><br />
23
  <?php _e('Except the author(s)', DW_L10N_DOMAIN); ?>:<br />
24
+ <div id="author-select" class="condition-select" <?php echo ( isset($author_condition_select_style) ) ? $author_condition_select_style : ''; ?>>
25
  <?php foreach ( $authors as $author ) { ?>
26
+ <input type="checkbox" id="author_act_<?php echo $author->ID; ?>" name="author_act[]" value="<?php echo $author->ID; ?>" <?php echo ( $opt_author->count > 0 && in_array($author->ID, $opt_author->act) ) ? $opt_author->checked : ''; ?> /> <label for="author_act_<?php echo $author->ID; ?>"><?php echo $author->display_name; ?></label><br />
27
  <?php } ?></div>
28
  </div><!-- end dynwid_conf -->
mods/bp_module.php CHANGED
@@ -3,7 +3,7 @@
3
  * BP module
4
  * http://buddypress.org/
5
  *
6
- * @version $Id: bp_module.php 348295 2011-02-20 20:13:21Z qurl $\
7
  * @copyright 2011 Jacco Drabbe
8
  */
9
 
@@ -11,36 +11,7 @@
11
  $DW->bp = TRUE;
12
  require_once(DW_PLUGIN . 'bp.php');
13
 
14
- $tmp = array();
15
- $bp_yes_selected = 'checked="checked"';
16
- $opt_bp = $DW->getOptions($_GET['id'], 'bp');
17
- if ( count($opt_bp) > 0 ) {
18
- $bp_act = array();
19
- foreach ( $opt_bp as $key => $bp_condition ) {
20
- if ( $bp_condition['maintype'] == 'bp' ) {
21
- if ( $bp_condition['name'] == 'default' || empty($bp_condition['name']) ) {
22
- $bp_default = $bp_condition['value'];
23
- } else {
24
- $bp_act[ ] = $bp_condition['name'];
25
- }
26
- } else {
27
- $tmp[ ] = $key;
28
- }
29
- }
30
-
31
- if ( $bp_default == '0' ) {
32
- $bp_no_selected = $bp_yes_selected;
33
- unset($bp_yes_selected);
34
- }
35
-
36
- // Removing the bp-group options
37
- if ( count($tmp) > 0 ) {
38
- foreach ( $tmp as $key ){
39
- unset($opt_bp[$key]);
40
- }
41
- }
42
- }
43
-
44
  $bp_components = dw_get_bp_components();
45
  if ( count($bp_components) > DW_LIST_LIMIT ) {
46
  $bp_condition_select_style = DW_LIST_STYLE;
@@ -48,16 +19,16 @@
48
  unset($tmp);
49
  ?>
50
 
51
- <h4><b><?php _e('BuddyPress', DW_L10N_DOMAIN); ?></b><?php echo ( count($opt_bp) > 0 ? ' <img src="' . $DW->plugin_url . 'img/checkmark.gif" alt="Checkmark" />' : '' ); ?></h4>
52
  <div class="dynwid_conf">
53
  <?php _e('Show widget default on BuddyPress pages?', DW_L10N_DOMAIN); ?><br />
54
  <?php $DW->dumpOpt($opt_bp); ?>
55
- <input type="radio" name="bp" value="yes" id="bp-yes" <?php echo ( isset($bp_yes_selected) ? $bp_yes_selected : '' ); ?> /> <label for="bp-yes"><?php _e('Yes'); ?></label>
56
- <input type="radio" name="bp" value="no" id="bp-no" <?php echo ( isset($bp_no_selected) ? $bp_no_selected : '' ); ?> /> <label for="bp-no"><?php _e('No'); ?></label><br />
57
- <?php _e('Except on the compontents pages', DW_L10N_DOMAIN); ?>:<br />
58
- <div id="bp-select" class="condition-select" <?php echo ( isset($bp_condition_select_style) ? $bp_condition_select_style : '' ); ?>>
59
  <?php foreach ( $bp_components as $id => $component ) { ?>
60
- <input type="checkbox" id="bp_act_<?php echo $id; ?>" name="bp_act[]" value="<?php echo $id; ?>" <?php echo ( count($bp_act) > 0 && in_array($id, $bp_act) ) ? 'checked="checked"' : ''; ?> /> <label for="bp_act_<?php echo $id; ?>"><?php echo $component; ?></label><br />
61
  <?php } ?>
62
  </div>
63
  </div><!-- end dynwid_conf -->
@@ -65,41 +36,46 @@
65
  <!-- BuddyPress Groups //-->
66
  <?php
67
  if ( $DW->bp_groups ) {
68
- $bp_group_yes_selected = 'checked="checked"';
69
- $opt_bp_group = $DW->getOptions($_GET['id'], 'bp-group');
70
- if ( count($opt_bp_group) > 0 ) {
71
- $bp_group_act = array();
72
- foreach ( $opt_bp_group as $bp_group_condition ) {
73
- if ( $bp_group_condition['name'] == 'default' || empty($bp_group_condition['name']) ) {
74
- $bp_group_default = $bp_group_condition['value'];
75
- } else {
76
- $bp_group_act[ ] = $bp_group_condition['name'];
77
- }
78
- }
79
-
80
- if ( $bp_group_default == '0' ) {
81
- $bp_group_no_selected = $bp_group_yes_selected;
82
- unset($bp_group_yes_selected);
83
- }
84
- }
85
 
86
  $bp_groups = dw_get_bp_groups();
87
  if ( count($bp_groups) > DW_LIST_LIMIT ) {
88
  $bp_group_condition_select_style = DW_LIST_STYLE;
89
  }
 
 
 
 
 
 
90
  ?>
91
- <h4><b><?php _e('BuddyPress Groups', DW_L10N_DOMAIN); ?></b><?php echo ( count($opt_bp_group) > 0 ? ' <span class="hasoptions">*</span>' : '' ); ?></h4>
92
  <div class="dynwid_conf">
93
  <?php _e('Show widget default on BuddyPress Group pages?', DW_L10N_DOMAIN); ?><br />
94
  <?php $DW->dumpOpt($opt_bp_group); ?>
95
- <input type="radio" name="bp-group" value="yes" id="bp-group-yes" <?php echo ( isset($bp_group_yes_selected) ? $bp_group_yes_selected : '' ); ?> /> <label for="bp-group-yes"><?php _e('Yes'); ?></label>
96
- <input type="radio" name="bp-group" value="no" id="bp-group-no" <?php echo ( isset($bp_group_no_selected) ? $bp_group_no_selected : '' ); ?> /> <label for="bp-group-no"><?php _e('No'); ?></label><br />
97
- <?php _e('Except in the groups', DW_L10N_DOMAIN); ?>:<br />
98
- <div id="bp-group-select" class="condition-select" <?php echo ( isset($bp_group_condition_select_style) ? $bp_group_condition_select_style : '' ); ?>>
99
- <?php foreach ( $bp_groups as $id => $group ) { ?>
100
- <input type="checkbox" id="bp_group_act_<?php echo $id; ?>" name="bp_group_act[]" value="<?php echo $id; ?>" <?php echo ( count($bp_group_act) > 0 && in_array($id, $bp_group_act) ) ? 'checked="checked"' : ''; ?> /> <label for="bp_group_act_<?php echo $id; ?>"><?php echo ucfirst($group); ?></label><br />
101
- <?php } ?>
102
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
103
  </div><!-- end dynwid_conf -->
104
 
105
  <?php
3
  * BP module
4
  * http://buddypress.org/
5
  *
6
+ * @version $Id: bp_module.php 403464 2011-07-01 20:30:55Z qurl $
7
  * @copyright 2011 Jacco Drabbe
8
  */
9
 
11
  $DW->bp = TRUE;
12
  require_once(DW_PLUGIN . 'bp.php');
13
 
14
+ $opt_bp = $DW->getDWOpt($_GET['id'], 'bp');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
  $bp_components = dw_get_bp_components();
16
  if ( count($bp_components) > DW_LIST_LIMIT ) {
17
  $bp_condition_select_style = DW_LIST_STYLE;
19
  unset($tmp);
20
  ?>
21
 
22
+ <h4><b><?php _e('BuddyPress', DW_L10N_DOMAIN); ?></b><?php echo ( $opt_bp->count > 0 ) ? ' <img src="' . $DW->plugin_url . 'img/checkmark.gif" alt="Checkmark" />' : ''; ?></h4>
23
  <div class="dynwid_conf">
24
  <?php _e('Show widget default on BuddyPress pages?', DW_L10N_DOMAIN); ?><br />
25
  <?php $DW->dumpOpt($opt_bp); ?>
26
+ <input type="radio" name="bp" value="yes" id="bp-yes" <?php echo ( $opt_bp->selectYes() ) ? $opt_bp->checked : ''; ?> /> <label for="bp-yes"><?php _e('Yes'); ?></label>
27
+ <input type="radio" name="bp" value="no" id="bp-no" <?php echo ( $opt_bp->selectNo() ) ? $opt_bp->checked : ''; ?> /> <label for="bp-no"><?php _e('No'); ?></label><br />
28
+ <?php _e('Except on the components pages', DW_L10N_DOMAIN); ?>:<br />
29
+ <div id="bp-select" class="condition-select" <?php echo ( isset($bp_condition_select_style) ) ? $bp_condition_select_style : ''; ?>>
30
  <?php foreach ( $bp_components as $id => $component ) { ?>
31
+ <input type="checkbox" id="bp_act_<?php echo $id; ?>" name="bp_act[]" value="<?php echo $id; ?>" <?php echo ( $opt_bp->count > 0 && in_array($id, $opt_bp->act) ) ? 'checked="checked"' : ''; ?> /> <label for="bp_act_<?php echo $id; ?>"><?php echo $component; ?></label><br />
32
  <?php } ?>
33
  </div>
34
  </div><!-- end dynwid_conf -->
36
  <!-- BuddyPress Groups //-->
37
  <?php
38
  if ( $DW->bp_groups ) {
39
+ $opt_bp_group = $DW->getDWOpt($_GET['id'], 'bp-group');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
40
 
41
  $bp_groups = dw_get_bp_groups();
42
  if ( count($bp_groups) > DW_LIST_LIMIT ) {
43
  $bp_group_condition_select_style = DW_LIST_STYLE;
44
  }
45
+
46
+ $bp_group_pages = array(
47
+ 'forum_index' => __('Forum Index', DW_L10N_DOMAIN),
48
+ 'forum_topic' => __('Forum Topics', DW_L10N_DOMAIN),
49
+ 'members_index' => __('Members Index', DW_L10N_DOMAIN)
50
+ );
51
  ?>
52
+ <h4><b><?php _e('BuddyPress Groups', DW_L10N_DOMAIN); ?></b><?php echo ( $opt_bp_group->count > 0 ) ? ' <img src="' . $DW->plugin_url . 'img/checkmark.gif" alt="Checkmark" />' : ''; ?></h4>
53
  <div class="dynwid_conf">
54
  <?php _e('Show widget default on BuddyPress Group pages?', DW_L10N_DOMAIN); ?><br />
55
  <?php $DW->dumpOpt($opt_bp_group); ?>
56
+ <input type="radio" name="bp-group" value="yes" id="bp-group-yes" <?php echo ( $opt_bp_group->selectYes() ) ? $opt_bp_group->checked : ''; ?> /> <label for="bp-group-yes"><?php _e('Yes'); ?></label>
57
+ <input type="radio" name="bp-group" value="no" id="bp-group-no" <?php echo ( $opt_bp_group->selectNo() ) ? $opt_bp_group->checked : ''; ?> /> <label for="bp-group-no"><?php _e('No'); ?></label><br />
58
+ <table border="0" cellspacing="0" cellpadding="0">
59
+ <tr>
60
+ <td valign="top">
61
+ <?php _e('Except in the groups', DW_L10N_DOMAIN); ?>:<br />
62
+ <div id="bp-group-select" class="condition-select" <?php echo ( isset($bp_group_condition_select_style) ) ? $bp_group_condition_select_style : ''; ?>>
63
+ <?php foreach ( $bp_groups as $id => $group ) { ?>
64
+ <input type="checkbox" id="bp_group_act_<?php echo $id; ?>" name="bp_group_act[]" value="<?php echo $id; ?>" <?php echo ( count($opt_bp_group->act) > 0 && in_array($id, $opt_bp_group->act) ) ? 'checked="checked"' : ''; ?> /> <label for="bp_group_act_<?php echo $id; ?>"><?php echo ucfirst($group); ?></label><br />
65
+ <?php } ?>
66
+ </div>
67
+ </td>
68
+ <td style="width:10px"></td>
69
+ <td valign="top">
70
+ <?php _e('Except in the group pages', DW_L10N_DOMAIN); ?>:<br />
71
+ <div id="bp-group-select" class="condition-select" <?php echo ( isset($bp_group_condition_select_style) ) ? $bp_group_condition_select_style : ''; ?>>
72
+ <?php foreach ( $bp_group_pages as $id => $group_pages ) { ?>
73
+ <input type="checkbox" id="bp_group_act_<?php echo $id; ?>" name="bp_group_act[]" value="<?php echo $id; ?>" <?php echo ( count($opt_bp_group->act) > 0 && in_array($id, $opt_bp_group->act) ) ? 'checked="checked"' : ''; ?> /> <label for="bp_group_act_<?php echo $id; ?>"><?php echo $group_pages; ?></label><br />
74
+ <?php } ?>
75
+ </div>
76
+ </td>
77
+ </tr>
78
+ </table>
79
  </div><!-- end dynwid_conf -->
80
 
81
  <?php
mods/category_module.php CHANGED
@@ -2,44 +2,26 @@
2
  /**
3
  * Category Module
4
  *
5
- * @version $Id: category_module.php 348295 2011-02-20 20:13:21Z qurl $
6
  * @copyright 2011 Jacco Drabbe
7
  */
8
 
9
- $category_yes_selected = 'checked="checked"';
10
- $opt_category = $DW->getOptions($_GET['id'], 'category');
11
- if ( count($opt_category) > 0 ) {
12
- $category_act = array();
13
- foreach ( $opt_category as $category_condition ) {
14
- if ( $category_condition['name'] == 'default' || empty($category_condition['name']) ) {
15
- $category_default = $category_condition['value'];
16
- } else {
17
- $category_act[ ] = $category_condition['name'];
18
- }
19
- }
20
-
21
- if ( $category_default == '0' ) {
22
- $category_no_selected = $category_yes_selected;
23
- unset($category_yes_selected);
24
- }
25
- }
26
-
27
  $category = get_categories( array('hide_empty' => FALSE) );
28
  if ( count($category) > DW_LIST_LIMIT ) {
29
  $category_condition_select_style = DW_LIST_STYLE;
30
  }
 
31
  ?>
32
 
33
- <h4><b><?php _e('Category Pages', DW_L10N_DOMAIN); ?></b> <?php echo ( count($opt_category) > 0 ? ' <img src="' . $DW->plugin_url . 'img/checkmark.gif" alt="Checkmark" />' : '' ) . ( $DW->wpml ? $wpml_icon : '' ); ?></h4>
34
  <div class="dynwid_conf">
35
  <?php _e('Show widget default on category pages?', DW_L10N_DOMAIN); ?><br />
36
  <?php $DW->dumpOpt($opt_category); ?>
37
- <input type="radio" name="category" value="yes" id="category-yes" <?php echo ( isset($category_yes_selected) ? $category_yes_selected : '' ); ?> /> <label for="category-yes"><?php _e('Yes'); ?></label>
38
- <input type="radio" name="category" value="no" id="category-no" <?php echo ( isset($category_no_selected) ? $category_no_selected : '' ); ?> /> <label for="category-no"><?php _e('No'); ?></label><br />
39
  <?php _e('Except the categories', DW_L10N_DOMAIN); ?>:<br />
40
- <div id="category-select" class="condition-select" <?php echo ( isset($category_condition_select_style) ? $category_condition_select_style : '' ); ?>>
41
- <?php foreach ( $category as $cat ) { ?>
42
- <input type="checkbox" id="cat_act_<?php echo $cat->cat_ID; ?>" name="category_act[]" value="<?php echo $cat->cat_ID; ?>" <?php echo ( isset($category_act) && count($category_act) > 0 && in_array($cat->cat_ID,$category_act) ) ? 'checked="checked"' : ''; ?> /> <label for="cat_act_<?php echo $cat->cat_ID; ?>"><?php echo $cat->name; ?></label><br />
43
- <?php } ?>
44
  </div>
45
  </div><!-- end dynwid_conf -->
2
  /**
3
  * Category Module
4
  *
5
+ * @version $Id: category_module.php 402236 2011-06-28 20:46:55Z qurl $
6
  * @copyright 2011 Jacco Drabbe
7
  */
8
 
9
+ $opt_category = $DW->getDWOpt($_GET['id'], 'category');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  $category = get_categories( array('hide_empty' => FALSE) );
11
  if ( count($category) > DW_LIST_LIMIT ) {
12
  $category_condition_select_style = DW_LIST_STYLE;
13
  }
14
+ $catmap = getCatChilds(array(), 0, array());
15
  ?>
16
 
17
+ <h4><b><?php _e('Category Pages', DW_L10N_DOMAIN); ?></b> <?php echo ( ($opt_category->count > 0) ? ' <img src="' . $DW->plugin_url . 'img/checkmark.gif" alt="Checkmark" />' : '' ) . ( ($DW->wpml) ? $wpml_icon : '' ); ?></h4>
18
  <div class="dynwid_conf">
19
  <?php _e('Show widget default on category pages?', DW_L10N_DOMAIN); ?><br />
20
  <?php $DW->dumpOpt($opt_category); ?>
21
+ <input type="radio" name="category" value="yes" id="category-yes" <?php echo ( $opt_category->selectYes() ) ? $opt_category->checked : ''; ?> /> <label for="category-yes"><?php _e('Yes'); ?></label>
22
+ <input type="radio" name="category" value="no" id="category-no" <?php echo ( $opt_category->selectNo() ) ? $opt_category->checked : ''; ?> /> <label for="category-no"><?php _e('No'); ?></label><br />
23
  <?php _e('Except the categories', DW_L10N_DOMAIN); ?>:<br />
24
+ <div id="category-select" class="condition-select" <?php echo ( isset($category_condition_select_style) ) ? $category_condition_select_style : ''; ?>>
25
+ <?php prtCat($catmap, $opt_category->act); ?>
 
 
26
  </div>
27
  </div><!-- end dynwid_conf -->
mods/custompost_module.php CHANGED
@@ -1,44 +1,56 @@
1
  <?php
2
-
3
  /**
4
  * Custom Post Type Module
5
  *
6
- * @version $Id: custompost_module.php 348295 2011-02-20 20:13:21Z qurl $
7
  * @copyright 2011 Jacco Drabbe
8
  */
9
 
10
  /* WordPress 3.0 and higher: Custom Post Types */
11
  if ( version_compare($GLOBALS['wp_version'], '3.0', '>=') ) {
 
12
  function getCPostChilds($type, $arr, $id, $i) {
13
- $post = get_posts('post_type=' . $type . '&post_parent=' . $id);
 
14
  foreach ($post as $p ) {
15
  if (! in_array($p->ID, $i) ) {
16
  $i[ ] = $p->ID;
17
  $arr[$p->ID] = array();
18
- $a = &$arr[$p->ID];
19
- $a = getCPostChilds($type, $a, $p->ID, &$i);
20
  }
21
  }
22
  return $arr;
23
  }
24
 
25
  function prtCPost($type, $ctid, $posts, $posts_act, $posts_childs_act) {
 
 
26
  foreach ( $posts as $pid => $childs ) {
 
27
  $post = get_post($pid);
28
 
29
- echo '<div style="position:relative;left:15px;">';
30
- echo '<input type="checkbox" id="' . $type . '_act_' . $post->ID . '" name="' . $type . '_act[]" value="' . $post->ID . '" ' . ( isset($posts_act) && count($posts_act) > 0 && in_array($post->ID, $posts_act) ? 'checked="checked"' : '' ) . ' onchange="chkCPChild(\'' . $type . '\',' . $pid . ')" /> <label for="' . $type . '_act_' . $post->ID . '">' . $post->post_title . '</label><br />';
 
 
 
 
31
 
32
- if ( $ctid->hierarchical ) {
33
  echo '<div style="position:relative;left:15px;">';
34
- echo '<input type="checkbox" id="' . $type . '_child_' . $pid . '" name="' . $type . '_childs_act[]" value="' . $pid . '" ' . ( isset($posts_childs_act) && count($posts_childs_act) > 0 && in_array($pid, $posts_childs_act) ? 'checked="checked"' : '' ) . ' onchange="chkCPParent(\'' . $type . '\',' . $pid . ')" /> <label for="' . $type . '_child_' . $pid . '"><em>' . __('All childs', DW_L10N_DOMAIN) . '</em></label><br />';
35
- echo '</div>';
36
- }
 
 
 
 
37
 
38
- if ( count($childs) > 0 ) {
39
- prtCPost($type, $ctid, $childs, $posts_act, $posts_childs_act);
 
 
40
  }
41
- echo '</div>';
42
  }
43
  }
44
 
@@ -50,116 +62,155 @@
50
 
51
  foreach ( $post_types as $type => $ctid ) {
52
  // Prepare
53
- $custom_yes_selected = 'checked="checked"';
54
- $opt_custom = $DW->getOptions($_GET['id'], $type);
55
- if ( count($opt_custom) > 0 ) {
56
- $custom_act = array();
57
- $custom_childs_act = array();
58
-
59
- foreach ( $opt_custom as $custom_condition ) {
60
- if ( $custom_condition['maintype'] == $type ) {
61
- if ( $custom_condition['name'] == 'default' || empty($custom_condition['name']) ) {
62
- $custom_default = $custom_condition['value'];
63
- } else {
64
- $custom_act[ ] = $custom_condition['name'];
65
- }
66
- }
67
- }
68
-
69
- if ( $custom_default == '0' ) {
70
- $custom_no_selected = $custom_yes_selected;
71
- unset($custom_yes_selected);
72
- }
73
 
74
- // -- Childs
75
- if ( $ctid->hierarchical ) {
76
- $opt_custom_childs = $DW->getOptions($_GET['id'], $type . '-childs');
77
- if ( count($opt_custom_childs) > 0 ) {
78
- foreach ( $opt_custom_childs as $child_condition ) {
79
- if ( $child_condition['name'] != 'default' ) {
80
- $custom_childs_act[ ] = $child_condition['name'];
81
- }
82
- }
83
- }
84
- }
85
  }
86
 
87
- $loop = new WP_Query( array('post_type' => $type) );
88
  if ( $loop->post_count > DW_LIST_LIMIT ) {
89
  $custom_condition_select_style = DW_LIST_STYLE;
90
  }
91
 
92
  $cpmap = getCPostChilds($type, array(), 0, array());
 
93
 
94
  // Output
95
- echo '<h4><b>' . __('Custom Post Type', DW_L10N_DOMAIN) . ' <em>' . $ctid->label . '</em></b> ' . ( count($opt_custom) > 0 ? ' <span class="hasoptions">*</span>' : '' ) . ( $DW->wpml ? $wpml_icon : '' ) . '</h4>';
96
  echo '<div class="dynwid_conf">';
97
- echo __('Show widget on', DW_L10N_DOMAIN) . ' ' . $ctid->label . '? ' . ( $ctid->hierarchical ? '<img src="' . $DW->plugin_url . 'img/info.gif" alt="info" onclick="divToggle(\'custom_' . $type . '\');" />' : '' ) . '<br />';
98
  echo '<input type="hidden" name="post_types[]" value="' . $type . '" />';
99
  $DW->dumpOpt($opt_custom);
100
 
101
- if ( $ctid->hierarchical ) {
102
- echo '<div>';
103
- echo '<div id="custom_' . $type . '" class="infotext">';
104
- echo $childs_infotext;
105
- echo '</div>';
106
- echo '</div>';
107
- }
108
 
109
- echo '<input type="radio" name="' . $type . '" value="yes" id="' . $type . '-yes" ' . ( isset($custom_yes_selected) ? $custom_yes_selected : '' ) . ' /> <label for="' . $type . '-yes">' . __('Yes') . '</label> ';
110
- echo '<input type="radio" name="' . $type . '" value="no" id="' . $type . '-no" ' . ( isset($custom_no_selected) ? $custom_no_selected : '' ) . ' /> <label for="' . $type . '-no">' . __('No') . '</label><br />';
111
 
112
  echo __('Except for', DW_L10N_DOMAIN) . ':<br />';
113
- echo '<div id="' . $type . '-select" class="condition-select" ' . ( isset($custom_condition_select_style) ? $custom_condition_select_style : '' ) . '>';
114
 
115
  echo '<div style="position:relative;left:-15px">';
116
- prtCPost($type, $ctid, $cpmap, $custom_act, $custom_childs_act);
117
  echo '</div>';
118
-
119
  echo '</div>';
120
- echo '</div><!-- end dynwid_conf -->';
121
- }
122
 
123
- // Custom Post Type Archives
124
- if ( function_exists('is_post_type_archive') ) {
125
- $cp_archive_yes_selected = 'checked="checked"';
126
- $opt_cp_archive = $DW->getOptions($_GET['id'], 'cp_archive');
127
- if ( count($opt_cp_archive) > 0 ) {
128
- $cp_archive_act = array();
129
- foreach ( $opt_cp_archive as $cp_archive_condition ) {
130
- if ( $cp_archive_condition['name'] == 'default' || empty($cp_archive_condition['name']) ) {
131
- $cp_archive_default = $cp_archive_condition['value'];
132
- } else {
133
- $cp_archive_act[ ] = $cp_archive_condition['name'];
134
  }
135
- }
136
 
137
- if ( $cp_archive_default == '0' ) {
138
- $cp_archive_no_selected = $cp_archive_yes_selected;
139
- unset($cp_archive_yes_selected);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
140
  }
141
  }
142
 
 
 
 
 
 
 
 
143
  if ( count($post_types) > DW_LIST_LIMIT ) {
144
  $cp_archive_condition_select_style = DW_LIST_STYLE;
145
  }
146
 
147
- echo '<h4><b>' . __('Custom Post Type Archives', DW_L10N_DOMAIN) . '</b> ' . ( count($opt_cp_archive) > 0 ? ' <img src="' . $DW->plugin_url . 'img/checkmark.gif" alt="Checkmark" />' : '' ) . '</h4>';
148
  echo '<div class="dynwid_conf">';
149
  echo __('Show widget on Custom Post Type Archives', DW_L10N_DOMAIN) . '?<br />';
150
  $DW->dumpOpt($opt_cp_archive);
151
 
152
- echo '<input type="radio" name="cp_archive" value="yes" id="cp_archive-yes" ' . ( isset($cp_archive_yes_selected) ? $cp_archive_yes_selected : '' ) . ' /> <label for="cp_archive-yes">' . __('Yes') . '</label> ';
153
- echo '<input type="radio" name="cp_archive" value="no" id="cp_archive-no" ' . ( isset($cp_archive_no_selected) ? $cp_archive_no_selected : '' ) . ' /> <label for="cp_archive-no">' . __('No') . '</label><br />';
154
 
155
  echo __('Except for', DW_L10N_DOMAIN) . ':<br />';
156
  echo '<div id="cp_archive-select" class="condition-select" ' . ( isset($cp_archive_condition_select_style) ? $cp_archive_condition_select_style : '' ) . '>';
157
  foreach ( $post_types as $type => $ctid ){
158
- echo '<input type="checkbox" id="cp_archive_act_' . $type . '" name="cp_archive_act[]" value="' . $type . '"' . ( count($cp_archive_act) > 0 && in_array($type, $cp_archive_act) ? 'checked="checked"' : '') . ' /> <label for="cp_archive_act_' . $type . '">' . $ctid->label . '</label><br />';
159
  }
160
  echo '</div>';
161
  echo '</div><!-- end dynwid_conf -->';
162
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
163
  } // end version compare >= WP 3.0
164
  ?>
165
 
1
  <?php
 
2
  /**
3
  * Custom Post Type Module
4
  *
5
+ * @version $Id: custompost_module.php 407372 2011-07-09 11:12:00Z qurl $
6
  * @copyright 2011 Jacco Drabbe
7
  */
8
 
9
  /* WordPress 3.0 and higher: Custom Post Types */
10
  if ( version_compare($GLOBALS['wp_version'], '3.0', '>=') ) {
11
+
12
  function getCPostChilds($type, $arr, $id, $i) {
13
+ $post = get_posts('post_type=' . $type . '&post_parent=' . $id . '&posts_per_page=-1');
14
+
15
  foreach ($post as $p ) {
16
  if (! in_array($p->ID, $i) ) {
17
  $i[ ] = $p->ID;
18
  $arr[$p->ID] = array();
19
+ getCPostChilds($type, &$arr[$p->ID], $p->ID, &$i);
 
20
  }
21
  }
22
  return $arr;
23
  }
24
 
25
  function prtCPost($type, $ctid, $posts, $posts_act, $posts_childs_act) {
26
+ $DW = $GLOBALS['DW'];
27
+
28
  foreach ( $posts as $pid => $childs ) {
29
+ $run = TRUE;
30
  $post = get_post($pid);
31
 
32
+ if ( $DW->wpml ) {
33
+ $wpml_id = dw_wpml_get_id($pid, 'post_' . $type);
34
+ if ( $wpml_id > 0 && $wpml_id <> $pid ) {
35
+ $run = FALSE;
36
+ }
37
+ }
38
 
39
+ if ( $run ) {
40
  echo '<div style="position:relative;left:15px;">';
41
+ echo '<input type="checkbox" id="' . $type . '_act_' . $post->ID . '" name="' . $type . '_act[]" value="' . $post->ID . '" ' . ( isset($posts_act) && count($posts_act) > 0 && in_array($post->ID, $posts_act) ? 'checked="checked"' : '' ) . ' onchange="chkCPChild(\'' . $type . '\',' . $pid . ')" /> <label for="' . $type . '_act_' . $post->ID . '">' . $post->post_title . '</label><br />';
42
+
43
+ if ( $ctid->hierarchical ) {
44
+ echo '<div style="position:relative;left:15px;">';
45
+ echo '<input type="checkbox" id="' . $type . '_childs_act_' . $pid . '" name="' . $type . '_childs_act[]" value="' . $pid . '" ' . ( isset($posts_childs_act) && count($posts_childs_act) > 0 && in_array($pid, $posts_childs_act) ? 'checked="checked"' : '' ) . ' onchange="chkCPParent(\'' . $type . '\',' . $pid . ')" /> <label for="' . $type . '_childs_act_' . $pid . '"><em>' . __('All childs', DW_L10N_DOMAIN) . '</em></label><br />';
46
+ echo '</div>';
47
+ }
48
 
49
+ if ( count($childs) > 0 ) {
50
+ prtCPost($type, $ctid, $childs, $posts_act, $posts_childs_act);
51
+ }
52
+ echo '</div>';
53
  }
 
54
  }
55
  }
56
 
62
 
63
  foreach ( $post_types as $type => $ctid ) {
64
  // Prepare
65
+ $opt_custom = $DW->getDWOpt($_GET['id'], $type);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
66
 
67
+ // -- Childs
68
+ if ( $ctid->hierarchical ) {
69
+ $opt_custom_childs = $DW->getDWOpt($_GET['id'], $type . '-childs');
 
 
 
 
 
 
 
 
70
  }
71
 
72
+ $loop = new WP_Query( array('post_type' => $type, 'posts_per_page' => -1) );
73
  if ( $loop->post_count > DW_LIST_LIMIT ) {
74
  $custom_condition_select_style = DW_LIST_STYLE;
75
  }
76
 
77
  $cpmap = getCPostChilds($type, array(), 0, array());
78
+ $tax_list = get_object_taxonomies($type, 'objects');
79
 
80
  // Output
81
+ echo '<h4><b>' . __('Custom Post Type', DW_L10N_DOMAIN) . ' <em>' . $ctid->label . '</em></b> ' . ( $opt_custom->count > 0 ? ' <img src="' . $DW->plugin_url . 'img/checkmark.gif" alt="Checkmark" />' : '' ) . ( $DW->wpml ? $wpml_icon : '' ) . '</h4>';
82
  echo '<div class="dynwid_conf">';
83
+ echo __('Show widget on', DW_L10N_DOMAIN) . ' ' . $ctid->label . '? ' . ( ($ctid->hierarchical || count($tax_list) > 0) ? '<img src="' . $DW->plugin_url . 'img/info.gif" alt="info" onclick="divToggle(\'custom_' . $type . '\');" />' : '' ) . '<br />';
84
  echo '<input type="hidden" name="post_types[]" value="' . $type . '" />';
85
  $DW->dumpOpt($opt_custom);
86
 
87
+ echo '<div>';
88
+ echo '<div id="custom_' . $type . '" class="infotext">';
89
+ echo ( $ctid->hierarchical ? '<p>' . $childs_infotext . '</p>' : '' );
90
+ echo ( (count($tax_list) > 0) ? '<p>' . __('All exceptions (Titles and Taxonomies) work in a logical OR condition. That means when one of the exceptions is met, the exception rule is applied.', DW_L10N_DOMAIN) . '</p>' : '' );
91
+ echo '</div>';
92
+ echo '</div>';
 
93
 
94
+ echo '<input type="radio" name="' . $type . '" value="yes" id="' . $type . '-yes" ' . ( $opt_custom->selectYes() ? $opt_custom->checked : '' ) . ' /> <label for="' . $type . '-yes">' . __('Yes') . '</label> ';
95
+ echo '<input type="radio" name="' . $type . '" value="no" id="' . $type . '-no" ' . ( $opt_custom->selectNo() ? $opt_custom->checked : '' ) . ' /> <label for="' . $type . '-no">' . __('No') . '</label><br />';
96
 
97
  echo __('Except for', DW_L10N_DOMAIN) . ':<br />';
98
+ echo '<div id="' . $type . '-select" class="condition-select" ' . ( (isset($custom_condition_select_style)) ? $custom_condition_select_style : '' ) . '>';
99
 
100
  echo '<div style="position:relative;left:-15px">';
101
+ prtCPost($type, $ctid, $cpmap, $opt_custom->act, $opt_custom_childs->act);
102
  echo '</div>';
 
103
  echo '</div>';
 
 
104
 
105
+ foreach ( $tax_list as $tax_type ) {
106
+ // Prepare
107
+ $opt_tax = $DW->getDWOpt($_GET['id'], $type . '-tax_' . $tax_type->name);
108
+
109
+ $tax = get_terms($tax_type->name, array('get' => 'all'));
110
+ if ( count($tax) > 0 ) {
111
+ if ( count($tax) > DW_LIST_LIMIT ) {
112
+ $tax_condition_select_style = DW_LIST_STYLE;
 
 
 
113
  }
 
114
 
115
+ echo '<br />';
116
+ $DW->dumpOpt($opt_tax);
117
+ echo __('Except for Custom Taxonomy') . ' <em>' . $tax_type->label . '</em>:<br />';
118
+ echo '<div id="' . $type . '-tax_' . $tax_type->name . '-select" class="condition-select" ' . ( (isset($tax_condition_select_style)) ? $tax_condition_select_style : '' ) . '>';
119
+
120
+ foreach ( $tax as $t ) {
121
+ $run = TRUE;
122
+ if ( $DW->wpml ) {
123
+ $wpml_id = dw_wpml_get_id($t->term_id, 'tax_' . $tax_type->name);
124
+ if ( $wpml_id > 0 && $wpml_id <> $t->term_id ) {
125
+ $run = FALSE;
126
+ }
127
+ }
128
+
129
+ if ( $run ) {
130
+ echo '<input type="checkbox" id="' . $type . '-tax_' . $tax_type->name . '_act_' . $t->term_id . '" name="' . $type . '-tax_' . $tax_type->name . '_act[]" value="' . $t->term_id . '" ';
131
+ echo ( $opt_tax->count > 0 && in_array($t->term_id, $opt_tax->act) ) ? 'checked="checked"' : '';
132
+ echo ' /> <label for="' . $type . '-tax_' . $tax_type->name . '_act_' . $t->term_id . '">';
133
+ echo $t->name;
134
+ echo '</label><br />';
135
+ }
136
+ }
137
+ echo '</div>';
138
  }
139
  }
140
 
141
+ echo '</div><!-- end dynwid_conf -->';
142
+ }
143
+
144
+ // Custom Post Type Archives
145
+ if ( function_exists('is_post_type_archive') && count($post_types) > 0 ) {
146
+ $opt_cp_archive = $DW->getDWOpt($_GET['id'], 'cp_archive');
147
+
148
  if ( count($post_types) > DW_LIST_LIMIT ) {
149
  $cp_archive_condition_select_style = DW_LIST_STYLE;
150
  }
151
 
152
+ echo '<h4><b>' . __('Custom Post Type Archives', DW_L10N_DOMAIN) . '</b> ' . ( ($opt_cp_archive->count > 0) ? ' <img src="' . $DW->plugin_url . 'img/checkmark.gif" alt="Checkmark" />' : '' ) . '</h4>';
153
  echo '<div class="dynwid_conf">';
154
  echo __('Show widget on Custom Post Type Archives', DW_L10N_DOMAIN) . '?<br />';
155
  $DW->dumpOpt($opt_cp_archive);
156
 
157
+ echo '<input type="radio" name="cp_archive" value="yes" id="cp_archive-yes" ' . ( ($opt_cp_archive->selectYes()) ? $opt_cp_archive->checked : '' ) . ' /> <label for="cp_archive-yes">' . __('Yes') . '</label> ';
158
+ echo '<input type="radio" name="cp_archive" value="no" id="cp_archive-no" ' . ( ($opt_cp_archive->selectNo()) ? $opt_cp_archive->checked : '' ) . ' /> <label for="cp_archive-no">' . __('No') . '</label><br />';
159
 
160
  echo __('Except for', DW_L10N_DOMAIN) . ':<br />';
161
  echo '<div id="cp_archive-select" class="condition-select" ' . ( isset($cp_archive_condition_select_style) ? $cp_archive_condition_select_style : '' ) . '>';
162
  foreach ( $post_types as $type => $ctid ){
163
+ echo '<input type="checkbox" id="cp_archive_act_' . $type . '" name="cp_archive_act[]" value="' . $type . '"' . ( ($opt_cp_archive->count > 0 && in_array($type, $opt_cp_archive->act)) ? 'checked="checked"' : '' ) . ' /> <label for="cp_archive_act_' . $type . '">' . $ctid->label . '</label><br />';
164
  }
165
  echo '</div>';
166
  echo '</div><!-- end dynwid_conf -->';
167
  }
168
+
169
+ if ( function_exists('is_tax') ) {
170
+ $taxlist = get_taxonomies($args, 'objects', 'and');
171
+
172
+ if ( count($taxlist) > 0 ) {
173
+ foreach ( $taxlist as $tax_id => $tax ) {
174
+ $ct = 'tax_' . $tax_id;
175
+ $ct_archive_yes_selected = 'checked="checked"';
176
+ $opt_ct_archive = $DW->getDWOpt($_GET['id'], $ct);
177
+
178
+ $t = get_terms($tax->name, array('get' => 'all'));
179
+ if ( count($t) > DW_LIST_LIMIT ) {
180
+ $ct_archive_condition_select_style = DW_LIST_STYLE;
181
+ }
182
+
183
+ echo '<h4><b>' . __('Custom Taxonomy Archive', DW_L10N_DOMAIN) . ' <em>' . $tax->label . '</em></b> ' . ( ($opt_ct_archive->count > 0) ? ' <img src="' . $DW->plugin_url . 'img/checkmark.gif" alt="Checkmark" />' : '' ) . '</h4>';
184
+ echo '<div class="dynwid_conf">';
185
+ echo __('Show widget on Custom Taxonomy Archive', DW_L10N_DOMAIN) . ' <em>' . $tax->label . '</em>?<br />';
186
+ echo '<input type="hidden" name="taxonomy[]" value="' . $tax_id . '" />';
187
+ $DW->dumpOpt($opt_ct_archive);
188
+
189
+ echo '<input type="radio" name="' . $ct . '" value="yes" id="' . $ct . '-yes" ' . ( ($opt_ct_archive->selectYes()) ? $opt_ct_archive->checked : '' ) . ' /> <label for="' . $ct . '-yes">' . __('Yes') . '</label> ';
190
+ echo '<input type="radio" name="' . $ct . '" value="no" id="' . $ct . '-no" ' . ( ($opt_ct_archive->selectNo()) ? $opt_ct_archive->checked : '' ) . ' /> <label for="' . $ct . '-no">' . __('No') . '</label><br />';
191
+
192
+ if ( count($t) > 0 ) {
193
+ echo __('Except for', DW_L10N_DOMAIN) . ':<br />';
194
+ echo '<div id="' . $ct . '-select" class="condition-select" ' . ( (isset($ct_archive_condition_select_style)) ? $ct_archive_condition_select_style : '' ) . '>';
195
+ foreach ( $t as $term ) {
196
+ $run = TRUE;
197
+ if ( $DW->wpml ) {
198
+ $wpml_id = dw_wpml_get_id($term->term_id, 'tax_' . $term->taxonomy);
199
+ if ( $wpml_id > 0 && $wpml_id <> $term->term_id ) {
200
+ $run = FALSE;
201
+ }
202
+ }
203
+
204
+ if ( $run ) {
205
+ echo '<input type="checkbox" id="' . $ct . '_act_' . $term->term_id . '" name="' . $ct . '_act[]" value="' . $term->term_id . '"' . ( ($opt_ct_archive->count > 0 && in_array($term->term_id, $opt_ct_archive->act)) ? 'checked="checked"' : '' ) . ' /> <label for="' . $ct . '_act_' . $term->term_id . '">' . $term->name . '</label><br />';
206
+ }
207
+ }
208
+ echo '</div>';
209
+ }
210
+ echo '</div><!-- end dynwid_conf -->';
211
+ }
212
+ }
213
+ }
214
  } // end version compare >= WP 3.0
215
  ?>
216
 
mods/date_module.php CHANGED
@@ -1,22 +1,23 @@
1
  <?php
2
  /**
3
  * Date Module
 
4
  *
5
- * @version $Id: date_module.php 348295 2011-02-20 20:13:21Z qurl $
6
  * @copyright 2011 Jacco Drabbe
7
  */
8
 
9
  $date_yes_selected = 'checked="checked"';
10
- $opt_date = $DW->getOptions($_GET['id'], 'date');
11
  if ( count($opt_date) > 0 ) {
12
  foreach ( $opt_date as $value ) {
13
- switch ( $value['name'] ) {
14
  case 'date_start':
15
- $date_start = $value['value'];
16
  break;
17
 
18
  case 'date_end':
19
- $date_end = $value['value'];
20
  break;
21
  }
22
  }
@@ -26,7 +27,7 @@
26
  }
27
  ?>
28
 
29
- <h4><b><?php _e('Date'); ?></b><?php echo ( count($opt_date) > 0 ? ' <img src="' . $DW->plugin_url . 'img/checkmark.gif" alt="Checkmark" />' : '' ); ?></h4>
30
  <div class="dynwid_conf">
31
  <?php _e('Show widget always?', DW_L10N_DOMAIN); ?> <img src="<?php echo $DW->plugin_url; ?>img/info.gif" alt="info" title="<?php _e('Click to toggle info', DW_L10N_DOMAIN) ?>" onclick="divToggle('date');" /><br />
32
  <?php $DW->dumpOpt($opt_date); ?>
@@ -40,17 +41,17 @@
40
  ', DW_L10N_DOMAIN); ?>
41
  </div>
42
  </div>
43
- <input type="radio" name="date" value="yes" id="date-yes" <?php echo ( isset($date_yes_selected) ? $date_yes_selected : '' ); ?> onclick="swTxt(cDate, true);" /> <label for="date-yes"><?php _e('Yes'); ?></label>
44
- <input type="radio" name="date" value="no" id="date-no" <?php echo ( isset($date_no_selected) ? $date_no_selected : '' ); ?> onclick="swTxt(cDate, false)" /> <label for="date-no"><?php _e('No'); ?>, <?php _e('only', DW_L10N_DOMAIN); ?>:</label><br />
45
  <div id="date-select" class="condition-select">
46
  <table border="0" cellspacing="0" cellpadding="0">
47
  <tr>
48
  <td style="width:45px;"><?php _e('From', DW_L10N_DOMAIN); ?></td>
49
- <td><input id="date_start" type="text" name="date_start" value="<?php echo ( isset($date_start) ? $date_start : '' ); ?>" size="10" maxlength="10" /> <img src="<?php echo $DW->plugin_url; ?>img/calendar.gif" alt="Calendar" onclick="showCalendar('date_start')" /></td>
50
  </tr>
51
  <tr>
52
  <td style="width:45px;"><?php _e('To', DW_L10N_DOMAIN); ?></td>
53
- <td><input id="date_end" type="text" name="date_end" value="<?php echo ( isset($date_end) ? $date_end : '' ); ?>" size="10" maxlength="10" /> <img src="<?php echo $DW->plugin_url; ?>img/calendar.gif" alt="Calendar" onclick="showCalendar('date_end')" /></td>
54
  </tr>
55
  </table>
56
  </div>
1
  <?php
2
  /**
3
  * Date Module
4
+ * Can't use DWOpts object because value = the actual date
5
  *
6
+ * @version $Id: date_module.php 402236 2011-06-28 20:46:55Z qurl $
7
  * @copyright 2011 Jacco Drabbe
8
  */
9
 
10
  $date_yes_selected = 'checked="checked"';
11
+ $opt_date = $DW->getOpt($_GET['id'], 'date');
12
  if ( count($opt_date) > 0 ) {
13
  foreach ( $opt_date as $value ) {
14
+ switch ( $value->name ) {
15
  case 'date_start':
16
+ $date_start = $value->value;
17
  break;
18
 
19
  case 'date_end':
20
+ $date_end = $value->value;
21
  break;
22
  }
23
  }
27
  }
28
  ?>
29
 
30
+ <h4><b><?php _e('Date'); ?></b><?php echo ( count($opt_date) > 0 ) ? ' <img src="' . $DW->plugin_url . 'img/checkmark.gif" alt="Checkmark" />' : ''; ?></h4>
31
  <div class="dynwid_conf">
32
  <?php _e('Show widget always?', DW_L10N_DOMAIN); ?> <img src="<?php echo $DW->plugin_url; ?>img/info.gif" alt="info" title="<?php _e('Click to toggle info', DW_L10N_DOMAIN) ?>" onclick="divToggle('date');" /><br />
33
  <?php $DW->dumpOpt($opt_date); ?>
41
  ', DW_L10N_DOMAIN); ?>
42
  </div>
43
  </div>
44
+ <input type="radio" name="date" value="yes" id="date-yes" <?php echo ( isset($date_yes_selected) ) ? $date_yes_selected : ''; ?> onclick="swTxt(cDate, true);" /> <label for="date-yes"><?php _e('Yes'); ?></label>
45
+ <input type="radio" name="date" value="no" id="date-no" <?php echo ( isset($date_no_selected) ) ? $date_no_selected : ''; ?> onclick="swTxt(cDate, false)" /> <label for="date-no"><?php _e('No'); ?>, <?php _e('only', DW_L10N_DOMAIN); ?>:</label><br />
46
  <div id="date-select" class="condition-select">
47
  <table border="0" cellspacing="0" cellpadding="0">
48
  <tr>
49
  <td style="width:45px;"><?php _e('From', DW_L10N_DOMAIN); ?></td>
50
+ <td><input id="date_start" type="text" name="date_start" value="<?php echo ( isset($date_start) ) ? $date_start : ''; ?>" size="10" maxlength="10" /> <img src="<?php echo $DW->plugin_url; ?>img/calendar.gif" alt="Calendar" onclick="showCalendar('date_start')" /></td>
51
  </tr>
52
  <tr>
53
  <td style="width:45px;"><?php _e('To', DW_L10N_DOMAIN); ?></td>
54
+ <td><input id="date_end" type="text" name="date_end" value="<?php echo ( isset($date_end) ) ? $date_end : ''; ?>" size="10" maxlength="10" /> <img src="<?php echo $DW->plugin_url; ?>img/calendar.gif" alt="Calendar" onclick="showCalendar('date_end')" /></td>
55
  </tr>
56
  </table>
57
  </div>
mods/error_module.php CHANGED
@@ -2,25 +2,17 @@
2
  /**
3
  * Error Module
4
  *
5
- * @version $Id: error_module.php 348295 2011-02-20 20:13:21Z qurl $
6
  * @copyright 2011 Jacco Drabbe
7
  */
8
 
9
- $e404_yes_selected = 'checked="checked"';
10
- $opt_e404 = $DW->getOptions($_GET['id'], 'e404');
11
- if ( count($opt_e404) > 0 ) {
12
- $e404_condition = $opt_e404[0]['value'];
13
- if ( $e404_condition == '0' ) {
14
- $e404_no_selected = $e404_yes_selected;
15
- unset($e404_yes_selected);
16
- }
17
- }
18
  ?>
19
 
20
- <h4><b><?php _e('Error Page', DW_L10N_DOMAIN); ?></b><?php echo ( count($opt_e404) > 0 ? ' <img src="' . $DW->plugin_url . 'img/checkmark.gif" alt="Checkmark" />' : '' ); ?></h4>
21
  <div class="dynwid_conf">
22
  <?php _e('Show widget on the error page?', DW_L10N_DOMAIN); ?><br />
23
  <?php $DW->dumpOpt($opt_e404); ?>
24
- <input type="radio" name="e404" value="yes" id="e404-yes" <?php echo ( isset($e404_yes_selected) ? $e404_yes_selected : '' ); ?> /> <label for="e404-yes"><?php _e('Yes'); ?></label>
25
- <input type="radio" name="e404" value="no" id="e404-no" <?php echo ( isset($e404_no_selected) ? $e404_no_selected : '' ); ?> /> <label for="e404-no"><?php _e('No'); ?></label>
26
  </div><!-- end dynwid_conf -->
2
  /**
3
  * Error Module
4
  *
5
+ * @version $Id: error_module.php 402236 2011-06-28 20:46:55Z qurl $
6
  * @copyright 2011 Jacco Drabbe
7
  */
8
 
9
+ $opt_e404 = $DW->getDWOpt($_GET['id'], 'e404');
 
 
 
 
 
 
 
 
10
  ?>
11
 
12
+ <h4><b><?php _e('Error Page', DW_L10N_DOMAIN); ?></b><?php echo ( ($opt_e404->count) > 0 ) ? ' <img src="' . $DW->plugin_url . 'img/checkmark.gif" alt="Checkmark" />' : ''; ?></h4>
13
  <div class="dynwid_conf">
14
  <?php _e('Show widget on the error page?', DW_L10N_DOMAIN); ?><br />
15
  <?php $DW->dumpOpt($opt_e404); ?>
16
+ <input type="radio" name="e404" value="yes" id="e404-yes" <?php echo ( $opt_e404->selectYes() ) ? $opt_e404->checked : ''; ?> /> <label for="e404-yes"><?php _e('Yes'); ?></label>
17
+ <input type="radio" name="e404" value="no" id="e404-no" <?php echo ( $opt_e404->selectNo() ) ? $opt_e404->checked : ''; ?> /> <label for="e404-no"><?php _e('No'); ?></label>
18
  </div><!-- end dynwid_conf -->
mods/frontpage_module.php CHANGED
@@ -2,22 +2,15 @@
2
  /**
3
  * Front Page Module
4
  *
5
- * @version $Id: frontpage_module.php 348295 2011-02-20 20:13:21Z qurl $
6
  * @copyright 2011 Jacco Drabbe
7
  */
8
 
9
  if ( get_option('show_on_front') != 'page' ) {
10
- $frontpage_yes_selected = 'checked="checked"';
11
- $opt_frontpage = $DW->getOptions($_GET['id'], 'front-page');
12
- if ( count($opt_frontpage) > 0 ) {
13
- $frontpage_condition = $opt_frontpage[0]['value'];
14
- if ( $frontpage_condition == '0' ) {
15
- $frontpage_no_selected = $frontpage_yes_selected;
16
- unset($frontpage_yes_selected);
17
- }
18
- }
19
  ?>
20
- <h4><b><?php _e('Front Page', DW_L10N_DOMAIN); ?></b><?php echo ( count($opt_frontpage) > 0 ? ' <img src="' . $DW->plugin_url . 'img/checkmark.gif" alt="Checkmark" />' : '' ); ?></h4>
 
21
  <div class="dynwid_conf">
22
  <?php _e('Show widget on the front page?', DW_L10N_DOMAIN) ?> <img src="<?php echo $DW->plugin_url; ?>img/info.gif" alt="info" onclick="divToggle('frontpage');" /><br />
23
  <?php $DW->dumpOpt($opt_frontpage); ?>
@@ -28,7 +21,8 @@
28
  ', DW_L10N_DOMAIN); ?>
29
  </div>
30
  </div>
31
- <input type="radio" name="front-page" value="yes" id="front-page-yes" <?php echo ( isset($frontpage_yes_selected) ? $frontpage_yes_selected : '' ); ?> /> <label for="front-page-yes"><?php _e('Yes'); ?></label>
32
- <input type="radio" name="front-page" value="no" id="front-page-no" <?php echo ( isset($frontpage_no_selected) ? $frontpage_no_selected : '' ); ?> /> <label for="front-page-no"><?php _e('No'); ?></label>
33
  </div><!-- end dynwid_conf -->
 
34
  <?php } ?>
2
  /**
3
  * Front Page Module
4
  *
5
+ * @version $Id: frontpage_module.php 402236 2011-06-28 20:46:55Z qurl $
6
  * @copyright 2011 Jacco Drabbe
7
  */
8
 
9
  if ( get_option('show_on_front') != 'page' ) {
10
+ $opt_frontpage = $DW->getDWOpt($_GET['id'], 'front-page');
 
 
 
 
 
 
 
 
11
  ?>
12
+
13
+ <h4><b><?php _e('Front Page', DW_L10N_DOMAIN); ?></b><?php echo ( $opt_frontpage->count > 0 ) ? ' <img src="' . $DW->plugin_url . 'img/checkmark.gif" alt="Checkmark" />' : ''; ?></h4>
14
  <div class="dynwid_conf">
15
  <?php _e('Show widget on the front page?', DW_L10N_DOMAIN) ?> <img src="<?php echo $DW->plugin_url; ?>img/info.gif" alt="info" onclick="divToggle('frontpage');" /><br />
16
  <?php $DW->dumpOpt($opt_frontpage); ?>
21
  ', DW_L10N_DOMAIN); ?>
22
  </div>
23
  </div>
24
+ <input type="radio" name="front-page" value="yes" id="front-page-yes" <?php echo ( $opt_frontpage->selectYes() ) ? $opt_frontpage->checked : ''; ?> /> <label for="front-page-yes"><?php _e('Yes'); ?></label>
25
+ <input type="radio" name="front-page" value="no" id="front-page-no" <?php echo ( $opt_frontpage->selectNo() ) ? $opt_frontpage->checked : ''; ?> /> <label for="front-page-no"><?php _e('No'); ?></label>
26
  </div><!-- end dynwid_conf -->
27
+
28
  <?php } ?>
mods/pages_module.php CHANGED
@@ -2,11 +2,22 @@
2
  /**
3
  * Pages Module
4
  *
5
- * @version $Id: pages_module.php 348295 2011-02-20 20:13:21Z qurl $
6
  * @copyright 2011 Jacco Drabbe
7
  */
8
 
9
- define('DW_PAGE_LIMIT', 500);
 
 
 
 
 
 
 
 
 
 
 
10
 
11
  function getPageChilds($arr, $id, $i) {
12
  $pg = get_pages('child_of=' . $id);
@@ -29,7 +40,7 @@
29
  echo '<input type="checkbox" id="page_act_' . $page->ID . '" name="page_act[]" value="' . $page->ID . '" ' . ( isset($page_act) && count($page_act) > 0 && in_array($page->ID, $page_act) ? 'checked="checked"' : '' ) . ' onchange="chkChild(' . $pid . ')" /> <label for="page_act_' . $page->ID . '">' . $page->post_title . ' ' . ( get_option('show_on_front') == 'page' && isset($static_page[$page->ID]) ? '(' . $static_page[$page->ID] . ')' : '' ) . '</label><br />';
30
 
31
  echo '<div style="position:relative;left:15px;">';
32
- echo '<input type="checkbox" id="child_' . $pid . '" name="page_childs_act[]" value="' . $pid . '" ' . ( isset($page_childs_act) && count($page_childs_act) > 0 && in_array($pid, $page_childs_act) ? 'checked="checked"' : '' ) . ' onchange="chkParent(' . $pid . ')" /> <label for="child_' . $pid . '"><em>' . __('All childs', DW_L10N_DOMAIN) . '</em></label><br />';
33
  echo '</div>';
34
 
35
  if ( count($childs) > 0 ) {
@@ -45,40 +56,21 @@
45
  }
46
  }
47
 
48
- $page_yes_selected = 'checked="checked"';
49
- $opt_page = $DW->getOptions($_GET['id'], 'page');
50
- if ( count($opt_page) > 0 ) {
51
- $page_act = array();
52
- foreach ( $opt_page as $page_condition ) {
53
- if ( $page_condition['maintype'] == 'page' ) {
54
- if ( $page_condition['name'] == 'default' || empty($page_condition['name']) ) {
55
- $page_default = $page_condition['value'];
56
- } else {
57
- $page_act[ ] = $page_condition['name'];
58
- }
59
- }
60
- }
61
-
62
- if ( $page_default == '0' ) {
63
- $page_no_selected = $page_yes_selected;
64
- unset($page_yes_selected);
65
- }
66
-
67
- // -- Childs
68
- $opt_page_childs = $DW->getOptions($_GET['id'], 'page-childs');
69
- if ( count($opt_page_childs) > 0 ) {
70
- $page_childs_act = array();
71
- foreach ( $opt_page_childs as $child_condition ) {
72
- if ( $child_condition['name'] != 'default' ) {
73
- $page_childs_act[ ] = $child_condition['name'];
74
- }
75
- }
76
- }
77
  }
78
 
79
  $pages = get_pages();
80
  $num_pages = count($pages);
81
- if ( $num_pages > DW_LIST_LIMIT ) {
 
 
 
 
 
 
 
82
  $page_condition_select_style = DW_LIST_STYLE;
83
  }
84
 
@@ -94,12 +86,8 @@
94
  $static_page[$id] = __('Posts page', DW_L10N_DOMAIN);
95
  }
96
  }
97
-
98
- if ( $num_pages < DW_PAGE_LIMIT ) {
99
- $pagemap = getPageChilds(array(), 0, array());
100
- }
101
  ?>
102
- <h4><b><?php _e('Pages'); ?></b> <?php echo ( count($opt_page) > 0 ? ' <img src="' . $DW->plugin_url . 'img/checkmark.gif" alt="Checkmark" />' : '' ) . ( $DW->wpml ? $wpml_icon : '' ); ?></h4>
103
  <div class="dynwid_conf">
104
  <?php _e('Show widget default on static pages?', DW_L10N_DOMAIN); ?> <img src="<?php echo $DW->plugin_url; ?>img/info.gif" alt="info" title="<?php _e('Click to toggle info', DW_L10N_DOMAIN); ?>" onclick="divToggle('pages');" /><br />
105
  <?php $DW->dumpOpt($opt_page); ?>
@@ -119,12 +107,14 @@
119
  ?>
120
  </div>
121
  </div>
122
- <input type="radio" name="page" value="yes" id="page-yes" <?php echo ( isset($page_yes_selected) ? $page_yes_selected : '' ); ?> /> <label for="page-yes"><?php _e('Yes'); ?></label>
123
- <input type="radio" name="page" value="no" id="page-no" <?php echo ( isset($page_no_selected) ? $page_no_selected : '' ); ?> /> <label for="page-no"><?php _e('No'); ?></label><br />
 
124
  <?php _e('Except the page(s)', DW_L10N_DOMAIN); ?>:<br />
125
- <div id="page-select" class="condition-select" <?php echo ( isset($page_condition_select_style) ? $page_condition_select_style : '' ); ?>>
126
  <div style="position:relative;left:-15px">
127
- <?php ( $num_pages < DW_PAGE_LIMIT ? prtPgs($pagemap, $page_act, $page_childs_act, $static_page) : lsPages($pages, $static_page, $page_act) ); ?>
128
  </div>
129
  </div>
 
130
  </div><!-- end dynwid_conf -->
2
  /**
3
  * Pages Module
4
  *
5
+ * @version $Id: pages_module.php 403464 2011-07-01 20:30:55Z qurl $
6
  * @copyright 2011 Jacco Drabbe
7
  */
8
 
9
+ // Abort function when timeout occurs
10
+ register_shutdown_function('dw_abort');
11
+ function dw_abort() {
12
+ if ( connection_status() == CONNECTION_TIMEOUT ) {
13
+ echo '<div class="error" id="message"><p><strong>';
14
+ _e('The static page module failed to load.', DW_L10N_DOMAIN);
15
+ echo '</strong><br />';
16
+ _e('This is probably because building the hierarchical tree took too long.<br />Decrease the limit of number of pages in the advanced settings.', DW_L10N_DOMAIN);
17
+ echo '</p></div>';
18
+ }
19
+ exit();
20
+ }
21
 
22
  function getPageChilds($arr, $id, $i) {
23
  $pg = get_pages('child_of=' . $id);
40
  echo '<input type="checkbox" id="page_act_' . $page->ID . '" name="page_act[]" value="' . $page->ID . '" ' . ( isset($page_act) && count($page_act) > 0 && in_array($page->ID, $page_act) ? 'checked="checked"' : '' ) . ' onchange="chkChild(' . $pid . ')" /> <label for="page_act_' . $page->ID . '">' . $page->post_title . ' ' . ( get_option('show_on_front') == 'page' && isset($static_page[$page->ID]) ? '(' . $static_page[$page->ID] . ')' : '' ) . '</label><br />';
41
 
42
  echo '<div style="position:relative;left:15px;">';
43
+ echo '<input type="checkbox" id="page_childs_act_' . $pid . '" name="page_childs_act[]" value="' . $pid . '" ' . ( isset($page_childs_act) && count($page_childs_act) > 0 && in_array($pid, $page_childs_act) ? 'checked="checked"' : '' ) . ' onchange="chkParent(' . $pid . ')" /> <label for="page_childs_act_' . $pid . '"><em>' . __('All childs', DW_L10N_DOMAIN) . '</em></label><br />';
44
  echo '</div>';
45
 
46
  if ( count($childs) > 0 ) {
56
  }
57
  }
58
 
59
+ $opt_page = $DW->getDWOpt($_GET['id'], 'page');
60
+ if ( $opt_page->count > 0 ) {
61
+ $opt_page_childs = $DW->getDWOpt($_GET['id'], 'page-childs');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
62
  }
63
 
64
  $pages = get_pages();
65
  $num_pages = count($pages);
66
+
67
+ // For childs we double the number of pages because of addition of 'All childs' option
68
+ if ( $num_pages < DW_PAGE_LIMIT ) {
69
+ $pagemap = getPageChilds(array(), 0, array());
70
+ $num_pages = $num_pages * 2;
71
+ }
72
+
73
+ if ( $num_pages > DW_LIST_LIMIT ) {
74
  $page_condition_select_style = DW_LIST_STYLE;
75
  }
76
 
86
  $static_page[$id] = __('Posts page', DW_L10N_DOMAIN);
87
  }
88
  }
 
 
 
 
89
  ?>
90
+ <h4><b><?php _e('Pages'); ?></b> <?php echo ( ($opt_page->count > 0) ? ' <img src="' . $DW->plugin_url . 'img/checkmark.gif" alt="Checkmark" />' : '' ) . ( ($DW->wpml) ? $wpml_icon : '' ); ?></h4>
91
  <div class="dynwid_conf">
92
  <?php _e('Show widget default on static pages?', DW_L10N_DOMAIN); ?> <img src="<?php echo $DW->plugin_url; ?>img/info.gif" alt="info" title="<?php _e('Click to toggle info', DW_L10N_DOMAIN); ?>" onclick="divToggle('pages');" /><br />
93
  <?php $DW->dumpOpt($opt_page); ?>
107
  ?>
108
  </div>
109
  </div>
110
+ <input type="radio" name="page" value="yes" id="page-yes" <?php echo ( ($opt_page->selectYes()) ? $opt_page->checked : '' ); ?> /> <label for="page-yes"><?php _e('Yes'); ?></label>
111
+ <input type="radio" name="page" value="no" id="page-no" <?php echo ( ($opt_page->selectNo()) ? $opt_page->checked : '' ); ?> /> <label for="page-no"><?php _e('No'); ?></label><br />
112
+ <?php if ( $num_pages > 0 ) { ?>
113
  <?php _e('Except the page(s)', DW_L10N_DOMAIN); ?>:<br />
114
+ <div id="page-select" class="condition-select" <?php echo ( (isset($page_condition_select_style)) ? $page_condition_select_style : '' ); ?>>
115
  <div style="position:relative;left:-15px">
116
+ <?php ( ($num_pages < DW_PAGE_LIMIT) ? prtPgs($pagemap, $opt_page->act, $opt_page_childs->act, $static_page) : lsPages($pages, $static_page, $opt_page->act) ); ?>
117
  </div>
118
  </div>
119
+ <?php } ?>
120
  </div><!-- end dynwid_conf -->
mods/role_module.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Role Module
4
  *
5
- * @version $Id: role_module.php 348295 2011-02-20 20:13:21Z qurl $
6
  * @copyright 2011 Jacco Drabbe
7
  */
8
 
@@ -17,26 +17,10 @@
17
  $role_condition_select_style = DW_LIST_STYLE;
18
  }
19
 
20
- $role_yes_selected = 'checked="checked"';
21
- $opt_role = $DW->getOptions($_GET['id'], 'role');
22
- if ( count($opt_role) > 0 ) {
23
- $role_act = array();
24
- foreach ( $opt_role as $role_condition ) {
25
- if ( $role_condition['name'] == 'default' || empty($role_condition['name']) ) {
26
- $role_default = $role_condition['value'];
27
- } else {
28
- $role_act[ ] = $role_condition['name'];
29
- }
30
- }
31
-
32
- if ( $role_default == '0' ) {
33
- $role_no_selected = $role_yes_selected;
34
- unset($role_yes_selected);
35
- }
36
- }
37
  ?>
38
 
39
- <h4><b><?php _e('Role'); ?></b><?php echo ( count($opt_role) > 0 ? ' <img src="' . $DW->plugin_url . 'img/checkmark.gif" alt="Checkmark" />' : '' ); ?></h4>
40
  <div class="dynwid_conf">
41
  <?php _e('Show widget to everybody?', DW_L10N_DOMAIN); ?> <img src="<?php echo $DW->plugin_url; ?>img/info.gif" alt="info" title="<?php _e('Click to toggle info', DW_L10N_DOMAIN) ?>" onclick="divToggle('role');" /><br />
42
  <?php $DW->dumpOpt($opt_role); ?>
@@ -46,11 +30,11 @@
46
  Users who are not logged in, get the <em>Anonymous</em> role.', DW_L10N_DOMAIN); ?>
47
  </div>
48
  </div>
49
- <input type="radio" name="role" value="yes" id="role-yes" <?php echo ( isset($role_yes_selected) ? $role_yes_selected : '' ); ?> onclick="swChb(cRole, true);" /> <label for="role-yes"><?php _e('Yes'); ?></label>
50
- <input type="radio" name="role" value="no" id="role-no" <?php echo ( isset($role_no_selected) ? $role_no_selected : '' ); ?> onclick="swChb(cRole, false)" /> <label for="role-no"><?php _e('No'); ?>, <?php _e('only to', DW_L10N_DOMAIN); ?>:</label><br />
51
- <div id="role-select" class="condition-select" <?php echo ( isset($role_condition_select_style) ? $role_condition_select_style : '' ); ?>>
52
  <?php foreach ( $roles as $rid => $role ) { ?>
53
- <input type="checkbox" id="role_act_<?php echo $rid; ?>" name="role_act[]" value="<?php echo $rid; ?>" <?php echo ( isset($role_act) && count($role_act) > 0 && in_array($rid, $role_act) ) ? 'checked="checked"' : ''; ?> /> <label for="role_act_<?php echo $rid; ?>"><?php echo $role; ?></label><br />
54
  <?php } ?>
55
  </div>
56
  </div><!-- end dynwid_conf -->
2
  /**
3
  * Role Module
4
  *
5
+ * @version $Id: role_module.php 402236 2011-06-28 20:46:55Z qurl $
6
  * @copyright 2011 Jacco Drabbe
7
  */
8
 
17
  $role_condition_select_style = DW_LIST_STYLE;
18
  }
19
 
20
+ $opt_role = $DW->getDWOpt($_GET['id'], 'role');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
  ?>
22
 
23
+ <h4><b><?php _e('Role'); ?></b><?php echo ( $opt_role->count > 0 ) ? ' <img src="' . $DW->plugin_url . 'img/checkmark.gif" alt="Checkmark" />' : ''; ?></h4>
24
  <div class="dynwid_conf">
25
  <?php _e('Show widget to everybody?', DW_L10N_DOMAIN); ?> <img src="<?php echo $DW->plugin_url; ?>img/info.gif" alt="info" title="<?php _e('Click to toggle info', DW_L10N_DOMAIN) ?>" onclick="divToggle('role');" /><br />
26
  <?php $DW->dumpOpt($opt_role); ?>
30
  Users who are not logged in, get the <em>Anonymous</em> role.', DW_L10N_DOMAIN); ?>
31
  </div>
32
  </div>
33
+ <input type="radio" name="role" value="yes" id="role-yes" <?php echo ( $opt_role->selectYes() ) ? $opt_role->checked : ''; ?> onclick="swChb(cRole, true);" /> <label for="role-yes"><?php _e('Yes'); ?></label>
34
+ <input type="radio" name="role" value="no" id="role-no" <?php echo ( $opt_role->selectNo() ) ? $opt_role->checked : ''; ?> onclick="swChb(cRole, false)" /> <label for="role-no"><?php _e('No'); ?>, <?php _e('only to', DW_L10N_DOMAIN); ?>:</label><br />
35
+ <div id="role-select" class="condition-select" <?php echo ( isset($role_condition_select_style) ) ? $role_condition_select_style : ''; ?>>
36
  <?php foreach ( $roles as $rid => $role ) { ?>
37
+ <input type="checkbox" id="role_act_<?php echo $rid; ?>" name="role_act[]" value="<?php echo $rid; ?>" <?php echo ( $opt_role->count > 0 && in_array($rid, $opt_role->act) ) ? 'checked="checked"' : ''; ?> /> <label for="role_act_<?php echo $rid; ?>"><?php echo $role; ?></label><br />
38
  <?php } ?>
39
  </div>
40
  </div><!-- end dynwid_conf -->
mods/search_module.php CHANGED
@@ -3,25 +3,17 @@
3
  /**
4
  * Search Module
5
  *
6
- * @version $Id: search_module.php 348295 2011-02-20 20:13:21Z qurl $
7
  * @copyright 2011 Jacco Drabbe
8
  */
9
 
10
- $search_yes_selected = 'checked="checked"';
11
- $opt_search = $DW->getOptions($_GET['id'], 'search');
12
- if ( count($opt_search) > 0 ) {
13
- $search_condition = $opt_search[0]['value'];
14
- if ( $search_condition == '0' ) {
15
- $search_no_selected = $search_yes_selected;
16
- unset($search_yes_selected);
17
- }
18
- }
19
  ?>
20
 
21
- <h4><b><?php _e('Search Page', DW_L10N_DOMAIN); ?></b><?php echo ( count($opt_search) > 0 ? ' <img src="' . $DW->plugin_url . 'img/checkmark.gif" alt="Checkmark" />' : '' ); ?></h4>
22
  <div class="dynwid_conf">
23
  <?php _e('Show widget on the search page?', DW_L10N_DOMAIN); ?><br />
24
  <?php $DW->dumpOpt($opt_search); ?>
25
- <input type="radio" name="search" value="yes" id="search-yes" <?php echo ( isset($search_yes_selected) ? $search_yes_selected : '' ); ?> /> <label for="search-yes"><?php _e('Yes'); ?></label>
26
- <input type="radio" name="search" value="no" id="search-no" <?php echo ( isset($search_no_selected) ? $search_no_selected : '' ); ?> /> <label for="search-no"><?php _e('No'); ?></label>
27
  </div><!-- end dynwid_conf -->
3
  /**
4
  * Search Module
5
  *
6
+ * @version $Id: search_module.php 402236 2011-06-28 20:46:55Z qurl $
7
  * @copyright 2011 Jacco Drabbe
8
  */
9
 
10
+ $opt_search = $DW->getDWOpt($_GET['id'], 'search');
 
 
 
 
 
 
 
 
11
  ?>
12
 
13
+ <h4><b><?php _e('Search Page', DW_L10N_DOMAIN); ?></b><?php echo ( $opt_search->count > 0 ) ? ' <img src="' . $DW->plugin_url . 'img/checkmark.gif" alt="Checkmark" />' : ''; ?></h4>
14
  <div class="dynwid_conf">
15
  <?php _e('Show widget on the search page?', DW_L10N_DOMAIN); ?><br />
16
  <?php $DW->dumpOpt($opt_search); ?>
17
+ <input type="radio" name="search" value="yes" id="search-yes" <?php echo ( $opt_search->selectYes() ) ? $opt_search->checked : ''; ?> /> <label for="search-yes"><?php _e('Yes'); ?></label>
18
+ <input type="radio" name="search" value="no" id="search-no" <?php echo ( $opt_search->selectNo() ) ? $opt_search->checked : ''; ?> /> <label for="search-no"><?php _e('No'); ?></label>
19
  </div><!-- end dynwid_conf -->
mods/single_module.php CHANGED
@@ -2,40 +2,23 @@
2
  /**
3
  * Single Post Module
4
  *
5
- * @version $Id: single_module.php 348295 2011-02-20 20:13:21Z qurl $
6
  * @copyright 2011 Jacco Drabbe
7
  */
8
 
9
- $single_yes_selected = 'checked="checked"';
10
- $single_condition = '1';
11
- $opt_single = $DW->getOptions($_GET['id'], 'single');
12
- if ( count($opt_single) > 0 ) {
13
- foreach ( $opt_single as $widget ) {
14
- if ( $widget['maintype'] == 'single' ) {
15
- $single_condition = $widget['value'];
16
- }
17
- }
18
- if ( $single_condition == '0' ) {
19
- $single_no_selected = $single_yes_selected;
20
- unset($single_yes_selected);
21
- }
22
- }
23
 
24
  // -- Author
25
- $authors = get_users_of_blog();
26
  if ( count($authors) > DW_LIST_LIMIT ) {
27
  $author_condition_select_style = DW_LIST_STYLE;
28
  }
29
 
30
  $js_count = 0;
31
- $opt_single_author = $DW->getOptions($_GET['id'], 'single-author');
32
  $js_author_array = array();
33
- if ( count($opt_single_author) > 0 ) {
34
- $js_count = $js_count + count($opt_single_author) - 1;
35
- $single_author_act = array();
36
- foreach ( $opt_single_author as $single_author_condition ) {
37
- $single_author_act[ ] = $single_author_condition['name'];
38
- }
39
  }
40
 
41
  // -- Category
@@ -44,50 +27,30 @@
44
  $category_condition_select_style = DW_LIST_STYLE;
45
  }
46
 
47
- $opt_single_category = $DW->getOptions($_GET['id'], 'single-category');
48
  $js_category_array = array();
49
- if ( count($opt_single_category) > 0 ) {
50
- $js_count = $js_count + count($opt_single_category) - 1;
51
- $single_category_act = array();
52
- foreach ( $opt_single_category as $single_category_condition ) {
53
- $single_category_act[ ] = $single_category_condition['name'];
54
- }
55
  }
56
 
57
- // -- Individual / Posts / Tags
58
- $individual = FALSE;
59
- $opt_individual = $DW->getOptions($_GET['id'], 'individual');
60
- $single_post_act = array();
61
- $single_tag_act = array();
62
-
63
- if ( count($opt_individual) > 0 ) {
64
- $individual_condition = $opt_individual[0]['value'];
65
- if ( $individual_condition == 1 ) {
66
- $individual = TRUE;
67
 
68
- $opt_single_post = $DW->getOptions($_GET['id'], 'single-post');
69
- if ( count($opt_single_post) > 0 ) {
70
- foreach ( $opt_single_post as $single_post_condition ) {
71
- if ( $single_post_condition['name'] != 'default' ) {
72
- $single_post_act[ ] = $single_post_condition['name'];
73
- }
74
- }
75
- }
76
 
77
- $opt_single_tag = $DW->getOptions($_GET['id'], 'single-tag');
78
- if ( count($opt_single_tag) > 0 ) {
79
- foreach ( $opt_single_tag as $single_tag_condition ) {
80
- if ( $single_tag_condition['name'] != 'default' ) {
81
- $single_tag_act[ ] = $single_tag_condition['name'];
82
- }
83
- }
84
- }
85
- $count_individual = '(' . __('Posts: ', DW_L10N_DOMAIN) . count($single_post_act) . ', ' . __('Tags: ', DW_L10N_DOMAIN) . count($single_tag_act) . ')';
86
- }
87
  }
 
 
88
  ?>
89
 
90
- <h4><b><?php _e('Single Posts', DW_L10N_DOMAIN); ?></b><?php echo ( count($opt_single) > 0 || count($opt_single_author) > 0 || count($opt_single_category) > 0 || count($opt_single_post) > 0 || count($opt_single_tag) > 0 ? ' <img src="' . $DW->plugin_url . 'img/checkmark.gif" alt="Checkmark" />' : '' ); ?></h4>
91
  <div class="dynwid_conf">
92
  <?php _e('Show widget default on single posts?', DW_L10N_DOMAIN) ?> <img src="<?php echo $DW->plugin_url; ?>img/info.gif" alt="info" title="<?php _e('Click to toggle info', DW_L10N_DOMAIN) ?>" onclick="divToggle('single')" /><br />
93
  <?php $DW->dumpOpt($opt_single); ?>
@@ -98,11 +61,11 @@
98
  ', DW_L10N_DOMAIN); ?>
99
  </div>
100
  </div>
101
- <input type="radio" name="single" value="yes" id="single-yes" <?php echo ( isset($single_yes_selected) ? $single_yes_selected : '' ); ?> /> <label for="single-yes"><?php _e('Yes'); ?></label>
102
- <input type="radio" name="single" value="no" id="single-no" <?php echo ( isset($single_no_selected) ? $single_no_selected : '' ); ?> /> <label for="single-no"><?php _e('No'); ?></label><br />
103
  <?php $DW->dumpOpt($opt_individual); ?>
104
  <input type="checkbox" id="individual" name="individual" value="1" <?php echo ( $individual ) ? 'checked="checked"' : ''; ?> onclick="chkInPosts()" />
105
- <label for="individual"><?php _e('Make exception rule available to individual posts and tags.', DW_L10N_DOMAIN) ?> <?php echo ( isset($count_individual) ? $count_individual : '' ); ?></label>
106
  <img src="<?php echo $DW->plugin_url; ?>img/info.gif" alt="info" title="<?php _e('Click to toggle info', DW_L10N_DOMAIN) ?>" onclick="divToggle('individual_post_tag')" />
107
  <div>
108
  <div id="individual_post_tag" class="infotext">
@@ -114,10 +77,10 @@
114
  ', DW_L10N_DOMAIN); ?>
115
  </div>
116
  </div>
117
- <?php foreach ( $single_post_act as $singlepost ) { ?>
118
  <input type="hidden" name="single_post_act[]" value="<?php echo $singlepost; ?>" />
119
  <?php } ?>
120
- <?php foreach ( $single_tag_act as $tag ) { ?>
121
  <input type="hidden" name="single_tag_act[]" value="<?php echo $tag; ?>" />
122
  <?php } ?>
123
  <table border="0" cellspacing="0" cellpadding="0">
@@ -125,22 +88,19 @@
125
  <td valign="top">
126
  <?php _e('Except the posts by author', DW_L10N_DOMAIN); ?>:
127
  <?php $DW->dumpOpt($opt_single_author); ?>
128
- <div id="single-author-select" class="condition-select" <?php echo ( isset($author_condition_select_style) ? $author_condition_select_style : '' ); ?>>
129
  <?php foreach ( $authors as $author ) { ?>
130
  <?php $js_author_array[ ] = '\'single_author_act_' . $author->ID . '\''; ?>
131
- <input type="checkbox" id="single_author_act_<?php echo $author->ID; ?>" name="single_author_act[]" value="<?php echo $author->ID; ?>" <?php echo ( isset($single_author_act) && count($single_author_act) > 0 && in_array($author->ID,$single_author_act) ) ? 'checked="checked"' : ''; ?> onclick="ci('single_author_act_<?php echo $author->ID; ?>')" /> <label for="single_author_act_<?php echo $author->ID; ?>"><?php echo $author->display_name; ?></label><br />
132
  <?php } ?>
133
  </div>
134
  </td>
135
  <td style="width:10px"></td>
136
  <td valign="top">
137
- <?php _e('Except the posts in category', DW_L10N_DOMAIN); ?>: <?php echo ( $DW->wpml ? $wpml_icon : '' ); ?>
138
  <?php $DW->dumpOpt($opt_single_category); ?>
139
- <div id="single-category-select" class="condition-select" <?php echo ( isset($category_condition_select_style) ? $category_condition_select_style : '' ); ?>>
140
- <?php foreach ( $category as $cat ) { ?>
141
- <?php $js_category_array[ ] = '\'single_cat_act_' . $cat->cat_ID . '\''; ?>
142
- <input type="checkbox" id="single_cat_act_<?php echo $cat->cat_ID; ?>" name="single_category_act[]" value="<?php echo $cat->cat_ID; ?>" <?php echo ( isset($single_category_act) && count($single_category_act) > 0 && in_array($cat->cat_ID,$single_category_act) ) ? 'checked="checked"' : ''; ?> onclick="ci('single_cat_act_<?php echo $cat->cat_ID; ?>')" /> <label for="single_cat_act_<?php echo $cat->cat_ID; ?>"><?php echo $cat->name; ?></label><br />
143
- <?php } ?>
144
  </div>
145
  </td>
146
  </tr>
2
  /**
3
  * Single Post Module
4
  *
5
+ * @version $Id: single_module.php 402236 2011-06-28 20:46:55Z qurl $
6
  * @copyright 2011 Jacco Drabbe
7
  */
8
 
9
+ $opt_single = $DW->getDWOpt($_GET['id'], 'single');
 
 
 
 
 
 
 
 
 
 
 
 
 
10
 
11
  // -- Author
12
+ $authors = get_users( array('who' => 'author') );
13
  if ( count($authors) > DW_LIST_LIMIT ) {
14
  $author_condition_select_style = DW_LIST_STYLE;
15
  }
16
 
17
  $js_count = 0;
18
+ $opt_single_author = $DW->getDWOpt($_GET['id'], 'single-author');
19
  $js_author_array = array();
20
+ if ( $opt_single_author->count > 0 ) {
21
+ $js_count = $js_count + $opt_single_author->count - 1;
 
 
 
 
22
  }
23
 
24
  // -- Category
27
  $category_condition_select_style = DW_LIST_STYLE;
28
  }
29
 
30
+ // For JS
31
  $js_category_array = array();
32
+ foreach ( $category as $cat ) {
33
+ $js_category_array[ ] = '\'single_category_act_' . $cat->cat_ID . '\'';
 
 
 
 
34
  }
35
 
36
+ $catmap = getCatChilds(array(), 0, array());
 
 
 
 
 
 
 
 
 
37
 
38
+ $opt_single_category = $DW->getDWOpt($_GET['id'], 'single-category');
39
+ if ( $opt_single_category->count > 0 ) {
40
+ $js_count = $js_count + $opt_single_category->count - 1;
41
+ }
 
 
 
 
42
 
43
+ // -- Individual / Posts / Tags
44
+ $opt_individual = $DW->getDWOpt($_GET['id'], 'individual');
45
+ if ( $opt_individual->count > 0 ) {
46
+ $individual = TRUE;
47
+ $count_individual = '(' . __('Posts: ', DW_L10N_DOMAIN) . $opt_single_post->count . ', ' . __('Tags: ', DW_L10N_DOMAIN) . $opt_single_tag->count . ')';
 
 
 
 
 
48
  }
49
+ $opt_single_post = $DW->getDWOpt($_GET['id'], 'single-post');
50
+ $opt_single_tag = $DW->getDWOpt($_GET['id'], 'single-tag');
51
  ?>
52
 
53
+ <h4><b><?php _e('Single Posts', DW_L10N_DOMAIN); ?></b><?php echo ( $opt_single->count > 0 || $opt_single_author->count > 0 || $opt_single_category->count > 0 || $opt_single_post->count > 0 || $opt_single_tag->count > 0 ) ? ' <img src="' . $DW->plugin_url . 'img/checkmark.gif" alt="Checkmark" />' : ''; ?></h4>
54
  <div class="dynwid_conf">
55
  <?php _e('Show widget default on single posts?', DW_L10N_DOMAIN) ?> <img src="<?php echo $DW->plugin_url; ?>img/info.gif" alt="info" title="<?php _e('Click to toggle info', DW_L10N_DOMAIN) ?>" onclick="divToggle('single')" /><br />
56
  <?php $DW->dumpOpt($opt_single); ?>
61
  ', DW_L10N_DOMAIN); ?>
62
  </div>
63
  </div>
64
+ <input type="radio" name="single" value="yes" id="single-yes" <?php echo ( $opt_single->selectYes() ) ? $opt_single->checked : ''; ?> /> <label for="single-yes"><?php _e('Yes'); ?></label>
65
+ <input type="radio" name="single" value="no" id="single-no" <?php echo ( $opt_single->selectNo() ) ? $opt_single->checked : ''; ?> /> <label for="single-no"><?php _e('No'); ?></label><br />
66
  <?php $DW->dumpOpt($opt_individual); ?>
67
  <input type="checkbox" id="individual" name="individual" value="1" <?php echo ( $individual ) ? 'checked="checked"' : ''; ?> onclick="chkInPosts()" />
68
+ <label for="individual"><?php _e('Make exception rule available to individual posts and tags.', DW_L10N_DOMAIN) ?> <?php echo ( $opt_individual->count > 0 ) ? $count_individual : ''; ?></label>
69
  <img src="<?php echo $DW->plugin_url; ?>img/info.gif" alt="info" title="<?php _e('Click to toggle info', DW_L10N_DOMAIN) ?>" onclick="divToggle('individual_post_tag')" />
70
  <div>
71
  <div id="individual_post_tag" class="infotext">
77
  ', DW_L10N_DOMAIN); ?>
78
  </div>
79
  </div>
80
+ <?php foreach ( $opt_single_post->act as $singlepost ) { ?>
81
  <input type="hidden" name="single_post_act[]" value="<?php echo $singlepost; ?>" />
82
  <?php } ?>
83
+ <?php foreach ( $opt_single_tag->act as $tag ) { ?>
84
  <input type="hidden" name="single_tag_act[]" value="<?php echo $tag; ?>" />
85
  <?php } ?>
86
  <table border="0" cellspacing="0" cellpadding="0">
88
  <td valign="top">
89
  <?php _e('Except the posts by author', DW_L10N_DOMAIN); ?>:
90
  <?php $DW->dumpOpt($opt_single_author); ?>
91
+ <div id="single-author-select" class="condition-select" <?php echo ( isset($author_condition_select_style) ) ? $author_condition_select_style : ''; ?>>
92
  <?php foreach ( $authors as $author ) { ?>
93
  <?php $js_author_array[ ] = '\'single_author_act_' . $author->ID . '\''; ?>
94
+ <input type="checkbox" id="single_author_act_<?php echo $author->ID; ?>" name="single_author_act[]" value="<?php echo $author->ID; ?>" <?php echo ( $opt_single_author->count > 0 && in_array($author->ID,$opt_single_author->act) ) ? 'checked="checked"' : ''; ?> onclick="ci('single_author_act_<?php echo $author->ID; ?>')" /> <label for="single_author_act_<?php echo $author->ID; ?>"><?php echo $author->display_name; ?></label><br />
95
  <?php } ?>
96
  </div>
97
  </td>
98
  <td style="width:10px"></td>
99
  <td valign="top">
100
+ <?php _e('Except the posts in category', DW_L10N_DOMAIN); ?>: <?php echo ( $DW->wpml ) ? $wpml_icon : ''; ?>
101
  <?php $DW->dumpOpt($opt_single_category); ?>
102
+ <div id="single-category-select" class="condition-select" <?php echo ( isset($category_condition_select_style) ) ? $category_condition_select_style : ''; ?>>
103
+ <?php prtCat($catmap, $opt_single_category->act, TRUE); ?>
 
 
 
104
  </div>
105
  </td>
106
  </tr>
mods/tpl_module.php ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ *
5
+ *
6
+ * @version $Id: tpl_module.php 402236 2011-06-28 20:46:55Z qurl $
7
+ * @copyright 2011 Jacco Drabbe
8
+ */
9
+
10
+ $tpl = get_page_templates();
11
+ $num_tpl = count($tpl);
12
+
13
+ if ( $num_tpl > 0 ) {
14
+ if ( $num_tpl > DW_LIST_LIMIT ) {
15
+ $tpl_condition_select_style = DW_LIST_STYLE;
16
+ }
17
+
18
+ $opt_tpl = $DW->getDWOpt($_GET['id'], 'tpl');
19
+ ?>
20
+
21
+ <h4><b><?php _e('Templates'); ?></b><?php echo ( $opt_tpl->count > 0 ) ? ' <img src="' . $DW->plugin_url . 'img/checkmark.gif" alt="Checkmark" />' : ''; ?></h4>
22
+ <div class="dynwid_conf">
23
+ <?php _e('Show widget on every template?', DW_L10N_DOMAIN); ?> <img src="<?php echo $DW->plugin_url; ?>img/info.gif" alt="info" title="<?php _e('Click to toggle info', DW_L10N_DOMAIN) ?>" onclick="divToggle('tpl');" /><br />
24
+ <?php $DW->dumpOpt($opt_tpl); ?>
25
+ <div>
26
+ <div id="tpl" class="infotext">
27
+ <?php _e('This options takes precedence above other options like Pages and/or Single Posts.', DW_L10N_DOMAIN); ?>
28
+ </div>
29
+ </div>
30
+ <input type="radio" name="tpl" value="yes" id="tpl-yes" <?php echo ( $opt_tpl->selectYes() ) ? $opt_tpl->checked : ''; ?> /> <label for="tpl-yes"><?php _e('Yes'); ?></label>
31
+ <input type="radio" name="tpl" value="no" id="tpl-no" <?php echo ( $opt_tpl->selectNo() ) ? $opt_tpl->checked : ''; ?> /> <label for="tpl-no"><?php _e('No'); ?></label><br />
32
+ <?php _e('Except the templates', DW_L10N_DOMAIN); ?>:<br />
33
+ <div id="tpl-select" class="condition-select" <?php echo ( isset($tpl_condition_select_style) ? $tpl_condition_select_style : '' ); ?>>
34
+ <input type="checkbox" id="tpl_act_page.php" name="tpl_act[]" value="page.php" <?php echo ( isset($tpl_act) && count($tpl_act) > 0 && in_array('page.php', $tpl_act) ) ? 'checked="checked"' : ''; ?> /> <label for="tpl_act_page.php"><?php _e('Default Template'); ?></label><br />
35
+ <?php foreach ( $tpl as $tplname => $tplfile ) { ?>
36
+ <input type="checkbox" id="tpl_act_<?php echo basename($tplfile); ?>" name="tpl_act[]" value="<?php echo basename($tplfile); ?>" <?php echo ( $opt_tpl->count > 0 && in_array(basename($tplfile), $opt_tpl->act) ) ? 'checked="checked"' : ''; ?> /> <label for="tpl_act_<?php echo basename($tplfile); ?>"><?php echo $tplname; ?></label><br />
37
+ <?php } ?>
38
+ </div>
39
+ </div><!-- end dynwid_conf -->
40
+
41
+ <?php } // $num_tpl > 0 ?>
mods/useragent_module.php CHANGED
@@ -2,43 +2,28 @@
2
  /**
3
  * UserAgent Module
4
  *
5
- * @version $Id: useragent_module.php 348295 2011-02-20 20:13:21Z qurl $
6
  * @copyright 2011 Jacco Drabbe
7
  */
8
 
9
  $useragents = array(
10
- 'gecko' => 'Firefox' . ' ' . __('(and other Gecko based)', DW_L10N_DOMAIN),
11
- 'msie' => 'Internet Explorer',
12
- 'opera' => 'Opera',
13
- 'ns' => 'Netscape 4',
14
- 'safari' => 'Safari',
15
- 'chrome' => 'Chrome',
16
- 'undef' => __('Other / Unknown / Not detected', DW_L10N_DOMAIN)
 
17
  );
18
  if ( count($useragents) > DW_LIST_LIMIT ) {
19
  $browser_condition_select_style = DW_LIST_STYLE;
20
  }
21
 
22
- $browser_yes_selected = 'checked="checked"';
23
- $opt_browser = $DW->getOptions($_GET['id'], 'browser');
24
- if ( count($opt_browser) > 0 ) {
25
- $browser_act = array();
26
- foreach ( $opt_browser as $browser_condition ) {
27
- if ( $browser_condition['name'] == 'default' || empty($browser_condition['name']) ) {
28
- $browser_default = $browser_condition['value'];
29
- } else {
30
- $browser_act[ ] = $browser_condition['name'];
31
- }
32
- }
33
-
34
- if ( $browser_default == '0' ) {
35
- $browser_no_selected = $browser_yes_selected;
36
- unset($browser_yes_selected);
37
- }
38
- }
39
  ?>
40
 
41
- <h4><b><?php _e('Browser', DW_L10N_DOMAIN); ?></b><?php echo ( count($opt_browser) > 0 ? ' <img src="' . $DW->plugin_url . 'img/checkmark.gif" alt="Checkmark" />' : '' ); ?></h4>
42
  <div class="dynwid_conf">
43
  <?php _e('Show widget with all browsers?', DW_L10N_DOMAIN) ?> <img src="<?php echo $DW->plugin_url; ?>img/info.gif" alt="info" title="<?php _e('Click to toggle info', DW_L10N_DOMAIN) ?>" onclick="divToggle('browser');" /><br />
44
  <?php $DW->dumpOpt($opt_browser); ?>
@@ -47,12 +32,12 @@
47
  <?php _e('Browser detection is never 100% accurate.', DW_L10N_DOMAIN); ?>
48
  </div>
49
  </div>
50
- <input type="radio" name="browser" value="yes" id="browser-yes" <?php echo ( isset($browser_yes_selected) ? $browser_yes_selected : '' ); ?> /> <label for="browser-yes"><?php _e('Yes'); ?></label>
51
- <input type="radio" name="browser" value="no" id="browser-no" <?php echo ( isset($browser_no_selected) ? $browser_no_selected : '' ); ?> /> <label for="browser-no"><?php _e('No'); ?></label><br />
52
  <?php _e('Except the browser(s)', DW_L10N_DOMAIN); ?>:<br />
53
- <div id="browser-select" class="condition-select" <?php echo ( isset($browser_condition_select_style) ? $browser_condition_select_style : '' ); ?>>
54
  <?php foreach ( $useragents as $code => $agent ) { ?>
55
- <input type="checkbox" id="browser_act_<?php echo $code; ?>" name="browser_act[]" value="<?php echo $code; ?>" <?php echo ( count($browser_act) > 0 && in_array($code, $browser_act) ) ? 'checked="checked"' : ''; ?> /> <label for="browser_act_<?php echo $code; ?>"><?php echo $agent; ?></label><br />
56
  <?php } ?>
57
  </div>
58
- </div><!-- end dynwid_conf -->
2
  /**
3
  * UserAgent Module
4
  *
5
+ * @version $Id: useragent_module.php 402236 2011-06-28 20:46:55Z qurl $
6
  * @copyright 2011 Jacco Drabbe
7
  */
8
 
9
  $useragents = array(
10
+ 'gecko' => 'Firefox' . ' ' . __('(and other Gecko based)', DW_L10N_DOMAIN),
11
+ 'msie' => 'Internet Explorer',
12
+ 'msie6' => 'Internet Explorer 6',
13
+ 'opera' => 'Opera',
14
+ 'ns' => 'Netscape 4',
15
+ 'safari' => 'Safari',
16
+ 'chrome' => 'Chrome',
17
+ 'undef' => __('Other / Unknown / Not detected', DW_L10N_DOMAIN)
18
  );
19
  if ( count($useragents) > DW_LIST_LIMIT ) {
20
  $browser_condition_select_style = DW_LIST_STYLE;
21
  }
22
 
23
+ $opt_browser = $DW->getDWOpt($_GET['id'], 'browser');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
  ?>
25
 
26
+ <h4><b><?php _e('Browser', DW_L10N_DOMAIN); ?></b><?php echo ( $opt_browser->count > 0 ) ? ' <img src="' . $DW->plugin_url . 'img/checkmark.gif" alt="Checkmark" />' : ''; ?></h4>
27
  <div class="dynwid_conf">
28
  <?php _e('Show widget with all browsers?', DW_L10N_DOMAIN) ?> <img src="<?php echo $DW->plugin_url; ?>img/info.gif" alt="info" title="<?php _e('Click to toggle info', DW_L10N_DOMAIN) ?>" onclick="divToggle('browser');" /><br />
29
  <?php $DW->dumpOpt($opt_browser); ?>
32
  <?php _e('Browser detection is never 100% accurate.', DW_L10N_DOMAIN); ?>
33
  </div>
34
  </div>
35
+ <input type="radio" name="browser" value="yes" id="browser-yes" <?php echo ( $opt_browser->selectYes() ) ? $opt_browser->checked : ''; ?> /> <label for="browser-yes"><?php _e('Yes'); ?></label>
36
+ <input type="radio" name="browser" value="no" id="browser-no" <?php echo ( $opt_browser->selectNo() ) ? $opt_browser->checked : ''; ?> /> <label for="browser-no"><?php _e('No'); ?></label><br />
37
  <?php _e('Except the browser(s)', DW_L10N_DOMAIN); ?>:<br />
38
+ <div id="browser-select" class="condition-select" <?php echo ( isset($browser_condition_select_style) ) ? $browser_condition_select_style : ''; ?>>
39
  <?php foreach ( $useragents as $code => $agent ) { ?>
40
+ <input type="checkbox" id="browser_act_<?php echo $code; ?>" name="browser_act[]" value="<?php echo $code; ?>" <?php echo ( $opt_browser->count > 0 && in_array($code, $opt_browser->act) ? 'checked="checked"' : '' ); ?> /> <label for="browser_act_<?php echo $code; ?>"><?php echo $agent; ?></label><br />
41
  <?php } ?>
42
  </div>
43
+ </div><!-- end dynwid_conf -->
mods/wpec_module.php CHANGED
@@ -3,7 +3,7 @@
3
  * WPEC Module
4
  * http://getshopped.org/
5
  *
6
- * @version $Id: wpec_module.php 348295 2011-02-20 20:13:21Z qurl $
7
  * @copyright 2011 Jacco Drabbe
8
  */
9
 
@@ -11,39 +11,23 @@
11
  $DW->wpsc = TRUE;
12
  require_once(DW_PLUGIN . 'wpsc.php');
13
 
14
- $wpsc_yes_selected = 'checked="checked"';
15
- $opt_wpsc = $DW->getOptions($_GET['id'], 'wpsc');
16
- if ( count($opt_wpsc) > 0 ) {
17
- $wpsc_act = array();
18
- foreach ( $opt_wpsc as $wpsc_condition ) {
19
- if ( $wpsc_condition['name'] == 'default' || empty($wpsc_condition['name']) ) {
20
- $wpsc_default = $wpsc_condition['value'];
21
- } else {
22
- $wpsc_act[ ] = $wpsc_condition['name'];
23
- }
24
- }
25
-
26
- if ( $wpsc_default == '0' ) {
27
- $wpsc_no_selected = $wpsc_yes_selected;
28
- unset($wpsc_yes_selected);
29
- }
30
- }
31
 
32
  $wpsc = dw_wpsc_get_categories();
33
  if ( count($wpsc) > DW_LIST_LIMIT ) {
34
  $wpsc_condition_select_style = DW_LIST_STYLE;
35
  }
36
  ?>
37
- <h4><b><?php _e('WPSC Category', DW_L10N_DOMAIN); ?></b><?php echo ( count($opt_wpsc) > 0 ? ' <img src="' . $DW->plugin_url . 'img/checkmark.gif" alt="Checkmark" />' : '' ); ?></h4>
38
  <div class="dynwid_conf">
39
  <?php _e('Show widget default on WPSC categories?', DW_L10N_DOMAIN); ?><br />
40
  <?php $DW->dumpOpt($opt_wpsc); ?>
41
- <input type="radio" name="wpsc" value="yes" id="wpsc-yes" <?php echo ( isset($wpsc_yes_selected) ? $wpsc_yes_selected : '' ); ?> /> <label for="wpsc-yes"><?php _e('Yes'); ?></label>
42
- <input type="radio" name="wpsc" value="no" id="wpsc-no" <?php echo ( isset($wpsc_no_selected) ? $wpsc_no_selected : '' ); ?> /> <label for="wpsc-no"><?php _e('No'); ?></label><br />
43
  <?php _e('Except the categories', DW_L10N_DOMAIN); ?>:<br />
44
- <div id="wpsc-select" class="condition-select" <?php echo ( isset($wpsc_condition_select_style) ? $wpsc_condition_select_style : '' ); ?>>
45
  <?php foreach ( $wpsc as $id => $cat ) { ?>
46
- <input type="checkbox" id="wpsc_act_<?php echo $id; ?>" name="wpsc_act[]" value="<?php echo $id; ?>" <?php echo ( count($wpsc_act) > 0 && in_array($id, $wpsc_act) ) ? 'checked="checked"' : ''; ?> /> <label for="wpsc_act_<?php echo $id; ?>"><?php echo $cat; ?></label><br />
47
  <?php } ?>
48
  </div>
49
  </div><!-- end dynwid_conf -->
3
  * WPEC Module
4
  * http://getshopped.org/
5
  *
6
+ * @version $Id: wpec_module.php 402236 2011-06-28 20:46:55Z qurl $
7
  * @copyright 2011 Jacco Drabbe
8
  */
9
 
11
  $DW->wpsc = TRUE;
12
  require_once(DW_PLUGIN . 'wpsc.php');
13
 
14
+ $opt_wpsc = $DW->getDWOpt($_GET['id'], 'wpsc');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
 
16
  $wpsc = dw_wpsc_get_categories();
17
  if ( count($wpsc) > DW_LIST_LIMIT ) {
18
  $wpsc_condition_select_style = DW_LIST_STYLE;
19
  }
20
  ?>
21
+ <h4><b><?php _e('WPSC Category', DW_L10N_DOMAIN); ?></b><?php echo ( $opt_wpsc->count > 0 ) ? ' <img src="' . $DW->plugin_url . 'img/checkmark.gif" alt="Checkmark" />' : ''; ?></h4>
22
  <div class="dynwid_conf">
23
  <?php _e('Show widget default on WPSC categories?', DW_L10N_DOMAIN); ?><br />
24
  <?php $DW->dumpOpt($opt_wpsc); ?>
25
+ <input type="radio" name="wpsc" value="yes" id="wpsc-yes" <?php echo ( $opt_wpsc->selectYes() ) ? $opt_wpsc->checked : ''; ?> /> <label for="wpsc-yes"><?php _e('Yes'); ?></label>
26
+ <input type="radio" name="wpsc" value="no" id="wpsc-no" <?php echo ( $opt_wpsc->selectNo() ) ? $opt_wpsc->checked : ''; ?> /> <label for="wpsc-no"><?php _e('No'); ?></label><br />
27
  <?php _e('Except the categories', DW_L10N_DOMAIN); ?>:<br />
28
+ <div id="wpsc-select" class="condition-select" <?php echo ( isset($wpsc_condition_select_style) ) ? $wpsc_condition_select_style : ''; ?>>
29
  <?php foreach ( $wpsc as $id => $cat ) { ?>
30
+ <input type="checkbox" id="wpsc_act_<?php echo $id; ?>" name="wpsc_act[]" value="<?php echo $id; ?>" <?php echo ( $opt_wpsc->count > 0 && in_array($id, $opt_wpsc->act) ) ? 'checked="checked"' : ''; ?> /> <label for="wpsc_act_<?php echo $id; ?>"><?php echo $cat; ?></label><br />
31
  <?php } ?>
32
  </div>
33
  </div><!-- end dynwid_conf -->
mods/wpml_module.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * WPML Module
4
  *
5
- * @version $Id: wpml_module.php 348295 2011-02-20 20:13:21Z qurl $
6
  * @copyright 2011 Jacco Drabbe
7
  */
8
 
@@ -10,31 +10,10 @@
10
  $wpml_api = ICL_PLUGIN_PATH . DW_WPML_API;
11
  require_once($wpml_api);
12
 
13
- $wpml_yes_selected = 'checked="checked"';
14
- $opt_wpml = $DW->getOptions($_GET['id'], 'wpml');
15
- if ( count($opt_wpml) > 0 ) {
16
- $wpml_act = array();
17
- foreach ( $opt_wpml as $wpml_condition ) {
18
- if ( $wpml_condition['name'] == 'default' || empty($wpml_condition['name']) ) {
19
- $wpml_default = $wpml_condition['value'];
20
- } else {
21
- $wpml_act[ ] = $wpml_condition['name'];
22
- }
23
- }
24
-
25
- if ( $wpml_default == '0' ) {
26
- $wpml_no_selected = $wpml_yes_selected;
27
- unset($wpml_yes_selected);
28
- }
29
- }
30
-
31
- $wpml_langs = wpml_get_active_languages();
32
- if ( count($wpml_langs) > DW_LIST_LIMIT ) {
33
- $wpml_condition_select_style = DW_LIST_STYLE;
34
- }
35
  ?>
36
 
37
- <h4><b><?php _e('Language (WPML)', DW_L10N_DOMAIN); ?></b><?php echo ( count($opt_wpml) > 0 ? ' <img src="' . $DW->plugin_url . 'img/checkmark.gif" alt="Checkmark" />' : '' ); ?></h4>
38
  <div class="dynwid_conf">
39
  <?php _e('Show widget default on all languages?', DW_L10N_DOMAIN); ?> <img src="<?php echo $DW->plugin_url; ?>img/info.gif" alt="info" title="<?php _e('Click to toggle info', DW_L10N_DOMAIN) ?>" onclick="divToggle('wpml');" /><br /><br />
40
  <?php $DW->dumpOpt($opt_wpml); ?>
@@ -43,12 +22,12 @@
43
  <?php _e('Using this option can override all other options.', DW_L10N_DOMAIN); ?><br />
44
  </div>
45
  </div>
46
- <input type="radio" name="wpml" value="yes" id="wpml-yes" <?php echo ( isset($wpml_yes_selected) ? $wpml_yes_selected : '' ); ?> /> <label for="wpml-yes"><?php _e('Yes'); ?></label>
47
- <input type="radio" name="wpml" value="no" id="wpml-no" <?php echo ( isset($wpml_no_selected) ? $wpml_no_selected : '' ); ?> /> <label for="wpml-no"><?php _e('No'); ?></label><br />
48
  <?php _e('Except the languages', DW_L10N_DOMAIN); ?>:<br />
49
  <div id="wpml-select" class="condition-select" <?php echo ( isset($wpml_condition_select_style) ? $wpml_condition_select_style : '' ); ?>>
50
  <?php foreach ( $wpml_langs as $code => $lang ) { ?>
51
- <input type="checkbox" id="wpml_act_<?php echo $lang['code']; ?>" name="wpml_act[]" value="<?php echo $lang['code']; ?>" <?php echo ( count($wpml_act) > 0 && in_array($lang['code'], $wpml_act) ) ? 'checked="checked"' : ''; ?> /> <label for="wpml_act_<?php echo $lang['code']; ?>"><?php echo $lang['display_name']; ?></label><br />
52
  <?php } ?>
53
  </div>
54
  </div><!-- end dynwid_conf -->
2
  /**
3
  * WPML Module
4
  *
5
+ * @version $Id: wpml_module.php 408692 2011-07-12 11:26:53Z qurl $
6
  * @copyright 2011 Jacco Drabbe
7
  */
8
 
10
  $wpml_api = ICL_PLUGIN_PATH . DW_WPML_API;
11
  require_once($wpml_api);
12
 
13
+ $opt_wpml = $DW->getDWOpt($_GET['id'], 'wpml');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  ?>
15
 
16
+ <h4><b><?php _e('Language (WPML)', DW_L10N_DOMAIN); ?></b><?php echo ( $opt_wpml->count > 0 ) ? ' <img src="' . $DW->plugin_url . 'img/checkmark.gif" alt="Checkmark" />' : ''; ?></h4>
17
  <div class="dynwid_conf">
18
  <?php _e('Show widget default on all languages?', DW_L10N_DOMAIN); ?> <img src="<?php echo $DW->plugin_url; ?>img/info.gif" alt="info" title="<?php _e('Click to toggle info', DW_L10N_DOMAIN) ?>" onclick="divToggle('wpml');" /><br /><br />
19
  <?php $DW->dumpOpt($opt_wpml); ?>
22
  <?php _e('Using this option can override all other options.', DW_L10N_DOMAIN); ?><br />
23
  </div>
24
  </div>
25
+ <input type="radio" name="wpml" value="yes" id="wpml-yes" <?php echo ( $opt_wpml->selectYes() ) ? $opt_wpml->checked : ''; ?> /> <label for="wpml-yes"><?php _e('Yes'); ?></label>
26
+ <input type="radio" name="wpml" value="no" id="wpml-no" <?php echo ( $opt_wpml->selectNo() ) ? $opt_wpml->checked : ''; ?> /> <label for="wpml-no"><?php _e('No'); ?></label><br />
27
  <?php _e('Except the languages', DW_L10N_DOMAIN); ?>:<br />
28
  <div id="wpml-select" class="condition-select" <?php echo ( isset($wpml_condition_select_style) ? $wpml_condition_select_style : '' ); ?>>
29
  <?php foreach ( $wpml_langs as $code => $lang ) { ?>
30
+ <input type="checkbox" id="wpml_act_<?php echo $lang['code']; ?>" name="wpml_act[]" value="<?php echo $lang['code']; ?>" <?php echo ( $opt_wpml->count > 0 && in_array($lang['code'], $opt_wpml->act) ) ? 'checked="checked"' : ''; ?> /> <label for="wpml_act_<?php echo $lang['code']; ?>"><?php echo $lang['display_name']; ?></label><br />
31
  <?php } ?>
32
  </div>
33
  </div><!-- end dynwid_conf -->
plugin/bp.php CHANGED
@@ -4,7 +4,7 @@
4
  * BuddyPress Plugin
5
  * http://buddypress.org/
6
  *
7
- * @version $Id: bp.php 348295 2011-02-20 20:13:21Z qurl $
8
  * @copyright 2011 Jacco Drabbe
9
  */
10
 
@@ -66,4 +66,26 @@
66
  return FALSE;
67
  }
68
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69
  ?>
4
  * BuddyPress Plugin
5
  * http://buddypress.org/
6
  *
7
+ * @version $Id: bp.php 369765 2011-04-06 20:06:52Z qurl $
8
  * @copyright 2011 Jacco Drabbe
9
  */
10
 
66
  return FALSE;
67
  }
68
  }
69
+
70
+ function is_dw_bp_group_forum($id) {
71
+ $bp = &$GLOBALS['bp'];
72
+
73
+ if ( $bp->current_action == 'forum' ) {
74
+ if ( count($bp->action_variables) > 0 && in_array('forum_topic', $id) ) {
75
+ return TRUE;
76
+ } else if ( count($bp->action_variables) == 0 && in_array('forum_index', $id) ) {
77
+ return TRUE;
78
+ }
79
+ }
80
+ return FALSE;
81
+ }
82
+
83
+ function is_dw_bp_group_members($id) {
84
+ $bp = &$GLOBALS['bp'];
85
+
86
+ if ( $bp->current_action == 'members' && in_array('members_index', $id) ) {
87
+ return TRUE;
88
+ }
89
+ return FALSE;
90
+ }
91
  ?>
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: Qurl
3
  Donate link:
4
  Tags: widget, widgets, dynamic, sidebar, custom, rules, admin, condition, conditional tags, wpml, wpec, buddypress
5
  Requires at least: 2.9.1
6
- Tested up to: 3.1
7
- Stable tag: 1.4.0
8
 
9
  Dynamic Widgets gives you full control on which pages your widgets will appear. It lets you dynamicly place the widgets on WordPress pages.
10
 
@@ -16,6 +16,7 @@ Dynamic Widgets gives you full control on which pages your widgets will appear.
16
  - User roles
17
  - Dates
18
  - Browsers
 
19
  - Languages (WPML)
20
  - Front page
21
  - Single post pages
@@ -32,20 +33,21 @@ Dynamic Widgets gives you full control on which pages your widgets will appear.
32
  - BuddyPress Components pages
33
  - BuddyPress Groups
34
 
35
- * Exceptions can be created for:
36
  - User roles on role, including not logged in (anonymous) users
37
  - Dates on from, to or range
38
  - Browsers on browser name
 
39
  - Languages (WPML) on language
40
  - Single post pages on Author, Categories, Tags and/or Individual posts
41
  - Pages on Page Title, including inheritance from hierarchical parents
42
  - Author pages on Author
43
  - Category pages on Category name
44
- - Custom Posts Type on Custom post name, including inheritance from hierarchical parents
45
  - Custom Post Type Archive pages on Custom Post Type
46
  - WP Shopping Cart / WP E-Commerce Categories on Category name
47
  - BuddyPress Component pages on Component
48
- - BuddyPress Groups on group
49
 
50
  * Plugin support for:
51
  - BuddyPress
@@ -132,6 +134,29 @@ Please file a [bugreport](http://www.qurl.nl/dynamic-widgets/bugreport/). Please
132
 
133
  == Changelog ==
134
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
135
  = Version 1.4.0 =
136
 
137
  * Added more l10n text strings
@@ -255,11 +280,14 @@ Please file a [bugreport](http://www.qurl.nl/dynamic-widgets/bugreport/). Please
255
 
256
  == Release notes ==
257
 
258
- With this version, Dynamic Widgets supports version 3.8 of WPEC. Unfortunately because of the change by WPEC, when you upgrade WPEC you'll have to redo all rules you've created within Dynamic Widgets for WPEC manually. It was nog possible for me to find out how to convert these to the new system used by WPEC. For your convience I've created a WPEC config dump generator to be able to give an overview of all the WPEC rules created in Dynamic Widgets to make recreating the rules easier. Please note the generator only works correctly when the WPEC product categories database table still exists and you did not add or modified any rule in Dynamic Widgets. The generator can be found at the Dynamic Widgets overview page by clicking on the 'Advanced >' link at the bottom of the page.
 
 
259
 
260
  == Upgrade Notice ==
261
 
262
- Be sure to deactivate Dynamic Widgets Plugin before installing the new version following steps 1 and 2 in the installation procedure. After the install you can reactivate the plugin.
 
263
 
264
  == Screenshots ==
265
 
3
  Donate link:
4
  Tags: widget, widgets, dynamic, sidebar, custom, rules, admin, condition, conditional tags, wpml, wpec, buddypress
5
  Requires at least: 2.9.1
6
+ Tested up to: 3.2
7
+ Stable tag: 1.4.1
8
 
9
  Dynamic Widgets gives you full control on which pages your widgets will appear. It lets you dynamicly place the widgets on WordPress pages.
10
 
16
  - User roles
17
  - Dates
18
  - Browsers
19
+ - Theme Templates
20
  - Languages (WPML)
21
  - Front page
22
  - Single post pages
33
  - BuddyPress Components pages
34
  - BuddyPress Groups
35
 
36
+ * Exception rules can be created for:
37
  - User roles on role, including not logged in (anonymous) users
38
  - Dates on from, to or range
39
  - Browsers on browser name
40
+ - Theme Templates on template name
41
  - Languages (WPML) on language
42
  - Single post pages on Author, Categories, Tags and/or Individual posts
43
  - Pages on Page Title, including inheritance from hierarchical parents
44
  - Author pages on Author
45
  - Category pages on Category name
46
+ - Custom Posts Type on custom taxonomy and Custom post name, including inheritance from hierarchical parents
47
  - Custom Post Type Archive pages on Custom Post Type
48
  - WP Shopping Cart / WP E-Commerce Categories on Category name
49
  - BuddyPress Component pages on Component
50
+ - BuddyPress Groups on Group or Component
51
 
52
  * Plugin support for:
53
  - BuddyPress
134
 
135
  == Changelog ==
136
 
137
+ = Version 1.4.1 =
138
+
139
+ * Added Custom Taxonomies support for Custom Post Types.
140
+ * Added WPML support to Custom Taxonomies.
141
+ * Added support for Custom Taxonomies Archives.
142
+ * Added support for Theme Templates.
143
+ * Added hierarchical structure overview for Categories.
144
+ * Added Component exceptions support in BuddyPress Groups.
145
+ * Added a Quick setting: 'Set all options to Off'.
146
+ * Added 'Internet Explorer 6' to the browser detection.
147
+ * Added advanced option setting for the page limit.
148
+ * Bugfix for not selecting the WPML main language ID for Custom Post Types.
149
+ * Bugfix for showing all WPML translated Custom Post Type titles
150
+ * Bugfix for not correct displaying of options string in the widget admin when having options set for Custom Post Type Archives, BuddyPress, BuddyPress Groups.
151
+ * Bugfix for losing exception rules for single posts and tags in rare cases.
152
+ * Bugfix for showing empty Custom Post Type Archives option in settings screen.
153
+ * Bugfix for unexptected behaviour when setting BP groups default to 'No'.
154
+ * Bugfix for only showing the last Custom Posts in the list.
155
+ * Limited the list of authors to users with user level > 0.
156
+ * Security fix in the usage of the returnURL.
157
+ * Workaround when using prototype theme.
158
+ * Workaround for certain themes claiming an invalid BP component confusing Dynamic Widgets.
159
+
160
  = Version 1.4.0 =
161
 
162
  * Added more l10n text strings
280
 
281
  == Release notes ==
282
 
283
+ Because of the addition of support for Custom Taxonomies within Custom Post Types and the addtion of Internet Explorer 6 detection, the database table used by Dynamic Widgets needs to be upgraded. Please make sure to do a proper deactivation and activation of the plugin. Otherwise the database upgrade will not be triggered.
284
+
285
+ When you have set a rule of Internet Explorer, the upgrade process will add a rule for Internet Explorer 6.
286
 
287
  == Upgrade Notice ==
288
 
289
+ = 1.4.1 =
290
+ This version has 9 features added, 7 bugs fixed and 2 theme workarounds created.
291
 
292
  == Screenshots ==
293