Hider – Remove Elements via URL Parameters Plugin

Origin Story About a week ago I posted about a theme that was designed to integrate into the LMS via iframe embeds. The goal was to strip out extra things like headers and sidebars that were confusing or unwanted. You’d still have a normal WordPress site at your regular URL but would be able to selectively embed chunks of it in the LMS in whatever way you desired. That is the key that I don’t think I stressed enough. You could easily add CSS display:none and whittle you site down via the customizer but I wanted to be able to do that only when embedding the site (or linking to the stripped down version). After some back and forth conversation on Twitter I decided to write a simpler version as a plugin rather than a theme so it could be used more broadly. The plugin is here if you want to give it a shot. The Pieces To make things simpler I wanted all the divs to have an ID. I considered giving an ID to everything but figured in 95% of the cases the major pieces of the theme would be in divs. That’s an amazingly easy thing to do in javascript. I could have made this even more concise but figured this would be easier to understand. The […]


Weekly Web Harvest for 2019-05-05

Herbert Axelrod, a Hustler Who Built an Empire on a Fish Tale – The New York TimesHe could recognize more than 7,000 kinds of fish by sight. He once landed at the Trinidad airport, approached a pool near the runway and, as onlookers gasped, netted a new species. “He was once censured by a professor,” the magazine reported, “for performing a Caesarean on a guppy.” Coeio’s Infinity Burial SuitThe Infinity Burial Suit is a breakthrough in eco-friendly, green funeral options.  It returns your body to the earth without harming the environment. $1500 //note the SWAG Fortnite | World Cup$30 MILLION PRIZE POOL UP FOR GRABS! Catch all of the action as top players battle it out to be crowned Fortnite World Cup Champion.

stranger portrait - what?

WordPress for LMS iFrame Infiltration

Origin Story Over the years I’ve seen a number of people embedding WordPress within the LMS using iframes. There are lots of reasons to do this but it’s not something that WordPress is really meant to do. You end up with an odd feeling as it’s a website within a website and many things feel out of place (headers, footers, sidebars). I said something on Twitter one time that I might make a theme that would behave better in those kinds of scenarios. I was able to find that tweet using Twitter’s semi-hidden advanced search. Note that Sept. 9, 2018 date. It’s been a while but here’s a super simple theme that tries to play well in the land of iframe embeds. What is the best #WordPress theme that allows a seamless #LMS integration? #webdev #EdTech #bcpse — Erin Beattie ??? (@ehbeattie) September 9, 2018 Show Only What You Want As is my pattern, I figured I could hide most of the extra things through javascript and use the URL’s query string parameters1 as the way to decide what was shown. I haven’t built out all the various parameters but for this theme, I added some javascript to look at the URL for a ‘show’ parameter. So https://baseurl.com/some-page/?show=article will show only the tag for this theme. You can see how […]


Weekly Web Harvest for 2019-04-28

The Dr. Tressie McMillan Cottom on Twitter: “Shorter: Voiced pauses are an important part of communication and group identity! If you hate the ones in your group, you’re probably not really in that group.” / TwitterShorter: Voiced pauses are an important part of communication and group identity! If you hate the ones in your group, you’re probably not really in that group. Uber apologizes for tweeting racial slur / Boing BoingI wonder how these sorts of human/bot intentional problem causing will escalate as this becomes more and more popular. Handouts, Slides, and Recordings from #NCTMSD2019 – dy/danI wrote a script that copied every speaker’s Twitter handle and the time of their session from the program book. Then the script searched Twitter for their handle and “#NCTMSD2019” and – here’s the thing! – captured the results only from the time period of their session. Not during their flight to NCTM. Not during the fantastic happy hour after their session either. //might be worth making an addon for the Tags plugin Probable Russian Navy covert camera whale discovered by Norwegians | Ars TechnicaThe harness was reportedly marked with the label “Equipment St. Petersburg” and had an attachment point for a GoPro camera. Audun Rikardsen, a professor at the Norwegian Arctic University in Tromsø (UiT), told Norway’s VG that neither Norwegian nor Russian […]

Super Mario jumping endlessly to create bit coins.

Duplicate Featured Image Remover

Origin Story In a number of scenarios we’ve used plugins to use the first image in the post as the featured image. That’s nice in that if people forget or are unaware of the featured image it’ll happen automatically and that fits in nicely with how various themes use featured images in various layouts. Where it doesn’t work as nicely is when the featured image is shown in a way that feels duplicative in the single post view. Something like below. I was reminded of one way to solve this after reading Alan’s post yesterday. I’m also trying to do a better job of blogging more1, commenting more, and linking back to posts.2 Who knows maybe people will start believing in RSS readers again? Function For this example I just grabbed the HTML from the base Understrap template and set a featured image and put it in the post body as well. The exact nature of the javascript will change depending on how the theme is setup but this is fairly generic stuff and would likely work on a variety of themes. I commented up the few lines involved so you can see what each one does. Here’s the codepen with the whole thing. I’m repeating my pattern of just copying code there to make life easier for sharing examples […]

cartoon face eating cheetos.

Adding an Editor Button for Easy Footnotes

Origin Story I saw Alan’s post this morning about footnotes in SPLOTs. He mentioned adding buttons to the WYSIWYG editor to help use Easy Footnotes . . . more easily . . . because, like me, he often forgets the shortcode structures. I figured I’d better get it made fast before Gutenberg renders all my current knowledge obsolete. Additionally, I like to try to pay Alan back for all the work he’s helped me with over the years. So here’s a plugin that should behave fairly well assuming you have Easy Footnotes installed and active. PHP Land A bit of scanning led me to this tutorial and from there we were off. This is mostly just enqueueing various scripts and pretty much copy/paste. I’m not currently doing anything with the admin CSS but likely will in the near future. Javascript Land The following JS builds the modal and assigns a tinymce editor to it. I’m debating whether that’s a good idea or not at this point. I can see some advantages to keeping bold and italic but maybe dropping everything else. You can see I’m using ?as the button text which might not be appreciated as the feet are very tiny and it is a very corny1 joke. This stuff feels closer to learning a templating language than programming to […]

Canvas-ish WordPress Template

Origin Story The request came in on Monday for a WordPress theme that looked like the Canvas LMS. That’s not a very dramatic origin but it’s what I’ve got. You can check out the current iteration of the theme here or get it on github here. What does Canvas look like? I’m really just imitating the pages so I went to check out a demo page. It looks something like this. In my head, I break it down into rectangles and start thinking of how to get the data into those boxes. The rough sketch below is how I conceptualized it. Most of the content is pretty straight forward as well. The Work For this type of quick work I knew that the understrap theme would get me most of the way there. It has a left sidebar template and it’s in bootstrap so no drama there. I didn’t strip this to the bones but that option remains open if we want to make this an even more streamlined theme. The two things I was less sure about were how I wanted to populate the left navigation bar and how I wanted to build out the next/previous buttons at the bottom of the page. Left Sidebar Menu I altered the sidebar-left.php file to read like this. If I haven’t assigned […]

MySql table screenshot showing a variety of metafields populated.

Learn Dash Gradebook Customization

Origin Story We had a group get in touch with us who were fairly far down the road using LearnDash for a project. I recalled seeing it in the past but had never used it myself. There were a couple things they wanted it to do that they were having trouble with and so they reached out to us. Joining in on a project late in the game is never much fun. It is best to just go with the flow rather than thinking dark thoughts around any/all of the choices made prior to your arrival. That is the path I am on. Here are choices made. Proceed to find a path forward. As I write this I also realize how much I’ve already forgotten about the wandering path this took. One more reason to keep the blog posts rolling. The Issues There were three major elements they wanted to work/work differently. Etherpad integration – integrate etherpad creation and sharing with the group function in LearnDash. Jeff handled this and got it working well. Quiz results/Group integration – the goal here was to show the choices made by all individuals in the same group on the completion of the quiz. I did this but am still not in the mood to write about it. Proctor Grading/Commenting – build a minimalist […]


Weekly Web Harvest for 2019-04-21

The Racial Bias Built Into Photography – The New York TimesIt took complaints from corporate furniture and chocolate manufacturers in the 1960s and 1970s for Kodak to start to fix color photography’s bias. ant-media/Ant-Media-Server: Ant Media Server supports RTMP, RTSP, WebRTC and Adaptive Bitrate. It can also record videos in MP4, HLS and FLVAnt Media Server supports RTMP, RTSP, WebRTC and Adaptive Bitrate. It can also record videos in MP4, HLS and FLV https://antmedia.io uoe-dlam/ed-lti: Provides a Learning Tools Interoperability (LTI) integration for creating WordPress blogs with appropriate user roles based on roles set within the Virtual Learning Environment (VLE)Provides a Learning Tools Interoperability (LTI) integration for creating WordPress blogs with appropriate user roles based on roles set within the Virtual Learning Environment (VLE) h/t Tony Hirst Silicon Valley Came to Kansas Schools. That Started a Rebellion. – The New York TimesMr. Smalley had put up bigger and bigger yard signs in front of his house, even though he knew Mr. Zuckerberg was unlikely to drive by and see them. They were red, with a slash across the word “Summit.” //whole thing reads like a bad joke Selfie Deaths Are an Epidemic | Outside OnlineTermed “killfies” by some social media researchers, these accidental deaths have involved social media personalities and, of course, adventurers. Canadian rapper Jon James McMurray perished last […]

Small red plastic toy shovel.

Gravity Forms Notification to Google Spreadsheet

The idea that data can flow to different places for different purposes is one of the key concepts I want people to believe in. Different technologies and different interfaces have different affordances depending on what you’re trying to do. In this case, we’ve built some online training for students. As part of that training they need to sign off indicating they read various rules and safety advice. We’re using Gravity Forms to collect that information. We’re going to set a special notification email that’s easier to parse in addition to the regular email that gets sent out (that one is oriented towards student confirmation and alerting the individual faculty). Gravity Forms Notification We’re just going to put the student email and faculty email in the subject line with a space between them. I did some fancier stuff early but went back to this when I realized what we were doing just wasn’t complex enough to justify extra drama. I set the from name to Health Hub Logger so it’d be easier to write the filter in GMail. Notifications in Gravity Forms are pretty straight forward but you can find out more on their site. GMail Filter I then setup a filter in GMail so that I could be confident that the Google Script could find these emails and that I […]