Thanks to bhrat, there is a page on Gallery's site that can be found at:
http://gallery.menalto.com/modules.php?op=modload&name=phpWiki&file=index&pagename=Random%20Block%20-%20Top%2010%20Albums%20and%20Last%205%20Updated%20Albums%20Block%20Hack
Hope this will help you all people who need this code
Enjoy :grin: