There are only a couple of lines of code I've put in my main page's PHP to support a random image from G2's photo gallery:
<link rel="stylesheet" href=http://WEBSITE/gallery2/main.php?g2_controller=imageblock.ExternalCSS>
<?php
@readfile('http://WEBSITE/gallery2/main.php?
g2_view=imageblock.External&g2_blocks=randomImage&
g2_show=date|views');
?> Of course, the link part goes in your <head> section and the readfile part goes in your <body> section somewhere...
Setting the stylesheet allows you to control the view from within G2's Image Block admin page. Click on the Image Block link from G2's site admistration and it will give you an exact link to put into your own website based on your own G2 installation settings. You can modify several parameters within the link as described on the admin page.
