Page 1 of 1

how can limit image in width and height

Posted: Thu Mar 11, 2004 7:45 pm
by q8kof
hi am kof new in php
sorry for my poor english

i have ( monster site list )
there are in it limit for size of site banner in admin control
but there is not limit for width and height for site banner
how can i do it please help me

i am waiting here and in my mail q8kof@hotmail.com

up

Posted: Fri Mar 12, 2004 5:43 am
by q8kof
i'm new in php but i think that is it

Code: Select all

function show_images()
	{	global $mtl, $admin;
		$this->skin = $admin->add_top("Image/Banner Settings", "Edit Image/Banner Settings below. When you are donepress 'Edit Settings'.", "set", "do_settings");
		$this->skin .= $admin->add_title("Input Information", "2");
		$this->skin .= $admin->add_td_square("2");
		$this->skin .= $admin->add_td_row(array(array("Banner Upload Path:", "The path from server root where to upload images. ie. c:/htdocs/tsl/banners/ or /home/user/httpdocs/tsl/banners/ "), $admin->add_form_textbox("banner_path", $mtl->config["banner_path"])), 1);
		$this->skin .= $admin->add_td_row(array(array("Banner Link:", "HTTP URL to banner directory. [url]http://www.domain.com/tsl/banners/[/url]"), $admin->add_form_textbox("banner_http", $mtl->config["banner_http"])), 1);
		$this->skin .= $admin->add_td_row(array(array("Maximum Banner Size (For Upload):", "In bytes! 1000 bytes is 1kb. '100000' is 100kb."), $admin->add_form_textbox("banner_size", $mtl->config["banner_size"])), 1);
		$this->skin .= $admin->add_td_row(array(array("Banner Extensions (For Upload):", "Gif, Jpg etc. MUST end in ','. ie. "gif,jpg,bmp,png,""), $admin->add_form_textbox("banner_ex", $mtl->config["banner_ex"])), 1);
		$this->skin .= $admin->add_td_row(array(array("Allow Banner Upload:", "Allow users to upload banners to this server (After configuration set above)"), $admin->add_form_radio("banner_upload", $mtl->config["banner_upload"])), 1);
		$this->skin .= $admin->add_td_row(array(array("Allow Banner Linking:", "Allow users to link banners to their own person web server"), $admin->add_form_radio("banner_link", $mtl->config["banner_link"])), 1);
		$this->skin .= $admin->end_td_square();
		$this->skin .= $admin->add_end('Edit Settings');
		$admin->do_output($this->skin);
	}
and the limit exactly here

Code: Select all

$this->skin .= $admin->add_td_row(array(array("Maximum Banner Size (For Upload):", "In bytes! 1000 bytes is 1kb. '100000' is 100kb."), $admin->add_form_textbox("banner_size", $mtl->config["banner_size"])), 1);


and i think it liked with var in other file