Buildfire: How can I get the iframe source ID or name? - buildfire

How can I identify the iframe source ID or name? Having issues with plugin working on Apple devices and one proposed fix was to tag the iframe source ID in the code.

You can get it from querystring parameter fid in window.location.href. I would not rely too much on it since it is not documented and hence might change.

Related

Grav - Parse URL

I want to define a new template called "product".
This template calls an external service and retrieves the information about that specific product. That is easily done with a custom plugin that access the product information. Information on how to do that has been found here.
However, I would like that the URL of the page would be something like:
/product/<id>/<seo-friendly-description>
So I can retrieve in the Twig template both <id> and <seo-friendly-description> which will be used later to retrieve the specific product information.
I have tried to find something that could help in the documentation, without success. Could someone either point me to the right doc section or highlight the basic steps that shall be achieved so I can start solving this issue?
Just in case it helps, I am trying to find something similar to how bottle or other web frameworks work:
#route('/hello/<name>')
def greet(name):
return 'Hello ' + name
I've been building a family recipebook into my own website and I've been working through a similar problem. I haven't quite worked out all the kinks, but my solution is mostly working if you want to checkout my github repo.
In short, you need the plugin to watch what the active route is. If the route matches, you then create the page and populate it using your plugin data.
I haven't quite figured out how to get the active page to highlight in the navigation menu for generated pages, but you might still find this solution helpful.

Stripe : customize form

after some research, I have not found how to customize the Stripe V3 payment form.
I would like to be able to write each field of the form myself. I think that because of this, the javascript code must be different, but I have not found an example.
Has anyone ever done that? If so, can you show me the html and javascript code?
Thanks in advance.
With Elements (Stripe.js v3), each input field is created by Stripe.js and runs in its own iframe.
If you want to create the fields yourself, you can still use Stripe.js v2 but note that you would no longer be eligible for PCI SAQ-A and would instead need to file under SAQ-A EP which is more complex.
You can find more information about PCI compliance here.

How do I create a reusable mailto link in ModX?

I want to create a link to an email address like somebody.
I tried to use a weblink resource (which gets an id of 20) with mailto:person1#provider.nl as link value and render this in my content with the tag [[~20?~]]. (and different variations of it)
But ModX renders it as somebody This is not what I want.
So how do I do this properly, so that I can reuse this resource in several places in the website?
This link needs to be editable for a 'Content editor' with reduced rights, so I don't think a chunk is the best way to go.
Because to do this you need to create weblink:
and this is works as expected in Wayfinder/PdoMenu:
UPDATE:
[[~20]] - will output alias field. You need to output content field. To do this use pdoField snippet (part of pdoTools):
[[pdoField?&id=`20`&field=`content`]]

Instagram API returns wrong results for tag media

I've noticed something weird and I was thinking that maybe I'm missing something. I noticed that if you use the tag/tagname/media/recent endpoint a lot of the result show they contain the given tag. However if you actually open the url and you see that they either lack that tag or the photo doesn't have any tags at all. Then when doublechecking by querying by specific media id the results are the same. Any idea why this is happening?
The endpoint returns media where the tag is also in any of the comments. The tag you were searching for might be assigned in any of the comments for that media. I don't believe that all comments are returned for each image in this endpoint, so it might be assigned to a comment that you don't see in your results.

Google docs viewer url parameters

Is there any sort of documentation on exactly what parameters you can put in the url of Google viewer?
Originally, I thought it was just url,embedded,chrome, but I've recently come accross other funny ones like a,pagenumber, and a few others for authentication etc.
Any clues?
One I know is "chrome"
If you've got https://docs.google.com/viewer?........;chrome=true
then you see a fairly heavy UI version of that doc, however with "chrome=false" you get a compact version.
But indeed, I'd like a complete list myself!
I know this question is very old and perhaps you already solved your issue, but for anyone on the internet who might be looking for an answer...
I have been looking for this recently, following a guide I found on GitHub Gist
https://gist.github.com/tzmartin/1cf85dc3d975f94cfddc04bc0dd399be
More specifically, the option to embed a certain page of pdf using
<iframe src="https://docs.google.com/viewer?srcid=[put your file id here]&pid=explorer&efh=false&a=v&chrome=false&embedded=true" width="580px" height="480px"></iframe>
The best I could fing was this article (I suppose from a long time now)
https://weekly-geekly.github.io/articles/111647/index.html
HOWEVER, I tried modifying the attributes and the result was simply a redirect to
https://drive.google.com/file/d/[ID]/edit
https://drive.google.com/file/d/[ID]/preview or
https://drive.google.com/file/d/[ID]/view
AS OF MAY 2020, THIS SOLUTION PROBABLY DOESN'T WORK
I'm also on a quest to discover some of the parameters of the viewer.
the "chrome" parameter doesn't seem to do anything, though. Is this
supposed to be the same as embedded=true?
Parameters I know of:
url= (obviously)
embedded= (obviously)
hl= set language of UI (tooltips)
#:0.page.1 = jump to page 2 (page 1 is numbered 0) - this is unreliable and often requires a refresh after the first load,
defeating the purpose.
That said, when I use the Google Docs viewer on my site, "fit page to
screen" is the default view without any parameters. So maybe I'm
misunderstanding your question.
Source: For convenience, this is a full quote of the sole answer (it is from user k3david) to the crosspost of this question #Doc has posted to the Google support forum in 2011.
You can pass q=whatever to pass a search query to the viewer.

Resources