Updating Gravity Forms “Advanced Fields” Sub-labels From English to Spanish

I’m working on a project, converting a WordPress website from English into Spanish. Part of the Spanish translation includes updating the “Advanced Field” sub labels to Spanish.

English Sub Labels

English sub-labels used by Advanced Fields

This is actually pretty easy to do.  Tat tip Carl Hancock for showing me how.

You can find documentation for ALL of the available sub-label filters here:

Step 1: Find “First Name” gform_name_first

Step 2: Open your functions.php file and add the following code


add_filter("gform_name_first", "change_name_first", 10, 2);
function change_name_first($label, $form_id){
return "Nombre";
}

Note: the only thing we changed was “Name” to “Nombre” on line 3

Repeat steps 1 & 2 for gform_name_last.

Spanish sub-labels used by Advanced Fields

Spanish sub-labels used by Advanced Fields

 

The full code for both sub labels is

// GRAVITY FORMS FUNCTIONS

add_filter(“gform_name_first”, “change_name_first”, 10, 2);
function change_name_first($label, $form_id){
return “Nombre”;
}

add_filter(“gform_name_last”, “change_name_last”, 10, 2);
function change_name_last($label, $form_id){
return “Apellidos”;
}

If you do not have Gravity forms, you can purchase a copy here.

Auto Eco Rating

Auto Eco Rating

ABOUT  AutoEcoRating

The AutoEcoRating blog is home to a new green car rating system by John DeCicco, a pioneer in developing environmental rating methods for cars and light trucks. The eRating tallies up the environmental impacts of a product from “cradle to grave,” meaning from the extraction and production of the materials and fuels used in the car to their final end use and disposal.

View site: http://autoecorating.com/

ABOUT THE PROJECT

AutoEcoRating is a client of 3.7 DESIGNS. The WPZoom WordPress theme was customized by Ross Johnson. My role included Project Management, content integration and testing.

Productions Services Management Inc

PSMI

About  PSMI

PSMI was founded in 2005 with the sole objective of increasing operational effectiveness by reducing tooling and MRO spending.

View site: http://www.psmicorp.com/

About the Project

PSMI is a client of 3.7 DESIGNS. The custom WordPress theme was designed by Lyndsay Dusek and Theme Development was completed by Ross Johnson. My role included Project Management and content integration and testing.

Setup 404 Page Tracking on your Shopify eCommerce Website.

Generate your 404 page Tracking Code

I used http://gaconfig.com/404-tracking/to generate the tracking code. I’ve also added the code below. You’ll need to add your own Google Analytics Tracking ID. Replace “UA-XXXXX-X” with your tracking ID. You can get your Google Tracking ID by going to Google Analytics > Admin > Tracking Code.
<script type="text/javascript">// <![CDATA[
// 

// 

  var _gaq = _gaq || [];
 _gaq.push(['_setAccount', 'UA-XXXXX-X']);
  _gaq.push(['_trackPageview', '/404.php?page=' + document.location.pathname + document.location.search + '&#038;from=' + document.<span class="hiddenSpellError" pre=""---->referrer]);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
// ]]></script>

Create New Snippet in Shopify

In your shop admin, go to Theme  > Template Editor > Snippets and create a new snippet. I named my snippet “404-page-tracking.liquid” you can call yours whatever makes most sense to you.
404-page-tracking-liquid
This code sends a virtual pageview of “/404.php?page=[pagename.php?queryparameter]&from=[referrer]” to your account, where [pagename.php?queryparameters] is the missing page name and referrer is the page URL from where the user reached the 404 page. (Hat Tip)

Add Conditional code to Theme.liquid

In order for the the 404 tracking code to work, it must only be added to your 404 page — open “theme.liquid” and add the following code:
404-page-tracking-theme-liquid
{% if template contains "404" %}
{% include '404-page-tracking' %}
{% endif %}

Note: change “404-page-tracking” to whatever you named your Snippet file.

Reports

Look for 404.php in your Google Analytics Top Content report (old version) or Content > Site Content > Pages (new version)

Further Reading

How do I track error pages so they show up in my reports?

Create & Manage Your Own Website Using WordPress

A TWO-DAY DIY WORDPRESS WORKSHOP & MINI CONFERENCE

Join a team of seasoned WordPress experts as they guide you through a 2-day hands-on workshop where you will leave with a WordPress website you built yourself.

Register Here

If you’ve ever wanted to create and manage a website you built yourself, now is your chance. A typical custom WordPress site (or any website) could cost upwards of $1,000. WordPress is an Open Source project, which means there are thousands of people all over the world supporting and improving it (more than any commercial platform). It also means you’re free to use it for anything you can think of (or create).

  • Thursday, April 5, 2012 10AM-4PM
  • Friday, April 6, 2012 12PM-4PM

@Webers Inn, 3050 Jackson Ave., Ann Arbor MI 48103

Registration fee includes:

  • 10 hours of WordPress coaching, tutorials and camaraderie
  • The WordPress DIY Workbook with notes documenting the process for future use
  • Unlimited supply of caffeine
  • The opportunity to network with like-minded individuals
  • The ability to say “I’ve created my own website”

The WordPress workshop is being run by Meadow Fête Media.

DNS Instructions for Pointing your Bluehost Domain to Shopify

I just launched my first Shopify e-commerce store: http://www.getagripwatersports.com/. But before I could officially launch, I needed to change the DNS settings so they pointed to the Shopify sub domain.

You can read the official instructions here http://wiki.shopify.com/DNS#CNAME_Status. I found them a bit difficult to follow (I like visual aids) so I called Bluehost support and they walked me through the very easy process.

    1. DNS Zone Editor:

      Log into your Bluehost cPanel enter your user name and password. Under domains, click the “DNS Zone Editor” icon.
      DNS Zone Editor

    2. Select a Domain

      In the “Select a Domain” area, choose the domain you want to update.
      Select a Domain

    3. Edit Your “A” Record

      Scroll down a little to the “Zone File Records” section. Under A (host), you’ll see a table with the following columns: Host Record / Points to / TTL / ACTION. In the row with the “@” sign, click the edit link. Change the  ”A Record” IP address to 204.93.213.45, then click save.

      Zone File Records

    4. CNAME (Alias)

      Scroll down a little more to the “CNAME (Alais)” section, you’ll see a table with the following columns: Host Record / Points to / TTL / ACTION. In the row with “www“, click the edit link under action. Change the  CNAME record to “YourStoreName.myshopify.com” (Replace YourStoreName with the sub domain you have with your store) then click save.

      CNAME (Alias)

    5. MX Records

      Don’t forget to update your MX Records, otherwise your email might not work.

And that’s it, pretty simple really. I recommend both Bluehost and Shopify, they are definitely worth exploring if you are looking for a good solid host or e-commerce platform.

How to Fix Colorbox Breaking your HTTPS

The Solution

Inside the “jquery-colorbox” plugin folder, open the following file “jquery-colorbox.php”

Find the following code around line 43 – 45

if (!defined('JQUERYCOLORBOX_PLUGIN_URL')) {
  // http://www.domain.com/wordpress/wp-content/plugins/jquery-colorbox
  define('JQUERYCOLORBOX_PLUGIN_URL', WP_PLUGIN_URL . '/' . JQUERYCOLORBOX_PLUGIN_NAME);

and replace it with
if (!defined('JQUERYCOLORBOX_PLUGIN_URL')) {
  // http://www.domain.com/wordpress/wp-content/plugins/jquery-colorbox
  define('JQUERYCOLORBOX_PLUGIN_URL', '/wp-content/plugins/' . JQUERYCOLORBOX_PLUGIN_NAME);

Or simply replace WP_PLUGIN_URL with /wp-content/plugins/ on line 45. This will make sure the plugin calls the HTTPS page when your browsing secure pages.

Some Background

A client that I am working with “Native American Heritage Association” thanks to Logic By Design, had asked me to update their WordPress site as well as their out of date plugins.

I first created a backup development environment on my own dev server. Backup Buddy is a great tool to make this process a lot easier. Everything seemed to work fine, or so I thought – that said, I really do need to install a SSL cert for testing eCommerce sites.

I tested the dev environment, I didn’t see any issues so I proceeded to the live site. I deactivated all the plugins – upgraded to version 3.3.1, then started to update the plugins individually.

When I updated Colorbox, I had only tested the popup images. Stupidly, I did not test the donation Shopp ecommerce cart and checkout.

https broken

I noticed that the HTTPS was broken, when I viewed source I could see the color box stylesheet was calling for a non secure file.

<link rel='stylesheet' id='colorbox-theme10-css'  href='http://www.naha-inc.org/wp-content/plugins/jquery-colorbox/themes/theme10/colorbox.css?ver=4.2' type='text/css' media='screen' />

I couldn’t figure it out, but Arbor Web Solutions could, as it turns out it was a pretty simple fix. Here is what Kevin had to say…

In the main plugin file (it’s called “jquery-colorbox.php”), there’s a line where it defines the URL to put in the script tag. It uses a WordPress constant called “WP_PLUGIN_URL”, which is always http:. I just deleted WP_PLUGIN_URL and replaced it with “/wp-content/plugins”, which should work for any site as long as plugins are available at /wp-content/plugins (so it won’t work for, say, a site that’s installed in a subdirectory).

Again a massive thanks to Kevin at arborwebsolutions.com for helping me with this fix.

January 2012 WordPress Ann Arbor Meeting Cancelled

Due to circumstances beyond our control, we’ve had to cancel tonight’s (January 2012) meeting. We had some room scheduling issues with the Workantile (not their fault, they are amazing!) Unfortunately, the space is not available to our group this month. But we will be back on Feb 29, 2012 with a session on blogging. Sorry about the inconvenience, and really sorry about the short cancellation notice.

Cheers, Declan.

P.S if you know someone who was planning on going tonight, do us a favor and let them know we’ve cancelled tonight’s meeting.

How to Remove the WordPress version number

If you view the source code of your WordPress website and you see a line of code that looks like the following

wp version number

You should immediately place the following line of code in your active themes functions.php file.

remove_action('wp_head', 'wp_generator');

By removing the WordPress version number, you make it harder for bad people to do bad things to your website.

Further Reading…

http://digwp.com/2009/07/remove-wordpress-version-number/

What PHP Version am I Running?

Sometimes you need to know what version of PHP your server is running. For example, to run WordPress your host just needs to run PHP version 5.2.4 or greater.

You can easily check what PHP version your server is running by doing the following:

  1. Creating a .php file using the code below
  2. Save the file as “php-version.php”
  3. upload / ftp to the root folder of your server
  4. Open your browser and type www.your-website.com/php-version.php to view the PHP version
  5. Once you have the information you need make sure you delete “php-version.php”


<!DOCTYPE html>
<html>
<head>
<title>PHP Version</title>
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
</head>

<body>
<?php phpinfo() ?>
</body>

</html>