There are various problems with the plugin that make it currently unusable and it could just as well be removed from the repo this way.
I’ve tried to debug some, but It should be looked through more thoroughly.
1. uses deprecated eregi_replace('\:space:+', ' ', $final_stuff)
, that can be replaced by preg_replace('/(?i):space:+/', ' ', $final_stuff);
to make it work, and probably the (?i) isn’t needed, since it just looks for spaces that are hard coded by the plugin itself, so case is no issue.
2. get_bloginfo('siteurl')
is also deprecated and should be replaced by get_bloginfo('url')
3. but also it doesn’t find the domain in https:// links, which should be all external links at this point, so it marks all links as internal. Easy to fix in the source, but it seems to be one of many problems.
4. the snapshot popup doesn’t seem to work anymore. Is the service still up?
Too buggy for me, so test thoroughly before considering it.
Fix for https-urls:
function GetDomainnameFromUri($uri){
$exp1 = '/^(https|http|ftp)?(:\/\/)?(www.)?([^\/]+)/i';
preg_match($exp1, $uri, $matches, $matches[4]);
// d($uri, $matches);
if (isset($matches[4])) {
return $matches[4];
} else {
return '';
}
}
What it really needs is a complete make-over. It don’t think that’s coming from the author, since it hasn’t been maintained for more than 10 years.
]]>No chance to use this plugin with PHP 7.
There is an error and the content is cut off.
This plugin is not compatible with PHP 7.
]]>You should use a <link type=”text/css” href=”/wp-content/plugins/link-indication/link-indication_style.css”> tag instead of the bloc:
<style type=”text/css” media=”screen”>
@import url(/wp-content/plugins/link-indication/link-indication_style.css);
</style>
For that, you should add the following:
function Headers () {
wp_enqueue_style (__CLASS__, plugins_url (‘link-indication’) . ‘/link-indication_style.css’);
}
add_action (‘get_header’, ‘Headers’);
Debug Mode on
Deprecated: Function eregi_replace() is deprecated in C:\temp\UniServer\www\xxx\wp-content\plugins\link-indication\link-indication.php on line 315
]]>WIth Link Indication 4.4, I tried activating the Websnapr preview thumbnails feature. However, all of the hover bubbles show the message: “Websnapr 2.0; Please update your websnapr code: websnapr.com/code “
However, the new version of the Websnapr bubble code requires users to have a websnapr key.
]]>Could you add DOC and XLS styles as default ones, in Link indication settings and link-indication_style.css file?
]]>I’ve changed the code starting at line 212 in order to substitute the target attribute by the rel=”external”. As the author say the target attribute isn’t W3C valid, so why not get rid of it definitely.
/**********************
* For external links, we apply target="_blank" (if there is not already a target attribute in the anchor tag)
*********************/
$targetblank = '';
if ( (substr($linktype, 0, 8) == 'external') && ($this->g_opt['mwli_targetblank'] == '1') ) {
//if ( (strpos($matches[1] . $matches[6], 'target=') === false) ) {
if ( ! preg_match("/rel=[\"\'].*?external.*?[\"\']/i", $matches[1] . $matches[6] ) ) {
// there is no target=, so we add target="_blank"
//$targetblank = 'target="_blank"';
$targetblank = 'rel="external"';
}
}
If Someone needs desperately to open a external link in another window, she could add a Jquery like:
<script>
$(function() {
$(‘a[rel*=external]‘).click( function() {
window.open(this.href);
return false;
});
});
</script>
]]>