Extension talk:Iframe/Flow

About this board

when using template tag it doesn't allow any key except the default local

5
173.246.232.42 (talkcontribs)

when using template tag it doesn't allow any key except the default local

173.246.232.42 (talkcontribs)

For whatever reason the "key" wont pass on as an argument, either way added a line to read serverkey and works now.

Vicarage (talkcontribs)

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

Derf Jagged (talkcontribs)

Thank you for this hack. Turns out a year later, this is still the only way to use it in templates.

Vicarage (talkcontribs)

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;"" />
Reply to "when using template tag it doesn't allow any key except the default local"

How to embed URL containing question mark?

1
Jeroen375 (talkcontribs)

I want to embed an iframe from a google spreadsheet and use a URL like:

spreadsheets/d/e/2PACX-1vT4DSvwql4uZqNKGRnbIUCLgWjDyAS1mGsyHQ4mJ-KsmyGrOuMnx54iJ/pubhtml?gid=1047995&amp (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,

Reply to "How to embed URL containing question mark?"

What am I doing wrong?

1
Ulf Dunkel (talkcontribs)

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.

Reply to "What am I doing wrong?"
Kghbln (talkcontribs)

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
HSRobinson (talkcontribs)

I see the same issue with MediaWiki 1.37.2 and PHP 7.4.

2.36.101.100 (talkcontribs)

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 (talkcontribs)

By the way, I'm using MW 1.37.1, PHP 8.0.16.

Reply to "Issue with MW 1.35"

Please could you include an option to suppress the "/" that gets included between the domain and the path?

2
79.68.147.222 (talkcontribs)

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 (talkcontribs)

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 "/".

Reply to "Please could you include an option to suppress the "/" that gets included between the domain and the path?"

Content of Iframe is not refreshing

1
Varlin (talkcontribs)

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

Reply to "Content of Iframe is not refreshing"
Josua Koenig (talkcontribs)

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)
Sigbert (talkcontribs)

Hi, yes, I'am working on it, soon comes version 0.09 ;)

Sigbert (talkcontribs)

Ok, it is on github, lets see if it works ;)

Josua Koenig (talkcontribs)

nice, now it works. Thanks very much.

Reply to "Compatibility 1.36?"

Iframe not working properly

2
ErtasVideos (talkcontribs)

so i put iframe into a page but it says that it couldnt connect to that url, why does it happen?

ErtasVideos (talkcontribs)

more info: it tries to connect to localhost then

Reply to "Iframe not working properly"
There are no older topics
Return to "Iframe/Flow" page.