Tech4Him – Technology with Integrity

A Christian technology chaos wrangler and his thoughts

Drupal 5 to 6 Form Migration #TREE Attribute

Posted by Tom On March - 10 - 2010

Today was spent working on creating a Drupal 6 version of a custom Drupal 5 module as part of a Drupal upgrade project. This module is similar to the image_attach module that is a contrib module package with the Image module. The difference is that the module allows you to designate categories for images by content_type and allows for the upload, selection, removal and ordering of images in each “image category”. Read the rest of this entry »

Popularity: 3% [?]

Installing APC on MediaTemple DV 3.5 for Drupal

Posted by Tom On December - 11 - 2009

3815370381_4dde638066We have a few sites that exist on a MediaTemple DV 3.5 server. We’ve long been concerned about the lack of performance we are getting on this DV versus sites on a smaller Linode.com DV. We are not here to debate that today.

What we have done is to install APC on the MediaTemple DV in order to improve performance to some degree by taking advantage of op_code caching.  Now, this is not a silver bullet for performance folks. This is just one piece of a total tuning exercise. Be forewarned.

Read the rest of this entry »

Popularity: 10% [?]

Yay! Related Terms with Views 2 and Drupal 6. Hooray!I was working on a Drupal site and decided that a “related content” block was needed. Since this site has already been up and running for some time, manually reference other nodes would be painstaking. What I needed was the ability to show related node based upon the content of the node. Read the rest of this entry »

Popularity: 14% [?]

Developer Blog » Check if external image exists

Posted by Tom On July - 16 - 2009

Maria Birnbaum
Photo by bas:il
So, we have a website that displays images from an external source based upon a URL. For various reasons, sometimes the external source does not have a valid image for the request. In order not to show a broken image to the use, we need to validate that the image is valid.

Thanks to Google (NOT Bing. haha) we found a great little approach that was quickly placed into a Drupal template file.


if (@GetImageSize("http://www.testdomain.com/testimage.gif")) {
  echo "image exists";
} else {
  echo "image does not exist";
}

And according to the site, if you do not have GD installed you can try this code:

if (@fclose(@fopen("http://www.testdomain.com/testimage.gif", "r"))) {
  echo "image exists";
} else {
  echo "image does not exist";
}

We took the concept of the GetImageSize function to handily render web thumb shots from an external service, only if a valid image exists. This way we don’t show broken images to those Internet Explorer users.

via Developer Blog » Check if external image exists.

Popularity: 4% [?]

TheSeedCompany.org LogoI didn’t write the job post below but it spells out most of what is being looked for. Location is in Arlington, Texas (Dallas, Fort Worth area). No contract services need apply. This is for a full time staff position only. Drupal is the primary framework for two externally facing sites. Read the rest of this entry »

Popularity: 6% [?]

MediaTemple Grid Server, Drupal and the Zend Optimizer

Posted by admin On November - 19 - 2008

Krimson - Drupal Module Development TrainingToday was a great day. First off, the good Lord gave me another day on Earth to do His work. That’s a good start. I also came across a KB article from MediaTemple that provide great hope of some performance improvement on our grid service (gs) account. Now I came across this as a result of researching performance optmizations for Drupal on their dedicated virtuals (dv) that some of my clients sites run on.

I was so excited, I couldn’t wait to try it out. So, nothing too empirical other than firebug net download times with my browser cache cleaned out.

Test Instance with 8 blocks making up a single node page with 100 generated users.
* Before the optimizer was enabled: avg. 4.4 secs total
* After the optimizer was enabled: avg. 2.9 secs total

The change boils down to this:

Open your php.ini file for editing (KB: (gs) HOWTO: edit php.ini). Add these lines:

For PHP4 (Replace the x.x-x with the version number you want to use.)

> zend_optimizer.optimization_level=15
> zend_extension=”/usr/local/php-4.x.x-x/zend/ZendOptimizer.so”

For PHP5 (Replace the x.x-x with the version number you want to use.)

> zend_optimizer.optimization_level=15
> zend_extension=”/usr/local/php-5.x.x-x/zend/ZendOptimizer.so”

Save the changes and quit.

That’s a decent improvement with all things considered. There are plenty of other optimization items that can be done, but since this site provide zero income, I’m not ready to pay any more for some of those non-free options. ;)

I guess that leaves me with Drupal caching support, ZendOptimizer and MySQL Table optimization and indexing. No MySQL containers for me. If I ever move, it will probably be straight to a (dv).

Blessings!

Popularity: 13% [?]