Placed in: Home arrow Programming arrow mfBlank: External link recognition with icon suffix
mfBlank: External link recognition with icon suffix

If you have a website, one of the main things you want to do is keeping your users to stay. That's why, when you link to an external website, most people will add the attribute target="_blank" (new window) to the link.

mfBlank This method can be pretty time consuming, especially when you're not using a WYSIWYG editor. For more user friendly links, you could also add a suffix icon to show a new window will open.

mfBlank does all this work for you! It recognizes outgoing links and adds the target="_blank" and an icon automatically. This way, you'll make sure to keep your visitors on your site.

The script is very small, but can be really useful for your website.

Are you tired of placing the target=_"blank" attribute to all links on your Joomla! website? mfBlank is your solution and it automatically adds a suffix icon to external links.

What does it do?

Exactly what is said above! Here is a small demo on how a website would look like (please take note that this is not a live demo).

  1. Every link in your content is being checked. If it is an internal link (a link to another article or page on your own website), nothing special is happening.

    This changes when you add an external link. A suffix image is being added and the URL will open in a new window.

Install for Joomla 1.0.x

  1. Log in to your back-end of the site
  2. Go to "Installers", "Mambots"
  3. Click on "Browse" and navigate to the downloaded ZIP archive
  4. Press "Upload File & Install"
  5. Go to "Mambots", "Site Mambots"
  6. Search for mfBlank
  7. Publish the mambot

Install for Joomla 1.5

  1. Log in to your back-end of the site
  2. Go to "Extensions", "Install/Uninstall"
  3. Click on "Browse" and navigate to the downloaded ZIP archive
  4. Press "Upload File & Install"
  5. Go to "Extensions", "Plugin Manager"
  6. Search for mfBlank
  7. Publish the plugin

Download

Attribution-Share Alike 3.0

For those users that have a dark background, you could try the white version of the external image:

Feel free to give feedback about this mambot/plugin. Enjoy using it!

Changelog

Version 1.1
  1. Added back-end parameters
  2. Change icon color (Dark / Light)
  3. Add/remove hover effect
  4. Add/remove suffix icon

UPDATE

I no longer will update this plugin for Joomla!

Peter from No Number was kind enough to release an upgraded version of this script (thanks!). Take note that I didn't properly test this script!

Download mfBlank - No Number version

Another great reader called Ewout also shared another version of this script. Feel free to test/check this one out too:

Download mfBlank - Ewout version


Tags:  mambot free plugin joomla webdesign

Interested in this topic? You might enjoy another article I've written called

Comments
Add NewSearchRSS
Took   2008-03-03 06:13:28
Gravatar image great this one too marco
Jon   2008-03-03 14:11:44
Gravatar image What about us who has a dark template/background? The gif included is only useful for bright templates/backgrounds...

Other than that, this was just what I was looking for! Thank you!
Marco - Thanks! Added   2008-03-03 15:27:35
Gravatar image Thanks for that, didn't think about it. I've added a "white" version of the GIF in the article for those Joomla! websites with a dark template. Just overwrite the one included in the package with the one from the article and it should display nicely.
Toasty - mfBlank   2008-03-03 16:02:50
Gravatar image Very, very nice and helpful extension!!

Question:

it does not appear work with the Weblinks component nor with secure socket (https)sites.

Am I doing something wrong?

Thank you for making this very useful tool available!
Marco - Next version   2008-03-03 17:55:02
Gravatar image Indeed, it doesn't work with the weblinks component. Reason for this is that the URL's generated by the component are actually internal URL's. They just re-direct to another website. This script can't check that functionality.

I'll add a https:// support in the next version of this plugin, stay tuned.
DaveM - Doesn't install for me (Jooml   2008-03-04 04:57:56
Gravatar image I get the following error:

Upload mambot - Upload Failed
Unrecoverable error "PCLZIP_ERR_BAD_FORMAT (-10)"

Any suggestions?
DaveM - Unpacking & Repacking before i   2008-03-04 06:00:43
Gravatar image OK now, thanks.
DaveM - Hover behavior not optimal for   2008-03-04 08:31:15
Gravatar image Our current template (aqualine from joomlashack) provides link hover behavior via CSS. In our case, the background changes from white to blue (and the text from blue to white).

When using this mambot, the hover behavior changes the text background to white (while not changing the text color). White on white is not very easy to read.
Marco - Cool effect!   2008-03-04 08:34:24
Gravatar image Hi,

Thanks for that information. I had to remove your code from the comments, because it destroyed my page-layout.

Anyway, I think I'll add your hover effect to the next release, it'll look pretty :woohoo:
DaveM - Hover behavior that works for   2008-03-06 06:34:27
Gravatar image Here's the code that I added to mambots/system/mfblank.php (after the latter existing $mainframe->addCustomHeadTag call:

$mainframe->addCustomHeadTag(
'table.contentpaneopen
a.blank:hover{ padding-right:12px; background: #5D9599
url('. $mainframe->getCfg('live_site') .
'/mambots/system/mfblank/icon_external.gif)
no-repeat 100% 50%; }');
Devil - Only works...   2008-03-27 17:55:33
Gravatar image ...on original com_content.

When using an override of com_content and his views the plugin didnīt work.
Yassine - Hi,   2008-03-30 20:22:39
Gravatar image Hi,

Thanks
Rami - Bug in v1.1 for J1.5! if SEF i   2008-04-06 14:59:11
Gravatar image Greetings,

Great plugin, but i found a bug on a Joomla 1.5 if having SEF active, the plugin puts css for image with url(plugin/mfblank/..etc.etc), when in a SEF page (with url www.domain.com/content/section/page.html) the link should not be relative but absolute with "url(/plugin/etc..etc"

it should also consider the joomla installations in subfolders, which should put url(/plugins/etc

Thanks again
Rami
Qbik - problem with plugin   2008-04-10 09:53:30
Gravatar image Hi nice plugin but how to start it to work :(

Is there special way to write this external link?
Marco - Published   2008-04-10 11:43:45
Gravatar image Are you sure you have the plugin set to "published" ?
Qbik - Yes it's published   2008-04-10 12:18:11
Gravatar image Yes it's published
Marco - Contact me   2008-04-10 16:43:46
Gravatar image Hi,

I don't see it published on your website that you placed in your first post.

Please contact me through the contact-form + add the website where you're trying to enable this mambot please.

Greetings,,,
Yo Han - icon on the left side   2008-04-12 19:56:03
Gravatar image It would be nice to be able to display the icon on the left side of the URL. I edited the sourcecode of mfblank.php quick & dirty as follows, but a setting in the backend would be easier.

$css_code = 'table.contentpaneopen a.blank{ padding-left:16px; background:url(plugins/system/mfblank/icon_external_light.gif) no-repeat 0% 50%; }';
Marco - Thanks for the tip!   2008-04-13 17:47:31
Gravatar image Thanks for the tip!

I'll make sure to make an back-end parameter for this. Stay tuned..
Jon - DanceAddict.nu - Dance Communi   2008-04-16 20:24:29
Gravatar image This is a great mambot! Why not enhance it further? I suggest it also adds the rel="nofollow" attribute to the external hyperlinks for good SEO (read more on the official Google Blog)
:)
Magdalene - Nice one..   2008-05-22 09:17:44
Gravatar image Hi! This is exactly what I've been looking for 2 months now. Thank the stars that I've found yours. I would lay down a kiss if you are really a guy!

Anyways, it works like a charm, except that when I click on the title of the article, all the links inside that particular article (if I click on Readmore) would still open in the same window. I dont have the slightest idea how to "fix" this :confused:
Ewel - weblinks and newsfeeds   2008-05-30 23:26:47
Gravatar image A very convenient plugin as it is, but I had really hoped it would be the solution to having blank targets for weblinks and news feed links.

Above it was said that the script cannot check for weblinks, and that is true, but since even the weblinks are href tags I think the plugin could add a blank target with the right test.
As to the test, in the url of a page from the weblinks component there is always this: option=com_weblinks. In the link tags in a weblinks component page you will always find this: view=weblink. So, you can check for these things in php and pass to javascript.

The newsfeeds component is different, and in pages made by the component it produces fairly normal link tags that the plugin should be able to work with. If you want to make a check, you could basically check for any link tag within the div with class="contentpane" where the component's page url includes option=com_newsfeeds&view=newsfeed.
In the newsfeeds module, target="_child" is already added, and you could check for that to replace it with _blank. Thereby you would make a lot of people happy who want their Lightboxes etc working on those links.
Ewel - ...part II   2008-05-31 22:32:43
Gravatar image In the newsfeeds module, target="_child" is already added, and you could check for that to replace it with _blank. Thereby you would make a lot of people happy who want their Lightboxes etc working on those links.
Sonny - img link   2008-06-05 15:10:06
Gravatar image Hi,

First of all, i like this plugin. It works great.
But i have one request. Is there a possibilty to temporaly disable the plugin. By adding class="no_mfblank" to the a href (for example if I link a image I don't want the icon to show...)

Thanks.
Greetings
Augusto - re: img link   2008-09-06 08:00:53
Gravatar image I'd like to second Sonny's request. I have a link in the footer of the page for which the background is different than the main content's. This mambot overwrites any class I try to assign to html code I put in the template with "blank" making all external links look the same regardless of the background. Needless to say the footer link comes out too similar to its background making it hard to see.

Sonny wrote:
Hi,

First of all, i like this plugin. It works great.
But i have one request. Is there a possibilty to temporaly disable the plugin. By adding class="no_mfblank" to the a href (for example if I link a image I don't want the icon to show...)

Thanks.
Greetings
DaveM - should also recognize https:// links   2008-06-30 08:12:20
Gravatar image Marco,
I'm using 1.0, but 1.1 appears to still have the issue.

In 1.0, mfblank.js line 13 tests:
return (href.indexOf("http://";)!=-1 && href.indexOf(hostname) ...

It should test:
return ((href.indexOf("http://";)!=-1 || href.indexOf("https://";)!= -1) && href.indexOf(hostname) ...

In 1.1, it's mfblank.js line 7 that needs the same mod.

Thanks!
Rex   2008-07-25 17:55:09
Gravatar image read about the NOFOLLOW attribute... should be a benefit, or at least better for searchengine handling...

Have mercy, i donīt know the exact technical background...
I guess there were other mambots, which add this attribute alone...

Maybe its possible to add this to your mambot as well
Lee - J1.5 Version not working?   2008-07-26 09:35:22
Gravatar image Hi,

I have installed the J1.5 version on another site and it works perfectly but it is refusing to do so in this one for some reason - see Links page. Does it need the Legacy plugin to be enable (have done this anyway but still no luck).

Would really like to get this working on this site as it's an excellent tool.

Pleas enote that some of the links have target="_blank" added manually which is why some links open a new window and others don't.

Any ideas please?

Kind regards,

Lee
nurav - external links   2008-08-04 16:07:31
Gravatar image can we have a external links in joomla articles.....since am a new user to joomla can any one help me :(
kevin - Thumbs up   2008-09-06 13:08:46
Gravatar image Yeah love it saved lots of hours of formatting links however except does not work for google adds.
Jason - No icons or mfblank.php file   2008-10-20 22:31:26
Gravatar image This installed easily and settings were a breeze. Enabled the plugin and set 'Remove Icon' to 'No'. I still do not see the icon anywhere. Looking through the directories I found the icon files but did not find the php file? The 'target='_blank' thing works just fine.

I have Joomla 1.5.7 installed. The 'Online Shopping' article on the home page shows an external link (no icon)
lainekk - it is not working...and now my old insert button i   2008-11-12 05:43:33
Gravatar image Hmm I don't know what happened. I installed the version for J!1.5 and have made sure I published it.

But I tested an article with links...and it did not work. I also noticed that it disabled my Insert/Edit Link and UnLink Icon.

I have uninstall it but I still can't get back my Insert/Edit Link and Unlink Icon to work... can someone help me?

Thanks!
ghost - https   2008-12-17 03:42:29
Gravatar image hi,

can you tell me, how this super ext. support https?
i have link with http - it`s ok
and link with https - do nothing :(

thank you very much
Rex - re: Next version | weblinks and nofollow ?   2009-01-12 01:56:17
Gravatar image
Marco wrote:
Indeed, it doesn't work with the weblinks component. Reason for this is that the URL's generated by the component are actually internal URL's. They just re-direct to another website. This script can't check that functionality.


Do links from the weblinks component need a nofollow attribute??
TIA!!!
sony ericsson mobiles - How to..   2009-01-18 07:52:06
Gravatar image How would one make a gif see-through since this is for a dark background only.
Jeroen - Error in Eventlist   2009-02-05 14:39:59
Gravatar image Hi There,

thanx for this great plugin. I've got only one problem with this plugin, it's in the eventlist component. If the MFBlank plugin (for joomla 1.5) is on i,ve got a error when user wants to register for a event. This is the error:

Fout: obj.href is undefined
Bronbestand: http://www.dancegids.nl/plugins/system/ ... mfblank.js
Regel: 6

and
Waarschuwing: Lege string doorgegeven aan getElementById().

Is there a solution for this problem? Thanx for your reply!

Greetz

Jeroen
Mobiles - Https   2009-02-11 03:19:32
Gravatar image It still doesn't with with https ;(
Greg - Only for the content ?   2009-02-26 09:37:58
Gravatar image Hi,

Excellent work on this ! Thank you

But I would like to have it only affect the articles content.
Could it be possible ?
Greg - frontpage only and css   2009-02-26 10:30:16
Gravatar image Hi again,

Forgot to say that it could be great too to have the plugin only work on the frontend.

And the CSS in the mfblank.php didn't work at all for me, I had to put a a.blank css class directly into my template.css to get it work.
Muneo - sh404sef - no background   2009-04-03 14:30:39
Gravatar image The image of background(square with arrow) is not appear with sh404sef. Is this my problem only???
baladeva - no working anymore   2009-04-06 10:50:09
Gravatar image i also have problems with it, in think since upgrading to 1.5.10
baladeva - dont work onj all sites   2009-04-27 17:00:56
Gravatar image hallo, i like your plugin mf_blank,

but i have notice that it does not function on all sites,
i have look a lot for that reason, but i did not find it :(

i drop you to links:
http://www.lebensplan.com/yoga-infos/kurstermine
http://www.lebensplan.com/kooperationspartner

its working on the last one, but not on many others sites

regards from Berlin
baladeva   2009-04-27 17:27:28
Gravatar image i put that line in the template.css and it works fine now

table.contentpaneopen a.blank{ padding-right:12px; background:url(http://www.lebensplan.com/plugins/system/mfblank/icon_external_dark.gif) no-repeat 100% 50%; }

there was a tip more above in these comments, thanks to that reader :)
Erik - mfBlank with modified com_content   2009-05-07 17:36:18
Gravatar image I saw that some people who used a modified com_content in their template could not get this plugin working. The solution is not that hard to figure out:

- open the mfblank.php file
- change the 'table.contentpaneopen' in the $css_code with the CSS used in your modified com_content

Your done.

P.s. very nice and simple plugin!
Yoms - Error 404 logged by SH404SEF   2009-05-08 01:57:23
Gravatar image Hi there,

The external links work great however I notice a lot of error 404 are generated and logged by the SF404SEF component on my site. Please advice how to stop the errors from occuring. Currently using joomla 1.5.7, JS purity template and got SF404SEF installed.

Example of errors generated are as follows:

plugins/system/mfblank/Icon_external_dark.gif

Businesss-Management/plugins/system/mfblank/Icon_external_dark.gif

Property-Management/plugins/system/mfblank/Icon_external_dark.gif

kind regards,
Thomas - CSS   2009-06-15 18:46:58
Gravatar image I really love this, but for some reason it turns off the hover affects on my dropdown menus and sidebar menus. I'm using the Yootheme blueprint template, so you can see a demo of how the menu hover effects work (demo.yootheme.com). I've checked your css and can't see how it would affect this, so it must be related to the javascript (of which I know little). Any help would be appreciated. Thanks!
JoomlAmerica - Web developer   2009-06-22 19:59:07
Gravatar image The version for 1.0 is fantastic, works like a charm. But I get javascript error codes when I use it on a Joomla 1.5 site with RocketTheme templates. "Object doesn't support this property or method" I am guessing it conflicts with the javascript in the template because it throws errors on the code that points to mfblank and then on the other javascript areas of the site. I get the warning messages in IE7
mike - conflict errors on 1.5   2009-06-26 08:15:23
Gravatar image also getting errors with this plugin.....all yoo tools modules dont work when mfblank is enabled - shame.
Thomas - Anybody here???   2009-06-28 15:42:36
Gravatar image I noticed at Joomla extensions that mfblank hasn't been updated since March 2008. Is it even being developed anymore. You can't use it with Yoothemes (which uses Yootools) or Rocketthemes (which I also tested). Is anybody reading these posts? Unfortunately, there is nothing out there that does what this does for Joomla 1.5, so I personally am stuck funding something. Please let us know if you have retired this so we don't keep writing posts on something that will never get updated.
Penn - is this working?   2009-08-11 01:39:27
Gravatar image I'm not entirely sure what I should be expecting from this plug-in. I have installed it but the only thing that happens after I click an external link is a new tab opens, rather than the website opening in the same window. I was expecting websites open rather like a wrapper

Somebody said that this does not work on the rocket theme template is, I've tried it on another template and it does exactly the same thing.
diyet - diyet   2009-09-14 09:04:27
Gravatar image Thanks very nice plugin.
diyet - diyet   2009-09-14 09:05:21
Gravatar image Plugin its working.
Miroslav - Ewout Version Works After Tweaking   2009-10-26 08:26:57
Gravatar image :idea: Hi, this is indeed a fantastic plugin. However, with RocketTheme template (Replicant) it did not work at all. So I've checked other versions (see UPDATE section
Miroslav - Ewout Version Works After Tweaking   2009-10-26 08:28:52
Gravatar image :idea: Hi, this is indeed a fantastic plugin. However, with RocketTheme template (Replicant) it did not work at all. So I've checked other versions (see UPDATE section - 8th from top on this page) and Ewout version started to work. (Install original one, then copy update over it.) HOWEVER, images serving as links were still damaged. :arrow: I changed /plugins/system/mfblank/mfblank.js a bit more: to skip changing all hyperlinks which contain any HTML tags inside them. (Between lines 78 and 79 I inserted: "if (obj.childElementCount>0) return false;" without quotes). Of course, simple solution, but efficient - layout is no more distorted. THANKS Ewout for nice and efficient rework of this plugin - I see it's rewritten really good inside!

(posted once more, forum has problem with some special chars)
Rodrigo - not working on 1.5.15   2010-03-01 20:35:03
Gravatar image It doesnt work in my joomla 1.5.15 site:

http://digao.bio.br/rizomas

If someone has any tip, I will be gratefull
ik   2010-03-26 16:05:39
Gravatar image i will tiry this one
amazon.com
TheAnt   2010-09-02 13:34:16
Gravatar image Hello
using Joomla 1.5.20 with your Plugin I can't get pdf button working correctly. I tested that deactivating the plugin and clicking on core PDF creation icon in all articles, it works fine. Activating your plugin it open a blank window.
I tested with default template too.
I don't know why, but this is.
Read more...
Name:
Email:
  Gravatar enabled.
Website:
Title:
UBBCode:
[b] [i] [u] [url] [quote] [code] [img] 
 
 
:angry::0:confused::cheer:B):evil::silly::dry::lol::kiss::D:pinch:
:(:shock::X:side::):P:unsure::woohoo::huh::whistle:;):s
:!::?::idea::arrow:
 
Unsubscribe from e-mail notifications.
 
< Prev   Next >
Subscribe

Subscribe to Marcofolio