Institutions often struggle with silos: different offices and departments that work in different buildings and sometimes different campuses; fragmented budgets and grants that are earmarked specifically for one area; and pockets of information that live in different CMSs and are updated at different frequencies. But what good is all that information if we can't connect the dots and present as much or as little as our users need?
See https://2019.wpcampus.org/schedule/connect-the-dots-bridging-silos-of-information/ for more details and a video of this presentation, once it becomes available.
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
Connect the Dots: Bridging Silos of Information (WPCampus 2019)
1. Connect the Dots:
bridging silos of information
Elaine Shannon
Director of Web Development
St. Mary’s University - San Antonio, TX
Slides: stmarytx.edu/silos
Code: github.com/eshannon3/wpcampus-samples
Questions: post on the conference website
3. What we’re talking about today
● Background
● Examples:
○ Directory
○ WP to WP
○ Events
○ Courses
● Tips
4. Background
● Institutional site (www.stmarytx.edu) is a WP site
● We have dozens of other sites, such as
○ CourseLeaf catalog
○ EMS room booking and calendar
○ Banner
○ Slate
○ Law school is a separate WP install
○ Alumni is a separate WP MultiSite
32. Tips to connect the dots
1 Focus on users
What information are they
looking for? What roadblocks
are they running into that
you might be able to solve by
including one site’s data
inside of another site?
33. Tip 2
1 Focus on users
What information are they
looking for? What roadblocks
are they running into that
you might be able to solve by
including one site’s data
inside of another site?
2 Don’t duplicate
Duplicate content is harder
to keep up to date.
It’s also bad for SEO and can
be extra confusing for users
if it’s copied but not always
up to date everywhere.
34. Tip 3
1 Focus on users
What information are they
looking for? What roadblocks
are they running into that
you might be able to solve by
including one site’s data
inside of another site?
2 Don’t duplicate
Duplicate content is harder
to keep up to date.
It’s also bad for SEO and can
be extra confusing for users
if it’s copied but not always
up to date everywhere.
3 Find keys
Look for common data - how
will you connect one source
to another? What key do
both systems share that is
unique and consistent?
35. Tip 4
4 Find APIs
APIs are the first choice. RSS
feeds are common in older
systems; scraping HTML is a
last resort.
36. Tip 5
4 Find APIs
APIs are the first choice. RSS
feeds are common in older
systems; scraping HTML is a
last resort.
5 Make friends
The better your relationship
with the keepers of systems,
the better your odds of
getting data in the format
you need.
Build connections
with people to make
better connections
between systems.
37. Questions and Feedback
● Questions: 2019.wpcampus.org
● Feedback: 2019.wpcampus.org/feedback/connect-the-dots-bridging-silos-
of-information/
● Catch me Later:
○ Say hi at WPCampus
○ Ping me on Slack - wordcampus.slack.com
○ Email me - eshannon3@stmarytx.edu
Notes de l'éditeur
Hi / thanks / excited
Before we start, links
Slides
Code - full samples
Questions - can ask later
I have questions for you!
Who is an introvert?
Who's afraid of public speaking?
I relate to the Wizard
Forgive me if I stumble / I encourage you to try speaking too
Overall: getting & displaying info from other websites
Why? Better UX
Background so you have context for these projects
Then, 4 real-world examples
Finally, wrap up with tips for bridging your own silos
Our www is WP - easy to add functionality & style
Www's main audience is prospective students
Alumni, law, current students have their own sites
Dozens of other sites: Banner employees, Slate applications
Other WP sites: law, alumni
First integration has moved back and forth
Left: PHP only; right: WP but very custom PHP and cron jobs
Moved to managed host: IT set up on separate subdomain
Challenge: IT had to update styles & nav
Another challenge: some employees also data in WP
Even on the main site we had 2 silos
Directory had Banner; WP had bios and professional photos
Nothing to link this data together
Cool thing my job: autonomy / decided to connect
Banner was closed; IT guy who was maintaining directory asked what I needed
If I could get export, he wouldn't have to maintain directory
Only asking for public information
IT friend suggested JSON - new but worked great
Nutshell: cron job every hour, visitors don't wait for data to load
WP cron vs. server cron
This cron json_decodes the webservice data
Now I have Banner employees
Remember dir is on main; can get main site employees with get_posts()
Law is separate - use REST API
All law employees stored in "faculty" cpt
REST API only gets 100 post at a time, but tells you how many pages
Loop gets the other pages
array_merge() combines all the law WP employees
In REST API, featured images are in separate endpoint; add those
Then get www employees - 2 CPTs - with get_posts()
At this point: 1 array of Banner employees, separate array of WP
Now it's time to combine
Loop through Banner array, isolate email
Inside that loop, loop through WP find matching email
Soon remove email address - need unique identifier to link Banner to WP
Add matching WordPress data into the Banner array
If they don't have WP feat image, add fallback
Finally, json_encode() the combined array and include on page in a very roundabout way so it's harder to harvest all employee data
Here's what looks like today - can see at /employees
Top: browse by last name or search by keyword
Bottom: combined results
Image always WP - cols line up; Banner data; WP bio; rest of Banner data
Next few examples pulling WP data into other WP sites
How many have >1 WP site?
We publish news & mag on main site, but law & alumni interested too
Don't want to duplicate the content, just share it
Left side: original mag article; gold stripe: law home, white stripe alumni
Many ways to push/pull content
Before REST, we used RSS / WP creates auto / can customize
Used to use fetch_feed() which parses any RSS feed
Regexes:
strip out HTML like <h2>s we don't want on alumni homepage
Take out "read more" wording
Parse content to find first img, display that (rss no feat img)
REST API makes it easier to get extra data like feat img
Now wp_remote_get(); RSS set # posts, REST can request any #
Simplified version; full inc img fallback & whether to put period after month
Now one more way we've found to link content within a WP site
Institutional audience not seeking news/mag, but benefits from them
Gold section is as close to typical WP home as we get - Posts in rev chron
Also built Post Connector: shortcode with options
Can show a list of post titles like on left - CCS - or can show images
Also @ bottom every post, built-in links to more stories; news/mag
Here's first part of code
Circle shows the shortcode supports 5 attributes: ___
Next, if shortcode was called w/atts, we add those into custom query
Add post__not_in param so post doesn't link to itself
Check images att: if yes, show img overlay version like on www home (and only show posts w feat img)
If images att was no or not passed, default: show list version like CCS
Finally, always return - shortcode that echos will be at top
Next integration fancier
Anyone have an ugly website? Reasons...
Our Master Calendar isn't pretty; can't link to specific cal or month
Took us awhile to get this integration right / tried in full redesign
First pull events: RSS feeds only way to get data
Our staff could create custom RSS feeds based on criteria
Unfortunately - our first attempt ended up pretty ugly and hard to use
Redesign focused on other pages so this one got left behind
Lot going on here, talk you through
Even with custom RSS feeds, still had a ton of events, tried accordions
"featured events" in sidebar to show high-profile events farther into future
Big annual events - links to static pages at top - but got better from here
Analytics helpful! GA showed most clicking back to full calendar
Heatmaps showed nobody scrolling to see rest of accordion
RSS wasn't cutting it - no way to tell how much data would come through
Called vendor - API available! (paid)
New way to extract data, but didn't contain everything - like tags
Soon found a way to lay out calendar as - calendar
Current version! Buttons at top replaced accordions
Month selection dropdown to show past/future quickly
Fair amount of code; check to see query string for which cal/month, call API, tell it date range, calculate first day of month
For each day, see if any events; gray highlights are featured, prominent but not separate
Also have mobile styling - days alternate colors, easier to scroll
Always think about structure of data - not just how it looks on screens
One way: use Schema.org - vocabulary designed by search engines
Basically: wrap each item in single tag, like event here in div
Add "itemtype" attribute that links to the specific type of Schema
Each Schema has different properties, communicated by "itemprop" atts
Events have atts like start date, event status (scheduled or canceled)
Benefit: in Google results we have extra event sitelinks (free)
This time, targeted course schedule in Banner
Programs: major, minor, cert
As we worked on program pages, thought showing some sample classes could give prospects idea of schedule and whether this is major for them
Remember IT friend? Built course schedule webservice too
Hopefully you can see just enough here to tell this plugin creates db table to hold the courses
2 crons - labor-intensive, 2 jobs prevents timeout
1 pass: save Banner courses to db
2: parse and apply the data
This is 1st: checks current month, determines which semesters to get courses for (7: this year summer, this year fall, next year spring)
This time webservice contains XML, use cURL & simplexml_load_string
Data includes catalog prefix, like AC for accounting; level; course number; name; days/times; which semester; flags for online or evening
20 min later, 2nd cron
Query to get all posts that have meta key called "course prefix"
Next goes through Banner courses in db, checks upcoming semesters to see if any are offered online or evenings
Finally, loop through posts: if online or evening, gets postmeta
Now we have data, what can we do? … 2 things
1st mentioned earlier: show few classes on program pages
Math program page: little section shows course names and links
Gives visitors idea of days/times and class names for what they'll learn
(BTW, this schedule tells me this is not the right program for me!)
2nd thing can do: make easier to find nontraditional
Popular page "all degrees & programs" see every academic program
Cool feature: search by interest, where we've added keywords; search "math" you'll see accounting, physics, engineering science, etc.
Some students are also looking for specific schedule not just topic
Doesn't it make sense to make it easy for people to find options?
Added section with buttons for online & evening
Became hot spot in heatmaps and lists became popular pages
Sad part: lot of online classes aren't offered to all, remedial
Even evening classes don't usually add up to full degree
So, looked like more online & evening than we really had; didn't want to get prospects excited only to find out they still needed day classes
Like to share some overall tips from these experiments
1: focus on users - don't connect for sake of connecting
Mine through analytics, find top search terms, look at page nav paths
If don't have analytics set up to see >1 site at once, either work on setting up or do real-world user testing to see what info people look for & where
2: don't duplicate content
May be true that visitors to 3 different sites need same info
Won't be doing anyone favors if you copy throughout the web
Once you copy, hard to keep track of every page in every CMS
Don't want to advertise outdated info
3: find keys
To include info from one site on another, need reliable way to associate data
Employee directory: email address
Course schedule 2 keys: course prefix & level
Whatever connecting, need to know you can rely on data in both systems to stay consistent
Easier to use something that already exists than retrain someone in a different system to start adding keys
4: find APIs
APIs usually fastest & easiest way to access data
Use REST API, check with vendors
If no API, or it doesn't have enough functionality, can use RSS
Last resort: scraping - force connection if you really need to
Last but not least, 5: make friends
If you have good relationship w someone in dept that's the keeper of the system, makes it easier to find a way to connect data
Make friends in IT, admissions, all other offices who hold data that's important to your users
Don't make it one-way street: offer to share your data, your analytics
Forge relationships not just by asking for help, but offering freely
Remember ask Qs on conf site
Also ask you take a min to submit feedback on conf site
Helps organizers know which sessions were most helpful
Helps speakers like me know what we need to work on