WWW posts

Web development, my site, server, career, programming, the world wide web, and related topics

Symfony templates for WordPress pages

I’ve been using Symfony for all of my site pages except the blog, which is run with WordPress. Originally I was using a standard WordPress theme that made my blog look different than the rest of my site. I had looked into ways to pull WordPress through a controller action and stuff like that, but ran into difficulties. I ended up using a solution where WordPress functions as normal for the subpath that it is in, but code in a custom theme boots the kernel from the Symfony part of my site and uses the twig service to render the template. Output buffering is used to capture the normal output of the site to pass to twig.

My theme code does some other things, but I will try to present a stripped down version that could work with a Symfony Standard Edition site for the purposes of this post to hopefully help others do the same.

Continue reading post "Symfony templates for WordPress pages"

Updated to Symfony 6.4

Since updating my server earlier in the year, and thus moving to PHP 8, I would’ve been able to update to Symfony 6. I didn’t get around to it until today, though. I’ve been fixing deprecations in my code mostly as they appear (in profiler, console, logs, or automated tests) so I didn’t have a lot to do this time. I changed ^5.4 to ^6.4 in my composer.json and then had to adjust a few minor things in config. Some of those took longer than they should’ve though.

Continue reading post "Updated to Symfony 6.4"

Ghosts.js

A few years back, to make my site more festive for Hallowe’en, I made a script to have ghosts move around my web-page. I based it on my snow script for winter / Christmas, using the basic structure, reducing the number of moving objects, and changing their movement to look better for ghosts. I meant to post about it. This year I decided to break it out into its own Github repo, which led to me refining it and cleaning it up somewhat. See the ghosts.js repo and the ghosts.js demo.

Continue reading post "Ghosts.js"

h5bp links

Earlier in my career, I looked to the HTML5 boilerplate for ideas on how to set up websites. I just grabbed bits I liked and modified them as needed. For a time they had shortened links off of the h5bp.com domain that redirected to descriptions of why certain choices were made. But eventually, the person maintaining that domain let it lapse and someone else bought it.

Continue reading post "h5bp links"

Sequel Ace

I finally moved from Sequel Pro to Sequel Ace. Sequel Pro hasn’t been updated in years. It mostly worked but did have some annoying problems. During a recent OS and app reinstall, I found that Sequel Pro was no longer available on Homebrew, so I went for Sequel Ace, a fork that is still maintained. It is very similar but improved. I like it.

Continue reading post "Sequel Ace"

JS: Replace page text

For this year’s April Fools Day, I decided I wanted to replace some text in the content of my site’s pages to something funny, weird, or confusing. Since I’m moving toward a static site, I wanted to do this client side, which meant replacing text with JavaScript. This would be simple with innerHTML, but that completely replaces the DOM with a new DOM, possibly causing usability and performance issues, and could replace text in URLs, breaking them. Probably a better way is to loop through all nodes on the page, looking for text nodes, and replace text in each of those. So I did this, and it worked nicely. Thought I’d share.

Continue reading post "JS: Replace page text"

Doing my federal (US) taxes this year, I was finding myself unable to create an account on the Free Fillable Forms site. I kept getting kicked back to the start after filling out and submitting my information. This Reddit thread led me to figure out that it was related to my T-Mobile Home Internet. I turned that off and turned on my phone hotspot and used that to get in. My phone is also T-Mobile, but apparently different enough to not have that issue. Later, I was able to get back in with my Home Internet, so it seems to be just related to something on that initial registration process.


</toby>