Dax

User Gulag

February 1st, 2006 · 3 Comments

out-of-reach.GIFThis plugin restricts users’ posting and editing rights based on which category they’re adding/editing in.  You can define per category editing rights!  That’s especially cool when you combine this with the Subster Rejuvenation plugin.  Then you can have different themes for subdomained categories and have like a whole new blog that other people can fuck with but it’s all under the same admin panel.
What you do is, install it, then give the user a role like Contributor or Editor and then go to the Options/Gulag menu to set their category permissions.

If you have no boxes checked for a user, then they have access to all the categories.

Use this in combination with Winkleman’s Role Manager plugin for some cool results.  At least I think so.  I haven’t tried it.

DOWNLOAD User Gulag v0.5

→ 3 CommentsTags: Wordpress Plugins

Content Filtron

January 19th, 2006 · 4 Comments

content-filtron-quiet.gifIf you have some Adsense on your blog (or whatever the Yahoo one is called. I don’t remember) you probably have a lot of shitty ads showing on it. That’s why bloggers make like 20 dollars a month on average. Because for every one ad they show for purses or computers or some shit that makes money, they show a million ads for blogger or blogspot or LiveJournal. Guess how much those ads pay. Not a damn thing.

Content Filtron lets you set some words that you want filtered out or filtered into other words. For example, turn “Link Condom” into “Penis Condom”. Turn “blog” into “discount rolexes” whatever you want. The world is your oyster.

Right now it just works for the title and content of your post.

Download Content Filtron v0.3

To install just copy it where it should go.

UPDATE v0.3

Now all replacements are case insensitive.  PHP 5 or no!

UPDATE v0.2

Fixed “Let me see”
Case insensitive search and replace (requires PHP 5)
Effects post title

→ 4 CommentsTags: Wordpress Plugins

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.

→ 139 CommentsTags: Wordpress Plugins

Objection Redirection!

January 11th, 2006 · 22 Comments

redir.gifI upgraded my old site to Worldpress and damned if I don’t have a million 404’s now.  Including a bunch of pictures of Spongebob and Doodlebob that I drew that apparently a dozen people hotlinked.  Fuckers.

I wrote this to redirect incoming traffic without having to fuck with the .htaccess file.  I hate that file.

Download Objection Redirection v23.0

To install, unzip the files into your plugins directory.  You must have the objection_redirection_gogogo file in your wp-content/plugins directory for the plugin to work.  If you mess everything up and you need to turn off the plugin, but can’t get back into your admin page, DELETE THE OBJECTION-REDIRECTION-GOGOGO FILE.

UPDATE v23.0

I put a failsafe file in the plugin so you can’t completely fuck your blog over and put it in an endless loop forever.

UPDATE v22.0

Fixed the infinite redirect condition where your blog.com -> www.blog.com would loop infinitely.  That’s no damn good.  You can now use http:// in your URL requested field to mark the start of a URL.

http://biggnuts.com -> www.biggnuts.com

That’s the best way to redirect your non-www traffic. 

I think it’s pretty self-explanatory.  When you install it, it creates a new table in your dB and gives you a new option page.  The plugin matches from one to three rules of incoming traffic.  The User Agent, the incoming URL, and the Referer URL.  If they match your settings, then the plugin either redirects the whole thing, or replaces the part that matches with a new part and redirects.  It’s up to you.

The plugin also does either 301, 302, or 307 redirection.  Those don’t really matter unless you’re some kind of SEO slimeball who ruined the internet.

I wrote this for work, so here’s the thread on Heir Boseir’s blog.  Let me know if there are any problems.

UPDATE: This plugin seems to have som pretty confusing instructions. I’m going to change it and throw in some defaults this week (I hope). For now, I’m including this screen shot of my settings. It should help you out.or-example.jpg

→ 22 CommentsTags: Wordpress Plugins