phpWebSite Manual
phpWebSite Manual

phpWebSite Resources

Mods

3rd Party Mods

Who's Online
There are currently, 7 guest(s) and 0 member(s) that are online.
You are an Anonymous user.
You can register for free by clicking here
No Members are currently logged in.

FatCat Categorizer

FatCat Categorizer

Introduction


Matthew McNaney


2003-06-12

Most content modules in phpWebSite share a common need: to categorize data. Instead of having each module track categories independently, FatCat manages it for them all. Centralized categories improve data organization and flow and consequently improve user interaction.


Getting Started

Before you begin creating categories, you need to decide the structure of your tree. The amount of time you spend up front determining how your category tree will branch will save you ten times that amount of time in the future.

First, ask yourself: what is the purpose of my site? Let's say I am making a site about cooking. I may decide my site's purpose is to post recipes. So, I might make the first two categories Recipes and Advice.

Then I would determine how to organize my recipes:

Under Recipes, I decide to make three categories: Desserts, Main Course, and Appetizers.


Under Advice, I would make four categories Dietetic, Preparation, Appliances, and Utensils.

That should be enough to get started. I may decide to add more categories later. For example, under Preparation I may have the categories Poultry, Vegetables, and Beef because I feel each of those deserves a separate area of preparation. Or if I think there won't be enough information under Poultry and Beef, I may combine them under one category: Meat. You aren't chained to the choices you make for categories but it will save you time if you plan beforehand.


Creating, Editing and Removing Categories

Now that I know what categories I need, I can start making them. We know the top two categories (Recipes and Advice), so we will want to make those first.





First, go into your Control Panel and click on the Site Content tab. Next click on the FatCat Categorizer option. Once there you should see a drop down box with the words <Top Level>. Next to that is a button labeled Create Category. Since we are first making our top level categories, this is a good selection. Go ahead and click the aforementioned button. You will now come to the Create Category form. Let's go through the elements of the form.


  • Parent This controls the parent of the category I am creating. This echoes my selection from the previous page. Since I want Recipes to be at the top of my category tree I will leave this at <Top Level>.

  • Title Fairly self-explanatory. I will just type "Recipes" here.

  • Description Although not required, it is a good idea to explain the purpose of a category. Type the description of the category here (e.g. "Recipes are your culinary blueprints to great food!").

  • Template The template controls the layout of the View Category page. Just leave this at default.tpl.

  • Image and Icon You may want to upload an image for you category. Make sure you read the "Images and Icons" section below.

When I have finished entering the information on my Recipes category, I will click the Create Category button. My first category is complete! (See Figure 1.)







Once you create your first category you should be able to start developing your "tree".

Earlier we decided to create categories named Desserts, Main Course, and Appetizers. Choosing Recipes instead of <Top Level> from the drop box allows me to create these categories under Recipes. I can also choose a parent from the drop down box on the creation screen.


Recipes
Recipes > Desserts
Recipes > Main Course
Recipes > Appetizers

Once I pick Recipes as the parent, I would just create these other categories as I did their parent (Figures 2 and 2).





If you are following along, you should start to see more options in your drop down box. You would see something like the following list:


Recipes
Recipes > Desserts
Recipes > Desserts > Cakes
Recipes > Desserts > Pies
Recipes > Main Course
Recipes > Appetizers

The "greater than" sign (>) indicates that Desserts, Main Course and Appetizers are under the Recipes category.

The list can continue like this forever, but don't try to get there. Keep your list orderly. Three to four categories should be sufficient. If biologists can classify all life with only seven category levels, you should be able to make do with five.


Images and Icons

When creating or editing categories, you may decide you want to add a little more flair to them with graphics. FatCat allows you to upload images and icons to each category.

Size is the biggest difference between an image and an icon. Images are much larger than icons. The other difference is where they show up. Icons are commonly accompany information under that category. Images are usually only seen when some if reading information about the category itself.

Before we get started, let's lay down the rules for images and icons.


  1. Images and icons should be of the gif, jpeg (or jpg as it is more commonly spelled), or png format. You can tell what format your graphic is by looking at the file extension (i.e. the last three letters of filename). Any other image types (e.g. bmp, wmp, psd etc.) won't be allowed.

  2. Icons must be even smaller: 50 pixels wide by 50 pixels high or less.

  3. Images should be around 200 pixels wide by 200 pixels high. Anything larger than that tends to gobble up space and detract from the description of the category.

  4. Both icons and images should have a resolution of 72 dots per inch (or dpi). Remember, monitors don't need high resolution to show a clear picture. Anything over 72dpi is overkill and makes the image file bloated. Digital cameras usually store pictures at 300dpi to 1200dpi so be careful.


Upload an Image or Icon


To upload an image, click the Browse button. Go to the directory that contains your image file and select it by double clicking or clicking OK. The directory path to your image should now appear in the text box next to the Browse button. Now if you create or update your category, the image will accompany the title and description on the view page.

You can upload an icon the same way. Click Browse, choose your icon, and save the category.

After uploading at least one image or icon to the system, you will see a drop down box with that graphics file name selected. If you decide you do not want to use a graphic for the category you can choose <None> in the drop down box. If you later prefer to use a different graphic entirely, you can select it from the drop down box as well.


Remove an Image or Icon

Finally if you never want to see a graphic again, select the file name and click the Remove Image or Remove Icon button.

One other feature you can take advantage of on this page is thumbnails. These are small versions of the currently selected image. Once created, they can be used as icons. Creating them is easy, either Browse to the image you want to use or select one from the image drop down box and then click the Create Icon from Image button. Your new icon will then be set!

A few rules about thumbnail icons. First, not all images lend themselves well to icons. A landscape for example would be unrecognizable as an icon. An image of an object or a portrait would lend itself well to an icon. Experiment with them. Second, you can only make thumbnails from jpg or png image files. Sorry, but gif files are copyrighted material and you have to pay to alter the format.


Now What?

So how are these categories used? Most of the content modules that come with phpWebSite tap in to FatCat.

When you create an event, announcement, or a page there is a multiple select list to choose the category (or categories) to which you want that item associated. To select the category or categories associated to your item, highlight them by clicking each one. Hold down the CTRL key on your keyboard while left clicking to highlight more than one at a time. When you save your item, it will be indexed to the categories you have selected.

Categorization comes in handy when another item shares that category. Let's say I have a pecan pie recipe (my favorite). I go under PageMaster and create the recipe page for it. I decide to assign the page to the category Recipes > Desserts > Pies.

Later I find out there is going to be a pecan pie bake-off where I live. So I post an announcement with the same category. Since I may post a lot of announcements, I decide to post the event to my calendar.

Now when the users come to my site they may see the announcement about the bake off. When they read it, a different box, the What's Related box (Figure 4), will appear showing them the other items that are related to this announcement, namely the calendar event and the recipe page. They can then click the event or the recipe page to get more information. As you add more content and use FatCat to categorize them, the easier and more interactive your site becomes.



Sticky Items

Sometimes there is something that is so important, you want to make sure it is seen whenever something in the same category is viewed. To do so, you can just check the Sticky check box under the category listing. Although there is a limit on how many related items can appear, Sticky items will ALWAYS appear.


Back to the Admin

You should now be familiar with creating, editing, and using categories in FatCat. You should be aware of two more options on the administration screen.





Some modules, like Announcements, make extensive use of the category icons. Sometimes you may want to supply a filler icon for a category. The Default Icon option will assist you. Just pick an icon you have on your computer or use one you have already uploaded. See the Images and Icons section above to see how to choose an icon.

Once you have selected your Default Icon, this picture will represent any category currently lacking an icon.





Earlier, you learned about the What's Related box. Pick a number from this drop down box to determine the maximum amount of related elements to display per module. Remember that Sticky items will always appear, ignoring the limit number.


Conclusion

Hopefully you should now be able to use categories to their fullest. The more you use them, the more information you give your users. If you have any questions about this documentation, please contact me at matt at tux dot appstate dot edu.



Created on 07/27/2003 07:40 PM by RobertK
Updated on 04/11/2004 09:58 PM by RobertK
 Printable Version

Comments - Please Log In to make a comment
The comments are owned by the poster. We are not responsible for its content.
getting rid of uncategoried
Posted on: 06/08/2004 03:07 PM   By: Anonymous
Uncategorized is automatically assigned to a link when you don't relate it to anything (if for instance you just want it to appear as one of many links in a list). If later you want to relate it to something- the link still maintains it's 'uncategorized' categorization and i see not was to delete it.

very frustrating
Re: getting rid of uncategoried
Posted on: 06/28/2004 12:11 PM   By: chinokaze
This bug has now been fixed- make sure you get a copy of

mod/fatcat/class/Elements.php

A direct link to their web based CVS is:



Elements.php CVS
Edited By: chinokaze On: 10/04/2004 12:46 PM
Re: getting rid of uncategoried
Posted on: 04/11/2005 07:51 AM   By: Anonymous
I am experiencing the same problem. The link does not work. Any more suggestions??
Re: getting rid of uncategoried
Posted on: 04/04/2006 09:59 AM   By: Anonymous
Hi i am new user of php website content management software so i would like to know if i can have the annoucements listed in a webpage other than the home page and also if i can catagorise the same in under the fatcat catogoriser
How can I disable the "What's Related" Box altogether?
Posted on: 06/28/2004 05:57 PM   By: Anonymous
I can't figure out how to disable the What's Related box - any tips?
Re: How can I disable the "What's Related" Box altogether?
Posted on: 07/21/2004 12:16 AM   By: Anonymous
[ 881874 ] Add ability to switch What's Related off

visit:

http://sourceforge.net/tracker/?group_id=15539&atid=315539&func=detail&aid=881874



Re: How can I disable the "What's Related" Box altogether?
Posted on: 08/14/2004 05:37 AM   By: mikewallacegbc
When I had anything that I didn't want to show up, I used a box style I defined called byebyebox.tpl and set the style to contain:
display: none;

E-mail me if you want more info, hope this helps.

Mike
mwallace AT gracebaptist-vallejo dot org
Recursive overview?
Posted on: 11/22/2004 09:11 AM   By: Anonymous
I have a question. When you have a subcategory (as an end-node in the tree) you can get an overview of all the events, etc. in it.

Is it also possible to get a recusively combined overview of a parent category's items ?

Thanks in advance - Marc
FatCat Concept enquiry
Posted on: 12/21/2004 06:02 PM   By: Anonymous
I understand that FatCat is designed to make all categories available to all modules. I started building a pilot website and found that really, I did need to separate categories. Here's why:

My articles tend to fall into common categories, such as "about our company" and "useful stuff for employees", but my links tended to fall into a different set of categories, such as "relating to our vendors" and "related to our clients".

Further, I want to start making information about employees available - a staff listing. One thing I want to associate staff with is their "location" (another category) and while we're at it, how about their "role".

So now I need something like:

Articles
Articles > About Our Company
Articles > Useful Stuff For Employees
Links
Links > Vendors
Links > Clients
Locations
Locations > Sydney
Locations > Melbourne
Roles
Roles > General Manager
Roles > IT Manager

Now... when I create content for the staff listing, and I want to set their "location" attribute - I don't really want every single category to display.

What I really need is an admin area where I can set filtering options for the FatCat category selector. For example,

"For the 'assign location' property in the staff listing admin area, only list categories from the 'Locations' node down"

"For the 'assign role' property in the staff listing admin area, only list categories from the 'Roles' node down"

Extending this concept, I can then create screens which answer questions like: "Who reports to the General Manager?" (the answer is "show all staff whose 'role' property is associated with nodes in the category list which are one node down from the 'Roles > General Manager' node") and "Who are all the Branch Managers for the company." (answer: staff whose role is 'Roles > Branch Manager' and whose location can be any value).

Any feedback on this?

- is it in the face of the design paradigm of FatCat? (and if so, is that necessarily bad?)

- how can this be implemented as an "extension" to the core phpws code? ie I don't want to hack the core code (at the expense of future upgrades), but the functionality I need really needs to be executed at the point when any category information is being rendered.

- has anyone had a similar need / seen a similar setup or solution?

youcantryreachingme AT hotmail DOT com

Chris.


Sponsored by Patterson Research
Founded by Robert Kennedy
Powered by phpWebSite