What I learnt today

Another overly simple thing, but being new to elgg and relatively new to coding etc took me litteraly all day (12 hours) to figure out!!

The easiest way to edit the .html output of your elgg installation ie to modify the <head> and <body> information for the insertion of custom scripts and form actions etc is to edit views/default/page_elements/header.php

If you open up this file you will very plainly see where the .html starts within the .php file... I underestimated the sneakyness :P

Because the <body> tags are open - don't close them ( ie </body> )here or you will cause all sorts of problems :S  Just enter the script element etc you need in the body.

  • Something I learned: php doesn't have an end tag like html </html> that tells it to stop reading the page. It is possible to add scripts to the end of a PHP file (such as the footer) and they will load and run fine....

     

    That was my a-haa moment for the week!  :-D

wektis

looking forward to making my first social networking site