NineChime forum

Furry stuff, oekaki stuff, and other stuff.

You are not logged in.

#1 12-05-2009 06:46:20

Pinkie
Member

Colouring oekaki help...

Ages ago I set up an oekaki where users would be allowed to used colour in an outline from a colouring book. I was going through some major script upgrades and I can't get noeteBBS to start working for me.

Previously, I inserted the following code:

Code:

// Recolor
if (empty ($edit) && empty ($import)) {
    // Name, such as "pic.png"
    $recolor = w_gpc('recolor');

    if (!empty ($recolor)) {
        // Clean, add path
        $file_illegal = array ('"', '?', '*', '/', '\\', ':', '|', '<', '>');
        $app_import = './book/'.str_replace ($file_illegal, '', $recolor);

        if (file_exists ($app_import)) {
            $size = @GetImageSize ($app_import);
            $xcord = $size[0];
            $ycord = $size[1];
        } else {
            // Recolor used as import flag
            $recolor = '';
            $app_import = '';
            $xcord = $cfg['canvas_x'];
            $ycord = $cfg['canvas_y'];
        }
    }
}

And, in the URL has something like:

noteBBS.php?recolor=16500142.pch&reanim=.... etc

However, the code doesn't seem to be working. Indeed if I echo <?=$recolor?> or even <?=$app_import?> somewhere on the page, nothing is displayed. Why is it not even getting the values from the URL?

Any help would be greatly appreciated

Offline

#2 12-06-2009 07:09:44

Waccoon
Administrator

Re: Colouring oekaki help...

noteBBS.php?recolor=16500142.pch&reanim=.... etc

Are you testing with more than one type of image?  You can't use PCH or any other type of animation file for recolors.  You have to use an image.

Offline

#3 12-07-2009 02:22:17

Pinkie
Member

Re: Colouring oekaki help...

So how do I load an animation file if I wish layers to be present?

Offline

#4 12-07-2009 06:09:09

Waccoon
Administrator

Re: Colouring oekaki help...

That's difficult, because none of the animation datatypes provide the canvas size, and that must be correct or else the image won't import correctly.

To keep the interface like you have it, both the image and layers file must be available.  If an image is present, chop off the file extension and look for a PCH version.

A more practical way is to simply create a recolor account where all the images are marked as "public", and upload stuff there.  Then, put a link in the header with the search query tacked on:  index.php?artist=recolor  Note that WIPs will show up in artist searches, so if the picture is uploaded and convert to a WIP, it won't bump other pictures.

That way, people can click the link, and see all the pictures that are available for recoloring.  When public pictures are edited, they are posted as new slots.

Offline

Board footer

Yep, still running PunBB
© Copyright 2002–2008 PunBB