Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Sign In
Not a member yet? Click here to register.

makecommentnav

This function will make a page navigation for the showcomments() function.

makecommentnav

Quote

makecommentnav( int $start , int $count , int $total [ , int $range [ , string $link ] ] )


Parameters
start
The start value which is currently displayed

count
How many items per page which is displayed

total
Total number of items

range
is number of page buttons displayed and the range of them

link
Is the link for the navigation links

Return Values
This function will return a page navigation for the showcomments() function.

Example
Code
<?php
// If number of rows are greater then 10 which is the number of comments displayed on one page it will show the comment navigation.
if ($c_rows > 10) {
 echo "<div style='text-align:center;margin-bottom:5px;'>".makecommentnav($_GET['c_start'], 10, $c_rows, 3, $clink."&amp;")."</div>\n";
}
?>


Changelog
7.02.00 - This function is replaced with the improved makepagenav function
7.01.00 - Minor changes added, similar to the ones mentioned in the makepagenav function.

Notes
This function is only used inside the showcomments() function.
If you want to make a page navigation use the makepagenav() function.

In v7.00 the comments were broken down into pages with 10 comments on each page to prevent overload when items has hundreds of comments resulting in the creation of the makecommentnav() function.


See also …


References