Lots more work on nofi.mari.somnol has occurred since my last blog post! We're getting fairly close to having everything moved over from the old site—only the modding section really remains. Even better is that, with the stories and, in a bit, music sections implemented, this is actually not just more fully featured than mari@macintosh.garden was, it's actually everything I wanted on mari.somnol implemented. Like, that's it. I was pondering some kind of Web design gallery, showing off some of my favorite website designs I've done and acknowledging all these skills I've acquired in the past six years of being a webmaster, but that can be added later. Art would be nice to have on the site, but I'll leave that for when I can decide how I want to build that section. I just need the Alexi drawings after that (thinking little chibis would be best with the limited viewport space) and it's complete. Not basically—complete. Cammy has a portfolio site again, and one-third of the move is done.
PHP continues to be a curious mistress that treats me well for the most part. I spent today cleaning up the internals of the music recommendations page, better integrating PHP into the HTML (no more echo
spam!) and adding logic to add the artist and album name to the title and page heading, depending on what you're looking at. I'm really happy with the language still. Basically everything I want to do with it, there's a really clean way to do it, even if that thing happens to be slightly esoteric. Great example: two-dimensional arrays (which are arrays inside arrays, if you're not a programmer—but if you aren't, you don't know what an array is anyway, so just hold tight). I figured, if I wanted to access the data in the inner array, I'd need to split it out into a separate array first and do my logic on that. Nope! You just add on a second key to the array variable address, like so:
$rows[0]["year"]
This accesses the year
key inside the first array that's in the $rows
array, which in my case, is the data being returned from the database. So in practice, that gives you the release year of the first album in the search results. It's that easy.
The only time I really get confused with PHP is when tables get involved. Browsers get really weird if you don't close your tables correctly. I had a bug early on where the table for the last artist in the list of artists and albums (currently, that's Wrong Way Driver, a side project of one of my favorite bands Pine Marten) was missing, but only in Netscape 4. Turns out, it was in the page source; Netscape was just not rendering it because it wasn't closed correctly. Yesterday, I had an issue with the game reviews page (no link yet because it's not working yet) where there was no table under the Game Boy Advance heading, and then the GBA table was appearing under the PlayStation heading, and everything else was moved down a console as well. After an hour of thlamming my penith in the car door, I discovered—yep, another table unclosed. (I had messed up my logic for building the tables programmatically. Happens.) I don't know why or how not closing a table right can make it appear somewhere else on the page, but thankfully, it's solved.
There's still a whole world of other stuff I'd like to do with PHP even after all this is done as well. The ACNES compatibility list page is currently being manually updated as I also update a Works database alongside it, and it probably takes me an extra ten minutes that I could absolutely automate. Export out a CSV, and then when you view that page, it reads the CSV and turns it into a page. I could take that CSV and put it into a MySQL database when I'm done and let you search games, or view games by their year (if I put that data in) or their working status. I'd like to finally get sleeby.art built at some point too! I have experience with all the base components, making database queries, displaying data, making thumbnails with ImageMagick—I'd just need to put it together with a login system. Like, I already own the domain, and Caby's been wanting this for years now. Years! I'll be at this coding thing for a while.
But yeah, I keep telling folks in Somnol how big of a relief it'll be to have a main site again. It's now been about three years since I last had mari.somnol in a usable state. For some of that time, it redirected to archives. For the rest, it's been parked. I don't like to make myself ever anything more than another member of Somnol generally, but mari.somnol kinda is and always has been the subdomain the entire site gravitates around, thanks to it being my group. It's weird not having that center there. It's weird not having a home base to catalog all my work at. cammy.somnol is adorable and I'd like to give that the care it deserves as well (and finally get Cammy on cammy.somnol), but it's not mari.somnol. It's not the site that's been here since the beginning.
Having it again, and seeing it come together again, and seeing it come together more powerful and using all these new technologies I learned just for this? Seeing how much less work I'll have to do to maintain it in the future because of all the database work I'm doing now? It really has reinvigorated my love of site building. I've been making websites since I was 6 years old. From the age I was old enough to comprehend what a computer was, the coolest thing in the world to me was having a website—and now I'm enjoying working on them again. Once it's all in place, I can go back to my writing and music and art full-time, with the ideal platform for it all right on my own domain. I can't think of much that'd make me happier.