Code Monkey home page Code Monkey logo

Comments (10)

derekeder avatar derekeder commented on July 19, 2024

Cool - I can reach out to ballotpedia.org. Do we have a contact there?

from askthem.

walter avatar walter commented on July 19, 2024

@davidmooreppf or @jpmckinney might, I don't.

from askthem.

jpmckinney avatar jpmckinney commented on July 19, 2024

I've never looked at ballotpedia.

from askthem.

davidmooreppf avatar davidmooreppf commented on July 19, 2024

Sorry just seeing this - try [email protected], I emailed w/ him back in June '11 when we were developing OG.

Feel free to 'cc' me. At the time he was in his email sig ::

Geoff Pallay
Project Director, State Legislatures
Ballotpedia
www.ballotpedia.org
www.lburnsinstitute.org

from askthem.

derekeder avatar derekeder commented on July 19, 2024

Email sent. Awaiting response ...

from askthem.

walter avatar walter commented on July 19, 2024

After getting your email with their response, I took it upon myself to see what whether they could use mod-rewrite to handle the pattern (rather than a redirect per se).

First thing to determine is whether they serve their site with Apache:

http://toolbar.netcraft.com/site_report?url=http://ballotpedia.org

Looks like they do.

So what they need to do is put this in their vhost config in their Apache config:

RedirectMatch 301 /wiki/index.php/Images/(.*)\.jpg$ http://ballotpedia.org/wiki/images/c/c3/$1.jpg

However, looking at the pattern of the second part again, I see "c/c3" in the path. Does that part of the path change on depending on the elected official? That may screw up the redirect match OR our own handling if it comes to that.

from askthem.

walter avatar walter commented on July 19, 2024

Ugh. According to this guy:

http://ballotpedia.org/wiki/images/2/23/Max_Maxfield.jpg

what comes after "/wiki/images/" in the path may vary which we have no of knowing from the original URL.

So we can't do URL hacking on our end or get them to do a simple RedirectMatch on their end.

Seems we have to actually get the data correctly updated in OpenStates (since we periodically rebuild our data from OpenStates).

from askthem.

walter avatar walter commented on July 19, 2024

It's worth experimenting with whether we can get the photos locally through OpenStates. See notes here:

https://www.pivotaltracker.com/story/show/50147951

from askthem.

derekeder avatar derekeder commented on July 19, 2024

Temporary patch: add a bit of custom logic to show placeholder image when the image path contains ballotpedia.org

from askthem.

walter avatar walter commented on July 19, 2024

Worked around in other ways.

from askthem.

Related Issues (20)

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.