Is there anyway to include (dinamically) an HTML page inside a MediaWiki page?
What I'd like to do is update a table with a cron bash script. I don't have an idea of how edit from a bash script a wiki page, but I can edit an html file on my web server and make mediawiki include it.
Is it there any other way of doing it?
Thanks, Andrea
Isn't it better idea to create an article (statical wiki page) with the table you need, find the apropriate record in the mysql database and modify this record from bash script?
Jakub
-----Original Message----- From: mediawiki-l-bounces@Wikimedia.org [mailto:mediawiki-l-bounces@Wikimedia.org]On Behalf Of Eagleone Sent: Friday, September 29, 2006 1:36 AM To: mediawiki-l@wikimedia.org Subject: [Mediawiki-l] Include HTML page
Is there anyway to include (dinamically) an HTML page inside a MediaWiki page?
What I'd like to do is update a table with a cron bash script. I don't have an idea of how edit from a bash script a wiki page, but I can edit an html file on my web server and make mediawiki include it.
Is it there any other way of doing it?
Thanks, Andrea _______________________________________________ MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
You can modify a Wiki article programmaticly with Perl and CMS::MediaWiki. The latest release of this module includes a getPage() function (which I contributed), and it has always had editPage().
my $lines = $wiki->getPage(title => '/foo'); foreach my $line (@$lines) { ...edit stuff here... } $wiki->editPage (title => '/foo', text => join("\n", @$lines) );
On www.novaroma.org I use it to do a random daily image on the main page. The data file (a table of image locations and captions) is a wiki page that any of our editors can modify as usual. It is fetched and parsed, with a random record selected, and from this the template that provides random images for the main page is parsed. Script is available on request.
Isn't it better idea to create an article (statical wiki page) with the table you need, find the apropriate record in the mysql database and modify this record from bash script?
Jakub
-----Original Message----- From: mediawiki-l-bounces@Wikimedia.org [mailto:mediawiki-l-bounces@Wikimedia.org]On Behalf Of Eagleone Sent: Friday, September 29, 2006 1:36 AM To: mediawiki-l@wikimedia.org Subject: [Mediawiki-l] Include HTML page
Is there anyway to include (dinamically) an HTML page inside a MediaWiki page?
What I'd like to do is update a table with a cron bash script. I don't have an idea of how edit from a bash script a wiki page, but I can edit an html file on my web server and make mediawiki include it.
Is it there any other way of doing it?
On 10/1/06, Šerých Jakub Serych@panska.cz wrote:
-----Original Message----- Subject: [Mediawiki-l] Include HTML page
Is there anyway to include (dinamically) an HTML page inside a MediaWiki page?
Isn't it better idea to create an article (statical wiki page) with the table you need, find the apropriate record in the mysql database and modify this record from bash script?
I thought about doing it that way, but I don't like too much some security issue doing it that way...
It seems incredible that there isn't a way for including some HTML code...
Eagleone schrieb:
On 10/1/06, Šerých Jakub Serych@panska.cz wrote:
...
Is there anyway to include (dinamically) an HTML page inside
...
It seems incredible that there isn't a way for including some HTML code...
there is an extension called abshtml
its a short extension. so i will post it here
HeinzJ
<?php # Example WikiMedia extension # with WikiMedia's extension mechanism it is possible to define # new tags of the form # <absHTML> some text </absHTML> # 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/absHTML.php"); $wgExtensionFunctions[] = "wfabsHTMLExtension";
function wfabsHTMLExtension() { global $wgParser; # register the extension with the WikiText parser # the first parameter is the name of the new tag. # In this case it defines the tag <absHTML> ... </absHTML> # the second parameter is the callback function for # processing the text between the tags $wgParser->setHook( "absHTML", "renderHTML" ); }
# The callback function for converting the input text to HTML output function renderHTML( $input ) { $output = $input; return $output; } ?
mediawiki-l@lists.wikimedia.org