<- [ 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 ] -> y cuando le das a la flechita para pasar a la otra pagina el numero de adelante desaparesca t el numero que sigue al 11 aparesca, y asi.... no se si me esplico, estube leyendo un articulo en guebmaster.com para hacer eso pero la verdad que no me sale, lo veo demasiado distinto

El Codigo que uso para la paginacion es el siguiente:
Código PHP:
<?php
if (!eregi("modules.php", $_SERVER['PHP_SELF'])) {
die ("Usted no puede tener acceso a este archivo directamente...");
}
$index = 1;
require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
include("functions.php");
function theindex($new_topic=0) {
#Page Numbers ver1.0, add $pagenum to global
global $dbi, $storyhome, $topicname, $topicimage, $topictext, $datetime, $user, $cookie, $nukeurl, $prefix, $multilingual, $currentlang, $articlecomm, $sitename, $pagenum;
if ($multilingual == 1) {
$querylang = "AND (alanguage='$currentlang' OR alanguage='')";
} else {
$querylang = "";
}
include("header.php");
automated_news();
if (isset($cookie[3])) {
$storynum = $cookie[3];
} else {
$storynum = $storyhome;
}
if ($new_topic == 0) {
$qdb = "WHERE (ihome='0' OR catid='0')";
$home_msg = "";
} else {
$qdb = "WHERE topic='$new_topic'";
$res = sql_query("select topictext from ".$prefix."_topics where topicid='$new_topic'", $dbi);
list($topic_title) = sql_fetch_row($res, $dbi);
OpenTable();
if (sql_num_rows($res, $dbi) == 0) {
echo "<center><font class=\"title\">$sitename</font><br><br>"._NOINFO4TOPIC."<br><br>[ <a href=\"index.php\">"._GOTONEWSINDEX."</a> | <a href=\"topicos.php\">"._SELECTNEWTOPIC."</a> ]</center>";
} else {
echo "<center><font class=\"title\">$sitename: $topic_title</font><br><br>"
."<form action=\"buscar.php\" method=\"post\">"
."<input type=\"hidden\" name=\"topic\" value=\"$new_topic\">"
.""._SEARCHONTOPIC.": <input type=\"name\" name=\"query\" size=\"30\"> "
."<input type=\"submit\" value=\""._SEARCH."\">"
."</form>"
."[ <a href=\"index.php\">"._GOTOHOME."</a> | <a href=\"topicos.php\">"._SELECTNEWTOPIC."</a> ]</center>";
}
CloseTable();
echo "<br>";
}
#Page Numbers ver1.0
if ($pagenum == "") { $pagenum = 1 ; }
$offset = ($pagenum-1) * $storynum ;
#$result = sql_query("SELECT sid, catid, aid, title, time, hometext, bodytext, comments, counter, topic, informant, notes, acomm, score, ratings FROM ".$prefix."_stories $qdb $querylang ORDER BY sid DESC limit $storynum", $dbi);
$result = sql_query("SELECT sid, catid, aid, title, time, hometext, bodytext, comments, counter, topic, informant, notes, acomm, score, ratings FROM ".$prefix."_stories $qdb $querylang ORDER BY sid DESC limit $offset, $storynum", $dbi);
#END
while (list($s_sid, $catid, $aid, $title, $time, $hometext, $bodytext, $comments, $counter, $topic, $informant, $notes, $acomm, $score, $ratings) = sql_fetch_row($result, $dbi)) {
if ($catid > 0) {
list($cattitle) = sql_fetch_row(sql_query("select title from ".$prefix."_stories_cat where catid='$catid'", $dbi), $dbi);
}
getTopics($s_sid);
formatTimestamp($time);
$subject = stripslashes($subject);
$hometext = stripslashes($hometext);
$hometext = smile($hometext);
$hometext = bbencode($hometext);
$hometext = nl2br($hometext);
$notes = stripslashes($notes);
$introcount = strlen($hometext);
$fullcount = strlen($bodytext);
$totalcount = $introcount + $fullcount;
$c_count = $comments;
$r_options = "";
if (isset($cookie[4])) { $r_options .= "&mode=$cookie[4]"; }
if (isset($cookie[5])) { $r_options .= "&order=$cookie[5]"; }
if (isset($cookie[6])) { $r_options .= "&thold=$cookie[6]"; }
if (is_user($user)) {
$the_icons = " | <a href=\"imprimir.php?sid=$s_sid\"><img src=\"images/print.gif\" border=\"0\" Alt=\""._PRINTER."\" width=\"16\" height=\"11\"></a> <a href=\"recomendar.php?op=FriendSend&sid=$s_sid\"><img src=\"images/friend.gif\" border=\"0\" Alt=\""._FRIEND."\" width=\"16\" height=\"11\"></a>";
} else {
$the_icons = "";
}
$story_link = "<a href=\"articulo.php?sid=$s_sid$options\">";
$morelink = "(";
if (($fullcount > 0) OR ($c_count > 0)) {
$morelink .= "$story_link<b>"._READMORE."</b></a> | ";
} else {
$morelink .= "";
}
if ($fullcount > 0) { $morelink .= "$totalcount "._BYTESMORE." | "; }
if ($articlecomm == 1 AND $acomm == 0) {
if ($c_count == 0) { $morelink .= "$story_link"._COMMENTSQ."</a>"; } elseif ($c_count == 1) { $morelink .= "$story_link$c_count "._COMMENT."</a>"; } elseif ($c_count > 1) { $morelink .= "$story_link$c_count "._COMMENTS."</a>"; }
}
if ($fullcount == 0 AND $acomm == 1) {
$morelink .= "$story_link<b>"._READMORE."</b></a>";
if (!is_user($user)) {
$morelink .= " | ";
}
}
$morelink .= "$the_icons";
$sid = $s_sid;
if ($catid != 0) {
$resultm = sql_query("select title from ".$prefix."_stories_cat where catid='$catid'", $dbi);
list($title1) = sql_fetch_row($resultm, $dbi);
$title = "<a href=\"categorias.php?op=newindex&catid=$catid\"><font class=\"storycat\">$title1</font></a>: $title";
$morelink .= " | <a href=\"categorias.php?op=newindex&catid=$catid\">$title1</a>";
}
if ($score != 0) {
$rated = substr($score / $ratings, 0, 4);
} else {
$rated = 0;
}
$morelink .= " | "._SCORE." $rated";
$morelink .= ")";
$morelink = str_replace(" | | ", " | ", $morelink);
themeindex($aid, $informant, $datetime, $title, $counter, $topic, $hometext, $notes, $morelink, $topicname, $topicimage, $topictext);
}
#Page Numbers ver1.0
#Page Numbers ver1.2 - add 'where ihome=0' to only select stories with 'Publish In Home=Yes'
#Page Numbers ver1.3 - add check for new_topic being set (Topics don't look at 'Publish In Home' unlike News)
#Page Numbers ver1.4.2
if(isset($new_topic)) {
$res = sql_query("select * from ".$prefix."_stories where topic=".$new_topic, $dbi);
} else {
$res = sql_query("select * from ".$prefix."_stories where ihome=0", $dbi);
}
$numstories = sql_num_rows($res, $dbi);
$numpages = ceil($numstories / $storynum);
#Page Numbers ver1.1 - added 'and $new_topic == 0'
#Page Numbers ver1.3 - remove 'and $new_topic == 0'
#if ($numpages > 1 and $new_topic == 0) {
if ($numpages > 1) {
#Page Numbers ver1.4 - add opentable(),closetable() to put Page Numbers in a box
opentable();
echo "<center>$numstories Noticias ($numpages Paginas, $storynum Por Pagina)<br>" ;
#Page Numbers ver1.4 - add left/right navigation arrows
if ($pagenum > 1) {
$prevpage = $pagenum - 1 ;
#Page Numbers ver1.4 - check for location of left/right arrow images
#Page Numbers ver1.4.1 - add align=absmiddle for left/right arrows
if(file_exists("images/download/left.gif")) {
$leftarrow = "images/download/left.gif" ; # 5.x
} else {
$leftarrow = "images/left.gif" ; # 6.x
}
if(isset($new_topic)) {
echo "<a href=\"modules.php?name=Noticias&new_topic=$new_topic&pagenum=$prevpage\"><img src=\"$leftarrow\" align=\"absmiddle\" border=\"0\" hspace=\"10\"></a>";
} else {
echo "<a href=\"modules.php?name=Noticias&pagenum=$prevpage\"><img src=\"$leftarrow\" align=\"absmiddle\" border=\"0\" hspace=\"10\"></a>";
}
}
echo "[ " ;
for ($i=1; $i < $numpages+1; $i++) {
if ($i == $pagenum) {
#Page Numbers ver1.2 - bold the page number currently displaying for those who dont underline hyperlinks
echo "<b>$i</b>";
} else {
#Page Numbers ver1.3 - add check for new_topic being set
if(isset($new_topic)) {
echo "<a href=\"modules.php?name=Noticias&new_topic=$new_topic&pagenum=$i\">$i</a>";
} else {
echo "<a href=\"modules.php?name=Noticias&pagenum=$i\">$i</a>";
}
}
if ($i < $numpages) { echo " | "; } else { echo " ]"; }
}
if ($pagenum < $numpages) {
$nextpage = $pagenum + 1 ;
#Page Numbers ver1.4 - check for location of left/right arrow images
if(file_exists("images/download/right.gif")) {
$rightarrow = "images/download/right.gif" ; # 5.x
} else {
$rightarrow = "images/right.gif" ; # 6.x
}
if(isset($new_topic)) {
echo "<a href=\"modules.php?name=Noticias&new_topic=$new_topic&pagenum=$nextpage\"><img src=\"$rightarrow\" align=\"absmiddle\" border=\"0\" hspace=\"10\"></a>";
} else {
echo "<a href=\"modules.php?name=Noticias&pagenum=$nextpage\"><img src=\"$rightarrow\" align=\"absmiddle\" border=\"0\" hspace=\"10\"></a>";
}
}
echo "</center>" ;
#Page Numbers ver1.4 - add opentable(),closetable() to put Page Numbers in a box
closetable();
}
#END
include("footer.php");
}
// El Codigo sigue con otras funciones de votacion y eso pero no tiene nada que ver
?>

Bueno espero que me puedan ayudar, Gracias
Saludos
