Support » Plugins » [Plugin: Breadcrumb NavXT] Unnecessary comments in the output code

  • The plugin adds this by default:
    Breadcrumb, generated by Breadcrumb NavXT 2.1.4 –

    In my opinion it’s over the top. While it’s a comment, it is spurious code. It marginally increases the size of the page and doesn’t serve any useful purpose.

    I have disabled this by commenting out line 665 in the breadcrumb_navxt_class.php file (plugin version 2.1.4).

    As a plugin author myself, I think this type of credit is over the top.

    Cheers – Callum.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Apologies, commenting out line 665 is not sufficient, instead comment out line 665 and 666 and add this line:
    echo $bcn_output;

    That should do the trick. 🙂

    Cheers – Callum.

    As far as I remember it has been in there since it was Breadcrumb Navigation XT. So many other plugins have similar comments, Bad Behavior still does, though that really isn’t an excuse. The link can be removed as it doesn’t need to be there, the version numbering helps me help users with problems (as I can quickly figure out their version since most fail to initially provide me with that information).

    A different option to modifying the code would be to pass display the boolean true, and then echo the returned string, which does not contain the HTML comment. This assumes that you are directly accessing the class (the fastest, execution time wise, way of doing things). The administrative interface has problems which are being addressed in the next release (most of them have been addressed in the SVN trunk already).

    I like the return echo code, that sounds cleaner. I’ll look into that. Thanks.

    I agree, the version no is useful. It’s also advertising security holes if there are any (just like WordPress does!).

    Maybe a comment like <!–breadcrumbs navxt 2.1.4–> would be less of an issue. Because the current comment has two new lines in it, it messes with the beauty of my HTML! 🙂

    Yeah Tom wanted to break it to do the line breaks within the comment as for some reason having the line break after the html comment caused problems with a sidebar widget that he made for it. In the trunk I’ve changed it to <!–Breadcrumb NavXT [version #]–> (where [version #] is the version number of Breadcrumb NavXT).

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: Breadcrumb NavXT] Unnecessary comments in the output code’ is closed to new replies.