Anchor Modifications
There are a bunch of changes that I made to Anchor to fix or implement features. Here are some of the changes:
/anchor/routes/posts.php
This actually implements the 'Auto enable comments' in the site_meta. This wasn't in 0.9.2.
/anchor/routes/pages.php
This makes it so you can actually add pages.
/anchor/functions/search.php
This creates an alternative search function that searches both title and text. It returns an array of arrays, where each array contains the title of the article and its link.
/anchor/views/comments/edit.php
When reviewing comments, this displays the name of the post the comment was on.
/anchor/routes/site.php
This fixes the search bug where it doesn't urlencode the characters, making much of the search string cut off. Now the search string can include apostrophes.
/anchor/routes/site.php
Add in a sitemap at https://blog.alexbeals.com/sitemap.xml.
/anchor/views/assets/js/editor.js
This took way too long to implement. I was an idiot, and didn't realize the lack of reload meant it wasn't updating the 'token' variable. Luckily, I caught it. This change makes it so that pressing 'Ctrl+S' instead of attempting to save the webpage will instead save the edit if you're editing the file. Most importantly though, it does this without reloading the page, so it saves your place! A minor thing but it was incredibly annoying.
/php/upload.php
Code to take posted image and upload it to the server.
/anchor/views/assets/js/dragdrop.js
This adds in drag and drop support for images (specifically .jpeg and .png) to post editing. This means I don't have to manually upload the images via WinSCP, and it will all take care of it for you. It will paste in the image link code at your cursor position and move the cursor so you're set up to type in the alt title. Note that the article has to be saved at least once before this can be done.