Pages

Showing posts with label adding. Show all posts
Showing posts with label adding. Show all posts

Sunday, May 5, 2013

Social Engine 4 - Adding a Menu Item to a Menu Specified under Module(create a menu plugin)

First things first

1. Create/Add a menu item to respective menu from admin

Layout=>Menu Editor

2. Now in table "engine4_core_menuitems" set the following attributes

name="credit_main_network" //we will use this later in code avoid spaces
module=Credit(your module name)
label=Network(label of your menu item)
plugin=Credit_Plugin_Menus
{"route" : "credit_general","action":network}


3. Next route will be defined in your "modulename/settings/manifest.php"

for example

'credit_general'=>array(
'route'=>'credits/:action/*',
'defaults'=>array(
      'module'=>'credit',
      'controller'=>'index',
      'action'=>'index'
      ),
'menu'=>'credit_main' //(from table engine4_core_menus)
'submenu'=> if any
'enabled'=>1,
'order'=>3
)

4. Now in plugin under your module create a file "Menus.php"(if not there)

and template it as follows

for example for me file was /module/credit/Plugin/menus.php

class Credit_Plugin_Menus
{
     // see name of menu from table we have used after underscore

    public function onMenuInitialize_CreditMainNetwork($row)
   {
           If(!Engine_Api::_()->user()->getViewers()->getIdentity())
           {
               return false;
           }
           return true;
   }
}

That's it you have successfully configured menu for your Module in Social Engine 4

Sunday, April 21, 2013

Social Engine 4-Flash,External Interface Available Text

Text in Social Engine

SM2 SWF V2.97a. 20110918(AS3/Flash)
External Interface Available
Adding External Interface Callbacks
Testing Flash->JS,
JS->Flash OK
Flash->JS OK

This is Social Engine Debug Info and comes only in Production Mode

Sunday, November 11, 2012

Adding php and phpunit to Windows default path

Adding php and phpunit to Windows default path

Open System in control panel=>Advance System Setting=>Envirnoment Variables=>

You will find a variable path in

Path

append to it your php directory..that's it

 Here is an image of the same...