Thread: Only 2?
View Single Post
  #21  
Old 04-27-2009, 05:38 PM
BMR777 BMR777 is offline
Member
 
Join Date: Jan 2011
Posts: 1,122
Gender: Male
Credits: 17,113
BMR777 is on a distinguished road
Default RE: Only 2?

Basically you would make a new database table for the alternate images that contains the adoptable type, level and level image location, plus give each alternate level a defining name, such as alternate1, alternate2 etc.

Then you need to modify the getcurrentimage() function in functions.php to read from the new table if the adoptable is using alternate images. So, in functions.php for getcurrentimage() replace the part after "If alternate images are enabled and an alternate image exists, use it" with...

PHP Code:
    if($usealternates == "yes" and $alternateimage != ""){

        
// Using an alternate image, read from the alternate images table you 
                // made based on adoptable type and type of alternate image.

        
}
        else{

        
// Set the image equal to the primary image for the level
                
$image $primaryimage


        } 
Then you would have to alter doadopt.php and levelup.php where they determine alternate images and change it so it picks a specific alternate image set, which you could store in the usealternates field for a given adoptable in owned_adoptables.

It's not something that can be done in 5 minutes, but it is doable.
Reply With Quote