Archives / Tag: ExpressionEngine

Design & Contract Interiors

Pretty pleased with this one, we just launched a lovely little site at Nine Four for our client Design & Contract Interiors. Mobile first, responsive, clean and simple… running on ExpressionEngine.

Design & Contract Interiors

Bit of a ‘work in progress’ as we’re slowly updating all the legacy site images with nice new high res shots but something I’ve thoroughly enjoyed working on these past few months, brings back memories of my days at Berkshire College of Art & Design where I studied furniture design as part of the multidisciplinary 3 Dimensional Studies ND and HND. :)

Must have add-ons for any new #eecms project

It never ceases to amaze me how many amazing add-ons there are for ExpressionEngine, so many in fact that I often forget about some of the best ‘must haves’ for new projects. In an attempt to remind myself of these gems I thought I would collate the ‘gratis’ must have add-ons in a list here on my humble blog.

This is an evolving list, I’ll update and amend it as I go… and let me know in the comments if you think I’m missing anything obvious. :)

Things about ExpressionEngine 2 that wind me up good and proper

Working day in and day out with ExpressionEngine 2 I’m seeing ‘A LOT’ of things that really peeve me off from a usability perspective. I keep meaning to make note of them so perhaps someone will take notice… this is going to be an evolving blog post which sets about doing just that.

  • jQuery crazyness is ruining the ‘Content > Edit’ screen – The number of times I click through to the edit screen and then click on a entry title to edit it ‘before the page has completely loaded’ escapes me, but every time I do I get a ‘different entry’. I can only assume this is because some kind of post page load processing hasn’t completed yet and so what I’m seeing in front of me isn’t actually accurate.

  • Publish layouts are completely borked – Yes, sometimes we might want to install a module, extension or field type after having set up a publish layout. If doing so results in a billion PHP errors on the edit entry screen then I’m simply not going to use publish layouts.

  • Primary navigation is lethargic – Again, I’m pretty sure this is jQuery related… the primary navigation drop downs are sloooooooooow. They need to be super fast responsive becuase right now I’m tripping up on them left right and center.

  • Entry ordering – In EE1 entries in the ‘Content > Edit’ screen had a fixed order (by entry ID). EE2 apparently does away with that approach and gives us sporadic ordering. Everything is just fine until you start editing previously created entries, ordering then apparently takes on a mind of it’s own. Go figure.

  • Forgetful Dialogs – The new File dialog is a big improvement over the complete mess that came before it, however all I really want is for it to have some memory. Make life easier for me if I’m uploading 30 images… pre-select that same upload location I used last time… you’re gonna save me 60 clicks!

More to come as they hit me.

Hide template based content until a specified date in ExpressionEngine

Sometimes it’s desirable to hide content on your website from users a specified date. With ExpressionEngine we already have built in functionality to do this with weblog/channel entries. If you want to achieve a similar effect for blocks of template code then you can simply combine the conditional and date tags as follows:

{if {current_time format="%d%m%Y"} >= "17072011"}...{/if}

Initially I thought I might need a plug-in to achieve the desired result but it was great to discover I could do just what I wanted out of the box. :)

Update: As pointed out by Philip there are some issues with this approach so tread carefully people, I’ve only tested this concept in a scenario where the current date falls within the same month/year etc.

Let devs prefix your ExpressionEngine variables with a custom value

I struck upon a wonderful little idea which I’ve implemented in a simple plug-in I’m writing for a project I’m currently working on.., add a ‘variable_prefix’ parameter to your plug-in or module… allow devs using your add on to opt to have variables prefixed with any value.

This is really useful if your add on might have variables which conflict with another add on or native ExpressionEngine variables. This could also allows a dev to nest once instance of your plug-in in another without having to resort to embeds, they simply specify a tag prefix for the outer tag pair.

ExpressionEngine Extension: Push to FoxyCart

While working on a project recently with the FoxEE E-commerce module for ExpressionEngine we discovered that it doesn’t integrate at all well with the Solspace User Module. This is understandable because the Solspace User Module circumvents the standard process for user registration and profile updates in ExpressionEngine. The upshot of this is that you simply ‘cannot’ make single sign on with FoxyCart work with FoxEE if your users are registering or updating their profile using the Solspace User Module. Now this is a bit of a problem since pretty much any E-commerce site built on ExpressionEngine will be using the Solspace User Module to allow users to easily manage their account details etc.

After much hacking and messing about I suggested to Ed who was working with us at Nine Four at the time that we could perhaps build an extension that used the User Module Hooks and the FoxyCart API to do the job. Ed went away and came back a very short time thereafter with a working solution. We like to call this little extension ‘Push to FoxyCart’ and we’d love to share it with anyone else that’s come up against the same problem that we did.

To clarify, you only need this extension if you are using the Solspace User Module, FoxEE and FoxyCart and you want to enable SSO for your ExpressionEngine site members. The extension is very simply but it requires some basic configuration.

Download: ext.push_to_foxycart.php.zip

At line 13 you will have to enter your ‘FoxyCart Domain’ (mysite.foxycart.com for example) and at line 14 your FoxyCart API token. Finally you’ll need to change the mapping of the FoxyCart fields to the ExpressionEngine custom member profile fields on lines 100 through to 119. This should be pretty obvious… if not then perhaps you already bit off more than you can chew! :)

Make sure you’re running PHP5 and have access to CURL on your server, upload the extension, enable it and you should be good to go. For support I’ve created a topic on the ExpressionEngine forums, hopefully if I’m not able to help with any problems you encounter then someone else might be able to chime in. :)

Migrating from TXP to EE - Conclusion

Ok, so steps 1 through 5 pretty much got us to a conclusion but there was one little fact that really had me bugged about the migration. I wanted to persist the article IDs from Textpattern during the migration to ExpressionEngine because they are used in my permalink URLs. Basically I don’t want to break the internet (or my small part of it) by altering the URL structure in the switch. How did I do it?

Open ‘cp.mt_import.php’ form within ‘/system/cp/’ then at line 954 add:

$ids = array();

then at about line 1028 add:

// IDs Hack if (strpos($parts['0'],'ID') !== false) { $ids[$id] = trim(str_replace('ID:','',$first_section[$i])); }

At about line number 1765 amend the entry id value to:

'entry_id' => $ids[$id],

Now save and upload your amended import script. Back in Textpattern you’ll also need to add one new line to the top of your export script.

ID: <txp:article_id />

So your Textpattern export will now include the original article ID and the import process will maintain this (so long as you have deleted all other weblog entries prior to import).

So, that’s it. I’m all done… I migrated… now I just have to find the time to finish off the new design and implement it! Happy Migrating!!!

ExpressionEngine Field Frame Field Type: UK Counties Select

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

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

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. smile

ExpressionEngine Plug-in: UK Counties Select

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

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 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”}

    {items}
  • {title} {description}
  • {/items}
{/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. smile

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…

Migrating from TXP to EE - Step 4

Right so, a quick re-cap… we’ve exported our data from Textpattern, imported it into ExpressionEngine and done a quick find and replace to fix up our embedded images.

Next job on our list is to fix up any links to file assets which we have in our entries. Textpattern uses a file download manager which records total file downloads and obfuscates the actual file path in the URL which you place in your entry. ExpressionEngine, whilst being a fantastic CMS, does not provide support for file download counts or obfuscation (here’s hoping for EE2!) which is a shame but hey ho… let’s soldier on.

We’re going to have to repair any links to files in our entries because the two systems link to file assets in different ways. So within the ExpressionEngine control panel navigate to the ‘Edit’ tab and use the search tool at the top of the screen to search for the string ‘/file_download/’ in ‘titles and entries’. This should give you a list of all the entries that you will need to fix up.

Unfortunately we’re going to have to do this manually (unless you can think of a better way!) so download all your file assets from your Textpattern install and then upload them to your file upload destination in ExpressionEngine (Prob best done via FTP).

Now we just need to amend the file paths in our entries so work through the list of entries that contain the ‘/file_download/’ string and replace the old Textpattern file path references with the new ExpressionEngine file path references.

Now, you can either use the ‘copy and paste info’ that the ‘File Manager Module’ provides you with (a standard href link) or hand craft a Textile based equivalent. The choice is yours.

Ok so I ran out of time a little today and didn’t have a chance to explain how we can migrate out Textpattern Links but I promise I’ll cover that in my next post! smile

Next Step…

Migrating from TXP to EE - Step 3

Now comes the exciting part. We’re going to import our old Textpattern artcicles into ExpressionEngine!

First off we will need to upload the text file that we generated in our export from Textpattern in Step 2. I just dropped my file into the web root of my server so I could get at it easily from ExpressionEngine.

Once your file has uploaded log-in to your ExpressionEngine control panel and navigate to the ‘Admin’ tab and then ‘Utilities’ and ‘Import Utilities’. We’re going to use the ‘Movable Type Import Utility’.

Complete all the fields on the import screen, your file path should be something like ‘../txpexport.txt’. Everything here should be pretty obvious, I just made sure I un-ticked the ‘Create members from commenters?’ option but obviously you might want to do things differently.

I’d suggest you do a few dry runs first of all with a small export from your Textpattern install to verify that everything is working as expected. I did an export of 10 entries from Textpattern initially just to test and then deleted all the entries and categories before performing my final import.

Ok so we have all our articles imported now but we’re not quite done yet. We need to set up a ‘File Upload’ location for our Textpattern Images. I decided to just use the default ‘Main Upload Directory’ which is already configured in ExpressionEngine.

I downloaded all my image assets from my Textpattern image upload folder and uploaded them all to my ExpressionEngine image upload folder. Now in my case the file paths are different (though you could always mimic the folder location which Textpattern uses in ExpressionEngine. If like me you didn’t you can quickly and easily do a find and replace on all your article image file paths.

Navigate to ‘Admin’ and then ‘Utilities’ and select ‘Find and Replace’. In my case I entered ‘/images/uploads/’ in the ‘Search for this text’ field and ‘/images/uploads/uploads/’ in the ‘replace with this text’ field. Select the entry field that you want to affect and the click submit.

All of your article entries should now include any inline images or media. Next we’ll be looking at how to deal with Textpattern ‘links’ and ‘file assets’.

Next Step…

Migrating from TXP to EE - Step 2

So now we have our ExpressionEngine install pretty much ready we need to export our data from Textpattern. At this point it may be wise to upgrade your Textpattern install to the latest release.

During a bit of a forum tennis match almost 3 years back(!) Jon Hicks and I managed to refine an export method which had been used for Textpattern previously to incorporate clean Textile and entry comments. I’ve summarised the steps you will need to take and the code you will need to use in your Textpattern templates below.

Before you start you will need to install a couple of Textpattern plug-ins to ensure that we can get our data out in just the right format.

First is a Textpattern plug-in called msv_show_article_field which is written by Martin Å vihla. This plug-in allows us to return the Textile formatted content for the articles instead of the HTML equivalent. This means that our articles will maintain their nice clean Textile formatting once imported into ExpressionEngine. Bonus!

Next is a plug-in called glx_thiscomment which is written by Johan Nilsson. This plug-in allows us to pull out the plain text name value for comments rather than the name wrapped in a ‘href’ linking to the comment authors website URL or email (the default behavior for the built in Textpattern comment tag). This is essential if we want to maintain article comments.

Now create 2 new Textpattern forms, one called ‘export’ and one called ‘exportcomments’. Add the following code to your ‘export’ form:

TITLE: <txp:title /> AUTHOR: <txp:author /> DATE: <txp:posted format="%m/%d/%G %I:%M:%S %p" /> PRIMARY CATEGORY: <txp:category1 /> CATEGORY: <txp:category2 /> <txp:php>echo "-----"."\n";</txp:php> BODY: <txp:msv_show_article_field name="Body" /> <txp:php>echo "-----"."\n";</txp:php> <txp:if_excerpt> EXCERPT:<txp:msv_show_article_field name="Excerpt" /></txp:if_excerpt> <txp:php>echo "-----"."\n";</txp:php>   <txp:if_comments> <txp:comments form="exportcomments" break="" /> </txp:if_comments> <txp:php>echo "--------"."\n";</txp:php>

…and the following code to your ‘exportcomments’ form:

COMMENT: AUTHOR: <txp:glx_thiscomment key="name" /> EMAIL: <txp:comment_email /> URL: <txp:comment_web /> DATE: <txp:posted format="%m/%d/%G %I:%M:%S %p" /> <txp:message /> -----

Finally we need to call our ‘export’ form from a page template. Create a new page template called export and add the following code:

<txp:article_custom section="name-of-your-txp-section-here" form="export" limit="500" offset="0" />

Obviously you will need to tweak the parameters in your page template to suit the number of blog entries you have and the section from which you wish to export entries.

With all of the above done we should now be able to visit the public URL for this page template in our web browser (http://yourdomainname.com/export/) and see the output. I had over 400 entries to export so the page took a while to load. Once fully loaded view source and save a copy to a plain text file on your local machine (txpexport.txt for example).

I know I promised to cover how we import this data into ExpressionEngine but I’ve been rambling on for a while now so I’ll leave that until my next post. smile

Next Step…

Blogging the migration from Textpattern to ExpressionEngine

I have made a cast iron decision. I am migrating (this) my personal blog from Textpattern to ExpressionEngine. I thought others might find it useful if I blogged my progress along the way.

So, this is the first of a number of posts which will explain the how, why when and what in as much detail as I can muster. If you’re looking to do the same then perhaps you’d like to follow me…

:)

Update: Step 1, Step 2, Step 3, Step 4, Step 5, Conclusion.

Migrating from TXP to EE - Step 1

Ok so a lot of this will be obvious but hey, here we go… I’ve decided to tackle the migration by setting up an ExpressionEngine Core Install on a sub domain (http://ee.nathanpitman.com) where I will be able to get everything up and running before I switch from the old Textpattern install for good.

First step quite obviously is to install ExpressionEngine Core (The free version of the CMS). I won’t explain how to do this, it’s dead easy and there are a ton of useful resources out there for you to look at if you’ve never used EE before.

First thing to do after you’ve completed the install is to modify the default custom field group for the default weblog to match the fields which you have in Textpattern. Textpattern has a ‘Body’ and ‘Excerpt’ field so you could simply rename the default ‘extended’ field if you want to feel at home.

As we’re migrating from Textpattern all our posts that we will be importing will be formatted with Textile or XHTML so we’re going to need to mimic that environment in ExpressionEngine. To do so we’ll need to install a handy little 3rd party plug-in called ‘Textile’! You can download the Textile Plug-in from the ExpressionEngine website. Once installed you will need to log-in to your ExpressionEngine control panel again and change the default formatting for the custom fields (body and excerpt) to use ‘Textile’ rather than XHTML. Don’t worry if some of your Textpattern blog posts have XHTML in them, Textile will still render these just right.

Finally, before we move on to exporting our blog entries from Textpattern we need to install a module that will allow us to more easily upload and manage files as we are used to doing so with the Textpattern ‘Files’ tab. The nearest equivalent that I have found over the years is the Low File Manager Module. It doesn’t provide download counts but it does pretty much everything else you could want and ties in beautifully with the ExpressionEngine File Upload preference settings.

Next we’ll be looking at how to export all our blog entries from Textpattern and pull them into ExpressionEngine. :)

Next Step…

ExpressionEngine Extension: NoScript Messages

While working on a project recently I noted that ExpressionEngine uses a ‘JavaScript:history.go(-1)’ within the ‘User Message’ templates to allow you to return to the page from whence you came if you submit a form without completing all the required fields, perform a search and return no results etc.

I wanted to ‘do the right thing’ and ‘hacked’ an alternative as documented in this thread on the ExpressionEngine Forums. This hack picked up the referring page URL and passed that to the User Message template instead.

I kept a note of my hack and when I had to upgrade this particular install to the latest point release I set about re-implementing it. At this point Derek Jones helpfully pointed out that I could create an ExpressionEngine Extension to do the same job, negating the need to ‘re-implement’ the hack again and again. Thanks for the prod in the right direction Derek! Here’s my first ExpressionEngine Extension – ‘NoScript Messages’.

Download: ext.noscript_messages.php.zip

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

Building websites with ExpressionEngine 1.6

This week I had a rather nice email from a lady called Alice at Packt Publishing here in the UK. Packt are a publishing company specialising in IT focused books and have just published a new book last month called Building websites with ExpressionEngine 1.6.

The book, written by Leonard Murphy is aimed at ExpressionEngine beginners. Alice has been kind enough to send me a copy for review so once I’ve had a chance to read it I’ll report back and let you know my thoughts.

In the mean time why not take a look at a sample chapter.

ExpressionEngine Plug-in: Encode/Decode

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 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.

Download: pi.np_encodedecode.php.zip

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

ExpressionEngine Mug!

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’.

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 and my life will be complete.

Thanks to all at EllisLab! :)

Hiding the Solspace Tag Tab for certain Weblogs in ExpressionEngine

The Solspace Tag Module is a fantastic addition to ExpressionEngine 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.

ExpressionEngine Plug-in: Link Target

Not sure how useful this ExpressionEngine Plug-in will be to others out there but we’re using it here at Nine Four on the Wired In website to link from an IFrame back to the parent window. This is something you would usually achieve with:

<a href="http://www.nathanpitman.com" target="_top">My Link Text</a>

…but that’s not valid XHTML so instead we need to do:

<a href="http://www.nathanpitman.com" onClick="top.location=this.href; return false">My Link Text</a>

The ‘Link Target’ plug-in just helps to keep your template code clean by writing all the JavaScript for you. Typical usage of the plug-in is as follows:

{exp:np_linktarget url="http://www.nathanpitman.com" target='top'}My Link Text{/exp:np_linktarget}

By default you have to specify a ‘url’ and ‘target’ parameter and the plug-in also optionally accepts a link ‘title’ and ‘class’. Possible ‘type’ values are ‘top’ and ‘blank’. Each mimic the link target attributes ‘_top’ and ‘_blank’ respectively.

Download: pi.np_linktarget.php.zip

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

ExpressionEngine Plug-in: Member Online?

Whilst working on the Wired In website I came up against a little problem. I wanted to be ale to show if a specific user was online or offline, much like you would on a social networking site. However although there are tags to return a list of online users within ExpressionEngine, you cannot pass this a specific username with a view to returning a true/false response.

So, after poking around a few plug-ins which queried the DB for values (specifically the ‘“Member Info”:http://expressionengine.com/downloads/details/member\_info/’ plug-in) I decided to launch in and write my first plug-in to do the job for me.

The plug-in is called ‘Member Online?‘ and it accepts a ‘username’ for which it will then simply return a true or false value. Using the optional ‘return’ parameter you can specify the values you would like returned in place of true or false.

So, typical usage would be as follows:

{exp:np_memberonline username="{username}" return="Online,Offline"}

You could either use this to simply write a string out into the page, as I am, or use it to change the class of a page element to highlight online users perhaps.

Download: pi.np_memberonline.php.zip

At the moment I’m using this alongside the Solspace ‘“User Module”:http://www.solspace.com/software/detail/user/’ to build the community aspects of the Wired In website so I’ve only developed it so far as required to meet those requirements. If you have any further ideas as to how the plug-in could be developed do let me know. :)

Hacking Expression Engine to add radio buttons and checkboxes to custom member profile fields

Don’t get me wrong, I love Expression Engine but sometimes you just come up against a brick wall and the only solution is to either pay someone to write a very clever extension or hack the system files about yourself (not for the faint hearted!).

During a recent project I needed to implement some basic member functionality and add some custom profile fields for the member accounts. No problem, Expression Engine has this covered. But (You knew there was going to be a but) it only provides support for text input, text area and select field types. Boo!

I ‘needed’ to be able to present users with a greater variety of input types such as checkboxes and radio buttons.

So, with a little help from the fanatical EllisLab staff I set about ‘hacking’ that very feature into the product.

I’ve documented the steps that I took in a Wiki article on the Expression Engine website. :)

For further discussion on this topic please also see the related Expression Engine discussion forum thread.

I ♥ Expression Engine

After my recent rant about having to edit CMS templates via a browser text field I think I have perhaps stumbled across Expression Engines best feature yet. It is for sure going to save my sanity.

Save Template as File in Expression Engine

Get the low-down on how to use the ‘Save Template as File’ feature right here. In the Manual no less, I know… RTFM!