Only fill this in if you're a spammer huh? Your name :
Your email :
Your message :
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 ;)

¥

Trackback URL (right click and copy shortcut/link location)

Trackback url for this post
Note : This trackback url is time limited so use it within 30 minutes or the SpamHound will snarl at you.

http://waffleson.co.uk/z/?k=371221726331032380ac558661d453a1cc8a255eb869be51b

Gary users avatar

Posts : 323

Joined : 04/04/05

Reply to comment 14718 by Gary

Replied on : 05/16/08 @ 11:18 am #1

Nice one , I will have a read and play with this later ;)

Gz

Blog-a-doodle-do :D  http://garysblog.co.uk

 
 
Gary users avatar

Posts : 323

Joined : 04/04/05

Reply to comment 14719 by Gary

Replied on : 05/16/08 @ 02:50 pm #2

Nice work Paul, I like what I see :D


Gz

Blog-a-doodle-do :D  http://garysblog.co.uk

 
 

Replied on : 05/17/08 @ 12:11 am #3

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
 
 
¥åßßå users avatar

Posts : 827

Joined : 10/05/05

Location : 127.0.0.1

Reply to comment 14722 by ¥åßßå

Replied on : 05/17/08 @ 09:27 am #4

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:

¥

I may have opened the door, but you entered of your own free will

 
 

Replied on : 05/17/08 @ 04:03 pm #5

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? ;)
 
 
¥åßßå users avatar

Posts : 827

Joined : 10/05/05

Location : 127.0.0.1

Reply to comment 14725 by ¥åßßå

Replied on : 05/17/08 @ 04:22 pm #6

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

¥

I may have opened the door, but you entered of your own free will

 
 

Replied on : 05/18/08 @ 01:16 am #7

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:
 
 
¥åßßå users avatar

Posts : 827

Joined : 10/05/05

Location : 127.0.0.1

Reply to comment 14727 by ¥åßßå

Replied on : 05/18/08 @ 10:09 am #8

Ahhh, now you make sense .... that was because I left some test code in, it had nothing to do with IE ;)

¥

I may have opened the door, but you entered of your own free will

 
 

Replied on : 05/17/08 @ 08:10 am #9

Mmmm... don't know what I look forward to the most...
¥'s reply to Lurker or installing the plugin B)
 
 
Gary users avatar

Posts : 323

Joined : 04/04/05

Reply to comment 14723 by Gary

Replied on : 05/17/08 @ 09:58 am #10

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

Blog-a-doodle-do :D  http://garysblog.co.uk

 
 

Replied on : 05/26/08 @ 10:22 am #11

* Birthday Greetings *

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

Gz
 
 

Replied on : 05/27/08 @ 03:55 am #12

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
 
 
Gary users avatar

Posts : 323

Joined : 04/04/05

Reply to comment 14742 by Gary

Replied on : 05/28/08 @ 06:15 pm #13

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)

Blog-a-doodle-do :D  http://garysblog.co.uk

 
 
¥åßßå users avatar

Posts : 827

Joined : 10/05/05

Location : 127.0.0.1

Reply to comment 14743 by ¥åßßå

Replied on : 05/28/08 @ 06:41 pm #14

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 )

¥

I may have opened the door, but you entered of your own free will

 
 
Gary users avatar

Posts : 323

Joined : 04/04/05

Reply to comment 14744 by Gary

Replied on : 05/28/08 @ 06:47 pm #15

* 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


Blog-a-doodle-do :D  http://garysblog.co.uk

 
 
¥åßßå users avatar

Posts : 827

Joined : 10/05/05

Location : 127.0.0.1

Reply to comment 14745 by ¥åßßå

Replied on : 05/28/08 @ 06:54 pm #16

You'd need an HGV licence to deliver them all ;)

¥

I may have opened the door, but you entered of your own free will

 
 
Gary users avatar

Posts : 323

Joined : 04/04/05

Reply to comment 14746 by Gary

Replied on : 05/28/08 @ 07:47 pm #17

Lol, I could always pay you in coffee if you prefer :P

Blog-a-doodle-do :D  http://garysblog.co.uk

 
 
Gary users avatar

Posts : 323

Joined : 04/04/05

Reply to comment 14747 by Gary

Replied on : 05/29/08 @ 10:32 am #18

I see you upgraded :)
Thanks for sorting out the comment numbers on mine as well.

Your a good-en :P

Gz

Blog-a-doodle-do :D  http://garysblog.co.uk

 
 

Leave a comment

Your email address will not be displayed on this site.
Your URL will be displayed.
About you

Just fill in the bits you want, none of it is required



Your email address will only be used to send you adverts for viagra and rolex watches.



(Line breaks become <br />)
Leave a comment
Code:
=> :!: :?: :idea: :) :D :p B) ;) :> :roll: :oops: :| :-/ :( >:( :'( |-| :>> ;D :)) 88| :lalala: :crazy: >:XX :o