pageMash > Page Management - Version 1.2.1

Version Description

  • fix for menu position in WP2.7
Download this release

Release Info

Developer jmash
Plugin Icon wp plugin pageMash > Page Management
Version 1.2.1
Comparing to
See all releases

Code changes from version 1.1.4 to 1.2.1

README.txt CHANGED
@@ -2,14 +2,14 @@
2
  Contributors: JoelStarnes
3
  Tags: order pages, ajax, re-order, drag-and-drop, admin, manage, page, pages, sidebar, header, hide,
4
  Requires at least: 2.1
5
- Tested up to: 2.5
6
- Stable tag: 1.1.4
7
 
8
- Organise page order and manage page structure with this simple drag-and-drop Ajax interface.
9
 
10
  == Description ==
11
 
12
- Customise the order your pages are listed in and manage the parent structure with this simple Ajax drag-and-drop administrative interface with an option to toggle the page to be hidden from output. Great tool to quickly re-arrange your page menus.
13
 
14
  Checkout the example page: http://joelstarnes.co.uk/pagemash/example
15
  Feedback is greatly appreciated: http://joelstarnes.co.uk/contact
@@ -21,7 +21,7 @@ Feedback is greatly appreciated: http://joelstarnes.co.uk/contact
21
  1. Activate in 'Plugins' admin menu
22
  1. Then have fun..
23
 
24
- pageMash works with the `wp_list_pages` function. The easiest way to use it is to put the pages widget in your sidebar [WP admin page > Presentation > Widgets]. Click the configure button on the widget and ensure that 'sort by' is set to 'page order'. Hey presto, you're done.
25
 
26
  You can also use the function anywhere in your theme code. e.g. in your sidebar.php file (but the code in here will not run if you're using any widgets) or your header.php file (somewhere under the body tag, you may want to use the depth=1 parameter to only show top levle pages). The code should look something like the following:
27
 
@@ -49,66 +49,84 @@ Any good up-to-date browser should work fine. I test in Firefox, IE7, Safari and
49
 
50
  == Screenshots ==
51
 
52
- 1. Admin Interface
53
 
54
- 2. Setting up the page widget. [WP-Admin > Presentation > Widgets]
55
 
56
 
57
  ==Change Log==
 
 
58
 
59
- * 1.1.4
60
- * Add config option to show debug info.
 
 
 
61
 
62
- * 1.1.3
63
- * Fixed hide bug that appeared on some systems
 
 
 
 
 
 
64
 
65
- * 1.1.2
66
- * Added Expand all | Collapse all buttons
67
 
68
- * 1.1.1
69
- * Fix a bug with console.log for safari
70
- * Removed php code from js&css scripts to fix error
71
 
72
- * 1.1.0
73
- * Added quick rename
74
- * Externalised scripts
75
- * Changed display of edit|hide|rename links
76
- * Deregisters prototypes
 
 
 
 
77
 
78
- * 1.0.4
79
- * Removed shorthand PHP
80
- * Updated CSS and JS headers to admin_print_scripts hook.
81
 
82
- * 1.0.3
83
- * Fixed datatype bug causing array problems
84
 
85
- * 1.0.3
86
- * Fixed datatype bug causing array problems
87
 
88
- * 1.0.2
89
- * Major code rewrite for exclude pages
90
 
91
- * 1.0.1 beta
92
- * fixed IE drag selects text
93
 
94
- * 1.0.0 beta
95
- * Major rebuild to use vladimir's sortables class extension
96
- * Recusive page handles unlimited nested children
97
- * Collapsable list items
98
- * Interface makeover...
99
 
100
- * 0.1.3
101
- * Fixed exclude pages feature
102
 
103
- * 0.1.2
104
- * Fixed CSS&JS headers to only display on pageMash admin
105
 
106
- * 0.1.1
107
- * Removed version check since some hosts will not allow external includes.
108
 
109
- * 0.1.0
110
- * Initial Release
111
 
112
  == Localization ==
113
 
114
- Currently only available in english.
 
 
 
 
2
  Contributors: JoelStarnes
3
  Tags: order pages, ajax, re-order, drag-and-drop, admin, manage, page, pages, sidebar, header, hide,
4
  Requires at least: 2.1
5
+ Tested up to: 2.7
6
+ Stable tag: 1.2.1
7
 
8
+ Manage your multitude of pages with pageMash's slick drag-and-drop style, ajax interface. Allows for quick sorting, hiding and organising of page parenting structure in a simple intuative manner.
9
 
10
  == Description ==
11
 
12
+ Customise the order your pages are listed in and manage the parent structure with this simple ajax drag-and-drop administrative interface with an option to toggle the page to be hidden from output. Great tool to quickly re-arrange your page menus.
13
 
14
  Checkout the example page: http://joelstarnes.co.uk/pagemash/example
15
  Feedback is greatly appreciated: http://joelstarnes.co.uk/contact
21
  1. Activate in 'Plugins' admin menu
22
  1. Then have fun..
23
 
24
+ pageMash works with the `wp_list_pages` function. The easiest way to use it is to put the pages widget in your sidebar. Click the configure button on the widget and ensure that 'sort by' is set to 'page order'. Hey presto, you're done.
25
 
26
  You can also use the function anywhere in your theme code. e.g. in your sidebar.php file (but the code in here will not run if you're using any widgets) or your header.php file (somewhere under the body tag, you may want to use the depth=1 parameter to only show top levle pages). The code should look something like the following:
27
 
49
 
50
  == Screenshots ==
51
 
52
+ 1. Admin Interface.
53
 
54
+ 2. Setting up the page widget in the old WP admin.
55
 
56
 
57
  ==Change Log==
58
+ = 1.2.1 =
59
+ - fix for menu position in WP2.7
60
 
61
+ = 1.2.0 =
62
+ - Introduces multi-lingual support.
63
+ - Adds German translation
64
+ - Moves pageMash into the Pages menu for WP2.7
65
+ - All thanks to Tom [www.outsourcetoasia.de]
66
 
67
+ = 1.1.6 =
68
+ - Corrected filename case.
69
+
70
+ = 1.1.5 =
71
+ - Updated for WP 2.6
72
+
73
+ = 1.1.4 =
74
+ - Add config option to show debug info.
75
 
76
+ = 1.1.3 =
77
+ - Fixed hide bug that appeared on some systems
78
 
79
+ = 1.1.2 =
80
+ - Added Expand all | Collapse all buttons
 
81
 
82
+ = 1.1.1 =
83
+ - Fix a bug with console.log for safari
84
+ - Removed php code from js&css scripts to fix error
85
+
86
+ = 1.1.0 =
87
+ - Added quick rename
88
+ - Externalised scripts
89
+ - Changed display of edit|hide|rename links
90
+ - Deregisters prototypes
91
 
92
+ = 1.0.4 =
93
+ - Removed shorthand PHP
94
+ - Updated CSS and JS headers to admin_print_scripts hook.
95
 
96
+ = 1.0.3 =
97
+ - Fixed datatype bug causing array problems
98
 
99
+ = 1.0.3 =
100
+ - Fixed datatype bug causing array problems
101
 
102
+ = 1.0.2 =
103
+ - Major code rewrite for exclude pages
104
 
105
+ = 1.0.1 beta =
106
+ - fixed IE drag selects text =
107
 
108
+ = 1.0.0 beta =
109
+ - Major rebuild to use vladimir's sortables class extension
110
+ - Recusive page handles unlimited nested children
111
+ - Collapsable list items
112
+ - Interface makeover...
113
 
114
+ = 0.1.3 =
115
+ - Fixed exclude pages feature
116
 
117
+ = 0.1.2 =
118
+ - Fixed CSS&JS headers to only display on pageMash admin
119
 
120
+ = 0.1.1 =
121
+ - Removed version check since some hosts will not allow external includes.
122
 
123
+ = 0.1.0 =
124
+ - Initial Release
125
 
126
  == Localization ==
127
 
128
+ = pageMash is available in: =
129
+ - English
130
+ - German :: courtesy of Tom [www.outsourcetoasia.de]
131
+
132
+ If you'd like to translate pageMash into your own language get in touch and I'll be happy to add it in.
inlineEdit.v1.2.js → inline-edit.v1.2.js RENAMED
File without changes
pagemash.js CHANGED
@@ -45,11 +45,11 @@ Ajax = Ajax.extend({
45
  }
46
  });
47
  /* function to retrieve list data and send to server in JSON format */
48
- var SaveList = function() {
49
  var theDump = sortIt.serialize();
50
  console.group('Database Update');
51
  console.time('Update Chronometer');
52
- new Ajax('../wp-content/plugins/pagemash/saveList.php', {
53
  method: 'post',
54
  postBody: 'm='+Json.toString(theDump),
55
  update: "debug_list",
@@ -116,7 +116,7 @@ window.addEvent('domready', function(){
116
 
117
  $('pageMash_submit').addEvent('click', function(e){
118
  e = new Event(e);
119
- SaveList();
120
  e.stop();
121
  });
122
 
45
  }
46
  });
47
  /* function to retrieve list data and send to server in JSON format */
48
+ var saveList = function() {
49
  var theDump = sortIt.serialize();
50
  console.group('Database Update');
51
  console.time('Update Chronometer');
52
+ new Ajax('../wp-content/plugins/pagemash/savelist.php', {
53
  method: 'post',
54
  postBody: 'm='+Json.toString(theDump),
55
  update: "debug_list",
116
 
117
  $('pageMash_submit').addEvent('click', function(e){
118
  e = new Event(e);
119
+ saveList();
120
  e.stop();
121
  });
122
 
pagemash.php CHANGED
@@ -2,26 +2,10 @@
2
  /*
3
  Plugin Name: pageMash
4
  Plugin URI: http://joelstarnes.co.uk/pagemash/
5
- Description: pageMash > pageManagement [WP_Admin > Manage > pageMash]
6
  Author: Joel Starnes
7
- Version: 1.1.4
8
  Author URI: http://joelstarnes.co.uk/
9
-
10
- CHANGELOG:
11
- Release: Date: Description:
12
- 0.1.0 10 Feb 2008 Initial release
13
- 0.1.1 12 Feb 2008 Minor fixes > Removed external include
14
- 0.1.2 15 Feb 2008 Minor fixes > Fixed CSS&JS headers to only display on pagemash
15
- 1.0.0 beta 19 Feb 2008 Major update > Recusive page handles unlimited nested children, collapsable list items, interface makeover...
16
- 1.0.1 beta 14 Mar 2008 Fixed IE > drag selects text
17
- 1.0.2 16 Mar 2008 Major code rewrite for exclude pages, funct hooks onto wp_list_pages
18
- 1.0.3 18 Mar 2008 Fixed datatype bug causing array problems
19
- 1.0.4 11 Apr 2008 removed shorthand PHP and updated CSS and JS headers to admin_print_scripts hook.
20
- 1.1.0 24 Apr 2008 Added quick rename, externalised scripts, changed display of edit|hide|rename links, deregisters prototype
21
- 1.1.1 29 Apr 2008 Fix a bug with console.log for safari, removed php code from js&css scripts to fix error
22
- 1.1.2 24 May 2008 Added Expand all | Collapse all buttons
23
- 1.1.3 04 Jun 2008 Fixed hide bug that appeared on some systems
24
- 1.1.4 05 Jun 2008 Add config option to show debug info.
25
 
26
  */
27
  #########CONFIG OPTIONS############################################
@@ -39,7 +23,6 @@ $CollapsePagesOnLoad = false; /*[deafult=true]*/
39
 
40
  $ShowDegubInfo = false; /*[deafult=false]*/
41
  /* Show server response debug info */
42
-
43
  ###################################################################
44
  /*
45
  INSPIRATIONS/CREDITS:
@@ -67,9 +50,17 @@ Garrett Murphey - Page Link Manager [http://gmurphey.com/2006/10/05/wordpress-pl
67
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
68
  */
69
 
70
- //Global Vars
71
- $pageMash_rel_dir = 'wp-content/plugins/pagemash/';
72
- $pageMash_abs_dir = get_bloginfo('wpurl').'/'.$pageMash_rel_dir;
 
 
 
 
 
 
 
 
73
 
74
  function pageMash_getPages($post_parent){
75
  //this is a recurrsive function which calls itself to produce a nested list of elements
@@ -90,12 +81,12 @@ function pageMash_getPages($post_parent){
90
  <span class="pageMash_more">&raquo;</span>
91
  <span class="pageMash_pageFunctions">
92
  id:<?php echo $page->ID;?>
93
- [<a href="<?php echo get_bloginfo('wpurl').'/wp-admin/post.php?action=edit&post='.$page->ID; ?>" title="Edit This Page">edit</a>]
94
  <?php if($excludePagesFeature): ?>
95
- [<a href="#" title="Show|Hide" class="excludeLink" onclick="toggleRemove(this); return false">hide</a>]
96
  <?php endif; ?>
97
  <?php if($renamePagesFeature): ?>
98
- [<a href="#" title="Rename Page" class="rename">Rename</a>]
99
  <?php endif; ?>
100
  </span>
101
  </span>
@@ -116,35 +107,35 @@ function pageMash_main(){
116
  <div id="debug_list"<?php if(false==$ShowDegubInfo) echo' style="display:none;"'; ?>></div>
117
  <div id="pageMash" class="wrap">
118
  <div id="pageMash_checkVersion" style="float:right; font-size:.7em; margin-top:5px;">
119
- version [1.1.4]
120
  </div>
121
- <h2 style="margin-bottom:0; clear:none;">pageMash - pageManagement</h2>
122
  <p style="margin-top:4px;">
123
- Just drag the pages <strong>up</strong> or <strong>down</strong> to change the page order and <strong>left</strong> or <strong>right</strong> to change the page's parent, then hit 'update'.<br />
124
- The icon to the left of each page shows if it has child pages, <strong>double click</strong> on that item to toggle <strong>expand|collapse</strong> of it's children.
125
  </p>
126
- <p><a href="#" id="expand_all">Expand All</a> | <a href="#" id="collapse_all">Collapse All</a></p>
127
 
128
  <?php pageMash_getPages(0); //pass 0, as initial parent ?>
129
 
130
  <p class="submit">
131
  <div id="update_status" style="float:left; margin-left:40px; opacity:0;"></div>
132
- <input type="submit" id="pageMash_submit" tabindex="2" style="font-weight: bold; float:right;" value="Update" name="submit"/>
133
  </p>
134
  <br style="margin-bottom: .8em;" />
135
  </div>
136
 
137
  <div class="wrap" style="width:160px; margin-bottom:0; padding:0;"><p><a href="#" id="pageMashInfo_toggle">Show|Hide Further Info</a></p></div>
138
  <div class="wrap" id="pageMashInfo" style="margin-top:-1px;">
139
- <h2>How to Use</h2>
140
- <p>pageMash works with the wp_list_pages function. The easiest way to use it is to put the pages widget in your sidebar [WP admin page > Presentation > Widgets]. Click the configure button on the widget and ensure that 'sort by' is set to 'page order'. Hey presto, you're done.</p>
141
- <p>You can also use the function anywhere in your theme code. e.g. in your sidebar.php file (but the code in here will not run if you're using any widgets) or your header.php file (somewhere under the body tag, you may want to use the depth=1 parameter to only show top level pages). The code should look something like the following:</p>
142
  <p style="margin-bottom:0; font-weight:bold;">Code:</p>
143
  <code id="pageMash_code">
144
  <span class="white">&lt;?php</span> <span class="blue">wp_list_pages(</span><span class="orange">'title_li=&lt;h2&gt;Pages&lt;/h2&gt;&amp;depth=0'</span><span class="blue">);</span> <span class="white">?&gt;</span>
145
  </code>
146
- <p>You can also hard-code pages to exclude and these will be merged with the pages you set to exclude in your pageMash admin.</p>
147
- <p>The code here is very simple and flexible, for more information look up <a href="http://codex.wordpress.org/Template_Tags/wp_list_pages" title="wp_list_pages Documentation">wp_list_pages() in the Wordpress Codex</a> as it is very well documented and if you have any further questions or feedback I like getting messages, so <a href="http://joelstarnes.co.uk/contact/" title="email Joel Starnes">drop me an email</a>.</p>
148
  <br />
149
  </div>
150
  <?php
@@ -152,19 +143,25 @@ function pageMash_main(){
152
 
153
  function pageMash_head(){
154
  //stylesheet & javascript to go in page header
155
- global $pageMash_rel_dir, $CollapsePagesOnLoad;
156
 
157
  wp_deregister_script('prototype');//remove prototype since it is incompatible with mootools
158
- wp_enqueue_script('pagemash_mootools', '/'.$pageMash_rel_dir.'nest-mootools.v1.11.js', false, false); //code is not compatible with other releases of moo
159
- wp_enqueue_script('pagemash_nested', '/'.$pageMash_rel_dir.'nested.js', array('pagemash_mootools'), false);
160
- wp_enqueue_script('pagemash_inlineEdit', '/'.$pageMash_rel_dir.'inlineEdit.v1.2.js', array('pagemash_mootools'), false);
161
- wp_enqueue_script('pagemash', '/'.$pageMash_rel_dir.'pagemash.js', array('pagemash_mootools'), false);
162
  add_action('admin_head', 'pageMash_add_css', 1);
 
 
 
 
 
 
163
 
164
  }
165
 
166
  function pageMash_add_css(){
167
- global $pageMash_abs_dir, $CollapsePagesOnLoad;
168
  if($CollapsePagesOnLoad): ?>
169
  <script type="text/javascript" charset="utf-8">
170
  window.addEvent('domready', function(){
@@ -174,8 +171,9 @@ function pageMash_add_css(){
174
  });
175
  </script>
176
  <?php endif;
177
- ?>
178
- <link rel="stylesheet" type="text/css" href="<?php echo $pageMash_abs_dir ?>pagemash.css" />
 
179
  <!-- __ __ _
180
  WordPress Plugin | \/ | | |
181
  _ __ __ _ __ _ ___| \ / | __ _ ___| |__
@@ -200,9 +198,13 @@ function pageMash_add_excludes($excludes){
200
  }
201
 
202
  function pageMash_add_pages(){
203
- //add link in the management tab
204
- global $minlevel;
205
- $page = add_management_page('pageMash page order', 'pageMash', $minlevel, __FILE__, 'pageMash_main');
 
 
 
 
206
  add_action("admin_print_scripts-$page", 'pageMash_head'); //add css styles and JS code to head
207
  }
208
 
2
  /*
3
  Plugin Name: pageMash
4
  Plugin URI: http://joelstarnes.co.uk/pagemash/
5
+ Description: Manage your multitude of pages with pageMash's slick drag-and-drop style, ajax interface. Allows quick sorting, hiding and organising of page structure.
6
  Author: Joel Starnes
7
+ Version: 1.2.1
8
  Author URI: http://joelstarnes.co.uk/
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
 
10
  */
11
  #########CONFIG OPTIONS############################################
23
 
24
  $ShowDegubInfo = false; /*[deafult=false]*/
25
  /* Show server response debug info */
 
26
  ###################################################################
27
  /*
28
  INSPIRATIONS/CREDITS:
50
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
51
  */
52
 
53
+ // Pre-2.6 compatibility
54
+ if ( !defined('WP_CONTENT_URL') )
55
+ define( 'WP_CONTENT_URL', get_option('siteurl') . '/wp-content');
56
+ if ( !defined('WP_CONTENT_DIR') )
57
+ define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' );
58
+ // Guess the location
59
+ $pageMash_path = WP_CONTENT_DIR.'/plugins/'.plugin_basename(dirname(__FILE__));
60
+ $pageMash_url = WP_CONTENT_URL.'/plugins/'.plugin_basename(dirname(__FILE__));
61
+
62
+ // load localisation files
63
+ load_plugin_textdomain('pmash','wp-content/plugins/pagemash/');
64
 
65
  function pageMash_getPages($post_parent){
66
  //this is a recurrsive function which calls itself to produce a nested list of elements
81
  <span class="pageMash_more">&raquo;</span>
82
  <span class="pageMash_pageFunctions">
83
  id:<?php echo $page->ID;?>
84
+ [<a href="<?php echo get_bloginfo('wpurl').'/wp-admin/post.php?action=edit&post='.$page->ID; ?>" title="<?php _e('Edit This Page'); ?>"><?php _e('edit'); ?></a>]
85
  <?php if($excludePagesFeature): ?>
86
+ [<a href="#" title="<?php _e('Show|Hide'); ?>" class="excludeLink" onclick="toggleRemove(this); return false"><?php _e('hide') ?></a>]
87
  <?php endif; ?>
88
  <?php if($renamePagesFeature): ?>
89
+ [<a href="#" title="<?php _e('Rename Page'); ?>" class="rename"><?php _e('Rename'); ?></a>]
90
  <?php endif; ?>
91
  </span>
92
  </span>
107
  <div id="debug_list"<?php if(false==$ShowDegubInfo) echo' style="display:none;"'; ?>></div>
108
  <div id="pageMash" class="wrap">
109
  <div id="pageMash_checkVersion" style="float:right; font-size:.7em; margin-top:5px;">
110
+ version [1.2.0]
111
  </div>
112
+ <h2 style="margin-bottom:0; clear:none;"><?php _e('pageMash - pageManagement ','pmash');?></h2>
113
  <p style="margin-top:4px;">
114
+ <?php _e('Just drag the pages <strong>up</strong> or <strong>down</strong> to change the page order and <strong>left</strong> or <strong>right</strong> to change the page`s parent, then hit "update". ','pmash');?> <br />
115
+ <?php _e('The icon to the left of each page shows if it has child pages, <strong>double click</strong> on that item to toggle <strong>expand|collapse</strong> of it`s children. ','pmash');?> <br />
116
  </p>
117
+ <p><a href="#" id="expand_all"><?php _e('Expand All ','pmash');?></a> | <a href="#" id="collapse_all"><?php _e('Collapse All ','pmash');?></a></p>
118
 
119
  <?php pageMash_getPages(0); //pass 0, as initial parent ?>
120
 
121
  <p class="submit">
122
  <div id="update_status" style="float:left; margin-left:40px; opacity:0;"></div>
123
+ <input type="submit" id="pageMash_submit" tabindex="2" style="font-weight: bold; float:right;" value=<?php _e('Update ','pmash');?> name="submit"/>
124
  </p>
125
  <br style="margin-bottom: .8em;" />
126
  </div>
127
 
128
  <div class="wrap" style="width:160px; margin-bottom:0; padding:0;"><p><a href="#" id="pageMashInfo_toggle">Show|Hide Further Info</a></p></div>
129
  <div class="wrap" id="pageMashInfo" style="margin-top:-1px;">
130
+ <h2><?php _e('How to Use ','pmash');?></h2>
131
+ <p><?php _e('pageMash works with the wp_list_pages function. The easiest way to use it is to put the pages widget in your sidebar \'WP admin page \> Presentation \> Widgets\'. Click the configure button on the widget and ensure that \'sort by\' is set to \'page order\'. Hey presto, you\'re done. ','pmash');?></p>
132
+ <p><?php _e('You can also use the function anywhere in your theme code. e.g. in your sidebar.php file (but the code in here will not run if you\'re using any widgets) or your header.php file (somewhere under the body tag, you may want to use the depth=1 parameter to only show top level pages). The code should look something like the following:','pmash');?></p>
133
  <p style="margin-bottom:0; font-weight:bold;">Code:</p>
134
  <code id="pageMash_code">
135
  <span class="white">&lt;?php</span> <span class="blue">wp_list_pages(</span><span class="orange">'title_li=&lt;h2&gt;Pages&lt;/h2&gt;&amp;depth=0'</span><span class="blue">);</span> <span class="white">?&gt;</span>
136
  </code>
137
+ <p><?php _e('You can also hard-code pages to exclude and these will be merged with the pages you set to exclude in your pageMash admin.','pmash');?></p>
138
+ <p><?php _e('The code here is very simple and flexible, for more information look up <a href="http://codex.wordpress.org/Template_Tags/wp_list_pages" title="wp_list_pages Documentation">wp_list_pages() in the Wordpress Codex</a> as it is very well documented and if you have any further questions or feedback I like getting messages, so <a href="http://joelstarnes.co.uk/contact/" title="email Joel Starnes">drop me an email</a>.','pmash');?></p>
139
  <br />
140
  </div>
141
  <?php
143
 
144
  function pageMash_head(){
145
  //stylesheet & javascript to go in page header
146
+ global $pageMash_url, $CollapsePagesOnLoad;
147
 
148
  wp_deregister_script('prototype');//remove prototype since it is incompatible with mootools
149
+ wp_enqueue_script('pagemash_mootools', $pageMash_url.'/nest-mootools.v1.11.js', false, false); //code is not compatible with other releases of moo
150
+ wp_enqueue_script('pagemash_nested', $pageMash_url.'/nested.js', array('pagemash_mootools'), false);
151
+ wp_enqueue_script('pagemash_inline_edit', $pageMash_url.'/inline-edit.v1.2.js', array('pagemash_mootools'), false);
152
+ wp_enqueue_script('pagemash', $pageMash_url.'/pagemash.js', array('pagemash_mootools'), false);
153
  add_action('admin_head', 'pageMash_add_css', 1);
154
+ if(function_exists('wp_enqueue_style')){
155
+ // wp_enqueue_style('pagemash','/wp-content/plugins/pagemash/pagemash.css', array(), '1.0');
156
+ // $styles->add('codeword', $pageMash_url.'/pagemash.css');
157
+ // wp_enqueue_style('codeword', $pageMash_url.'/pagemash.css', array(), '1.0');
158
+ // wp_enqueue_style('codeword');
159
+ }
160
 
161
  }
162
 
163
  function pageMash_add_css(){
164
+ global $pageMash_url, $CollapsePagesOnLoad;
165
  if($CollapsePagesOnLoad): ?>
166
  <script type="text/javascript" charset="utf-8">
167
  window.addEvent('domready', function(){
171
  });
172
  </script>
173
  <?php endif;
174
+ // if(!function_exists('wp_enqueue_style')) // Pre-2.6 compatibility
175
+ printf('<link rel="stylesheet" type="text/css" href="%s/pagemash.css" />', $pageMash_url);
176
+ // ?>
177
  <!-- __ __ _
178
  WordPress Plugin | \/ | | |
179
  _ __ __ _ __ _ ___| \ / | __ _ ___| |__
198
  }
199
 
200
  function pageMash_add_pages(){
201
+ //add menu link
202
+ global $minlevel, $wp_version;
203
+ if($wp_version >= 2.7){
204
+ $page = add_submenu_page('edit-pages.php', 'pageMash page order', __('pageMash ','pmash'), $minlevel, __FILE__, 'pageMash_main');
205
+ }else{
206
+ $page = add_management_page('pageMash page order', 'pageMash', $minlevel, __FILE__, 'pageMash_main');
207
+ }
208
  add_action("admin_print_scripts-$page", 'pageMash_head'); //add css styles and JS code to head
209
  }
210
 
pmash-de_DE.mo ADDED
Binary file
pmash-de_DE.po ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: pmash\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2008-12-14 10:21+0800\n"
6
+ "PO-Revision-Date: \n"
7
+ "Last-Translator: Thomas Steinczhorn <tom@outsourcetoasia.de>\n"
8
+ "Language-Team: Outsource to Asia <tom@outsourcetoasia.de>\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Poedit-Language: German\n"
13
+ "X-Poedit-Country: GERMANY\n"
14
+ "X-Poedit-SourceCharset: utf-8\n"
15
+ "X-Poedit-KeywordsList: _e;__\n"
16
+ "X-Poedit-Basepath: .\n"
17
+ "X-Poedit-SearchPath-0: .\n"
18
+
19
+ #: pagemash.php:113
20
+ msgid "pageMash - pageManagement "
21
+ msgstr "pageMash - Seiten Verwaltung"
22
+
23
+ #: pagemash.php:115
24
+ msgid "Just drag the pages <strong>up</strong> or <strong>down</strong> to change the page order and <strong>left</strong> or <strong>right</strong> to change the page`s parent, then hit \"update\". "
25
+ msgstr "Einfach die Seiten <strong>rauf</strong> oder <strong>runter</strong> schieben um die Reihenfolge zu &auml;ndern. Nach <strong>links</strong> oder <strong>rechts</strong> um diese als Unterseite einer anderen zu machen."
26
+
27
+ #: pagemash.php:116
28
+ msgid "The icon to the left of each page shows if it has child pages, <strong>double click</strong> on that item to toggle <strong>expand|collapse</strong> of it`s children. "
29
+ msgstr "Das Symbol links an jeder Seite zeigt an, ob Unterseiten vorhanden sind. Mit einem <strong>Doppel Klick</strong> k&ouml;nnen diese <strong>ein- oder ausgeklappen</strong>. Am Ende auf \"Aktualisieren\". klicken."
30
+
31
+ #: pagemash.php:118
32
+ msgid "Expand All "
33
+ msgstr "Alle aufklappen"
34
+
35
+ #: pagemash.php:118
36
+ msgid "Collapse All "
37
+ msgstr "Alle einklappen"
38
+
39
+ #: pagemash.php:124
40
+ msgid "Update "
41
+ msgstr "Aktualisieren"
42
+
43
+ #: pagemash.php:131
44
+ msgid "How to Use "
45
+ msgstr "Anleitung"
46
+
47
+ #: pagemash.php:132
48
+ msgid "pageMash works with the wp_list_pages function. The easiest way to use it is to put the pages widget in your sidebar 'WP admin page \\> Presentation \\> Widgets'. Click the configure button on the widget and ensure that 'sort by' is set to 'page order'. Hey presto, you're done. "
49
+ msgstr "pageMash arbeitet mit der wp_list_pages Funktion. Die einfachste Methode ist, den Seiten Widget in der Sidebar zu aktivieren. [WP Admin > Darstellung > Widgets]. Klicke Konfiguration und stell sicher, dass die Sortierung auf \"Seiten Sortierung\" steht. Fertig!"
50
+
51
+ #: pagemash.php:133
52
+ msgid "You can also use the function anywhere in your theme code. e.g. in your sidebar.php file (but the code in here will not run if you're using any widgets) or your header.php file (somewhere under the body tag, you may want to use the depth=1 parameter to only show top level pages). The code should look something like the following:"
53
+ msgstr "Du kannst die Funktion &uuml;berall in deinem Theme Code verwenden. Zum Beispiel in der sidebar.php ( sollte jedoch ein Widget aktive sein, wird es nicht funktionieren) oder in der header.php ( Irgendwo innerhalb des Body tag. Vielleicht m&ouml;chtest du nur die Top-Level Seiten anzeigen, nutze hierzu depth=1 Parameter). Der Code sollte in etwa wie folgt aussehen:"
54
+
55
+ #: pagemash.php:138
56
+ msgid "You can also hard-code pages to exclude and these will be merged with the pages you set to exclude in your pageMash admin."
57
+ msgstr "Du kannst aber auch Seiten direkt ausschließen. Diese werden dann verkn&uuml;pft mit den ausgeschlossenen Seiten im pageMash Admin."
58
+
59
+ #: pagemash.php:139
60
+ msgid "The code here is very simple and flexible, for more information look up <a href=\"http://codex.wordpress.org/Template_Tags/wp_list_pages\" title=\"wp_list_pages Documentation\">wp_list_pages() in the Wordpress Codex</a> as it is very well documented and if you have any further questions or feedback I like getting messages, so <a href=\"http://joelstarnes.co.uk/contact/\" title=\"email Joel Starnes\">drop me an email</a>."
61
+ msgstr "Der Code ist sehr einfach und flexibel. Weitere Informationen gibt es unter <a href=\"http://codex.wordpress.org/Template_Tags/wp_list_pages\" title=\"wp_list_pages Dokumentation\"> wp_list_pages() in the Wordpress Codex</a>. Sollten noch Fragen bzw. Anregungen vorhanden sein <a href=\"http://joelstarnes.co.uk/contact/\" title=\"email Joel Starnes\">sendet mir einfach eine Email</a>."
62
+
63
+ #: pagemash.php:204
64
+ msgid "pageMash "
65
+ msgstr "Verwaltung"
66
+
saveList.php → savelist.php RENAMED
@@ -14,9 +14,15 @@
14
  if(!$_POST['m']) die('no data'); //die if no data is sent
15
  error_reporting(E_ALL);
16
  require_once('myjson.php'); //JSON decode lib
17
- //require_once('./../../../wp-config.php'); //config to connect to database
18
- include_once "../../../wp-config.php";
19
- include_once "../../../wp-settings.php";
 
 
 
 
 
 
20
 
21
  global $wpdb, $excludePages;
22
  $excludePages = array();
14
  if(!$_POST['m']) die('no data'); //die if no data is sent
15
  error_reporting(E_ALL);
16
  require_once('myjson.php'); //JSON decode lib
17
+
18
+ $root = dirname(dirname(dirname(dirname(__FILE__))));
19
+ if (file_exists($root.'/wp-load.php')) {
20
+ require_once($root.'/wp-load.php');
21
+ } else {
22
+ // Pre-2.6 compatibility
23
+ require_once($root.'/wp-config.php');
24
+ require_once($root.'/wp-settings.php');
25
+ }
26
 
27
  global $wpdb, $excludePages;
28
  $excludePages = array();