Jump to content
php.lv forumi

AigarZs

Reģistrētie lietotāji
  • Posts

    6
  • Joined

  • Last visited

Posts posted by AigarZs

  1. Problēma tāda, ka neiet Script ne Jaunumos, ne Forumā.. Iet tikai tad kad izveido jaunu lapu..Proti tagad lapā izveidoju Forumā sadaļu adminstrācija un tur vel iekšā Kontakti... Domāju tā: Vārds, Uzvārds.

    Email:

    Skype : ( UN ŠEIT ielikt scriptu kur parāda Skype statusu, bet Forumā neiet, cik noprotu tad neiet neviens scrpits)

     

    Scripts ir šitāds:

     

    <script type="text/javascript" src="http://download.skype.com/share/skypebuttons/js/skypeCheck.js"></script><a href="skype:aigarsfeteris?chat" onclick="return skypeCheck();"><img src="http://mystatus.skype.com/smallclassic/aigarsfeteris" style="border: none;" width="114" height="20" alt="Mans Skype statuss" /></a>

     

    Palīdziet Lūdzu!! :)

  2. Samazina attēlu, lai iekļautos norādītajos izmēros.

    Pārraksta samazināto pa virsu orģinālajam.

     

    	function imageResize($path,$max_width=300,$max_height=400){
    	if(!file_exists($path)){
    		return false;
    	}
    
    	$max_height = (int)$max_height;
    	$max_width = (int)$max_width;
    
    	$src_img = imagecreatefromjpeg($path);
    
    	$x = imagesx($src_img);
    	$y = imagesy($src_img);
    
    	if(($x >= $y) && ($x > $max_width)){
    		$picsize = $max_width; 
    		$new_w = imagesx($src_img);
    		$new_h = imagesy($src_img);
    		$aspect_ratio = $new_h / $new_w;
    		$new_w = $picsize;
    		$new_h = abs($new_w * $aspect_ratio);
    	}
    
    	if(($y > $x) && ($y > $max_height)){
    		$picsize = $max_height; 
    		$new_w = imagesx($src_img);
    		$new_h = imagesy($src_img);
    		$aspect_ratio = $new_w / $new_h;
    		$new_h = $picsize;
    		$new_w = abs($new_h * $aspect_ratio);
    	}
    
    	$dst_img = imagecreatetruecolor($new_w,$new_h);
    	imagecopyresampled($dst_img,$src_img,0,0,0,0,$new_w,$new_h,imagesx($src_img),imagesy($src_img));
    	return imagejpeg($dst_img, $path, 80);
    }
    

     

     

    Eu kur shis scripts iisti ir jakopē, lai vinsh stradatu?

  3. Par Script*

     

    Chaw.. Proti problēma man tāda, ka es sākumā jeb jaunumos nevaru vairs ielikt Scriptusm,kas tur varētu būt par problēmu?? Uztaisot Lapu (Piemeram - TEST) tur saliekot scriptus un izlabojot tekstinus man viss iet, bet neiet tieši Jaunumos.. Sākuma lapa(news.php)

×
×
  • Create New...