Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • lenzenmi

    (@lenzenmi)

    Had the same problem. My FTP credentials did nothing, even though they allow me to install plugins and modify settings elsewhere in wordpress. Ended up having to do:

    chmod -R o+w wp-content/w3tc-config

    Then it worked

    P.S. I also had to manually copy the new versions of db.php, object-cache.php, advanced-cache.php.

    Finally I had to create the following directories under wp-content and make them writeable.

    cache/
    cache/config
    cache/tmp

    Thread Starter lenzenmi

    (@lenzenmi)

    Missed saving the option for manage-images. This patch will fix it after the above patch has been applied

    # This patch file was generated by NetBeans IDE
    # It uses platform neutral UTF-8 encoding and \n newlines.
    --- 1.1
    +++ 1.2
    @@ -215,6 +215,7 @@
     			$ngg->options['thumbwidth']  = (int)  $_POST['thumbwidth'];
     			$ngg->options['thumbheight'] = (int)  $_POST['thumbheight'];
     			$ngg->options['thumbfix']    = (bool) $_POST['thumbfix'];
    +                        $ngg->options['vcropalign']    = (string) $_POST['vcropalign'];
    \ No newline at end of file
     			// What is in the case the user has no if cap 'NextGEN Change options' ? Check feedback
     			update_option('ngg_options', $ngg->options);
    Thread Starter lenzenmi

    (@lenzenmi)

    I added the easy top, middle, bottom functionality with these patches. Please feel free to include them in future releases, or modify them to your hearts desire.

    diff -ur orig/nextgen-gallery/admin/functions.php nextgen-gallery/admin/functions.php
    --- orig/nextgen-gallery/admin/functions.php	2011-08-15 13:37:31.000000000 -0600
    +++ nextgen-gallery/admin/functions.php	2011-10-16 11:03:54.643408787 -0600
    @@ -286,7 +286,23 @@
     					// first resize to the wanted width
    
     					$thumb->resize($ngg->options['thumbwidth'], 0);
    
     					// get optimal y startpos
    
    -					$ypos = ($thumb->currentDimensions['height'] - $ngg->options['thumbheight']) / 2;
    
    +					//$ypos = get_Ypos($ngg->options['vcropalign']);
    
    +                                        switch ($ngg->options['vcropalign']) {
    
    +                                            case "middle":
    
    +                                                $ypos = ($thumb->currentDimensions['height'] - $ngg->options['thumbheight']) / 2;
    
    +                                                break;
    
    +
    
    +                                            case "top":
    
    +                                                $ypos = 0;
    
    +                                                break;
    
    +
    
    +                                            case "bottom":
    
    +                                                $ypos = ($thumb->currentDimensions['height'] - $ngg->options['thumbheight']);
    
    +                                                break;
    
    +
    
    +                                            default: //middle
    
    +                                                $ypos = ($thumb->currentDimensions['height'] - $ngg->options['thumbheight']) / 2;
    
    +                                        }
    
     					$thumb->crop(0, $ypos, $ngg->options['thumbwidth'],$ngg->options['thumbheight']);	
    
     				} else {
    
     					// first resize to the wanted height
    
    @@ -1457,7 +1473,7 @@
    
     	        return $message; 
    
     	}
    
    -
    
    +     
    
     } // END class nggAdmin
    
     /**
    
    diff -ur orig/nextgen-gallery/admin/manage-galleries.php nextgen-gallery/admin/manage-galleries.php
    --- orig/nextgen-gallery/admin/manage-galleries.php	2011-08-15 13:37:31.000000000 -0600
    +++ nextgen-gallery/admin/manage-galleries.php	2011-10-16 09:47:29.883202949 -0600
    @@ -342,6 +342,16 @@
     				<td><input type="checkbox" name="thumbfix" value="1" <?php checked('1', $ngg->options['thumbfix']); ?> />
    
     				<br /><small><?php _e('Ignore the aspect ratio, no portrait thumbnails','nggallery') ?></small></td>
    
     			</tr>
    
    +                        <tr valign="top">
    
    +                                <th align="left">Vertical Crop Alignment</th>
    
    +                                <td><select name="vcropalign">
    
    +                                    <option value="top"<?php selected( $ngg->options['vcropalign'], 'top' ); ?>>Top</option>
    
    +                                    <option value="middle"<?php selected( $ngg->options['vcropalign'], 'middle' ); ?>>Middle</option>
    
    +                                    <option value="bottom"<?php selected( $ngg->options['vcropalign'], 'bottom' ); ?>>Bottom</option>
    
    +                                </select>
    
    +                                <br /><small>Only matters if Set Fix Dimension is selected</small>
    
    +                               </td>
    
    +                        </tr>
    
     		  	<tr align="right">
    
     		    	<td colspan="2" class="submit">
    
     		    		<input class="button-primary" type="submit" name="TB_NewThumbnail" value="<?php _e('OK', 'nggallery');?>" />
    
    diff -ur orig/nextgen-gallery/admin/manage-images.php nextgen-gallery/admin/manage-images.php
    --- orig/nextgen-gallery/admin/manage-images.php	2011-08-15 13:37:31.000000000 -0600
    +++ nextgen-gallery/admin/manage-images.php	2011-10-16 09:47:29.873202952 -0600
    @@ -622,6 +622,16 @@
     				<td><input type="checkbox" name="thumbfix" value="1" <?php checked('1', $ngg->options['thumbfix']); ?> />
    
     				<br /><small><?php _e('Ignore the aspect ratio, no portrait thumbnails','nggallery') ?></small></td>
    
     			</tr>
    
    +                        <tr valign="top">
    
    +                                <th align="left">Vertical Crop Alignment</th>
    
    +                                <td><select name="vcropalign">
    
    +                                    <option value="top"<?php selected( $ngg->options['vcropalign'], 'top' ); ?>>Top</option>
    
    +                                    <option value="middle"<?php selected( $ngg->options['vcropalign'], 'middle' ); ?>>Middle</option>
    
    +                                    <option value="bottom"<?php selected( $ngg->options['vcropalign'], 'bottom' ); ?>>Bottom</option>
    
    +                                </select>
    
    +                                <br /><small>Only matters if Set Fix Dimension is selected</small>
    
    +                               </td>
    
    +                        </tr>
    
     		  	<tr align="right">
    
     		    	<td colspan="2" class="submit">
    
     		    		<input class="button-primary" type="submit" name="TB_NewThumbnail" value="<?php _e('OK', 'nggallery');?>" />
    
    diff -ur orig/nextgen-gallery/admin/manage.php nextgen-gallery/admin/manage.php
    --- orig/nextgen-gallery/admin/manage.php	2011-08-15 13:37:31.000000000 -0600
    +++ nextgen-gallery/admin/manage.php	2011-10-16 09:47:29.863202949 -0600
    @@ -215,6 +215,7 @@
     			$ngg->options['thumbwidth']  = (int)  $_POST['thumbwidth'];
    
     			$ngg->options['thumbheight'] = (int)  $_POST['thumbheight'];
    
     			$ngg->options['thumbfix']    = (bool) $_POST['thumbfix']; 
    
    +                        $ngg->options['vcropalign']    = (string) $_POST['vcropalign'];
    
     			// What is in the case the user has no if cap 'NextGEN Change options' ? Check feedback
    
     			update_option('ngg_options', $ngg->options);

    I also have this problem.

    WordPress 3.1.3
    NextGEN 1.8.1

Viewing 4 replies - 1 through 4 (of 4 total)