Loading...

WebWoW

World of Warcraft Private Development Forums

You are not logged in.

stady234
Donator
<The Untouchables>

From: FL, USA
Registered: 2009-10-25
Posts: 250
Reputation:   16 
Website

#1     2010-01-27 20:49:29

Account Pagination...

Was hoping someone could help with making a working mod to the "account list". 

(admincp3) 

would like to make a working Pagination, but every time i try.. it either doesn't link another page, or kills the page entirely... and the page numbers don't end up where they should...


V/R

Stady234

Offline

 
 
clarkeez
God of BlizzCraft
From: /htdocs
Registered: 2009-12-22
Posts: 137
Reputation:   
Website

#2     2010-01-28 15:12:20

Re: Account Pagination...

I don't fully understand what you are trying to acheive

Offline

 
stady234
Donator
<The Untouchables>

From: FL, USA
Registered: 2009-10-25
Posts: 250
Reputation:   16 
Website

#3     2010-01-28 20:58:04

Re: Account Pagination...

I would like to have the "30 Results for '' (displaying 30 max)"
in the "User Manager" page.. have "pagination" (page numbers) for the 31+....


V/R

Stady234

Offline

 
 
clarkeez
God of BlizzCraft
From: /htdocs
Registered: 2009-12-22
Posts: 137
Reputation:   
Website

#4     2010-01-29 08:40:26

Re: Account Pagination...

There really isnt any need, just search for the players.

Offline

 
Phenom
Moderator
From: The netherlands
Registered: 2009-04-27
Posts: 465
Reputation:   22 
Website

#5     2010-01-29 09:48:17

Re: Account Pagination...

It could be very usefull...


Axe's rule no.16: Phenom is an exception to Rule 15.

Offline

 
 
maverfax
Rival
From: The PingueCMS
Registered: 2009-06-21
Posts: 106
Reputation:   
Website

#6     2010-01-29 16:27:19

Re: Account Pagination...

Here's a quick go at it:

(I HAVEN'T TESTED THIS, SO THERE'S PROBABLY A MISTAKE SOMEWHERE IN HERE)

Code:

<?php
$host = '127.0.0.1';   #MySQL Server host
$user = 'root';          #MySQL Server Username
$pass = '';               #MySQL Server Password
$db = 'Site';             #MySQL Database for Website

$page = '0';            #Default Page
$results = '15';        #Default Result Amounts
$more = false;        #Default show next page (leave false)

if(isset($_GET['page']))
  $page = (is_numeric($_GET['page'])) ? $_GET['page'] : '0';

mysql_connect($host, $user, $pass);
mysql_select_db($db);

#Get News
$query = mysql_query("SELECT title, news, author FROM news ORDER BY id DESC LIMIT $page, $results");

if(mysql_num_rows($query) > $results) {
  $total_pages = mysql_num_rows($query) / $results;
  $more = true;
}

while($row = mysql_fetch_array($query)) {
  echo "Title: <b>{$row['title']}</b> - Posted by {$row['author']}
             <br>
          {$row['news']}";
}
echo "Showing {$results} posts per page, {$total_pages} total pages. <a href='?page={$next}'>Next -></a>";
if($more) {
  $next = $page + $results;
  echo "<a href='?page={$next}'>Next -></a>";
?>

Just change this to work with your site, and you're done! smile

Post edited by maverfax (2010-01-29 16:31:03)

Offline

 
 
stady234
Donator
<The Untouchables>

From: FL, USA
Registered: 2009-10-25
Posts: 250
Reputation:   16 
Website

#7     2010-01-29 21:35:16

Re: Account Pagination...

test code didn't work.. but i wanted a mod of the admincp3 SPECIFICALLY..

not other code to put somewhere else... nice try anyway..

BTW this was the original line in the admincp3 that got me thinking....

Code:

 
 //print "<br>".paginate($b,$start,'quest.php?name=admincp3');

Post edited by stady234 (2010-01-29 21:37:15)


V/R

Stady234

Offline

 
 
Axe
Admin
From: Croatia
Registered: 2008-09-13
Posts: 936
Reputation:   66 
Website

#8     2010-01-30 03:36:20

Re: Account Pagination...

may i remind there is already function to paginate included with script check out functions.php

Offline

 
 
stady234
Donator
<The Untouchables>

From: FL, USA
Registered: 2009-10-25
Posts: 250
Reputation:   16 
Website

#9     2010-01-30 07:08:39

Re: Account Pagination...

if i uncomment your original code i get this:
http://img710.imageshack.us/img710/9350/paginate.png

===

It looks like it is based on your entry in the "function.php".. either way.. how do i implement your function??

Cause when you click on 1,2..30... nothing happens... i have 67 accounts currently.. so page 2 should come up with names, but it gives me a blank screen...


V/R

Stady234

Offline

 
 
stady234
Donator
<The Untouchables>

From: FL, USA
Registered: 2009-10-25
Posts: 250
Reputation:   16 
Website

#10     2010-02-05 07:31:39

Re: Account Pagination...

any help??


V/R

Stady234

Offline

 
 

Board footer

Modded by AXE
© 2002–2008 PunBB

Not registered yet?
Latest Posts  
Table 'characte... (Hellfires)
How to put vote... (Rusfighter)
Trinity_ra- Bla... (Auzziedude)
Erroe (Axe)
paypal (Phenom)
Random Fact  
You can buy AD banner on top of this website, click here, trade in your MP.
Activity  
miki258 and bleachwow122 just completed all steps trough WebCreator and got new websites.
maryo1912 and LordRasz just completed all steps trough WebCreator and got new websites.
Hellfires and khazan just completed all steps trough WebCreator and got new websites.
khazan and Hellfires just completed all steps trough WebCreator and got new websites.
bleachwow122 added new person named "Ichigo_Kurosaki" to SpyMe.
TheCrogamer and reconsniper96 just completed all steps trough WebCreator and got new websites.
WebWoW Staff  
Axe - creator & administrator
Phenom - moderator & spokesman
 
 
Action logged.