Drupal 7: Custom Script to fix Media Files Filesize

David G - DrupalSometimes when working with Drupal everything is not a walk in the park. Even I run into oddities, or gotchas that cause me some headache. I love it when I’m able to come up with a small script that fixes my problems with little hassle. Recently in a site upgrade from Drupal 6 to Drupal 7 I was adding the Media module to my website and noticed my files listing showed many 0 byte files. I wanted to fix this error for files that do exist on the file-system so the client would not freak out with red error messages and warning colors all over the website! Learn More

Tags: , , , , , | Posted under Drupal, Drush | Leave a comment

Using Prepared Parameterized Statements in a Class

MODX logo

In the previous article, we discussed how to create a parameterized, prepared statement that can be reused in a loop so that prepare() only needs to be called once. But what if you’re operating inside a class file where it’s not practical to have the
prepare() statement and the code that uses it in the same method?

Learn More

Tags: , , , , | Posted under MODX, MODX | Leave a comment