| Off Topic > Off Topic |
| [FORUM PLUGIN REQUEST] — Embedding Google Sheets, Docs, Presentations, Drawings |
| << < (3/3) |
| Foxscotch:
I'd like to make a userscript for this, it'd be neat. but there are issues first of all, the youtube embedder just gives youtube links the option to embed the video. to everyone without the userscript, it looks like business as usual. what you're suggesting wouldn't work out that way however, it would be relatively trivial to simply embed a spreadsheet or a document or a presentation when it's linked as far as showing only certain cells goes, I dunno about that. it's definitely possible to get the values from individual cells or ranges with the sheets API, but it's not practical. there's gotta be an API key and all that stuff, which means either forcing all users to get their own API key from google (an inconvenience) because I definitely don't wanna stick an API key of my own in there, or it means having an intermediate server to hide my API key from the users (another inconvenience, and something I'm unwilling to put up with) |
| SWAT One:
If a spreadsheet were embedded as normal, would it work fine, then? Also mainly for things like this. See some things under the "Guides" section of the OP. https://forum.blockland.us/index.php?topic=307341.0 And, so what you're saying is that there would need to be a server carrying an API key for each embedded object (or each source spreadsheet)? Just trying to clarify. One thing that you can do on google sheets is IMPORTANGE, which has the specified fields for a spreadsheet key as well as the sheet and range. Would such a plugin be able to read custom tags in a post and interpret it as such? Would an API key still need to be required if it just operated with an IMPORTRANGE kind of function? Also I am aware that those without the plugin would not see the results of the embedding, but that's when you A) hope that the extension is disseminated, and B) as the poster, post the link with the embedded element so users can see it. Also, how difficult is it to retain the format of the sheet? |
| Foxscotch:
--- Quote from: SWAT One on February 06, 2017, 02:03:17 AM ---If a spreadsheet were embedded as normal, would it work fine, then? --- End quote --- to give the user the option to embed spreadsheets that are otherwise just links, yes, no problem --- Quote from: SWAT One on February 06, 2017, 02:03:17 AM ---And, so what you're saying is that there would need to be a server carrying an API key for each embedded object (or each source spreadsheet)? Just trying to clarify. Would an API key still need to be required if it just operated with an IMPORTRANGE kind of function? --- End quote --- to use the API, you must have an API key. you only need one, though. the purpose is just to uniquely identify you as a user of the API. either every user of the script could obtain their own key and paste it into the script, or the creator of the script could have their own webserver running its own API that doesn't require a key from clients, which has its own google API key. you don't want to make your API key public, because then anyone could do anything with it and as far as google's concerned you're responsible --- Quote from: SWAT One on February 06, 2017, 02:03:17 AM ---Also I am aware that those without the plugin would not see the results of the embedding, but that's when you A) hope that the extension is disseminated, and B) as the poster, post the link with the embedded element so users can see it. --- End quote --- maybe someone else doesn't care, but I'm not gonna make a userscript that inconveniences people without it or looks like gibberish to them. nobody should have to use a userscript to be able to make sense of a forum post. maybe they're on their phone or they like a browser that doesn't have a userscript extension, I dunno no matter how popular the userscript is, the majority will always be those without it --- Quote from: SWAT One on February 06, 2017, 02:03:17 AM ---Also, how difficult is it to retain the format of the sheet? --- End quote --- it should look exactly the same embedded as it does on the google docs website anyway, I think there's a better solution than pseudo-BBC. just have the normal docs links, with the option to embed them like the youtube script. the spreadsheet key is obviously already in the link, so that's out of the way. for the other stuff, like custom height or width, or maybe ranges, you could have extra URL parameters, which the docs website would ignore so the links still behave normally for people without the script so like... https://drive.google.com/open?id=1EQmyG_-GoDZKGe3-DarNFMuU4lhgjaNn7_PUiJJW04A&h=500&w=750 for a height of 500 and width of 750 (pixels? I guess?). maybe one that disables embedding too if you specifically wanted to avoid that I dunno. this is quickly getting out of hand |
| Navigation |
| Message Index |
| Previous page |