Ok, I've got this code for it:
$result = mysql_query("SELECT count(*) AS count FROM forumst");
$count = mysql_fetch_object($result);
if (!$perpage) $perpage = 10;
$pages = ceil($count->count / $perpage);
if ($p < 1) $p = 1;
if ($p > $pages) $p = $pages;
$pages = pages_links(min($pages,20),"/forum.php?f=$id&p=",$p);
//end of pages
Now, I'm getting the error with this function:
$pages = pages_links(min($pages,20),"/forum.php?f=$id&p=",$p);
I'm getting an error that says undefined function.