2014-12-01, 03:21 PM
I'm looking to pull all images and filenames from a specific folder, and display them in a table along with the filename. My current php script pulls the images and filenames.
This leaves me with just a plain php page. How do I integrate this script into mybb theme?
I would like something almost like the misc?action=smilies table.
<?php
$folder = 'registered/images/';
$filetype = '*.*';
$files = glob($folder.$filetype);
$count = count($files);
echo '<table>';
for ($i = 0; $i < $count; $i++) {
echo '<tr><td>';
echo '<a name="'.$i.'" href="#'.$i.'"><img src="'.$files[$i].'" /></a>';
echo substr($files[$i],strlen($folder),strpos($files[$i], '.')-strlen($folder));
echo '</td></tr>';
}
echo '</table>';
?>
This leaves me with just a plain php page. How do I integrate this script into mybb theme?
I would like something almost like the misc?action=smilies table.