Index: /extensions/Media_Icon/admin/admin.php
===================================================================
--- /extensions/Media_Icon/admin/admin.php	(revision 19284)
+++ /extensions/Media_Icon/admin/admin.php	(revision 19284)
@@ -0,0 +1,45 @@
+<?php
+//Chech whether we are indeed included by Piwigo.
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+
+//Load translation files
+load_language('plugin.lang', MEDIA_ICON_PATH);
+
+//Check access and exit when user status is not ok
+check_status(ACCESS_ADMINISTRATOR);
+
+$conf_media_icon = $conf['media_icon'];
+$conf_media_icon_unserialize = unserialize($conf['media_icon']);
+
+//Save config
+if (isset($_POST['submit'])) { 
+	//New parameters
+	$conf_media_icon_unserialize['style'] = $_POST['style'];
+	
+	//Save
+	conf_update_param('media_icon', serialize($conf_media_icon_unserialize));
+	array_push($page['infos'], l10n('Information data registered in database'));
+}
+
+//Parameters of the template
+	$template->assign('MEDIA_ICON_STYLE_LOGO_SELECTED', ($conf_media_icon_unserialize['style'] == 'logo') ? 'selected="selected"' : null);
+	$template->assign('MEDIA_ICON_STYLE_PHOTO_SELECTED', ($conf_media_icon_unserialize['style'] == 'photo') ? 'selected="selected"' : null);
+	$template->assign('MEDIA_ICON_STYLE_FOLDER_SELECTED', ($conf_media_icon_unserialize['style'] == 'folder') ? 'selected="selected"' : null);
+	$template->assign('MEDIA_ICON_STYLE_FOLDERCOLOR_SELECTED', ($conf_media_icon_unserialize['style'] == 'foldercolor') ? 'selected="selected"' : null);
+	
+//Fetch the template.
+global $template;
+
+//add a stylesheet
+$template->append('head_elements', '<link rel="stylesheet" type="text/css" href="'.MEDIA_ICON_PATH.'template/'.$conf_media_icon_unserialize['style'].'_media_icon.css">');
+	
+//Add our template to the global template
+$template->set_filenames(
+	array(
+		'plugin_admin_content' => dirname(__FILE__).'/admin.tpl'
+	)    
+);
+ 
+//Assign the template contents to ADMIN_CONTENT
+$template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
+?>
Index: /extensions/Media_Icon/admin/admin.tpl
===================================================================
--- /extensions/Media_Icon/admin/admin.tpl	(revision 19284)
+++ /extensions/Media_Icon/admin/admin.tpl	(revision 19284)
@@ -0,0 +1,55 @@
+{html_head}{literal}
+<style type="text/css">
+  div.media_icon_admin_element {
+    width:20%;
+    font-weight:normal;
+	float: left;
+  }
+  .properties p {
+	font-weight: normal;
+	text-align: center;
+	margin-top: 1em;
+  }
+  
+  .media_icon_important {
+	font-weight: bold;
+  }
+</style>
+{/literal}{/html_head}
+
+<div class="titrePage">
+  <h2>{'Media Icon Plugin'|@translate}</h2>
+</div>
+
+<form method="post" action="" class="properties" ENCTYPE="multipart/form-data"> 
+	<fieldset>
+    <legend>{'Style'|@translate}</legend>
+	<p>
+		<label for="media_icon_select">{'Icon style:'|@translate}</label>
+	</p>
+	<p>	
+		<select id="media_icon_select" name="style">
+			<option value="logo" {$MEDIA_ICON_STYLE_LOGO_SELECTED}>{'Logo'|@translate}</option>
+			<option value="photo" {$MEDIA_ICON_STYLE_PHOTO_SELECTED}>{'Photo'|@translate}</option>
+			<option value="folder" {$MEDIA_ICON_STYLE_FOLDER_SELECTED}>{'Folder'|@translate}</option>
+			<option value="foldercolor" {$MEDIA_ICON_STYLE_FOLDERCOLOR_SELECTED}>{'Folder color'|@translate}</option>
+		</select>
+	</p>
+	<p>{'Click on submit to see changes.'|@translate}</p>
+	</fieldset>
+  
+	<p><input class="submit" type="submit" value="{'Submit'|@translate}" name="submit"/></p>
+</form>
+  
+<fieldset>
+	<legend>{'Result'|@translate}</legend>
+	<div class="media_icon_admin_element">{'Youtube videos'|@translate} <span class="media_icon_admin_youtube"></span></div>
+	<div class="media_icon_admin_element">{'Vimeo videos'|@translate} <span class="media_icon_admin_vimeo"></span></div>
+	<div class="media_icon_admin_element">{'Dailymotion videos'|@translate} <span class="media_icon_admin_dailymotion"></span></div>
+	<div class="media_icon_admin_element">{'Wat videos'|@translate} <span class="media_icon_admin_wat"></span></div>
+	<div class="media_icon_admin_element">{'Wideo videos'|@translate} <span class="media_icon_admin_wideo"></span></div>
+	<div class="media_icon_admin_element">{'pdf files'|@translate} <span class="media_icon_admin_pdf"></span></div>
+	<div class="media_icon_admin_element">{'Documents'|@translate} <span class="media_icon_admin_document"></span></div>
+	<div class="media_icon_admin_element">{'Spreadsheets'|@translate} <span class="media_icon_admin_spreadsheet"></span></div>
+	<div class="media_icon_admin_element">{'Presentations'|@translate} <span class="media_icon_admin_presentation"></span></div>
+</fieldset>
Index: /extensions/Media_Icon/config_default.inc.php
===================================================================
--- /extensions/Media_Icon/config_default.inc.php	(revision 19284)
+++ /extensions/Media_Icon/config_default.inc.php	(revision 19284)
@@ -0,0 +1,7 @@
+<?php
+
+$config_default = array(
+	'style' => 'logo',
+);
+
+?>
Index: /extensions/Media_Icon/index.php
===================================================================
--- /extensions/Media_Icon/index.php	(revision 19284)
+++ /extensions/Media_Icon/index.php	(revision 19284)
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2010 Piwigo Team                  http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/Media_Icon/language/fr_FR/description.txt
===================================================================
--- /extensions/Media_Icon/language/fr_FR/description.txt	(revision 19284)
+++ /extensions/Media_Icon/language/fr_FR/description.txt	(revision 19284)
@@ -0,0 +1,1 @@
+﻿Ajouter des icônes aux fichiers autre que les photos.
Index: /extensions/Media_Icon/language/fr_FR/index.php
===================================================================
--- /extensions/Media_Icon/language/fr_FR/index.php	(revision 19284)
+++ /extensions/Media_Icon/language/fr_FR/index.php	(revision 19284)
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2010 Piwigo Team                  http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/Media_Icon/language/fr_FR/plugin.lang.php
===================================================================
--- /extensions/Media_Icon/language/fr_FR/plugin.lang.php	(revision 19284)
+++ /extensions/Media_Icon/language/fr_FR/plugin.lang.php	(revision 19284)
@@ -0,0 +1,22 @@
+<?php
+$lang['Media Icon Plugin'] = 'Plugin Media Icon';
+$lang['Style'] = 'Style';
+$lang['Result'] = 'R&eacutesultat';
+$lang['Icon style:'] = 'Style d'."'".'ic&ocirc;ne :';
+$lang['Logo'] = 'Logo';
+$lang['Photo'] = 'Photo';
+$lang['Folder'] = 'Dossier';
+$lang['Folder color'] = 'Dossier en couleurs';
+$lang['Click on submit to see changes.'] = 'Cliquez sur valider pour voir les changements appara&icirc;tre.';
+$lang['Results'] = 'R&eacute;sultat';
+$lang['Youtube videos'] = 'Vid&eacute;os Youtube';
+$lang['Vimeo videos'] = 'Vid&eacute;os Vimeo';
+$lang['Dailymotion videos'] = 'Vid&eacute;os Dailymotion';
+$lang['Wat videos'] = 'Vid&eacute;os Wat';
+$lang['Wideo videos'] = 'Vid&eacute;os Wideo';
+$lang['pdf files'] = 'Fichiers pdf';
+$lang['documents'] = 'Documents';
+$lang['spreadsheets'] = 'Tableurs';
+$lang['presentations'] = 'Présentations';
+$lang['Information data registered in database'] = 'Informations enregistr&eacute;es dans la base de donn&eacute;es';
+?>
Index: /extensions/Media_Icon/language/index.php
===================================================================
--- /extensions/Media_Icon/language/index.php	(revision 19284)
+++ /extensions/Media_Icon/language/index.php	(revision 19284)
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2010 Piwigo Team                  http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/Media_Icon/main.inc.php
===================================================================
--- /extensions/Media_Icon/main.inc.php	(revision 19284)
+++ /extensions/Media_Icon/main.inc.php	(revision 19284)
@@ -0,0 +1,38 @@
+<?php
+/*
+Plugin Name: Media Icon
+Version: 2.4.b
+Description: add an icon to non-picture files
+Plugin URI: http://fr.piwigo.org/ext/extension_view.php?eid=654
+Author: Julien1311
+*/
+
+//Check whether we are indeed included by Piwigo.
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+
+define('MEDIA_ICON_DIR' , basename(dirname(__FILE__)));
+define('MEDIA_ICON_PATH' , PHPWG_PLUGINS_PATH.MEDIA_ICON_DIR.'/');
+
+/* +-----------------------------------------------------------------------+
+ * | Plugin admin                                                          |
+ * +-----------------------------------------------------------------------+ */
+
+// Add an entry to the plugins menu
+add_event_handler('get_admin_plugin_menu_links', 'media_icon_admin_menu');
+
+function media_icon_admin_menu($menu) {
+	array_push(
+		$menu, array(
+			'NAME'  => 'Media Icon',
+			'URL'   => get_admin_plugin_menu_link(dirname(__FILE__)).'/admin/admin.php',
+		)
+	);      
+	return $menu;
+}
+
+/* +-----------------------------------------------------------------------+
+ * | Plugin code                                                          |
+ * +-----------------------------------------------------------------------+ */
+	
+include_once(MEDIA_ICON_PATH.'thumbnails.php');
+?>
Index: /extensions/Media_Icon/maintain.inc.php
===================================================================
--- /extensions/Media_Icon/maintain.inc.php	(revision 19284)
+++ /extensions/Media_Icon/maintain.inc.php	(revision 19284)
@@ -0,0 +1,20 @@
+<?php
+if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
+
+function plugin_install() {
+	include(dirname(__FILE__).'/config_default.inc.php');
+
+	$query = 'INSERT INTO '.CONFIG_TABLE.' (param,value,comment) VALUES ("media_icon" ,"'.addslashes(serialize($config_default)).'", "Media Icon plugin parameters");';
+	pwg_query($query);
+}
+
+function plugin_activate() {
+
+}
+
+function plugin_uninstall() {
+	$query = 'DELETE FROM ' . CONFIG_TABLE . ' WHERE param="media_icon";';
+	pwg_query($query);
+}
+
+?>
Index: /extensions/Media_Icon/template/folder_media_icon.css
===================================================================
--- /extensions/Media_Icon/template/folder_media_icon.css	(revision 19284)
+++ /extensions/Media_Icon/template/folder_media_icon.css	(revision 19284)
@@ -0,0 +1,188 @@
+.media_icon_youtube, .media_icon_admin_youtube{
+  background: transparent url('img/folder_video.png') no-repeat;
+  width: 60px;
+  height: 60px;
+  z-index:99;
+}
+
+.media_icon_admin_youtube{
+	display: block;
+	margin-left: auto;
+	margin-right: auto;
+	margin-bottom: 2em;
+}
+
+.media_icon_youtube {
+  position: absolute;
+  bottom: 5px;
+  right: 5px;
+  text-align: right;
+}
+
+.media_icon_vimeo, .media_icon_admin_vimeo{
+  background: transparent url('img/folder_video.png') no-repeat;
+  width: 60px;
+  height: 60px;
+  z-index:99;
+}
+
+.media_icon_admin_vimeo{
+	display: block;
+	margin-left: auto;
+	margin-right: auto;
+	margin-bottom: 2em;
+}
+
+.media_icon_vimeo {
+  position: absolute;
+  bottom: 5px;
+  right: 5px;
+  text-align: right;
+}
+
+.media_icon_dailymotion, .media_icon_admin_dailymotion{
+  background: transparent url('img/folder_video.png') no-repeat;
+  width: 60px;
+  height: 60px;
+  z-index:99;
+}
+
+.media_icon_admin_dailymotion{
+	display: block;
+	margin-left: auto;
+	margin-right: auto;
+	margin-bottom: 2em;
+}
+
+.media_icon_dailymotion {
+  position: absolute;
+  bottom: 5px;
+  right: 5px;
+  text-align: right;
+}
+
+.media_icon_wat, .media_icon_admin_wat{
+  background: transparent url('img/folder_video.png') no-repeat;
+  width: 60px;
+  height: 60px;
+  z-index:99;
+}
+
+.media_icon_admin_wat{
+	display: block;
+	margin-left: auto;
+	margin-right: auto;
+	margin-bottom: 2em;
+}
+
+.media_icon_wat {
+  position: absolute;
+  bottom: 5px;
+  right: 5px;
+  text-align: right;
+}
+
+.media_icon_wideo, .media_icon_admin_wideo{
+  background: transparent url('img/folder_video.png') no-repeat;
+  width: 60px;
+  height: 60px;
+  z-index:99;
+}
+
+.media_icon_admin_wideo{
+	display: block;
+	margin-left: auto;
+	margin-right: auto;
+	margin-bottom: 2em;
+}
+
+.media_icon_wideo {
+  position: absolute;
+  bottom: 5px;
+  right: 5px;
+  text-align: right;
+}
+
+.media_icon_pdf, .media_icon_admin_pdf{
+  background: transparent url('img/folder_pdf.png') no-repeat;
+  width: 60px;
+  height: 60px;
+  z-index:99;
+}
+
+.media_icon_admin_pdf{
+	display: block;
+	margin-left: auto;
+	margin-right: auto;
+	margin-bottom: 2em;
+}
+
+.media_icon_pdf {
+  position: absolute;
+  bottom: 5px;
+  right: 5px;
+  text-align: right;
+}
+
+.media_icon_document, .media_icon_admin_document{
+  background: transparent url('img/folder_document.png') no-repeat;
+  width: 60px;
+  height: 60px;
+  z-index:99;
+}
+
+.media_icon_admin_document{
+	display: block;
+	margin-left: auto;
+	margin-right: auto;
+	margin-bottom: 2em;
+}
+
+.media_icon_document {
+  position: absolute;
+  bottom: 5px;
+  right: 5px;
+  text-align: right;
+}
+
+.media_icon_spreadsheet, .media_icon_admin_spreadsheet{
+  background: transparent url('img/folder_spreadsheet.png') no-repeat;
+  width: 60px;
+  height: 60px;
+  z-index:99;
+}
+
+.media_icon_admin_spreadsheet{
+	display: block;
+	margin-left: auto;
+	margin-right: auto;
+	margin-bottom: 2em;
+}
+
+.media_icon_spreadsheet {
+  position: absolute;
+  bottom: 5px;
+  right: 5px;
+  text-align: right;
+}
+
+.media_icon_presentation, .media_icon_admin_presentation{
+  background: transparent url('img/folder_presentation.png') no-repeat;
+  width: 60px;
+  height: 60px;
+  z-index:99;
+}
+
+.media_icon_admin_presentation{
+	display: block;
+	margin-left: auto;
+	margin-right: auto;
+	margin-bottom: 2em;
+}
+
+.media_icon_presentation {
+  position: absolute;
+  bottom: 5px;
+  right: 5px;
+  text-align: right;
+}
Index: /extensions/Media_Icon/template/foldercolor_media_icon.css
===================================================================
--- /extensions/Media_Icon/template/foldercolor_media_icon.css	(revision 19284)
+++ /extensions/Media_Icon/template/foldercolor_media_icon.css	(revision 19284)
@@ -0,0 +1,188 @@
+.media_icon_youtube, .media_icon_admin_youtube{
+  background: transparent url('img/foldercolor_video.png') no-repeat;
+  width: 60px;
+  height: 60px;
+  z-index:99;
+}
+
+.media_icon_admin_youtube{
+	display: block;
+	margin-left: auto;
+	margin-right: auto;
+	margin-bottom: 2em;
+}
+
+.media_icon_youtube {
+  position: absolute;
+  bottom: 5px;
+  right: 5px;
+  text-align: right;
+}
+
+.media_icon_vimeo, .media_icon_admin_vimeo{
+  background: transparent url('img/foldercolor_video.png') no-repeat;
+  width: 60px;
+  height: 60px;
+  z-index:99;
+}
+
+.media_icon_admin_vimeo{
+	display: block;
+	margin-left: auto;
+	margin-right: auto;
+	margin-bottom: 2em;
+}
+
+.media_icon_vimeo {
+  position: absolute;
+  bottom: 5px;
+  right: 5px;
+  text-align: right;
+}
+
+.media_icon_dailymotion, .media_icon_admin_dailymotion{
+  background: transparent url('img/foldercolor_video.png') no-repeat;
+  width: 60px;
+  height: 60px;
+  z-index:99;
+}
+
+.media_icon_admin_dailymotion{
+	display: block;
+	margin-left: auto;
+	margin-right: auto;
+	margin-bottom: 2em;
+}
+
+.media_icon_dailymotion {
+  position: absolute;
+  bottom: 5px;
+  right: 5px;
+  text-align: right;
+}
+
+.media_icon_wat, .media_icon_admin_wat{
+  background: transparent url('img/foldercolor_video.png') no-repeat;
+  width: 60px;
+  height: 60px;
+  z-index:99;
+}
+
+.media_icon_admin_wat{
+	display: block;
+	margin-left: auto;
+	margin-right: auto;
+	margin-bottom: 2em;
+}
+
+.media_icon_wat {
+  position: absolute;
+  bottom: 5px;
+  right: 5px;
+  text-align: right;
+}
+
+.media_icon_wideo, .media_icon_admin_wideo{
+  background: transparent url('img/foldercolor_video.png') no-repeat;
+  width: 60px;
+  height: 60px;
+  z-index:99;
+}
+
+.media_icon_admin_wideo{
+	display: block;
+	margin-left: auto;
+	margin-right: auto;
+	margin-bottom: 2em;
+}
+
+.media_icon_wideo {
+  position: absolute;
+  bottom: 5px;
+  right: 5px;
+  text-align: right;
+}
+
+.media_icon_pdf, .media_icon_admin_pdf{
+  background: transparent url('img/foldercolor_pdf.png') no-repeat;
+  width: 60px;
+  height: 60px;
+  z-index:99;
+}
+
+.media_icon_admin_pdf{
+	display: block;
+	margin-left: auto;
+	margin-right: auto;
+	margin-bottom: 2em;
+}
+
+.media_icon_pdf {
+  position: absolute;
+  bottom: 5px;
+  right: 5px;
+  text-align: right;
+}
+
+.media_icon_document, .media_icon_admin_document{
+  background: transparent url('img/foldercolor_document.png') no-repeat;
+  width: 60px;
+  height: 60px;
+  z-index:99;
+}
+
+.media_icon_admin_document{
+	display: block;
+	margin-left: auto;
+	margin-right: auto;
+	margin-bottom: 2em;
+}
+
+.media_icon_document {
+  position: absolute;
+  bottom: 5px;
+  right: 5px;
+  text-align: right;
+}
+
+.media_icon_spreadsheet, .media_icon_admin_spreadsheet{
+  background: transparent url('img/foldercolor_spreadsheet.png') no-repeat;
+  width: 60px;
+  height: 60px;
+  z-index:99;
+}
+
+.media_icon_admin_spreadsheet{
+	display: block;
+	margin-left: auto;
+	margin-right: auto;
+	margin-bottom: 2em;
+}
+
+.media_icon_spreadsheet {
+  position: absolute;
+  bottom: 5px;
+  right: 5px;
+  text-align: right;
+}
+
+.media_icon_presentation, .media_icon_admin_presentation{
+  background: transparent url('img/foldercolor_presentation.png') no-repeat;
+  width: 60px;
+  height: 60px;
+  z-index:99;
+}
+
+.media_icon_admin_presentation{
+	display: block;
+	margin-left: auto;
+	margin-right: auto;
+	margin-bottom: 2em;
+}
+
+.media_icon_presentation {
+  position: absolute;
+  bottom: 5px;
+  right: 5px;
+  text-align: right;
+}
Index: /extensions/Media_Icon/template/img/plain_size/sources.txt
===================================================================
--- /extensions/Media_Icon/template/img/plain_size/sources.txt	(revision 19284)
+++ /extensions/Media_Icon/template/img/plain_size/sources.txt	(revision 19284)
@@ -0,0 +1,8 @@
+folder & foldercolor
+http://www.iconhot.com/icon/dellios-system/pdf-12.html
+
+photo
+http://www.iconhot.com/icon/simplexity-file/pdf-1.html
+
+devine
+http://www.iconhot.com/icon/devine-icons-part-2/pdf-2.html
Index: /extensions/Media_Icon/template/index.php
===================================================================
--- /extensions/Media_Icon/template/index.php	(revision 19284)
+++ /extensions/Media_Icon/template/index.php	(revision 19284)
@@ -0,0 +1,30 @@
+<?php
+// +-----------------------------------------------------------------------+
+// | Piwigo - a PHP based picture gallery                                  |
+// +-----------------------------------------------------------------------+
+// | Copyright(C) 2008-2010 Piwigo Team                  http://piwigo.org |
+// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
+// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
+// +-----------------------------------------------------------------------+
+// | This program is free software; you can redistribute it and/or modify  |
+// | it under the terms of the GNU General Public License as published by  |
+// | the Free Software Foundation                                          |
+// |                                                                       |
+// | This program is distributed in the hope that it will be useful, but   |
+// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
+// | General Public License for more details.                              |
+// |                                                                       |
+// | You should have received a copy of the GNU General Public License     |
+// | along with this program; if not, write to the Free Software           |
+// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
+// | USA.                                                                  |
+// +-----------------------------------------------------------------------+
+
+// Recursive call
+$url = '../';
+header( 'Request-URI: '.$url );
+header( 'Content-Location: '.$url );
+header( 'Location: '.$url );
+exit();
+?>
Index: /extensions/Media_Icon/template/logo_media_icon.css
===================================================================
--- /extensions/Media_Icon/template/logo_media_icon.css	(revision 19284)
+++ /extensions/Media_Icon/template/logo_media_icon.css	(revision 19284)
@@ -0,0 +1,188 @@
+.media_icon_youtube, .media_icon_admin_youtube{
+  background: transparent url('img/logo_youtube.png') no-repeat;
+  width: 60px;
+  height: 60px;
+  z-index:99;
+}
+
+.media_icon_admin_youtube{
+	display: block;
+	margin-left: auto;
+	margin-right: auto;
+	margin-bottom: 2em;
+}
+
+.media_icon_youtube {
+  position: absolute;
+  bottom: 5px;
+  right: 5px;
+  text-align: right;
+}
+
+.media_icon_vimeo, .media_icon_admin_vimeo{
+  background: transparent url('img/logo_vimeo.png') no-repeat;
+  width: 60px;
+  height: 60px;
+  z-index:99;
+}
+
+.media_icon_admin_vimeo{
+	display: block;
+	margin-left: auto;
+	margin-right: auto;
+	margin-bottom: 2em;
+}
+
+.media_icon_vimeo {
+  position: absolute;
+  bottom: 5px;
+  right: 5px;
+  text-align: right;
+}
+
+.media_icon_dailymotion, .media_icon_admin_dailymotion{
+  background: transparent url('img/logo_dailymotion.png') no-repeat;
+  width: 60px;
+  height: 60px;
+  z-index:99;
+}
+
+.media_icon_admin_dailymotion{
+	display: block;
+	margin-left: auto;
+	margin-right: auto;
+	margin-bottom: 2em;
+}
+
+.media_icon_dailymotion {
+  position: absolute;
+  bottom: 5px;
+  right: 5px;
+  text-align: right;
+}
+
+.media_icon_wat, .media_icon_admin_wat{
+  background: transparent url('img/logo_wat.png') no-repeat;
+  width: 60px;
+  height: 60px;
+  z-index:99;
+}
+
+.media_icon_admin_wat{
+	display: block;
+	margin-left: auto;
+	margin-right: auto;
+	margin-bottom: 2em;
+}
+
+.media_icon_wat {
+  position: absolute;
+  bottom: 5px;
+  right: 5px;
+  text-align: right;
+}
+
+.media_icon_wideo, .media_icon_admin_wideo{
+  background: transparent url('img/logo_wideo.png') no-repeat;
+  width: 60px;
+  height: 60px;
+  z-index:99;
+}
+
+.media_icon_admin_wideo{
+	display: block;
+	margin-left: auto;
+	margin-right: auto;
+	margin-bottom: 2em;
+}
+
+.media_icon_wideo {
+  position: absolute;
+  bottom: 5px;
+  right: 5px;
+  text-align: right;
+}
+
+.media_icon_pdf, .media_icon_admin_pdf{
+  background: transparent url('img/logo_pdf.png') no-repeat;
+  width: 60px;
+  height: 60px;
+  z-index:99;
+}
+
+.media_icon_admin_pdf{
+	display: block;
+	margin-left: auto;
+	margin-right: auto;
+	margin-bottom: 2em;
+}
+
+.media_icon_pdf {
+  position: absolute;
+  bottom: 5px;
+  right: 5px;
+  text-align: right;
+}
+
+.media_icon_document, .media_icon_admin_document{
+  background: transparent url('img/logo_document.png') no-repeat;
+  width: 60px;
+  height: 60px;
+  z-index:99;
+}
+
+.media_icon_admin_document{
+	display: block;
+	margin-left: auto;
+	margin-right: auto;
+	margin-bottom: 2em;
+}
+
+.media_icon_document {
+  position: absolute;
+  bottom: 5px;
+  right: 5px;
+  text-align: right;
+}
+
+.media_icon_spreadsheet, .media_icon_admin_spreadsheet{
+  background: transparent url('img/logo_spreadsheet.png') no-repeat;
+  width: 60px;
+  height: 60px;
+  z-index:99;
+}
+
+.media_icon_admin_spreadsheet{
+	display: block;
+	margin-left: auto;
+	margin-right: auto;
+	margin-bottom: 2em;
+}
+
+.media_icon_spreadsheet {
+  position: absolute;
+  bottom: 5px;
+  right: 5px;
+  text-align: right;
+}
+
+.media_icon_presentation, .media_icon_admin_presentation{
+  background: transparent url('img/logo_presentation.png') no-repeat;
+  width: 60px;
+  height: 60px;
+  z-index:99;
+}
+
+.media_icon_admin_presentation{
+	display: block;
+	margin-left: auto;
+	margin-right: auto;
+	margin-bottom: 2em;
+}
+
+.media_icon_presentation {
+  position: absolute;
+  bottom: 5px;
+  right: 5px;
+  text-align: right;
+}
Index: /extensions/Media_Icon/template/media_icon.tpl
===================================================================
--- /extensions/Media_Icon/template/media_icon.tpl	(revision 19284)
+++ /extensions/Media_Icon/template/media_icon.tpl	(revision 19284)
@@ -0,0 +1,58 @@
+{html_head}
+{literal}
+<script type="text/javascript">
+	//Add Media Icon markups to thumbnails
+	function media_icon_markup() {
+		//Youtube
+		$("img[media_icon^=youtube]").before('<span class="media_icon_youtube">');
+		$("img[media_icon^=youtube]").after('</span>');
+		//Vimeo
+		$("img[media_icon^=vimeo]").before('<span class="media_icon_vimeo">');
+		$("img[media_icon^=vimeo]").after('</span>');
+		//Dailymotion
+		$("img[media_icon^=dailymotion]").before('<span class="media_icon_dailymotion">');
+		$("img[media_icon^=dailymotion]").after('</span>');
+		//Wat
+		$("img[media_icon^=wat]").before('<span class="media_icon_wat">');
+		$("img[media_icon^=wat]").after('</span>');
+		//Wideo
+		$("img[media_icon^=wideo]").before('<span class="media_icon_wideo">');
+		$("img[media_icon^=wideo]").after('</span>');
+		//pdf
+		$("img[media_icon$=pdf]").before('<span class="media_icon_pdf">');
+		$("img[media_icon$=pdf]").after('</span>');
+		//doc, docx or odt
+		$("img[media_icon$=doc]").before('<span class="media_icon_document">');
+		$("img[media_icon$=doc]").after('</span>');
+		$("img[media_icon$=docx]").before('<span class="media_icon_document">');
+		$("img[media_icon$=docx]").after('</span>');
+		$("img[media_icon$=odt]").before('<span class="media_icon_document">');
+		$("img[media_icon$=odt]").after('</span>');
+		//xls, xlsx or ods
+		$("img[media_icon$=xls]").before('<span class="media_icon_spreadsheet">');
+		$("img[media_icon$=xls]").after('</span>');
+		$("img[media_icon$=xlsx]").before('<span class="media_icon_spreadsheet">');
+		$("img[media_icon$=xlsx]").after('</span>');
+		$("img[media_icon$=ods]").before('<span class="media_icon_spreadsheet">');
+		$("img[media_icon$=ods]").after('</span>');
+		//ppt, pptx or odp
+		$("img[media_icon$=ppt]").before('<span class="media_icon_presentation">');
+		$("img[media_icon$=ppt]").after('</span>');
+		$("img[media_icon$=pptx]").before('<span class="media_icon_presentation">');
+		$("img[media_icon$=pptx]").after('</span>');
+		$("img[media_icon$=odp]").before('<span class="media_icon_presentation">');
+		$("img[media_icon$=odp]").after('</span>');
+	}
+  
+	//When the document has finiched to load
+	jQuery(document).ready(function(){
+		media_icon_markup();
+	});
+  
+	//Allow Media Icon to work with RV Thumb Scroller 
+	jQuery(window).bind("RVTS_loaded", function(){
+		media_icon_markup();
+	});
+</script>
+{/literal}
+{/html_head}
Index: /extensions/Media_Icon/template/photo_media_icon.css
===================================================================
--- /extensions/Media_Icon/template/photo_media_icon.css	(revision 19284)
+++ /extensions/Media_Icon/template/photo_media_icon.css	(revision 19284)
@@ -0,0 +1,188 @@
+.media_icon_youtube, .media_icon_admin_youtube{
+  background: transparent url('img/photo_video.png') no-repeat;
+  width: 60px;
+  height: 60px;
+  z-index:99;
+}
+
+.media_icon_admin_youtube{
+	display: block;
+	margin-left: auto;
+	margin-right: auto;
+	margin-bottom: 2em;
+}
+
+.media_icon_youtube {
+  position: absolute;
+  bottom: 5px;
+  right: 5px;
+  text-align: right;
+}
+
+.media_icon_vimeo, .media_icon_admin_vimeo{
+  background: transparent url('img/photo_video.png') no-repeat;
+  width: 60px;
+  height: 60px;
+  z-index:99;
+}
+
+.media_icon_admin_vimeo{
+	display: block;
+	margin-left: auto;
+	margin-right: auto;
+	margin-bottom: 2em;
+}
+
+.media_icon_vimeo {
+  position: absolute;
+  bottom: 5px;
+  right: 5px;
+  text-align: right;
+}
+
+.media_icon_dailymotion, .media_icon_admin_dailymotion{
+  background: transparent url('img/photo_video.png') no-repeat;
+  width: 60px;
+  height: 60px;
+  z-index:99;
+}
+
+.media_icon_admin_dailymotion{
+	display: block;
+	margin-left: auto;
+	margin-right: auto;
+	margin-bottom: 2em;
+}
+
+.media_icon_dailymotion {
+  position: absolute;
+  bottom: 5px;
+  right: 5px;
+  text-align: right;
+}
+
+.media_icon_wat, .media_icon_admin_wat{
+  background: transparent url('img/photo_video.png') no-repeat;
+  width: 60px;
+  height: 60px;
+  z-index:99;
+}
+
+.media_icon_admin_wat{
+	display: block;
+	margin-left: auto;
+	margin-right: auto;
+	margin-bottom: 2em;
+}
+
+.media_icon_wat {
+  position: absolute;
+  bottom: 5px;
+  right: 5px;
+  text-align: right;
+}
+
+.media_icon_wideo, .media_icon_admin_wideo{
+  background: transparent url('img/photo_video.png') no-repeat;
+  width: 60px;
+  height: 60px;
+  z-index:99;
+}
+
+.media_icon_admin_wideo{
+	display: block;
+	margin-left: auto;
+	margin-right: auto;
+	margin-bottom: 2em;
+}
+
+.media_icon_wideo {
+  position: absolute;
+  bottom: 5px;
+  right: 5px;
+  text-align: right;
+}
+
+.media_icon_pdf, .media_icon_admin_pdf{
+  background: transparent url('img/photo_pdf.png') no-repeat;
+  width: 60px;
+  height: 60px;
+  z-index:99;
+}
+
+.media_icon_admin_pdf{
+	display: block;
+	margin-left: auto;
+	margin-right: auto;
+	margin-bottom: 2em;
+}
+
+.media_icon_pdf {
+  position: absolute;
+  bottom: 5px;
+  right: 5px;
+  text-align: right;
+}
+
+.media_icon_document, .media_icon_admin_document{
+  background: transparent url('img/photo_document.png') no-repeat;
+  width: 60px;
+  height: 60px;
+  z-index:99;
+}
+
+.media_icon_admin_document{
+	display: block;
+	margin-left: auto;
+	margin-right: auto;
+	margin-bottom: 2em;
+}
+
+.media_icon_document {
+  position: absolute;
+  bottom: 5px;
+  right: 5px;
+  text-align: right;
+}
+
+.media_icon_spreadsheet, .media_icon_admin_spreadsheet{
+  background: transparent url('img/photo_spreadsheet.png') no-repeat;
+  width: 60px;
+  height: 60px;
+  z-index:99;
+}
+
+.media_icon_admin_spreadsheet{
+	display: block;
+	margin-left: auto;
+	margin-right: auto;
+	margin-bottom: 2em;
+}
+
+.media_icon_spreadsheet {
+  position: absolute;
+  bottom: 5px;
+  right: 5px;
+  text-align: right;
+}
+
+.media_icon_presentation, .media_icon_admin_presentation{
+  background: transparent url('img/photo_presentation.png') no-repeat;
+  width: 60px;
+  height: 60px;
+  z-index:99;
+}
+
+.media_icon_admin_presentation{
+	display: block;
+	margin-left: auto;
+	margin-right: auto;
+	margin-bottom: 2em;
+}
+
+.media_icon_presentation {
+  position: absolute;
+  bottom: 5px;
+  right: 5px;
+  text-align: right;
+}
Index: /extensions/Media_Icon/thumbnails.php
===================================================================
--- /extensions/Media_Icon/thumbnails.php	(revision 19284)
+++ /extensions/Media_Icon/thumbnails.php	(revision 19284)
@@ -0,0 +1,36 @@
+<?php
+add_event_handler('loc_end_index_thumbnails', 'media_icon_thumbnails');
+
+function media_icon_thumbnails($tpl_thumbnails_var) {
+	global $template;
+
+	add_event_handler('loc_end_page_header', 'media_icon_css');
+	
+	$template->set_prefilter('index_thumbnails', 'media_icon_prefilter_thumbnails');
+	
+	$template->set_filename('media_icon_template', dirname(__FILE__).'/template/media_icon.tpl');
+	$template->concat('PLUGIN_INDEX_CONTENT_END', $template->parse('media_icon_template', true));
+	
+	return $tpl_thumbnails_var;
+}
+
+function media_icon_prefilter_thumbnails($content, &$smarty) {
+	global $template;
+
+	$search = 'class="thumbnail"';
+	
+	$replacement = 'class="thumbnail" media_icon="{$thumbnail.file}"';
+	$content= str_replace($search, $replacement, $content);
+
+	return $content;
+}
+
+function media_icon_css() {
+	global $template, $conf;
+	
+	$conf_media_icon = unserialize($conf['media_icon']);
+	
+	//add a stylesheet
+	$template->append('head_elements', '<link rel="stylesheet" type="text/css" href="'.MEDIA_ICON_PATH.'template/'.$conf_media_icon['style'].'_media_icon.css">');
+}
+?>
