Elgg Plugin Template

Yesterday I created an Elgg Plugin Template. This really advanced my understanding of the web application architecture of this social networking platform. Before this I was testing out my PHP code using the REST API which is a crude way of going about things. Now I can create plugins that really conform to the Elgg standard. I had to base my plugin on the existing ones that ship with Elgg because nobody has provided a plugin template to get you started. There were several things I had to figure out.

First I discovered how to add a menu item to the Tools menu for my plugin. Then I worked out how to extend the CSS so my plugin could have its own styles applied to its page elements. I also figured out how to create a submenu. Tonight I had to add some code to make sure this submenu only appears for my plugin. I found it was appearing everywhere.

I created one example action. The important part of this exercise was having a new web page in which to try out some PHP code and generate the HTML output. I also used a language file for some strings that may appear in English or another language.

Last night I struggled with Apache and MySQL to get my Elgg web site running on my new Vista PC. Naturally it fought me every step of the way. First I had to get Apache to process PHP scripts. Then I had to get PHP to load the MySQL modules. Then I had to enable mod_rewrite. It was also necessary to run an UPDATE query in MySQL to adjust my Elgg site’s url which changed. Even though I have extensive notes on these topics from when I was struggling with my iBook web applications, it still managed to waste several hours of my time with unexpected complications.

I hope to get going like gangbusters on Elgg now that I have figured out how much of it works.

This entry was posted in PHP and tagged , , , . Bookmark the permalink.

2 Responses to Elgg Plugin Template

Leave a Reply

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

Time limit exceeded. Please complete the captcha once again.