Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Questions and Supports

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 05-02-2009, 09:23 PM
nitrogen nitrogen is offline
Member
 
Join Date: May 2009
Posts: 2
Credits: 701
nitrogen
Lightbulb Random Adoption

I'm trying to build a "Pokemon" adoptables site.
Here's what I'm trying to do:
1) Quickly make all adoptables/Pokemon have the same egg image (SQL query/script modification?)
2) Edit the adopt.php page so that it serves a random adoptable (only one) (the user won't be able to tell which adoptable it is as they all have the same image)
This way the user won't know what they're adopting (no name, aids don't help, etc.) until they get past the egg phase.
Here's an example of what I'm trying to do:
http://www.virtuadopt.com/adopt.php
Quote:
This is a Pokémon egg. I am not sure what it will hatch into. Just name it, and treat it well, someday, it may hatch into marvelous Pokémon species!
Is there a way to set the "level up" click amount to a span of numbers? Example: egg 1 will hatch after 5-10 clicks.

Is there also a quick way to add images? I have 500+ jpg images that I need to convert to gifs and upload. The Admin CP is way to slow at adding images (one at a time).[hr]
I figured out how to get number 2 to work. I searched the forum and found this:
http://www.rusnakweb.com/forum/showthread.php?tid=365
which helped a lot. I'm still trying to figure out how to get all the adoptables to share the same egg image without manually editing every single one and how to upload 500+ adoptables at once.
New "todo":
Get adopt.php to display eggs horizontally.
Reply With Quote
  #2  
Old 05-02-2009, 09:52 PM
Seapyramid Seapyramid is offline
Premium Member
 
Join Date: Feb 2009
Posts: 373
Gender: Female
Credits: 15,550
Seapyramid
Default RE: Random Adoption

Eggs are easy.. when making the "new adoptable" give them all the same egg image.

For horizontal change article content of your adopt.php page at line 127 to

Code:
$article_content = $article_content."
<a href='adopt.php?id=".$aid."'><img src='".$eggimage."' border='0'></a>&nbsp;&nbsp;";
Horizontal and no name or description like at http://mysticgrove.net/grove/adopt.php

Uploading I can't help you. :(
Reply With Quote
  #3  
Old 05-02-2009, 10:27 PM
nitrogen nitrogen is offline
Member
 
Join Date: May 2009
Posts: 2
Credits: 701
nitrogen
Default RE: Random Adoption

I tried uploading all the pictures to the picuploads directory but they don't show up. I think database editing is needed (?).[hr]
I just tried. The adopt.php file at the forum thread:
http://www.rusnakweb.com/forum/showthread.php?tid=365
doesn't work with the latest release. A few includes and functions are missing.
Reply With Quote
  #4  
Old 05-03-2009, 05:38 AM
Xius Xius is offline
Member
 
Join Date: Apr 2009
Posts: 59
Credits: 7,580
Xius
Default RE: Random Adoption

Delete the .htaccess file in picuploads, the same thing happened to me.

And, to show only 1 random adoptable...

Find:
PHP Code:
// Begin the output of all the adoptables to the user...

$query "SELECT * FROM ".$prefix."adoptables";
$result mysql_query($query);
$num mysql_numrows($result); 
Replace:
PHP Code:
$query "SELECT * FROM ".$prefix."adoptables"
With:
PHP Code:
$query "SELECT * FROM ".$prefix."adoptables ORDER BY RAND() LIMIT 1"
And you will now have a random adoptable each time.
If you want an example of what it looks like: Http://PokemonEpiphany.com/adopt.php
Reply With Quote
  #5  
Old 05-10-2009, 09:10 AM
trollis76 trollis76 is offline
Member
 
Join Date: Feb 2009
Posts: 160
Credits: 13,466
trollis76
Default RE: Random Adoption

For me that code didn't work.
This was working for me:
Code:
$query = "SELECT * FROM ".$prefix."adopts_adoptables ORDER BY RAND() LIMIT 1";
Reply With Quote
Reply


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
Adoption Problems Kamalya Questions and Supports 8 01-27-2013 01:15 PM
Hiding the adoption ID? Aasixx Questions and Supports 8 11-01-2012 10:26 AM
Secure Random Adoption V2 fadillzzz Mys v1.2.x Mods 7 02-28-2012 01:57 PM
Secure Random Adoption Process fadillzzz Mys v1.1.x Mods 19 02-14-2011 11:12 AM
Random 5 is not realy random! RipJawWolfFang Questions and Supports 9 04-30-2009 06:03 AM


All times are GMT -5. The time now is 05:20 AM.

Currently Active Users: 384 (0 members and 384 guests)
Threads: 4,080, Posts: 32,024, 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