#21
|
|||
|
|||
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:
It's not something that can be done in 5 minutes, but it is doable. |
#22
|
|||
|
|||
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:
|
#23
|
|||
|
|||
RE: Only 2?
Basically, you want to replace:
PHP Code:
|
#24
|
|||
|
|||
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:
|
#25
|
|||
|
|||
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 ?? |
#26
|
|||
|
|||
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 :) |
#27
|
|||
|
|||
RE: Only 2?
What is the structure of your table?
|
#28
|
|||
|
|||
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 |
#29
|
|||
|
|||
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.... |
#30
|
|||
|
|||
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.
|
|
|
What's New? |
What's Hot? |
What's Popular? |