Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Questions and Supports (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=18)
-   -   Random Adoptables (http://www.mysidiaadoptables.com/forum/showthread.php?t=1273)

Roconza 01-22-2010 03:45 AM

Random Adoptables
 
I think I asked a long time ago about this but what I want to know is there a way to make adoptables out side of the main adoptable page randomly appear and disappear some thing like (I know, I know *brick*) dragon caves egg on the front page. But unlike dragon cave it is not claimed, it just appears giving users time to adopt it before it disappears from the page.

If so how hard would it be to do?

Seapyramid 01-22-2010 03:54 AM

RE: Random Adoptables
 
Simply limit the amount shown at one time, make it random & every refresh would change them. example http://mysticgrove.net/grove/adopt.php

Sea

Roconza 01-22-2010 11:54 AM

RE: Random Adoptables
 
I can't see your site it's causing me to slow down for some reason.



Yes, but can I make it so some times they don't show up at all? Like there is a 40% change there will be no adoptables at all on the given page? Also it can be there are say 10 adoptables but only a random amount appear and what shows is a random egg from the for mentioned 10 eggs?

powerchaos 01-22-2010 09:48 PM

RE: Random Adoptables
 
you mean like this

from 1 to 2 am it shows the small dragons

from 2 to 3 am it shows the aduld dragons

from 3 to 4 am it shows the humans

from 4 to 5 it shows humans and dragons

so it shows every hour differend
or every day or every refresh

i think he means something like that , so they stay 1 day , and then they are no more but others in place
so you only see a sertain pets and the rest is only avaible on a other day (or on the full page if there is a full page)

that would be nice to have
so a user is forced to return the next day if they want new pets (or the given time limit)

Greets From PowerChaos

Roconza 01-22-2010 10:58 PM

RE: Random Adoptables
 
Quote:

Originally Posted by Seapyramid
Simply limit the amount shown at one time, make it random & every refresh would change them. example http://mysticgrove.net/grove/adopt.php

Sea

Quote:

Originally Posted by powerchaos
you mean like this

from 1 to 2 am it shows the small dragons

from 2 to 3 am it shows the aduld dragons

from 3 to 4 am it shows the humans

from 4 to 5 it shows humans and dragons

so it shows every hour differend
or every day or every refresh

i think he means something like that , so they stay 1 day , and then they are no more but others in place
so you only see a sertain pets and the rest is only avaible on a other day (or on the full page if there is a full page)

that would be nice to have
so a user is forced to return the next day if they want new pets (or the given time limit)

Greets From PowerChaos

Yes, you both nailed it perfectly but I have not idea were to start. My main goal is to have "different world" or "places" were the user checks back every so often. I saw another member's site had a similar feature even though I'm kinda disappointing about that way I plain to do it is bit different.

I really don't want to fill my site with a lot of useless flashy features just ones that will make it simple yet entertaining. The problem is I don't have a lot of back ground with php. So I kinda need a point or hint so I can figure it out so to speak.

Seapyramid 01-23-2010 12:07 AM

RE: Random Adoptables
 
this is the sql call I use

PHP Code:

 SELECT a.code,b.primaryimage FROM ".$prefix."adoptables AS a JOIN ".$prefix."levels AS b ON b.type=a.type AND a.whenisavail !='promo' AND a.whenisavail !='mystery' AND a.shop=b'0' AND a.grlelevel <= '$group' AND b.thisislevel=0 ORDER BY RAND() LIMIT 8"; 

My code is now greatly optimized from the original.. so you will have to understand some php to break it down.. but thats what I use.

Roconza 01-23-2010 09:26 AM

RE: Random Adoptables
 
But what if I only want this feature on say a extra adoptable page?

Seapyramid 01-23-2010 09:47 AM

RE: Random Adoptables
 
You only use that type of random/limit call where you want it used. Using it in one place isn't going to effect other areas of even the same page if you don't want it to, much less other pages.

Sea

Roconza 01-23-2010 10:17 AM

RE: Random Adoptables
 
So say I wanted made a duplicate adoptable page were this only takes place. I would make a copy of the adopt page and then work this in to it some how and it would work?


So what would I need to learn how to use this code on my adopt page?

Seapyramid 01-24-2010 03:02 AM

RE: Random Adoptables
 
If you wanted a seperate adoptables page you would use this random & limited.. but also need to add some WHERE 's so that you are limiting the sql call to specific ones.. I tend to use the "whenisavailable' for my calls but I use others also.

Then on your main adopt page you would need to use WHERE 's so that the 2 pages didnt duplicate.

This is a site I recomend for helping to learn what I am talking about :) http://www.w3schools.com/PHP/DEfaULT.asP


All times are GMT -5. The time now is 10:46 AM.

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