IncludeUrl-Talk

Summary: Talk page for IncludeUrl.
Maintainer:
Users: +2 (View / Edit)

This space is for User-contributed commentary and notes. Please include your name and a date along with your comment.

Comments


Keep in mind that most things served up by a browser aren't designed to be included by other pages -- i.e., they have extra <html>, <head>, <title>, <body>, etc. tags in them that will probably not display correctly when embedded in another page. This recipe makes no attempt to remove the extra information.

Note that this isn't needed if you just want to include an external resource in a layout template -- you can just use <!--file:http://...--> for that. If using an http://... link doesn't work, try using an absolute directory link, such as /home/mysite/public/file.ext.


Is it possible to make a link that opens in the frame, or included url? If a link to an anchor at the bottom of the page could be made to work on framed content, that would make it really easy to reference matter in the framed page. I'm writing quizzes to build a quiz database for Wikipedia pages, and the questions are based upon the essays. If I could hyperlink a part of a question to an anchor in a framed topic page; wow, that would really make it easy for the quiz-taker. Please help.

IncludeUrl not working in IE / changed "object" to "iframe"

It doesn't work yet! s. Re: IncludeUrl not working with IE or Netscape?. Perhaps it's because of a object tag vulnerability in IE and/or a security fix, cause other object types are working in IE, e.g. SVG-objects or IE doesn't support the object types text/html.

For this reason and becaus in the IncludeUrl cookbook is hard coded type="text/html" - so you can't anyway use this markup for other things like html - I have replaced <object> with <iframe> and now it works in IE too:

Has somebody any reasons to do this not?

cg, 2006-08-01

Seems reasonable, but IFRAME is not supported any longer from XHTML 1.1. - I changed the hard-coded type="twext/html" to be optionally set within the markup in includeurl.phpΔ, for those who like to experiment with othe robject types. HansB August 02, 2006, at 03:41 AM

I changed includeurl.php so that it will now use the <iframe> tag if the option iframe=1 or iframe=true is specified in the markup. HansB August 03, 2006, at 03:58 AM

Broken in Pmwiki v2.2.1?

I just upgraded my site from v2.1.27, and now the width, height, & border attributes in (:includeurl:)don't seem to work any more. I'm using the skittlish skin, but also tried reverting to the default skin with no success.

dg, 2009-04-17


Mimick old IncludeUrl script [*http://foo.bar/bleh.html*]

    
Markup('includeurl', 'directives',
      "/\\(:includeurl\\s+(http:[^$UrlExcludeChars]*?)\\s*:\\)/e",
      "Keep(implode('',file(str_replace('&amp;','&','$1'))))");

Markup('[*','_begin',
      "/\\[\\*(http:[^$UrlExcludeChars]*?)\\*\\]/e",
      "Keep(implode('',file(str_replace('&amp;','&','$1'))))");


Patricia (France) => bad english

FR : Nécessite le fichier : extlinkedres.php à mettre dans 'cookbook' et extlinkedres.js à mettre dans Pub regoupés dans extlinkedres.zip

EN : need extlinkedres.php in cookbook and extlinkedres.js in Pub.There are in extlinkedres.zip

URL : http://www.pmwiki.org/wiki/Cookbook/LinkedResourceExtras

FR : Je fais mes premiers essais. Je complèterai ce commentaire ultérieurement.
EN : I try it. I put my comment in a few days.


Using IncludeUrl to embed files from a Subversion repository via TRAC

Here is how I, Christian Ridderström, have used this recipe to embed files from a Subversion repository via TRAC. Download the script as usual, then insert something like the following into your configuration file:

// Enable a restricted version of includeurl for embedding
// material from the repositor via TRAC
if(true) {
  include_once("$FarmD/cookbook/includeurl.php");
  DisableMarkup("includeurl");  // Arbitrary URIs may not be included 
  Markup('includesvn', 'directives',
         '/\\(:includesvn (.*?) (.*?)\\s*:\\)/ei',
         "IncludeSvn(\$pagename, PSS('$1'), PSS('$2'))");

  function IncludeSvn($pagename, $path, $opt) {
    $uri = "http://www.lyx.org/trac/browser/lyx-devel/trunk/"
	. $path . "?format=raw";
    return IncludeUrl($pagename, $uri, $opt);
  }
 }

You can then use the markup (:includeSvn somefile :) to embed a file from the repository.----


$EnableExternalResource doesn't work on a site like http://sa.ge.sts.free.fr/programme/jsxgraph/index.html

I'm trying to include the url above http://sa.ge.sts.free.fr/programme/jsxgraph/index.html which is on my own server.

  • If $EnableExternalResource = 1; with (:includeurl http://sa.ge.sts.free.fr/programme/jsxgraph/index.html :): It works

So i'd like to use the following relative path to increase the security

  • If $EnableExternalResource = 0; with (:includeurl /programme/jsxgraph/index.html :): It does not.

Is there a problem of path or syntax or other?

(For the moment this is the less worst way I found to embed these jsxgraphs. In fact, I would like to create a "safe" cookbook for this but I don't know how. If anybody knows how to include the header needed for this javascript? )

Jvamp January 25, 2016, at 01:27 AM 2016-01-21

Talk page for the IncludeUrl recipe (users).