Topics and Categories


PHP-Nuke stories are always associated with both a category and a topic. Topics aresurprise, surprisemanaged from the Topics module, which I discuss in Topic 29, "Using the Topics Module." Each PHP-Nuke topic has an associated graphical icon, which you'll need to upload to your Web server to use.

Categories, on the other hand, are administered fromof all placesthe Add Story page I just finished discussing. Go back to that page, and you'll notice that the Category drop-down list box has Add, Edit, and Delete links right next to it. Categories don't have graphics associated with them; they're just a word or very short phrase.

Here's how this whole topic/category business works out: Every story has both a primary topic and a primary category (stories can also have associated topics, but that controls only the links that appear in the Related Links block that appear when you read the story's extended text). So, imagine that you create three topics for your site: Recipes, Tips, and Tutorials. Now suppose you create four categories: Appetizers, Entrees, Desserts, and Utensils. These topics and categories form a sort of grid:

RECIPES

TIPS

TUTORIAL

Appetizers

  

Entrees

  

Desserts

  

Utensils

  


Each story, then, represents one of the cells in that grid: a combination of topic and category. Some category/topic combinations might not make sense; for example, a story about utensil recipes doesn't sound very likely. But that's okay because you'll simply never select that combination when writing a story. All PHP-Nuke sites also have a category named Articles, which is meant to be a sort of generic category for news items.

How do you decide what to make for topics and what to make for categories? It really depends on how you want your site to look. Remember that topics get a nice graphical icon, so the main organizational elements of your site should be topics. Categories should be used to represent, perhaps, a secondary level of organization.

In terms of appearance on the site, categories play an important role. Take a look at Figure 19.6, which shows how the category appears as a part of the story's headline when viewing the extended text (this screen shot is from my other site, ScriptingAnswers.com, which is a technical site for Microsoft Windows administrators).

Figure 19.6. The relationship of categories and topics.


Clicking on the topic icon, of course, produces results like the one shown in Figure 19.3. Clicking the category name, on the other hand, produces a page with the same format, as shown in Figure 19.7, but shows stories from the same category, regardless of their topic. In fact, Figure 19.7 shows two different topics of stories, all listed because they're part of the same category.

Figure 19.7. Clicking category name rather than topic icon.




    PHP-Nuke Garage
    PHP-Nuke Garage
    ISBN: 0131855166
    EAN: 2147483647
    Year: 2006
    Pages: 235
    Authors: Don Jones

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net