filter
Remove Input Formats Help In Drupal 6
Tue, 08/30/2011 - 09:10 | by philipnorton42The input format help text is a good way of telling your users about the sort of content that they can enter into any text area. For some users, however, they can get in the way a little and even cause confusion, especially when WYISYG editors are used as much of the help text will be quite useless to most users.
Filtering Node Types In Drupal 6 Search
Mon, 01/31/2011 - 10:06 | by philipnorton42A common practice when creating sites in Drupal is to create different node types for different purposes. Sometimes these node types can be functionality based rather than content based and are used for creating a rotating banner or something similar. A side effect of this is that you will then see these nodes appearing in search results, which can cause some confusing results to be displayed.
Clearing The Filter Cache In Drupal
Fri, 06/26/2009 - 11:30 | by philipnorton42Filters are used in Drupal to change the content of the text of a node when it is viewed. The important thing to note is that Drupal filters should never alter the actual content of the node itself. Instead, when a node is saved it stores the output of the filter in the cache_filter table and displays this content the next time the node is viewed. This is useful because it doesn't mess about with the original text, and it speeds up the displaying of the node by running the filters once, rather than every time the node is loaded.
FilterChain Element In Phing
Mon, 01/12/2009 - 17:49 | by philipnorton42The FilterChain element is where the power of Phing really comes into its own. This element will allow you to change the contents of the files of a fileset. This can range from a simple stripping of comments, to replacing values and numerous other filters.
One of the simplest thing that can be done with filterset is to strip all comments from the files in question. Take the following PHP file with two comments.
Simple Swear Filter In PHP
Tue, 09/30/2008 - 08:49 | by philipnorton42Use the following function to filter out words from user input. It works by having a pre-set array of words that are to be excluded, this array is then looped through and each item is used to replace any instances of that word within the text. The regular expression uses the \b character class, which stands for any word boundary. This way you don't get the middle of words being filtered out when they are not meant to be.
Add Effects To Images Using Image Filters With PHP
Thu, 07/24/2008 - 13:13 | by philipnorton42The imagecreatefromjpeg() function has been part of the PHP library since version 4, allowing programmers to load an image directly from a file. However, the imagefilter() has only been available since version 5 and adds a nice little set of effects to an already useful function.
The effects are created using the function in conjunction with a set of constants. Take the following image taken from the free stock images site.