Extension talk:Include/LQT Archive 1

Highlighting
--Pndfam05 22:28, 13 June 2007 (UTC) I tried installing this extension without highlighting and had difficulties on lines 115 and 195. I eliminated the line 115 problem by commenting out line 155, since I didn't want highlighting. I gave up when things crashed at line 195 with the message that the file could not be located. Using Mediawiki v 1.10.0, PHP v5.2.1, MySql v5.0.37

This has been fixed in the latest version.


 * Has anybody tried to merge this with the highlighting provided by "SyntaxHighligh_GeSHi"? This is an excellent extension, which, no pun intended, I have extended myself to highglight other languages, and inhouse symbols (from inhouse library). --Cartoro 11:22, 7 September 2007 (UTC)


 * If someone wants to send me a patch, I'll merge it into my copy and update it here. Send to noah@noah.org and put "mediawiki" somewhere in the subject. Noahspurrier

Include other formats
Has any thought been given to adapting this extension to import and render a Microsoft Word document. I have very little experience with PHP but would imagine that an addition to the functionality to include other formats would be a neat idea. I may give it a little thought. Prevaljo 18:18, 16 August 2007 (UTC)


 * This could be possible if you don't mind converting the Word document to plain text. I could pass a word document through "antiword" and then output the results. You would have to have "antiword" installed. It's common on many Linux distro package repositories. You would loose any embedded graphics and fonts. Email me at noah@noah.org and put the word "mediawiki" somewhere in the subject. Noahspurrier

Include other wiki pages
I want to include parts of Wikipedia articles on my wiki. Can this extension be expanded to do this? If not, is there another extension that can do it? —Eep² 08:16, 20 August 2007 (UTC)


 * Did you try Extension:IncludeArticle? --Cartoro 11:22, 7 September 2007 (UTC)

Isn't there a huge security hole?
Shouldn't you be using escapeshellarg on the src parameter? Installing this and giving it a bad URL with "|| cat /etc/passwd" worked in a way that is very bad...

This has been fixed in the latest version.


 * Thanks. I feel like a dolt... Noahspurrier

Feature request: Add extraction of specified range of lines only
It would be great to get only specified context of file specified by start and count parameters or even grep search.


 * Maybe give some examples. This seems like it might be getting too tricky. I can't see that being used a lot, but maybe you have some examples to change my mind. Also show how you would like to see the arguments specified. Noahspurrier

Including wikixml
I made small changes for including wiktext from wikixml to a page, unfortunatly it does not work properly. It only works with noesc wikitext wikixml and then such things as, and  are displayed as wikitext, maybe someone an idea how to fix it. because without noesc there is nothing shown at all. Also with nopre. Thanks for helping. DaSch 77.182.140.239 21:14, 14 January 2008 (UTC)


 * Where are you getting you wikixml? It looks like you are trying to strip the xml tags from around the wikitext and then display the wikitext. Is that corrent? I need a little more context to understand what you want. Can you email me a sample of the wikixml that you are trying to include? Include the phrase "mediawiki" in your subject to get around any spam filters and send to noah@noah.org --Noahspurrier 22:31, 16 January 2008 (UTC)


 * I'm getting the wikixml from an WikiExport Page. --DaSch 77.182.136.226 15:25, 19 January 2008 (UTC)

Included file doesnt update.
When I include a local file, it only updates when I edit and save page. How can I get it to update by just reloading the page?

88.115.199.237 06:45, 18 January 2008 (UTC)


 * This is a limitation of MediaWiki. Note that external content is only refreshed when you save the wiki page that contains the . Changing the external file WILL NOT update the wiki page until the wiki page is edited and saved (not merely refreshed in the browser). You can also instruct the server to refresh the page by adding the refresh action. See http://en.wikipedia.org/wiki/Wikipedia:Bypass_your_cache#Server_cache
 * You can add the following to a wiki page to make it easier to clear the cache:
 * --Noahspurrier 23:28, 23 January 2008 (UTC)
 * Is there a different extension that will automatically refresh the external content?
 * --Ghee22 19:14, 8 December 2008 (UTC)
 * At the beginning render_include, add this: $parser->disableCache;
 * This will disable a cache only for pages that use the include extension.
 * Taken from FunnyMan3595 on #mediawiki
 * --Ghee22 23:53, 8 December 2008 (UTC)
 * --Ghee22 23:53, 8 December 2008 (UTC)

Local file timestamp?
Is it possible to inlude a local file timestamp? To keep track when the file was last modified.

88.115.199.237 10:45, 21 January 2008 (UTC)

Include content in my wiki from Wikipedia?
Hi there, I tried your extension with the goal of sucking in content from Wikipedia into my wiki. It sort of worked, but also dragged in extraneous page formatting instead of just the text. Can you please explain how do do what I'd like to accomplish? Thanks for writing the extension!

LocalSettings.php
Try using  with this installed. I tried it with my wiki installation (latest official MediaWiki release at time of writing). Great if you don't mind your passwords being revealed! I think there needs to be an option to limit the types of includes permitted - local ones are clearly not safe. 86.139.85.83 20:28, 7 March 2008 (UTC)
 * This has been addressed. I added global config parameters to LocalSettings.php that will limit access. The new version checks two lists -- one list gives allowed directories from which files may be included; the second list stores regular expressions that match files which are DISALLOWED. Obviously, this sort of script has security implications even with these restrictions. I'd be happy if people could point out any other weaknesses. --Noahspurrier 09:10, 6 May 2008 (UTC)

Templates
Useing an in a template doesn't replace variables. such as: |file=test.htm ... 

tries to load from test.com rather than test.htm


 * Is something going on in regard to this problem? We really need this feature..., 19 DEC 2008


 * Many thanks for this extension. I would love to generate Google Charts from data held in wiki pages. 26 JAN 2009
 * This works - 
 * This doesn't 

This is a limitation of MediaWiki itself, rather than a bug in the extension - the php code never sees the parameter values, they just don't get parsed. See http://en.wikipedia.org/wiki/Help:Template#When_parameters_do_not_expand for the official advisory. Unfortunately even the #tag trick doesn't work with this one either. I would dearly love to see a neat solution to this, as I also have need of it. Any bright sparks out there got clever ideas? Kenpem 00:36, 4 February 2009 (UTC)

I have the following (with a customized version of include.php, but see the idea) in a template:

Download link?
You must not be aware of how much of a PITA it is to get the source code to this extension onto a remote server. You seriously expect people to copy and paste the extension code? WTF?

There is a download link on the page: http://www.mediawiki.org/wiki/Extension:Include#Download_Source_Code Kenpem 00:39, 4 February 2009 (UTC)

problem with iframes?
Try following page content

 You see category and template and iframe.



You see only iframe, no template or category - any ideas?

solved - it has to be 

MediaWiki 1.13.5, PHP 5.2.8

Problem with 1.15
The option wikitext does not work in 1.15alpha, there is nothing given back. --DaSch 16:20, 28 March 2009 (UTC)
 * Another Problem is that UTF-8 is broken so the page includes is displayed in wrong Charset. --DaSch 20:10, 28 March 2009 (UTC)

Why is this extension needed?
Please forgive me if I am incorrect. I am a newbie at programming.

As I added to the see also section:


 * Extension:SecureHTML, Extension:Secure HTML, or Extension:Secured HTML. With Iframe html coding, these extensions allows a page to have dynamic external pages embedded in any wiki page.

If these extensions allow the editor to embed dynamic pages in a wiki, why use this extension which only allows an editor to add static (unchanging) text content?

With Iframe html, for example you can: Adamtheclown 17:08, 24 November 2010 (UTC)
 * 1) edit a wiki inside of a wiki, or
 * 2) add external forum comments inside a page of your wiki.
 * 3) browse youtube on a page of your wiki.