• This plugin is EXCELLENT! Plus, the new upgrade just made it even easier for new installs…no need to mess with .htaccess file anymore.

    Thank You so Much for great plugin πŸ˜‰

    p.s. I like the *new* features of adding “nofollow” and “_blank” to the links.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thank you.
    I am really happy to see the feedback – 3000 downloads and only several comments make me sad.

    Soon, I’ll optimize plugin a bit for faster performance πŸ™‚

    Great plugin.

    I have a couple problems though.

    1) The author comments link is not being masked.
    2) I have my blog installed in a different directory (/blog) and my index in the root so my blog is the front page, but masked links show mysite.com/blog/goto and I’d like it to just show mysite.com/goto

    1) It means that either you didn’t check “Mask comments authors`s links” in plugin options, or you have non standard theme, which does not use link filters. Author link must must be shown with comment_author_link function.

    2) I think that you understand that plugin won’t be able to work upper to the blog directory. If you really need it, download plugin version 0.71 and be ready to rewrite .htaccess file.
    You still wanna do it? I tried to make plugin v 2.0 as simple as it can be.

    I checked “Mask Comments author’s link”. I unchecked and rechecked it and it still wasn’t working, so it must be the theme I’m using.

    I could rewrite .htaccess, I’ve done it before and added some of my own rewrite rules, but I don’t want to download an older version of the plugin. Its not a big deal. I thought I could just change something in the wp-noexternallinks file. After looking through the code… can’t I just change this line in function parse_noexternallinks:

    $url=get_option(‘siteurl‘).$sep.$url;

    To

    $url=get_option(‘home‘).$sep.$url;

    siteurl points to where the WordPress core files are, while home points to the main index file (for those that store WordPress in another directory). It seems to make sense to change it there, but if I change that should I change this line in function wp_noextrenallinks:

    $site=get_option('siteurl');

    Not sure what that does, but it seems like that is used for excluding internal links.

    wordpress doesn’t know anything about site url, only about blog dir.
    What you should do:

    1) replace get_option(‘siteurl’) with the url of your site.
    2) Put line

    RewriteRule ^goto/(.*) http://$1 [R=301,L]

    in your .htaccess

    But be careful: plugin updates will erase your changes, and also wordpress can rewrite .htaccess file.

    If you place the main wordpress index file in the root of your site then wordpress can use home and will know site url:

    http://codex.ww.wp.xz.cn/Editing_wp-config.php#Blog_address_.28URL.29

    siteurl references blog directory:

    http://codex.ww.wp.xz.cn/Editing_wp-config.php#WordPress_address_.28URL.29

    Its probably not well known since many people don’t use the setup that I have, but it does work. I replaced both instances of get_option('siteurl') with get_option('home') and that did work without having to rewrite .htaccess.

    I’m just not sure if its necessary to replace the $site=get_option('siteurl'); on line 222. I’m pretty sure the $url=get_option('siteurl').$sep.$url; on line 203 does the actual rewrite masking, since $sep=goto and $url=(original external url), so replacing siteurl with home there makes sense. But what does line 222 do? Is that used for making sure internal links don’t get rewritten?

    Yeah, it’s as you mentioned, there’s even a comment

    #site root is excluded

    It’s to disable masking of internal links. However, scripts finds the root directory itself (for example, if you have blog, located on http://jehy.ru/articles, the root will be http://jehy.ru), and adds the root directory to exclusions. So you don’t really have to replace siteurl with home there. As you wish.

    Thank you for concern. I’ll look through codex and test it on my blog, and, possibly, change siteurl to home in next version of plugin.

    Ok, I saw that comment and thought it meant the site root was only being stripped from the variable on that line and for some reason it never occurred to me that the comment meant site root is excluded from masking.

    Thank you for answering my questions and helping out and for the awesome plugin – I have been looking for a plugin exactly like this for a while and had just found it and it does everything I needed.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘[Plugin: WP No External Links] Excellent Plugin!’ is closed to new replies.