Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Addons and Modifications > Mys v1.3.x Mods

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 10-16-2017, 04:27 PM
Abronsyth's Avatar
Abronsyth Abronsyth is offline
A Headache Embodied
 
Join Date: Aug 2011
Location: NY
Posts: 1,011
Gender: Male
Credits: 161,294
Abronsyth is on a distinguished road
Default

Thank you!!

So knowing how it saves in the database I think I can fix the drop-down selection problem.

What needs to be done is modify the first (aka default) option to reflect what the user has listed in the database. It'll look sort of like this I think:
HTML Code:
<option selected>{$selectedbase}</option> 
<option>black</option>
<option>brown</option>
<option>...and so on...</option>
First we'd need to define $selected, which is easy enough;
PHP Code:
$selectedbase $mysidia->db->select("custom", array("base"), "uid='{$mysidia->user->uid}'")->fetchColumn(); 
I haven't tested it at all yet, haha, but I do think that it'd work along those lines!

And thank you again, Dinocanid!!!
__________________
My Mods Site (1.3.4, 2020 Mods)
Reply With Quote
  #2  
Old 11-06-2017, 10:39 AM
gwynmil's Avatar
gwynmil gwynmil is offline
Member
 
Join Date: Sep 2017
Location: UK
Posts: 25
Gender: Female
Credits: 4,695
gwynmil is on a distinguished road
Default

OK, finally giving this a try (feeling slightly more confident than last week, though the breeding script edits will still be offloaded to you, haha. I'm afraid to touch that stuff yet).

edit: never mind, figured out first issue. Reading that TGL thread was very helpful.

Still getting a blank image though. Syntax error maybe? I removed the composite_dstin bit 'cause that command isn't needed here.

PHP Code:
<?php
class GriffimageController extends AppController{
    
    public function 
index(){

$mysidia Registry::get("mysidia");

$fullurl $_SERVER['HTTP_REFERER'];
$cleanaid  end(explode('/',trim($fullurl,'/')));

$pet $mysidia->db->select("owned_adoptables", array(), "aid='$cleanaid'")->fetchObject();

$images = array(
    
'http://griffusion.elementfx.com/picuploads/griffimages/' $pet->type '/' $pet->gender '/' $pet->currentlevel '/legs/' $pet->legs '.png',
    
'http://griffusion.elementfx.com/picuploads/griffimages/' $pet->type '/' $pet->gender '/' $pet->currentlevel '/outer2/' $pet->outer2 '.png',
    
'http://griffusion.elementfx.com/picuploads/griffimages/' $pet->type '/' $pet->gender '/' $pet->currentlevel '/outer1/' $pet->outer1 '.png',
    
'http://griffusion.elementfx.com/picuploads/griffimages/' $pet->type '/' $pet->gender '/' $pet->currentlevel '/inner2/' $pet->inner2 '.png',
    
'http://griffusion.elementfx.com/picuploads/griffimages/' $pet->type '/' $pet->gender '/' $pet->currentlevel '/inner1/' $pet->inner1 '.png',
    
'http://griffusion.elementfx.com/picuploads/griffimages/' $pet->type '/' $pet->gender '/' $pet->currentlevel '/hind/' $pet->hind '.png',
    
'http://griffusion.elementfx.com/picuploads/griffimages/' $pet->type '/' $pet->gender '/' $pet->currentlevel '/fore/' $pet->fore '.png',
    
'http://griffusion.elementfx.com/picuploads/griffimages/' $pet->type '/' $pet->gender '/' $pet->currentlevel '/horns/' $pet->horns '.png',
    
'http://griffusion.elementfx.com/picuploads/griffimages/' $pet->type '/' $pet->gender '/' $pet->currentlevel '/beak/' $pet->beak '.png',
    
'http://griffusion.elementfx.com/picuploads/griffimages/' $pet->type '/' $pet->gender '/' $pet->currentlevel '/eyes/' $pet->eyes '.png',
    
'http://griffusion.elementfx.com/picuploads/griffimages/' $pet->type '/' $pet->gender '/' $pet->currentlevel '/line.png'
);

$composed_image = new \Imagick($images);

$image $composed_image->mergeImageLayers(\Imagick::LAYERMETHOD_FLATTEN);
$image->setImageFormat('png');

header('Content-type: image/png');
echo 
$image->getImageBlob();
    }
}
?>
Example body part url: http://griffusion.elementfx.com/picu.../fore/blue.png
Linearts are in the level folder: http://griffusion.elementfx.com/picu...h/f/5/line.png

Sorry for the constant questions, haha. You've been amazingly helpful lately.

Last edited by gwynmil; 11-06-2017 at 01:01 PM.
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


All times are GMT -5. The time now is 06:15 PM.

Currently Active Users: 2989 (0 members and 2989 guests)
Threads: 4,081, Posts: 32,032, 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 - 2025, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636