function pt_slideshow($arg, $random = false) { parse_str($arg, $new_args); $new_args = array_change_key_case($new_args, CASE_UPPER); // Retrieves specific parameters if (isset($new_args['WIDTH'])) { $width = $new_args['WIDTH']; } else { $width = 180; } if (isset($new_args['HEIGHT'])) { $height = $new_args['HEIGHT']; } else { $height = 120; } $style = ' style="width: ' . $width . 'px; height: ' . $height . 'px;" '; $html_slideshow = '<div id="rotator" style="width: ' . $width . 'px; height: ' . $height . 'px;" >'; if ($random) { $html_slideshow .= get_random_thumb($arg); } else { $html_slideshow .= get_recent_thumbs($arg); } $html_slideshow .= '</div>'; $html_slideshow = str_replace('<img', '<img' . $style, $html_slideshow); echo $html_slideshow; }
function the_recent_thumbs($arg = '', $beforeli = '', $afterli = '', $before = '', $after = '') { echo get_recent_thumbs($arg, $beforeli, $afterli, $before, $after); }