July 7, 2010 | 9 Comments »
Pligg Widgets
The upcoming release 1.1.0 will introduce a new “widget” system for Pligg. This new feature has been added to make managing your Pligg site from the Pligg Admin Panel an easier process. The Admin Panel homepage will be replaced with a new widget interface, which will allow you to customize the information that appears when you log into the Admin Panel.
Pligg widgets can be installed, removed, and organized very easily. Widgets will have their own management page where you install and uninstall them, similar to the existing Module Management page. Once you have installed a widget, you will see it appear on the top left area of your Admin Panel homepage. By left-clicking and holding on the widget title bar, you can drag-and-drop a widget box from one spot to another. This allows you to organize the widgets in an order that makes sense to you. Widgets can be minimized by clicking on the a minimize icon located in the widget title bar, although not all widgets will allow this.
Widgets differ from Pligg modules, because they are designed to only display data to administrators through the Admin Panel homepage. Widgets can be used in combination with a module to accomplish more advanced features. One example of this is the Akismet module and widget. The Akismet module adds an extra level of spam protection to your site by checking new stories and comments for bad content. The Akismet widget acts as an Admin Panel notice where you will receive an alert when Akismet has marked a story or comment as spam.
For developers, the new widget feature adds a lot of possibilities. Widgets offer a very simple way to add tools to your Admin Panel interface. You can write a module with as little as two files (init.php and widget.tpl) totaling only 10 lines. Widgets are based on two template files, stored in the widget’s template directory, and an init.php file that stores common widget settings and any PHP code that your widget may require.
The first widget template file is settings.tpl, which is responsible for any settings that your widget might have. Users access the settings.tpl file when they click on the wrench icon located in the widget title bar. Example uses for this file might be to have a user enter an API key or login details for a third party site. We recognize that not all widgets will need to be configured in this way, which is why the settings.tpl file is entirely optional. If your widget does not require the settings.tpl file you can disable the settings feature from the widget’s init.php file.
The second widget template file is widget.tpl. This controls the main widget content that appears when you are on the Admin Panel homepage. Pligg automatically places the content for both this template and the settings template inside of a widget box. This means that developers don’t have to think about the widget design, keeping the layout and style separate from the code.
The last file that you should learn about is the init.php file. This file is used by all widgets, and is similar to the MODULE_init.php files already being used by Pligg modules. The init.php file is stores common configuration values for widgets such as the widget name, description, version number, and other options. Below is an example of a widget init.php file.
<?php $widget['widget_title'] = "Example Widget"; $widget['widget_has_settings'] = 0; $widget['widget_shrink_icon'] = 1; $widget['widget_uninstall_icon'] = 1; $widget['name'] = 'Example'; $widget['desc'] = 'Here is a widget description.'; $widget['version'] = 1.0; ?>






July 8th, 2010 at 10:37 am
Hi
Looking nice ,waiting for the new pligg.
Best of Luck …
July 8th, 2010 at 4:27 pm
Great news! So when can we expect this? In the meantime, do we hold off buying any plugin? Thanks
July 11th, 2010 at 2:28 am
great feature.
waiting for the new version
July 21st, 2010 at 6:45 pm
[...] Starting today we are ready to begin the beta testing process for Pligg CMS 1.1.0. The new version of Pligg features an improved Admin Panel, a security fix, bug fixes, and many miscellaneous improvements. The 1.1.0 version of Pligg introduces Widgets to the Admin Panel Dashboard. If you don’t know what Widgets are, now is a good time to read the Widget blog article. [...]
August 4th, 2010 at 2:03 pm
[...] 1.1.0 release introduces a new Widget system to Pligg’s Admin Panel Dashboard. This release also includes a few security fixes, which [...]
August 4th, 2010 at 2:23 pm
[...] Social-Bookmarking-Software Pligg ist in der Version 1.1.0 erschienen. Das Update hat ein neues Widget System und es werden auch einige Sicherheitslöcher gestopft. Ein Update wird aus diesem Grund dringend [...]
August 5th, 2010 at 5:14 am
[...] 1.1.0 ออกแล้วครับ พร้อมกับแนะนำระบบ Widget ใหม่ เพื่อใช้สำหรับหน้า Admin Panel ของ Pligg [...]
August 16th, 2010 at 10:01 am
[...] holding another contest for developers. This time around we are asking developers to create free Pligg widgets to share with the community. What’s even better is that widgets are REALLY EASY to [...]
August 17th, 2010 at 1:48 am
good looking admin panel.