looking for wordpress image resizer plugin

Status
Not open for further replies.

warung giras

Banned
Banned
296
2011
8
0
anybody know wordpress image resizer plugin which is support for external image hosting

i've been looking but many of them its only work when image location is in my wordpress galery, i cant resize them if my image source from other image hosting

Thanks
 
20 comments
As far as I know, you cannot remove it but you can customize that part like how I have done it on scenexxx.com

I changed it to pink to match the theme and changed the icon too.

If you can then apply a transparent style to it and see if it works.
 
First back up your file (ncode-image-resizer.php)
Then open ncode-image-resizer.php
Then delete lines 48-49-50-51-52.
Then on line 38 delete only
Code:
table.ncode_imageresizer_warning {background: #FFFFE0;color:#333333;border: 1px solid #E6DB55;cursor: pointer;}table.ncode_imageresizer_warning td {font-size: 10px;vertical-align: middle;text-decoration: none; text-align:left; font-family:Verdana, Geneva, sans-serif;}table.ncode_imageresizer_warning td.td1 {padding: 5px;}table.ncode_imageresizer_warning td.td1 {padding: 2px;}

I guess that's all, test it and get back ^_^
 
First back up your file (ncode-image-resizer.php)
Then open ncode-image-resizer.php
Then delete lines 48-49-50-51-52.
Then on line 38 delete only
Code:
table.ncode_imageresizer_warning {background: #FFFFE0;color:#333333;border: 1px solid #E6DB55;cursor: pointer;}table.ncode_imageresizer_warning td {font-size: 10px;vertical-align: middle;text-decoration: none; text-align:left; font-family:Verdana, Geneva, sans-serif;}table.ncode_imageresizer_warning td.td1 {padding: 5px;}table.ncode_imageresizer_warning td.td1 {padding: 2px;}
I guess that's all, test it and get back ^_^

Ok 80% but i see
fad871.jpg

Help me fix 100%
 
Did you delete:
Code:
table.ncode_imageresizer_warning {background: #FFFFE0;color:#333333;border: 1px solid #E6DB55;cursor: pointer;}table.ncode_imageresizer_warning td {font-size: 10px;vertical-align: middle;text-decoration: none; text-align:left; font-family:Verdana, Geneva, sans-serif;}table.ncode_imageresizer_warning td.td1 {padding: 5px;}table.ncode_imageresizer_warning td.td1 {padding: 2px;}
Or open the file delete all thing and copy & past this code
PHP:
<?php
/*
Plugin Name: nCode Image Resizer
Plugin URI: http://www.dmry.net/
Description: This plugin enables you to automatically resize every user-posted image which is larger than given dimensions. Original plugin writen by <a href="http://www.ncode.nl/vbulletinplugins/" target="_blank" title="Jorrit Schippers">Jorrit Schippers  for vBulletin</a>.
Author: Hakan Demiray
Version: 1.3
Author URI: http://www.dmry.net/
*/
add_action('init', 'ncode_init');
add_action('admin_menu', 'ncode_options_page');
add_action('activate_ncode-image-resizer/ncode-image-resizer.php','ncode_activate');
add_action('wp_head', 'ncode_wp_head');
add_filter('the_content', 'ncode_the_content',100);

function ncode_init() {
    load_plugin_textdomain('ncode', 'wp-content/plugins/ncode-image-resizer/languages' );
}

function ncode_activate() {
    add_option('ncode_db_surum', 1);
    add_option('ncode_secenekler', array('resizemode'=>'enlarge', 'maxwidth'=>400, 'maxheight'=>''));
}


function ncode_options_page() {
    add_options_page(__('nCode Settings','ncode'), __('nCode Settings','ncode'), 'administrator', basename(__FILE__), 'ncode_options');
}

function ncode_wp_head() {
    $ncode_secenekler = get_option('ncode_secenekler');
    $ncode_plugin_url = WP_CONTENT_URL.'/plugins/ncode-image-resizer/';
?>
<script type="text/javascript" src="<?php echo $ncode_plugin_url; ?>js/ncode_imageresizer.js?v=1.0.1"></script>
<?php if ($ncode_secenekler['resizemode']=='tinybox') { ?>
<script type="text/javascript" src="<?php echo $ncode_plugin_url; ?>js/tinybox.js?v=1.0"></script>
<?php } ?>
<style type="text/css">
<?php if ($ncode_secenekler['resizemode']=='tinybox') { ?>
#tinybox {position:absolute; display:none; padding:10px; background:#fff url(<?php echo $ncode_plugin_url; ?>images/preload.gif) no-repeat 50% 50%; border:10px solid #e3e3e3; z-index:2000}#tinymask {position:absolute; display:none; top:0; left:0; height:100%; width:100%; background:#000; z-index:1500}#tinycontent {background:#fff}
<?php } ?>
</style>
<script type="text/javascript">
NcodeImageResizer.MODE = '<?php echo $ncode_secenekler['resizemode'];?>';
NcodeImageResizer.MAXWIDTH = <?php if($ncode_secenekler['maxwidth']=='') echo "''"; else echo $ncode_secenekler['maxwidth'];?>;
NcodeImageResizer.MAXHEIGHT = <?php if($ncode_secenekler['maxheight']=='') echo "''"; else echo $ncode_secenekler['maxheight'];?>;
</script>
<?php    
}

function ncode_durum_katman($mesaj, $durum) {
    if($durum == 'guncellendi') $class = 'updated fade';
    elseif($durum == 'hata') $class = 'updated error';
    else $class = $type;
    
    echo '<div id="message" class="'.$class.'"><p>' . __($mesaj, 'ncode') . '</p></div>';
}

function ncode_the_content($content) {
    return preg_replace("/<img([^`|>]*)>/im", "<img onload=\"NcodeImageResizer.createOn(this);\"$1>", $content);
}

function ncode_options() {
    if ( function_exists('current_user_can') && !current_user_can('manage_options') ) die(__('Cheatin’ uh?', 'ncode'));
    if (! user_can_access_admin_page()) wp_die( __('You do not have sufficient permissions to access this page','ncode') );
    
    $array_resizemode = array('none'=>__('Keep original size', 'ncode'), 'enlarge'=>__('Enlarge in same window', 'ncode'), 'samewindow'=>__('Open in same window', 'ncode'), 'newwindow'=>__('Open in new window', 'ncode'), 'tinybox'=>__('Open in modal window', 'ncode'));

    if(isset($_REQUEST['submit']) and $_REQUEST['submit']) {
        $maxwidth = $_POST['maxwidth'];
        $maxheight = $_POST['maxheight'];
        $resizemode = $_POST['resizemode'];
        $varhata=false;
        if(!is_numeric($maxwidth) && !empty($maxwidth)) {
            ncode_durum_katman('Maximum width must be numeric', 'hata');
            $varhata = true;
        } else if(!is_numeric($maxheight) && !empty($maxheight)) {
            ncode_durum_katman('Maximum height must be numeric', 'hata');
            $varhata = true;
        }
        if($varhata==false) {
            $secenekler = compact('maxwidth','maxheight','resizemode');
            update_option('ncode_secenekler', $secenekler);
            ncode_durum_katman('Options updated', 'guncellendi');
        }
        
    }
    $ncode_secenekler = get_option('ncode_secenekler');
?>
<div class="wrap">
<div id="icon-options-general" class="icon32"><br /></div>
<h2><?php _e('nCode Settings', 'ncode'); ?></h2>

<form action="" method="post">
<table class="form-table">
<tr valign="top">
<th scope="row"><label for="resizemode"><?php _e('Images in posts', 'ncode'); ?></label></th>
<td>
<select name="resizemode" id="resizemode">
<?php
foreach($array_resizemode as $_value=>$_option) {
    echo "<option value='$_value'". ( ($ncode_secenekler['resizemode']==$_value) ? ' selected="selected"' : ''  ) .">$_option</option>";    
}
?>
</select>

<span class="description"><?php _e('This blog automatically resizes images which are too large. Please choose here how you would like to view the enlarged images.', 'ncode'); ?></span></td>
</tr>
<tr valign="top">

<th scope="row"><label for="maxwidth"><?php _e('Maximum width', 'ncode'); ?></label></th>
<td><input name="maxwidth" type="text" id="maxwidth" value="<?php echo $ncode_secenekler['maxwidth']; ?>" class="small-text" />
<span class="description"><?php _e('Images taller than this width will be resized. Enter 0 to allow all widths, or leave the field empty to use the default value.', 'ncode'); ?></span>
</td>
</tr>
<tr valign="top">
<th scope="row"><label for="maxheight"><?php _e('Maximum height', 'ncode'); ?></label></th>
<td><input name="maxheight" type="text" id="maxheight" value="<?php echo $ncode_secenekler['maxheight']; ?>" class="small-text" />
<span class="description"><?php _e('Images taller than this height will be resized. Enter 0 to allow all heights, or leave the field empty to use the default value.', 'ncode'); ?></span></td>
</tr>
</table>
<p class="submit">
<input type="submit" name="submit" class="button-primary" value="<?php _e('Save Changes', 'ncode'); ?>" />
</p>

</form>
</div>
<?php    
}

?>
 
Did you delete:
Code:
table.ncode_imageresizer_warning {background: #FFFFE0;color:#333333;border: 1px solid #E6DB55;cursor: pointer;}table.ncode_imageresizer_warning td {font-size: 10px;vertical-align: middle;text-decoration: none; text-align:left; font-family:Verdana, Geneva, sans-serif;}table.ncode_imageresizer_warning td.td1 {padding: 5px;}table.ncode_imageresizer_warning td.td1 {padding: 2px;}
Or open the file delete all thing and copy & past this code
PHP:
<?php
/*
Plugin Name: nCode Image Resizer
Plugin URI: http://www.dmry.net/
Description: This plugin enables you to automatically resize every user-posted image which is larger than given dimensions. Original plugin writen by <a href="http://www.ncode.nl/vbulletinplugins/" target="_blank" title="Jorrit Schippers">Jorrit Schippers  for vBulletin</a>.
Author: Hakan Demiray
Version: 1.3
Author URI: http://www.dmry.net/
*/
add_action('init', 'ncode_init');
add_action('admin_menu', 'ncode_options_page');
add_action('activate_ncode-image-resizer/ncode-image-resizer.php','ncode_activate');
add_action('wp_head', 'ncode_wp_head');
add_filter('the_content', 'ncode_the_content',100);

function ncode_init() {
    load_plugin_textdomain('ncode', 'wp-content/plugins/ncode-image-resizer/languages' );
}

function ncode_activate() {
    add_option('ncode_db_surum', 1);
    add_option('ncode_secenekler', array('resizemode'=>'enlarge', 'maxwidth'=>400, 'maxheight'=>''));
}


function ncode_options_page() {
    add_options_page(__('nCode Settings','ncode'), __('nCode Settings','ncode'), 'administrator', basename(__FILE__), 'ncode_options');
}

function ncode_wp_head() {
    $ncode_secenekler = get_option('ncode_secenekler');
    $ncode_plugin_url = WP_CONTENT_URL.'/plugins/ncode-image-resizer/';
?>
<script type="text/javascript" src="<?php echo $ncode_plugin_url; ?>js/ncode_imageresizer.js?v=1.0.1"></script>
<?php if ($ncode_secenekler['resizemode']=='tinybox') { ?>
<script type="text/javascript" src="<?php echo $ncode_plugin_url; ?>js/tinybox.js?v=1.0"></script>
<?php } ?>
<style type="text/css">
<?php if ($ncode_secenekler['resizemode']=='tinybox') { ?>
#tinybox {position:absolute; display:none; padding:10px; background:#fff url(<?php echo $ncode_plugin_url; ?>images/preload.gif) no-repeat 50% 50%; border:10px solid #e3e3e3; z-index:2000}#tinymask {position:absolute; display:none; top:0; left:0; height:100%; width:100%; background:#000; z-index:1500}#tinycontent {background:#fff}
<?php } ?>
</style>
<script type="text/javascript">
NcodeImageResizer.MODE = '<?php echo $ncode_secenekler['resizemode'];?>';
NcodeImageResizer.MAXWIDTH = <?php if($ncode_secenekler['maxwidth']=='') echo "''"; else echo $ncode_secenekler['maxwidth'];?>;
NcodeImageResizer.MAXHEIGHT = <?php if($ncode_secenekler['maxheight']=='') echo "''"; else echo $ncode_secenekler['maxheight'];?>;
</script>
<?php    
}

function ncode_durum_katman($mesaj, $durum) {
    if($durum == 'guncellendi') $class = 'updated fade';
    elseif($durum == 'hata') $class = 'updated error';
    else $class = $type;
    
    echo '<div id="message" class="'.$class.'"><p>' . __($mesaj, 'ncode') . '</p></div>';
}

function ncode_the_content($content) {
    return preg_replace("/<img([^`|>]*)>/im", "<img onload=\"NcodeImageResizer.createOn(this);\"$1>", $content);
}

function ncode_options() {
    if ( function_exists('current_user_can') && !current_user_can('manage_options') ) die(__('Cheatin’ uh?', 'ncode'));
    if (! user_can_access_admin_page()) wp_die( __('You do not have sufficient permissions to access this page','ncode') );
    
    $array_resizemode = array('none'=>__('Keep original size', 'ncode'), 'enlarge'=>__('Enlarge in same window', 'ncode'), 'samewindow'=>__('Open in same window', 'ncode'), 'newwindow'=>__('Open in new window', 'ncode'), 'tinybox'=>__('Open in modal window', 'ncode'));

    if(isset($_REQUEST['submit']) and $_REQUEST['submit']) {
        $maxwidth = $_POST['maxwidth'];
        $maxheight = $_POST['maxheight'];
        $resizemode = $_POST['resizemode'];
        $varhata=false;
        if(!is_numeric($maxwidth) && !empty($maxwidth)) {
            ncode_durum_katman('Maximum width must be numeric', 'hata');
            $varhata = true;
        } else if(!is_numeric($maxheight) && !empty($maxheight)) {
            ncode_durum_katman('Maximum height must be numeric', 'hata');
            $varhata = true;
        }
        if($varhata==false) {
            $secenekler = compact('maxwidth','maxheight','resizemode');
            update_option('ncode_secenekler', $secenekler);
            ncode_durum_katman('Options updated', 'guncellendi');
        }
        
    }
    $ncode_secenekler = get_option('ncode_secenekler');
?>
<div class="wrap">
<div id="icon-options-general" class="icon32"><br /></div>
<h2><?php _e('nCode Settings', 'ncode'); ?></h2>

<form action="" method="post">
<table class="form-table">
<tr valign="top">
<th scope="row"><label for="resizemode"><?php _e('Images in posts', 'ncode'); ?></label></th>
<td>
<select name="resizemode" id="resizemode">
<?php
foreach($array_resizemode as $_value=>$_option) {
    echo "<option value='$_value'". ( ($ncode_secenekler['resizemode']==$_value) ? ' selected="selected"' : ''  ) .">$_option</option>";    
}
?>
</select>

<span class="description"><?php _e('This blog automatically resizes images which are too large. Please choose here how you would like to view the enlarged images.', 'ncode'); ?></span></td>
</tr>
<tr valign="top">

<th scope="row"><label for="maxwidth"><?php _e('Maximum width', 'ncode'); ?></label></th>
<td><input name="maxwidth" type="text" id="maxwidth" value="<?php echo $ncode_secenekler['maxwidth']; ?>" class="small-text" />
<span class="description"><?php _e('Images taller than this width will be resized. Enter 0 to allow all widths, or leave the field empty to use the default value.', 'ncode'); ?></span>
</td>
</tr>
<tr valign="top">
<th scope="row"><label for="maxheight"><?php _e('Maximum height', 'ncode'); ?></label></th>
<td><input name="maxheight" type="text" id="maxheight" value="<?php echo $ncode_secenekler['maxheight']; ?>" class="small-text" />
<span class="description"><?php _e('Images taller than this height will be resized. Enter 0 to allow all heights, or leave the field empty to use the default value.', 'ncode'); ?></span></td>
</tr>
</table>
<p class="submit">
<input type="submit" name="submit" class="button-primary" value="<?php _e('Save Changes', 'ncode'); ?>" />
</p>

</form>
</div>
<?php    
}

?>

Not working i see error
Code:
Warning:  Cannot modify header information - headers already sent  by (output started at /wp-content/plugins/ncode-image-resizer/ncode-image-resizer.php:131)  in /wp-content/plugins/post-views/post-views.php on line 119
 
I guess this error is caused by other plugins/Your theme.
But it's strange it shouldn't happen any issue.
 
Last edited:
I use slimbox2

I tried to check this nCode plugins but i don't know how to use it... Damn .. there is no settings and documentation of this plugin
 
I use slimbox2

I tried to check this nCode plugins but i don't know how to use it... Damn .. there is no settings and documentation of this plugin
Because this plugin works only with images posted after activation. So the old ones will not be affected.
 
Status
Not open for further replies.
Back
Top