Nathan Pitmanhello, my name is
nathan pitman.

Category: ExpressionEngine

ExpressionEngine Field Frame Field Type: UK Counties Select Mar 23. 092

Having had a play with the wonderful ExpressionEngine Field Frame extension which Brandon Kelly has authored I felt inclined to port my UK Counties Select Plug-in. Once I can get my head round the reasons for GitHub not working as expected I’ll post it there, in the mean time:

Download: np.uk_counties_select.ff_fieldtype.zip

You might also want to check out the numerous other field frame field types that Brandon is assembling.

ExpressionEngine Plug-in: US States Select Jan 15. 093

This is just a variation of my UK Counties Select plug-in for ExpressionEngine which as you might expect, returns a list of US states in the drop down rather than UK counties. Usage of the plug-in is as follows:

{exp:np_us_states_select name="states"}

There are also some additional parameters you can pass that are detailed in the plug-in info page.

Download: pi.np_us_states_select.php.zip

Obviously let me know in the comments if you have any thoughts on how this can be improved. Enjoy!

ExpressionEngine Plug-in: Add VAT Jan 08. 095

I’ve just written a new ExpressionEngine plug-in called ‘Add VAT‘. This plug-in takes any numeric value and returns the value plus VAT. You also have to specify the VAT rate obviously.

Typical usage is as follows:

{exp:np_add_vat price="120" rate="15"}

I’m using the plug-in on a website I’m developing where I need to be able to display prices inclusive and exclusive of VAT. Currently the Simple Commerce module does not provide a facility to specify VAT or taxes.

Download: pi.np_add_vat.php.zip

If you have any further ideas as to how the plug-in could be developed do let me know. :)

ExpressionEngine Plug-in: UK Counties Select Oct 24. 081

Another day, another little ExpressionEngine Plug-in. I needed to return a list of UK counties in a standalone entry form. I could have simply flicked on PHP for the template and spewed forth a foreach from an array but I thought I’d wrap it all up in a plug-in instead, so here it is.

The ‘UK Counties Select’ plug-in simply renders a drop down select form element with an alphabetical list of UK counties. Usage of the plug-in is as follows:

{exp:np_uk_counties_select name="counties"}

I could add options to specify a class, id etc but for now this does the job just fine for me.

Download: pi.np_uk_counties_select.php.zip

Obviously let me know in the comments if you have any thoughts on how this can be improved. Enjoy!

Migrating from TXP to EE - Step 5 Oct 16. 080

ExpressionEngine does not provide a ‘native’ facility for recording links but the immense flexibility of ExpressionEngine Weblogs allows you to create your own links facility by just creating a new Weblog with the relevant custom fields (Title, URL & Description) and then setting up a related category group.

Just as we exported our article data from Textpattern we ‘could’ also export our Link data and then use the same import process to pull it into ExpressionEngine.

However this is not the route I’m going to take. Personally I would much rather maintain my ‘noteworthy’ links using a tool like Delicious so I’m going to show you how we can migrate our Textpattern links to Delicious and then have them displayed inline within an ExpressionEngine template.

Luckily for us there’s a fantastic Textpattern Extension called ajw_bookmarks (old and dead link) that provides us with a quick and easy way to export our Links to a ‘Bookmarks’ file which most bookmark services and browsers can import.

Download and install the Extension within Textpattern and then navigate to the Bookmarks tab within Extensions and select the first option ‘Export bookmarks’.

Now that we have our locally saved Bookmarks file navigate to the Import Bookmarks tool on the Delicious website (obviously you will need to log-in first) and then choose the ‘Custom import’ option.

Now we want our bookmarks to be visible to the public so check ‘make all my imported bookmarks public’. If you wish to use Delicious to record bookmarks for personal use and also for display on your website you may want to tag all the bookmarks you are going to import with a keyword such as ‘noteworthy’ or similar. This is the approach I took. By adding this tag I can identify which bookmarks should be pulled out of Delicious for display on my website. Now click ‘Import Now’.

Delicious should have a bit of a think, depending on the size of your links collection and then display your imported bookmarks.

We’re going to use the ExpressionEngine ‘Magpie’ plug-in to pull our Delicious links into our template and display them inline. The plug-in will also cache the data so if Delicious should go down our site won’t fall apart. The Magpie plug-in is a part of the default ExpressionEngine install so just open up a template file and drop in the following code:

{exp:magpie url="http://feeds.delicious.com/v2/rss/nathanpitman?count=10&tag=noteworthy" limit="10" refresh="60"}
<ul>
{items}
<li><a href="{link}" title="{title}">{title}</a><br />
{description}</li>
{/items}
</ul>
{/exp:magpie}

Obviously you’ll have to replace ‘nathanpitman’ in the feed URL with your own Delicious username and if you want to pull back bookmarks with a particular tag then include the ‘&tag=’ parameter and variable in the querystring as I have above.

You should now have a nice unordered list displaying your 10 most recent Delicious bookmarks or my 10 most recent Delicious bookmarks if you forgot to change the username in the URL. :)

If you need to you can also tweak the number of minutes that the plug-in waits before it refreshes the feed display, I’d opt for 60 minutes. The Magpie plug-in defaults to 3 hours if you don’t specify a refresh value.

Conclusion…

Page 2 of 5 pages  <  1 2 3 4 >  Last »