Linux 软件免费装
Banner图

Gridster

开发者 carstenbach
更新时间 2013年4月22日 15:51
捐献地址: 去捐款
PHP版本: 3.3 及以上
WordPress版本: 3.6
版权: GPLv2 or later
版权网址: 版权信息

标签

shortcode columns grid grid layout magazine drag & drop GUI gridster layout management multi-column user-friendly

下载

1.2 1.3 1.3.1 1.3.2 1.4 1.2.1

详情介绍:

Gridster is a WordPress plugin that makes building intuitive draggable layouts from elements spanning multiple columns. You can even dynamically resize, add and remove elements from the grid, as edit the elements content inline. You can fork Gridster at Github or tell me about your issues. General - Features Templates Adjust the HTML output of the gridster-widgets by overriding the default template from cbach-wp-gridster/views/gridster-default.php. Just copy this file into a new created directory gridster-templates within your theme folder and change it to your needs. Furthermore you can add different templates per post_type, when you create files like gridster-YOUR_POST_TYPE_NAME.php within these folder. By using the later described gridster_locate_templates_from filter you are able to add more conditions to make your templates match more customized conditions. Inline editing With help of the Jeditable library it is possible to edit loaded content directly inside the gridster workbench. So if you are using a post called "My grandmothers apple pie is the best", you could adjust the text inside your gridster-widget to shorter version, ie. "best apple pie" without editing the original post. Just add some CSS class to the wrapper element, where your title will appear. For editing single lines of text, like titles add class="gridster_edit". If you want to edit texts in more comfortable textarea use class="gridster_edit-area" Have a look at the /views/gridster-default.php inside the plugin directory to get a clue.

安装:

  1. Extract the zip file
  2. Drop the contents in the wp-content/plugins/ directory of your WordPress installation
  3. Activate the plugin from plugins page

屏幕截图:

  • Create a new Gridster by dragging your content from the Lists of your posttypes left to the workbench on the right. (with WordPress 3.5.1)
  • Move the Gridster-Widgets around via drag & drop. Underlying Widgets are re-layoutet on the fly. (with WordPress 3.5.1)
  • Resize the Gridster-Widgets and get updated Images directly inside the workbench. The Plugin looks for the best fitting size according to your defined Thumbnail-Image-Sizes. (with WordPress 3.5.1)
  • After adding a new Gridster-Widget it is pre-populated with Title and Excerpt of the fetched post. Now you are able to inline edit theese texts, without the need to modify the original post. (with WordPress 3.5.1)
  • You have two different types of inline-editors: input-fields and textareas. Define the editable content blocks by customizing the Gridster-Widget Templates within your Theme. (with WordPress 3.5.1)
  • A list of all Gridster posts, also showing the Shortcodes. (with WordPress 3.5.1)
  • An embeded Shortcode inside the Editor is replaced by visual placeholder, to keep things easy for your editors. No need to write (short-)code. Besides it's possible to update, edit and delete the shortcode via icons, formerly known from the [gallery]-shortcode. (with WordPress 3.5.1)
  • Style Selector with custom CSS classes, populated by the `gridster_choose_from_custom_css_classes_for_widgets` filter. And the frontend output with our custom classes appended to the WordPress post_class array. (with WordPress 3.5.1)

常见问题:

How can I customize the layout of the Gridster Widgets on the frontend?

There a some CSS classes you can use

  • .gridster-not-loaded is appended to the <body> element, when a shortcode is found on the current page
  • .gridster-loaded replaces the former mentioned .gridster-not-loaded body-class, when Gridster Javascript is successfully loaded
  • .gridster-wrap is the wrapper for the whole shortcode output
  • .gs_w is the generic class aplied to every Gridster Widget

How to avoid the loading of gridster_frontend.css

The Plugin comes with minimal styling for the Gridster Markup, but maybe you'll add theese few lines of CSS to your own theme stylesheet to reduce server requests. Just set the constant GRIDSTER_FRONTEND_CSS to false in your themes functions.php file. /* * Do not use gridster frontend styles / define( 'GRIDSTER_FRONTEND_CSS', false );

How to get best fitting image-sizes to work?

Gridster uses the generated images used as post-thumbnails by default. When you add existing content to a new gridster, the plugin will look for the best fitting image size, according to the width and height of your current gridster-widget. So if you have defined the base width to 100px, base height to 100px and your margins to 10px, the plugin will look for images of 100 * 100 px. Now, when you resize this gridster-widget to, let's say, 1 row with 2 columns, the plugin will reload this gridster-widget with an image of 220 * 100 px. To avoid ugly cropping or unwanted scaling of the post-thumbnails, you go best with defining some additional post-thumbnail sizes within your functions.php like so. /* * Add some additional post-thumbnail sizes, that can be used by the Gridster Plugin * e.g. we have base-width: 100px, base-height: 100px and margins both 10px * * @see http://codex.wordpress.org/Function_Reference/add_image_size * / if ( function_exists( 'add_image_size' ) ) { add_image_size( 'gridster-1col-1row', 100, 100, true ); add_image_size( 'gridster-2col-1row', 220, 100, true ); add_image_size( 'gridster-3col-1row', 340, 100, true ); add_image_size( 'gridster-4col-1row', 460, 100, true ); add_image_size( 'gridster-1col-2row', 100, 220, true ); add_image_size( 'gridster-1col-3row', 100, 340, true ); add_image_size( 'gridster-1col-4row', 100, 460, true ); /* ... and so on ... / }

Do you have some question?

Drop me a line at gridster@carsten-bach.de

更新日志:

1.4 1.3.2 1.3.1 1.3 1.2.1 1.2 1.1 1.0