> From: "Jim Wilson" <wilson.jim.r(a)gmail.com>
>
>> If you only have "trusted" editors, the following is a raw HTML
>> extension, disguised as a QuickTime extension. But it is certainly
>> unsafe if you allow untrusted editors.
>
> A few comments about the proposed solution:
All good stuff, Jim! I just put it out there as the simplest way to
get some HTML in the page, for those who are more comfortable with
HTML that PHP. As I recall, the original requester said he did not
know PHP.
:::: Science uses mathematics to predict the future; economics uses
statistics to predict the past. -- Jeff Barton
:::: Jan Steinman <http://www.VeggieVanGogh.com>
> From: Ken McDonald <ken(a)pixologic.com>
>
> Copied from a display of the script in the terminal window, edited in
> jEdit, pasted back into vi. The script is on a remote system which
> doesn't have a decent editor installed (I don't know vi), so this
> is the
> quickest way for me to edit and to use a highlighting editor.
PHP gets unhappy if you don't have a final LF in the file.
:::: Giving society cheap, abundant energy at this point would be the
equivalent of giving an idiot child a machine gun. -- Paul Ehrlich ::::
:::: Jan Steinman <http://www.VeggieVanGogh.com> ::::
> From: "David Gerard" <dgerard(a)gmail.com>
>
> I know quite a few people whose personal website runs on MediaWiki
> just 'cos they can. They're the only editor and it's just a handy way
> of putting up nicely-formatted pages and resources without having to
> write HTML or work too hard.
If you only have "trusted" editors, the following is a raw HTML
extension, disguised as a QuickTime extension. But it is certainly
unsafe if you allow untrusted editors.
<?php
# QuickTime extension
# To use, include this file from your LocalSettings.php
# To configure, set members of $wgquicktimeSettings after the inclusion
class quicktimeSettings {
};
$wgquicktimeSettings = new quicktimeSettings;
$wgExtensionFunctions[] = 'wfQuickTimeExtension';
function wfQuickTimeExtension() {
global $wgParser;
$wgParser->setHook('QuickTime', 'renderQuickTime');
}
function renderQuickTime($quickTimeSrc, $style='') {
return $quickTimeSrc;
}
?>
:::: This phase we're in of exponential growth is about over. We now
have an exponential growth culture that at the present time doesn't
even know how to cope with a state of non-growth. -- M. King Hubbert,
1976 ::::
:::: Jan Steinman <http://www.EcoReality.org> ::::
I am looking for someone to skin MediaWiki to look like our sitewide
template as well as possibly create some custom mods. I have created the PSD
mockups as well as XHTML/CSS templates.
You can see our wiki at www.babypips.com/forexpedia.
Hello,
I admin a (media)wiki where only logged user can edit pages,
and anauthorized creation of accounts is forbidden.
I would like to lightly change this policy, setting up some pages
where everybody can edit.
so: everybody can see everything, but anonimous users can
edit just few pages.
How can I do?
regards,
Giovanni Gherdovich
Copying from the nice gflash extension, I came up with the following for
(hopefully) embedding quicktime movies;
------
<?php
# Example WikiMedia extension
# with WikiMedia's extension mechanism it is possible to define
# new tags of the form
# <TAGNAME> some text </TAGNAME>
# the function registered by the extension gets the text between the
# tags as input and can transform it into arbitrary HTML code.
# Note: The output is not interpreted as WikiText but directly
# included in the HTML output. So Wiki markup is not supported.
# To activate the extension, include it from your LocalSettings.php
# with: include("extensions/qtmov.php");
$wgExtensionFunctions[] = "wfQTMovExtension";
function wfQTMovExtension() {
global $wgParser;
# register the extension with the WikiText parser
# the first parameter is the name of the new tag.
# the second parameter is the callback function for processing the text
between the tags
$wgParser->setHook( "qtmov", "renderQTMov" );
}
# The callback function for converting the input text to HTML output
function renderQTMov( $input ) {
$exploin = explode(" ",$input);
$output = "<embed width='" . $exploin[0] . "' height='" . $exploin[1] .
"' align='middle' src='" . $exploin[2] . "' quality='high'>";
return $output;
}
?>
-------------
Unfortunately, I seem to have introduced an error somewhere; I get the
following errors showing up on the web page when I attempt to 'include'
the extension;
Warning: Cannot modify header information - headers already sent by
(output started at /home/www/data/beta_wiki/extensions/qtmov.php:34)
in /home/www/data/beta_wiki/includes/OutputPage.php on line 575
Warning: Cannot modify header information - headers already sent by
(output started at /home/www/data/beta_wiki/extensions/qtmov.php:34) in
/home/www/data/beta_wiki/includes/OutputPage.php on line 576
gflash, however, is installed and working fine. The only place I made a
significant change to the script is in the construction of the output
string, and from what I can infer from the original gflash script, what
I did should at the least be valid PHP, even if it doesn't produce the
output I'm trying for.
Anyone see a quick fix?
Thanks,
Ken
> From: Ken McDonald <ken(a)pixologic.com>
>
> For those of use who don't mind using proprietary formats, is there
> any
> reason not to simply use an <embed> tag inside MW markup?
Last I checked, it would have to be enabled somehow, as it doesn't
work right out of the box.
If enabled, it may be a security risk, as a malicious writer could
embed all manner of nasty stuff.
:::: Nothing will replace what we are burning up quickly now. Every
possible replacement has problems which have received little
publicity. -- Dr. Kenneth Watt ::::
:::: Jan Steinman http://www.VeggieVanGogh.com ::::
It would seem that modifying the list of known tags in Sanitizer.php to
include 'embed' would enable this functionality for .mov files. Any
danger in this? Do the versions of Sanitizer in /includes and /tests
need to be identical? Should they be?
Thanks,
Ken