Instagram-ish WordPress Filter Shortcode Plugin

That beautiful link-bait title and a picture of a dead leaf! That’s why I’m a social media guru. With that self-promotion out of the way . . . I found this CSS library from Una.1 It lets you apply instagram-like filters to image via CSS. Also got to have a nice interaction with Una via Twitter to clarify the license. @twoodwar :+1: its MIT so go ahead — Una Kravets (@Una) December 6, 2016 It fit a need that a professor was expressing for one of our WordPress installs so I wrapped it in a plugin/shortcode combination. The structure goes like so . . . [ cssgram img=”https://c2.staticflickr.com/6/5745/31413304786_48ab865a34_c.jpg” filter=”_1977″ ] Plain Image A Few Filtered Examples _1977 Inkwell Xpro2 1 Check out her site if you’re into developer stuff at all.

HTTPS Insecure Content Fixer Plugin

If you’ve got a site running on HTTPS and you try to throw in some HTTP content, the browser gets nervous. If you’ve recently made a shift to HTTPS you might notice content that was successfully embedded disappearing. If you look in the browser (right click>inspect element in Chrome), you’ll see an error like the one above. What you want in this scenario is protocol relative URLS . . . essentially a URL without the leading http/https. That lets the page load via the one protocol that matches (assuming it exists- some sites won’t supply HTTPS options).1 I ran into this problem with files we uploaded via Gravity Forms prior to the switch to HTTPS. There are a number of ways to deal with this (including search/replace at the database level) but we’re under a very heavy load at the moment and I just needed a quick fix. This solution will also allow people to do whatever they want on an ongoing basis better than a database response. This tiny little filter plugin is the result. All it does is use PHP’s preg_replace (regex) function to find any instances of HTTP or HTTPS (capital or lowercase) and remove them. I’m still amazed by regex but always end up having to spend a bit of time reminding myself of how it […]

Set Default Gravity Forms From Email

On rampages we only have the ability to send out emails from rampages.us addresses. This caused a bit of confusion for me when our Gravity Forms email notifications stopped working.1 It seems like Gravity Forms now defaults to send emails from the form admin’s email address. In our case, that’s a vcu.edu domain . . . . which causes the emails to fail. You can see that when you go to Settings>Notifications for a form. The From Email now says {admin_email}. We have Gravity Forms network activated on rampages which means it’s live on all 17,000+ sites. Granted, I have no real idea how many people use it but I didn’t relish the thought of how many questions this might cause. Luckily, Gravity Forms has a way to take care of this and I was able to write a tiny, little, itsy, bitsy plugin to set the from email for all our sites. Problem solved. 1 Tim, from the ever-reliable Reclaim Hosting guided me back to sanity after I tried to make this much harder than it needed to be.

Importing Moodle into WordPress

flickr photo shared by Internet Archive Book Images with no copyright restriction (Flickr Commons) A week or two ago some faculty members asked me about getting the Leadership Education in Neurodevelopmental Disabilities (LEND) content out of the Moodle hosted at Vanderbilt and into WordPress. I figured I could do this. Someone might even have done it already. If not, I figured the export options would have to put out something fairly straightforward that could be parsed. In any case, the majority of my learning comes from committing to things I don’t quite know how to do. Turns out I couldn’t find anyone who’d done this before. I went a variety of different routes as I attempted not to do the work myself. First, I exported the course in the two different flavors that were available (SCORM1/Course Cartridge and Moodle backup). Just for fun I tried a few different flavors of import plugins . . . Edwiser Bridge might have worked but required a higher level of connection to Moodle than I felt like dealing with and seemed more focused on integration rather than migration, Simple CSV Importer and WP All Import both failed to do what I needed despite pushing XML around a bit to try to make it work. So with all the ready-made solutions exhausted2 I turned to […]

CSV Parser Shortcode Plugin

flickr photo shared by The Library of Congress with no copyright restriction (Flickr Commons) The title just rolls off the tongue, yes? But what it does is kind of interesting. It’s not a drag/drop solution but it starts to show how we can better knit different services together. In this case, I run a Google Script to generate a spreadsheet of files (I can probably make that a straight up API connection in the near future). I publish that spreadsheet as CSV because Google sheets to JSON feels a good bit slower.1 Then the following shortcode (but w/in square brackets) generates the little unordered lists below. It’s taking that list of 464 files and just chopping out the ones where the filename’s first letters match A-1 and the parent folder is Tasks. Not brain surgery, right? But it is a pretty flexible solution to allow flexible access to any chunk of CSV (should work on any CSV on the web- assuming you adjust the elements to reflect the data) text you want to display portions of on the fly. People can do all their work in Google Drive and it seamlessly updates in WordPress. People without WordPress skills can update and change where these lists appear through a simple shortcode. To be clear, this is an integration rather than an […]

Put The Events Calendar Month View on Your Homepage

Because I’ve been messing with The Events Calendar for the RVArts project, along came another conversation where that plugin seemed like a good answer. It answered all their needs except for one – the wanted to have the month view of events be the homepage for the site. I knew that didn’t happen natively but I figured I could do it. The first step is to create a custom page template. There are a number of tutorials on how to do that. I usually just duplicate the page template for the theme I’m using as a parent and go from there. The one I’m using is below. The Events Calendar has this nice function (tribe_show_month) which’ll pull the month’s data by default. That’ll get you something that looks like below (depending on your theme). It’s the right content but it’s not applying the same CSS/JS that’s on the regular month view. You could go in and rewrite CSS and JS etc. but that would suck for this particular project. It turns out you have to enqueue the right stuff and this post was so very helpful in telling what to enqueue. I updated it to the newer functions and presto everything worked just like the normal month events view. It goes into my child theme’s functions.php. This particular version only […]

RVArts – Dealing with Dates in WordPress

We have an awesome general education course starting this semester called Cultural Passport (aka RVArts). The goal is to get students involved with the community’s cultural events – participating, promoting, reviewing them. The web side of this ends up being pretty interesting. See their video below for more details on the course. When we started this conversation last year, I thought I was going to go the Gravity Form submission route1 and use a js library to make it possible to add the events to various calendars. Like most projects, particulars shifted and we started changing things pretty radically right before winter break. We ended up shooting for full WordPress editor access for students to create events and the desire to write three different types of responses (interviews, reviews, and features) that would be associated with a specific event. Also, like most projects, this was all a bit beyond what I’d ever done before. I started off thinking I’d create a custom post type for events. I was trying to make up my mind between using Advanced Custom Fields and CMB to help do that when I realized I hadn’t really thought about repeat events. The complexities involved there really made me rethink my decision to do this from scratch. After that I started trying various plugins and eventually decided […]

#openupTRU – Simpler WordPress Writing POC

I’ve had a number of requests to simplify WordPress, to make it more Tumblr like. I get that. It was mentioned again while I was at Thompson Rivers University and that inspired me to get it done. WordPress has a lot more complexity than Tumblr and that allows you to do a lot more. Doing complex things often requires tools with some complexity. The thing that interests me is when and how you make that complexity visible.1 So could we do something more Tumblr like in WordPress? There are certainly ways to completely re-write the dashboard and to set up user roles that only have limited kinds of access. That seems a bit heavy-handed to me and I don’t want to wall this stuff off. I simply want to make things very accessible to inexperienced users. The full re-write is also somewhat beyond what I have the time to do. I could take the time but in “innovation” land time is energy lost and I must ride the mixed-metaphor wave of getting stuff done fast. So in the time honored spirit of throwing stuff together with duct tape, I offer this for consideration. WordPress does have a simplified authoring view. Really. You can activate it using the ‘Press This’ bookmarklet and despite a slick revamp in WP 4.2 virtually no […]

WordPress Reflection Plugin – Step 1 – Counting Links

The idea that technology ought to help students reflect on their use of technology seems to make sense. As we have more and more students engaging in online writing little things come to light. Take the humble/magical hyperlink for example. We often look at the use of hyperlinks as a marker for progress in digital fluency. Are students using the thing that makes the web so webby? Can we help make that a point of reflection for them?1 I had a conversation with Laura a while back about pulling out URLs and looking at the their use over time by students.2 Clearly, these aren’t pure quantitative things. You’ll never say “Six links? Failure!” or even “Seventy four links? That’s an A+.” Not that I would ever think that about you but this is on the Internet and I don’t want anyone tying hyperlink numbers to Bloom’s levels and then linking to me. But it would be interesting to look back over your writing and see when you use lots of links and when you don’t. So, at the moment, that’s what this plugin does. It’ll do some more tricks in the future but these are early days. The plugin as it sits now (below) will do three things. It’ll run a regex on the post and store all the URLs […]

24

Working My Sites Filter

So previously I was struggling with stripping out the Participants blogs that the bbPress/BuddyPress combo was adding to the My Sites list. I got it working and added a bit to deal with it kicking out blogs a little too aggressively. First to get the actual name of the Participant slug, I made a page template for a theme that only did one thing- listed the user roles array. It is dead simple and looks like so . . . Throwing that in a theme let me know that the slug for participant was actually bbp_participant. I spent a lot of time thinking I was doing something else wrong. I’m also not a huge fan of doing things this way in PHP. I wish I had the a console log option like in javascript.