Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Addons and Modifications > Addons/Mods Graveyard

Notices

Closed Thread
 
Thread Tools Display Modes
  #1  
Old 04-02-2009, 03:00 AM
kisazeky kisazeky is offline
Member
 
Join Date: Mar 2009
Posts: 44
Credits: 22,650
kisazeky
Default 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
  #2  
Old 04-02-2009, 03:29 AM
zhiichiro zhiichiro is offline
Member
 
Join Date: Mar 2009
Posts: 106
Credits: 13,437
zhiichiro
Default RE: Page that will display a user's pets

we have that already yey!!
  #3  
Old 04-02-2009, 11:10 AM
mattalien mattalien is offline
Member
 
Join Date: Dec 2008
Posts: 27
Credits: 4,853
mattalien
Default RE: Page that will display a user's pets

It destroys my layout though.....

http://www.pokeframesadoptionstation.comuf.com/profile.php?owner=Mattalien
  #4  
Old 04-02-2009, 11:44 AM
rosepose rosepose is offline
Member
 
Join Date: Jan 2009
Posts: 127
Credits: 12,341
rosepose
Default RE: Page that will display a user's pets

How would one change the number of pets per row?
  #5  
Old 04-02-2009, 02:22 PM
kisazeky kisazeky is offline
Member
 
Join Date: Mar 2009
Posts: 44
Credits: 22,650
kisazeky
Default 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.
  #6  
Old 04-02-2009, 08:29 PM
Killgore Killgore is offline
Member
 
Join Date: Dec 2008
Posts: 82
Credits: 10,772
Killgore is an unknown quantity at this point
Default 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?
  #7  
Old 04-02-2009, 10:22 PM
Seapyramid Seapyramid is offline
Premium Member
 
Join Date: Feb 2009
Posts: 373
Gender: Female
Credits: 18,034
Seapyramid
Default 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
  #8  
Old 04-03-2009, 02:40 AM
Ashje Ashje is offline
Member
 
Join Date: Jan 2009
Posts: 179
Credits: 12,605
Ashje
Default 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?
  #9  
Old 04-03-2009, 03:56 PM
kisazeky kisazeky is offline
Member
 
Join Date: Mar 2009
Posts: 44
Credits: 22,650
kisazeky
Default 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.
  #10  
Old 11-05-2009, 08:58 PM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 488,275
Hall of Famer is on a distinguished road
Default RE: Page that will display a user's pets (non layout destroying update)

This can be easily remade into a pokedex system. XD
Closed Thread


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
User cannot adopt pets? + Other problems Pear Questions and Supports 3 11-12-2014 04:21 PM
Only display pets a user hasn't clicked in daycare Hwona Suggestions and Feature Requests 3 08-16-2014 05:53 PM
Easy way to put user's avatar on any page Derpstra Tutorials and Tips 0 08-20-2012 05:05 PM
Change layout of all Adoptables page Daydreamz Questions and Supports 3 04-24-2010 01:34 PM
Limit Pets per user Seapyramid Questions and Supports 5 02-02-2009 11:51 PM


All times are GMT -5. The time now is 09:42 AM.

Currently Active Users: 725 (0 members and 725 guests)
Threads: 4,081, Posts: 32,031, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636