Bug fix, tags mod for sNews, version 2

Comments (0)

This is a bug fix, within the function tagsearch, if the tag search returns no results, it will result in a closing div tag without an opening div. In theory, this likely would not happen because people would only be clicking on your auto-generated tags, however if they attempt to insert their own tag in the url, and that tag isn't found, this can result.

The fix is simple, as always... BACK-UP your snews.php file and work off of a copy, now within the function tagsearch, find and add the following opening div tag;

if (!$numrows) {
    echo '<div><p>'.l('noresults').'
        <strong>'.stripslashes($tags_query).'</strong>.</p>';
} else {
    echo '<div id="tag_results"><p><strong>'.$numrows.'</strong> '.l('tagresultsfound').' <strong>'.
    stripslashes($tags_query).'</strong>.</p>';
}

That's it, upload your modified snews.php file and you should be all set.

bookmark / share this: Bookmark and Share
rated 3/5 (2 votes)


Comments

Commenting is closed at this time.

Back to top