You are here

Richard's blog

Using PHP to remove all nodes from a Content type

category: 

Today I had over 1,000 nodes to remove from a Drupal 6 installation. The bulk update only lets you remove 50 nodes at a time. What to do?

My Situation

All the node were from a certain content type. Actually, I need to remove all node that belonged to a particular content type. Lets call this content type "articles" My Solution Use PHP to remove all the node that belong to that node type. First I activated the PHP filter Then I ran this PHP script

Taking Money without completing the work

category: 

So I found this post on a Drupal forum:

@PersonWhoPostedBeforeMe, my point is that if Dave is unable to dedicate the time to this issue, and that if someone else was to spend their time to resolve the issue they should receive the bounty. I disagree with the paid approach in these situations as I've seen time and time again people taking donations but never coming through.

Bulk update comment settings on multiple nodes - Drupal

category: 

Recently, I needed to archive the blog section of a Drupal site. Part of this included removing all past comments and removing the ability to leave new comments. Removing comments is pretty easy in Drupal. There is a comment management section for that.

However, to remove the ability to comment on published nodes requires a bulk update. This is something that is not available in the standard Drupal site. Therefore, I had to resort to an alternative method of bulk updating the blog posts.

Use Jquery to add commas and remove non integers in Drupal Webform Module

category: 

Drupal's Webform module is top notch. I have made the move from Webform 2.x to Webform 3.x because of the usability and features. The only issue I have is the lack of a number field. Actually, both versions of Webform have this issue. If you want to format a textfield to restrict the character set to integers, the Webform module does not do this. However, I don't see this as a downfall. Webform is a very useful module. Besides,  we can easily limit characters in an input is pretty with Jquery.

My Problem

Reducing the file size of PDF files With MAC OS X

category: 

Tonight, I found myself in need to scan a few documents. So, I fired up the Lexmark all in one and my Power PC. Using the Lexmark software, I began scanning. After about 10 minutes, I have finally have the results of my scanned documents, A multi-page PDF. I was stunned to discover the PDF was over 30MB. Thanks, Lexmark! In order to email this document, I was going to need to reduce the file size.

One feature of OS X that really impresses me is it's ability to handle PDF files. Did you know if you open a PDF with Preview, you can "Save As.." PDF and shrink the file?

Pages