We had a network activated plugin throwing a notification across all our site dashboards. We did not wish for this to happen any longer. So this was added to a network activated plugin. The first part enqueues a css script for the dashboard. The CSS makes the message hidden. The css targets a particular element that’s something like what you see below. I wondered if css could target things based on data attribute values and it can.
Normally we finish our projects in anywhere from a few hours to a few weeks. Digital Histology has been the exception to that rule. I can see a reference to the site going back to Nov. of 2016! That doesn’t mean we’ve worked on this site continuously for years. The gaps have been frequent and long. OER grants have been written and won. Presentations have been made. Work has ebbed and flowed as the massive amount of content has been entered. There are more than 1500 pages1 and over 5GBs of images. It’s a large site. A ton of work has gone into its construction, new goals have developed, and just about all of it is a little strange. 2 I figured I’d better document some of this before I forgot all of it. The History I don’t recall all the details but essentially long ago in a Macromedia Authorware galaxy far, far away a digital histology program was constructed. Time passed. Acorns grew into trees. WINE was now required to launch the digital histology program. The screen was a tiny 752×613. It only ran on desktops. Updating it was nearly impossible. Things were not good. After much wandering we found one another and endeavored to put this work online for the betterment of humankind. Having a previous project did […]
Voice Thread’s embed code should like what you see below. For non-super admins who have iframe embed rights we were getting this instead (once the post had updated and been cleansed by our friend kses). It still mostly worked but we needed to tweak things to let in those additional variables (allowusermedia allowfullscreen allow). You can see pieces we needed to add to the iframe array in the comments below.
Gravity Forms lets you set up user registration via an additional plugin but it require some setup. It’s not hard to run into a scenario where you though people were getting registered but they were not. Not a big deal if it’s a handful of people but not pleasant if it’s more than that. I wrote this little plugin the other night to deal with a scenario like this. The comments below explain most of the important bits. It will require you to know what your form ID is, the form field IDs, and the blog ID of the site you want to add the users to. I trigger the function by attaching it to a shortcode and sticking that shortcode in a post or page. I’m not sure that’s the best idea but it seems to work fine.
Ran into an interesting bug today on the Motherblog plugin. Despite being in use for a number of years this is the first time we’ve run into this particular issue. It seemed that if a student was using their blog for two different courses and the two courses used identical subcategories for assignments the subcategories would not be created on the student blog. So if class A did something like [altlab-motherblog category=”ClassA” sub_categories=”Blog 1, Blog 2, Blog 3″] And class B did [altlab-motherblog category=”ClassB” sub_categories=”Blog 1, Blog 2, Blog 3″] Then whichever one went first would work fine but the second one would only duplicate the parent category. This plugin was written by Mark Luetke who’s been gone for a long time now. It’s often not easy to debug my own work and it’s harder to parse out someone else’s work. After a bit of scanning I did find the following function. Note that it’s named something sensible which made it much easier to find. The key component ended up being the catch that looks for duplicates. There’s no way I saw to modify this to check for the parent ID first. The plugin just asks if the term exists and then if it doesn’t — !$the_sub_category — it makes the subcategory. Our problem was that the term did exist […]
You’ve got a scenario where someone is signing up to multisite via Gravity Forms’ user registration plugin. The following function will automatically add them to as many additional sites as you’d like.
The goal here is to have someone create some content in a particular category (using Gravity Forms) and then end up seeing content from other people that is in that same category. There are lots of ways to do this but this in a simple and dynamic way. It has the added benefit of requiring no coding knowledge. It does rely on the Display Posts plugin and Gravity Forms. This is all it takes to show content from the same category in the Text confirmation display area. Sure you could also redirect to a category page but this gives you the ability to customize quite a bit more. I can use offset=”1″ to omit the post the person just submitted. I could go father and add/display only posts that are also tagged “awesome.” I could include excerpts, featured images etc. Nice and easy but lots of options.
I was building something in JSPlumb the other day1 and it prompted Tim to ask if we could build flowcharts based on survey responses so that respondents could see their choices in context. I thought we could and it led to this simple example2 that I think will have lots of interesting and broad applications down the road. This is one of those things that is halfway to an actual answer. It gives you the foundation to build specific things pretty quickly without a lot of technical knowledge but it does require attention to detail and understanding some logical3 writing patterns. My semi-coding audience may be mostly in my mind but it works for me and maybe for our ALT Lab R+D group. If this ends up expanding well, it’s possible Jeff will make it into a more substantial solution plugin like he’s done so well with a number of other things that started out this way. Foundational Elements This uses Gravity Forms and a little plugin I made to add the Mermaid css and js to posts. The plugin also adds a little content filter to add the data to WordPress without it getting messed up by the editor. I went back and forth on which way I’d create the flowcharts. I opted for Mermaid because I though the […]
I talked to some VCU people about ePortofolios1. It’s a conversation I’ve had any number of times over the years. I think that experience is leading to a better understanding of what’s going on structurally and the space we have to navigate competing interests. I’m also in a better position to show how certain technologies might help people find a middle way. However, I’m still trying to be honest about the complexities involved in an environment with shrinking resources and expanding expectations. That’s a rough line to sell when vendors have no compunction about pitching simple answers that aren’t exposed until after contracts are signed. For the record, I didn’t start with this peppy intro when I spoke. Portfolio Strategy There seem to be two major philosophies when thinking through portfolio content. Trophy Case The “trophy case” is showing the best of what the student has done. This is the pattern in many traditional portfolios. The student puts up assignment A. It’s as good as it’s going to get and it represents learning outcomes 1, 3, and 7. The alignment between the assignment and the evidence it presents of skills/knowledge is preordained and there’s little evidence of how or what led to that result. There is little or no consideration whether the display of this evidence plays to the strengths […]
We wanted to be able to know whether people signing up for Ram Pages were faculty or not but didn’t want to add fields for them to fill out. VCU has an online phonebook with faculty emails in it but there didn’t appear to be a way to hook into an API. But you can provision the site with search items via the URL like so https://phonebook.vcu.edu/?Qname=woodwardtw%40vcu.edu. Since I knew that PHP can grab a website (file_get_contents) and parse out the text in various ways (preg_match) it seemed like we could automate this. When the phonebook site fails to find a matching email it returns some text that says ‘No matches.’ That’s what I decided to look for. If you look at the comments below, each line of the code is broken down and pretty much (over) explains what it does. Update Here’s a better version using curl and displaying the data in the user profile so you can see if you’re crazy or not. It also checks for the metadata field and updates or creates it as needed.