NineChime forum

Furry stuff, oekaki stuff, and other stuff.

You are not logged in.

Post a reply

Write your message and submit
Options
Humanity test

What is one + two?

Go back

Topic review (newest first)

Waccoon
10-13-2007 06:30:01

Sorry for the wait.  It's been hectic this week at work before my vacation.  But, I have this week off, so after I get some sleep, I'll see what I can do for you.  I spent all night getting art done.  wink

The short of it is that you'll have to have a modified version of the board that is aware of guests.  You don't really need to make too many changes to the applet parsing code, but you DO have to make changes to the authorization system and the comment system.

matthewst
10-12-2007 11:03:39

I'm finally back to where I started.

matthewst
10-10-2007 08:38:04

I don't know what happened, the whole thing self destructed this morning. I've had to start completely over.

matthewst
10-04-2007 06:54:23

Most of the kids can see ok, typing is an isssue and so is understanding what the applet is asking for(confirmation, name, comments etc).
Do I even need a database or can I just upload the images to a dir on my server?
I'll be working on what you suggested today, I'll post my results.

once again Thank you!

Waccoon
10-04-2007 04:05:25

OK, we've got several problems, here.

First, you don't really have to modify the shiget.php code.  The value of $OekakiU and $OekakiPass are retrieved from the applet with this code:

Code:

$OekakiU    = addslashes (utf8_decode ($params['usr']));
$OekakiPass = addslashes ($params['vcode']);

What this means is that the applet will send an encoded header to the script.  This header is decoded into the $params[] array at the top of the code as an unescaped UTF-8 string.

So long as you have a custom user name and password hard-coded into boot.php, you don't have to worry about changing $OekakiU and $OekakiPass in any other script.  boot.php takes care of all that, and passes the values to the applets automatically.

Server returned HTTP response code: 403 for URL: http://servername/dir/getpic.cgi

Well, there's no "getpic.cgi" file to be found!  We're not using a Perl script (the "cgi" file extension), we're using PHP.  wink

Also note that boot.php handles the database connection, so if you fail to include that, you can't insert the picture, and there's database code in shiget.php that MUST be left intact.  Quite simply, this code isn't usable, because there's too much missing.

It's actually quite tricky to change the code so guests can type in their names.  OekakiPoteto wasn't designed with that in mind, and it's something I'll have to think about with my next board.

Really, it's functions.php, comment.php, and paintsave.php that require modification to do what you need.  The hard part is forcing a login so people can draw, but shadowing the login when they post a comment, so the board thinks that person is a guest, and therefore, their name is requested.

See, I'm not sure how sophisticated it should be if it's a "special needs" board.  Do these children have specific visual or physical disabilities that makes it hard for them to type or read small text?  If so, changing the templates would be a big help on top of code changes.

Sorry, but during the week I don't have much time to help out.  If you can tell me a bit more about the procedure you'd like for people to draw, I can hack up some code for you on the weekend that might give you a better idea of what's going on when a picture is submitted.

matthewst
10-03-2007 12:11:57

Here is my shiget.php

Code:

<?php
// Get raw POST data (reference test saves memory)
if (empty ($HTTP_RAW_POST_DATA)) {
    $raw_buffer = file_get_contents ('php://input');
} else {
    $raw_buffer =& $HTTP_RAW_POST_DATA;
}
// Load bootstrap, quiet mode
$OekakiU    = "test_user";
$OekakiPass = "password";
// Test input
if (empty ($raw_buffer)) {
    // No data to save!
    quiet_exit($langop_err_nodata);
}
if (substr ($raw_buffer, 0, 1) != 'S') {
    quiet_exit($langop_poo_compat." '<param name=\"poo\" value=\"false\" />'");
}
// ShiBBS data
if (substr ($raw_buffer, 0, 1) == 'S') {
    // Image data
    $image['o_length'] = substr ($raw_buffer, $image['h_length'] + 9, 8);
    $image['o_length'] = (int) $image['o_length'];
    $image['o_data']   = substr ($raw_buffer, $image['h_length'] + 19, $image['o_length']);
// Write files
//
// Save image/anim data.  Filetype is automatic!
if (!save_image($image['o_data'], $resno)) {
    w_error_log (__FILE__.": Cannot save image.  Look for temp image.  User: $OekakiU, Number: $resno");
    quiet_exit($langop_err_saveimg);
}
int_ok();
?>

I now get a shiny new error message!

Code:

 Server returned HTTP response code: 403 for URL: http://servername/dir/getpic.cgi
SendE
matthewst
09-28-2007 09:34:29

A thought just hit me about the artist name, database thing. I can use php to generate a random string of characters to pass to the database as the username. There won't be any retuouches or safety saves, but we won't be needing them anyway.

matthewst
09-28-2007 07:51:41

As far as the database is concerned, that can be difficult.

I've still got your database built by wax potato if that helps

Ok here is pic_chooser.php

Code:

<html>
<body>
<form name="form1" method="post" action="spainter.php" >
<input type="image" name="picture" src="picture1.jpg">
<input type="hidden" name="picture" value="picture1.jpg">
</form>

<form name="form2" method="post" action="spainter.php" >
<input type="image" name="picture" src="picture2.jpg">
<input type="hidden" name="picture" value="picture2.jpg">
</form>

</body>
</html>

Here is the code I'm using in spainter.php (from sptr_all1114.zip)

Code:

<param name="image_canvas" value="<?php echo $picture; ?>" />
Waccoon
09-28-2007 05:08:30

That's good.  It's easy to look at existing code.  smile

As far as the database is concerned, that can be difficult.  There's a lot of things you have to think about when getting/sending data to the database, and setting up the database is the hardest part.  Then again, if you're using this code for your own purposes, you don't have to worry about making the code as generic and portable as possible, which is a big help.

matthewst
09-27-2007 12:40:02

I can't thank you enough wac. I'll post everything I have ASAP so you can take a look at it.

Board footer

Yep, still running PunBB
© Copyright 2002–2008 PunBB