GithubHelp home page GithubHelp logo

tvarchive-canonical_wordpress's Introduction

The Political Ad Archive

This repository contains a custom WordPress theme built for the Internet Archive's Political Ad Archive.

Installation Instructions

  1. Copy the theme files into your wordpress themes directory
  2. Install and activate the required companion WordPress plugins
  3. Activate the theme

Plugin Requirements

  1. The Political Ad Archive plugin
  2. Advanced Custom Fields Pro

tvarchive-canonical_wordpress's People

Contributors

danletson avatar kiyadigital avatar slifty avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

tvarchive-canonical_wordpress's Issues

General cleanup of functions.php

functions.php is a ball of wax right now, and would benefit from intelligent refactoring. This might mean breaking pieces of it into separate plugins.

Correct the functions.php sync commands

The archive sync method in functions.php should be set up to trigger once per hour.

The initial theme setup code in functions.php should be set up to trigger once (on theme activation)

Market Map date filters don't work

The date filter selections in the market map don't change the display or ad list. Fixing this will involve updating both the market counts API and the ads API so you can define date ranges.

image

  • Update market counts API to allow a date range
  • Update ads API to allow a date range
  • Update the map to use the new APIs

Implement Custom RSS

Enable RSS feeds that are populated based on custom searches (in the same way that a data export or search can be queried).

Market map results need to be paged

The market map tries to render every single video thumbnail, which results in crippling browser strain on production where there are a few thousand ads. We need those results to come in page-by-page rather than all at once. Infinite scroll would be excellent, but even just a "load more" button would help to start with.

HTML / CSS Review + Cleanup

When I built the first version of this theme it was a little bit rushed to say the least. The HTML and CSS therefore is a little sloppy in places, and generally would benefit from a code review.

  • Home page
  • Search results page
  • Data page
  • About page
  • Resource page
  • Political ad page
  • Blog posts lists page
  • Blog post page

details of ad airings w/ tv news links

When looking at the detail for a particular ad, we'd like to be able to see the details of airings in context as now is possible in Tracey's interface. That is, something like this (though this would be improved with cities/states added)
screenshot 2016-08-17 12 34 00

Homepage market map "Click" should do something

When I click on a market "dot" on the home page right now it just turns the dot red. We should either have it go to the market map page with that market selected or alternatively have it link to a search page for that market.

Create a real README.md and INSTALL.md

Someone who knows wordpress can figure out how to get the initial setup done, but some of the theme specific setup steps are very opaque right now. Lets fix that

Basic search could use a button

image

Right now the only way to search is to hit enter, but we should have an explicit "search" button like we have on advanced search.

resolve problem w/ "market" v. "location"

Current "market" descriptions are single cities, which are not names of markets. This is confusing for users who don't necessarily know, for example, that Boston = New Hampshire. We need to display the Nielsen market names for the "market" visualizations. Here is a link to Nielsen market names:

http://www.nielsen.com/content/dam/corporate/us/en/public%20factsheets/tv/2016-local-television-market-universe-estimates.pdf

Alternatively, we could change the word "market" in visualization to "location," and then the display is for the city/state where our recording info is located.

We should talk this through.

Search results design tweak

The advanced search design was made without accounting for where results should render; we should tweak that design to allow for a good place to load the results.

Implement partner metadata section of the canonical ad page

Right now partner metadata is simply a list of external posts; for the first version the plan is simply to use ACF to list out those posts, where the admin has to populate the content.

There is one special case, which is the Center for Public Integrity graphs. I'm going to break that piece into a separate task since it represents a different set of needs and is significantly more complex than the other pieces of partner data.

Changes to Home page Explore

We want to make some changes to the current home page explore:

  • Group senate candidates by state
  • Never group by party; add party to the candidate names (e.g. "Hillary Clinton (D)")
  • Remove house section.
  • Update to only show airings since July 1st (or, think of a good way to toggle)
  • Switch "Ads" to "Ad Airings" so we show counts of airings rather than counts of unique ads

on individual ads, display message

We have more granular information about "message" of ads for general elections, showing whether a particular "mixed" ad is "pro" one candidate and "anti" the other. We need to think about if we want to display/make available and how.

Create custom ACF fields for partner metadata

We have various data that we will be associating with political ads that come from our partners. They should eventually be automatically loaded, but for now we will simply want to use a single ACF repeater with the following fields:

  • Headline (Text)
  • Link (URL)
  • Body (Text Area)
  • Type (Multi select: PolitiFact, FactCheck, Political Ad Library, Center for Public Integrity)

The type will simply determine which logo is shown on the design.

"Most Aired Ads" doesn't reflect date filters

This may be by design, but should be discussed -- on the Market Map page when you filter the dates to only show counts from a date range, the list of ads does not change to only show ads aired during that new date range.

"Most Aired Ads" count does not reflect filters

There are possibly some technical challenges around correcting this without using inefficient queries, but the air counts when viewing ads filtered by market / date range show the TOTAL air count for that ad, not only airings within that filter. This might be confusing to the user and doesn't make it as easy to fully understand the airings.

Include design materials in repository

Right now our designs are spread across several places -- they will continue to be, but we should have them in this repository as well for easy reference purposes.

Sponsor Types should be friendly names

Sponsor type renders the code, not the friendly label (e.g. candcmte vs Candidate Committee). This happens in most places on the site; should probably be fixed at the model level.

Implement the latest front page design

The current front page design does not reflect the latest designs (which have a featured ad as well as a featured blog post).

The following front page components should be editiable via Advanced Custom Fields:

  1. The headline
  2. The subheadline text
  3. The featured blog post
  4. The featured political ad.

Candidates with no ads shows "null" ads

On the front end "explore" interface there are cases where a candidate is listed as having "null" ads rather than "0" ads.

This should be corrected on the API level, but may be worth tweaking the frontend logic too; "null" should be interpreted as 0 rather than converted to a string.

On that note, candidates should not be rendered if they are not being marked as having ads.

image

Tablet featured ad layout

Right now the tablet view of the front page has the sponsor name and candidate stacked on top of each other (as it is on desktop view). The design has them next to each other.

This is how it looks:
image

This is how it should look:
image

Theme cleanup: Remove Unused Parts

When the theme was initially created I just went nuts and created an empty file per potential part.

Lets slim it down to only what is actually used.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.