128x128 GPLv2 mime icons from https://github.com/eagerterrier/MimeTypes-Link-Icons
68
etemplate/templates/default/images/mime128.php
Executable file
@ -0,0 +1,68 @@
|
|||||||
|
#!/usr/bin/php
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* EGroupWare: Convert eagerterrier mime icons
|
||||||
|
*
|
||||||
|
* @link https://github.com/eagerterrier/MimeTypes-Link-Icons
|
||||||
|
* @link http://www.egroupware.org
|
||||||
|
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
||||||
|
* @package etemplate
|
||||||
|
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
|
||||||
|
* @copyright (c) 2015 by Ralf Becker <RalfBecker-AT-outdoor-training.de>
|
||||||
|
* @version $Id$
|
||||||
|
*/
|
||||||
|
|
||||||
|
require_once '../../../../phpgwapi/inc/class.mime_magic.inc.php';
|
||||||
|
|
||||||
|
/* compare current Horde $mime_extension_map with ours
|
||||||
|
include_once 'Horde/Mime/mime.mapping.php';
|
||||||
|
|
||||||
|
foreach($mime_extension_map as $ext => $type)
|
||||||
|
{
|
||||||
|
if (!isset(mime_magic::$mime_extension_map[$ext]))
|
||||||
|
{
|
||||||
|
echo "+\t$ext\t$type\n";
|
||||||
|
}
|
||||||
|
elseif(strtolower($type) === strtolower(mime_magic::$mime_extension_map[$ext]))
|
||||||
|
{
|
||||||
|
echo "\t$ext\t$type\n";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
echo "-\t$ext\t".mime_magic::$mime_extension_map[$ext]."\n";
|
||||||
|
echo "+\t$ext\t$type\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
exit;
|
||||||
|
*/
|
||||||
|
|
||||||
|
// make sure these mime-type get their default extensions icon, not some alias
|
||||||
|
$overwrites = array(
|
||||||
|
'txt' => 'text/plain',
|
||||||
|
'ogg' => 'audio/ogg',
|
||||||
|
'ppt' => 'application/vnd.ms-powerpoint',
|
||||||
|
'qt' => 'video/quicktime',
|
||||||
|
);
|
||||||
|
$src_dir=__DIR__.'/MimeTypes-Link-Icons/images';
|
||||||
|
$dst_dir=__DIR__;
|
||||||
|
foreach(scandir($src_dir) as $file)
|
||||||
|
{
|
||||||
|
if (preg_match('/^([^-]+)-icon-128x128.png$/', $file, $matches))
|
||||||
|
{
|
||||||
|
if (!isset(mime_magic::$mime_extension_map[$matches[1]]))
|
||||||
|
{
|
||||||
|
echo "Unknown extension '$matches[1]'!\n";
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
$type = mime_magic::$mime_extension_map[$matches[1]];
|
||||||
|
$dst_file = 'mime128_'.str_replace('/', '_', $type).'.png';
|
||||||
|
if (file_exists($dst_dir.'/'.$dst_file) && !isset($overwrites[$matches[1]]))
|
||||||
|
{
|
||||||
|
echo "Icon for extension '$matches[1]' = $type already exists!\n";
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
copy($src_dir.'/'.$file, $dst_dir.'/'.$dst_file);
|
||||||
|
echo "$file --> $dst_file\n";
|
||||||
|
}
|
||||||
|
//else echo "Ignoring $file\n";
|
||||||
|
}
|
After Width: | Height: | Size: 9.6 KiB |
After Width: | Height: | Size: 9.8 KiB |
BIN
etemplate/templates/default/images/mime128_application_pdf.png
Normal file
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 10 KiB |
BIN
etemplate/templates/default/images/mime128_application_rtf.png
Normal file
After Width: | Height: | Size: 8.3 KiB |
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 5.7 KiB |
After Width: | Height: | Size: 6.9 KiB |
After Width: | Height: | Size: 7.3 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 64 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 9.5 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 5.7 KiB |
After Width: | Height: | Size: 5.6 KiB |
After Width: | Height: | Size: 8.4 KiB |
After Width: | Height: | Size: 8.0 KiB |
After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 11 KiB |
BIN
etemplate/templates/default/images/mime128_application_x-rpm.png
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
etemplate/templates/default/images/mime128_application_x-sql.png
Normal file
After Width: | Height: | Size: 9.1 KiB |
BIN
etemplate/templates/default/images/mime128_application_x-tar.png
Normal file
After Width: | Height: | Size: 6.2 KiB |
BIN
etemplate/templates/default/images/mime128_application_x-tex.png
Normal file
After Width: | Height: | Size: 12 KiB |
After Width: | Height: | Size: 20 KiB |
BIN
etemplate/templates/default/images/mime128_application_xml.png
Normal file
After Width: | Height: | Size: 5.2 KiB |
BIN
etemplate/templates/default/images/mime128_application_zip.png
Normal file
After Width: | Height: | Size: 5.8 KiB |
BIN
etemplate/templates/default/images/mime128_audio_midi.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
etemplate/templates/default/images/mime128_audio_mp4.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
etemplate/templates/default/images/mime128_audio_mpeg.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
etemplate/templates/default/images/mime128_audio_ogg.png
Normal file
After Width: | Height: | Size: 24 KiB |
BIN
etemplate/templates/default/images/mime128_audio_x-flac.png
Normal file
After Width: | Height: | Size: 7.3 KiB |
After Width: | Height: | Size: 10 KiB |
BIN
etemplate/templates/default/images/mime128_audio_x-wav.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
etemplate/templates/default/images/mime128_image_gif.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
etemplate/templates/default/images/mime128_image_jpeg.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
etemplate/templates/default/images/mime128_image_png.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
etemplate/templates/default/images/mime128_image_tiff.png
Normal file
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 12 KiB |
BIN
etemplate/templates/default/images/mime128_image_vnd.djvu.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
etemplate/templates/default/images/mime128_image_vnd.dwg.png
Normal file
After Width: | Height: | Size: 7.5 KiB |
BIN
etemplate/templates/default/images/mime128_image_x-icon.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
etemplate/templates/default/images/mime128_model_vnd.dwf.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
etemplate/templates/default/images/mime128_text_csv.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
etemplate/templates/default/images/mime128_text_plain.png
Normal file
After Width: | Height: | Size: 7.5 KiB |
BIN
etemplate/templates/default/images/mime128_text_x-bibtex.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
etemplate/templates/default/images/mime128_text_x-fortran.png
Normal file
After Width: | Height: | Size: 4.5 KiB |
BIN
etemplate/templates/default/images/mime128_text_x-python.png
Normal file
After Width: | Height: | Size: 6.6 KiB |
BIN
etemplate/templates/default/images/mime128_text_x-tex.png
Normal file
After Width: | Height: | Size: 4.4 KiB |
BIN
etemplate/templates/default/images/mime128_video_3gpp.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
etemplate/templates/default/images/mime128_video_3gpp2.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
etemplate/templates/default/images/mime128_video_mp4.png
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
etemplate/templates/default/images/mime128_video_mpeg.png
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
etemplate/templates/default/images/mime128_video_ogg.png
Normal file
After Width: | Height: | Size: 6.3 KiB |
BIN
etemplate/templates/default/images/mime128_video_quicktime.png
Normal file
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 10 KiB |
BIN
etemplate/templates/default/images/mime128_video_x-flv.png
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
etemplate/templates/default/images/mime128_video_x-m4v.png
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
etemplate/templates/default/images/mime128_video_x-matroska.png
Normal file
After Width: | Height: | Size: 4.9 KiB |
BIN
etemplate/templates/default/images/mime128_video_x-ms-asf.png
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
etemplate/templates/default/images/mime128_video_x-ms-vob.png
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
etemplate/templates/default/images/mime128_video_x-ms-wmv.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
etemplate/templates/default/images/mime128_video_x-msvideo.png
Normal file
After Width: | Height: | Size: 10 KiB |