get_files($iconpath, '\.jpg|\.gif|\.png|\.JPG|\.GIF|\.PNG'); if($tmp) { $iconlist += $tmp; } unset($tmp); } $iconlist = multiarray_sort($iconlist, 'fname'); $tmp = array(16, 32, 48, 64, 128); $tmp1 = array(); $name = varset($parms['id']); global $iconpool,$tp; $iconlist = $iconpool; // this overrides most of the code above - needs reviewing. foreach($iconlist as $folder) { // $filepath = varsettrue($parms['path_omit']) ? str_replace(explode('|', $parms['path_omit']), "", $icon['path'].$icon['fname']) : $e107->tp->createConstants($icon['path'], 1).$icon['fname']; // $filepath_abs = str_replace(array(e_IMAGE, e_FILE, e_PLUGIN), array(e_IMAGE_ABS, e_FILE_ABS, e_PLUGIN_ABS), $icon['path'].$icon['fname']); foreach($folder as $icon) { $filepath = $icon; $filepath_abs = $tp->replaceConstants($icon,"abs"); $icon_file = basename($filepath_abs); $str = "{$icon_file}"; foreach ($tmp as $isize) { if(strpos($icon_file, '_'.$isize.'.') !== false) { $tmp1[$isize] = varset($tmp1[$isize]).str_replace('%%size%%', ' S'.$isize, $str); continue 2; } } $tmp1['other'] = varset($tmp1['other']).$str;//other } } /*foreach($iconlist as $icon) { $filepath = varsettrue($parms['path_omit']) ? str_replace(explode('|', $parms['path_omit']), "", $icon['path'].$icon['fname']) : $e107->tp->createConstants($icon['path'], 1).$icon['fname']; $filepath_abs = str_replace(array(e_IMAGE, e_FILE, e_PLUGIN), array(e_IMAGE_ABS, e_FILE_ABS, e_PLUGIN_ABS), $icon['path'].$icon['fname']); $str = "{$filepath}"; foreach ($tmp as $isize) { if(strpos($icon['fname'], '_'.$isize.'.') !== false) { $tmp1[$isize] = varset($tmp1[$isize]).str_replace('%%size%%', ' S'.$isize, $str); continue 2; } } $tmp1['other'] = varset($tmp1['other']).$str;//other }*/ return $tmp1 ? '
'.str_replace('%%size%%', '', implode('
', $tmp1)).'
' : ''; } ?>