Widget-ized web browser E-mail
Sunday, 17 October 2010 11:59

For a long time I've been looking for a web browser that works inside a widget (or Windows desktop gadget).  Finally I came across one, Minibrowser.  It's perfect for when you need to click a button inside a web browser windows without needing to take up too much screen space.  Personally I use it for my time-tracking application.


Here's what it looks like on my desktop.  You can specify two custom sizes which you can switch between with one click.

Tags: Minibrowser  Windows  desktop  gadget  widget  browser  
My PHP and Rails development environments E-mail
Sunday, 12 September 2010 19:44


Since I wrote this I have added two more Ruby on Rails environments:

  • Aptana RadRails on Mandriva Linux
  • ActiveState Komodo IDE on Xubuntu

If I get around to it I'll write a comparison between the three environments for Rails development.


I run VirtualBox on a Windows 7 Professional 64-bit host installation.  The following are my VirtualBox virtual machines that I use for web development.


Programming language


Ruby on Rails

Operating system (64-bit)


Microsoft Windows




Windows 7 Professional

Arch Linux

Web server


Apache via WampServer 2

WEBrick (built into NetBeans)



MySQL via WampServer 2

  • SQLite
  • MySQL

Integrated Development Environment (IDE)

NetBeans 6.9.1 (PHP edition)

  • Microsoft Expression Web 4
  • Notepad++
  • phpDesigner 7 (trial)

NetBeans 6.9.1 (Ruby edition)

Database administration

  • phpMyAdmin
  • NetBeans MySQL integration


  • MySQL Workbench 5.2
  • NetBeans MySQL integration

Version control


  • command line
  • NetBeans plugin

Mercurial via TortoiseHg


  • command line
  • NetBeans plugin

File sharing (Linux -> Windows)




File sharing (Windows -> Windows/Linux)

  • smbnetfs
  • VirtualBox shared folders

Windows 7 Homegroup

  • smbnetfs
  • VirtualBox shared folders

Cloud storage and backup (running in host Windows installation)


  • Dropbox
  • Windows Live Mesh
  • Macrium Reflect Free edition (64-bit)
  • Cobian Backup 10


Web browsers

  • Mozilla Firefox w/ Firebug
  • Chromium
  • Internet Explorer 8
  • Mozilla Firefox w/ Firebug
  • SRWare Iron
  • Mozilla Firefox w/ Firebug
  • SRWare Iron

Other design- and development-related software


  • Adobe Photoshop CS5 64-bit (trial)
  • Paint.NET
  • Microsoft Expression Design 4
  • WinMerge

WordPress: Restrict access with PHP sessions E-mail
Sunday, 05 September 2010 18:33

For a recent WordPress website, I used the following code in the theme's functions.php file to restrict access to those 21 years of age or above.  (I know anyone can answer "Yes" even if they're not 21, but for legal purposes the question has to be asked.)  Additionally, I added simple code to allow bots to get through to crawl the site for SEO purposes.

// check for bots
$bots = array(
 'AdsBot [Google]'   => array('AdsBot-Google', ''),
 'Alexa [Bot]'    => array('ia_archiver', ''),
 'Alta Vista [Bot]'   => array('Scooter/', ''),
 'Ask Jeeves [Bot]'   => array('Ask Jeeves', ''),
 'Baidu [Spider]'   => array('Baiduspider+(', ''),
 'Exabot [Bot]'    => array('Exabot/', ''),
 'FAST Enterprise [Crawler]' => array('FAST Enterprise Crawler', ''),
 'FAST WebCrawler [Crawler]' => array('FAST-WebCrawler/', ''),
 'Francis [Bot]'    => array('http://www.neomo.de/', ''),
 'Gigabot [Bot]'    => array('Gigabot/', ''),
 'Google Adsense [Bot]'  => array('Mediapartners-Google', ''),
 'Google Desktop'   => array('Google Desktop', ''),
 'Google Feedfetcher'  => array('Feedfetcher-Google', ''),
 'Google [Bot]'    => array('Googlebot', ''),
 'Heise IT-Markt [Crawler]' => array('heise-IT-Markt-Crawler', ''),
 'Heritrix [Crawler]'  => array('heritrix/1.', ''),
 'IBM Research [Bot]'  => array('ibm.com/cs/crawler', ''),
 'ICCrawler - ICjobs'  => array('ICCrawler - ICjobs', ''),
 'ichiro [Crawler]'   => array('ichiro/2', ''),
 'Majestic-12 [Bot]'   => array('MJ12bot/', ''),
 'Metager [Bot]'    => array('MetagerBot/', ''),
 'MSN NewsBlogs'    => array('msnbot-NewsBlogs/', ''),
 'MSN [Bot]'     => array('msnbot/', ''),
 'MSNbot Media'    => array('msnbot-media/', ''),
 'NG-Search [Bot]'   => array('NG-Search/', ''),
 'Nutch [Bot]'    => array('http://lucene.apache.org/nutch/', ''),
 'Nutch/CVS [Bot]'   => array('NutchCVS/', ''),
 'OmniExplorer [Bot]'  => array('OmniExplorer_Bot/', ''),
 'Online link [Validator]' => array('online link validator', ''),
 'psbot [Picsearch]'   => array('psbot/0', ''),
 'Seekport [Bot]'   => array('Seekbot/', ''),
 'Sensis [Crawler]'   => array('Sensis Web Crawler', ''),
 'SEO Crawler'    => array('SEO search Crawler/', ''),
 'Seoma [Crawler]'   => array('Seoma [SEO Crawler]', ''),
 'SEOSearch [Crawler]'  => array('SEOsearch/', ''),
 'Snappy [Bot]'    => array('Snappy/1.1 ( http://www.urltrends.com/ )', ''),
 'Steeler [Crawler]'   => array('http://www.tkl.iis.u-tokyo.ac.jp/~crawler/', ''),
 'Synoo [Bot]'    => array('SynooBot/', ''),
 'Telekom [Bot]'    => array('
This e-mail address is being protected from spambots. You need JavaScript enabled to view it
', ''),
 'TurnitinBot [Bot]'   => array('TurnitinBot/', ''),
 'Voyager [Bot]'    => array('voyager/1.0', ''),
 'W3 [Sitesearch]'   => array('W3 SiteSearch Crawler', ''),
 'W3C [Linkcheck]'   => array('W3C-checklink/', ''),
 'W3C [Validator]'   => array('W3C_*Validator', ''),
 'WiseNut [Bot]'    => array('http://www.WISEnutbot.com', ''),
 'YaCy [Bot]'    => array('yacybot', ''),
 'Yahoo MMCrawler [Bot]'  => array('Yahoo-MMCrawler/', ''),
 'Yahoo Slurp [Bot]'   => array('Yahoo! DE Slurp', ''),
 'Yahoo [Bot]'    => array('Yahoo! Slurp', ''),
 'YahooSeeker [Bot]'   => array('YahooSeeker/', ''),
$botvisit = 0;
$agent = strtolower($_SERVER['HTTP_USER_AGENT']);
//loop through array and see if the user agent contains a bot name
foreach($bots as $botname => $bot){
 //if visit from bot, let them through
     $botvisit = 1;

This function checks whether the PHP session is set.  If it is, that means the user has already specified they are over 21 and they don't need to be shown the "splash page" again, and can be sent straight to the main content page of the site.

function session_set() {
 if(is_front_page()) {                  // is user on front page?
  if (isset($_SESSION['allowed'])) {           // is session set?
   echo '<script type="text/javascript">
   window.location = "' . get_permalink(6) . '";    //if so, skip splash page and go to content

This function checks whether someone trying to access an inner page on the website has already declared they are over 21.  If so, they can continue, otherwise they are sent to the splash page where they declare they are over 21.

function no_direct_access() {
 if(!is_front_page() && $botvisit != 1) {             // not front page or bot visitor?
  if(!isset($_SESSION['allowed'])) {                  // session not set?
   echo '<script type="text/javascript">
   window.location = "' . get_bloginfo("url") . '";     // take user to splash screen

add_action('wp_head', 'session_set');
add_action('wp_head', 'no_direct_access');

Remember to also add the simple code from my Cookies and Session in WordPress article to your site's wp-config.php file to enable PHP sessions site-wide.

On the splash page, where the user declares they are over 21, you need something like the following code.  The first a tag is linked to the content homepage, and additionally sets the PHP session variable $_SESSION["allowed"] which is used in all the functions above.  The second a tag simply shows a JavaScript alert. 

<div id="age">
   <a href="<? echo get_permalink(6); $_SESSION['allowed'] = "over_21"; ?>" title="Go"></a>
   <a href="#" onclick="inform()" title="Not allowed" style="left:97px;"></a>

JavaScript function inform() invoked by the second a tag above.

<script type="text/javascript">
function inform() {
    alert("You must be the required age of 21 to view this site");
    return false;

Cookies and sessions in WordPress E-mail
Tuesday, 31 August 2010 10:11

Two points to note in working with cookies and sessions in WordPress:

  1. You can't set cookies from the template header file.  It has to be done from functions.php.
  2. You can't start a session from the template files.  That should be done from wp-config.php like so:

//start a session
if (!session_id())

Tags: WordPress  themes  templates  sessions  cookies  PHP  
Adding a "Feedback" button: A brief comparison E-mail
Wednesday, 04 August 2010 10:09

I've seen the "Feedback" tabs on several websites, tethered to either the left or right edge of the browser window, and I think it's a nice unobtrusive way to offer your visitors a chance to quickly interact with you and offer their input on how you can improve your website.

I wanted to add such a button to my websites.  The most popular of the offerings seems to be Get Satisfaction.  I searched on AlternativeTo.net (a very useful service) and found several other similar services:

It came down to choosing one, possibly two, to check out, and I decided to go with UserEcho for now (deployed on this site and at p()thesis) and later check out VoxPopuli.  My reasons why are outlined in the table below:

  GetSatisfaction Uservoice UserEcho CrowdSound VoxPopuli
Free account Yes Yes Yes Yes Yes - self-hosted PHP/MySQL script
Unobtrusive "Feedback" button Yes Yes Yes No - the demo on the frontpage shows a widget (and not a button) that embeds on your site Not sure - but I'm thinking not because there is no mention of it anywhere
User doesn't need to leave my website to use the service Yes - everything is done in the GetSatisfaction widget No - users can view current ideas but need to visit the site page to add new ones Yes and no - can type new idea inside widget but submitting redirects to the forum on UserEcho site Yes - everything is done inside the widget Yes - from the demo it looks like everything is handled by the widget
  • The widget didn't open in Internet Explorer at Write.fm
  • They don't emphasize that they offer a free account, which makes me think it has very limited functionality.
  It could be considered a bit deceptive, but since there is an input box in the widget and no notification that "Submit" will redirect them to a new page, the user is more likely to use the service than if there weren't an input field in the widget at all.  
  • Project is open source
  • I haven't looked at the script yet but you can probably customize it to a great degree if you know your way around PHP.

WordPress plugins for convenient deployment E-mail
Monday, 02 August 2010 12:12

I've been developing small WordPress themes lately, and I want to share two plugins that allow me to quickly add widgets in a way so I don't have to reconfigure paths when moving from the development to the production server.

The two plugins are Widget Logic and PHP Code Widget.  You can see in the screenshot below how simple they are to use:



PHP/app developer w social media skills (intern) (Westminster, Colorado) E-mail
Wednesday, 28 July 2010 02:00

PHP/app developer w social media skills (intern) (Westminster, Colorado)

Date: 2010-07-22, 1:28PM MDT
Reply to: This e-mail address is being protected from spambots. You need JavaScript enabled to view it [Errors when replying to ads?]

We are offering a six month paid internship for an PHP app developer and avanced web designer. You'll be working in our office in North Denver (Westminster). You will be working 32 hours per week. This internship pays $750 per month. Please do NOT reply if you are not located in the Denver/Boulder area.

We are a non-traditional agency with offices in Denver and Cologne, Germany. All our projects involve various aspects of social media. Many of our clients are larger entities. We constantly develop new ideas for apps (Facebook, mobile, weaving various API's together, etc.) We specialize in tailored solutions for our clients, many of them being larger international entities. Our work includes this includes managing Twitter and Facebook accounts for our clients, community building and management, designing and running word of mouth campaigns, and monitoring the results. We started 8 years ago and are one of the household names for Guerilla Marketing in Germany and are making a name for ourselves with an awesome campaign here in the US.

We are out-of-the box thinkers that constantly monitor current and future trends and apply it to our workflow.

We are looking for a person that adds to our creativity pool and can turn our ideas into reality.

* Brainstorm for new ideas
* Building enhanced Facebook fan pages including apps that run within Facebook or external microsites
* Developing location based solutions & mobile apps
* Creative use of social media APIs
* Identifying new trends and developments
* Localization and internationalization of websites
* Exploring the opportunities of geo targeting, QR codes, games and the creative use of digital coupons
* Adding functionality to the websites of our clients (Javascript, Ajax, PHP)
* Building mobile versions of websites and iPhone apps
* Building & enhancing WordPress blogs

You will be working with our local team and our team in Germany - no worries they all speak English. You'll be working on numerous prestigious client projects that will help you to build your resume. You will also meet some leading social media experts.

* Knowledge of PHP, Ajax, Javascript, HTML 5 & CSS 3
* Existing web development background
* You are self driven and understand that this environment requires constant self-education
* You have your own social media accounts and keep maintaining them
* Strong written and verbal communication skills
* Ability to meet changing demands and to adapt to frequently changing priorities
* Owning a Macbook

Please send us URL's that show your work. You need to be able to show us an existing web development background, that is much more important than a BS or a masters in science.

You will NOT do extensive backend programming that takes months to complete. Your focus will be on projects than can be completed in a week.

Your passion for programming could turn this internship into a permanent job. So far all of our interns turned into permanent employees. We do have the deal flow to make it happen.

We are looking forward to hearing from you :)

  • Location: Westminster, Colorado
  • Compensation: $750 per month
  • This is a part-time job.
  • This is an internship job
  • Principals only. Recruiters, please don't contact this job poster.
  • Please, no phone calls about this job!
  • Please do not contact job poster about other services, products or commercial interests.
PostingID: 1857401860

Tags: denver  colorado  cologne  germany  internship  

Page 5 of 18