• úvod
  • témata
  • události
  • tržiště
  • diskuze
  • nástěnka
  • přihlásit
    registrace
    ztracené heslo?
    QUITEwordpress
    CITRONAK
    CITRONAK --- ---
    BOBULIX: co jsem to zkousel, tak u me pomer stran ok - tedy alespon mi to tak prijde...
    MRTVY_KENNY
    MRTVY_KENNY --- ---
    +
    		/**
    		* Get the containers dimensions according to the item size
    		* @param width {integer} Width of the item to be opened
    		* @param height {integer} Height of the item to be opened
    		*/
    		function _getDimensions(width,height){
    			width = parseFloat(width);
    			height = parseFloat(height);
    			
    			// Get the details height, to do so, I need to clone it since it's invisible
    			$pp_details = $pp_pic_holder.find('.pp_details');
    			$pp_details.width(width);
    			detailsHeight = parseFloat($pp_details.css('marginTop')) + parseFloat($pp_details.css('marginBottom'));
    			
    			$pp_details = $pp_details.clone().addClass(settings.theme).width(width).appendTo($('body')).css({
    				'position':'absolute',
    				'top':-10000
    			});
    			detailsHeight += $pp_details.height();
    			detailsHeight = (detailsHeight <= 34) ? 36 : detailsHeight; // Min-height for the details
    			if($.browser.msie && $.browser.version==7) detailsHeight+=8;
    			$pp_details.remove();
    			
    			// Get the titles height, to do so, I need to clone it since it's invisible
    			$pp_title = $pp_pic_holder.find('.ppt');
    			$pp_title.width(width);
    			titleHeight = parseFloat($pp_title.css('marginTop')) + parseFloat($pp_title.css('marginBottom'));
    			$pp_title = $pp_title.clone().appendTo($('body')).css({
    				'position':'absolute',
    				'top':-10000
    			});
    			titleHeight += $pp_title.height();
    			$pp_title.remove();
    			
    			// Get the container size, to resize the holder to the right dimensions
    			pp_contentHeight = height + detailsHeight;
    			pp_contentWidth = width;
    			pp_containerHeight = pp_contentHeight + titleHeight + $pp_pic_holder.find('.pp_top').height() + $pp_pic_holder.find('.pp_bottom').height();
    			pp_containerWidth = width;
    		}
    
    MRTVY_KENNY
    MRTVY_KENNY --- ---
    		/**
    		* Resize the item dimensions if it's bigger than the viewport
    		* @param width {integer} Width of the item to be opened
    		* @param height {integer} Height of the item to be opened
    		* @return An array containin the "fitted" dimensions
    		*/
    		function _fitToViewport(width,height){
    			resized = false;
    
    			_getDimensions(width,height);
    			
    			// Define them in case there's no resize needed
    			imageWidth = width, imageHeight = height;
    
    			if( ((pp_containerWidth > windowWidth) || (pp_containerHeight > windowHeight)) && doresize && settings.allow_resize && !percentBased) {
    				resized = true, fitting = false;
    			
    				while (!fitting){
    					if((pp_containerWidth > windowWidth)){
    						imageWidth = (windowWidth - 200);
    						imageHeight = (height/width) * imageWidth;
    					}else if((pp_containerHeight > windowHeight)){
    						imageHeight = (windowHeight - 200);
    						imageWidth = (width/height) * imageHeight;
    					}else{
    						fitting = true;
    					};
    
    					pp_containerHeight = imageHeight, pp_containerWidth = imageWidth;
    				};
    			
    				_getDimensions(imageWidth,imageHeight);
    				
    				if((pp_containerWidth > windowWidth) || (pp_containerHeight > windowHeight)){
    					_fitToViewport(pp_containerWidth,pp_containerHeight)
    				};
    			};
    			
    			return {
    				width:Math.floor(imageWidth),
    				height:Math.floor(imageHeight),
    				containerHeight:Math.floor(pp_containerHeight),
    				containerWidth:Math.floor(pp_containerWidth) + (settings.horizontal_padding * 2),
    				contentHeight:Math.floor(pp_contentHeight),
    				contentWidth:Math.floor(pp_contentWidth),
    				resized:resized
    			};
    		};
    
    MRTVY_KENNY
    MRTVY_KENNY --- ---
    BOBULIX: a na co se ptas? kde je kod, ktery to dela?
    BOBULIX
    BOBULIX --- ---
    Už dva dny se snažim přijít na to, proč když v prettyPhoto lightboxu otevřu obrázek, tak se změní poměr stran.
    př. http://bobcap.cz/panoptikum-pouste-namibijske/
    CITRONAK
    CITRONAK --- ---
    SUPEREGO: tipnul bych root slozku (kde je nahrany web) - tam bude problem s pravy na ni
    SUPEREGO
    SUPEREGO --- ---
    CITRONAK: nepomohlo, problém bude asi s právama. Která práva ale myslíš? htaccess má defaultní práva 644
    CITRONAK
    CITRONAK --- ---
    SUPEREGO: nech ten .htaccess vytvorit wordpressem. Smaz stavajici, jdi do trvalych odkazu v adminu, nastav to tak, jak potrebujes a mel by se ti vytvorit sam. Pokud ne - bude dole chyba a bude tam vypsany spravny htaccess - takze to pak jen zkopiruj a vytvor pripadne rucne.

    Pokud se ti nevytvori automaticky, tak je to problem s pravy.
    SUPEREGO
    SUPEREGO --- ---
    já nemám motýly, ale taky řeším problém s permalinky – přepnutí na jiné varianty mi nefunguje. upravil jsem .htaccess podle wordpress codexu. přepnul jsem na hezké permalinky – nefunguje. přepnul jsem na default – funguje. otevřu htaccess – a je prázdný, třebaže jsem ho před chvílí upravoval.

    napadá vás, co se s tím dá dělat?
    CRS1138
    CRS1138 --- ---
    CRS1138: WP by si mel vytvorit Rewrite pravidla kdyz zmenis permalinky v back-endu
    CRS1138
    CRS1138 --- ---
    HADIAK: tak zalohu mas, takze by to nemel byt problem
    CRS1138
    CRS1138 --- ---
    Co ten wp_register_script? Jako mohl bych dat wp_enqueue_script do <head></head>, ale ja bych to radeji dal functions.php, abych si tu hlavicku dale nezasiral.
    HADIAK
    HADIAK --- ---
    CRS1138: najnovsiu :) asi skusim.
    CRS1138
    CRS1138 --- ---
    HADIAK: :) co mas za verzi? Ja teda nejsem zadnej expert pres regularni vyrazy a mod_rewrite... Ale mozna bys mohl zkusit, smazat vse v .htaccessu a nechat WP si to jeho obsah vytvorit znova.
    HADIAK
    HADIAK --- ---
    CRS1138: tak s tym sa nedostanem ani na wp-admin :) ale posty (motyle) funguje.. ehm.
    HADIAK
    HADIAK --- ---
    CRS1138: mam pocit, ze mi to pred X rokmi spravil sam WP :)
    CRS1138
    CRS1138 --- ---
    CRS1138: zazalohuj si to a zkus to s tim, co jsem postnul
    CRS1138
    CRS1138 --- ---
    A to sis psal sam, nebo ti to vytvoril nejaky plugin?

    Using Permalinks « WordPress Codex
    http://codex.wordpress.org/Using_Permalinks#Creating_and_editing_.28.htaccess.29

    The following permalink rewrite code should be included in your .htaccess file (since WordPress 3.0):
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress
    HADIAK
    HADIAK --- ---
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]

    # uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]

    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L]
    RewriteRule ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]


    ErrorDocument 404 /index.php
    CRS1138
    CRS1138 --- ---
    HADIAK: co mas v .htaccess?
    Kliknutím sem můžete změnit nastavení reklam