Posts tagged: wordpress

Wordcamp Vancouver 2011

WordCamp: Developers is an one-day technology conference by developers for developers. Held in Vancouver, BC, WordCamp: Developers is slated to take place as part of the Vancouver Open Source Week on May 5, 2011.

The conference will feature 2 tracks, one targeting WordPress UX topics and issues, and the other targeting strictly development issues. The day will also be host to a WordPress Un-Conference where participants are encouraged to pitch talks and join in discussion.

The conference is open to all WordPress Developers and Designers interested in learning about practical, applied WordPress development by industry thought leaders and local WordPress practitioners.

WordCamp:Developers is part of the Vancouver Open Source Week.

We hope to see you there!

http://wordcampdevelopers.com/

http://wordcampdevelopers.com/

Global TV Report Misleads about WordPress and Web Security

Re: “Flashy Website, Cheap Backend”

http://www.globaltvbc.com/video/index.html?releasePID=F2c99hC0V1kc4WrGZu0sZguKx_83_IuT

Editors,
As a web developer experienced with WordPress, I know you have made errors in your understanding of the software. If the mayor has really broken some law with regards to the bidding process, then that is another matter. It is however hard for people to find good, skilled web developers and themers, on a per project basis, when a quality website is needed.

A quick consultation of the home page of http://wordpress.org would show you that this free open source software is used by the New York Times, Wired.com, and many many other individuals and corporations much larger than Global TV. Suffice to say if it is a good choice for NYT then it is probably a good software choice for Mayor Robertson. Actually it is not even so much about the software, but the developers who take steps to ‘harden’ the software from security intrusions during the development and deployment process.

It is a shame that a member of the press such as Global TV does not understand the parallels between freedom of speech and of the press, and the openness of the Free Open Source Software community, and how both are so effective in exposing lies and moving towards the truth.

Free Open Source Software such as WordPress is free as in speech, not free as in beer. Indeed, WordPress is just one software package among thousands of others that the Internet and the World Wide Web rest upon. But I realise by the comments in your report that you are unaware of the massive worldwide movement to create and distribute Free Open Source Software. While the cost of the software may be a factor for the contractors, as it is in every other business, it is the openness that is really important. The openness of the software and the community allow for the exposure of security problems, and then expedites their repair to the entire community of WordPress users. It also allows for such things as the enforcement of high technical standards, and the independent development and release of thousands of additional software add-ons to boost and customise software functionality.

Shawn Moore of thinkprofits.com claims in the news piece that he can quickly hack and steal information submitted through the contact form on Gregor Robertson’s website. Instead of just claiming this, he should prove it. I say this because security breaches in general take more time to manifest themselves than Moore implied when he said ‘quickly’. And if Moore does know of a current security exploit WordPress, he should do the right thing and contribute the exploit to the WordPress development community, or to the head company behind WordPress, Automaticc, so that the patch may be written and released.

It is a shame that a member of the press such as Global TV does not understand the parallels between freedom of speech and of the press, and the openness of the Free Open Source Software community, and how both are so effective in exposing lies and moving towards the truth. You should be really educating your viewers on the benefits of Free Open Source Software instead of insinuating that WordPress is merely a ‘cheap’ alternative.

As I said in the beginning, I dont know if the mayor broke any laws or not. But please understand that good developers may be harder to come across than you think. Neither are they cheap. Please also educate yourselves on the benefits of Free Open Source software because it is in use widely and in many roles across the Internet.

Presenting GourmetPregnancy.com

I recently launched a new project, GourmetPregnancy.com. Its a website in support of the new book ‘The Gourmet Pregnancy’, by Leah Douglas. The book features sumptuous and creative recipes for foodie expecting moms. This project had been in the works since January, and after seeing an initial layout provided by Mike Douglas, I went to work adapting the layout to the theme, enabled plugins, and configuring things in a subdomain.

GourmetPregnancy.com website

GourmetPregnancy.com website

Notes for development

When creating a WordPress site, I now generally attempt to pull in all the resources I can in one go, as I find this saves a large amount of time. I have a small project in github for automated installation of WordPress, which I would like to keep telling people about. Grabbing all the resources for a project is a very regular, standard task, and this process can be automated. There are other projects like it for other applications, like Drush for Drupal.

When developers get into new packages, they start off by downloading zips and tarballs. A little more skill and confidence and people start pulling down the software from the SVN or CVS repository. My github project is a shell script with the commands captured for obtaining the WordPress core, as well as a host of the common plugins and themes that I am going to use. Its a very simple idea, but one that is a huge time saver when you use it. It takes about 2.5 minutes for the script to run on my local Ubuntu desktop, in the shell. Its not perfect, but it is just meant to be a massive time saver over the tedium of grabbing the source, and then browsing through plugins and themes. A script like this can save untold hours.

So after that the site was a matter of layout and enabling plugins, creating a copy of the arras theme to hack on, configuring the cforms contact form page, and a host of layout fixes, for which Joe Hewitt’s Firebug plugin for Firefox is invaluable. Even so, there are multiple style sheets in the system and it was found lower down in the details that there was 1 or 2 conflicts. The Arras theme is more of a ‘feature’ theme as opposed to a ‘news’ theme, but still we spruced it up by removing columns and expanding the main area. Incidentally, the cformsII plugin required a complete rebuilding when the site was launched in the root domain. It didnt like me hacking the serialized array directly in the db.

You replace the instance of ‘the_excerpt();’ with ‘the_content();’ to get your full posts for the category. Search engines and users will thank you for it.

The home page in the theme has a Jquery slide show and dynamic feature boxes. There is always a question of the tools you have to do the presentation and we decided to swap out the slide show for a flash object, and replace the lower boxes with static content, since they will never change. The theme does provide for page & post options in in the slide show and sections on the page, and the options within the theme and plugins would have an influence over the content design, meaning what content gets defined as pages and posts. There is the time factor to consider in straightening out all the little issues between our layout and their theme, so after some investigation the static chunks and flash object was how we did it.

The header navigation took some time to master, but it came out looking nicely. The multi-level navigation plugin was in the end, not needed.

The book page has a light box plugin working, which works quite well.

The site has two post categories, News & Reviews and Recipes. The one important change for posts was a simple one line change to the template. It seems that in WordPress themes the post category listing displays only an excerpt by default. This doesn’t do much for usability or page ranking. Home pages, as I have on other news & blog themed WordPress sites, show the latest posts from all categories. You would expect that navigating to a given category should present like the home page, but only for that given category. That is not the case, but the fix is a one liner. You replace the instance of ‘the_excerpt();’ with ‘the_content();’ to get your full posts for the category. Search engines and users will thank you for it.

Installation Script Using WordPress Subversion Repositories

I’d like to take the example of svn externals from my previous post a bit further. I created a bash script that captures a group of commands that one would need to deploy a vanilla WordPress website with a cherry picking of plugins and themes. This script is a big-ass time saver. It’s especially useful for deployment of websites based on a package like WordPress or Drupal, that host publicly available subversion repositories. I tested it recently and made two websites spending two hours on each site, four hours total.

Web developers as they learn start by downloading packages in zip and tar.gz archives which is fine. A pro technique is to pull in the resource via SubVersion (svn). Svn provides additional features such as svn externals and svn hooks. Svn externals allows for the pulling in of external resources into a defined project in a svn repository. Svn hooks is for additional labor saving scripting that allows for the automation of repeated tasks such as a script that can pass along data from commit messages into other resources in the project such as the bug tracker. Learning these tricks allows for labor savings at every step in the production cycle. We can take these practices to the next level with capturing the commands in a bash script and then organise all the features of a website in a deployment script, something that is done all the time at software majors.

This script is a big-ass time saver.

I took the time to sort this out recently because I had some web development requests from people who have simple websites that could be converted to WordPress easily enough, but I wasn’t interested in going fishing for plugins and themes twice, and again when the next people come along needing the same thing. The job of a software developer should be to automate processes. I say often that the credo of developers is not to work for a living, but to eliminate work. But this idea is not always employed by developers in all the places it could, and its sometimes even a harder to get a client on board to make full use of methods and procedures that automate tasks and eliminate work.

…the credo of (software) developers is not to work for a living, but to eliminate work.

Lets at least cover the benefits in point form:

  • The script takes a couple of minutes and you save hours.
  • You dont repeat the labor, but you can repeat the use of the script, deploying anywhere else.
  • All your stuff is there at the beginning. Useful for planning, development, and policy across teams.
  • You are organised, and you can develop variations. Svn export may be good enough for your needs.

In pseudo code, here is what your script will do:

  • Set up your repository.
  • Make your directory structure for your project.
  • Check out your repository.
  • Run procedures for svn externals for core WordPress.
  • Run procedures for svn externals for plugins, iterating through data in an external file resource.
  • Run procedures for svn externals for themes, iterating through data in an external file resource.
  • Grab additional resources in an array, iterate through them using wget command, extract them.
  • Cleanup.
  • Commit message.
  • … anything else you can think to do.

The bash file, save as getallwpsvn.sh:

#!/bin/bash
# run this script with chmod 755 permissions.

workPath=$(pwd)

rm -rf filerepository repository www *.zip # this line cleans dir for testing, comment out when done

svnadmin create repository

mkdir -p filerepository/{branches,tags,trunk/{html,db,cron,scripts,themes,plugins,project,selenium}}
# got anything to import into those directories under trunk?
# import into the directories under trunk now
# before the next step
svn import filerepository file://$workPath/repository -m "initial import using getallwpsvn.sh script"
rm -rf filerepository
svn checkout file://$workPath/repository/trunk www
cd www
svn rm html
svn commit -m "rm html temporarily for clean propset"
svn propset svn:externals 'html http://core.svn.wordpress.org/trunk/' .
svn up
cd html/wp-content/
# get plugins from repository http://svn.wp-plugins.org/
# plugins listed in svn.plugins.externals
svn propset svn:externals -F ../../../svn.plugins.externals plugins/
#svn commit "plugins propset" # no commit if no local repository
svn up
# themes repository: http://svn.wp-themes.org/
# themes repository is a bit of a ghost town, none grabbed here
# browse the site and get the zip
# themes listed in svn.themes.externals file, if there are any
svn propset svn:externals -F svn.themes.externals plugins/
svn up

cd themes
# load up on themes
#more human readable format for array

THEMESITES[0]=http://dev.digitalnature.ro/fusion/fusion-wordpress.zip
THEMESITES[1]=http://ericulous.com/?load=googlechrome.zip
THEMESITES[2]=http://ericulous.com/?load=internetcenter.zip
THEMESITES[3]=http://ericulous.com/?load=redbusiness.zip
THEMESITES[4]=http://wordpress.org/extend/themes/download/elegant-box.4.1.1.zip
THEMESITES[5]=http://wordpress.org/extend/themes/download/thirtyseventyeight.4.0.zip
THEMESITES[6]=http://wordpress.org/extend/themes/download/thirtyseventyeight.4.0.zip
THEMESITES[7]=http://wordpress.org/extend/themes/download/constructor.0.6.4.zip
THEMESITES[8]=http://wordpress.org/extend/themes/download/jq.2.4.zip
THEMESITES[9]=http://wordpress.org/extend/themes/download/ahimsa.3.0.zip
THEMESITES[10]=http://wordpress.org/extend/themes/download/retromania.1.3.zip
THEMESITES[11]=http://wordpress.org/extend/themes/download/skinbu.1.0.3.zip
THEMESITES[12]=http://wordpress.org/extend/themes/download/mystique.1.16.zip
THEMESITES[13]=http://wordpress.org/extend/themes/download/lightword.1.9.3.zip
THEMESITES[14]=http://wordpress.org/extend/themes/download/monochrome.2.3.zip
THEMESITES[15]=http://wordpress.org/extend/themes/download/thematic.0.9.5.1.zip
THEMESITES[16]=http://wordpress.org/extend/themes/download/hybrid.0.6.1.zip
THEMESITES[17]=http://wordpress.org/extend/themes/download/new-york.1.0.1.zip
THEMESITES[18]=http://wordpress.org/extend/themes/download/f8-lite.1.3.zip
THEMESITES[19]=http://wordpress.org/extend/themes/download/simplex.1.3.1.zip
THEMESITES[20]=http://wordpress.org/extend/themes/download/cleanr.0.1.2.zip

for s in ${THEMESITES[@]}
do wget "$s"
done

FILES="*.zip"
for f in "$FILES"
do unzip "$f"
done

rm *.zip
rm *.zip.*
cd ../../../
svn commit -m "load in of plugins and themes complete"

cd $workPath
cp $workPath/www/html/wp-config-sample.php  $workPath/www/html/wp-config.php
chmod 777 $workPath/www/html/wp-config.php
chmod 777 $workPath/www/html/wp-content #temporarily, for cache
mkdir $workPath/www/html/wp-content/uploads && chmod 777 $_
touch $workPath/www/html/.htaccess && chmod 777 $_

# do any post processing, other importing now, and commit it if you did.

Set the file permission to chmod 755, and run it from the shell command line as in ./getallwpsvn.sh.

The file you save as svn.plugins.externals:

all-in-one-seo-pack http://svn.wp-plugins.org/all-in-one-seo-pack/trunk
advertising-manager http://svn.wp-plugins.org/advertising-manager/trunk
cforms http://svn.wp-plugins.org/cforms/trunk
google-sitemap-generator http://svn.wp-plugins.org/google-sitemap-generator/trunk
sociable http://svn.wp-plugins.org/sociable/trunk
stats  http://svn.wp-plugins.org/stats/trunk
ultimate-google-analytics http://svn.wp-plugins.org/ultimate-google-analytics/trunk
vipers-video-quicktags http://svn.wp-plugins.org/vipers-video-quicktags/trunk
wordbook http://svn.wp-plugins.org/wordbook/trunk
wp-flickr http://svn.wp-plugins.org/wp-flickr/trunk
wp-super-cache http://svn.wp-plugins.org/wp-super-cache/trunk

The svn.plugins.externals file is a name – resource listing, one per line, when you have more than one resource to define with svn externals.

Please note that you may not need all of this; comment whatever out you want. You dont need to create a local repository, that is only if you are doing team development, or perhaps custom development on themes and plugins. I found though that it was necessary with svn propset directives to create a top-level directory structure wherein is stored all the different directories. The point of this exercise is a pull-in of public resources in a step that you can repeat automatically over and over. It also need not be a very sophisticated script to get the benefits from it.

WordPress 2.8.4 Upgrade

SuperWebDeveloper.com has now been upgraded to WordPress 2.8.4. The upgrade process is pretty smooth, until the plugins. That part requires some care and attention.

Dansette