Click A Life

~ where coding happens ~

Archive for May, 2008

Since cake 1.2, there is already an implementation to dynamically add (or include) a javascript file in the header. This is done in case you need to include a new js file in the header on one of your modules. This will prevent putting the code in the default layout and loading unnecessary javascript files in the header.

<?php echo $javascript->link('nameofjstoadd',false); ?>

This is called in the default.ctp using ‘$scripts_for_layout’ directive inside the header.

  • 0 Comments
  • Filed under: CakePHP
  • To install the last.fm client on the latest Ubuntu hardy heron, simply run this on the terminal:

    $ sudo apt-get install lastfm

    As simple as that. :)

  • 0 Comments
  • Filed under: Linux
  • This is a quick fix to make your firefox load java when accessing java enabled sites. Simply do this in the terminal:


    $ cd /usr/lib/firefox-3.0b5/plugins
    $ sudo ln -s /usr/lib/jvm/java-6-sun/jre/plugin/i386/ns7/libjavaplugin_oji.so

  • 0 Comments
  • Filed under: Linux
  • Recent Comments

      What I'm Doing...

      Posting tweet...

      The bossHappy familyPeace!Happy familyLuge @ SentosaWaiting.. Tool's town dayStudyingMustafa Center-Little India SingaporeDrupal Cheat Sheet on my desk