Password Protect Posts Created via Gravity Forms
A quick little plugin that sets the password for posts created via Gravity Forms. This came about as the result of a faculty request today. In this case it’ll grab the first form field and use that for the password. You could hardcode it into the plugin itself but I thought this gave a bit more flexibility. With this option you can make that field something that the user could set or you can make it hidden and set it consistently for all submissions.
Simple but maybe handy for someone else.
There are a bunch of these out there but the ones I knew of didn’t quite do what was needed by the Focused Inquiry faculty involved in this project. They wanted a couple things to be possible. The ability to link to specific elements via URL and have them expand. The URL to those elements to remain consistent even if the order of the elements was changed. An “email this URL” link to enable faculty to send the URL to students Plus/Minus indicators based on expanded/collapsed. Most shortcode plugins I’ve seen either don’t have an ID for the collapse element or make it sequential (which changes if you shift the order). Neither works well for a URL that needs to be consistent. I’ve never seen one to do the email element. In my head, I made this way harder than it needed to be. It ends up being just two shortcodes- one for the collapsible container and one for the item-level elements. I found this Bootstrap snippet that did most of the functional Bootstrap stuff that I needed. I found a script to let me expand elements via URL parameters. I reminded myself what a freaking mailto link structure looked like. Now I just had to figure out what variables needed to be set in the shortcode and how the […]
Tim moves our rampages database to our dev server roughly every month. Our database is big and awkward and uses Multi DB to deal with the scale. Because of the multiple databases some of the typical migration patterns to get the URLs right don’t work. We were suffering through that for a while but I’d find myself ported from the dev environment to the live site at times without realizing that’s what happened. That is not a fun way to live. Because Jeff was working on a really smart way to do this in the database I realized I didn’t know more than I thought I didn’t know. As a result I stumbled upon the ability to filter the site url and home options. That means we can make a tiny little network activated plugin that leaves our database alone and just filters things on the fly with a dab of regex.
flickr photo shared by Thomas Hawk under a Creative Commons ( BY-NC ) license This is in response to something Adam Croom wrote two(?) days ago. I thought it’d be an interesting proof of concept and would let me figure out some things with a purpose. I also like to have a few projects going on at once so I have things to switch between when I get frustrated. I also see this kind of information pushing/pulling as broadly applicable. Some of this stuff is no doubt uglier than it had to be but I’ll try to show some intersections that happened to occur with other projects and how certain steps might be ignored entirely if you want to be all efficient and stuff. The final plugin is here and should be a decent start to any customized import you want to run against a CSV file. Adam had information in Discogs. He wanted that information in WordPress where he could control it. I had never heard of the site, let alone seen its API. But it well documented and it took me a few minutes to realize I could get all the data I needed without even needing to authenticate. The user data was associated with collections and appending 0 would get me the root level stuff. With Adam’s […]