Forum .LRN Q&A: iframes in Custom Portlets?

Collapse
Posted by Michael Feldstein on
Is it possible to pipe an external web site into a custom portlet using an iframe or something similar? And if so, is there some sort of admin toggle to enable/disable the use of such a tag, which might not be considered "safe" HTML?
Collapse
Posted by Tracy Adams on
I added this extention to the custom portlets for CoachVille.

If a special URL parameter (known only to the "certified" admins" was present, you could input a external URL and regsub. When you submit, it would fetch the URL, preform the regsub and update the custom portlet content with the match.

We (Roel) then wrote a script to look at all the external URLS in the system, fetch them, perform the regsub and update the content periodically.

Collapse
Posted by Michael Feldstein on
So, in summary, the answer seems to be (a) it is not possible to use iframes in a vanilla dotLRN installation but (b) the code exists to change that.
Collapse
Posted by Andrew Grumet on
Hi Michael,

Actually a plain old IFRAME works fine without extra code if you don't need scraping.

I'm not sure offhand about admin controls. There's a kernel setting for controlling the allowed tags, though the custom portlet code may override that setting.

Collapse
Posted by Tracy Adams on
iframe is something a little different that what I did (which was to actually fetch the URL, parse it, and store the content). iframe will actually grab the other URL in real time.

I've had trouble using the iframe tag with the current HTML widget. The widget code bashes the iframe tag. In absense of the HTML widget, the iframe tag is fine.

I'm not sure if Jeff's work on the new HTML widget changes that - it's likely though.

Collapse
6: what is regsub? (response to 1)
Posted by Bhavik Parikh on
Can you tell me in detail, what is regsub? Also, as I am tring to view webpage within webpage?

I have used iFrame to view webpage in our website. But according to any external webpage size, frame is not auto resizing. Will regsub solve the problem? please help me on this.

Thanks in advance...