v1.2.0
- Introduces multi-lingual support. - Adds German translation - Moves pageMash into the Pages menu for WP2.7 - All thanks to Tom [www.outsourcetoasia.de] git-svn-id: https://plugins.svn.wordpress.org/pagemash/trunk@82491 b8457f37-d9ea-0310-8a92-e5e31aec5664
This commit is contained in:
parent
1620759970
commit
e50f7513d3
24
README.txt
24
README.txt
|
@ -3,13 +3,13 @@ Contributors: JoelStarnes
|
||||||
Tags: order pages, ajax, re-order, drag-and-drop, admin, manage, page, pages, sidebar, header, hide,
|
Tags: order pages, ajax, re-order, drag-and-drop, admin, manage, page, pages, sidebar, header, hide,
|
||||||
Requires at least: 2.1
|
Requires at least: 2.1
|
||||||
Tested up to: 2.7
|
Tested up to: 2.7
|
||||||
Stable tag: 1.1.6
|
Stable tag: 1.2.0
|
||||||
|
|
||||||
Organise page order and manage page structure with this simple drag-and-drop Ajax interface.
|
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.
|
||||||
|
|
||||||
== Description ==
|
== Description ==
|
||||||
|
|
||||||
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.
|
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.
|
||||||
|
|
||||||
Checkout the example page: http://joelstarnes.co.uk/pagemash/example
|
Checkout the example page: http://joelstarnes.co.uk/pagemash/example
|
||||||
Feedback is greatly appreciated: http://joelstarnes.co.uk/contact
|
Feedback is greatly appreciated: http://joelstarnes.co.uk/contact
|
||||||
|
@ -21,7 +21,7 @@ Feedback is greatly appreciated: http://joelstarnes.co.uk/contact
|
||||||
1. Activate in 'Plugins' admin menu
|
1. Activate in 'Plugins' admin menu
|
||||||
1. Then have fun..
|
1. Then have fun..
|
||||||
|
|
||||||
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.
|
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.
|
||||||
|
|
||||||
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:
|
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:
|
||||||
|
|
||||||
|
@ -49,12 +49,18 @@ Any good up-to-date browser should work fine. I test in Firefox, IE7, Safari and
|
||||||
|
|
||||||
== Screenshots ==
|
== Screenshots ==
|
||||||
|
|
||||||
1. Admin Interface
|
1. Admin Interface.
|
||||||
|
|
||||||
2. Setting up the page widget. [WP-Admin > Presentation > Widgets]
|
2. Setting up the page widget in the old WP admin.
|
||||||
|
|
||||||
|
|
||||||
==Change Log==
|
==Change Log==
|
||||||
|
= 1.2.0 =
|
||||||
|
- Introduces multi-lingual support.
|
||||||
|
- Adds German translation
|
||||||
|
- Moves pageMash into the Pages menu for WP2.7
|
||||||
|
- All thanks to Tom [www.outsourcetoasia.de]
|
||||||
|
|
||||||
= 1.1.6 =
|
= 1.1.6 =
|
||||||
- Corrected filename case.
|
- Corrected filename case.
|
||||||
|
|
||||||
|
@ -116,4 +122,8 @@ Any good up-to-date browser should work fine. I test in Firefox, IE7, Safari and
|
||||||
|
|
||||||
== Localization ==
|
== Localization ==
|
||||||
|
|
||||||
Currently only available in english.
|
= pageMash is available in: =
|
||||||
|
- English
|
||||||
|
- German :: courtesy of Tom [www.outsourcetoasia.de]
|
||||||
|
|
||||||
|
If you'd like to translate pageMash into your own language get in touch and I'll be happy to add it in.
|
||||||
|
|
46
pagemash.php
46
pagemash.php
|
@ -2,9 +2,9 @@
|
||||||
/*
|
/*
|
||||||
Plugin Name: pageMash
|
Plugin Name: pageMash
|
||||||
Plugin URI: http://joelstarnes.co.uk/pagemash/
|
Plugin URI: http://joelstarnes.co.uk/pagemash/
|
||||||
Description: pageMash > pageManagement [WP_Admin > Manage > pageMash]
|
Description: 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.
|
||||||
Author: Joel Starnes
|
Author: Joel Starnes
|
||||||
Version: 1.1.6
|
Version: 1.2.0
|
||||||
Author URI: http://joelstarnes.co.uk/
|
Author URI: http://joelstarnes.co.uk/
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
@ -23,7 +23,6 @@ $CollapsePagesOnLoad = false; /*[deafult=true]*/
|
||||||
|
|
||||||
$ShowDegubInfo = false; /*[deafult=false]*/
|
$ShowDegubInfo = false; /*[deafult=false]*/
|
||||||
/* Show server response debug info */
|
/* Show server response debug info */
|
||||||
|
|
||||||
###################################################################
|
###################################################################
|
||||||
/*
|
/*
|
||||||
INSPIRATIONS/CREDITS:
|
INSPIRATIONS/CREDITS:
|
||||||
|
@ -57,9 +56,12 @@ if ( !defined('WP_CONTENT_URL') )
|
||||||
if ( !defined('WP_CONTENT_DIR') )
|
if ( !defined('WP_CONTENT_DIR') )
|
||||||
define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' );
|
define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' );
|
||||||
// Guess the location
|
// Guess the location
|
||||||
$codeWord_path = WP_CONTENT_DIR.'/plugins/'.plugin_basename(dirname(__FILE__));
|
$pageMash_path = WP_CONTENT_DIR.'/plugins/'.plugin_basename(dirname(__FILE__));
|
||||||
$pageMash_url = WP_CONTENT_URL.'/plugins/'.plugin_basename(dirname(__FILE__));
|
$pageMash_url = WP_CONTENT_URL.'/plugins/'.plugin_basename(dirname(__FILE__));
|
||||||
|
|
||||||
|
// load localisation files
|
||||||
|
load_plugin_textdomain('pmash','wp-content/plugins/pagemash/');
|
||||||
|
|
||||||
function pageMash_getPages($post_parent){
|
function pageMash_getPages($post_parent){
|
||||||
//this is a recurrsive function which calls itself to produce a nested list of elements
|
//this is a recurrsive function which calls itself to produce a nested list of elements
|
||||||
//$post_parent should be 0 for root pages, or contain a pageID to return it's sub-pages
|
//$post_parent should be 0 for root pages, or contain a pageID to return it's sub-pages
|
||||||
|
@ -79,12 +81,12 @@ function pageMash_getPages($post_parent){
|
||||||
<span class="pageMash_more">»</span>
|
<span class="pageMash_more">»</span>
|
||||||
<span class="pageMash_pageFunctions">
|
<span class="pageMash_pageFunctions">
|
||||||
id:<?php echo $page->ID;?>
|
id:<?php echo $page->ID;?>
|
||||||
[<a href="<?php echo get_bloginfo('wpurl').'/wp-admin/post.php?action=edit&post='.$page->ID; ?>" title="Edit This Page">edit</a>]
|
[<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>]
|
||||||
<?php if($excludePagesFeature): ?>
|
<?php if($excludePagesFeature): ?>
|
||||||
[<a href="#" title="Show|Hide" class="excludeLink" onclick="toggleRemove(this); return false">hide</a>]
|
[<a href="#" title="<?php _e('Show|Hide'); ?>" class="excludeLink" onclick="toggleRemove(this); return false"><?php _e('hide') ?></a>]
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php if($renamePagesFeature): ?>
|
<?php if($renamePagesFeature): ?>
|
||||||
[<a href="#" title="Rename Page" class="rename">Rename</a>]
|
[<a href="#" title="<?php _e('Rename Page'); ?>" class="rename"><?php _e('Rename'); ?></a>]
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
|
@ -105,35 +107,35 @@ function pageMash_main(){
|
||||||
<div id="debug_list"<?php if(false==$ShowDegubInfo) echo' style="display:none;"'; ?>></div>
|
<div id="debug_list"<?php if(false==$ShowDegubInfo) echo' style="display:none;"'; ?>></div>
|
||||||
<div id="pageMash" class="wrap">
|
<div id="pageMash" class="wrap">
|
||||||
<div id="pageMash_checkVersion" style="float:right; font-size:.7em; margin-top:5px;">
|
<div id="pageMash_checkVersion" style="float:right; font-size:.7em; margin-top:5px;">
|
||||||
version [1.1.6]
|
version [1.2.0]
|
||||||
</div>
|
</div>
|
||||||
<h2 style="margin-bottom:0; clear:none;">pageMash - pageManagement</h2>
|
<h2 style="margin-bottom:0; clear:none;"><?php _e('pageMash - pageManagement ','pmash');?></h2>
|
||||||
<p style="margin-top:4px;">
|
<p style="margin-top:4px;">
|
||||||
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 />
|
<?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 />
|
||||||
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.
|
<?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 />
|
||||||
</p>
|
</p>
|
||||||
<p><a href="#" id="expand_all">Expand All</a> | <a href="#" id="collapse_all">Collapse All</a></p>
|
<p><a href="#" id="expand_all"><?php _e('Expand All ','pmash');?></a> | <a href="#" id="collapse_all"><?php _e('Collapse All ','pmash');?></a></p>
|
||||||
|
|
||||||
<?php pageMash_getPages(0); //pass 0, as initial parent ?>
|
<?php pageMash_getPages(0); //pass 0, as initial parent ?>
|
||||||
|
|
||||||
<p class="submit">
|
<p class="submit">
|
||||||
<div id="update_status" style="float:left; margin-left:40px; opacity:0;"></div>
|
<div id="update_status" style="float:left; margin-left:40px; opacity:0;"></div>
|
||||||
<input type="submit" id="pageMash_submit" tabindex="2" style="font-weight: bold; float:right;" value="Update" name="submit"/>
|
<input type="submit" id="pageMash_submit" tabindex="2" style="font-weight: bold; float:right;" value=<?php _e('Update ','pmash');?> name="submit"/>
|
||||||
</p>
|
</p>
|
||||||
<br style="margin-bottom: .8em;" />
|
<br style="margin-bottom: .8em;" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="wrap" style="width:160px; margin-bottom:0; padding:0;"><p><a href="#" id="pageMashInfo_toggle">Show|Hide Further Info</a></p></div>
|
<div class="wrap" style="width:160px; margin-bottom:0; padding:0;"><p><a href="#" id="pageMashInfo_toggle">Show|Hide Further Info</a></p></div>
|
||||||
<div class="wrap" id="pageMashInfo" style="margin-top:-1px;">
|
<div class="wrap" id="pageMashInfo" style="margin-top:-1px;">
|
||||||
<h2>How to Use</h2>
|
<h2><?php _e('How to Use ','pmash');?></h2>
|
||||||
<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>
|
<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>
|
||||||
<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>
|
<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>
|
||||||
<p style="margin-bottom:0; font-weight:bold;">Code:</p>
|
<p style="margin-bottom:0; font-weight:bold;">Code:</p>
|
||||||
<code id="pageMash_code">
|
<code id="pageMash_code">
|
||||||
<span class="white"><?php</span> <span class="blue">wp_list_pages(</span><span class="orange">'title_li=<h2>Pages</h2>&depth=0'</span><span class="blue">);</span> <span class="white">?></span>
|
<span class="white"><?php</span> <span class="blue">wp_list_pages(</span><span class="orange">'title_li=<h2>Pages</h2>&depth=0'</span><span class="blue">);</span> <span class="white">?></span>
|
||||||
</code>
|
</code>
|
||||||
<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>
|
<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>
|
||||||
<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>
|
<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>
|
||||||
<br />
|
<br />
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
|
@ -196,9 +198,13 @@ function pageMash_add_excludes($excludes){
|
||||||
}
|
}
|
||||||
|
|
||||||
function pageMash_add_pages(){
|
function pageMash_add_pages(){
|
||||||
//add link in the management tab
|
//add menu link
|
||||||
global $minlevel;
|
global $minlevel;
|
||||||
$page = add_management_page('pageMash page order', 'pageMash', $minlevel, __FILE__, 'pageMash_main');
|
if($wp_version >= 2.7){
|
||||||
|
$page = add_submenu_page('edit-pages.php', 'pageMash page order', __('pageMash ','pmash'), $minlevel, __FILE__, 'pageMash_main');
|
||||||
|
}else{
|
||||||
|
$page = add_management_page('pageMash page order', 'pageMash', $minlevel, __FILE__, 'pageMash_main');
|
||||||
|
}
|
||||||
add_action("admin_print_scripts-$page", 'pageMash_head'); //add css styles and JS code to head
|
add_action("admin_print_scripts-$page", 'pageMash_head'); //add css styles and JS code to head
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Binary file not shown.
|
@ -0,0 +1,66 @@
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: pmash\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2008-12-14 10:21+0800\n"
|
||||||
|
"PO-Revision-Date: \n"
|
||||||
|
"Last-Translator: Thomas Steinczhorn <tom@outsourcetoasia.de>\n"
|
||||||
|
"Language-Team: Outsource to Asia <tom@outsourcetoasia.de>\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"X-Poedit-Language: German\n"
|
||||||
|
"X-Poedit-Country: GERMANY\n"
|
||||||
|
"X-Poedit-SourceCharset: utf-8\n"
|
||||||
|
"X-Poedit-KeywordsList: _e;__\n"
|
||||||
|
"X-Poedit-Basepath: .\n"
|
||||||
|
"X-Poedit-SearchPath-0: .\n"
|
||||||
|
|
||||||
|
#: pagemash.php:113
|
||||||
|
msgid "pageMash - pageManagement "
|
||||||
|
msgstr "pageMash - Seiten Verwaltung"
|
||||||
|
|
||||||
|
#: pagemash.php:115
|
||||||
|
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\". "
|
||||||
|
msgstr "Einfach die Seiten <strong>rauf</strong> oder <strong>runter</strong> schieben um die Reihenfolge zu ändern. Nach <strong>links</strong> oder <strong>rechts</strong> um diese als Unterseite einer anderen zu machen."
|
||||||
|
|
||||||
|
#: pagemash.php:116
|
||||||
|
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. "
|
||||||
|
msgstr "Das Symbol links an jeder Seite zeigt an, ob Unterseiten vorhanden sind. Mit einem <strong>Doppel Klick</strong> können diese <strong>ein- oder ausgeklappen</strong>. Am Ende auf \"Aktualisieren\". klicken."
|
||||||
|
|
||||||
|
#: pagemash.php:118
|
||||||
|
msgid "Expand All "
|
||||||
|
msgstr "Alle aufklappen"
|
||||||
|
|
||||||
|
#: pagemash.php:118
|
||||||
|
msgid "Collapse All "
|
||||||
|
msgstr "Alle einklappen"
|
||||||
|
|
||||||
|
#: pagemash.php:124
|
||||||
|
msgid "Update "
|
||||||
|
msgstr "Aktualisieren"
|
||||||
|
|
||||||
|
#: pagemash.php:131
|
||||||
|
msgid "How to Use "
|
||||||
|
msgstr "Anleitung"
|
||||||
|
|
||||||
|
#: pagemash.php:132
|
||||||
|
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. "
|
||||||
|
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!"
|
||||||
|
|
||||||
|
#: pagemash.php:133
|
||||||
|
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:"
|
||||||
|
msgstr "Du kannst die Funktion ü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öchtest du nur die Top-Level Seiten anzeigen, nutze hierzu depth=1 Parameter). Der Code sollte in etwa wie folgt aussehen:"
|
||||||
|
|
||||||
|
#: pagemash.php:138
|
||||||
|
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."
|
||||||
|
msgstr "Du kannst aber auch Seiten direkt ausschließen. Diese werden dann verknüpft mit den ausgeschlossenen Seiten im pageMash Admin."
|
||||||
|
|
||||||
|
#: pagemash.php:139
|
||||||
|
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>."
|
||||||
|
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>."
|
||||||
|
|
||||||
|
#: pagemash.php:204
|
||||||
|
msgid "pageMash "
|
||||||
|
msgstr "Verwaltung"
|
||||||
|
|
Loading…
Reference in New Issue