Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Addons/Mods Graveyard (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=41)
-   -   Page that will display a user's pets (non layout destroying update) (http://www.mysidiaadoptables.com/forum/showthread.php?t=600)

kisazeky 04-02-2009 02:00 AM

Page that will display a user's pets (non layout destroying update)
 
This script will neatly display a given user's pets, in rows of 5, up to 100.

Everybody's profile link will be:

profile.php?owner=username

See an example here:
http://digiadopt.l4rge.com/profile.php?owner=kisazeky

zhiichiro 04-02-2009 02:29 AM

RE: Page that will display a user's pets
 
we have that already yey!!

mattalien 04-02-2009 10:10 AM

RE: Page that will display a user's pets
 
It destroys my layout though.....

http://www.pokeframesadoptionstation.comuf.com/profile.php?owner=Mattalien

rosepose 04-02-2009 10:44 AM

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

kisazeky 04-02-2009 01:22 PM

RE: Page that will display a user's pets
 
Rose find this line:

PHP Code:

$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 Code:

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

to
PHP Code:

$query "SELECT * FROM owned_adoptables WHERE owner = '$owner' ORDER BY uid DESC LIMIT 8,8"

and then...

PHP Code:

$query "SELECT * FROM owned_adoptables WHERE owner = '$owner' ORDER BY uid DESC LIMIT 10,5"

to
PHP Code:

$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.

Killgore 04-02-2009 07:29 PM

RE: Page that will display a user's pets (non layout destroying update)
 
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?

Seapyramid 04-02-2009 09:22 PM

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

Originally Posted by Killgore
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

Ashje 04-03-2009 01:40 AM

RE: Page that will display a user's pets (non layout destroying update)
 
Awesome, Thanks =). But how do I make a table like zhiichiro on the users page, with the ID, Username and Currency shown?

kisazeky 04-03-2009 02:56 PM

RE: Page that will display a user's pets (non layout destroying update)
 
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 11-05-2009 07:58 PM

RE: Page that will display a user's pets (non layout destroying update)
 
This can be easily remade into a pokedex system. XD

Bloodrun 11-05-2009 08:06 PM

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

Originally Posted by Hall of Famer
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. ;)

Hall of Famer 11-05-2009 08:14 PM

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

Originally Posted by Bloodrun
Quote:

Originally Posted by Hall of Famer
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.

Bloodrun 11-05-2009 08:27 PM

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

Originally Posted by Hall of Famer
Quote:

Originally Posted by Bloodrun
Quote:

Originally Posted by Hall of Famer
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.


All times are GMT -5. The time now is 11:00 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.