HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

Autolink tags with pretty urls.

AnonymooseAnonymoose ✭✭
edited October 2012 in Feedback

Change line 143 in class.autolink.plugin.php from:

$item = '<a class="autotagger" title="click me to see discussions tagged with this word" href="' . "discussions/tagged/$item" . '">' . $item . '</a>';

to

$item = '<a class="autotagger" title="click me to see discussions tagged with this word" href="' . "/discussions/tagged/$item" . '">' . $item . '</a>';

otherwise goes to discussion/#NUMBER OF DISCUSSION#/discussions/tagged/activities which is invalid.

Comments

  • Options

    @Anonymoose

    can you point out the change, I'm having a problem seeing the change in before and after.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options

    @peregrine: There is a / before discussions/tagged/$item

    @Anonymoose: Although I do not use this plugin, this might also be related to your htaccess file. Did you correctly define your RewriteBase?

  • Options

    Might be related. I'm using lighttpd with the recommended rules. However, the change in general makes the plugin more robust in all environments.

  • Options

    thanks @HalfCat - sometimes these old eyes don't see things!

    @Anonymoose

    I'm not sure if your recommended change is more robust in all environments.

    I played with this quite a bit with and without slash, rewriting url's true and false in config.php when writing the plugin.

    without the slash worked best for me. but adjust as you need to.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options
    AnonymooseAnonymoose ✭✭
    edited October 2012

    Unfortunately, I ended up disabling the plugin, as it seems to interfere with url links no matter what I settings I choose.

  • Options
    peregrineperegrine MVP
    edited October 2012

    @Anonymoose said..

    Unfortunately, I ended up disabling the plugin, as it seems to interfere with url links no matter what I settings I choose.

    oh well. I don't know anything about - lighttpd - could be the changes you made to the plugin, or some other rewriting rules you have, or .htaccess if there is one, is improperly set. It works perfectly fine on apache, whether it is

    $Configuration['Garden']['RewriteUrls'] = TRUE;
    or
    $Configuration['Garden']['RewriteUrls'] = FALSE;

    Sorry it didn't work in your environment.

    you might consider one of two things.

    1) get a more "robust" web server.
    or hard code the links
    e.g.

    $item = '<a class="autotagger" title="click me to see discussions tagged with this word" href="http://yourserver.com/forum/discussions/tagged/$item" . '">' . $item . '</a>';
    

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options

    Yes, I have $Configuration['Garden']['RewriteUrls'] = TRUE; and otherwise lighttpd works fine. I don't think the issue of rewriting url links is related to the url rewrite scheme. I should have made a spearate post.

  • Options

    try above suggestion.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options
    1. lighttpd is a robust webserver. You should know that YouTube uses lighttpd, among others. The choice of webserver has nothing to do with the way links are processed.

    2. Right now links are auto created whenever someone puts in a URL. This is done by vanilla. For some reason this plugin is overwiriting those.

  • Options
    peregrineperegrine MVP
    edited October 2012

    since I've given up logically trying to explain things, I'll provide you with this comment - @422 knew how to say it best.

    http://vanillaforums.org/discussion/comment/153927/#Comment_153927

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options
    AnonymooseAnonymoose ✭✭
    edited October 2012

    That's not very helpful p. There's a bug somewhere, don't be dismissive about it.

  • Options
    peregrineperegrine MVP
    edited October 2012

    post your links. post your site link! have tagging enabled (which tagging plugin) and have autotags enabled (the original, not modified by you) and I can try to help you. But I can't help you, if you suggest a change to and say it is a robust change and then say it doesn't work. Also list the other plugins you have enabled, use the default theme. Also list any methods you have for rewriting url's (.e.g htaccess).
    Is the site embedded? Otherwise, I'm just guessing and you're just venting in the wind. Plugins depend on your server having the correct rewrite rules. If your rewrites are incorrect, there is no amount of help that any plugin developer can really give you.

    I also suggest you do some studying on rewrite rules for your webserver.

    here's a start

    http://www.webhostingtalk.com/showthread.php?t=701164

    http://www.google.com/search?q=lighthttpd+rewrite

    http://redmine.lighttpd.net/projects/1/wiki/Docs_ModRewrite

    then look at the .htaccess that vanilla has and convert it.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

Sign In or Register to comment.