WPML-compatible version of CMS Tree Page View now available for testing

Skrivet måndag 26 juli, 2010 | 8 kommentarer

The last week I’ve been busy modifying my plugin CMS Tree Page View to make it work together with the WPML-plugin, a plugin that let you translate the contents of your site.

As some of you know, my plugin show a tree (like in Windows Explorer or OS X Finder) with all the pages in your site. In this tree you can quickly use expand/collapse to show sub-pages and you can drag-and-drop to change the order or to move pages. To cut it short: It’s page management simplified!

Before this update all the pages belonging to all different languages where mixed together in the tree. With this update however you can now select between all the languages configured in WPML, so the tree will only show one language at a time. I think WPML and CMS Tree Page View both are great plugins and what could be better than both plugins working fine together? :)

I am releasing this beta version of CMS Tree Page View so you brave WPML-users out there can test it and report any bugs to me before I upload it to wordpress.org. Download the beta version here: http://bit.ly/c2kmdf and report any bugs to me at par.thernstrom@gmail.com.

And now for a little bonus feature: this beta version of CMS Tree Page View can also show custom post types – a much asked for feature.

Here is a screenshot showing both the WPML-functions and the custom post type in action:

..and support for custom post types!

wp_list_pages: customize the look of pages that have children

Skrivet tisdag 13 juli, 2010 | Inga kommentarer

Here’s a quick tip for WordPress and the use of wp_list_pages to create menus.

On a web site you often have pages with sub-pages/children and often you want to style these pages a bit different. Perhaps add a plus-sign or an arrow in front of the page. When I was working with Nice Navigation for WordPress I noticed that this was not possible by default in WordPress. It is however pretty easy to fix. Just add this code to your functions.php:

add_filter('page_css_class', 'nice_navigation_page_css_class', 10, 2);
/**
 * adds class "page-has-children" to all pages that have children
 * @param array $class.    The page css class being modified, passed as an array from Walker_Page
 * @param object $page.    The page object passed from Walker_Page
 * @return array            Returns the new page css class.
 */
function nice_navigation_page_css_class($class, $page) {
 // check if current page has children
 $children = get_pages('child_of='.$page->ID);
 if (sizeof($children) > 0) {
  $class[] = "page-has-children";
 }

 return $class;
}

Now every page outputted by wp_list_pages have the class ”page-has-children” and you can style them any way you want.

Nice Navigation creates good looking expand/collapse-menus for WordPress blogs/sites

Skrivet lördag 10 juli, 2010 | Inga kommentarer

Yes, a new plugin/widget for WordPress now again. This one is a quick and dirty version, but it seems to work pretty good. Please give it a try and let me know how – and if! – it works for you.

It looks something like this…

… and you can find more info and a download link on it’s own page http://eskapism.se/code-playground/nice-navigation/

Simple History is a new history plugin for WordPress

Skrivet tisdag 06 juli, 2010 | 2 kommentarer

Yes (but no ”Oops!”), I did it again: I created a new plugin for WordPress. I’m really starting to get the hang of this now :) .

This time it’s a history/change log/audit/recent changes-plugin called ”Simple History”. Just take a look at this screenshot and you will get the hang of it:

It fits perfectly on your dashboard – or on a separate page, if you prefer that – and it shows you the most recent changes that has been made within WordPress. What articles have been created, modified or deleted? What attachments have been uploaded, modified or deleted? And so on. It’s a pretty good plugin to have on websites where several people are involved: ”Has someone done anything today? Ah, Sarah uploaded the new press release and created an article for it. Good. Now I know.” :)

And it’s a beta version!

I don’t want to start to sound like Google here, but the plugin is in beta. Until it’s available on wordpress.org (I’m waiting for ”approvement”) you can find the plugin here: http://eskapism.se/code-playground/simple-history/

Howdy! This is the personal website of Swedish web developer Pär Thernström. You can contact me directly at par.thernstrom@gmail.com or through Twitter at twitter.com/eskapism/.

Besök arkivet för en lista med alla inlägg.