Category Archives: Solutions

Disable WP E-Commerce scripts and stylesheets

This comes straight outta the getShopped forums: http://getshopped.org/forums/topic/disable-all-wpsc-javascript-and-css-files-3/ via cannobbio. To disable all scripts and stylesheets, add this code to the functions.php file in your theme folder: // Remove Styles function childtheme_deregister_styles() { wp_deregister_style( ‘wpsc-theme-css’ ); wp_deregister_style( ‘wpsc-theme-css-compatibility’ ); wp_deregister_style( ‘wpsc-product-rater’ ); wp_deregister_style( ‘wp-e-commerce-dynamic’); wp_deregister_style( ‘wpsc-thickbox’ ); wp_deregister_style( ‘wpsc-gold-cart’ ); } add_action( ‘wp_print_styles’, ‘childtheme_deregister_styles’, 100 [...]

Posted in Solutions | Tagged , , , | 3 Comments

WP E-Commerce 3.8 and Thematic = no sidebars!

I just upgraded a client from WP E-Commerce 3.7 to 3.8 and all my sidebars disappeared! This is how I fixed it: Background info The freshest software First of all, I’m using a child theme of Thematic (version 0.9.7.7) and the latest versions of WP E-Commerce (3.8.6) and WordPress (3.2.1). I just downloaded everything today [...]

Posted in Solutions | Tagged , , , | 2 Comments

A fix for WP e-Commerce error: “The following directories are not writable”

If you get this error: The following directories are not writable: * /var/www/mysite/wp-content/uploads/wpsc/downloadables/ * /var/www/mysite/wp-content/uploads/wpsc/previews/ * /var/www/mysite/wp-content/uploads/wpsc/product_images/ * /var/www/mysite/wp-content/uploads/wpsc/product_images/thumbnails/ * /var/www/mysite/wp-content/uploads/wpsc/category_images/ * /var/www/mysite/wp-content/uploads/wpsc/upgrades/ You won’t be able to upload any images or files here. You will need to change the permissions on these directories to make them writable. When you click on “Products” in WP [...]

Posted in Solutions | Tagged , | 4 Comments

Use Image Magick to batch convert .png files to .gif

I just checked, and W3Counter puts global Internet Explorer 6 usage at just 5.78%. This is a pretty good argument for not supporting it anymore with my websites, but I still do it. Maybe its just habit, or maybe its because I’ve become really fast at dealing with IE6 and its many deficiencies so its [...]

Posted in Solutions | Tagged | Leave a comment

Esoteric PHP Knowledge

I’m writing a WordPress plugin right now and I keep running into all these crazy PHP-specific operators and such that don’t seem to be in the manual. Or at least I can’t find them. I’ll make a little collection here. Q and A Q: What does the ampersand (‘&’) do when it precedes a variable? [...]

Posted in Solutions | Tagged | Leave a comment

Imagemagick: use montage to proof images

The following command will create an image called montage.png that is a collection of all the .png files in the current directory. Images larger than 150px on a side will be resized, but aspect ratio is preserved. The images are separated by a 2px offset. $ montage *.png -geometry 150×150\>+2+2 montage.png

Posted in Solutions | Tagged | Leave a comment

Image Magick: Resize a batch of images so they all come out square, and preserve filenames

The following command will shrink all .jpg’s in the current directory that are larger than 500px and center them on a square 500x500px canvas. Since the aspect ratio of the original images will be preserved and not all of the originals are square, the left over space will be filled with an off-white color. All [...]

Posted in Solutions | Tagged | Leave a comment

Image Magick: Resize a batch of images and preserve the original file names

The following command will resize any and all .jpg’s in the current directory that are larger than 500px on either side and put them in a file called ‘resized’. Aspect ratios will be respected, and the same filenames will be used for the modified images. mogrify -path resized -resize 500>x500\> *.jpg Yes, you have to [...]

Posted in Solutions | Tagged | Leave a comment

Use source to import large .sql files

Its true, don’t waste your time with strange scripts and such if you’re trying to upload an .sql file that exceeds the limit. Just give up and use source. Note: don’t be confused that I don’t capitalise my MySQL commands. Its my silent protest against standard MySQL syntax: I think capitalising commands you have to [...]

Posted in Solutions | Tagged | Leave a comment

The better way to install LAMP on Ubuntu Karmic 9.10

All this comes from here: https://help.ubuntu.com/community/ApacheMySQLPHP In the teminal: $ sudo tasksel install lamp-server $ sudo apt-get install phpmyadmin $ sudo gedit /etc/apache2/apache2.conf Add the following to the end of this file:  “Include /etc/phpmyadmin/apache.conf” Edit the /etc/php5/apache2/php.ini file and increase the memory_limit value. I used 64M, but that may be overkill.

Also posted in Apache, Linux, Ubuntu | Tagged , | Leave a comment