geoff_maxey's blog

Command Line Progress Bar w/ PHP

Ever have those times when you have to run a process and you have no clue how long it's taking and all you can do is just sit there waiting for the prompt to return?

Well, having had to sit through the same thing, I decided to get a little creative and build a function that will add a progress bar in the prompt while the script runs.

<?php
function status_bar($total, $iter) {
  $size = 50;
  $perc = round(($iter/$total) * 100, 2);
  for ($i=strlen($perc); $i<=4; $i++) {
    $perc = ' '.$perc;
	}
  $total_size = $size + $iter + 3;

Dynamically Building Links With Comment Anchors When Comments Are Paginated

(All code examples pertain to a version of the Abuse module for Drupal that has not been released yet, as it is still being tested. A release version is in the works post testing by the community.)

Having links to comments via the anchor fragment of a url can be a great asset for users to share their content and for admins to quickly access questionable content needing to be moderated as I have found in my work revamping and improving the current Abuse module for Drupal.

Strengthening Content-Based Online Communities With Mobile Applications.

I have just started researching and learning how to program apps for the Apple mobile devices, mainly, the iPhone. Why? Mostly for two main reasons. One, for my own need to learn and grow as a programmer and two, in response to a new initiative at Morris to develop apps as an extension of our larger Drupal-based websites.

Drupal AHAH: Issues with drupal_render()

While integrating AHAH functionality into a compound CCK field that I'm currently working on, I ran into an issue to where my "checkboxes" FAPI type were not rendering when the form was rebuilt via AHAH.

Building Custom Compound Fields/Widgets for CCK Drupal 6.x

For the lack of documentation available focused on building custom compound widgets/fields for CCK, I've decided to write some based on personal work on building one such for use in my current project.

The widget that i'm building is a field to generate and select search results via user provided keywords. The end result given to the user in the node edit form is a field containing three elements:

  • Textfield for Keywords.
  • Submit Buttom to generate/refresh search results.
  • Table of checkboxes for choosing individual search results.

Updated Documentation For The CASAA Module

Ever since the release of the CASAA module it seems that I've fallen behind on updating the documentation on this site. Well, in a sense, I have but, at the same time I've been more focused on keeping the code itself for the framework module and the plug-ins as up-to-date as I possibly can.

First Official Upgrades of CMF to CASAA Successful!

Throughout this week I have been upgrading some of our currently site projects from the CMF module to the CASAA module. Although it was ahead of my scheduled release date, I decided that this would be a great opportunity to one, test the upgrade path that I built which takes the data model build by the CMF module and alter it to the data model for the CASAA module; and two, take advantage of being able to place the new software where it can be pummeled in a production environment wherein many usage and system bugs can be exposed.

CASAA Development Is On Schedule

The development of the CASAA is on schedule for the proposed end of July release date.

New Plug-in For The CMF Is Now In The Design Phase.

After a short conversation with Chris Harrison via twitter, I learned of a nifty analytics/metrics platform called Mint.

Currently, for this site, I am utilizing Google Analytics to track traffic and pageviews, etc. on the site. What Chris introduced me to is apparently a system that not only shows what's happening on your site, metric-wise, but, also provides more information on the "gossip" concerning your site that's happening on the tubes.

Building Sprites to Improve Performance of Image Galleries Plus a Little Extra...

Including thumbnail image galleries from remote sites on your site can be quite beneficial for your user experience but, can be a major pain in the butt for site performance and page weight, especially, if your's is a high-traffic site. It can also be major for the remote server if you are loading a large amount of images.