The MU forums have moved to WordPress.org

MU Global Categories Question (10 posts)

  1. gbellucci
    Member
    Posted 17 years ago #

    I'm trying to understand the reasoning behind the current implementation of "global categories" in WordPress MU. More directly, I'm trying to answer (for myself) the question "Can its existence be used for a site wide purpose?". I may have an answer to my own question before I finish this.

    The current implementation appears to be a way of forcing categories that have the same "nice name" to also have the same ID . The 'global_categories' function is called by a WordPress hook after a new category has been added to a blog's set of tables - this applies any blog that belongs to the domain. The routine looks up the category in the wp_sitecategory table and if it's there it changes the ID of the category (in the blog that happened to have a category with the same nice-name) - in the end, all categories that have the same "nice-name" will have the same ID. I'm not certain about the "usefulness" of this implementation - since the change to the ID is based on a 'coincidence' of nice-names. What's more, they are only added to the wp_sitecatgories table, they aren't removed if one of the blogs deletes the category from its compliment of categories. There are no admin screens that allow maintenance of the table and as a result, the table is allowed to grow and in all probability over time it will contain a number of unused or abandoned categories.

    I can't seem to think of any reasons for having the same ID for categories that are inherently not "shared" to begin with. The number of table entries in the database remains the same so there isn't any "compression" advantage. Since the categories have "no visibility" to any blog other than the ones using it, I guess I don't understand the need for them to share a common ID value.

    When I think of the phrase"global categories" in the context of Word Press MU - I thought:

    The hosting site creates categories that are intended to be made available to the entire "community" it serves - encouraging people to add their 2-cents to that category. When you write a post you can put the post into a one or more of the "local" blog categories or place it into one or more of the "global categories". Global categories would appear in the post page along side the "local" catgories created by a blog. The hosting blog has control over these global categories and would be responsible for maintaning them. Blogs, other than the host, would not be able to add or change global categories.

    Can anyone tell me what this is for or even what it *might* become? I would like to implement the concept of "global categories" as I've described it. However, in the light of the upcoming "tag" implementation in the WordPress core code, it's probably not worth the effort.

  2. SteveAtty
    Member
    Posted 17 years ago #

    I have to say that my interpretation of Global Categories is the same as yours. If the Admins have created Global Cats of say "Food Reviews". "CD Reviews" etc. then any blog will have those global cats listed along with locally created ones.

    The way it is at the moment people have to realise that there is a global category, find out what it is called, and name theirs the same.

    And if anyone renames the global category (say from "CD reviews" to "Music Reviews" ) then the once global category is no longer global.

  3. jalien
    Member
    Posted 17 years ago #

    I think it is confusing. When I first started using WPMU, I thought I could set up real global categories and frantically searched for the means to do so.

    The other problem is one shared by a lot of plugins and themes; when something is no longer used, the table remains in the database, if I try a theme, do some tweaking, and then decide it isn't what I want, the settings remain in the database, the same for plugins (mu or regular). When something is removed there should be an option to remove the information from the database, especially with a system like WPMU since it inherently creates large databases.

  4. lunabyte
    Member
    Posted 17 years ago #

    If it's a plugin or such, removal of the information falls upon the plugin author. Same goes for themes.

    Do a search for sitewide tags, and see what you come up with.

  5. Vimm
    Member
    Posted 17 years ago #

    I don't see what function the global categories serve either.

    By default the global categories "uncategorized" and "blogroll" exist, and when you make a new blog both of those categories are created for it. But, it's a total coincidence because those categories are hard coded! There is no lookup performed on the wp_sitecategories table during blog creation, and in fact "Uncategorized" is incorrectly assigned an id of 0, which is bumped up to 1 since the auto-increment starts from 1. That's the only reason the ids even match. I don't see why a value is being assigned to an auto-increment column in the first place, especially when it's not linked to any existing value.

    And when it's all said and done, a user can rename or delete their "site category" without any arguments from Wordpress.

    So what exactly is the wp_sitecategory table for, and if it's not used then why have it? Perhaps it's a holdover from the regular Wordpress that's not used here?

  6. gbellucci
    Member
    Posted 17 years ago #

    wp_sitecategory is not a table that is part of the classic Word Press database.

    My sincere hope is that when Word Press 2.3 is released that the WPMU merge also includes some new functionality that utilizes tags on a global basis and offers the host blog a way of collecting and displaying queries in the context of global tags.

    The new taxonomy API which is an abstraction layer that enables you to create database "things" should prove to be extremely useful for expanding the concept of "local" tags to the concept of "global" or site-wide tags. Categories should probably be depreciated altogether since I see little difference between "tagging" an item and "categorizing" an item.

  7. lunabyte
    Member
    Posted 17 years ago #

    I'm sure those features will make it into individual blogs, but I can't see something global being part of the core. Just seems to be the pattern with it.

    MU gets you pointed in the right direction, with a solid foundation, and all the bells and whistles are up to you.

  8. saracup
    Member
    Posted 16 years ago #

    I could see utility in this if WPMU is being used as a content management system for a single organization. I am building a WPMU system for this type of application, and hope to generate feeds from the global categories.

  9. williamsba1
    Member
    Posted 15 years ago #

    Just released a plugin that might help with your problem. It's a WordPress MU Category Mapping plugin allowing for one top-level blog to act as a portal for your global community of WPMU blogs.

    http://wordpress.org/extend/plugins/category-mapping-plugin-for-wordpress-mu/

  10. Ovidiu
    Member
    Posted 15 years ago #

    hmmm.. that certainly looks interesting, will have a closer look :-)

About this Topic

  • Started 17 years ago by gbellucci
  • Latest reply from Ovidiu