Skip to content

Instantly share code, notes, and snippets.

@dunvi
Created August 25, 2012 16:27
Show Gist options
  • Save dunvi/3467583 to your computer and use it in GitHub Desktop.
Save dunvi/3467583 to your computer and use it in GitHub Desktop.
irc discussion regarding poll overhaul thinking
<dunvi> so anyway
<dunvi> while you're here
<dunvi> question:
<dunvi> what happens
<dunvi> if someone makes a poll
<dunvi> and then copy pastes the code into a post to a journal that does not have the poll cap?
<Afuna> hmm. you know I don't know. I'm not sure if it strips it out, or if it just won't display it
<Afuna> and we have a warning
<dunvi> because this is relevant to how i'd really prefer to do this entire thing
<Afuna> I am pretty certain we check for it!
<Afuna> I just don't know the actual specificts
<dunvi> which is to say that i think the right way to do the entire poll creator
<dunvi> is to have it done on-page with a javascript overlay
<dunvi> and only falling back to the separate tt page if javascript is off
* geekosaur vaguely recalls people grumping they'd pasted a poll into a non-paid thing (community?) and it didn't display
<geekosaur> (the grump being they'd forgoten it wasn't paid)
<geekosaur> (not grumpimng at DW)
<dunvi> grump grump grump?
<dunvi> grump grump grump gumbo
<dunvi> wait that wasn't right
<Afuna> ahh what we get is Client error: Access of restricted feature: Your account type doesn't permit creating polls.
<Afuna> on the new entry page anyway
<Afuna> s I Thnk that if you do it onspage wit ha js overlay, yo ucan check when putting up the overlay
<Afuna> and show the error there -- does that make sense?
<dunvi> yeah, that was sort of the idea
<dunvi> so you would have to make sure you switched to the right journal in the first place
* Afuna salutes
<dunvi> and then the link would show up
<dunvi> and then it would go away if you switched to a different journal
<dunvi> but what happens if you switch in, make poll, switch back out?
<dunvi> which vaguely led to the idea of just not showing the code at all, but that's not the right idea, i don't think
<dunvi> i think the best idea is to check on post of the entry
<dunvi> check that the authas + makepoll cap is still good
<Afuna> i think showing on both is good
<dunvi> and if it fails, parse the code for the poll tags and remove it? or just make an error?
<Afuna> so you can have client blah blah
<Afuna> without sacrificing security
<Afuna> error!
<dunvi> error and not stripping?
<dunvi> okay
* dunvi makes note
<Afuna> they might be on the wrong jounal, or whatever
<Afuna> yup
* dunvi somewhere
<dunvi> <.<
<dunvi> right, that was why...
<Afuna> that's how we currently do it
* dunvi puts it as an issue on her github branch page
<dunvi> :)
* rahaeli ([email protected]) has joined #dreamwidth-dev
<dunvi> i turned on issues on purpose
* rahaeli has quit (Changing host)
* rahaeli (~rahaeli@dreamwidth/staff/denise) has joined #dreamwidth-dev
<Afuna> ahahaha
<Afuna> nice
<dunvi> should they get the create poll option if they have any makepoll caps? or just no matter what?
<dunvi> i wouldn't recommend no matter what because people will get excited
<dunvi> and then feel like they got taunted
<Afuna> yeah
<Afuna> well. if they have makepoll, or if they're posting to a community with makepoll
<dunvi> but should they get it if they're a free account with posting access to a paid community?
<dunvi> at the moment, the way it works
<dunvi> is that if you are free, but you have paid community posting access
<dunvi> you only get the link after switching the postto
<Afuna> yeah. it's actually ... less than ideal
<Afuna> or wait hm
<dunvi> but i would be fine putting the link in for *any* makecap polls
<Afuna> switching the postto == reloading the page or no?
<dunvi> ... makepoll caps heh
<Afuna> ahaha
<dunvi> this is for the non-javascript implemntation
<Afuna> ahh
<dunvi> haven't tested the current javascript implementation
<Afuna> hmmm
<dunvi> but it's still not fully featured anyway
<Afuna> I'm not sure wehhave aone. or a good one >_>
<dunvi> so i'm sort of ignoring that one :)
<Afuna> hmmm
<Afuna> hehehe
<Afuna> hmmm
<Afuna> *if* we're having the js thing, I'd suggest having the link alwaysh show on the non-js
<Afuna> and then having a uh. warning?? maybe at eth top of the page if they'r etrying to post to something not that doesn't haven makepoll
<dunvi> okay
<dunvi> i mean, we're still talking theoretical
* Afuna nod nods
<dunvi> because i'm still just trying to refactor to the original page
<dunvi> :P
<dunvi> imma gonna copy paste this into my issue tracker because useful.
<dunvi> or pastebin
<dunvi> should i pastebin?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment