henning glatter-götz

PHP: The Right Way

Today I discovered an interesting new project called “PHP: The Right Way”. It is an open source project maintained by Josh Lockhart attempting to provide a well rounded set of best practices for developing in PHP.

While I have not yet attempted to contribute any content I have added the banner to my personal blog to show my support. If you are interested it adding a “PHP: The Right Way” banner to the side bar of your Octopress blog, here is how. Allthough, if you are using octopress you probably don’t need help with this ;-).

Following is the html for the aside. The 240x400 image size works well for the sidebar width that I have. This is easy to change.

/source/includes/custom/asides/php_the_right_way.html
1
2
3
4
5
6
7
{% if site.php_the_right_way_show %}
<section>
  <a href="http://www.phptherightway.com">
    <img class="center" src="http://www.phptherightway.com/images/banners/vert-rect-240x400.png" alt="PHP: The Right Way"/>
  </a>
</section>
{% endif %}

In /_config.yml add the aside to the list of default_asides in the location you want it to show up in. Mine is at the end.

/_config.yml
1
default_asides: [custom/asides/about.html, asides/recent_posts.html, asides/twitter.html, asides/github.html, custom/asides/php_the_right_way.html]

In the configuration file add the following to the very end.

/_config.yml
1
2
# PHP The Right Way Banner image
php_the_right_way_show: true

That’s it!

Comments