Only fill this in if you're a spammer huh? Your name :
Your email :
Your message :

Tags: javascript

May
16th
2008

Playing with external links

Posted in : Plugins & Widgets

External links are a pane

I decided to have a play around with my skins external links code, which uses javascript to add an onclick event to any links with class="ext", and a plugin I've had lying around for a fair smidge which does something similar for all/any external links by looking at the href for the link in question. The end result is a shiny new plugin which will add a graphic to every external link on your blog, clicking the graphic opens the link in a fancy little overlay which I stole from our photozoom plugin. I also threw in a few settings so that you can change the text that's added and add any domains that you class as internal links, although the plugin will auto generate an entry for each unique blog url on your system so you probably won't need to add any.

If you fancy having a play with this then you'll need to download 2 plugins as I've decided to separate the fancy javascript screen stuff into it's own plugin as I'm starting to use it in a couple of plugins and it's easier to have a dependency and maintain one codebase. You can download the external links plugin here ( am_externallinks.zip ) and the javascript helper plugin which it needs here ( am_jshelper.zip ), upload them both, install the js helper plugin and then install the external links plugin. That's pretty much it, now all your external links will have a crap looking arrow graphic which, when clicked, will open your link in a cool overlay. Your links will also have the class amExternalLink added to them so that you can style them as you wish. The arrow <img> tag will also have the same classname applied so you can change the graphic to suit your skin.

As always if you find any bugs or it melts your blog then just let me know ;)

¥

2288 views and only 18 comments
Top ways you found my blog
May
12th
2008

Tidying the Admin screen

Posted in : Plugins & Widgets

Does your admin look bloated?

NOTE : The chances are that none of this works in IE, so if you use IE you may as well skip the rest of this post ..... or read it and then go get a better browser ... whichever rocks your boat

So, I was playing around with the admin area to see what could be done using js, as it's required for the admin area to function anyway, and css. The main idea was to hide all of the clutter that's not used for the majority of posts, or only used briefly during the whole posting process, whilst also leaving it accessible for the moments that you do need it. When I say "clutter" I pretty much mean everything except the textarea that you type in and the post title. Toolbars - gone, advanced properties - gone, categories - gone, post status - gone, you get the picture ;)

All of this is done from a plugin which hooks into a couple of the admin events and then unleashes a bit of javascript to play around with classnames and id's and onclick events and stuff. The rest is handled by a simple bit of css ...... so simple in fact that IE can't understand it ...... nothing new there then huh? ..... anyway, the end result is that pretty much everything in admin is collapsed or hidden until you hover over or click stuff. The toolbars will show on hover, or you can click the text to pin them open if you're going to be using them a lot for a particular post.

The whole of the right column is reduced to a lil tab handily marked "OPTIONS". Hovering over the tab brings the right column back so you can play with your categories, visibility and renderers and things. This allows the post textarea et el to be expanded to fill the width of the screen which, for me, makes posting far far easier ...... combine that with Afwas's plugin ( [2.4] Resize Admin Textarea plugin ) and you can pretty much fill your screen with just the post area ...... cool huh?

Finally a thanks to John for his constructive criticism and suggestions about the plugin ..... and for allowing me to scare the shit out of him when most of his admin area disappeared ..... I suppose I should have warned him first :roll:

Anyway, if you fancy having a play with this plugin, and you're using a decent browser, then you can download it here ( am_tidyadmin.zip ). If you find any bugs or flaws or stuff ( apart from "it doesn't work in IE", and variations of the same tune ) then just let me know.

¥

1082 views and only 19 comments
Apr
21st
2008

Predicting tags

Posted in : Plugins & Widgets

Auto-complete your tags

I decided to have another play with tags as I tend to use them quite a bit on my posts and I'm always forgetting which ones I've used before and which ones I haven't. So I threw together a plugin that will auto-suggest tags based on ones that you've used in the past. It'll also show you a list of all other similar tags in case you have more than one tag with the same starting letter(s) although they're not clickable at the moment because I haven't got that far.

Installation is pretty simple, just download the zip ( AM AutoTags ), upload it, install it, then meander into the plugin settings and set the tag separator for whatever your version uses. That's it. Now when you enter tags you it should try and auto complete them for you and show you a list of other tags.

NOTE : I've only tested this in FireFox as my IE is having a crisis of confidence when it comes to running javascript, so if you use IE and it doesn't work then tough shit. Also, this is a pre-release version so it's bound to have a few quirks, if you find any then just let me know and I'll see what I can do to eradicate them.

¥

*edit* 24th April
I think I've finally managed to convince IE that it can actually understand javascript so this should now work in IE as well, zip file updated

1923 views and only 39 comments