Page that will display a user's pets (non layout destroying update)

Forum
Last Post
Threads / Messages
Status
Not open for further replies.
RE: Page that will display a user's pets

It destroys my layout though.....

http://www.pokeframesadoptionstation.comuf.com/profile.php?owner=Mattalien
 
RE: Page that will display a user's pets

How would one change the number of pets per row?
 
RE: Page that will display a user's pets

Rose find this line:

PHP:
$query = "SELECT * FROM owned_adoptables WHERE owner = '$owner' ORDER BY uid DESC LIMIT 0,5 ";

Change the 5 to the number of pets you'd like to display. But that means, you have to change every $query to reflect that new number. For example if you want 8, you'd have to change the next $query from

PHP:
$query = "SELECT * FROM owned_adoptables WHERE owner = '$owner' ORDER BY uid DESC LIMIT 5,5";
to
PHP:
$query = "SELECT * FROM owned_adoptables WHERE owner = '$owner' ORDER BY uid DESC LIMIT 8,8";

and then...

PHP:
$query = "SELECT * FROM owned_adoptables WHERE owner = '$owner' ORDER BY uid DESC LIMIT 10,5";
to
PHP:
$query = "SELECT * FROM owned_adoptables WHERE owner = '$owner' ORDER BY uid DESC LIMIT 16,8";

and so on.

Just find next $query and replace the values.
 
Slight issue: Some of my members have spaces in their username, and it refuses to even acknowledge that the user exists. Is there a way to fix this, or am i over-looking something?
 
Killgore said:
Slight issue: Some of my members have spaces in their username, and it refuses to even acknowledge that the user exists. Is there a way to fix this, or am i over-looking something?
I had the same issue but was able to fix the problem

if you replace line 77 with

Code:
$owner = preg_replace("/[^a-zA-Z0-9\x20]/", "", $owner);
it will accept the space but still disallow other chara for security

Sea
 
Awesome, Thanks =). But how do I make a table like zhiichiro on the users page, with the ID, Username and Currency shown?
 
Like this. *download the file I included*

Note for the pets link you also need the profile.php, which I also inclded.
 
Hall of Famer said:
This can be easily remade into a pokedex system. XD

This is already a part of the current release, and yes it has been made. ;)
 
Bloodrun said:
Hall of Famer said:
This can be easily remade into a pokedex system. XD

This is already a part of the current release, and yes it has been made. ;)

Umm what do you mean? I didnt happen to find it after installing Rusnak's script.

Well pokedex system should list pets from number 001 to xxx, and the detailed descriptions should be accessible only for the pets you own. Dunno if this is what you are talking about.
 
Hall of Famer said:
Bloodrun said:
Hall of Famer said:
This can be easily remade into a pokedex system. XD

This is already a part of the current release, and yes it has been made. ;)

Umm what do you mean? I didnt happen to find it after installing Rusnak's script.

Well pokedex system should list pets from number 001 to xxx, and the detailed descriptions should be accessible only for the pets you own. Dunno if this is what you are talking about.

Go to your profile, if you have any adopted pets, you will see them listed.

And what I was talking about for the pokedex is that someone did make a site about pokemon wether or not they literally have a pokedex I do not know.
 
Status
Not open for further replies.

Similar threads

Users who are viewing this thread

  • Forum Contains New Posts
  • Forum Contains No New Posts

Forum statistics

Threads
4,274
Messages
33,115
Members
1,602
Latest member
BerrieMilk
BETA

Latest Threads

Latest Posts

Top