DC Required Category Extension
Oops we did it again! Once stared, you might think you cannot stop it—only one day after we published our first extension for Expressionengine we came up with the second one. What's in it for you this time? An extension which allows you to define which weblogs must have at least one category assigned when submitting new entries.
Download DC Required Category 1.0.5
Overview
In Expressionengine, as in most of the CMS on the market, you can tag your entries with custom categories, you can define a default category for new entries but what you cannot do (as of this writing in EE 1.6.3) is to make the categories field required. Based on one and another post in the Expressionengine forums, we decided that this is not only useful for our clients, but also for other EE users out there.
With this extension, there's a setting for every weblog which specifies whether categories are required or not for posts in that weblog. If a user tries to post or edit a weblog entry which in a weblog being set to require a category association, an error is triggered and shown to the user at the begining of the plublish form.
The extension has now officially been accepted by the Expressionengine development team and featured in the EE extension repository.
Screenshots
Installation
- Download Required Category Extension.
- Unpack the archive contents to your Desktop or to a location of your choice on your hard-drive.
- Copy the
extensions/ext.dc_required_category.phpfile to your/system/extensionsdirectory. - Copy the
language/english/lang.dc_required_category.phpfile to your/system/language/englishdirectory (or duplicate and modify for any other language).
Activation & Settings
This extension does not have any special activation requirements. Follow these steps to activate Required Category in your EE installation:
- Log in to your EE control panel
- Go to
System Administration > Utilities > Extensions Managerand enable extensions if not enabled already - Enable Required Category extension
The settings for this extension reside in the weblog preferences for each weblog Weblog Administration › Weblog Management › Edit Weblog
- Posts in this weblog require at least one category?: sets categories as required for this weblog. Valid values are
YesorNo, default value isNo - Maximum number of categories: defines a maximum for categories count. Default value is
0 (No Limit) - Number of categories has to equal the maximum: the category count has to equal the maximum. Valid values are
YesorNo, default value isNo
Feedback
This extension has been tested to work with Expressionengine 1.6.3 and should be compatible with EE 1.4.2 or greater and most modern browsers. If you find a bug or have another feature proposal for this, post a comment about it here and we will be more than glad to fix or consider it. There is also a discussion on the ExpressionEngine forum going on with regard to this extension.
Changelog
1.0.0
- Initial release.
1.0.1
- Fixed offset bug when using "Update & Finished" in weblog administration.
1.0.2
- Added support for SAEF.
1.0.3
- Added features to make limit category to one entry.
- Refactored the way how settings are stored and checked.
1.0.4
- Added category maximum feature.
- Added exact category number feature.
- Improved packaging by using README & CHANGELOG files
1.0.5
- Added support for LG Addon Updater extension.
- Fixed a small bug where obsolete (duplicate) error messages were shown.
Comments
Add Your Comment
Related Entries
DC Template Manager
ExpressionEngine offers the possibility to save templates from the database as files. The biggest advantage…
DC FreeForm GeoIP Extension
Fresh from the coding factory comes a new, handy extension. Ever wondered where a visitor…
URL Field Extension for Expressionengine
Not so long after moving our old website to Expressionengine during the relaunch on May…
From Our Journal
DC Template Manager
ExpressionEngine offers the possibility to save templates from the database as files. The biggest advantage of this approach is being able to…
DC Feedback Boxes
Most website today are interactive – transfer of information is not only one-way but two-way. User are interacting with content: adding, editing…
DC FreeForm GeoIP Extension
Fresh from the coding factory comes a new, handy extension. Ever wondered where a visitor who just filled out a FreeForm on…

1 June 07, 2008 E-man
I can see this coming in real handy for some of my confused clients
Well done!
2 June 15, 2008 Clemens
»as of this writing in EE 1.6.4«
Did I miss that one? The latest version I can download is 1.6.3 build 20080421…
3 June 15, 2008 pesche
Hi Clemens, no you did not, it only tells me that typos still happen, even if we try to avoid them
Thanks for poiting out!
4 June 16, 2008 OrganizedFellow
Thanks for a great extension!
I forget at times to assign a category to new entries, this will help keep things organized!
5 June 18, 2008 Steven Hambleton
How about a checkbox to limit to only one category?
Good work
6 June 18, 2008 pesche
Actually a great idea, will be added into the next release.
7 June 18, 2008 Steven Hambleton
Good man
I only thought of that as I use CSS to add a background image based on the class which is derived from the category! I could use Solspace’s Preferred Category extension but this is a much handier ditty!
PS. What is the Revisions tab I see in the screenshot above?
8 June 18, 2008 pesche
You can turn on revisioning of weblog entries in EE, that’s the tab you see
9 July 04, 2008 Arnold
Thank for for such handy extension. Work fine with EE 1.6.4.
10 July 25, 2008 wecreateyou
Can’t wait to try this out! Thanks a bunch for this one. The SAEF update is exactly what I’m looking for.
11 August 25, 2008 bobh
Nice work guys. I already can’t do without.
12 September 16, 2008 Sean
Thank you, this is going to be very very useful with my current client.
13 September 24, 2008 Jonathan
Thank you so much! This is exactly what I needed.
14 October 21, 2008 K
I’m very new to EE and this seems like great plug, however there is one thing I noticed…when you go to the main “edit” screen. In the bottom right hand corner in the “edit selected” dropdown menu there are additonal options to add/remove categories for the selected entries. When adding or removing categories this way it actually lets you bypass the “publish page” and consequently your extension.
I wonder if there is a way to turn off this feature?
15 October 21, 2008 Sean
One feature request for this extension. Would it be possible to have the categories tab focused when clicking publish.
16 October 23, 2008 Richard Angstmann
Hi, I am using this extension in several of my weblogs successfully. However, In one of my weblogs, I have 2 custom date fields, one for start date and one for end date. I have your extension installed and set to require at least one category to be selected before posting.
If I publish a new entry and choose a start and end date without selecting a category and try to publish, when the error message comes up, and I go back to my date fields, they have all reset to 1970 and a random time. If I don’t notice this, and add the required category and then update the entry then the wrong dates show.
I presume this to be a bug because when I turn off the required category for this weblog, the problem goes away. Obviously It only goes away because it no longer requires me to enter a category…
This has already caused problems for my client…. so for now, I have to keep the required category setting turned off, and hope that the client remembers to add the entry to the right category before publishing…
Any chance you could look into this bug as this extension is truly GREAT at what it does in general.
Many thanks
17 October 23, 2008 pesche
Hi Richard
We’ll look into this as, I suppose it has something to do with the way how the errors, if applicable, are being shown.
Regards
Peter.
18 January 04, 2009 hm clothing
I am new to EE but cant WP do the same thing?
19 January 04, 2009 OrganizedFellow
@hm clothing:“I am new to EE but cant WP do the same thing?”
You are comparing Apples to Oranges. ExpressionEngine is a Content Management System, while WordPress is ... well ... it’s a blogging engine. Most plugins for WP provide a similar functionality, but with sometimes more code and complexity.
I’m sure to never hear the end of this, “... WordPress is also a CMS” ... NO, it’s not.
20 January 28, 2009 Hot Myspace Layouts
Really handy extension that one. Makes editing a walk in the park.
21 February 08, 2009 Wayde Christie
Very nice - will be using this for sure. Thanks!
22 February 26, 2009 Tim Print
Perfect. You just saved me a big headache tring to train my client!
23 March 10, 2009 Deron Sizemore
Great Extension! Just what I needed!
24 April 04, 2009 Steven Hambleton
Hi there!
Your extension is excellent but one thing that I have come up against and would really help is the ability to only accept child categories (not the parent).
25 April 15, 2009 Wordpress Theme
Hey! I am new here and had a question. If I publish a new entry and choose a start and end date without selecting a category and try to publish, when the error message comes up, and I go back to my date fields, they have all reset to 1970 and a random time. If I don’t notice this, and add the required category and then update the entry then the wrong dates show.
26 April 15, 2009 Richard Angstmann
@Wordpress Theme - As you already know (having copy pasted most of my original comment from above!) I have had the same problems. It turned out to be a problem with some EE core files as I remember, as such, I don’t think there was much that could be done to get round this. Not sure if the problems have disappeared with recent build of EE, as I’m no longer working on the project where I ran into the problem.
27 April 15, 2009 pesche
@Wordpress Theme – We’re aware of this problem. However, our investigations showed that we can’t do much about it on our part, it seems to be an EE-related issue. The corresponding posts are on the EE forums: http://expressionengine.com/forums/viewthread/81250/P18/#479169 and http://expressionengine.com/forums/viewthread/94734/.
@Richard – You were faster
Thanks for replying!
28 October 06, 2009 dhamphire
Thanks… I will surely try this.
29 October 14, 2009 Alex Bard
Hello. Great extension, but you have got some problems with images at top of the post.