Designing Your First Website

Our friends at ASG Press has published an excellent guide with 3 practical ways to get your first website designed.

BWP External Links: Redirect-To Warning Page

BWP External Links gives you total control over external links on your website. This plugin also comes with a comprehensive domain filtering feature. One of the features allows you to redirect external links here is how you can create your own redirection page to warn and forward your readers to a third party website.

BWP External Links: Redirect-To Warning Page in 2 steps

1. Create your Warning Page

Creating the Redirect-To warning page involves creating a standard WordPress Page and inserting a JQuery function to get the location parameter from the URL and forward the browser to that location.

Here is the code snippet to insert into the page. Make sure you’re in HTML mode.

<script type="text/javascript" language="javascript">// <![CDATA[

function getQueryVariable(variable)
{
       var query = window.location.search.substring(1);
       var vars = query.split("&#038;");
       for (var i=0;i<vars.length;i++) {
               var pair = vars[i].split("=");
               if(pair[0] == variable){return pair[1];}
       }
       return(false);
}
var temp = 'location.href="' + getQueryVariable('url') + '"';
setTimeout(temp,5000);  // Change time by changing 5000.  1000 = 1 second
// ]]></script>

You will be redirected to<script type="text/javascript">// <![CDATA[
document.write(getQueryVariable('url'))
// ]]></script>in 5 seconds.

You can change the time to redirect and the text ‘You will be redirected to … in 5 seconds.’

2. Configure BWP External Links to link to your redirection page

Jigoshop Hook Tutorial: Customizing your Jigoshop price layout

I am just getting into php, but it would be nice if you could show a little bit of the architecture of headway as it applies to hooks from jigoshop. Specifically I would like to have an easy way to change the div content structure of the products/prices of jigoshop to something I can globally (within a child theme of headway) apply css to.

- Richspo – July 29, 2012

Here you go Rich =)

Jigoshop Price Layout Introduction

The jigoshop price is created by the function jigoshop_template_single_price which is found in jigoshop_template_functions.php. Here is the code snippet for that function.

<?php
function jigoshop_template_single_price( $post, $_product ) {
?>
     <p class="price"><?php echo $_product->get_price_html(); ?></p>
<?php
}
?>

Changing your Jigoshop Price Layout

1) Go into your functions.php and create your own price layout.

<?php
function my_price_function( $post, $_product ) {
?>
     <p class="my_price"><?php echo $_product->get_price_html(); ?></p>
<?php
}
?>

2) Then you will then remove the jigoshop price layout and hook your own into the Jigoshop template.

remove_action( 'jigoshop_template_single_summary', 'jigoshop_template_single_price', 10);
add_action('jigoshop_template_single_summary', 'my_price_function', 10,2);

Now if you reload the page, you should see your own css class in the product page instead of the default Jigoshop one.

Custom Templates using Headway Connect and Jigoshop

One of the things we found when we shifted to the Headway Connect plugin is that it turns off the Jigoshop template loader. While this makes it simple to customize to insert Jigoshop into your headway grid, it makes it more difficult to customize the layout of the content.

There are 3 general steps to being able to do this:

  1. Create a Headway Child Theme (how to create a headway child theme)
  2. Insert the Jigoshop block into your Headway Grid via Headway Connect
  3. Customize your Jigoshop template with Jigoshop hooks (how to customize Jigoshop with hooks)

This can be a lot to take in, if you have questions on how to make it work, leave us a comment and we’ll respond as soon as we can.

Post by +Darryl Jung

Jigoshop and Headway Themes checkout frozen, waiting indicator keeps spinning.

Recently our Jigoshop checkout page stopped working. When our customers would try to complete the checkout process they would get a waiting indicator that would force them to wait forever to checkout.

Our system had the following software versions

  • Jigoshop 1.2.3
  • WordPress 3.4.1
  • PHP 5.3.10
  • Headway Themes 3.2

After a long conversation with Jigoshop support we investigated this problem ourselves. It turns out that the ajax admin handler that processes checkout requests for Jigoshop calls ob_clean() before returning a response. We found out that the call to ob_clean() was causing php to hang indefinitely. As a result request made to the jigoshop checkout ajax handler were not being returned. For some reason this error was not being reported in the php.log file.

Further investigation revealed that source of the issue was the fact that Headway Themes was initializing the output buffer using a call to ob_start with ‘ob_gzhandler’, passed as a parameter. Unfortunately our php was not configured to use zlib library for output compression, which is what this call specifies. Output compression is controlled using the zlib.output_compression setting in the php.in file. To enable output compression we would have to set zlib.output_compression=On, the default is Off. In our installation we are not able to control the php.ini file, fortunately we are able to override this Headway Themes setting using the headway_gzip filter. We added the following code to the functions.php file for our headway child theme.

// functions.php
function atlas_noBuffer() {
return false;
}
add_filter(‘headway_gzip’,'atlas_noBuffer’);

This seamlessly resolved the issue for us.

Resources:

One little second

An interesting article here. About why some websites experienced some issues over the weekend.

Element State Debugging

David does a great job explaining how to debug element states in his article here.

How to blow $6 billion on a tech project

From Ars How to blow $6 billion on a tech project.  This articles makes me wonder how we’re spending our money as a country.

More importantly, however, this article highlights some bad practices when it comes to managing technology projects.

  • Poor understanding of the problem at hand

    In hindsight, the military badly underestimated the challenges before it.

  • Scope creep

    To be specific, the problem is rooted in the way project leaders defined “better” over a decade and a half. They seemed to mistake it for a synonym of “more.”

It also highlights some key strategies of successful projects.

  • Regular Incremental Progress

    If JTRS had focused on rapid releases and taken a more modular approach, and tested and deployed early, the Army could have had at least 80 percent of what it wanted out of GMR today

  • Keep it simple

    JTRS aimed not at an incremental goal, but at “delivering everything at once. That was a recipe for disaster.”

  • Get people using it

    In the end, what really killed GMR—and what threatens all the other JTRS programs—was a failure to ship.

At Atlas our secrets to success lie in these key areas: Regular Incremental Progress; this idea goes by many different names in program management circles, but the core concept is the same. Take measurable steps towards the end goal at regular intervals. If we cannot do this we know something is wrong and must be fixed be for we attempt to continue. Keeping it simple; making sure we focus on the important things rather than getting lost in trying to deliver the kitchen sink. Get people using it; we want to get our systems into users hands as early as possible. We would rather have solid core features accessible to the user so that we can get feedback and make improvements rather than wait and attempt to deliver every possible feature all at once.

How rm -r -f * deleted Woody, Buzz and Rex forever and backups failed to save the day.

“The show’s been trashed”

In 1998, after two months and hundreds of man-hours worth of work Toy Story 2 was being deleted from Pixar’s company servers because an employee keyed in a bad command by mistake.   Woody, Potato Head and Rex were lost forever and the only character left in the movie was Hamm.  

The Backup Plan

In the IT world when data gets corrupted or lost the first reflex is to restore from backups.  Which Pixar obviously did.  Unfortunately though at the time Pixar was not testing their backups and so while new data was being stored to their tapes, old data was being pushed out.   This meant that though parts of the Toy Story 2 movie were able to be recovered, other parts of the movie were missing.  Which parts of the movie thug where unknown.  Since the restore was unreliable, there was zero confidence in the data because “the restoral is bad, the work on it is bad, the deletion was horrible, and the backup tapes are busted.”

With an extreme amount of luck, Pixar was able to locate an offsite backup that was sitting in an employees house.  It had enough of the data from which to rebuild the movie with and Toy Story 2 was able to be shipped on time.   Watch the video below for the play by play on how Toy Story 2 was saved.  

Moral of the Story:

  • Back up your data
  • Test your backups
Question:
  • Who is responsible for your backups?  
  • Are they as paranoid about securing your business as you are?  

Repost from The Next Web

Git Ignore Templates

One of the beauties of using git is the ability to share useful code. Ironically one bit of useful code is the .gitignore file.  For those just getting started with git this is a file that allows you to ignore specific files or directories when committing code into your repository.  If you’ve had the opportunity to write code in multiple languages or on multiple platforms you know that each platform, framework, and or language has different files that need to be ignored.

Github has a useful repository of ignore file templates located here.  These templates will help get you started with a new project.