Jump to content

myfan

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

myfan's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. i used parts of the pagination script found on phpfreaks but have modified it abit. So now my only issue i have is i need it to after giving me how many pages is to only display like 5 of the pages but on an upward route like < 1 2 3 4 5 > what i want is lets say i want to limit the amount of pages in the pagination so that when i click 5 it shows me < 4 5 6 7 8 > here is my code $begin = $numofpages - $numofpages; while($begin < 1) $begin++; $end = $begin + 4; while($end > $numofpages) $end--; for($i = 1; $i <= $numofpages; $i++){ if($i == $page){ echo($i." "); }else{ echo("<a href=\"index.php?page=$i\">$i</a> "); } } if(($totalrows % $per_page) != 0){ if($i == $page){ echo($i." "); }else{ echo("<a href=\"index.php?page=$i\">$i</a> "); } } }
  2. i used parts of the pagination script found on phpfreaks but have modified it abit. So now my only issue i have is i need it to after giving me how many pages is to only display like 5 of the pages but on an upward route like < 1 2 3 4 5 > what i want is lets say i want to limit the amount of pages in the pagination so that when i click 5 it shows me < 4 5 6 7 8 > here is my code $begin = $numofpages - $numofpages; while($begin < 1) $begin++; $end = $begin + 4; while($end > $numofpages) $end--; for($i = 1; $i <= $numofpages; $i++){ if($i == $page){ echo($i." "); }else{ echo("<a href=\"index.php?page=$i\">$i</a> "); } } if(($totalrows % $per_page) != 0){ if($i == $page){ echo($i." "); }else{ echo("<a href=\"index.php?page=$i\">$i</a> "); } } }
  3. Okay so i am creating my own forum for a site. Just for ease of integration. Only want to deal with one login. But okay i have most everything working. But i came up with a problem. As with invision powerboards there is a function that counts the replys in a certain forum. I have all reply per topic recorded in the topics table. in a row called replys. I know it will probably take looping but not sure how to do it so that it ads those numbers. I have looked for a tutorial but can't find one any help anyone can provide would be great full!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.