SMF Forums

This was done on version 1.0.3 of SMF... It should work on newer versions - let me know if it does and I will update these fine documents. To get it working, all I had to do look in the templates directory. Go into the folder named after the template you are using and edit the index.template.php file. Figure out where you want the images to appear (thats the tricky part - think trial and error at first). Then insert code like you would on any other PHP

Example 12.1. Embedding in SMF forums

echo '<div align="right">';
include "../php-lib/cpmfetch/cpmfetch.php";
$objCpm = new cpm("/photos");
$objCpm->cpm_viewRandomMedia(1,1); 
$objCpm->cpm_close();
echo '</div>';