Little Help in Navigating from Older Version

By Topol


I had a working version of Elgg, but could not follow the changes as was busy with something else and could not follow the development and not am not a very good Php programming. Can someone be nice to tell me how do I navigate the code of Start.php to elgg-plugin.php. I tired to look into bootstrap class but could not follow it. I can't understand how can I put a function like this in bootstrap....

The old code looked like this and my programmer has left and trying to understand this code and navigate to the elgg 5.0 version which has a steep learning curve and able to implement apps. But I am getting old and dumb to understand all the steps, and so if someone can take pain to guide me to the right direction in this...I am attaching the code of Start.php

elgg_register_event_handler('init', 'system', 'curriculum_init');

function curriculum_init() {

     elgg_register_library('elgg:encryptdecrypt', elgg_get_plugins_path() . 'curriculum/lib/EncryptionHelper.php');

     // menus

        elgg_register_menu_item('site', array(

                'name' => 'curriculum',

                'text' => elgg_echo('curriculum'),

                'href' => 'curriculum/available'


        elgg_register_js('js.curriculum', '/mod/curriculum/js/curriculum.js?v=1.0.0');


        elgg_register_js('js.ajax.curriculum', '/mod/curriculum/js/asyncCalls.js?v=1.0.0');



        elgg_register_js('js.helper.curriculum', '/mod/curriculum/js/helper.js?v=1.0.0');



function curriculum_page_handler($page) {




        elgg_push_breadcrumb(elgg_echo('curriculum'), 'curriculum/available');

        if (!isset($page[0])) {

                $page[0] = 'available';


        $vars = array();

        $vars['page'] = $page[0];

        $pages = dirname(__FILE__) . '/pages/curriculum';

        switch ($page [0]) {

                case "available" :

                        include "$pages/available.php";


              case "teach" :

                     include "$pages/teach.php";


                case "learn" :

                        include "$pages/learn.php";


                default :

                        return false;


        return true;


function curriculum_page_menu($hook, $type, $return, $params) {

        if (elgg_is_logged_in()) {

                // only show side links in curriculum pages

                if (elgg_in_context('curriculum')) {

                        $page_owner = elgg_get_page_owner_entity();

                        if (!$page_owner) {

                                //$page_owner = elgg_get_logged_in_user_entity();


                                $encryptionHelper = EncryptionHelper::getInstance();

                                $encId = rawurlencode($encryptionHelper->m_encrypt($page_owner->guid));

                                $encEmail = rawurlencode($encryptionHelper->m_encrypt($page_owner->email));

                                $return[0] = new ElggMenuItem('dropbox', elgg_echo('curriculum:dropbox'), 'javascript:syncDropBox("'.$enc>

//                              $return[1] = new ElggMenuItem('uploadBook', elgg_echo('curriculum:uploadbook') , 'javascript:uploadBook(">





        return $return;