The script still includes the path "SyntaxHighlight_GeSHi/geshi/geshi.php".
In the current version of the SyntaxHighlight_GeSHi extension this path does not exist.
Is there a Chance that the script will be adapted to the new Extension?
Archives |
The script still includes the path "SyntaxHighlight_GeSHi/geshi/geshi.php".
In the current version of the SyntaxHighlight_GeSHi extension this path does not exist.
Is there a Chance that the script will be adapted to the new Extension?
You can either create a pull request to the GitLab repository, or use a workaround: if you set the $wg_include_geshi_install_path
variable in LocalSettings.php to the right path (before including the extension), the script will load that instead of the old GeSHi version. However, this extension haven't been updated for more than three years, so it's probably deprecated at many other points, too.
should be fixed with the Extension:SecureInclude update.
The extension can be used within templates by using the #tag:include function
I would like to make a template that uses the include link. Something like
(Template:IncludeMyFile)
<include src="http://example.com/{{{1}}}">
However, the plugin parses the include statement prior to transclusion/substitution, so the argument never gets inserted and I get an error due to "http://example.com/{{{1}}}" not being found.
Is there a trick to delay evaluation of the include until after transclusion?
You can use {{#tag:include||src=http://example.com/{{{1}}} }}
(note the double pipe—the first parameter of this form must be the content of the tag which is empty for <include>).
On page https://factinfiction.meulie.net/Vixen_03 I have the following code:
<include noesc nopre src="https://en.wikipedia.org/w/index.php?title=Vixen_03&printable=yes" />
This should include https://en.wikipedia.org/w/index.php?title=Vixen_03&printable=yes, but it looks like it includes https://en.wikipedia.org/w/index.php?title=Vixen_03 instead.
What am I doing wrong?
Please forgive me if I am incorrect. I am a newbie at programming.
As I added to the see also section:
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:
This post was posted by Peachey88 (Flood), but signed as Adamtheclown.
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
--- 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;
This post was posted by Peachey88 (Flood), but signed as Wikinaut.
Applied, thanks.
This post was posted by Peachey88 (Flood), but signed as 82.246.190.158.
Is it possible to include a local file timestamp? To keep track when the file was last modified
This post was posted by Peachey88 (Flood), but signed as 88.115.199.237.
done in version 0.10-beta ; a "nocache" option will also become available.
This post was posted by Peachey88 (Flood), but signed as Wikinaut.
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 post was posted by Peachey88 (Flood), but signed as 88.115.199.237.
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=Topic:Qbxx7rlqob6nul7m&action=purge
This post was posted by Peachey88 (Flood), but signed as Noahspurrier.
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.
This post was posted by Peachey88 (Flood), but signed as Wikinaut.
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.
This post was posted by Peachey88 (Flood), but signed as MatthieuMoy.
I'm trying to get Include to work with MarkdownExtraGeshiSyntax so that I can include a markdown file, parse it, and display the formatted version in a Mediawiki article.
Unfortunately, the two extensions don't seem to work together. If I activate them both at the same time, it breaks the Wiki (i.e., pages render blank).
Any idea what the problem could be? The only commonality between the two extensions seems to be that they both set up Geshi-based highlighting.
I'd try a different markdown extension, but this one is the only one that is a) still supported and b) tag-based, so I don't have to switch parsers for the page or the whole site.
Any help would be appreciated.
Note: I also asked on the talk page for MarkdownExtraGeshiSyntax
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.
Yes, I was able to get magicwords to work. For example: <include src="//www.mediawiki.org/w/search/{{#replace:{{#replace:Qtiko7f5vhwhmad4|.pdf|.txt}}||%20}}"/>