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
  #21  
Old 04-27-2009, 05:38 PM
BMR777 BMR777 is offline
Member
 
Join Date: Jan 2011
Posts: 1,122
Gender: Male
Credits: 10,549
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
  #22  
Old 04-27-2009, 05:38 PM
gjac1 gjac1 is offline
Member
 
Join Date: Feb 2009
Posts: 101
Credits: 8,342
gjac1
Default RE: Only 2?

I have created a new table called "adopts_alts" , the structure of this table is just a single field called "alturl" , Type : varchar(120)

I have already added 10 alternate image locations, the part at where i am stuck now is where to edit in the functions.php file, i have found where the alternate image is :

PHP Code:
// If alternate images are enabled and an alternate image exists, use it

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

        
$image $alternateimage// Use the alternate image

        
}
        else{

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

        

Thanks for all your help :)
Reply With Quote
  #23  
Old 04-27-2009, 05:39 PM
BMR777 BMR777 is offline
Member
 
Join Date: Jan 2011
Posts: 1,122
Gender: Male
Credits: 10,549
BMR777 is on a distinguished road
Default RE: Only 2?

Basically, you want to replace:

PHP Code:
$image $alternateimage// Use the alternate image 
With some code to assign $image to one of the alternate images you created for the adoptable.
Reply With Quote
  #24  
Old 04-27-2009, 05:39 PM
gjac1 gjac1 is offline
Member
 
Join Date: Feb 2009
Posts: 101
Credits: 8,342
gjac1
Default RE: Only 2?

ahh, sorry, i seem to have posted just after you did :s , it seems i was way off with what i was doing lol :(

Thanks for the reply, i will give it a go now :)[hr]
ok, i know you must be getting really annoyed with me now, sorry :( but the reply you gave telling me what i needed to replace in the code, is that in response to what i was doing or an add on explanation to your guide ??

If its a reply to my idea, do i change it to :

PHP Code:
$image 'adopts_alts' $alturl 
You must get so tired of us noobs, and again i am really sorry.....
Reply With Quote
  #25  
Old 04-28-2009, 04:38 AM
gjac1 gjac1 is offline
Member
 
Join Date: Feb 2009
Posts: 101
Credits: 8,342
gjac1
Default RE: Only 2?

I have tried several different things to try and get it to pick one image from the new table i created, but i am having no luck...

Anyone have any ideas what i need to replace that line of code with ??
Reply With Quote
  #26  
Old 04-30-2009, 12:26 PM
gjac1 gjac1 is offline
Member
 
Join Date: Feb 2009
Posts: 101
Credits: 8,342
gjac1
Default RE: Only 2?

Sorry to keep bugging you with this, but have you had a chance to think this over a little more ??

Like i said, i have setup the new table which includes the links to the multiple random images, i just dont know what code to add or where to add it to make it select one and them from the new table...

Thanks again for all your patience and help :)
Reply With Quote
  #27  
Old 04-30-2009, 12:39 PM
BMR777 BMR777 is offline
Member
 
Join Date: Jan 2011
Posts: 1,122
Gender: Male
Credits: 10,549
BMR777 is on a distinguished road
Default RE: Only 2?

What is the structure of your table?
Reply With Quote
  #28  
Old 04-30-2009, 02:28 PM
Seapyramid Seapyramid is offline
Premium Member
 
Join Date: Feb 2009
Posts: 373
Gender: Female
Credits: 15,380
Seapyramid
Default RE: Only 2?

Why not do like I did and work with the system, not change it? Make the same adoptable more then once and different outcomes on each one:) Mystic Grave has Companions with up to 5 outcomes currently. :)

Sea
Reply With Quote
  #29  
Old 04-30-2009, 04:40 PM
gjac1 gjac1 is offline
Member
 
Join Date: Feb 2009
Posts: 101
Credits: 8,342
gjac1
Default RE: Only 2?

I called the new table "adopts_alts" , the structure is just 1 field named "alturl" which is a varchar(120) type, this is where i input the url of the image.

Sea, i kind of did something like that with the old script, i created a html page for the adoption page, made the egg on all 10 adoptable exactly the same, then created 10 different outcomes..but i had to edit the "type" of adoptable manually in the DB, which wasnt fun....
Reply With Quote
  #30  
Old 04-30-2009, 04:56 PM
BMR777 BMR777 is offline
Member
 
Join Date: Jan 2011
Posts: 1,122
Gender: Male
Credits: 10,549
BMR777 is on a distinguished road
Default RE: Only 2?

You need more structure than alturl. You should have the URL to the alternate image, the adoptable type and the level the alternate level is for, at a minimum.
Reply With Quote
Reply

Thread Tools
Display Modes

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


All times are GMT -5. The time now is 08:47 AM.

Currently Active Users: 444 (0 members and 444 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