sNews Forum

sNews 1.7 (current stable version) => Patches/fixes => Topic started by: philmoz on November 02, 2008, 11:33:54 am

Title: New Comments and comment pagination
Post by: philmoz on November 02, 2008, 11:33:54 am
Comment pagination.
To rectify an issue where article naming system deployed by site owner was numerical, we introduced a comments page pagination. However, we missed the relevant part of the new_comments() function
To rectify, find in
// NEW COMMENTS
function new_comments
the following line. (1284)
Code: [Select]
$paging = $page > 1 ? '/'.$page : '';replace with
Code: [Select]
$paging = $page > 1 ? '/'.l('comment_pages').$page : '';
----------------------------------------------------------------------------------------------

If an article has had comments made, then admin turns those comments off, the comments are still selected by the new_comments() function, and displayed. If one of these links is selected, it will fail to display.

To rectify, find in
// NEW COMMENTS
function new_comments
the following line. (1255)
Code: [Select]
WHERE a.published = 1and replace with
Code: [Select]
WHERE a.published = 1 AND (a.commentable = \'YES\' || a.commentable = \'FREEZ\' )
02 November 2008, 21:20:53