Archived : Techno Babble

This is the archived version of my b2evolution code blog.
If you require any help regarding b2evolution then
visit it's support forums

You can find my current blogs here
Code : {@link : WafflesOn}
Personal : {@link : InnerVisions}

« Opening the blogrumsTidying the Admin screen »

Playing with external links

Posted on 16th May 2008 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 ;)

¥

18 comments

Comment by Gary { @link http://garysblog.co.uk } on 16/05/08
Nice one , I will have a read and play with this later ;)

Gz
Comment by Gary { @link http://garysblog.co.uk } on 16/05/08
Nice work Paul, I like what I see :D


Gz
Comment by Lurker on 17/05/08
LMFAO ... guess you don't believe in demo's, huh? Mind you, bloody thing doesn't work in IE either. Yer turning into a tad of a browser snob. :| ... Oh yeah, lest I forget, I suppose it works in every version of b2evo since Moses parted the English Channel? :p
Comment by John { @link http://wow-factor.com } on 17/05/08
Mmmm... don't know what I look forward to the most...
¥'s reply to Lurker or installing the plugin B)
Comment by ¥åßßå on 17/05/08
I would have thought that any of the hundreds of external links that I have on my blog could be considered a demo. I guess I should have realised that IE users would require numbered instructions and diagrams drawn by crayon :|

I've now dumbed down the code to allow you to enjoy at least part of the experience, you'll get the links opened in a new window .... although I was tempted to change them all to a life improving enhancement :roll:

¥
Comment by Gary { @link http://garysblog.co.uk } on 17/05/08
The plug-in is cool, so is Yabba (or at least he keeps telling me he is);)
Ask him how his nasal membranes are this morning after a day in the field?
Gz

Comment by Lurker on 17/05/08
LOL ... and not one in the post that announces the whiz-bang external link thing-a-ma-jig. Go figure. :| At least you rectified that in the comments.

YAY ... it works in IE (7 at least).

Hmmm ... a non-resizable window ... yuck. :(

Never did answer question C, not that I'd want to subject visitors to browse to an external link that couldn't be resized. :roll:

On another note ... did you have fun diddling yer dahlias? ;)
Comment by ¥åßßå on 17/05/08
That'd be the comments that were made before some dumb arse IE user made their original comment? :roll:

As to "c", it should work in any 1.x / 2.x series so even your ancient version should be able to take advantage of it ;)

The dahlias will soon be in there new home :D

¥
Comment by Lurker on 18/05/08
LOL ... you mean that I was supposed to see the arrow in IE that wasn't showing b/c the thing didn't work in IE? :roll:
Comment by ¥åßßå on 18/05/08
Ahhh, now you make sense .... that was because I left some test code in, it had nothing to do with IE ;)

¥
Comment by Lurker on 26/05/08
* Birthday Greetings *

Many Happy Returns of the day Paul, have a great Birthday.
Hope you are doing something nice for the day :)

Gz
Comment by Lurker on 27/05/08
Yeah ... ditto!!

PS - I'm still celebrating yer birthday, even though you're a day older and sleeping like a baby (well, that's a S-T-R-E-T-C-H!) :p
Comment by Gary { @link http://garysblog.co.uk } on 28/05/08
HiPaul

Thanks for the upgrade today.

Give us a clue will you where to find and sort my 2 errors out, I have looked in Sidebar.php and cant find the duplicate class. I have looked in other files for nearly an hour now and can't find it.

Havn't got a clue were to find the ' closed div tag that is not open' though.

Gz B)

Comment by ¥åßßå on 28/05/08
Well done, you just found a validation error in the core .... must remember to change cvs

Cured your other one in _html.header.inc.php ( or whatever it's called )

¥
Comment by Gary { @link http://garysblog.co.uk } on 28/05/08
* Champagne cork flying across the room *

Cheers Mate :)

Thanks for that, my problem is that I just don't ever know where to look !
Apreciate that, that's another beer I owe you :p

Gz


Comment by ¥åßßå on 28/05/08
You'd need an HGV licence to deliver them all ;)

¥
Comment by Gary { @link http://garysblog.co.uk } on 28/05/08
Lol, I could always pay you in coffee if you prefer :P
Comment by Gary { @link http://garysblog.co.uk } on 29/05/08
I see you upgraded :)
Thanks for sorting out the comment numbers on mine as well.

Your a good-en :P

Gz
Page archived : 11th Nov 2009
 

X