php|architect is running a contest called The Great PHP on Windows Contest. Basically you can tell from the title, this is a contest about PHP and Windows. The challenge is to develop a PHP application, desktop or web, that runs on Windows. You get bonus points for using Microsoft technology, like SQL Server, Azure, etc.
For more details you can check out the contest page.
I signed for the contest and they accepted my entry! My project is Task HUD, a task management web application, should be awesome. Not just for the contest, but because this is something I need. Even though nothing is up yet, you can keep track of the progress of Task HUD at http://www.taskhud.com.
I’m excited to be a part of this contest and I look forward to what the other entries are developing.
If you use twitter, you can follow what people are saying, using the #winphp hash tag and you can follow @phparch.
If you are a PHP developer, you should sign up, because by the way, did I mention the sweet prizes? no? well, you need to check them out for yourself.
One last thing, I would like to thank Applied Innovations for hosting my entry on their servers, rock on.
Posted in PHP, Windows.
By Chris Roland
– November 5, 2009
Well, I tried to move my blog over to Oxite and because my hosting provider is an average run of the mill providers, I wasn’t able to get it up and running. Honestly, the process to get Oxite up and running is way too much effort for a blog. Wordpress works great and is a lot easier to install. So, I’m sticky to Wordpress for now.
Posted in Web.
Tagged with Website.
By Chris Roland
– October 27, 2009
After some back and forth, I decided I’m going to move my blog over to Oxite. I really like how clean ASP.NET MVC is and Oxite has everything I need to run my blog. From there I’ll be able to customize my blog and mix in a little Silverlight. So… this should be my last post in Wordpress.
Posted in Uncategorized.
By Chris Roland
– October 3, 2009
Hope this helps someone save some time, but that might be a hard to do, since you really don’t waste time when programming with Ruby
To link to another controller from a different controllers view you can use:
<%= link_to 'Accounts', :controller => 'accounts' %>
Posted in Ruby.
By Chris Roland
– September 14, 2009
In case others run into this and because it’s not in an intuitive spot, here is the file location to customize the system message in Joomla:
[joomla install]\libraries\joomla\document\html\renderer\message.php
Posted in Joomla.
By Chris Roland
– September 13, 2009
To disable editing on the Frontpage in Joomla 1.5.11, all I had to do was change:
$access->canEdit = $user->authorize('com_content', 'edit', 'content', 'all');
$access->canEditOwn = $user->authorize('com_content', 'edit', 'content', 'own');
(Lines 64-65)
To:
$access->canEdit = $user->authorize('com_content', 'edit', 'content', 'none');
$access->canEditOwn = $user->authorize('com_content', 'edit', 'content', 'none');
(Lines 64-65)
In the following file:
[joomla install]\components\com_content\views\frontpage\view.html.php
Posted in Joomla.
By Chris Roland
– September 12, 2009
Here is a quick tip. To sanitize input before you send the query to the database in Joomla, you can use:
$text = "My 'awesome' text";
$text = $database->Quote($text);
This will quote and escape special characters in the text string.
Reference:
http://help.joomla.org/content/view/525/125/
Posted in Joomla.
By Chris Roland
– September 12, 2009
Hopefully this will save someone time, because the locations are a little off.
Here are the default files for the CakePHP home page controller and view.
Controller:
[cake install location]\cake\libs\controller\pages_controller.php
View:
[cake install location]\app\views\pages\home.ctp
I’m using CakePHP 1.2, so this might be a little different for earlier releases.
Posted in PHP.
By Chris Roland
– September 8, 2009
Sometimes something looks easy, but it turns out to be a rabbit hole. Take for example the function array_diff in PHP. I thought it would return all the differences in both arrays, but it doesn’t. After going through the function comments thread, I came across a great solution. It’s to the point and it works!
To get the differences in both arrays, you can use:
array_merge(array_diff($array1, $array2),array_diff($array2, $array1));
For example:
$array1 = array('John', 'B', 'Smith');
$array2 = array('John', 'C', 'Smith');
$result = array_merge(array_diff($array1, $array2),array_diff($array2, $array1));
print_r($result);
will return:
Array
(
[0] => B
[1] => C
)
Basically the first call to array_diff returns the differences in $array1 and then the second call returns the differences in $array2. After that, they are merged together as an array, to provide all the differences in both arrays. Simple and sweet.
Credit goes to this comment.
Posted in PHP.
By Chris Roland
– September 7, 2009
Ok, this is probably silly, but I ran into an issue where everything was working in FireFox, but IE wouldn’t take. So after some searching and pounding my head against the keyboard, I ran across a quick forum post where someone mentioned to put in a DOCTYPE for your page. So I added the correct DOCTYPE and bam! everything work… thank you Google.
Here is a list of DOCTYPEs out there:
http://www.w3.org/QA/2002/04/valid-dtd-list.html
To save you some headache make sure you put one in.
Posted in Web.
By Chris Roland
– September 6, 2009