Dax

Increase Draft Limit: WP Plugin

February 8th, 2008 · 10 Comments

In addition to secretly wrecking the Object Caching Database in one of their recent releases, Wordpress also removed the usable number of drafts from the Write Post page.

In previous Wordpress versions, your Write Post page listed a few dozen drafts. Now, it lists 3 and I don’t think they’re in any kind of chronological order. In addition, I found the new search and sort system they devised to wade through all your old drafts to be monkey shit. For example, where in the flying fuck are the page numbers? That’s why I wrote this plugin.

Increase Draft Limit will show all of your drafts on your Write Post page. If you want to limit that to 10 or 20, just open the file and change 99999 to 10 or 20.

Download Increase Draft Limit

→ 10 CommentsTags: Wordpress Plugins

No Default!

March 20th, 2007 · 8 Comments

no-default.gifDownload No Default! v1

If you have a lot of clients who blog or parents who blog and they just can’t seem to remember to put their posts into categories, slap this plugin down.

No Default! pops up a little javascript box if they didn’t choose a category and it won’t let them submit or save until they do.

Now you just have to answer the question of “Why didn’t my post save when I wrote it, saved it, and a little error box which I didn’t read popped up before I walked away?”

The tricky bits in this plugin are the methods you need to call to stop Javascript from submitting a form after submit.

In IE, you have to use attachEvent(’onsubmit’, checkCategory) to catch the submission, but in Firefox it’s addEventListener(’submit’, checkCategory, false)

Also in Firefox, returning false from your onsubmit function doesn’t work because it’s not supposed to. Call e.stopPropagation() and e.preventDefault() to halt the form submission.

Why would I say all that? Because Google was very little help while I was trying to figure it out in the first place.

→ 8 CommentsTags: Wordpress Plugins

UserGasm!

October 10th, 2006 · 10 Comments

usergasm.GIFOne of the features Wordpress is lacking over the other CMSes that I’ve worked with is user profile pages. Like Drupal and others. I tried to set some up within the Wordpress framework and all I could find was shit about the author.php template. I don’t think that works. At least I couldn’t get it to work for registered users who weren’t authors and/or didn’t have any posts of their own.

If you want to give all the registered users on your blog their own page (for example http://www.biggnuts.com/user/biggnuts/) then just install this plugin. You can also make ALL the comments on your blog automatically point to their user profile page instead of their individual URLs.

UserGasm also gives you a list of all your registered users.

Check it out in action biggnuts.com/user/

I don’t have any users on my blog, so it doesn’t look cool, but you probably do.
I hope this functionality doesn’t actually exist and I missed it — because then I wasted my time.

HOW TO INSTALL

DOWNLOAD USERGASM v1.0

1. put the usergasm.php file in your plugins directory
2. put the user.php and users.php file in your active template directory

That’s it. If you want to customize the user and users pages, that’s up to you. There’s a crapload of variables to pull from. Also, if you’re using this plugin and you have more users than me, post it here so people can see. I set up some test users.

The users.php and user.php files might take some tweaking for your theme. They did on mine, but that’s because I totally screwed my theme up.

→ 10 CommentsTags: Wordpress Plugins

Referral Feed

August 17th, 2006 · 2 Comments

drug-dealer.gifThis is about as quick and dirty as quick and dirty plugins get.

The most fun part of having a website is seeing where all the people that come to it come from. That’s why the DigitalPoint visitor mapping tool is so rad and sweet.

To keep you from obsessively checking your logs, I wrote a wordpress plugin that generates an rss feed of the last 25 referrals and where they ended up on your site. You could check mine by visiting http://www.biggnuts.com/referrals_rss.php, but oops I password protected it too. This way, you can just load up your rss referral feed in Sage or whatever you use and click the little deal to get up to the minute visitor info.

Here’s how to install.

DOWNLOAD REFERRAL FEED v 2.0

Then set the password inside the file before you upload it. The password is on line 24 and is blank by default.

$rf_password = “”;

You can leave it blank, but then if you have a link to your site in your signature file on like My Little Pony forums, someone will eventually find out. Change it to:

$rf_password = “yourpassword”;

Upload to your plugin directory.
Activate it.
Go to http://yoursite.com/referrals_rss.php?pass=yourpassword

Dibbity doo.

(If I misspelled referer or referral anywhere, please do not tell me)

UPDATE v2.0

Storing the whole deal in the database now. Now you don’t have to change a bunch of permissions and shit. Just upload and go.

UPDATE v1.2

I added some nicer formatting for searches that come from Google. Also, I was afraid this thing might leak your password if you’re viewing the feed in some weird way (passing the password via a referral to a nosey site) but I don’t think it will. I can’t get it to do so anyway.

→ 2 CommentsTags: Wordpress Plugins

Link A Dink

July 25th, 2006 · 55 Comments

fuck-up.GIFThis plugin replaces words in your posts with anything you want. I use it to replace words with links. For example, if you see my sister’s name, Ashley, anywhere on the site, it will link to a picture of her.

Upload it, install it, then go into the Link A Dink settings page in your Options.

Alright cool.

DOWNLOAD v 1.8

UPDATE v1.8

Fixed for WP 2.1.

UPDATE v1.7

Plugin now adds hyperlinks to comments.

UPDATE v1.6

Oops! Link A Dink was messing up images. I reconfigured it to strip out all tags before replacing words.

UPDATE v1.5

If a word is already in a hyperlink, Link a Dink will no longer butcher your link. For example. In this link: Ashley is already linked, but in this one, Ashley is not. Link a Dink should have ignored the first.

UPDATE v1.1

Okay, the plugin was a bit fucked up there. I pulled the limiter out so it replaces all occurrances of a word. I also made the plugin only effect whole words. If you put in “it” in to get replaced, it will only replace “it” — capitalized or not. There’s a boolean variable at the top of the file you can set to false if you want to replace any occurrance of your word.

Just set $lad_single_words = false; if you want

→ 55 CommentsTags: Wordpress Plugins

Adsense Injection

May 21st, 2006 · 358 Comments

doctor.JPGAdsense Injection!

DOWNLOAD v2.0

DOWNLOAD v1.9

I was looking for a simple simple Wordpress plugin that just inserted Adsense code randomly into a pre-existing blog. All the ones I found would only replace an Adsense comment with Adsense code. That’s great if you want to go through every article you have and post little adsense tags, but for a site that has some bulk to it, it sucks.

It also increased banner blindness by keeping the ads in the same place time after time.

My new Adsense Injection plugin just takes a random paragraph (or br tag) break in your article and inserts adsense code. It does one per story on multi-post pages (home, archive, category) and let’s you pick how many to show on single post pages. It lets you pick how many total ads to show at any time as well (0-3) and it lets you set the formats and colors you want it to randomly select from.

I’m using it on this blog if that gives you an idea of how it works.

Version 2.0 Let’s you show YPN ads as well as Google, although I can’t test it because they wouldn’t give me an account in their precious beta launch. : (

If you want to keep ads from displaying on specific posts, use the tag in the post HTML somewhere. I do that on a few posts on this site. Go look for them. It’s like a treasure hunt where no one wins!

If you want to keep ads from displaying above a certain point in a post, use the tag in the post HTML where you want it to start.

Here’s an example of how to fill out the Adsense Injection Options page. Use your own adsense ID.

adsense-example.gif

UPDATE 2.0
Checkboxes for
Do not show me my own ads
Put google_adtest=”on”.

I guess you can screw up your stats by looking at your own ads. Lame.
You can now pick either YPN ads, Google Ads or randomize them.
adsensestart tag now exists for people with images and whatnot
You can ad multiple ads on single page posts to really cram ads down people’s throats. Yeehaw!

UPDATE 1.9

Added a center alignment option. I also made the plugin work for people who don’t use the wysiwyg editor. It splits the post on <br instead of the paragraph tag. Giggidy gee.

UPDATE 1.8

Bit of a stupid paragraph tag ruining bug fixed today. If you were having problems before, this should fix it.

UPDATE 1.7

Put a new ad size in the code. Also, Danny from k2xl.com had the cool idea of putting a tag in a post or page that would prevent AdSense ads from being displayed. Now, if you put <!–noadsense–> in a post or a page, no matter what the other settings are, no ads will be displayed in that post anywhere. Category pages, archives, the home page, there just won’t be any ads on it. Thanks Danny! Awesome idea!

UPDATE 1.5

New version doesn’t mess up paragraph tags if they have class attributes.

UPDATE

Apparently my site couldn’t take the stress of a global Wordpress Dashboard link. Dang. Thanks for the link! Hope it works now!

UPDATE 1.4

Apparently running AdSense in your feed is against their TOS. Apparently this plugin also displayed ads if you were running your feeds in full text. I don’t do that because then they just get scraped by spammer dicks. This new update removes Ads from your feed if you were running full text. It also gives you the new 200×200 block

UPDATE 1.3

I think a lot of people are really going to like this update.

I added a set of checkboxes in the admin panel that will let you opt out of displaying adsense ads on certain types of pages:

The Home Page
Static Pages
Post Pages
Category Pages
Archive Pages

If you want to NOT display ads on your home page or on static pages, then just go click the corresponding box in your Options>Adsense panel. That oughta keep your grubby mitts out of my code!

UPDATE 1.2

I added the one huge banner, I think it’s 460, for everyone who likes running banners instead of little boxes that disrupt blogposts.

I also added an Admin only checkbox on the options page so you can preview your Adsense Injected blog for yourself without letting your users see. It actually previews your blog with Adsense for anyone with a user level above 8 — but if you know what that means you can probably change it on your own.

→ 358 CommentsTags: Wordpress Plugins