Cambios
git-svn-id: https://192.168.0.254/svn/Proyectos.FundacionLQDVI_Web/trunk@6 77ab8c26-3d69-2c4d-86f2-786f4ba54905
@ -3,7 +3,7 @@
|
||||
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/1">
|
||||
<file>
|
||||
<url>wp-content/themes/bloggingstream/includes/theme-options.php</url>
|
||||
<line>412</line>
|
||||
<line>420</line>
|
||||
</file>
|
||||
</editor-bookmarks>
|
||||
</project-private>
|
||||
|
||||
|
Before Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 6.8 KiB |
|
Before Width: | Height: | Size: 9.8 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 991 B |
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 8.1 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 7.7 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 7.5 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 7.6 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 7.0 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 6.5 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 6.3 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 7.7 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 7.9 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 6.2 KiB |
|
Before Width: | Height: | Size: 5.9 KiB |
|
Before Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 829 B |
|
Before Width: | Height: | Size: 878 B |
|
Before Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 2.8 KiB |
@ -1,14 +0,0 @@
|
||||
jQuery(document).ready(function($) {
|
||||
content = jQuery('#content').html();
|
||||
replace_content = 0;
|
||||
for(mime_type in mtli_js_array){
|
||||
string_match = new RegExp('href="([^"]+\.'+mtli_js_array[mime_type]+')"','gi');
|
||||
if(content.match(string_match)){
|
||||
content = content.replace(string_match,'href="\1" class="mtli_attachment mtli_'+mtli_js_array[mime_type]+'"');
|
||||
replace_content=1;
|
||||
}
|
||||
}
|
||||
if(replace_content==1){
|
||||
jQuery('#content').html(content);
|
||||
}
|
||||
});
|
||||
@ -1,374 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @package MimeTypeLinkImages
|
||||
* @version 1.0.6
|
||||
*/
|
||||
/*
|
||||
Plugin Name: Mime Type Link Images
|
||||
Plugin URI: http://blog.eagerterrier.co.uk/2010/10/holy-cow-ive-gone-and-made-a-mime-type-wordpress-plugin/
|
||||
Description: This will add file type icons next to links automatically
|
||||
Author: Toby Cox
|
||||
Version: 1.0.6
|
||||
Author URI: http://eagerterrier.co.uk
|
||||
*/
|
||||
|
||||
|
||||
// constants
|
||||
define('mtli_version', '1.0.4', true);
|
||||
|
||||
$mtli_options = get_option('mimetype_link_icon_options');
|
||||
|
||||
global $mtli_available_sizes;
|
||||
global $mtli_available_image_types;
|
||||
global $mtli_available_mime_types;
|
||||
global $add_attachment_style;
|
||||
global $mtli_css;
|
||||
|
||||
$mtli_available_sizes = array(24,48, 64,128);
|
||||
$mtli_available_image_types = array('gif', 'png');
|
||||
$mtli_available_mime_types = array('pdf', 'doc', 'docx', 'xls', 'xlsx', 'csv', 'zip', 'ppt', 'dwg', 'dwf', 'skp', 'jpg');
|
||||
|
||||
|
||||
function mtli_set_option($option_name, $option_value) {
|
||||
// first get the existing options in the database
|
||||
$mtli_options = get_option('mimetype_link_icon_options');
|
||||
// set the value
|
||||
$mtli_options[$option_name] = $option_value;
|
||||
// write the new options to the database
|
||||
update_option('mimetype_link_icon_options', $mtli_options);
|
||||
}
|
||||
|
||||
|
||||
// get an Ultimate GA option from the WordPress options database table
|
||||
// if the option does not exist (yet), the default value is returned
|
||||
function mtli_get_option($option_name) {
|
||||
|
||||
// get options from the database
|
||||
$mtli_options = get_option('mimetype_link_icon_options');
|
||||
|
||||
|
||||
if (!$mtli_options || !array_key_exists($option_name, $mtli_options)) {
|
||||
// no options in database yet, or not this specific option
|
||||
// create default options array
|
||||
|
||||
$mtli_default_options=array();
|
||||
$mtli_default_options['internal_domains'] = $_SERVER['SERVER_NAME'];
|
||||
if (preg_match('@www\.(.*)@i', $mtli_default_options['internal_domains'], $parts)>=1) {
|
||||
$mtli_default_options['internal_domains'] .= ','.$parts[1];
|
||||
}
|
||||
$mtli_default_options['image_size'] = '48';
|
||||
$mtli_default_options['image_type'] = 'gif';
|
||||
$mtli_default_options['enable_pdf'] = true;
|
||||
$mtli_default_options['enable_doc'] = false;
|
||||
$mtli_default_options['enable_docx'] = false;
|
||||
$mtli_default_options['enable_xls'] = false;
|
||||
$mtli_default_options['enable_xlsx'] = false;
|
||||
$mtli_default_options['enable_csv'] = false;
|
||||
$mtli_default_options['enable_zip'] = false;
|
||||
$mtli_default_options['enable_ppt'] = false;
|
||||
$mtli_default_options['enable_dwg'] = false;
|
||||
$mtli_default_options['enable_dwf'] = false;
|
||||
$mtli_default_options['enable_skp'] = false;
|
||||
$mtli_default_options['enable_jpg'] = false;
|
||||
$mtli_default_options['enable_async'] = false;
|
||||
|
||||
// add default options to the database (if options already exist,
|
||||
// add_option does nothing
|
||||
add_option('mimetype_link_icon_options', $mtli_default_options,
|
||||
'Settings for MimeType Link Icon plugin');
|
||||
|
||||
// return default option if option is not in the array in the database
|
||||
// this can happen if a new option was added to the array in an upgrade
|
||||
// and the options haven't been changed/saved to the database yet
|
||||
$result = $mtli_default_options[$option_name];
|
||||
|
||||
} else {
|
||||
// option found in database
|
||||
$result = $mtli_options[$option_name];
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
function mtli_admin() {
|
||||
|
||||
if (function_exists('add_options_page')) {
|
||||
|
||||
add_options_page('MimeType Link Icons' /* page title */,
|
||||
'MimeType Icons' /* menu title */,
|
||||
8 /* min. user level */,
|
||||
basename(__FILE__) /* php file */ ,
|
||||
'mtli_options' /* function for subpanel */);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function mtli_get_wp_path(){
|
||||
if ( version_compare( get_bloginfo( 'version' ) , '3.0' , '<' ) && is_ssl() ) {
|
||||
$wp_content_url = str_replace( 'http://' , 'https://' , get_option( 'siteurl' ) );
|
||||
} else {
|
||||
$wp_content_url = get_option( 'siteurl' );
|
||||
}
|
||||
$wp_content_url .= '/wp-content';
|
||||
return $wp_content_url;
|
||||
}
|
||||
|
||||
function mtli_options() {
|
||||
global $mtli_available_sizes;
|
||||
global $mtli_available_image_types;
|
||||
global $mtli_available_mime_types;
|
||||
|
||||
if (isset($_POST['info_update'])) {
|
||||
|
||||
?><div class="updated"><p><strong><?php
|
||||
|
||||
// process submitted form
|
||||
$mtli_options = get_option('mimetype_link_icon_options');
|
||||
$mtli_options['image_size'] = $_POST['image_size'];
|
||||
$mtli_options['image_type'] = $_POST['image_type'];
|
||||
$mtli_options['enable_pdf'] = ($_POST['enable_pdf']=="true" ? true : false);
|
||||
$mtli_options['enable_doc'] = ($_POST['enable_doc']=="true" ? true : false);
|
||||
$mtli_options['enable_docx'] = ($_POST['enable_docx']=="true" ? true : false);
|
||||
$mtli_options['enable_xls'] = ($_POST['enable_xls']=="true" ? true : false);
|
||||
$mtli_options['enable_xlsx'] = ($_POST['enable_xlsx']=="true" ? true : false);
|
||||
$mtli_options['enable_csv'] = ($_POST['enable_csv']=="true" ? true : false);
|
||||
$mtli_options['enable_zip'] = ($_POST['enable_zip']=="true" ? true : false);
|
||||
$mtli_options['enable_ppt'] = ($_POST['enable_ppt']=="true" ? true : false);
|
||||
$mtli_options['enable_dwg'] = ($_POST['enable_dwg']=="true" ? true : false);
|
||||
$mtli_options['enable_dwf'] = ($_POST['enable_dwf']=="true" ? true : false);
|
||||
$mtli_options['enable_skp'] = ($_POST['enable_skp']=="true" ? true : false);
|
||||
$mtli_options['enable_jpg'] = ($_POST['enable_jpg']=="true" ? true : false);
|
||||
$mtli_options['enable_async'] = ($_POST['enable_async']=="true" ? true : false);
|
||||
update_option('mimetype_link_icon_options', $mtli_options);
|
||||
|
||||
_e('Options saved', 'mtli')
|
||||
?></strong></p></div><?php
|
||||
}
|
||||
?>
|
||||
<div class="wrap">
|
||||
<form method="post">
|
||||
<h2>MimeTypes Link Icons</h2>
|
||||
|
||||
<div class="whitebg">
|
||||
<fieldset class="options" name="general">
|
||||
<legend><?php _e('General settings', 'mtli') ?></legend>
|
||||
<table width="100%" cellspacing="2" cellpadding="5" class="editform form-table">
|
||||
<tr>
|
||||
<th nowrap valign="top" width="33%">
|
||||
<?php _e('Image Size', 'mtli') ?>
|
||||
</th>
|
||||
<td>
|
||||
<select name="image_size" id="image_size">
|
||||
<?php foreach($mtli_available_sizes as $k => $v){ ?>
|
||||
<option value="<?php echo $v; ?>" <?php if(mtli_get_option('image_size')==$v) echo ' selected'; ?>><?php echo $v."x".$v; ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th nowrap valign="top" width="33%">
|
||||
<?php _e('Image Type', 'mtli') ?>
|
||||
</th>
|
||||
<td>
|
||||
<select name="image_type" id="image_type">
|
||||
<?php foreach($mtli_available_image_types as $k=>$v){ ?>
|
||||
<option value="<?php echo $v;?>" <?php if($v==mtli_get_option('image_type')) echo ' selected';?>><?php echo $v;?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
<fieldset class="options" name="general">
|
||||
<legend><?php _e('Image settings', 'mtli') ?></legend>
|
||||
<table width="100%" cellspacing="2" cellpadding="5" class="editform form-table">
|
||||
<?php foreach($mtli_available_mime_types as $k=>$mime_type){ ?>
|
||||
<tr>
|
||||
<th nowrap valign="top" width="33%">
|
||||
<?php _e('Add images to '.$mime_type.' uploads', 'mtli') ?>
|
||||
</th>
|
||||
<td>
|
||||
<input type="checkbox" name="enable_<?php echo $mime_type;?>" id="enable_<?php echo $mime_type;?>" value="true" <?php if (mtli_get_option('enable_'.$mime_type)) echo "checked"; ?> />
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</table>
|
||||
</fieldset>
|
||||
<fieldset class="options" name="general">
|
||||
<legend><?php _e('Enable Asynchronous Replacement?', 'mtli') ?></legend>
|
||||
<table width="100%" cellspacing="2" cellpadding="5" class="editform form-table">
|
||||
<tr>
|
||||
<td>Some themes or plugins may conflict with this plugin. If you find you are having trouble, you can switch on asynchronous replacement, which uses JavaScript rather than PHP to find your PHP links.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="checkbox" name="enable_async" id="enable_async" value="true" <?php if (mtli_get_option('enable_async')) echo "checked"; ?> /> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
<div class="submit">
|
||||
<input type="submit" name="info_update" value="<?php _e('Update options', 'mtli') ?>" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<?php
|
||||
|
||||
}
|
||||
|
||||
|
||||
// Hook function for init action to do some initialization
|
||||
function mtli_init() {
|
||||
// load texts for localization
|
||||
load_plugin_textdomain('mtli');
|
||||
}
|
||||
|
||||
|
||||
// This just echoes the chosen line, we'll position it later
|
||||
function mimetype_to_icon($content) {
|
||||
global $mtli_available_sizes;
|
||||
global $mtli_available_image_types;
|
||||
global $mtli_available_mime_types;
|
||||
global $add_attachment_style;
|
||||
global $mtli_css;
|
||||
if ( ! function_exists( 'is_ssl' ) ) {
|
||||
function is_ssl() {
|
||||
if ( isset($_SERVER['HTTPS']) ) {
|
||||
if ( 'on' == strtolower($_SERVER['HTTPS']) )
|
||||
return true;
|
||||
if ( '1' == $_SERVER['HTTPS'] )
|
||||
return true;
|
||||
} elseif ( isset($_SERVER['SERVER_PORT']) && ( '443' == $_SERVER['SERVER_PORT'] ) ) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
$wp_content_url = mtli_get_wp_path();
|
||||
|
||||
$mtli_css = '';
|
||||
foreach($mtli_available_mime_types as $k=>$mime_type){
|
||||
if(mtli_get_option('enable_'.$mime_type)){
|
||||
//if($content = preg_replace('/href="([^"]+\.pdf)"/','href="\1" class="mtli_attachment mtli_'.$mime_type.'"',$content, -1, $howmany))
|
||||
|
||||
if(strpos($content, '.'.$mime_type.'"')!==false){
|
||||
$howmany=0;
|
||||
$content = preg_replace('/href="([^"]+\.'.$mime_type.')"/','href="\\1" class="mtli_attachment mtli_'.$mime_type.'"',$content, -1, $howmany);
|
||||
if($howmany>0){
|
||||
$add_attachment_style = true;
|
||||
$mtli_css .= '.mtli_'.$mime_type.' { background-image: url('.$wp_content_url.'/plugins/mimetypes-link-icons/images/'.$mime_type.'-icon-'.mtli_get_option('image_size').'x'.mtli_get_option('image_size').'.'.mtli_get_option('image_type').'); }';
|
||||
}
|
||||
} elseif(strpos($content, '.'.$mime_type.'\'')!==false){
|
||||
$howmany=0;
|
||||
$content = preg_replace("/href='([^']+\.".$mime_type.")'/","href='\\1' class='mtli_attachment mtli_".$mime_type."'",$content, -1, $howmany);
|
||||
if($howmany>0){
|
||||
$add_attachment_style = true;
|
||||
$mtli_css .= '.mtli_'.$mime_type.' { background-image: url('.$wp_content_url.'/plugins/mimetypes-link-icons/images/'.$mime_type.'-icon-'.mtli_get_option('image_size').'x'.mtli_get_option('image_size').'.'.mtli_get_option('image_type').'); }';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return $content;
|
||||
}
|
||||
|
||||
// Now we set that function up to execute when the the_content action is called
|
||||
|
||||
//add_action('load_template', 'mimetype_to_icon');
|
||||
|
||||
|
||||
function mtli_add_jquery(){
|
||||
wp_enqueue_script('jquery');
|
||||
}
|
||||
|
||||
function mtli_display_css($content){
|
||||
global $mtli_available_mime_types;
|
||||
global $add_attachment_style;
|
||||
$mtli_css = "<style type='text/css'> .mtli_attachment { display:inline-block; height:".mtli_get_option('image_size')."px; background-position: top left; background-attachment: scroll; background-repeat: no-repeat; padding-left: ".(mtli_get_option('image_size')*1.2)."px; }";
|
||||
$wp_content_url = mtli_get_wp_path();
|
||||
foreach($mtli_available_mime_types as $k=>$mime_type){
|
||||
if(mtli_get_option('enable_'.$mime_type)){
|
||||
$mtli_css .= '.mtli_'.$mime_type.' { background-image: url('.$wp_content_url.'/plugins/mimetypes-link-icons/images/'.$mime_type.'-icon-'.mtli_get_option('image_size').'x'.mtli_get_option('image_size').'.'.mtli_get_option('image_type').'); }';
|
||||
}
|
||||
}
|
||||
$mtli_css.="</style>";
|
||||
if($add_attachment_style===true || mtli_get_option('enable_async')){
|
||||
echo $mtli_css.$content;
|
||||
}
|
||||
/*if($add_attachment_style===true || mtli_get_option('enable_async')){
|
||||
return $mtli_css.$content;
|
||||
} else {
|
||||
return $content;
|
||||
}*/
|
||||
}
|
||||
|
||||
function mtli_add_async_replace($content){
|
||||
$wp_content_url = mtli_get_wp_path();
|
||||
$mtli_js_array = 'var mtli_js_array = new Array(';
|
||||
global $mtli_available_mime_types;
|
||||
foreach($mtli_available_mime_types as $k=>$mime_type){
|
||||
if(mtli_get_option('enable_'.$mime_type)){
|
||||
$mtli_js_array .= "'".$mime_type."',";
|
||||
}
|
||||
}
|
||||
$mtli_js_array = substr($mtli_js_array,0,-1).');';
|
||||
echo '<script type="text/javascript">'.$mtli_js_array.'</script>';
|
||||
echo '<script type="text/javascript" src="'.$wp_content_url.'/plugins/mimetypes-link-icons/js/mtli_str_replace.js"></script>';
|
||||
}
|
||||
|
||||
add_action('wp_head', 'mtli_display_css');
|
||||
|
||||
if(mtli_get_option('enable_async')){
|
||||
add_action('get_header', 'mtli_add_jquery');
|
||||
add_action('get_footer', 'mtli_add_async_replace');
|
||||
} else {
|
||||
add_action('the_content', 'mimetype_to_icon');
|
||||
}
|
||||
|
||||
// Adding Admin CSS
|
||||
function mtli_admin_css() {
|
||||
echo "
|
||||
<style type='text/css'>
|
||||
.form-table { margin-bottom: 0 !important; }
|
||||
.form-table th { font-size: 11px; min-width: 200px; }
|
||||
.form-table .largetext { font-size: 12px; }
|
||||
.form-table td { max-width: 500px; }
|
||||
.form-table tr:last-child { border-bottom: 1px solid #DEDEDE; }
|
||||
.form-table tr:last-child td { padding-bottom: 20px; }
|
||||
.form-table select { width: 275px; }
|
||||
</style>
|
||||
";
|
||||
}
|
||||
|
||||
add_action('admin_head', 'mtli_admin_css');
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// **************
|
||||
// initialization
|
||||
|
||||
|
||||
|
||||
|
||||
// assume both header and footer are not hooked
|
||||
global $mtli_header_hooked;
|
||||
global $mtli_footer_hooked;
|
||||
$mtli_header_hooked=false;
|
||||
$mtli_footer_hooked=false;
|
||||
|
||||
// add UGA Options page to the Option menu
|
||||
add_action('admin_menu', 'mtli_admin');
|
||||
|
||||
|
||||
add_action('init', 'mtli_init');
|
||||
|
||||
|
||||
|
||||
?>
|
||||
@ -1,79 +0,0 @@
|
||||
=== MimeTypes Link Icons ===
|
||||
Contributors: eagerterrier
|
||||
Donate link: http://blog.eagerterrier.co.uk/2010/10/holy-cow-ive-gone-and-made-a-mime-type-wordpress-plugin/
|
||||
Tags: mime-type, icons, PDF, xls, xlsx, doc, docx, mime, type, mimetype, zip, csv, ppt, skp, dwg, dwf, jpg
|
||||
Requires at least: 1.5.1.3
|
||||
Tested up to: 3.1.1
|
||||
Stable tag: trunk
|
||||
|
||||
Adds icons automatically to any uploads inserted into your blog posts.
|
||||
|
||||
== Description ==
|
||||
|
||||
MimeTypes Link Icons is a plugin that looks for uploads in your blogs posts and adds a nice icon next to it.
|
||||
|
||||
Supported Extensions:
|
||||
|
||||
* .csv
|
||||
* .doc
|
||||
* .docx
|
||||
* .pdf
|
||||
* .xls
|
||||
* .xlsx
|
||||
* .zip
|
||||
* .ppt
|
||||
* .dwg
|
||||
* .dwf
|
||||
* .skp
|
||||
* .jpg
|
||||
|
||||
Each icon is configurable. You can choose to display a PNG with transparent background or GIF with white matte. Each icon is available in the following sizes:
|
||||
|
||||
* 24x24px
|
||||
* 48x48px
|
||||
* 64x64px
|
||||
* 128x128px
|
||||
|
||||
== Installation ==
|
||||
|
||||
|
||||
1. Upload the whole `mime_type_link_images` folder to your `/wp-content/plugins/` directory
|
||||
1. Activate the plugin through the 'Plugins' menu in WordPress
|
||||
1. By default the PDF icon will be the only one being searched for. It will display the 48x48 gif next to your pdf links. Any other
|
||||
|
||||
== Frequently Asked Questions ==
|
||||
|
||||
= Does `MimeTypes Link Icons` just convert uploaded document links? =
|
||||
|
||||
No. It searches your post for any links containing the mimetype extensions you have activated. This will be triggered by any link.
|
||||
|
||||
|
||||
== Screenshots ==
|
||||
|
||||
1. Screenshot of the administration screen
|
||||
2. Screenshot of plugin in action.
|
||||
|
||||
== Changelog ==
|
||||
|
||||
= 1.0.6 =
|
||||
* Turns out some themes don't use get_header OR get_footer. Had to put the hook into the_content instead.
|
||||
|
||||
= 1.0.5 =
|
||||
* Adding optional asynchronous method for users with conflicting plugins (for example the infocus theme's fancy_box)
|
||||
|
||||
= 1.0.4 =
|
||||
* Bug fix on the preg_replace replace syntax
|
||||
|
||||
= 1.0.3 =
|
||||
* Added new file type icons at request of benlikespizza - ppt, skp, dwg, dwf, jpg
|
||||
|
||||
= 1.0.2 =
|
||||
* Fixed Bug that caused icons not to appear when some conflicting plugins were installed
|
||||
|
||||
= 1.0.1 =
|
||||
* Typo in CSS caused some images not to show
|
||||
|
||||
== Upgrade Notice ==
|
||||
|
||||
= 1.0.1 =
|
||||
Typo in CSS caused some images not to show. Recommended for all users
|
||||