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 […] […]

Read More…

WordPress for LMS iFrame Infiltration

Warning: Cannot modify header information – headers already sent by (output started at /home/bionicte/public_html/wp-includes/feed-rss2.php:11) in /home/bionicte/public_html/wp-content/plugins/danger_mouse.php on line 35
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 […] […]

Read More…

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 […] […]

Read More…

Tools of Dad

I do not need any social media reminder service to tell me who’s birthday is today; May 2 is always etched with being my Dad’s birthday. Today he would have been 93, but alas his odometer ran out at 72. I do this math, and figure out that when my dad was the age I […] […]

Read More…

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 […] […]

Read More…

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 […] […]

Read More…

Privacy Statement