Dax

Subster Rejunevation

January 11th, 2006 · 139 Comments

subdir.gifThis Wordpress plugin turns all your categories into subdomains. It works on your post permalinks too.

Edit: This plugin WILL work on GoDaddy. Thanks to mh for finding this doozy out. You have to sign up for their dedicated IP deal for 3 bucks a month.

Download Subster Rejuvenation v0.038 for WP 2.1
Download Subster Rejuvenation v0.036
Download v0.035

IMPORTANT!!

If you don’t have the www on your blog url (www.domain.com), the plugin messes up.

You also have to set your permalink structure to /%postname%/

UPDATE 0.038

The userinfo function I was using in the install was I guess removed or otherwise rendered useless by Wordpress for 2.1. I changed it. Download it and install again if you were getting “Table not found” errors.

UPDATE 0.037

I upgraded Wordpress to 2.1 to see if this plugin worked. I fixed one bug that redirected subdomained pages.

I also found a few bugs in 2.1 which made me sorry I upgraded. get_links() didn’t work. Seems like they might have want to keep that one since every goddamn Wordpress install in the world uses that function on every page.

Well, see if this 0.037 version works.

Oh and for some reason, now my theme changes for no reason every once in a while. Nice.

UPDATE 0.036

Fixed the Preview Pane. I didn’t even know it wasn’t working!

UPDATE 0.035

Fixed redirect for duplicate URLS

UPDATE 0.034

Fixed some bugs with category archives and wp_query vars mismatched. If you were getting bugs, try this one.

UPDATE 0.032

Now you can give your categories their own archives. Just check the box in the options panel.

UPDATE 0.030

Wordpress pulled the interesting move of storing a cache of all your mod rewrite rules. This completely wrecked this plugin because this plugin makes your rewrite rules on the fly based on the url. I changed the plugin to delete the stale cache of the htaccess file on every page load. If the plugin didn’t work for you, it might now.

UPDATE 0.029

Made old pages www.domain.com/article redirect to the correct subdomain.

UPDATE 0.027

Added functions
sd_next_post_link
sd_get_next_post

sd_get_previous_post
sd_previous_post_link

Use them like this maybe:
< ?php sd_previous_post_link('« %link', '%title', true); ?>
< ?php sd_next_post_link('%link »', '%title', true); ?>

UPDATE 0.022

Added function sd_list_cat_pages().
Call it from anywhere and it will list pages that are tied to the category you’re in.

UPDATE 0.020

Major update. I took out all the permalink tampering on the init calls. I finally found the better way to do subdomain redirecting. When Wordpress asks for the mod-rewrite rules, I filter them based on the current subdomain. It’s cool. It works. Whatever.

Now you can also bind static pages to categories meaning they have new category subdomain URLs, and you can make static pages their own subdomain.

You can also specify different themes for your subdomains. I don’t do that. I don’t know why you’d want to, but you can. Gibbity goo.

This plugin is now incompatible with Wordpress 1.5 — at least I’m pretty sure it is. I hope it is. Fuck you, non-believers.

The instructions for activating these features are in the plugin and the Options page once it’s installed.

OLD STUFF - pre 0.020

It inserts a filter into the permalink calls to write categories as subdomains. When the plugin gets a subdomained category as a requested URL, it php includes the properly formatted URL. I wish there was a better way to do it, but I couldn’t figure out how to instantiate and parse all the Wordpress stuff as quickly as I could put this together. I don’t know if you should even do that if you could. This works that’s for sure. I haven’t seen any downsides of using it, but if you do, post em here.

You can also exclude categories from getting subdomained on the Manage/Categories/Edit page. This feature, however, is only compatible with Wordpress 2.0

If you want the exclude feature to work on your Wordpress 1.whatever, you have to edit the wp-admin/categories.php file.

Open wp-admin/categories.php
Find this code around line 120:
header(’Location: categories.php?message=3′);
and add this line BEFORE the header call above:
do_action(’edit_category’, $wpdb->insert_id);

That will add a hook for the edit_category action, which is necessary to remember the customized settings. If you don’t want to exclude any of your categories from getting subdomained, you don’t have to do any of this shit. The plugin will still work.

UPDATE v0.015

Fixed the commenting database error bug.

UPDATE v0.013

Fixed a big logout issue with wp_logout. You would have only seen it if you had multiple users on the same blog.

UPDATE v0.012

Fixed the Next and Prev links. If they weren’t working for you, download the new one.

UPDATE v0.010

Added a checkbox in the Edit Category page to let you exclude categories from subdomaining. But why would you do that?

UPDATE v0.007

Fixed the subdomain login problems. Also changed the way the proper page is loaded. Read the code comments if you give a shit.

UPDATE v0.006

Fixed it so the subdomains show up everywhere. (Read that everywhere is a Clevleand voice from Family Guy)

UPDATE v0.005

Added a variable so you can customize your old-style category listings. For example, archives/category/cat_name instead of category/cat_name. Or whatever you had.

UPDATE v0.004

I changed the plugin so that it automatically 301 redirects all your old style category links:

blog.com/category/category_name -> category_name.blog.com

It also redirects your old post URLs IF you had them in the format blog.com/category_name/post-title.

Also, if you don’t like having wild card subdomains enabled, enable them anyway. The plugin redirects any subdomains that aren’t a known category to the main site. If you don’t want this feature, you can turn it off by editting the code ($sr_redir_wildcards = FALSE; line 22), or else just make a category with the name of the subdomain you want it to pass along. Whatever you want. It’s like a choose your own adventure kind of deal.

UPDATE v0.003

I have seen some trouble using this plugin with my other Wordpress Redirection plugin. You can trap yourself in an infinite redirection loop if you try and redirect your old links sitting out there on the web to your new subdomain structure.

For example:

biggnuts.com/category/work 301 -> work.biggnuts.com

That would fuck everything up, because Subster Rejuventation requests biggnuts.com/category/work internally.

To fix it, I just supplied a generic User Agent of “e” with the Redirection rule. That way the server passes through undetected because there’s nothing in it’s User-Agent. Cheezy? Yea. Whatever, fuck you. If you find any bugs, post them below.

I wrote this for work, so here’s the link for it on the Webguerrilla’s blog.

Known Bugs:

Yea. All your subdomain pages think you’re not logged in.

Tags: Wordpress Plugins

139 responses so far ↓

  • 1 Pavlo // Mar 27, 2006 at 3:32 pm

    Hello,
    I cannot make it working… Any help is highly appreciated.

    I have a WP 2.0.2 installation with 2 categories. Plugin is enabled.

    When I try category1.my-site.com or category2.my-site.com I always receive all posts from all categories and not posts from a single category.

    What can be wrong?

  • 2 hammer // Mar 27, 2006 at 3:35 pm

    What’s your site dude?

  • 3 Marc // Apr 7, 2006 at 11:12 am

    Olá

    first of all…Great plugin dude =) Really that is what i was looking for. But i have a Problem of getting it to work with “folded category list” because i own over 200 categories and need this plugin too…

    My thought was that i can make it each category and each undercategorie to a separate subdomain, is that possible?!

    Something like:

    Parent (parent.mydomain.com)
    >>>child (child.mydomain.com)

    And all childs collabsable trough the folded categories plugin…

    Now that i’ve installed your plugin on a testdomain i have the problem that the collabse only work when the parent cat isn’t subdomained but the articles i have in the childs didn’t show up when i click on the link, i only get an error message “resource not found”

    Take a look at flat-news.com if you like that’s the testdomain to try building a system like i tried to explain here^^ I f you can’t understand what i mean it’s maybe because i’m german and therefore my english is mhhh somewhat disturbed or so oO

  • 4 Marc // Apr 7, 2006 at 11:58 am

    Ah…andim on wordpress 2.0.2 the newest version…hope you can help me out with this problem. Would be really great =)

  • 5 Marc // Apr 30, 2006 at 10:31 am

    Thanks dude for the answer =/

    Your plugin is cool but your support for newbie questions sucks man!

    But anyway thanks for this plugin

  • 6 hammer // Apr 30, 2006 at 11:13 am

    Children won’t be made into subdomains.

    It’s possible with some tweaking, but it doesn’t do that right now.

  • 7 marc // May 8, 2006 at 10:54 am

    Dude! didn’t thought that you answer. NM. I kicked the plug because it didn’t worked, i had lng discussions with two hosts both of them only enabled it as C entry (don’t know if that matters) but after all each time i clicked on an categorie i got listed ALL damn posts from all categories instead only of category X that i’ve clicked.

    Maybe you have sometime a mood to extend this plug in the way mentioned above…would be cool. so cya.

  • 8 Garrett // Jun 9, 2006 at 11:09 am

    Plugin has made subs from my categories but when I click on a page it shows different posts from different categories. Why is this happening?
    Thanks, Garrett

  • 9 hammer // Jun 9, 2006 at 11:14 am

    Hey Garrett. Could you post the url this is happening on?

  • 10 Cristian Mezei // Jun 15, 2006 at 12:07 am

    Hey Dax. I tried to install this plugin in a 100% new wordpress install, on a new domain, just to see if it works.

    It creates the subdomains on the categories, but when i click them, it leads to nothing. Actually it doesn’t resolve the DNS.

    Do i need some special modifications to the DNS zone for this plugin to work ? Or what ?:)

  • 11 hammer // Jun 15, 2006 at 12:28 am

    Yes. You need to have wildcard subdomains turned on. Some hosts don’t even allow it. GoDaddy I’m looking at you.

  • 12 Cristian Mezei // Jun 15, 2006 at 3:09 am

    Oh yeah Dax. I added another DNS zone entry for that particular domain on one of my servers (screw Godaddy, I have my own servers), and added another line with *. with the same TTL and IP.

    Now it works. You’re a star :)

  • 13 Knowing Art by PJ Brunet // Jun 22, 2006 at 6:29 pm

    Subdomains for Google? Tag, you’re it!…

    Did subdomains just gain some new sparkle? The events that lured the subdomain genie out of of Google’s algorithm:

    June 15, 2006: Google CEO Eric Schmidt “dodges” subdomain question at Conde Nast Lunch.
    June 17, 2006: Digital Point …

  • 14 Blogalistic // Jul 3, 2006 at 1:13 pm

    Subdomains from Categories…

    Subster Rejuvenation makes subdomains out of your categories.
    Warning - I haven’t tried this yet, but I will in a few days. I have a how-to coming along and this plugin will be very useful for it if it does what it says.

    ……

  • 15 Mike Lopez // Jul 9, 2006 at 10:36 pm

    Perfect! Your 0.030 fix was perfect! Thanks.

  • 16 Matt // Jul 12, 2006 at 4:26 pm

    “Yes. You need to have wildcard subdomains turned on.”

    How do you do that?

  • 17 hammer // Jul 18, 2006 at 10:02 am

    Email customer service and ask if you can. Sometimes you can’t. In that case, get a new host!

  • 18 Luxocrat // Jul 23, 2006 at 12:41 pm

    I’ve been tweaking with the subdomain plugin for a couple days now and still can’t get my pages to come up. I know it must be a simple problem but I can’t figure it out for the life of me. And yes, i do have DNS wildcards enabled? Any clues/tips?
    Thanks
    http://www.s0urces.com

  • 19 hammer // Jul 25, 2006 at 10:02 am

    Hmm, that’s fucked. Do you have your permalink structure set up as %postname%/ ? That might help.

  • 20 mh // Jul 25, 2006 at 5:45 pm

    I’m hosted on godaddy, so perhaps I’m a lost cause here… but maybe you can help. I tried setting up a wildcard in my A (host) settings in the DNS settings and it let me do it, but the subdomains don’t seem to work. I get a ’subdomain.mypage.com could not be found’ pop up in my browster. So I’ve also set up an actual folder with mysubdomain name and set up a subdomain with that name through godaddy and now what I get is a “No input file specified.” when Wordpress links to it. If I delete the folder but have the subdomain set up with Godaddy, what I get is “Internal Server Error. The server encountered an internal error or misconfiguration and was unable to complete your request. (blah blah blah)”

    Is there any hope for my subdomain if I stay with Godaddy? Do I need to install Wordpress twice?

    Thanks!

  • 21 mh // Jul 26, 2006 at 9:16 am

    I figured out the godaddy issue.

    You CAN use Wildcard DNS on Godaddy and Subster Rejuvenation DOES work ONLY if you have a Dedicated IP address. (The customer service rep did not tell me this, though, so hours later I have figured it out.) It’s $2.99 a month extra.

  • 22 luxocrat // Jul 26, 2006 at 11:12 am

    Hmm, yeah i’ve got the URLs set up like that. =/. Anyone else having a similar problem out there? This is frustrating me to no end.

  • 23 hammer // Jul 28, 2006 at 9:42 am

    Ah, well $3 a month isn’t bad at all. That’s good to know mh. I’ll update the post.

    luxocrat, I’m still stumped on your install. If you know how to code at all, you can add some debug statements to the subster code. Put an echo “hi”; exit(); in the very top of the plugin right after the first < ?php

    That will at least let you know if the plugin is getting called. If it's not, it has to be a DNS/directory issue.

    I suspect a DNS/directory issue at the moment because http://subdomain-test.s0urces.com/ returns headers that are different than Wordpress’ default 404 headers.

  • 24 Tuppy Glossop // Aug 17, 2006 at 10:49 am

    I’ve installed subster on a nice fresh WP installation. Hostgator turned on wildcard DNS for me, and now some categories are working … Health & Finance seem to be OK, but Travel isn’t coming up.

    http://www.atthefamilyplace.com

    Any ideas?

  • 25 hammer // Aug 17, 2006 at 10:54 am

    First thing might be that you’ve got to have your permalinks turned on Tuppy. None of your categories are working at the moment.

    I use /%postname%/

  • 26 Tuppy Glossop // Aug 17, 2006 at 10:57 am

    One other thing … even on the categories that are working, posts from other categories are showing up too.

    Oh, in case it makes a difference … this domain is an addon domain to my main Hostgator account. The WP install is in the addon domain’s root folder, not that of the main account.

  • 27 hammer // Aug 17, 2006 at 11:01 am

    Try changing the link structure to permalinks first.

  • 28 Tuppy Glossop // Aug 21, 2006 at 6:24 am

    Thanks, that solved it. Cool plug in.

    But …

  • 29 Tuppy Glossop // Aug 21, 2006 at 6:28 am

    Now there’s a different issue. I just installed a plugin to automatically generate a Google sitemap. The plugin is called, surprisingly, Google Sitemap Generator and is by Arne Brachold.

    Google doesn’t like the sitemap it generated, because of the subdomains.

    Is anyone else using both Google Sitemap Generator & Subster Rejuvenation together? If so, are there settings I need to adjust to make it work correctly

  • 30 hammer // Sep 12, 2006 at 10:24 am

    I can’t say that I am. Can you link to the code, I might be able to take a look at it. It’s possible that either I’ve not covered a hook involving the generation of content links, or the plugin is a maverick renegade who’s generating it’s own content urls without calling WP functions.

  • 31 Brad // Sep 18, 2006 at 7:42 pm

    Hey I got the plugin working (sort of). It will work if I type in a subcatagoryname.voice2connect.com but if I just go to voice2connect.com it doesn’t work but http://aviation.voice2connect.com/ works

    Any ideas? I thought .htaccess was messed up, but looks good to me.
    # -FrontPage-

    IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*

    order deny,allow
    deny from all
    allow from all

    order deny,allow
    deny from all

    AuthName http://www.voice2connect.com
    AuthUserFile EDITEDFORSECURITY/service.pwd
    AuthGroupFile EDITEDFORSECURITY/service.grp

    # BEGIN WordPress

    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]

    # END WordPress

    -brad

  • 32 hammer // Sep 19, 2006 at 12:14 pm

    Hmmm that’s strange. Does it help if you change your permaline structure to /%postname%/ ?

  • 33 Brad // Sep 19, 2006 at 4:23 pm

    Well, I don’t know… now it wont let me in to edit… AHHH! Going to start over “again”… If I have this problem after re-install I’ll check the permaline.

    Thanks

    -brad

  • 34 Brad // Sep 20, 2006 at 12:35 am

    Well, it’s doing it again, when I turn on Subster Rejuvenation it will not go to the main page without typing in an existing category. I though, well I’ll make a blank category and a www category and that will fix it… Wrong… I’m beyond what I know of php (well beyond it). On the lighter side, I do have Adsense Injection working like a champ though. :-)

    Thanks, any ideas, help would be apreciated!
    -brad

  • 35 hammer // Sep 20, 2006 at 10:40 am

    Brad, this might help. I saw a problem similar to this on another server and I could never figure out why it happened.

    If you can, put the following line on line 331 of the file subster-rejuvenation.php and see if that cures your mystery non functioning homepage.

    if(!strlen($pot_category) && !strlen($pots[2])) return;

  • 36 Brad // Sep 20, 2006 at 3:36 pm

    I think I figured it out… some of my category slugs had & signs and spaces in them. When I edited them it worked!

    if I have the problem again I’ll try the code above.

    Thank you for the help

    -brad

  • 37 hammer // Sep 20, 2006 at 3:59 pm

    That’s good to know. That sounds like a bug to me.

  • 38 Dominic // Sep 28, 2006 at 2:05 pm

    If you hosting company does not allow wildcard DNS, will it work if you create the subdomains manually?

  • 39 hammer // Sep 28, 2006 at 2:20 pm

    A Yes.

  • 40 Lloyd Hannesson // Oct 10, 2006 at 11:12 am

    Great plugin but I have found one problem that is making it unusable in my install. I use the podPress plugin to serve out all my podcasts, for some reason the podPress plugin does not work well with this plugin. With them both activated the download file/play file links are not added to each post, and enclosures are not being created in the RSS feeds.

  • 41 hammer // Oct 10, 2006 at 11:21 am

    I don’t know how that plugin works. Maybe I could take a look at it.

  • 42 Lloyd Hannesson // Oct 10, 2006 at 11:55 am

    it’s wierd. It looks like some of the filters/actions are being applied as I get some podPress info in the header and footer,

    But things like:
    add_action(’the_content’, array(&$podPress, ‘insert_content’));

    are never being called as far as I can tell, atleast my echo’s are never getting to teh screen :) I know that you aren’t applying a filter or action to the “the_content” hook so I’m not sure where the podPress plugin is barfing.

    Hopefully you can give me some clues as to what is blowing up. I’ve also asked the podPress author if he can see what is wrong, so if I hear back from him I’ll be sure to post here as well just incase this error crops up with another plugin.

  • 43 sex cam // Oct 12, 2006 at 1:51 pm

    sex cam

    ltxdbgsyu bunsmuawqxu wfuhzwnxo

  • 44 Epper // Oct 18, 2006 at 12:53 pm

    Hi, this is a very good plugin!

    I’m working to make it function into my future redesign (not online now) and I’ve seen that the archive function only for months. Not for years.

    I mean
    http://cat.site.tld/2006/
    will show ALL the posts posted during the year 2006, and not only the ones in the category “cat”.

    I’ve seen that this could be solved by adding these lines:

    if(strpos($rule, ‘year=’) !== false)
    $rule = str_replace(”year=”, “category_name=$categorystr&year=”, $rule);

    at line 866, into the sd_rewrite_rules() function.

    Good work ;)

  • 45 bri // Oct 22, 2006 at 5:21 pm

    Hi,

    Cool Plugin–thanks much! I got it working, but the only thing is that I amunable to figure out how to specify a different theme for each category.

    The instructions say that I should edit the categories in order to specify the theme for each, but I am not seeing that option available when I try to edit categories–all that is on the edit categories page is “category name”, “category slug” , “category parent”, and “description”–no where to edit the theme associated with the category.

    Any ideas?

    thanks.
    bri

  • 46 mr // Oct 31, 2006 at 5:38 pm

    Has anyone ran into the problem that every sub domain is an archive?

    I am having trouble at http://www.beaverrock.com

  • 47 hammer // Oct 31, 2006 at 5:43 pm

    Uh oh. Check the Subster Options Panel in your Wordpress Dashboard. The first setting is a checkbox that makes all categories their own archives.

    Is that on by default?

  • 48 mr // Oct 31, 2006 at 6:54 pm

    I got that working, I had to mess with the templates… Probably the hardway. Now the sub domain templates do not show up right. Any ideas?

    http://samroberts.beaverrock.com for example.

  • 49 hammer // Oct 31, 2006 at 6:56 pm

    You know what, something might be messed up with that. Someone else just told me about a bug like that. Lemme look at it tonight.

  • 50 mr // Oct 31, 2006 at 7:05 pm

    Thank You very much, it has been driving me nuts. I can tell you one thing, absolute and relative paths don’t work.

  • 51 hammer // Oct 31, 2006 at 7:20 pm

    Add this at the bottom with the other add_filters

    add_filter(’stylesheet_uri’, ’sd_bloginfo’, 10);

    I don’t know if that’s a new filter or what. I couldn’t find it anywhere.

    Which of your absolute/rel paths don’t work?

    Thanks for the debugging info too.

  • 52 mr // Nov 1, 2006 at 2:06 pm

    no luck with the add_filter.

    I did notice that the style sheet for the sub domain theme is not called at all. The index themes sheet is called?

  • 53 mr // Nov 7, 2006 at 6:59 pm

    Any idea how to change the next button within the theme to work so it does not go back to the index theme?

  • 54 Jerry // Nov 24, 2006 at 8:22 pm

    Hey Dax,

    Plugin works great except for comments. With the plugin activated, I don’t see any comments regardless of which theme I use. Deactivate it and there they are. Is this an .htaccess thing you think? Thanks!

  • 55 Gebloggtes // Nov 27, 2006 at 1:55 pm

    Great Plugin, but the next/preview link on the subdomain categor doesn´t work…
    example http://buecher.gebloggtes.de/ the preview button makes: http://www.gebloggtes.de/page/2/ but it´s should be buecher.gebloggtes.de/page/2 what´s wrong? I installed the newest version of the plugin.

  • 56 Gebloggtes // Nov 28, 2006 at 4:15 pm

    WhatÅ› wrong i see this:
    http://witze.gebloggtes.de/jana-bach.php and
    http://www.gebloggtes.de/jana-bach.php
    i think this is 100% duplicate content and not seo friendly…i dont want pages on subdomains :-(.

  • 57 hammer // Nov 28, 2006 at 4:30 pm

    That’s because it’s broken. It’s supposed to redirect www’s to the new subdomain.

    Damn. I’ll fix it.

  • 58 hammer // Nov 28, 2006 at 4:55 pm

    Gebloggtes, Did you replace the Next Prev call in your theme?

    sd_posts_nav_link

  • 59 cbusgmvkyo // Dec 19, 2006 at 5:39 pm

    Hardcore

    culvlerdfie grjtnmc pkqhtqvyq rfgqkfsbkm ngtigysbw dzsskpelek pdfmmguakg

  • 60 ia // Dec 21, 2006 at 3:09 pm

    Quick question: How will this work with a subdomain installation? :P (Okay my brain’s not properly working right now… Pardon me.)

  • 61 Epper // Dec 31, 2006 at 7:08 am

    First of all, Great plugin ;)

    I’ve some problems with sd_previous_posts_link and looking the code for that function I’ve noticed that it echoes a url on the same category subdomain only if the first post displayed has that category as its first one.

    First Problem:
    If the “subdomained” category has other subcategories, even posts tagged ONLY with that subcategories will be shown on the parent category subdomain. That’s OK, but in this case the sd_previous_posts_link will echo a link to the previous page of the main domain and not to the previous page for the category subdomain.

    Example:

    I’m in “http://animals.domain.com” and the first post shown has these categories: “dogs,cats” (subcategories of “animals”). (OK)
    The problem is that, in this case, sd_previous_posts_link will link to “http://www.domain.com/page/2/”, but it should link to “http://animals.domain.com/page/2/”

    Second Problem:
    If the first post displayed in a “subdomained” category is tagged with that category, but that category isn’t the first in the category array for that post (get_the_category()[0]), sd_previous_posts_link will echo again a link to the previous page of the main domain and not to the previous page for the category subdomain.

    Example:
    I’m in “http://animals.domain.com” and the first post shown has these categories: “dogs,cats,animals”.
    The code will check if the first category of the first post (get_the_category()[0]) should be “subdomained”. Doing so the first category isn’t “animals” (it’s “dogs”) and so it will NOT echo “http://animals.domain.com/page/2/” as it should.

    Why don’t you simple increment the “page/num” in the URL?

    I hope I’ve been clear event with my poor english….

  • 62 Epper // Jan 2, 2007 at 6:37 am

    Another question:

    Which is the meaning of the variable $timeofchange ?

  • 63 Jeff // Jan 24, 2007 at 2:51 pm

    I am ultra new at Wordpress and plugins so bare with me please. I copied PHP to plugin directory and activated in Wordpress. I don’t know how to get subdomains working. Where is the variable Ichanged? in the PHP file?

    I am also getting this error

    [Table 'XXXXXX.wp_subster_rejuvenation' doesn't exist]
    SELECT not_subdomain FROM wp_subster_rejuvenation WHERE cat_ID = 1 AND not_subdomain = 1;

    Can anyone help me? thanks

  • 64 hammer // Jan 24, 2007 at 4:31 pm

    Hey Jeff, someone told me about that problem recently. It seems like the new Wordpress broke the install for this plugin. I’m going to fix it this week. For now you have to create the wp_subster_rejuvenation table yourself in the dB. You can copy the creation code out of the plugin php file.

    CREATE TABLE wp_subster_rejuvenation (
    cat_ID mediumint(9) NOT NULL,
    not_subdomain mediumint(9) NOT NULL,
    cat_theme TEXT NOT NULL,
    UNIQUE KEY id (cat_ID)
    );

    I hope to have this fixed soon.

  • 65 Jeff // Jan 24, 2007 at 5:28 pm

    Thanks for the help. This is a brand new WP install with empty db. That got me by the first error, but now i get the following when i post

    WordPress database error: [Duplicate entry '0' for key 1]
    INSERT INTO wp_subster_rejuvenation (cat_ID, not_subdomain, cat_theme) VALUES (”, ‘1′, ”)

    WordPress database error: [Duplicate entry '0' for key 1]
    INSERT INTO wp_subster_rejuvenation (cat_ID, not_subdomain, cat_theme) VALUES (”, ‘1′, ”)

    WordPress database error: [Duplicate entry '0' for key 1]
    INSERT INTO wp_subster_rejuvenation (cat_ID, not_subdomain, cat_theme) VALUES (”, ‘1′, ”)

  • 66 hammer // Jan 24, 2007 at 6:25 pm

    Uh oh. Looks like I need to upgrade to 2.1 to fix all the errors.

    Stay Tuned.

  • 67 Kimmono // Jan 25, 2007 at 4:30 am

    Hello Dax :)

    Yes, seems there a issues with WP 2.1. I get this error when I edit a post:

    WordPress database error: [Duplicate entry '0' for key 1]
    INSERT INTO wp_subster_rejuvenation (cat_ID, not_subdomain, cat_theme) VALUES (”, ‘1′, ”)

    Warning: Cannot modify header information - headers already sent by (output started at /home/xxxxxx/public_html/wp-includes/wp-db.php:121) in /home/xxxxx/public_html/wp-includes/pluggable.php on line 275

    Could you also add a “subscribe to comments” plugin for your site? That would make it easier to keep track of posts I want to watch on your site :-)

    Thanks for excellent work!

    Kim

  • 68 Kimmono // Jan 29, 2007 at 9:23 pm

    Do you have an idea if you will be able to upgrade to WP 2.1 compatibility soon, Dax?

    I dont want to be a jerk and give you too much hazzle…but I am in kind of a problem as I put my biggest client on a wp/subster platform and now it just dont work :(

    Keep up the good work, m8!

  • 69 hammer // Jan 30, 2007 at 12:00 am

    I’ll look at it tomorrow morning. Unfortunately upgrading the plugin means upgrading my blog

  • 70 Kimmono // Jan 30, 2007 at 6:47 am

    Thats great news to hear, Dax :-)

    Hopefully the process of updating your site will go smooth. How many plugins do you run your site? It seems to load pretty fast from Norway.

  • 71 Kimmono // Jan 30, 2007 at 2:14 pm

    I am sorry to hear that you went into troubles for updating the plugin :(

    Hopefully you can fix it soon.

    Btw, I get an error still after updating to the new version. It is related to pages and not posts.

    This is the error msg I get when I try to access the pages:

    WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND not_subdomain = 1' at line 1]
    SELECT not_subdomain FROM wp_subster_rejuvenation WHERE cat_ID = AND not_subdomain = 1;

    Warning: Cannot modify header information - headers already sent by (output started at /home/vhorg/public_html/wp-includes/wp-db.php:121) in /home/xxxxxx/public_html/wp-content/plugins/subster-rejuvenation.php on line 412

    Warning: Cannot modify header information - headers already sent by (output started at /home/vhorg/public_html/wp-includes/wp-db.php:121) in /home/xxxxxx/public_html/wp-content/plugins/subster-rejuvenation.php on line 413

    This is the page I tried to access: http://www.visithaugesund.org/destinations/.

    It is the same issue for all the pages. Maybe it is related to the fact that in the new WP version, all pages also have categories and that they are shared with post categories?

  • 72 hammer // Jan 30, 2007 at 2:40 pm

    Are you sure you’ve got the new version of subster? 0.037?

  • 73 Kimmono // Jan 31, 2007 at 3:42 am

    Yes, I am 100% sure.

  • 74 senseisays // Jan 31, 2007 at 4:40 am

    Hiya Dax,
    I’ve installed 0.037 and am having some issues with subcats and posts in subcats. The top-level categories work okay in that the rewrite rules seem to take effect, but trying to navigate to subcats throws 404 errors.
    I’m going to wander through the code in a day or two, but if you have any ideas to share in the meantime, that’d be good.

  • 75 hammer // Jan 31, 2007 at 10:46 am

    Is it at SenseiSays.com? Because those categories seem to work for me.

  • 76 hammer // Jan 31, 2007 at 10:50 am

    Kimmono, could you give me another url where this error shows up. I was browsing just now, but couldn’t find any.

    Did you fix the bug perchance?

    Also, you need to have the www in your URL for your site. Some of your sidebar links don’t have the http://www. If it’s not set in the Options, it’ll screw up.

  • 77 senseisays // Jan 31, 2007 at 2:16 pm

    The categories work, but trying to browse to the single posts themselves causes a 404. Hmm on closer inspection, some of them look like they’re working, and some don’t.
    The ones that work don’t use the rewrite rule (ie they point to http://www.senseisays.com/ whereas the ones that don’t work use the rewrite and the subcat name before the post. The sidebar isn’t displaying the subcats either. Looks like I need to explore the code a bit more.
    I’ll let you know what I find.

  • 78 Kimmono // Jan 31, 2007 at 4:16 pm

    I have deactivated the plugin and run without it now. I never used http://www. in front of the URL before with subster…but that has still always worked well for me.

    If you think that will solve the problem, then I will change the site to with http://www. in front.

    I just hope Google doesn’t get a headache of all my redirects back and fourth :-)

  • 79 Kimmono // Jan 31, 2007 at 4:49 pm

    That did not solve the problem. It is the same problem with Pages.

    I need to change it back so that Pages are viewable again.

  • 80 Kimmono // Jan 31, 2007 at 5:25 pm

    If I go to this page on your site now:

    http://www.biggnuts.com/pokemon-woah/

    ….then I end up on this page:

    http://uncategorized.biggnuts.com/pokemon-woah/

    Dont you think that is where the problem is?

    Kim

  • 81 Kimmono // Jan 31, 2007 at 5:26 pm

    If I go to this page on your site now:

    http://www.biggnuts.com/pokemon-woah/

    ….then I end up on this page:

    uncategorized.biggnuts.com/pokemon-woah/

    Dont you think that is where the problem is?

    Kim

  • 82 hammer // Jan 31, 2007 at 5:44 pm

    Hmmm, that very well could be. The plugin tries to redirect anything that’s not the correct URL so you don’t get a bunch of duplicate content. If all WP pages are now in categories, that’s probably what’s messing up. Lemme look at this a bit more tomorrow.

    Strange that that would crash your site though.

    Thanks for the example.

  • 83 Kimmono // Jan 31, 2007 at 7:16 pm

    Great, you are an angel, dax! :)

  • 84 senseisays // Jan 31, 2007 at 10:45 pm

    Okay, fixed the sidebar not displaying thing - it was unrelated.
    The subcats are now displayed, but they 404 when you click the links.
    In terms of the intermittent posts working, it appears that the ones that work are part of a subcat that has at least one post linked to its parent cat. The subcats whose posts are not shared with the parent cat are all failing.

    Haven’t gotten to the bottom of why this is yet, but maybe the above will help somehow.

  • 85 senseisays // Jan 31, 2007 at 11:32 pm

    I had to mod the next/previous link functions for paging through posts.
    line 565, I had to move the slash to the beginning of the definition of $kid_string, otherwise, I get no slash at the end of the domain name and a double at the end of the subcat.

    On my site, the $kid_string definition is being called when it shouldn’t. The definition of $this_category seems to grab the category of the first post in the page. If that category is different to the one you’re actually browsing, you’ve got problems. Given that parent cats list the posts of their subcats by default, that’s going to happen quite a bit.

  • 86 Diego // Feb 1, 2007 at 7:32 am

    It worked perfectly for me!

  • 87 Kimmono // Feb 2, 2007 at 7:01 pm

    Did you find out anything more, Dax?

  • 88 Alex // Feb 2, 2007 at 11:52 pm

    Hi,

    I have installed the 0.037 version on wp 2.1 but it doesn’t work. the categories don’t show up on the subdomains. any ideas?
    in the plugin info it says: “Replace posts_nav_link with sd_posts_nav_link”.
    in which files? the plugin itself? I tried and it didn’t help.
    I didn’t try replacing this in other files… maybe that’s the reason it didn’t work?

    Thanks for your time :)

  • 89 hammer // Feb 3, 2007 at 10:07 am

    Hey Alex, you gotta replace it in your theme files. For example, the single.php or index.php file in your theme’s directory.

    There seems to be some other bugs with 2.1 I’m still trying to work them out.

  • 90 Kimmono // Feb 3, 2007 at 1:13 pm

    Thanks for still trying, Dax :-)

    I have put the site fully back to pre-subster mode, but will take another try when you release an updated version.

    Have a nice weekend, Dax!

    :)
    Kim

  • 91 Alex // Feb 3, 2007 at 2:19 pm

    Hmm…. I’ve checked and the term “posts_nav_link” doesn’t appear in any of my theme files… I’m currently using the default theme…

    that’s strange…

    well, I guess I’ll wait for the updated version for wordpress 2.1
    thanks in any case :)

  • 92 Benj Arriola // Feb 3, 2007 at 10:33 pm

    I just upgraded to 2.1 on one of my blogs, plugin did not work. Shows me the 404 page. I’ll see what clues I can find why it’s not working. If I can’t find anything, oh well, downgrading then to WP2.0.5 :D

  • 93 Diego // Feb 12, 2007 at 12:19 am

    I’m the only one with no problems using this great plugin in 2.1? I remember the 404 page but I don’t have that problem anymore (don’t ask me how I fixed it because I can’t remember but if the plugin had something wrong I’d remember what I did to fix it and this is no the case)

  • 94 Tim Linden // Feb 15, 2007 at 4:31 pm

    I am trying to use it on nichenetwork.net - The problem I am having is that health.nichenetwork.net lists correctly, but health.nichenetwork.net/diabetes/ does not.

    I think it has to do with the permalinks. If I use the category in the permalink it will goto health.nichenetwork.net/health/diabetes/(article) but if I don’t put it in, it’ll goto health.nichenetwork.net/(article)/ and skip the sub category diabetes

  • 95 Greg // Feb 28, 2007 at 9:02 pm

    Using a fresh clean install of wp 2.1, I installed Subster. The subdomains work, although not with the exact behavior expected.

    The site name is blog.site.com

    Subster creates the right categories, although they show up as category.blog.site.com (I would rather have it be category.site.com)

    Anyway, the permalinks are not working, nor are the date archives.

    Any ideas?

  • 96 hammer // Feb 28, 2007 at 11:18 pm

    Hey Greg. Subster wasn’t designed to work with anything but http://www.blogname.com

    I’ve never tried it on a subdomained install of wordpress. I can look at it, but I don’t know how easy it would be to add that feature. It looks like there’s still some bugs to get worked out of it for 2.1 first. I just haven’t had time recently.

  • 97 Greg // Mar 1, 2007 at 6:15 am

    Hmm ok, I see what you’re saying.

    The plugin is working fine with exception to the permalinks on each article and messages archives, blog.liveammo.com is the weblog.

  • 98 Glenn // Mar 7, 2007 at 2:49 pm

    I tried to implement the plugin for WP2.1.1 and although I could see the subdomain when my cursor rolled over the category - the subdomain did not come up. Has the plug-in been revised or changed for WP2.1.1?

  • 99 Greg // Mar 9, 2007 at 9:34 pm

    Hey I would like to get the subdomain functionality working with Subster, ie http://www.company.com is the main website, blog.company.com is a weblog, and keyword.company.com is a Subster subdomain category. Do you do any consulting work, and if so, how much would you charge to integrate this functionality and roll it into the open source release of Subster?

    Thanks

  • 100 Benj Arriola // Mar 10, 2007 at 10:26 pm

    # Benj Arriola Says:
    February 3rd, 2007 at 10:33 pm

    I just upgraded to 2.1 on one of my blogs, plugin did not work. Shows me the 404 page. I’ll see what clues I can find why it’s not working. If I can’t find anything, oh well, downgrading then to WP2.0.5 :D

    Someone I know running WP 2.1.2 had no problems when he disabled the WP-Cache plugin. I tried upgrading another blog using the subdomain plugin I indeed had no problems on 2.1.2.

    Now I still have to find out what is causing my problems on Action Online. I am still figuring out the real problem as I downgraded it back to 2.0.5.

  • 101 Benj Arriola // Mar 10, 2007 at 10:34 pm

    Wordpress 2.1.x seems to combine post categories and link categories into one table. And the subdomain plugin creates subdomains for link categories.

    I took a peak at the wp_categories table an there are two columns:

    category_count (number of blog post in that category)
    link_count (number of links in that category)

    So I guess the Subster Rejunevation plugin needs to check if category_count != 0;

    Hope this helps in the future development of this plugin. I think the WP guys should integrate it already in the future versions.

  • 102 Benj Arriola // Mar 10, 2007 at 10:37 pm

    Wow, my other comment seemed to be filtered out. Maybe because of the links in it. Anyway…

    I quoted myself:

    ===========
    # Benj Arriola Says:
    February 3rd, 2007 at 10:33 pm

    I just upgraded to 2.1 on one of my blogs, plugin did not work. Shows me the 404 page. I’ll see what clues I can find why it’s not working. If I can’t find anything, oh well, downgrading then to WP2.0.5 :D
    ===========

    But I tried it on: http://www.sacredheartacademy.net and it worked fine. But not on http://www.actiononline.biz. I am still figuring out why.

    I was informed by a friend of mine, http://www.mikelopez.info that his did not work when the WP-Cache plugin was enabled. But I do not have that plugin and I will still figure out what is making it not work on my other blog.

  • 103 Benj Arriola // Mar 10, 2007 at 10:39 pm

    Wait maybe I spoke too soon about:

    ======
    So I guess the Subster Rejunevation plugin needs to check if category_count != 0;
    ======

    I upgraded to WP2.1.2 but I did not check if my Subster plugin is the latest. I’ll check.

  • 104 hammer // Mar 13, 2007 at 2:22 pm

    Sorry I haven’t been able to get to everyone’s problems on here. I’ve been fucking swamped.

    As you can probably tell by the sorry state of my own theme.

  • 105 Greg // Mar 13, 2007 at 5:05 pm

    Set up a donation fund for the various issues, I’ll contribute $$$ to fix the www issue (and requirement for http://www.blog.com issue) as well… :)

  • 106 Farmblecrunk // Mar 23, 2007 at 7:51 am

    What’s up with this gay unsupported plugin.

    It doesn’t work on the most recent versions of wordpress.

    Nice pictures though.

  • 107 hammer // Mar 23, 2007 at 11:42 am

    That’s constructive.

    I just fixed an install bug that might have been giving anyone a “table not found” error all over the place after install.

    Try the new one.

    The problem is that the plugin works on all my blogs. If anyone wants to give me ftp access and admin access on their blog while I fix it, I can do that. Any volunteers?

  • 108 Greg // Mar 24, 2007 at 12:53 am

    Dax,

    I’ll volunteer to give you access to our server in re: the subdomain issue. We would like to get this working where the blog is actually a subdomain, ie blog.company.com instead of the blog being http://www.company.com. We would be willing to compensate you for your time as well, please contact me via email for details.

    Regards

  • 109 wminside // Mar 25, 2007 at 7:26 am

    Hi Dax, when a post is under more than one category I would like to know how the plugin choose one of them to make the URL with the subdomain cuz if it’s randomly and you reinstall the plugin URLs may have changed.

  • 110 pvft // Apr 20, 2007 at 10:13 am

    I installed the most recent version of Subster with wp 2.1 yesterday, the subdomains are working properly but everything else breaks. For example, the date archives don’t work (page not found), nor does any of the options to edit a page. I have tried every combination of permalink structure, to no avail.

    Any ideas why these other areas are broken?

    Thanks!

  • 111 steve // May 14, 2007 at 1:30 pm

    do we have to manually update the .htaccess file?

    I installed WP 2.1.3
    Installed Sub R .038

    I get the links to show correctly
    I click and get 404’s

  • 112 hammer // May 14, 2007 at 3:10 pm

    No, you shouldn’t have to update the htaccess file.

    Your main blog needs to start with http://www. though.

    Sorry!

  • 113 steve // May 15, 2007 at 3:24 pm

    ok, nothing other than the main blog be at http://www.domain.com, uploading the plugin, activating it and categories should now be subdomains….

    I get that, but still get page not found :( please see at http://www.andgirls.com

  • 114 Benj Arriola // May 16, 2007 at 11:48 pm

    Updated to: WP2.2 on http://www.actiononline.biz and still did not initially work. But I also had a comment table problem. I lost all comments. wp_comments was corrupted and could not be repaired after several tries. So I just dropped the table, made a new one.

    Still it was not working.

    I decided to disable my CAPTCHA plugin, and Subster Rejuvenation worked. So do I remove the CAPTCHA or the subdomain plugin? The CAPTCHA of course! Who needs that is Akismet does a good job already. :D

    Subdomain plugin Rocks!

  • 115 Benj Arriola // May 17, 2007 at 8:40 pm

    I thought everything was ok… for some reason a subcategory with a date permalink won’t work.

    http://category.domain.com/subcategory/yyyy/mm/dd/post-slug/

    WP Error 404

    But simply delete the subcategory…

    http://category.domain.com/yyyy/mm/dd/post-slug/

    The page is going to come out.

    It works though with the default permalink. But the search engines already know about my long date permalink. And btw, I installed WP2.2 already. Not sure if that is causing the problem.

  • 116 CodeIsLogic // Aug 1, 2007 at 7:21 pm

    I have made a breadcrumbs plugin which is specifically designed to work with subster rejuvenation. It is available here: http://php.codeislogic.com/subster-rejuvenation-breadcrumbs

  • 117 hammer // Aug 3, 2007 at 1:08 pm

    Hey awesome dude! I’m glad the plugin works for someone!

  • 118 lee // Aug 24, 2007 at 1:13 am

    hi, i had activate the plugin, change permalink to %postname%, and .htaccess is CHM777 but still i cannot get it to work right. http://www.myblog.com is ok when going to the subcategory ie. http://www.myblog.com/category should show me http://category.myblog.com/“maybe postname here” but i cannot get it rite?

  • 119 lee // Aug 24, 2007 at 4:01 am

    maybe this is a answered Q but i really dun have the idea to get it run the hosting dosn’t allow to edit the DNS info so only manual way can anyone please show? TQ

  • 120 Wordpress Plugins // Sep 25, 2007 at 3:53 am

    This is a great plugin. I use it successfully on many blogs unto Wordpress 2.2

    Tried it on Wordpress 2.3 just now… and this doesn’t seem to work.

    Hammer - thanks for this great plugin. Any plans to update it to work with 2.3?

  • 121 Alan // Sep 25, 2007 at 10:13 am

    Hi

    I have tested on WP 2.3. Subster seems to be causing errors lke:

    WordPress database error: [Table 'db20554_alanwhotest.wp_categories' doesn't exist]
    SELECT * FROM wp_categories

    I love Subster so much that I am not going to upgrade to 2.3 just yet. But anyone have any ideas how to fix these errors?

    Alan.

  • 122 Web Hosting Promo Codes // Oct 4, 2007 at 2:50 am

    Hi Dax,

    Any plans on upgrading this plugin to WP 2.3?

    Your plugin is essential to us, and apparently it doesn’t work with the newest version of WordPress.

    Thanks in advance!

  • 123 hammer // Oct 4, 2007 at 12:37 pm

    Crap, sorry. I have a shitload to take care of at the moment.

    It’s probably a simple error. Which means I have to upgrade to 2.3 myself to fix it. I hope to do it by Monday.

  • 124 Concept cars // Oct 10, 2007 at 1:03 am

    I have 404 error after activating this plugin on all my links to subdomains.

    My blog is on WP 2.2, and with www in domain.
    I watched .htaccess file but it has no changes from the moment of WP installation. Should there anything be changed?

    There should be some manual for sure, I’ve searched web for it but have not found anything.
    Something that describes steps like manual installation with what DB tables should be created and what changes to files should be made.
    So anyone can check for those changes and make them if they were not made automatically.

  • 125 Tom // Oct 14, 2007 at 4:58 pm

    Any luck with upgrading this to work with version 2.3?

  • 126 WP Themes // Oct 19, 2007 at 8:46 am

    Nice Dax, hope you get to fix it for Wordpress 2.3. I’m using it on a couple of sites and I hope I’ll be able to upgrade soon.

  • 127 Malta // Oct 25, 2007 at 4:07 am

    Will this plugin work with wordpress 2.3?

  • 128 Mike // Oct 29, 2007 at 3:55 am

    Could you please update this module for version 2.3?

    I’m sure you’d get many donations!

    Thanks

  • 129 jay // Nov 1, 2007 at 8:51 am

    any news on the wp 2.3 fix?

  • 130 Naveen // Nov 9, 2007 at 12:32 am

    will this plugin will work on wordpress without making any dns setting.

  • 131 Guillaume // Nov 9, 2007 at 10:51 am

    Pleaze update this for wordpress 2.3 ! I will donate !

  • 132 Blogger SEO // Nov 17, 2007 at 3:32 pm

    O.K. So here is this plugin…
    Just wondering if you’ll be updated it to make it cross version compatible with WP 2.0x and WP2.3x?

    Thanks.

  • 133 Hammer // Dec 20, 2007 at 10:34 pm

    Still busy designing buttplugs and reading Das Kapital, sorry no time to update.

  • 134 Florin Costache // Dec 24, 2007 at 8:43 am

    Hey guys, I had a friend of mine update the plugin for WP 2.3.x. Download it over at:

    http://florincostache.name/subster-rejunevation.phps

    Hope it helps!

  • 135 Jesse Lee // Jan 2, 2008 at 12:45 am

    thank you florin, the code works well.

  • 136 Johan // Feb 3, 2008 at 3:03 am

    Hey,

    I’m trying to use it on my website,
    but always get on the subdomain’s :

    Apache is working on your cPanel® and WHM™ Server

    but when I click on the categories
    (url blbabla.domain.com)

    What I already done?
    - enable wildcards, * 14400 IP
    - add some line in httpd.conf

    DocumentRoot /home/{CPANEL_USERNAME}/public_html
    BytesLog domlogs/{YOUR_DOMAIN}-bytes_log
    User {CPANEL_USERNAME}
    Group {CPANEL_USERNAME}
    ServerAlias {YOUR_DOMAIN} *.{YOUR_DOMAIN}
    ServerName http://www.{YOUR_DOMAIN}
    CustomLog domlogs/{YOUR_DOMAIN} combined

    Somebody know how to fix this?

  • 137 jay // Feb 14, 2008 at 8:43 am

    Finally the WP 2.3 fix :)

  • 138 Paul // Apr 9, 2008 at 9:00 am

    Has anybody tried this with Wp 2.5 yet? Curious if it works . . . .

  • 139 Adam Dempsey // Apr 11, 2008 at 6:30 am

    I have just updated this to work for Wordpress 2.5 at http://demp.se/y/software/category-subdomains

Leave a Comment