Elgg | Quick-n-Dirty Notes :-)

After cooling my heels for a pretty long time – mostly devoid of any interaction with IDEs and semicolons and more, I was made to sit through a four day task of customizing and deploying an Elgg based portal for my current institute.
So I got myself a new copy each of XAMPPLite & Elgg to kick-start the proceedings 😉
Anyways, here goes the patches that I found in my notebook after the completion-

1. “The database backend you have installed doesn’t meet the basic requirements to run Elgg”

This issue generally arises as early as at the time of installation itself.
Here’s my quickfix : 

• Remove the line in your root install.php file that checks for MySQL5, i.e.: validate_platform();

• Now upload this to your Elgg folder at the host and open the installation page in your browser, fill out the forms with the requested information and most probably – all should be fine!

2. “Object is a misconfigured plugin”

If you enable a plugin and then see the error message “<plugin name> is a misconfigured plugin”, this implies there is probably no start.php file in the plugin’s directory. If you are installing a plugin called “test”, there will be a test directory under mod. In that test directory there needs to be a start.php – file: /mod/test/start.php.

You have three options for fixing this:

• Repair the problem (If permissions issues are found, fix permissions. If no start.php is found, put an empty start.php there.)

• Create an empty file called disabled in the /mod directory. This will allow you to disable the plugin through the Tools Administration page.

• If all else fails, remove the problematic directory from /mod.

3. Extending the external pages plugin to include more static pages

Say, we need to add a FAQ page to the list of standard external pages.
You may follow the following sequence of activities for this-

Download external pages pluginand open the downloaded plugin.
  

a. Search for the file en.php and seek the following line-

‘expages:privacy’ => “Privacy”, 

Add the following code after this line- 

‘expages:faq’ => “Faq”,

 

b. Search for the file footer_menu.php and seek the following line- 

<a href=”<?php echo $vars[‘url’]; ?>pg/expages/read/Privacy/”><?php echo elgg_echo(‘expages:privacy’); ?></a> | 

Add the following code after this line- 

<a href=”<?php echo $vars[‘url’]; ?>pg/expages/read/Faq/”><?php echo elgg_echo(‘expages:faq’); ?></a> |

 

c. Search for the file menu.php and seek the following line- 

  <li <?php if($type == ‘privacy’) echo “class = ‘selected'”; ?>><a href=”<?php echo $url; ?>privacy”><?php echo elgg_echo(‘expages:privacy’); ?></a></li> 

Add the following code after this line- 

<li <?php if($type == ‘faq’) echo “class = ‘selected'”; ?>><a href=”<?php echo $url; ?>faq”><?php echo elgg_echo(‘expages:faq’); ?></a></li>

 

d. Search for the file edit.php and seek the following line- 

else if($type == ‘privacy’) {

  $external_page_title = elgg_echo(‘expages:privacy’);  

  } 

Add the following code after this line- 

 else if($type == ‘faq’) {

  $external_page_title = elgg_echo(‘expages:faq’);  

  }

 Save all files and upload the modified plugin. 

4. Remove “Friends” option (From Profile)

We might need to do away with the friend feature on a network wherein we want all folks to be able to contact other members easily and without such tasks as adding and deleting of friends. For this, we can proceed as follows-

a. Removing Add/Remove Friend option – 

Edit the relevant code action lines in profilelinks.php at – 

C:\XAMPP_Folder\htdocs\live\mod\profile\views\default\profile

 

b. Removing Friends/View Friends of option – 

Edit the relevant line of rendering code in links.php and linksownpage.php at – 

C:\XAMPP_Folder\htdocs\live\mod\profile\views\default\profile\menu

5. Miscellaneous customization points –

a. Extending the Top Menu bar

Edit elgg_topbar.php at –

C:\XAMPP_Folder\htdocs\live\views\default\page_elements

b. Editing the footer-

Edit footer.php at-

C:\XAMPP_Folder\htdocs\live\views\default\page_elements

c. Editing Custom Login Page (Index Page)

Download the mod called custom index (not the one available by default) and edit the index page in the root of the mod’s folder to suit your requirements

d. Editing the Spotlight area content-

This involves editing the default.php at –

C:\XAMPP_Folder\htdocs\live\views\default\spotlight

e. Customizing tabs in the river dashboard activity-

This involves editing nav.php at –

C:\XAMPP_Folder\htdocs\live\mod\riverdashboard\views\default\riverdashboard

f. Customizing Bookmarks –

Edit the start.php filed under the root of plugin folder of bookmarks

g. Remove/Add Drop Down menu (Top Navigation -> Tools) items

  Edit the parameters for the particular item in topbar_tools.php at-

  C:\XAMPP_Folder\htdocs\live\views\default\navigation

One thought on “Elgg | Quick-n-Dirty Notes :-)

Leave a Reply

Your email address will not be published. Required fields are marked *