Extension talk:Include
Contents
Thread title | Replies | Last modified |
---|---|---|
Mediawiki magic words inside src-parameter | 1 | 16:05, 24 May 2013 |
scrolling=no? | 1 | 18:16, 2 April 2013 |
Tranlate WikiSyntax | 0 | 12:22, 5 March 2012 |
Installtion instructions | 0 | 11:08, 11 December 2011 |
It does not work: Warning: Parameter 3 to render_include() expected to be a reference [solved] | 1 | 11:00, 11 December 2011 |
Local file timestamp? | 1 | 10:59, 11 December 2011 |
Included file doesnt update (solution: new keyword 'nocache') | 2 | 10:58, 11 December 2011 |
Maintainer change | 0 | 10:56, 11 December 2011 |
Why is this extension needed? | 0 | 11:02, 11 December 2011 |
Is it possible to use Mediawiki magic words like PAGENAME inside the src-parameter? We are having a problem that the magic words aren't processed before the include is processed, which means that our php-page gets parameter PAGENAME instead of the true page name.
Is there a way to set scrolling="no" instead of the default "yes"?
I just merged a patch doing this.
Hello,
I install the extension, to upload a generate txt file into wiki. The txt file contains a wiki table. When I look at the page I see the source code of the table in a dotted rectangle. I want the table. Is there anywhere a space or something, which contains the content of the txt file?
Edit: Okay, read the instructions. Problem solved.
Currently the instructions demonstrate to install it in the root of the extensions folder, This goes against the de-facto standard for extensions to create a new folder in the extensions folder self-named after the extension to house their file(s).
This should be fixed in both the WikiPage as well as the extension file, I would have done this but I'm a bit busy and can't be bothered to setup git and all that atm to do the pull/pushes/merge requests atm.
It does not work: Warning: Parameter 3 to render_include() expected to be a reference [solved]
If your browser log file shows
[error] PHP Warning: Parameter 3 to render_include() expected to be a reference, value given in .../includes/parser/Parser.php on line 3333
you need to apply the
patch for PHP 5.3.x[edit | edit source]
--- secure-include.php.orig 2011-05-22 04:54:45.000000000 +0200 +++ secure-include.php 2011-05-22 04:53:16.000000000 +0200 @@ -669,7 +669,7 @@ * @access public * @return string */ -function ef_include_render ( $input , $argv, &$parser ) +function ef_include_render ( $input , $argv, $parser ) { global $highlighter_package; global $wg_include_allowed_features;
- tested for MediaWiki trunk 1.19alpha (r88557) and PHP 5.3.6
Applied, thanks.
Is it possible to include a local file timestamp? To keep track when the file was last modified
done in version 0.10-beta ; a "nocache" option will also become available.
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?
This is a limitation of MediaWiki. Note that external content is only refreshed when you save the wiki page that contains the <include/>. 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 w:en:Wikipedia:Bypass_your_cache#Server_cache . You can add the following to a wiki page to make it easier to clear the cache //www.mediawiki.org/w/index.php?title=Thread:Extension_talk:Include/Included_file_doesnt_update_(solution:_new_keyword_%27nocache%27)/reply&action=purge
At the very end of the module, you could add these lines, which disables page caching when it finds "nocache" keyword as in <include ... nocache />. This will disable the cache for pages that use the include tag.
function ef_include_render( $input, $argv, $parser ) { ... # http://www.mediawiki.org/wiki/Extensions_FAQ#How_do_I_disable_caching_for_pages_using_my_extension.3F if ( !empty( $argv['nocache'] ) ) { $parser->disableCache(); } return $output; }
Such an option will be part of a new version of the extension. Another possibility is to install MagicNoCache and to add the magic word to your page, or to install one of the alternatives mentioned on bottom of that page.
The previous version of include.php contained a very severe security hole, allowing the inclusion of local files (like /etc/passwd & friends) even in the most paranoid configuration.
I've notified Noah (7 emails sent since july 2010, with different subjects and from different adresses, tried to use the online notification available at http://www.noah.org/cgi-bin/email but it's broken, left a security warning on the home page with a link to my webpage), but I got just one answer asking me to resend my code, which I did, several times. I hate doing this, but I'm hijacking this page to point to my version, to avoid leaving users of this extensions vulnerable to the security hole.
Noah, if you read this and whish to step back in as a maintainer, I'd be glad to let you do so.
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:
- edit a wiki inside of a wiki, or
- add external forum comments inside a page of your wiki.
- browse youtube on a page of your wiki.
- This extension allows one to seamlessly integrate a piece of text or HTML within a page in addition to using iframes. I use it to include pieces of code, and the extension also does the syntax highlighting for me, it's basically great. Iframes are great too, but they do different things.