Furry stuff, oekaki stuff, and other stuff.
You are not logged in.
Pages: 1
I learned of an oekaki BBS template, POTI-board EVO, that implements some newer drawing apps like PaintBBS NEO (an HTML5 conversion of PaintBBS) and Klecks, as well as using CheerpJ to run Shi-Painter in modern browsers. I really don't want to part with Wacintaki's features, though, so I tried to see if I could get some of those things working in Wacintaki.
Disclaimer: I am not a programmer, so please forgive any egregious formatting/coding crimes. I just cross-referenced a lot of different files from various sources and tested things over the course of a few days until they worked.
Converting Shi-Painter with CheerpJ
Edit shiBBS.php and paste the following somewhere within the <head> tags. (Source of this code snippet is POTI-board. Also keep in mind that CheerpJ is free only for noncommercial use.)
<script> function cheerpJLoad() { var jEnabled = navigator.javaEnabled(); if(!jEnabled){ var sN = document.createElement("script"); sN.src = "https://cjrtnc.leaningtech.com/2.3/loader.js"; var s0 = document.getElementsByTagName("script")[0]; s0.parentNode.insertBefore(sN, s0); sN.addEventListener("load", function(){ cheerpjInit(); }, false); } } window.addEventListener("load", function() { cheerpJLoad(); }, false); </script>
You can also get animations to work by doing the same in viewani.php. (For novelty/nostalgia purposes, you could also do the same in oekakiBBS.php. I found the .jar for OekakiBBS v2.64 bundled with an old version of OekakiPoteto, and it seems to work.) The applet takes a few seconds to load, but drawing/submitting/retouching/etc. work as intended. For whatever reason, submitting images doesn't work in the CheerpJ-converted PaintBBS applet, which is where PaintBBS NEO comes in.
Getting PaintBBS NEO to work
Go to the PaintBBS NEO repository, download the .zip (under "Code"), get neo.js and neo.css from the "dist" folder, and place them in the oekaki folder. Open paintBBS.php, noteBBS.php, and viewani.php and paste the following somewhere within the <head> tags.
<link rel="stylesheet" href="neo.css" type="text/css"> <script src="neo.js" charset="UTF-8"></script>
In paintBBS.php and noteBBS.php, find and replace applet id="paintbbs" with applet-dummy name="paintbbs", and change </applet> to </applet-dummy>. In viewani.php, find <applet name="pch" code="pch.PCHViewer.class" and replace applet with applet-dummy in both the opening and closing tags.
I had issues getting applet resizing to work with PaintBBS NEO, so I commented out that part of the HTML and instead modified the "set applet area" section by changing this:
$xhack = 740; // Applet x $yhack = 550; // Applet y $xoverhead = 100 ; // Applet border/palette width $yoverhead = 35;
...to something like this:
$xoverhead = 150 ; // Applet border/palette width $yoverhead = 172; if ($xcord < 350) { $xhack = 500; } else { $xhack = $xcord + $xoverhead; // Applet x } if ($ycord < 350) { $yhack = 522; } else { $yhack = $ycord + $yoverhead; // Applet y }
...so that the applet size is always scaled based on the canvas size, but can't become too small.
PaintBBS NEO has a (new?) feature to toggle which side of the applet the tools & colors sit. In noteBBS.php, add the following below <h4><?php tt('word_Palette');?></h4>:
<p> <input onclick="Neo.setToolSide(true)" type="button" value="[L]" name="button2" class="submit" /> <input onclick="Neo.setToolSide(false)" type="button" value="[R]" name="button2" class="submit" /> <br /> </p>
Finally, replace noteBBS.js with this version to get the palette working. On POTI-board, the palette appears to also work with Shi-Painter, but I haven't tried figuring that out yet.
I hope this is useful to someone.
Last edited by spellbot (08-23-2022 15:16:07)
Offline
In the past, people have been bugging me about adding NEO support, but back then it wasn't very complete. I looked into it again recently and the improvements look promising. I'll be going on vacation soon, so when I get back I'll look at the NEO distribution license and all the other usual stuff. All the documentation is in Japanese, so I'll have to make sure it's legal for me to integrate support for it.
I'm not at all convinced about CheerpJ support, since it's cloud-based and must download resources from a 3rd-party web site. In my view, that's very dangerous and should be avoided. I heard about this tech a while ago, but if the files can't be hosted locally, then official support in Wacintaki is not going to happen.
Offline
Pages: 1