Note: I cross-posted this to several lists, because I think this is of
interest to many; please reply on wikitech-l only.
A long, long time ago, I started writing a PHP script to convert
MediaWiki markup into XML. I believe it is now feature-complete and
relatively reliable. Not only can it process a single wiki text, but a
list of articles, taking the text from any MediaWiki-based site online.
It uses the same method to replace templates.
The generated XML can now be converted into other formats. For
demonstration [1], I offer "plain text" and DocBook XML.
What I cannot demonstrate (due to limitations of my hosting service) is
the subsequence conversion to HTML or PDF from the DocBook XML. However,
it is quite easy to set up an automatic conversion locally if you have
the necessary DocBook files installed.
As an example, I have generated a PDF [2] by
1. Entering the titles of the articles I want to have
2. Chosing "DocBook PDF" as output format
3. Clicking "Convert"
4. Waiting for the PDF to open
Really, that easy! :-)
I am well aware of some shortcomings of the example PDF, however, most
of them (no left margin, gigantic tables, misshaped images) are flaws of
DocBook, or of the default stylesheets I use. I'm not really familiar
with DocBook and hope for help by people that are.
While the converter seems to work pretty well, I'm sure there are lots
of fun bugs to find. If you do find a page that breaks, please mail me
the title so I can find the bug, or even better, fix it yourself! The
code is in CVS, "wiki2xml" module, "php" directory (ignore the old C
code in the main directory;-)
A word about speed: Yes, the process of creating a PDF takes some time.
However, most of it is DocBook at work, and of course the loading times
for articles and templates. Converting the example from wiki markup to
XML to DocBook XML to PDF takes 2 minutes 20 seconds total, but the
actual conversion wiki-to-XML is done in just 8 seconds.
Apart from bug fixing, my next priority is ODT (OpenOffice) format
output. Also, I would like to extend Special:Export in MediaWiki so it
can return a list of authors, which can then be added automagically to
all converted files.
Awaiting your feedback,
Magnus
[1] http://magnusmanske.de/wiki2xml/w2x.php
[2] http://magnusmanske.de/wiki2xml/Biology_topics.pdf (3.7 MB!)
Sorry if this is the wrong place for this – if so, please direct me to a
more appropriate list/site.
My MediaWiki software (version 1.3.0beta2) has been buzzing along fine for a
long time, but then suddenly a few days ago all pages started displaying
this error:
//QUOTE
Warning:
_loadcachedcode(/tmp/tpl_0_7_0_1ea1690d778636860620e7d464dd8938.php): failed
to open stream: Permission denied in
/home/allalias/public_html/guide/PHPTAL-NP-0.7.0/libs/PHPTAL/Template.php on
line 430
Warning: _loadcachedcode(): Failed opening
'/tmp/tpl_0_7_0_1ea1690d778636860620e7d464dd8938.php' for inclusion
(include_path='/home/allalias/public_html/guide/includes:/home/allalias/public_html/guide/languages:.:/usr/lib/php:/usr/local/lib/php')
in /home/allalias/public_html/guide/PHPTAL-NP-0.7.0/libs/PHPTAL/Template.php
on line 430
[pear_error: message="Template function
'tpl_0_7_0_1ea1690d778636860620e7d464dd8938' not found (template source :
/home/allalias/public_html/guide/templates/xhtml_slim.pt" code=0 mode=return
level=notice prefix="" info=""]
//ENDQUOTE
I looked at the section it seems to be referring to,
/PHPTAL-NP-0.7.0/libs/PHPTAL/Template.php
lines 428-432:
//QUOTE
function _loadCachedCode()
{
include_once($this->_codeFile);
$this->_code = "#loaded";
}
//ENDQUOTE
Any ideas on what might be going wrong, how I can fix it, or where I should
look to solve this problem?
Thanks in advance for any help,
Charlie Sellew
charlie.sellew(a)gmail.com
What would be the SQL query that will call the first 5 new articles under
category called "Movie"?
Can anyone help on this?
--- Young
--
Young J. Kim
goguryo2000(a)gmail.com
Hi,
I'm having a small permissions problem.
My Wiki contain private information so I want to control who can see it.
I added the following line to my LocalSettings.php.
$wgGroupPermissions['*' ]['createaccount'] = false;
$wgGroupPermissions['*' ]['read'] = true;
$wgGroupPermissions['*' ]['edit'] = false;
The first line allow me to create accounts as needed.
If I change the read permission to false, you can't read the site unless
you're logged in. This is what I want. The problem is that you can't
even see the login page!
Is there any way to make the login page the only viewable page while not
logged in?
Thanks!
Simon
Many thanks!
I will try that.
Simon
-----Original Message-----
From: mediawiki-l-bounces(a)Wikimedia.org
[mailto:mediawiki-l-bounces@Wikimedia.org] On Behalf Of Rob Church
Sent: 21 mars, 2006 15:45
To: MediaWiki announcements and site admin list
Subject: Re: [Mediawiki-l] Blocking people from viewing the Wiki
unlessregistered
$wgWhiteListRead = array( "Special:Userlogin" );
Rob Church
On 21/03/06, Simon Renshaw <simon(a)castortech.com> wrote:
> Hi,
>
> I'm having a small permissions problem.
>
> My Wiki contain private information so I want to control who can see it.
>
> I added the following line to my LocalSettings.php.
>
> $wgGroupPermissions['*' ]['createaccount'] = false;
> $wgGroupPermissions['*' ]['read'] = true;
> $wgGroupPermissions['*' ]['edit'] = false;
>
> The first line allow me to create accounts as needed.
>
> If I change the read permission to false, you can't read the site unless
> you're logged in. This is what I want. The problem is that you can't
> even see the login page!
>
> Is there any way to make the login page the only viewable page while not
> logged in?
>
> Thanks!
>
> Simon
> _______________________________________________
> MediaWiki-l mailing list
> MediaWiki-l(a)Wikimedia.org
> http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
>
_______________________________________________
MediaWiki-l mailing list
MediaWiki-l(a)Wikimedia.org
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Hello!
Some users of my wiki asked me if there possible to view Category:<something> page with more details? For example, I wish:
A
Alpha - This is first char in the alphabet. It is ....
Anekdot - Short story about ....
B
Beta - dfdsfsafedfsdfdsafadfdfdgfdg ...
G
Gamma - ksdjfkjfkdkvjdfj ...
It's because I want to see first of 150 (or customizable value) chars of every categorized page.
Is there any extension or setting for it?
Thank you in advance,
--
Cybernetic Humanoid Used for Mathematics and Potential Assassination
chumpa(a)yandex.ru icq 122393064
Hi,
N00bie, so please bear with me. I need to understand how to edit the
footer - the bit that contains the "about <sitename>, disclaimer, etc...
I've searched high and low on may sites with no luck. Can anyone help?
Bob Farrell
I want to display a list of pages in one page, and adjacent to the page
links, I want to show the last-changed-date of each of the pages (and
potentially the page's author, but this author reference is not as important).
Can this be done? Maybe something like:
[[User:MattEngland|last-changed-timestamp]]
...could produce this time-stamp "meta" reference?
Background:
I am a manager, mostly for a software-development-based project, and I have
found it very convenient for my reports to keep their own status wiki page
tracking their progress, and also have project collection pages tracking
group progresses (we also use a lot of other collaboration tie-ins with
Subversion, blogs, Bugzilla, RequestTracker task tracking, forum-email
links, etc) to support this stuff.
One application of the above feature request would be for me to scan a list
of individual or project status to pages to see which ones have changed
recently or when then have changed at all.
-Matt
I'm starting with wiki and I would make a start page with a list of the most recent adds and changes (including the article title and the author), but I don't found more details about that.
Any help?
Thanks,
Max
---------------------------------
Yahoo! Acesso Grátis
Internet rápida e grátis. Instale o discador agora!
Hello.
After a week of searching I still haven't found the way to add the
RenameUser Extension to my Wiki.
Does anyone knows how to do it?
I have Media-Wiki 1.5.6
PHP 4.4.1
MySQL 4.0.25 Standard
Thanks!
Peleg.