cartoon face eating cheetos.

Voting in Gravity Forms

This is one of those unique needs but with base elements that are likely to be useful in other scenarios. It looks at the logical operators in Gravity Forms which require no programming knowledge, looks at using cookies to discourage more than one entry, and finally moves to using the API to display data. That’s a decent tour of complexity and capability. Origin Story People wanted to vote. They get to vote for 5 people. There are 5 known people on the ballot (multi-select checkbox) but people can also write in candidates but they could submit no more than 5 people total. Additionally we wanted to prevent people from voting again but did not want the overhead of user accounts and did not want to compromise privacy by using email addresses. And the final goal was to have a visible count of votes cast. Party of 5 Solution1 Gravity Forms will let you do conditional logic. In this case I set up our primary field as a checkbox with our 5 main people as options. I then made 5 free entry text fields. I set the logic so that each free entry field will be hidden if the paired checkbox is checked. Checking person 1 results in free entry field 1 going away, checking person 2 removes free entry 2 […]


Weekly Web Harvest for 2020-01-19

Activist Graduate School – Online University for Protesters, Movement Creators & Changemakersfound via this thread Grimes Debuts WarNymph Social Media Accounts for Her Unborn Baby | Consequence of SoundIn one, the 3D baby speaks directly into the camera about, you guessed it, the impending apocalypse! “This is the end of the world. The world stands on a ledge. Death and the end is nigh,” it says in a whispery, quiet voice. “The next planet in the solar system… it’s called death. The sun explodes and we all die. The earth is going deafeningly quiet.” Akon is building a Senegal city powered by his cryptocurrency, Akoin – Business InsiderOn Monday, the singer tweeted that he had finalized an agreement to build a 2,000-acre “Akon City” in the West African country, which he has said will be like a “real life Wakanda,” a reference to the futuristic African country in the 2018 film, “Black Panther.” The city will run entirely on Akoin. Make a streets map of anywhere in the world | FlowingDatato be used in the future for a website background


Zombie Posts/Pages Shortcode

Origin Story This is an odd one but has a number of uses outside this weird scenario. In this case authors have access to Site B but want the content they write to show up on Site A on the appropriate pages/posts. Given this is a multisite I could tie the sites together and do the switch_to_blog so that posts updated on Site B update Site A. I could also periodically clone the whole site to the destination etc. This all felt fairly aggressive and lacking in flexibility. It seemed like it’d have the potential to go very wrong and would require a lot of thinking to prevent abuse while allowing for flexibility. JSON API Route I decided instead to create a little shortcode that would let you pick a site URL (any site), add a post type, the content ID and that would spit the content of that target out in your page/post. There are search, SEO concerns with this route but it’s a decent path for a quick solution. As I write this, I now realize I could do this a lot better with a check of the API content and then setting this to update the content if the data differs. That is one of the advantages of writing posts about stuff. You think about it a […]


Two Display Posts Tricks

I’ve been a fan of Display Posts since the days of straight Non-Programistan. Despite the fact that I can write my own stuff from scratch, Display Posts still comes in handy all the time. The following are just two little tricks used in a recent course site. I’m just skimming the surface of the capabilities of the plugin but hopefully it shows you how a plugin like this can do some of the non-standard display work that makes faculty happy and creates a site that has custom capabilities without the overhead of a custom theme. Origin Story We had a quick turn around for a faculty member who is teaching a class on the Climate Crisis and he wanted two non-standard display features. Image Widget Based on Post Featured Images Initially he set up an image album in the sidebar as a widget but updating that was going to be manual and that’s a pain. With Display Posts I can make a quick shortcode (pretend it’s in square brackets1) that gives us the featured images of the 5 most recent posts but doesn’t include the titles or any content. A dab or two of CSS and you’re good to go. Full Content of Most Recent Post, Excerpts of Subsequent Posts For the weekly information for students, he wanted the most […]


Weekly Web Harvest for 2020-01-12

Michael Pederson on Instagram: “Empty space #streetart #miguelmarquezoutside”Worth clicking through to see. Harry Harris: Mustache of US ambassador sparks uproar – CNN“I didn’t grow a mustache because of my Japanese heritage, because of the independence movement of Korea or even because of my dad. I grew it because I could and I thought I would and I did,” he said. Gateway to Astronaut Photography of EarthFun images with a variety of uses. Schools Are Surveilling Students; Here’s How One Might Hack ThemHere, you might also learn enough to write your own app that can log in just like the real one and emit your own “I am here” signal. Maybe as a first step, you voluntarily collect the credentials of lots of other students for your custom app which can log in as all of them at once… then just hide this phone somewhere near the classroom to register all the time as all of those students at once. Science Slider All – Tiny Helpers Let’s talk about your resume | Hugo Giraudel, web developer in BerlinA decent reflective piece with some stuff that’s applicable more broadly.


Photography #175

A few of these are from the drive from VA to Alabama. They’re all taken from the car so it’s basically reverse sports photography. They’re also taken with the 85mm fixed lens which means no zooming to compensate for slow reflexes at 70mph.1 It does make the trip go much faster when you’re playing this game. 1 That’s either bragging or excuse making for less than perfect images.

Screenshot of a design context website where the weather data is being pulled via API.

PHP Middleware for Keeping Your JS API Secrets Secret

Origin Story We were looking to pull in live weather data for a eco-related design contest that VCU Qatar is hosting. I found a free API for weather but wanted a way to use it via javascript and not expose any secrets. That led to the script below. Many APIs have query strings that require app IDs or other authentication elements you’d rather not have exposed to the public. Even if you can restrict access to your own sites, you might still want a bit more privacy. In this scenario PHP acts as middleware and only returns the public data while hiding all the secrets. Line #1 tells us which API endpoint and parameters we’re using. Line #2 gets the data from our API with our fully authenticated URL. Line #3 tells the browser that the page we’re making is JSON and it should treat it accordingly. Line #4 lets other sites access the data. You can learn more about some CORS options over here. Line #5 spits the data back out.


Weekly Web Harvest for 2020-01-05

daviddao/awful-ai: ?Awful AI is a curated list to track current scary usages of AI – hoping to raise awarenessAwful AI is a curated list to track current scary usages of AI – hoping to raise awareness to its misuses in society Wireheading: when machine learning systems jolt their reward centers by cheating / Boing Boing these systems (AI) achieve their notional goals while subverting their own purpose, with names like “model stealing, rewarding hacking and poisoning attacks.” — so just like what happens with people and data . . . 10 Reasons Why You Should NOT Get your MLS (Master of Lighthouse Science) – McSweeney’s Internet TendencyToo many waves? Want to tone down that Nor’easter? Ghost pirates stepped out of the fog again and created hazardous working conditions? Hah. Good luck getting the ocean to respond to that email. –and the last one re online edu . . . Can I realistically avoid services that are part of my education? : privacyh/t Doug Levin on Twitter The 100 Worst Ed-Tech Debacles of the DecadeSteve Jobs wouldn’t let his kids have iPads. Bill Gates wouldn’t let his kids have cellphones. Again and again, the media told stories — wildly popular stories, apparently — about how technology industry executives refuse to allow their own children to use the very products they were […]

A guinea fowl.

Photography #174

We went to explore the headwaters of the Chickahominy River which is not far from our house. The skimboard attempts were semi-successful. I remain fascinated with these trees. Tried drinking their sap one time. It was not maple syrup. The reverse of sports photography is trying to take pictures while driving down the road at 70 mph (112 kph). These shots are on the return trip from Alabama. Darkness called an end to the attempts at some point. I’ll make another post with the shots coming from VA to Alabama. I love this building. Someday I will stop and go take proper photographs. It looks like it’s close enough to Ruby Falls to justify doing that before the building gets torn down. I have photographs of it going back a number of years so who knows how much longer I can delay.Time slips away and leaves you with nothing mister but boring pictures of strip malls. I repeat that doing this with an 85mm lens from the car is an interesting challenge. You do see so many more things if you look. Dystopian roadside. That color water always reminds me of Alabama. The Birmingham Zoo was mediocre. I was chastised for being less wary of a cassowary than they desired. Wildness remains strictly controlled. One piece of pine straw . […]


Weekly Web Harvest for 2019-12-29

How one astronomer hears the UniverseI presented users with simulated data of astronomical spectra and asked them to look for a characteristic double peak that indicates a black hole. We had people try to identify signals that were masked by noise by using vision only, by combining visual interaction and sound, and by using audio only. We found that when you combine audio with visual interaction, your sensitivity to the signal improves. That tells us we need to focus on a transition to studying how these methods can benefit everyone, not only visually impaired people. Thank You For Joining Our Gym and Thereby Helping Us Avoid a Devastating Legal Battle With The Producers of the Hit History Channel Show, Vikings – McSweeney’s Internet Tendency“Maybe I don’t want to transform my body,” you might say. “Maybe my body is fine just as it is!” Let’s be clear: Your body is not fine as it is. Your body is weak, fleshy, and wholly unable to plunder a Scandinavian village with brutal efficiency.