• Welcome to the Chevereto User Community!

    Here, users from all over the world come together to learn, share, and collaborate on everything related to Chevereto. It's a place to exchange ideas, ask questions, and help improve the software.

    Please keep in mind:

    • This community is user-driven. Always be polite and respectful to others.
    • Support development by purchasing a Chevereto license, which also gives you priority support.
    • Go further by joining the Community Subscription for even faster response times and to help sustain this space

how can i remove some buttons?

Thomas

Chevereto Noob
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.
 
1. Open index.php

Delete before </div> <!-- selector --> :
PHP:
<? 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 --> :

PHP:
<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 :

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

And

PHP:
// 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 :

PHP:
<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 😉

3.I know how to remove this for local, but don't know exactly for remote.
 
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.
 
Back
Top