New Tweet This Hack but Still no Monkeys

monkeyI just finished installing the latest version of the Tweet This WordPress Plugin. It renders my Tweet This Hack obsolete. As now you can configure the text that comes out. This is as it should be. I’m so honored! Richard Thripp, the author of Tweet This, even dropped by and made a comment on that post. Since my version is standard again, I feel another hack coming on. However I still have not sensed even one monkey trying to escape from my personal solid waste disposal port yet.


The new Tweet This allows you to choose from a number of link shrinkers if the old one didn’t already. But Adjix isn’t one of the supported options, I think adjix should be one of the link shrinkers you can choose, especially since I have this awesome adjix interface class that I wrote just laying around rotting. Oh yeah, and you can get filthy rich from it too. I’m counting on that happening whenever the monkeys show up.

In order to support adjix, we’ll need to be able to choose adjix from the configuration menu, and handle it when it is chosen. Looks like it also wants to be told the URL length for each specific shortener.

I handled the URL length in get_tweet_this_trim_title line 110. This line goes right before “else $url_len = ’20’. It sets the URL length for adjix:

 elseif (get_option('tt_url_service') == 'adjix') $url_len = '22'; 

At line 411 I added the adjix option to the options, like this:

<option value='adjix' <?php if (get_option('tt_urlservice') == 'adjix') echo ' selected="selected"'; ?>> Adjix.com (22 Characters)</option>

And now that I can configure it, I need to write code to use it if it is selected, so in the get_tweet_this_short_url routine I added a clause for adjix, and it looks like this:

                elseif (get_option('tt_url_service') == 'adjix') {
                        require_once('adjix.php');
                        $adjix = new Adjix('/////////////','http://pr.tixr.us');
                        try {
                            $url = $adjix->makeLink($purl,ADJX_Entertainment);
                        } catch (Exception $e) {
                            echo "caught exception ", $e->getMessage() , "\n";
                        }
                }

////// is my adjix registered email address. No way am I exposing that to spammers. In order to make it all work, of course I had to dump the little adjix class from the shrinkage post into the tweet-this folder, and I have to say that my adjix class is PHP5 only.

Let’s test it, shall we? Hmmm… it worked on this post in preview mode. Might as well go ahead and publish. It’s my personal hack anyway. Use at your own risk and all that.

Obviously I hard coded my email and my cloaking domain. Those would also be configurations if adjix were to be fully supported in a released version. That’s something for Richard to do if he ever wants to include adjix as a shortener. But meanwhile, the hack works for me. Hey, in two months I’ve made a whopping $0.60 off of adjix! At that rate I’ll be able to retire to…. oh gee, the options are so boundless: under the Van Buren bridge, or the homeless camp out north of town or other possibilities that might spring up in the meantime.

11 comments to New Tweet This Hack but Still no Monkeys

  • It totally sounds like something someone high on crack would write… this is just twitter covering for the CNN anchor… πŸ˜€

  • Wow, sounds like a great plugin. I’ve copied the source code, will also play around with it and see if I can’t develop something from it. lol πŸ˜›

  • Adjix is a cool concept. URL shortening services historically have no monetization options, but this one’s good and doesn’t get in the way too much. I added it to Tweet This version 1.3; when you select it in the settinngs a box comes up to enter you partner ID. You can also use the shorter ad.vu domain. I tried it out on my site, but switched back to my trusty Th8.us. I now have 359 URLs listed in my Adjix.com account, though.

    I didn’t add support for domain cloaking, so I guess you still have a reason to hack Tweet This. Maybe next version…

  • Trying out a new wordpress plugin called β€œTweet This” on both of my blogs. Its working great, The idea is that it makes it easier for people to tweet your blog.

  • Being a great fan of twitter,, I’ve downloaded the plug in and hopefully will have a look. Not a great supporter of black hat and domain cloaking is a no no to me.

  • Wow great plugin. Have the glitches been patched up yet?

  • Thanks for supplying the source code. Ill have my trusted techie take a look at it and see if we can tweak it some more to fit our application.

  • admin

    Richard has released at least one new version since I wrote this. He may have adjix included, or maybe not, and the hack may look a little different especially if he refactored. I haven’t got around to updating mine yet.

  • Sounds like a good plugin. I think I will put it on one of my blogs and have a play around with it. Thanks for the source code too πŸ˜€

  • Thats too funny. I guess its worth a shot to give the code a try. Thanks for posting source for us to work with.

  • Its always good to try out a new plugin that promises good functionality… after all, you have nothing to lose. If you don’t like it, just get rid of it! Thanks for this and you can be sure I will try this out! Kudos πŸ™‚

A sample text widget

Etiam pulvinar consectetur dolor sed malesuada. Ut convallis euismod dolor nec pretium. Nunc ut tristique massa.

Nam sodales mi vitae dolor ullamcorper et vulputate enim accumsan. Morbi orci magna, tincidunt vitae molestie nec, molestie at mi. Nulla nulla lorem, suscipit in posuere in, interdum non magna.