Tuesday 24 September 2013

First Time: Roots Wordpress Theme Development

Bootstrap provides some powerful assistance when it comes to styling and responsive layouts. Combine this with the ease of developing a user-friendly and featured system with WordPress and the result is Roots.

 

A first experience with Roots

Roots provides a few directions on how to get started which I'm currently working through. The first thing you notice is that this is installed like many other themes. First you need to install WordPress by creating a database and running its installer. Using Apache I can create a virtual host:

Listen 8081

<VirtualHost *:8081>
 DocumentRoot /var/www/html3
</VirtualHost>  

Now that path on my Linux system is available at http://127.0.0.1:8081, or http://localhost:8081. After installing 'node.js' and grunt, I can drag the Roots theme into the WordPress templates folder, after which I can install the template from the administrator panel. Of course, I edited 'style.css' to reflect that this site was to be authored by myself.

Once I had activated the Roots theme, none of the default CSS styling was appearing. At first I thought I had run into a common Roots problem which was widely discussed on a few forums. My Apache logs showed that 404 Not Found errors were being generated for JavaScript and CSS files. My '.htaccess' file in the WordPress root folder indicated that certain URL paths should be rewritten to route to other paths on the webserver. It seemed these rewrites weren't occurring, so I thought perhaps mod_rewrite was missing from Apache. A quick phpinfo() found that Apache had rewrite as a loaded module.

To make a long story short I had to update my Apache virtual host configuration file and restart the server:

Listen 8081

<VirtualHost *:8081>
 DocumentRoot /var/www/html3
 <Directory /var/www/html3>
  AllowOverride All
 </Directory>
</VirtualHost>

I'll update this as I continue my peek into Roots.

Credit is due to: Online syntax highlighting

Wednesday 28 August 2013

God Help Syria

With thousands dead and millions displaced, Syria's war is already a massive tragedy. I'm surely ignorant to the complexities of the conflict, but I wish it could have been avoided and I hope it won't spread into a wider conflict with international victims.

Instead of military intervention by NATO, which could draw in military opposition from Iran, Russia, and China, America could consider scaling back its support of rebels and work with Russia & China to find a diplomatic solution for Assad's removal. More public dialogue is necessary on non-violent solutions. Obviously one suggestion isn't a solution.

Who was the perpetrator of a probable chemical weapon attack this August? This is a debated question, with no obvious answer as of yet. Many suggest it was the Syrian government, while some suggest it was opposition forces, with different reasoning on both sides. Does anyone really know though? Has a possible third party been ruled out?

This isn't just a Syrian issue as nations worldwide increasingly vocalize vastly differing visions on the conflict.

If the question of who perpetrated the crime can be determined, does that mean the U.S. should intervene? One argument for intervention would be to avoid the distribution of chemical weapons to either victorious rebels, or other unknown groups. Another argument could include establishing a launching pad for an attack on Iran. Or perhaps natural gas interests are at play. Whatever the arguments, why should we trust the U.S. on this issue, either in its statements or in its actions? The U.S. is an unpredictable monster. Neither is the U.S. a good example of morals. Take for instance its past policies on climate change, it being one of the greatest laggards in the world.

I'm in favour of a deescalation of violence where possible. War is a major cause of the climate crisis, and we can rightfully question the morality of the U.S.'s military intentions based on the past.