How to Create a Widget in socialengine

How to Create a Widget in socialengine

Socialengine is for social networking. It is a paid software with lot of features. Actually socialengine is an equivalent of facebook. The main features of facebook is available in socialengine. In developers eye socialengine is a  PHP zend framework based project. Its uses all good concepts of zend framewok. They developed custom functions for easier working.The widgets are very important functionality in socialengine. The main feature of widgets are transportability. We can place widgets in any page using admin side or via code.

For create a widget in socialengine,  there are two ways

1. Using custom code

Go to particular module and there is a directory named as widgets


Inside widgets folder,create folder with your widget name
Here smartwidget is my widget name. After that create two important files inside the this folder .

1.Controller.php 2.index.tpl

We know  SocialEngine uses the zendfrawework,that is MVC(model view controller). So put widget controller file in Controller.php and the widget view is in index.tpl. For the model use the module model or any other model.



class Group_Widget_SmartwidgetController extends Engine_Content_Widget_Abstract {

public function indexAction()  {

$this->view->message =”welcome to”;




The index action is have great role in widget. All the functionality part is writing here and passing the result to view.

The html part is writing in view file.


<?php echo $this->message; ?>

Now the widget is ready to use with the corresponding module eg:group. So edit the following file

modules ->group-> settings->content.php . Then only we can manage it from admin side.


array( ‘title’ => ‘Smart Widget’,

‘description’ => ‘This is a new Group smart Widget’,

‘category’ => ‘Group’,

‘type’ => ‘widget’,

‘name’ => ‘group.smartwidget’,


2.Using the admin side

go to admin->manange->packages&plugins ->developer sdk->create package
a) select type(modules,widgets,menu..etc)
b) select name
c) select title
d) select description
e) select Author
f) select version
Then hit the button create package
we will get a downloadable Zip file.Again come to admin->manange-> package->install package



Leave a Reply