這個外掛並未在最新的 3 個 WordPress 主要版本上進行測試。開發者可能不再對這個外掛進行維護或提供技術支援,並可能會與更新版本的 WordPress 產生使用上的相容性問題。

Eletro Widgets

描述

Allows you to use the power and flexibility of the WordPress Widgets to set up a dynamic area anywhere in your site and manage multiple columns of widgets, dragging and dropping them around

Usage

<?php new EletroWidgets([$cols = 2][, $id = 0] [, $onlyEletroWidgets = false]); ?>

The basics:

Go to the theme file where you want to put eletro-widgets and add the following code:

<?php if (class_exists('EletroWidgets')) new EletroWidgets(); ?>

This will create a two column container on your site where you will be able to add the widgets.

The first paramater it takes is the number of columns you want your container to have. So, if you want a 3 columns container, this is what you have to do:

<?php if (class_exists('EletroWidgets')) new EletroWidgets(3); ?>

After putting the code above in a template file, go to any of the pages that uses this template (logged with an user with administrative privileges) and you will be able to add or remove widgets from the Eletro Widgets area. You can add a WordPress default widget or you can create your own widget (see http://www.emanueleferonato.com/2008/02/15/how-to-create-a-wordpress-widget/).

ATTENTION: there are some default WordPress widgets that doesn’t work with Eletro Widgets (we are working on this issue for future releases)

Customizing the appearance of the widgets

Eletro Widgets comes with a default css stylesheet that you can customize to fit your theme.

In order to do that, copy the file eletro-widgets.css to your theme’s folder and edit it there as you like.

Advanced – multiple containers on the same page

Eletro Widgets allow you to have more than one container of widgets at the same page.

For example, you can have one line with 3 columns of widgets, and another set of 2 columns of widgets underneath.

In order to do that, all you have to do is declare a new instance of EletroWidgets passing the second parameter, wich is the unique ID for this container.

Example:

<?php if (class_exists('EletroWidgets')) new EletroWidgets(); ?>
<?php if (class_exists('EletroWidgets')) new EletroWidgets(3, 2); ?>

Note: There MUST be at least one container with the ID 0 (zero). All you have to do is declare at least one EletroWidget leaving the ID parameter empty

How to restrict available widgets

You may want to choose only a few widgets to be available on your eletro widget canvas.

You can do that by passing the third paramater as true. It will tell this canvas to hide from the list of available widgets all the widgets that were not defined as an “eletro-widget”.

To define a widget as an “eletro-widget”, do the following:

<?php defineAsEletroWidget($widgetId); ?>

安裝

  1. Download the package
  2. Upload to the plugins folder
  3. Activate it
  4. See Other Notes for more details on how to configure and use this plugin

評價

There are no reviews for this plugin.

貢獻者及開發者

“Eletro Widgets” 是一個開源的軟體。以下的人對這個外掛作出了貢獻。

貢獻者

將 Eletro Widgets 外掛本地化為台灣繁體中文版。

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄