Category Archives: Web Development

“gform_load_form_settings” is deprecated on this page since version 1.7

Recently after upgrading GravityForms I started seeing the message: > Gravity Forms API warning: The jQuery event “gform_load_form_settings” is deprecated on this page since version 1.7 The following are Form Settings related hooks that have been deprecated: gform_properties_settings: You should now use gform_form_settings. gform_advanced_settings: You should now use gform_form_settings. gform_confirmation_settings: You should now use gform_confirmation_ui_settings. gform_load_form_settings JS: This jQuery hook has been deprecated when used on the Form Editor as Form Settings are no longer located there. If you rely on this hook on the Form Editor you should use the gform_load_field_settings jQuery hook instead. When using this hook on the Form Settings page, the hook is still valid. gform_before_update JS: You should now use thegform_pre_form_settings_save hook to handle updates on the new Form Settings page or gform_pre_form_editor_save jQuery hook to handle updates on the Form Editor page. For more deprecated functions check out the dev notes.

Posted in Tech Tips, Web Development | Tagged | Leave a comment

Webmaster Tools: New and Improved Navigation

As of July 2013 Google Webmaster tools has a “new and improved” navigation. They alert you when you login. A new and improved navigation! Features are now organized according to the stages of search: crawling, indexing, and serving. The settings have moved to the gear icon in the top right corner. Click the help icon to open the new Search Appearance section and learn what changes you can make on your site to influence how it appears in the search results. One of the main features is “Search Appearance” which has information about the data highlighter, rich snippets, and microformats. More info about those at https://support.google.com/webmasters/answer/3187759

Posted in Tech Tips, Web Development | Tagged , | Leave a comment

Change WooCommerce Shop Column Count

There is no administrative option to change the column count in WooCommerce, but you can easily accomplish it by adding the following PHP code into your theme’s functions.php file: class ThemeFilters { function __construct() { add_filter(‘loop_shop_columns’,array($this,’loop_shop_columns’)); } function loop_shop_columns($cols) { return 3; } } new ThemeFilters(); In this demonstration the columns are set to 3 but you can change it to 2 columns, 2 columns, or any number of columsn you desire. Change the return value return 3 above to meet you needs.

Posted in Tech Tips, Web Development | Leave a comment

GoDaddy’s DNS Servers Down Again (June 2013)

On June 23rd 2013 Godaddy’s DNS Servers went down, again. Problems first started at approximately 11:00am EST and, fortunately, started resolving at 11:31am EST. Was it planned? If so, something didn’t go correctly – and it wasn’t communicated. Even during the outage they were still running ads to be a DNS provider, with their uptime guarantee. Just ridiculous. The last time they had issues was on November 27th 2012, about 9 months ago. They have an uptime guarantee – but what does that mean? Not much, apparently.

Posted in Tech Opinion, Web Development | Tagged , | Leave a comment

What is ming for PHP (php5-ming) ?

Reading a recent server setup guide I saw the suggestion to use apt-get install php5-ming to install Ming – as a (suggested) module that WordPress would like to have. so what is MING ? First of all: Ming is not an acronym. Ming is an open-source (LGPL) library which allows you to create SWF (“Flash”) format movies. Ming supports almost all of Flash 4’s features, including: shapes, gradients, bitmaps (pngs and jpegs), morphs (“shape tweens”), text, buttons, actions, sprites (“movie clips”), streaming mp3, and color transforms –the only thing that’s missing is sound events. Note that all values specifying length, distance, size, etc. are in “twips”, twenty units per pixel. That’s pretty much arbitrary, though, since the player scales the movie to whatever pixel size is specified in the embed/object tag, or the entire frame if not embedded. More information about ming is available in the PHP documentation

Posted in Web Development | Tagged , | Leave a comment

Install Slanger on Ubuntu 12

Slanger is an open source server implementation of the Pusher protocol written in Ruby. I wanted to install it on Ubuntu 12 but hit a few snags, so here’s how I got it working. First, it seems pretty imperative that you have a good ruby version manager (rvm) tool available. On Mac OS X I use rbenv but on Ubuntu I think the best one is the one from https://get.rvm.io and not the one from apt-get. So if you have installed the one from apt-get then it is probably best to remove it. Disclaimer – back up important files, blah bla blah, you should have some knowledge of linux, bla bla bla, I don’t know what you might accidentally delete while doing this. Be careful. To remove the old rvm: sudo apt-get –purge remove ruby-rvm sudo rm -rf /usr/share/ruby-rvm /etc/rvmrc /etc/profile.d/rvm.sh Then logout of the shell and/or reboot and run: env | grep rvm It should be blank, but if not try and find where the settings are coming from. I changed to the /etc/ directory and ran grep -Hil rvm and found that it was in the bash.profile there so i removed the environmental variables being set there, then logged out of my shell and logged in again. Once that is removed, you need to install the new version of rvm and from the website get.rvm.io the instructions say run this: \curl -L https://get.rvm.io | bash -s stable –ruby –autolibs=enable –auto-dotfiles That worked great, I think it installed ruby … Continue reading

Posted in Tech Tips, Web Development | Tagged , , , , | Leave a comment

PHP: Convert Ascii To Hex

When working in PHP there are times when I want to see what a string is in HEX – a lot of times there are invisible characters that or non-printing strings that can throw your program or script for a loop. If you save the string to a text file, you can use a hex editor utility, like hexdump to take a look at the hex codes of the ASCII characters: $ echo abcd > test.txt $ hexdump test.txt 0000000 61 62 63 64 0a 0000005 $ Now for the PHP version: header(‘Content-type: text/plain; charset=utf-8’); $ascii = ‘abcd’; $hex = unpack(‘H*’,$ascii); // you can print out the hex result of the ascii conversion: print_r($hex); # Array # ( # [1] => 61626364 # ) // or for a nicer display you can add spaces between every two characters // and wrap the column every 6 characters (change to fit your needs) echo wordwrap(implode(‘ ‘, str_split($hex[1], 2)), 6); # 61 62 # 63 64

Posted in Tech Tips, Web Development | Tagged , , | Leave a comment

Installing php apc with homebrew

I’ve been enjoying using the keg homebrew-php by josegonzalez in order to run the latest versions of PHP, like PHP 5.4 on Mac running OS X 10.8 Snow Leopard. I also like to use Ubuntu on some cloud web servers and have been noticing a huge improvement in performance when the php module apc is installed / enabled. Recently I learned that I can get this same performance boost on in my development environment on my mac by using apc here too. Just install it with homebrew: brew install php54-apc The module will be installed and enabled, and on my system it created a new config file called ext-apc.ini in the directory /usr/local/etc/php/5.4/conf.d and it has some great defaults: [apc] extension=”/usr/local/Cellar/php54-apc/3.1.10/apc.so” apc.enabled=1 apc.shm_segments=1 apc.shm_size=64M apc.ttl=7200 apc.user_ttl=7200 apc.num_files_hint=1024 apc.mmap_file_mask=/tmp/apc.XXXXXX apc.enable_cli=0 One key here is that apc.shm_size needs to be set, and that it also needs to have the suffix M or I guess you could use K if you wanted a really small shm_size but honestly 64M works pretty great.

Posted in Mac, Web Development | Tagged , | Leave a comment

PHP rjust

Python has a neat feature that does right alignment of strings with the syntax: string.rjust(padding,fill_char) The method rjust() returns the string right justified in a string of length width. Padding is done using the specified fillchar (default is a space). The original string is returned if width is less than len(s). Below you can find how to do it in PHP php rjust function // by techblog.willshouse.com function rjust($string,$total_length,$fillchar=’ ‘) { // if the string is longer than the total length allowed just return it if(strlen($string) >= $total_length) { return $string; } $total_length = intval($total_length); // total_length must be a number greater than 0 if( ! $total_length ) { return $string; } // the $fillchar can’t be empty if(!strlen($fillchar)) { return $string; } // make the fill character into padding while(strlen($fillchar) < $total_length) { $fillchar = $fillchar.$fillchar; } return substr($fillchar.$string, ( -1 * $total_length )); } test php rjust function header(‘Content-type: text/plain’); $items = array(‘one’,’a’,’superduper’); foreach($items as $item) { echo rjust($item,15); echo “\n”; } php rjust function output one a superduper

Posted in Tech Tips, Web Development | Tagged | 1 Comment

How to insert a photo from Media Gallery into WordPress

Problem: I am trying to make a post. I have a loaded in our Media Gallery but when I go to the post and try to put in the post I can’t get to it. Solution: try clicking on the left hand column that says gallery / all images Visual Example: Steps: Click Add Media Choose Insert Media Choose Media Library Click on the photo, image, picture you want to insert Click “Insert Into Post”

Posted in Tech Tips, Web Development | Tagged , | Leave a comment