Extension talk:Iframe
Add topic| This page used the Structured Discussions extension to give structured discussions. It has since been converted to wikitext, so the content and history here are only an approximation of what was actually displayed at the time these comments were made. |
when using template tag it doesn't allow any key except the default local
[edit]when using template tag it doesn't allow any key except the default local 173.246.232.42 (talk) 18:06, 19 July 2019 (UTC)
- For whatever reason the "key" wont pass on as an argument, either way added a line to read serverkey and works now. 173.246.232.42 (talk) 18:49, 19 July 2019 (UTC)
- Still seeing this with 0.09 (2021-06-27). To be clear, if you hoped to have
$wgIframe['server']['wikipedia'] = [ 'scheme' => 'https', 'domain' => 'en.wikipedia.org' ];<iframe path="wiki/London">key="wikipedia"</iframe>- you actually need to use the hack
$wgIframe['server']['local'] = [ 'scheme' => 'https', 'domain' => 'en.wikipedia.org' ];<iframe path="wiki/London">key="local"</iframe>- Because the #tag is not passing key as wikipedia, so it defaults to local
- Raised as https://github.com/sigbertklinke/Iframe/issues/6 Vicarage (talk) 21:27, 28 October 2021 (UTC)
- Thank you for this hack. Turns out a year later, this is still the only way to use it in templates. Derf Jagged (talk) 02:23, 8 December 2022 (UTC)
- You can also fudge it with
$wgIframe['server']['local'] = [ 'scheme' => 'https', 'domain' => ];<iframe key="local" level="www.website.com" path="index.html" frameborder="0" width="1000" height="1000" style="display:block;margin:0 auto;"" />Vicarage (talk) 09:04, 6 November 2023 (UTC)
Iframe not working properly
[edit]so i put iframe into a page but it says that it couldnt connect to that url, why does it happen? ErtasVideos (talk) 14:46, 30 October 2019 (UTC)
- more info: it tries to connect to localhost then ErtasVideos (talk) 22:34, 6 March 2020 (UTC)
Compatibility 1.36?
[edit]Could it be that this extension to 1.36 is not yet running? I always have the following error:
[852f9f9695fed09225281a09] /submit/Test Error: Cannot access private property Parser::$mOutput Backtrace: from /var/www/html/extensions/Iframe/Iframe_body.php(187) Josua Koenig (talk) 08:54, 7 June 2021 (UTC)
- Hi, yes, I'am working on it, soon comes version 0.09 ;) Sigbert (talk) 10:30, 27 June 2021 (UTC)
- Ok, it is on github, lets see if it works ;) Sigbert (talk) 12:21, 27 June 2021 (UTC)
- nice, now it works. Thanks very much. Josua Koenig (talk) 15:25, 28 June 2021 (UTC)
Content of Iframe is not refreshing
[edit]Hi, I have an iframe on a wiki page that loads the content of a html file. When I do a change to the html file, the content in the wiki page does not change, it seems to be stored somewhere. (If I use private navigation in my browser, I can see the updated content)
That would not be an issue if I could at least get the content of the page with a browser hard refresh, or with the Refresh mediawiki function, but none works.
Any idea?
I'm using MW 1.34 and Iframe 0.08 Varlin (talk) 09:25, 22 July 2021 (UTC)
Issue with MW 1.35
[edit]Using master on MW 1.35 with PHP 7.4 creates the following PHP warning:
Warning: array_key_exists() expects parameter 2 to be array, null given in /../w/extensions/Iframe/Iframe_body.php on line 138
[[kgh]] (talk) 08:05, 6 October 2021 (UTC)
- I see the same issue with MediaWiki 1.37.2 and PHP 7.4. HSRobinson (talk) 18:12, 22 March 2022 (UTC)
- I solved this by declaring `$wgIframe` as an array in `LocalSettings.php`:
- <code>
- $wgIframe = array();
- wfLoadExtension( 'Iframe' ); # for embedding web sites, e.g. LBC map
- $wgIframe['server']['google'] = [ 'scheme' => 'https', 'domain' => 'google.com' ];
- </code> 2.36.101.100 (talk) 21:28, 9 April 2022 (UTC)
- By the way, I'm using MW 1.37.1, PHP 8.0.16. 2.36.101.100 (talk) 22:04, 9 April 2022 (UTC)
Please could you include an option to suppress the "/" that gets included between the domain and the path?
[edit]Embed links from OneDrive personal accounts appear to be of the form:
h t t p s : / / o n e d r i v e . l i v e . c o m/embed?resid=ACCOUNTIDENTIFIER!FILEIDENTIFIER&authkey=!ACCESSKEY
We can almost use your tool to allow embedding from OneDrive personal accounts (in a way that restricts it to specific accounts) by setting 'scheme' to h t t p s, 'domain' to o n e d r i v e . l i v e . c o m/embed?resid=ACCOUNTIDENTIFIER!, such that users can embed things from trusted accounts via the relevant key and setting 'path' to FILEIDENTIFIER&authkey=!ACCESSKEY.
The only problem is that the extension always automatically includes a "/" between the domain and the path.
I am an amateur when it comes to PHP and do not know how to use GIT, but to illustrate it looks like a possible solution is to allow another attribute along the lines of SuppressSlashAfterDomain which defaults to False, and change line 221 of Iframe_body.php from:
$url = $wgIframe['server'][$key]['scheme'] . '://' . $phost . $wgIframe['server'][$key]['domain'] . '/';
to something like:
$url = $wgIframe['server'][$key]['scheme'] . '://' . $phost . $wgIframe['server'][$key]['domain'];
if (SuppressSlashAfterDomain==False) $url = $url . '/';
BTW please ignore the spaces - it wasn't letting me post when writing normally. 79.68.147.222 (talk) 13:35, 21 December 2021 (UTC)
- An alternative to suppressing the "/" would be to have an optional attribute "accountidentifier" that defaults to an empty string and goes in after the domain and the "/". 79.68.147.222 (talk) 01:55, 27 December 2021 (UTC)
What am I doing wrong?
[edit]I am sorry for asking this standard question but the documentation didn't help me getting a working implementation.
I have installed the Iframe extension successfully and added this server parameter to my LocalSettings.php file:
$wgIframe['server']['arte'] = [ 'scheme' => 'https', 'domain' => 'arte.tv' ];
Then I have added an iframe tag to my test page. It reads:
<iframe key="arte" level="www" path="player/v7/index.php?json_url=https%3A%2F%2Fapi.arte.tv%2Fapi%2Fplayer%2Fv2%2Fconfig%2Fde%2F089058-000-A&lang=de&autoplay=false&mute=0&previewData=%7B%22title%22%3A%22Jungenbeschneidung%22%2C%22subtitle%22%3A%22Mehr%20als%20nur%20ein%20kleiner%20Schnitt%22%2C%22image%22%3A%22https%3A%2F%2Fapi-cdn.arte.tv%2Fimg%2Fv2%2Fimage%2FddqytqyeNjsuL3b3Jjt7N3%2F940x530%22%7D" style="transition-duration:0;transition-property:no;margin:0 auto;position:relative;display:block;background-color:#000000;" frameborder="0" scrolling="no" width="100%" height="100%" allowfullscreen="true" />
I don't know if this is the right way to use this. Ulf Dunkel (talk) 11:50, 24 July 2022 (UTC)
How to embed URL containing question mark?
[edit]I want to embed an iframe from a google spreadsheet and use a URL like:
spreadsheets/d/e/2PACX-1vT4DSvwql4uZqNKGRnbIUCLgWjDyAS1mGsyHQ4mJ-KsmyGrOuMnx54iJ/pubhtml?gid=1047995& (url is changed)
I do have defined key, scheme (https) and domain (google.com). It seems to work partly, because I do get a response from google, but telling me it can't find the page and showing the link without everything behind the question mark.
Should this work or is it expected behaviour that everything behind the "?" is ignored?
Thanks for your response, Jeroen375 (talk) 07:47, 23 August 2022 (UTC)