Hi,
How can I make an Admin object in PHP? How can I pass admin ritghts to the
following function:
function execute( $par ) {
global $wgRequest;
global $wgOut;
global $wgUser;
global $wgParser;
global $wgScriptPath;
global $wgServer;
$page = isset( $par ) ? $par : $wgRequest->getText(
'page' );
$title = Title::newFromText( $page );
$article = new Article ($title);
$wgOut->setPrintable();
$wgOut->disable();
$parserOptions = ParserOptions::newFromUser( $wgUser
);
$parserOptions->setEditSection( false );
$parserOptions->setTidy(true);
$wgParser->mShowToc = false;
$parserOutput = $wgParser->parse(
$article->preSaveTransform( $article->getContent() ) ."\n\n",
$title, $parserOptions );
I tried to use my MW for giving PDF file to another software. I simply tried
to use PDFExport for it. The external software give the appropriate URL to
PdfExport.php and the PDF is ready.
If user rights is default there is no problem.
After I changed the user rights (see below), there is not any content in the
generated PDF file, except the navigation menu on the left-hand side of the
wiki's page.
User rights:
$wgGroupPermissions['*' ]['read'] = false;
$wgGroupPermissions['user' ]['read'] = true;
$wgWhitelistRead = array("Main Page", 'Special:PdfPrint',
'Special:Userlogin',);
How can I get the whole content of the page? Can I somehow change the USER
ID and pass admin rights (first of all reading right) in the PdfExport.php?
Any other solution?
Please write me soon.
Regards,
Gábor
Hi,
I've a little prob. I wanna replace a single div fom the index by
another one with some js functionality without changing the code.
What would be the best way to implement this?
Regards
Mic
Hi - Just wondering if anyone knows of an extension that can easily convert
msword documents to wiki and then vise versa from wiki, export it back to ms
word again? we have bunch of ms word documentation planning to put in the
wiki and it would be easier if theres a way to automate it?
-zham
Hey folks,
hope - somebody can help.
How do I get the filepath for a file in the namespace image in the code.
I already fetched the file-id and file-name, but I've no idea how to
generate the correct filepath from the database field "img_sha1".
Thanks a lot.
Alex
I'm dynamically creating a table with links to other wiki pages using an
extension. It would be useful for the links to be kept in pagelinks.
So I'm trying to write an extension that adds the dynamic links to the
pagelinks table. I have a pretty hard time following how I'm supposed
to use database.php so I think I probably screwed it up again.
Does this code look like it should work? Or is there a better way to
add extension created links to the pagelinks table?
function newLinks($list1, $list2) {
global $wgTitle;
$key = $wgTitle->getDBkey();
$allNewLinks = array_merge($list1, $list2);
$db=&wfGetDB( DB_MASTER );
foreach ( $allNewLinks as $newLink ) {
$db->insert( "pagelinks",
array('pl_from'=>'$key',
'pl_namespace'=>'0',
'pl_title'=>'$newLink',
)
);
}
}
Thanks!
-Courtney
Hi Guys,
Is there a way to display on the article itself the data from version
history? Im planning to have a document control bar on the page where i can
get the last change with "approve" comments and display it as part of the
document control bar?
eg.
Title = Title of the article
Reviewed by: = the last user from the revision history with the word
reviewed on the comments with timestamps of the change
approved by: = the last user from the revision history with the word
approved on the comments with timestamps of the change
zham
Hi,
How to set MW so that the links generated by Special:Categories are not with "action=edit" by default?
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Hi,
I'm really not sure to config the extension:
Step2:
Update the file paths (/var/data/sphinx/..., /var/log/sphinx/...) and
create folders as necessary
E:\xampp\htdocs\wiki\sphinx.con
the wiki lies in
E:\xampp\htdocs\wiki
sphinks lies in
E:\xampp\sphinxs
# this is path and index file name without extension
# you may need to change this path or create this folder
path = /xampp/data/sphinx/wiki_main
so I would asume the following
E:\xampp\htdocs\wiki
Is this wright
Thanks for some hints
& regards
Mic
Oooooops.............sorry, I got it in the reverse way..... sorry
Regards,
Jack
----------------------------------------------------------------
"People forget how fast you did a job - but they remember how well you
did it"
-----Original Message-----
From: mediawiki-l-bounces(a)lists.wikimedia.org
[mailto:mediawiki-l-bounces@lists.wikimedia.org] On Behalf Of Jack Eapen
C
Sent: Wednesday, October 24, 2007 5:40 PM
To: MediaWiki announcements and site admin list
Subject: Re: [Mediawiki-l] Cut&Paste from MW crash MS Word
One doubt-u said about copy/pasting from Word to MW. Are using any
WYSWYG editor in MW? Otherwise I guess formattign will be lost when u
copy/paste to MW. Are you aware of the fact that there's a macro
avaialbe for MS Word to convert word documents to wiki format, os that
in one click you can get the formatted document in your wiki. Also, in
OpenOffice, you can export the document to wiki format.
Regards,
Jack Eapen
----------------------------------------------------------------
"People forget how fast you did a job - but they remember how well you
did it"
-----Original Message-----
From: mediawiki-l-bounces(a)lists.wikimedia.org
[mailto:mediawiki-l-bounces@lists.wikimedia.org] On Behalf Of Emanuele
D'Arrigo
Sent: Wednesday, October 24, 2007 2:51 PM
To: MediaWiki announcements and site admin list
Subject: [Mediawiki-l] Cut&Paste from MW crash MS Word
Hi everybody,
has anybody noticed crashes of MS Word when cut&pasting from a MediaWiki
page (not the wikitext, the actual page display)?
I've observed this behavior here at work and short of recommending to
switch to OpenOffice (something that won't go down with the MS addicted
IT dpt), I'm not quite sure what else to say.
=?
Manu
_______________________________________________
MediaWiki-l mailing list
MediaWiki-l(a)lists.wikimedia.org
http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
This electronic mail (including any attachment thereto) may be
confidential and privileged and is intended only for the individual or
entity named above. Any unauthorized use, printing, copying, disclosure
or dissemination of this communication may be subject to legal
restriction or sanction. Accordingly, if you are not the intended
recipient, please notify the sender by replying to this email
immediately and delete this email (and any attachment thereto) from your
computer system...Thank You
_______________________________________________
MediaWiki-l mailing list
MediaWiki-l(a)lists.wikimedia.org
http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
This electronic mail (including any attachment thereto) may be confidential and privileged and is intended only for the individual or entity named above. Any unauthorized use, printing, copying, disclosure or dissemination of this communication may be subject to legal restriction or sanction. Accordingly, if you are not the intended recipient, please notify the sender by replying to this email immediately and delete this email (and any attachment thereto) from your computer system...Thank You