Topic: how can i remove some buttons?

hello i like the script but i want a less featured version of the uploader.
How can i remove the following.

1.remove Preferences button, or make it not show up.

2.remove resize image button, or make it not show up.

3.disable png and bmp formats.

Thumbs up

Re: how can i remove some buttons?

1. Open index.php

Delete before </div> <!-- selector --> :

<? if ($cut_url==true && $cut_url_user==true) { ?><div id="preferencias"<? if (isset($lang)) { echo ' class="'.$lang.'"'; } ?>><a id="pclosed"><span><?=TXT_PREFERENCES;?></span></a><a id="popen" style="display:none;"><span><?=TXT_PREFERENCES;?></span></a></div><? } ?>

Delete after </div> <!-- selector --> :

<form id="form_up" enctype="multipart/form-data" action="<?=PATH_SCRIPT;?>" method="post">
 
    <? if ($cut_url==true && $cut_url_user==true) { ?>
    <div id="pref-panel" style="display: none;"><div id="cajon-pref"><p id="prefurl"><input name="" type="checkbox" id="cortarurl" value="" <? if(isset($_COOKIE['prefurl'])) { ?>checked="checked"<? } ?> /><label for="cortarurl"> <?=TXT_TINYURL;?></label></p><div id="save"><a id="savepref" /><?=TXT_CLOSE_PREF;?></a></div></div></div> 
    <? } ?>

In engine.php delete :

// SHORT URL SERVICE
switch($cut_url_service) {
    case 'tinyurl':
        $tiny_api = 'http://tinyurl.com/api-create.php?url=';
        $tiny_service = 'TinyURL';
        break;
    case 'tr.im':
        $tiny_api = 'http://api.tr.im/api/trim_simple?url=';
        $tiny_service = 'tr.im';
        break;
    case 'snurl':
        $tiny_api = 'http://snurl.com/site/snip?r=simple&link=';
        $tiny_service = 'Snurl';
        break;
    default:
        $tiny_api = 'http://tinyurl.com/api-create.php?url=';
        $tiny_service = 'TinyURL';
        break;
}

And

// Short URL using services like TinyURL.com        
    function cortar_url($url) {   
        global $tiny_api;
        $tiny = $tiny_api.$url;
        $chtny = curl_init();
        curl_setopt($chtny, CURLOPT_URL, $tiny);
        curl_setopt($chtny, CURLOPT_RETURNTRANSFER, 1);
        $ShortURL = curl_exec($chtny);
        curl_close($chtny);
        return $ShortURL;
    }
 
    // SI esta habilitado cortar url.. hagamolo.
    if ($cut_url==true) {
 
        // Si se da a elegir al usuario, cortemos si el quiere.
        if ($cut_url_user==true) {
            // El usuario quiere cortar url...
            if (isset($_COOKIE['prefurl'])) {
                $ShortURL = cortar_url($URLimg);
            }
        // Cortamos si o si ya que la prefencia es de script y no de usuario.
        } else {
            $ShortURL = cortar_url($URLimg);
        }
 
    }

2. For resize buttons, in index.php delete :

<div id="redimensionar">
        <div id="redimensionar_cajatitulo">
            <div id="redimensionar_titulo">
                <div id="boton_redimensionar"<? if (isset($lang)) { echo ' class="'.$lang.'"'; } ?>><span><a id="rclosed"></a><a id="ropen" style="display: none;"></a></span></div>
                <div id="red_mensaje"><span id="red1"><?=RESIZE_DSC;?></span><span id="red2" style="display: none;"></span></div>
            </div>
        </div>       
        <div id="redimensionar-borde" style="display: none;">
            <div id="cajonred">
                <div id="ancho_deseado"><?=RESIZE_WIDTH;?> <span><?=RESIZE_PIXELS;?></span></div>
                <input name="resize" id="resize"/>
                <div id="kepp"><?=RESIZE_KEEP;?></div>
            </div>
        </div>
    </div>

For engine.php remove, there is too many lines, ask Rodolfo for this wink

3.I know how to remove this for local,  but don't know exactly for remote.

Thumbs up

Re: how can i remove some buttons?

For preferences, config.php
Resize, delete it in index.php
Png and BMP, Look up in engine.php and then remove the mime that allows png, and bmp. Then edit your index.php to say that you allow just jpg and gif.

rodolfoberrios.com | PLEASE use Tech Support forums to ask for support!