Archive of September 2019

STATS Update

Hey,

So I've taken a bit of a break from Grav and Twig, in part because I need to reconsider a couple of things based on my designs and in part because I need to do a bit more reading on Twig before my ambition exceeds my ability and I rage quit because I can't do something I want it to do (I had that a lot with Wordpress early on, even phpBB when I used to make themes for that, so I know to take the time to read up on things now).

So I've jumped back into taking a look at STATS. Oh boy. Where to even start with this thing. I was so crudely putting it together in a rush to have it done I hadn't considered just how poorly I was putting it together. It's a database driven application that should really have at least a few classes and functions that lighten the load on the server but I haven't done ANY of that. I've got database queries left-right-and-center occasionally doing the same thing multiple times when I could just be smarter with one database call. Talk about sloppy.

The front-end design is not 100% finalised, I don't mind the colour scheme but I want to make it so users can select different colour schemes and save it as a preference. Which, to be honest, is going to require a bit of a rebuild of the whole front end so I'm going to save that for later the code is already messy enough without overhauling the layouts. I want to move to templates so I get rid of the mess of PHP files lying around. That's a problem for another time though.

The Admin Control Panel (ACP) so far

The ACP is mostly functional, managing a couple of things still needs some work but this is another area I think requires a bit of a tweak to the design. Not as major here as the front-end though as there's no desire to put a bunch of different colour schemes in the ACP. You can see in the screenshot above the ACP homepage is still littered with my workings on different things. Setting user levels; generating activation codes for registering accounts; working out EPOCH times; date and time conversions; text encryption for password storage; working out special character insertion. You know, development stuff.

One of the more completed page layouts

This is one of the more complete page layouts for locations. I've been using data from an online racing community I'm part of but don't have track maps at the moment so I made a placeholder image.

I'll have a bit more to say about this once I've had a chance to dig through and find all my sloppy mistakes. I'd start again but this would the third time of asking starting from scratch so I'm not sure I'm keen on that idea.

That's all for now, Scott.

Grav Development: Part 2 - Porting a header

Hey,

So after a bit of reading on how twig works I've started diving in and making some modifications for the theme I created in Part 1 of this series of posts. You're basically going to be seeing my build process for a new website, which I have no problem sharing because I'd love if something I do helps someone struggling with something similar.

So the first point to check off was to get a header working. I had a static page I had been working up for my new personal website that I've decided to use as my test bed for this process. This is going to be an interesting challenge because I'd planned to have a landing page which is separate from the normal homepage. Let's see how that works out but I've got a plan in case it doesn't go the way I think.

So here's the static version I was aiming to port over. The header block I was aiming to transfer

And here's the same code section incorporated into Grav. The header block after being transferred

I'm not showing any screenshots of the end result just yet, not ready to show anything off at this stage. So far so good though. Time to start working on the actual content section and see what kind of magic can happen there with different templates!

Bye for now. Scott.