TITLE: ExpressionEngine Plug-in: Encode/Decode AUTHOR: Nathan Pitman DATE: 07/22/2008 12:41:07 AM PRIMARY CATEGORY: ExpressionEngine CATEGORY: ----- BODY: Every time I come up against something which I once would have resorted to PHP to solve, I end up writing a little plug-in these days instead. It just feels less dirty that way... Anyhow, this one was developed to help me out when I needed to pass a string of data from one page to another in the URL. The string in question would occasionally include a forward slash and as such the string would become split as "Expression Engine":http://www.expressionengine.com/index.php?affiliate=nathanpitman interpreted it as two separate URL segments. The 'Encode/Decode' plug-in takes any string of text and encodes or decodes it. Typical usage of the plug-in is as follows: {exp:np_encodedecode style="base64" direction="encode"}{title}{/exp:np_encodedecode} The plug-in offers 'base64' and 'url' encoding and decoding but it would be easy to add more options. For me base64 seems to work best. bq. *Download:* "pi.np_encodedecode.php.zip":http://nathanpitman.com/file_download/13 Obviously let me know in the comments if you have any thoughts on how this can be improved. Enjoy! ----- ----- -------- TITLE: ExpressionEngine Mug! AUTHOR: Nathan Pitman DATE: 07/17/2008 10:45:35 PM PRIMARY CATEGORY: ExpressionEngine CATEGORY: Branding ----- BODY: A white box arrived today containing an '"ExpressionEngine Mug":http://www.flickr.com/photos/nathanpitman/2678386600/' from the good folks at EllisLab as a thanks for my video short on '"Why I Choose ExpressionEngine":http://nathanpitman.com/journal/539/why-choose-expressionengine'. !/images/172.jpg! It's most awesome, primarily for its capacious capacity and then also for the 'cut in' ExpressionEngine ident. Now all I need is a "matching T-Shirt":http://www.flickr.com/photos/low/2213718841/ and my life will be complete. Thanks to all at "EllisLab":http://ellislab.com/! :) ----- -----
    COMMENT: AUTHOR: Matthew Pennell EMAIL: matt@thewatchmakerproject.com URL: www.thewatchmakerproject.com/ DATE: 07/17/2008 10:45:35 PM WANT. I have an EE t-shirt (and a CI one) but a mug would be awesome too… -----
-------- TITLE: Automating an availability statement in PHP AUTHOR: Nathan Pitman DATE: 07/16/2008 09:52:00 AM PRIMARY CATEGORY: Web development CATEGORY: ----- BODY: We have a small statement on the "Nine Four":http://www.ninefour.co.uk website which advises new clients as to our current availability. In general we need between 3 and 4 weeks notice to fit any significant new work in, so rather than continually update the availability statement or explain that we need 3 or 4 weeks lead time, I just used the PHP date function.

We're available to work on new projects from the 15th of August 2008.

Simple really but I just thought I'd share. ----- ----- -------- TITLE: Hiding the Solspace Tag Tab for certain Weblogs in ExpressionEngine AUTHOR: Nathan Pitman DATE: 07/15/2008 04:37:00 PM PRIMARY CATEGORY: ExpressionEngine CATEGORY: ----- BODY: The Solspace "Tag Module":http://www.solspace.com/software/detail/tag/ is a fantastic addition to "ExpressionEngine":http://www.expressionengine.com/index.php?affiliate=nathanpitman but it lacks the option to 'disable' tags for certain weblogs (sections). Not to fear, your friend the PHP if statement is here. In 'ext.tag.php' at around about line 262 there is a code block called 'Add tag tab to tab array'. Just modify those two lines as per the example below: $weblogs = array(3,4,9,10,11); if (!in_array($weblog_id, $weblogs)) { $LANG->fetch_language_file('tag'); $publish_tabs['tag'] = $LANG->line('tags'); } Obviously the 'weblogs' array is an array of weblog id's that you do not want the 'tag tab' to be displayed for. You could do this round the other way, writing an array of weblogs that should include the tag tab but I felt this was the better option in my scenario. ----- ----- --------