Super Category (multi-blog) plugin with no hacks

April 2, 2006 by aaron

This is an old buggy version. Please use the newest.

NOTE:

I believe the only part that is missing is where it says to follow the instructions in the Up and Running section. In this section it basically said to make a group of links or categories belong to only one site add them to a category with the same name as the url (eg site: http://anthologyoi.dev would have all its links under the anthologyoi.com category).

Don’t worry I will rewrite the detailed section as soon as I get time (read: over the weekend)

Download the Super Category Plugin here

About a month and a half ago I released a first version of this plugin. In it I had to use a combination of hacks along with a plugin to have the same functionality that this version has with no hacks what-so-ever. In fact, aside from activating the plugin, the only thing you need to to do to install this plugin is make a couple edits for your theme files. Please read the entire setup and installation file because while there are only a few things you need to do, not doing them will lead to doom.

Installation:

  • Read section entitled “Parking Domains” — if you know what a parked domain is AND can park them, you can skip this part.
  • Download Plugin
  • Read section entitled “I assume that…” and make sure you understand each item.
  • Edit themes as shown in the section entitled “A Few Little Edits”
  • Upload super_cat.php to wp-content/plugins/
  • Activate Plugin
  • Follow instructions in the section entitled “Up and Running”
  • Bask in the glory of the easiest and most convienent multiblog in history.
  • Send a donation with a number greator than 0 followed by lots of zeros to the right of the decimal place to me or rabid monkeys will eat your blog and slippers. I Assume That…

  • You have at least a mid-level working knowledge of how wordpress displays information. If you don’t understand what a certain function does that I mention just run a search for it on the wordpress site.

  • You are using a clean install, or that any preexisting categories you want part of one site. If this is not true it is not difficult to change it later.

  • You want all the same options and activated plugins on all sites. Currently the only things that you can have on one site and not others is: blog title, blog description, theme, post categories, pages, posts, external links.

  • You want any preexisting links and pages on your blog to be availible to all blogs. Again if this is not true it is easy to change.

  • Your website urls are fairly permanent. Although there are built-in mechanisms for editing options for a single url/blog it is not possible as of yet to change a blog from on url to another automatically. However, if you know how the database works this can be done easily in phpmyadmin with only a few quick edits.

  • You use themes that use fairly normal methods to display categories,links and posts. I have not tested this plugin with themes other than default or classic. While for most themes it should be the same it is possible that more unique ones require extra work.

  • The themes you use are hard-coded. That is that you don’t use sidebar widgets. However, igf you do most widgets should still work, but for ones that use commands that I we need modified versions of may not work immediately. *

  • That when I suggest you do things a certain way, you do it.

  • You will read all of the instructions.

  • A Few Little Edits

    Please note that when I say replace one function with something else, if there any arguments in that function you need to copy them to the new functions.

    You will need to preform the following steps on each of the templates you want to use this plugin with. it may seem like alot but there are only 4 things you need to change which may be in only two files depending on your theme. After the first one it will seem a lot easier (changing new templates I have never seen takes about a minute).

    • You will need to look for the following functions in your sidebar files and/or your header file depending on your theme. You are looking for the following function: wp_list_pages they may or may not be in your theme and they may or may not be in the same file. For example, it is in sidebar.php in the classic and kubrick theme, but may not be in your theme.

      FIND: wp_list_pages

      REPLACE WITH:

      If there are arguments inside of the parenthesis, you should add them to both commands.

    • You will need to look for the following functions in your sidebar files and/or your header file depending on your theme. You are looking for the following function: wp_list_cats they may or may not be in your theme and they may or may not be in the same file. For example, it is in sidebar.php in the classic and kubrick theme, but may not be in your theme.

      FIND: wp_list_pages

      REPLACE WITH:

      If there are arguments inside of the parenthesis, you should add them to both commands.

    • The following is most likely in your sidebar file.

      FIND: get_links_list

      REPLACE WITH:

      If there are arguments inside of the parenthesis, you should add them to both commands.

    • In your archive.php, index.php, search.php and category.php

      FIND:the_category

      REPLACE WITH:

      If there are arguments inside of the parenthesis, you should add them to both commands.

    • Thats it everything else should work on its own.

    Parking Domains

    This is not a How-To guide for parking domains; instead it is meant to be just a brief introduction and explanation of what you will need to be able to do to use this plugin. Without parked domains this plugin is almost worthless (although there are some useful traits) so make sure you can use them before you install the plugin.

    First of all to park a domain you need a minimum of two domains. A parked domain is a domain that points to the EXACT same place as another domain without using frames or redirections. It is not an addon domain which points to a subfolder. You may not be able to park domains depending on your hosting company if you can’t you must either switch companies or convince your companies to allow you to park domains. Occasionally a hosting company may refer to parked domains as aliased domains or one of several other names. If the domain name can point to the same folder as another domain name it will work no matter what the name is.

    Secondly you must make sure that the parked domains are registered with valid name servers and have propagated through the DNS before adding them to this plugin. While there will be no obvious errors if you try to do it before hand, none of the options will work until the domain is fully propagated.

    Categorized as:
    comments powered by Disqus