Donate any amount you feel like and get an awesome exclusive desktop wallpaper as a thanks.
Short-story comics. They're cute and sweet and cheap.
There's some prints if you want some. Prints are cool.
I can honestly say I'm really happy with panel 5 on this page. I was kind of unsure on the color scheme on the previous page, but with the addition of that bright red and some heavier use of ink linearts it turned out to be pretty nice.
Now I'm going to gush a little bit about the new and improved comic interface we've got here, or rather about the fact that: I've finally learned how to incorporate PHP code into the bare shell of HTML and CSS! Which means that while I used to have to manually change the links on each new page of both language versions (equaling 12 links in total), I now only have to change one variable in the code, and the rest will automatically change accordingly! Sure, updating the comic with the previous system only took a few minutes, and the new one like five seconds, so the actual time difference isn't that significant in the context of the 7-8 hours that it takes for me to draw each page. But then there was the fact that every other page I would do the humane error of forgetting to change or add a link, or simply typing the wrong link, which meant I also had to do several double-checks and fixes each week. Annoying, both for me and the readers who had to deal with those mistakes. Now that factor of human error is practically removed, and the script I've written is so simple and straightforward that there's virtually no room for error-by-the-machine either. *high fives self*
For those curious minds who don't know enough PHP to scoff at my simple little scribbles, yet enough to actually care, I'll show how the new link system works. PHP isn't visible in any source-code on the browsers, so writing it here in plain text is the only way for you guys to view it. And I know I'm always really curious about the codes other people use on their sites, and therefore kind of bummed about the fact that PHP is completely invisible.
So, to start from the beginning: in the head-section of the HTML code I've declared this cute little set of variables:
<?php
$pageNum = 142;
$pagePrev = $pageNum-1;
$pageNext = $pageNum+1;>
?>
The number in red (the variable which I've named PageNum) is the only part I edit on each new page, and is obviously the number of the current page. If I were a real coding-guru I could probably write myself a script that extracts that number straight from the URL of each page, but that would probably include making custom IDs for each page, and that just seems like it would demand the same amount of work as simply changing one number manually. The two other variables are quite self explanatory: $pagePrev is defined as the value of the current page number, AKA $pageNum, minus one, and naturally $pageNext is $pageNum plus one. These variables are then inserted into each link in the following fashion(this one is the "previous" link, which in this case will read as "page141.php"):
<a
href="page<?php echo
$pagePrev; ?>.php">
</a>
Oh, but get this, it's not only the links that I was able to automate this way. By inserting the "echo" command and the appropriate variable in the correct places of my HTML code, that one number will change all of the following at once: all previous and next-links, the language-changing link, the page number displayed below and above the comic page, the comic image file itself, the Open Graph description and image that are used for facebook, and the page number at the beginning of this rambling box. That's like a dozen things, multiplied by two since the same basic stuff has to be changed on the Finnish page too. Lots of possibilities for humane errors there, but no more.
That first part (haha, I wrote "first fart") didn't really take much work to learn (a few hours, maybe), since it's all extremely basic PHP, but you might notice that there's an extra little finesse that's going on with the "next" links: on most pages it will simply take us to the next page as one would expect, but once we've reached the most recent page the link will bounce us right back to the current page. Say whaat? So cool! Well, it is for me at least, since with my beginners skills it took me like half a day to figure out how to write a proper conditional script that would do that. In the end I was pretty much prepared to give up and just leave it as something I'll have to handle manually even in the future. At first things seemed to be pretty easy. I found a script that looked like it could be modified to do what I wanted, which looked like this:
<?php
if (file_exists($filename)) {
echo "The file $filename exists";
} else {
echo "The file $filename does not exist";
}
?>
and it wasn't very hard for me to figure out how to wrangle it into a link that would serve my specific purpose, like so:
<a href="page<?php
if(file_exists("page143.php"))
{
echo $pageNext;
}
else{
echo $pageNum;
}
?>.php"></a>
What this script here does, is to check whether the file titled "page143.php" exists in the current directory (in this case the "comic" folder on my server), and in case it returns true the scrip will write (or" echo") the number for the next page into the link, and if it returns false, as in there's no such page yet, the link will instead lead us back to the current page. Now, the problem I had here was to get the number in the "file exists"-part to change as everything else did, and not having to write it down manually as above. But that turned out to be a great, big boob of a problem. I spent hours trying to come up with a working way to do that, trying out all kinds of things like "page<?php echo $pagePrev; ?>.php" in the "file exists"-part. But apparently PHP code desn't execute within itself, so any experiments down that lane turned out to be a dead end, and no matter what I tried the script would always return false and create a link to the current page.
But oh, mighty revelation! Suddenly I got the idea to simply make a new variable, that I would name $linkNext, and which would read as page$pageNum.php. Then, I would insert that into the "file exists"-field. Thus I finally ended up with the following script:
<?php
$pageNum = 142;
$pagePrev = $pageNum-1;
$pageNext = $pageNum+1;
$linkNext = 'page' .
$pageNext . '.php';
?>
----
<a href="page<?php
if(file_exists("$linkNext"))
{
echo $pageNext;
}
else{
echo $pageNum;
}
?>.php"></a>
And it works! Which means I now have a great, self-made, easily updated page system! Yeah, I know, seems pretty pointless for me to be working on this code myself when there's a ton of free webcomic-programs out there that are probably way more practical and come with tons of cool and useful extra stuff. But there is a certain level of self-satisfaction in doing these things on one's own. Every time I finally understand something new, I pretty much go "Blaaargh! I can see the soul of the Interwebs! Epiphany overload! x_x", and that's a pretty neat feeling.
For those of you who actually read this post to the very end want some excellent beginners guides for PHP, here's the ones I used:
PHP 101: PHP For the Absolute Beginner
End ramblings? Yes.