I just wrote an extension that mimics the PAGESINCAT Magic Word until I'm allowed to upgrade our MW version. I don't want the wiki to get hosed up when we finally upgrade. What is a good way to not load the extension if the wiki version is high enough? Right now I am using the inaccurate if (function_exists( 'wfLoadExtensionMessages' )) { return true; }
Courtney Christensen
Christensen, Courtney wrote:
I just wrote an extension that mimics the PAGESINCAT Magic Word until I'm allowed to upgrade our MW version. I don't want the wiki to get hosed up when we finally upgrade. What is a good way to not load the extension if the wiki version is high enough? Right now I am using the inaccurate if (function_exists( 'wfLoadExtensionMessages' )) { return true; }
Courtney Christensen
What about checking the global variable $wgVersion ?
-----Original Message----- From: mediawiki-l-bounces@lists.wikimedia.org [mailto:mediawiki-l-bounces@lists.wikimedia.org] On Behalf Of Platonides Sent: Thursday, July 10, 2008 6:19 PM To: mediawiki-l@lists.wikimedia.org Subject: Re: [Mediawiki-l] advice on telling wiki: Don't run extension if MWversion 1.13
Christensen, Courtney wrote:
What is a good way to not load the extension if the wiki version is high enough? Right now I am using
the
inaccurate if (function_exists( 'wfLoadExtensionMessages' )) { return true; }
P > What about checking the global variable $wgVersion ?
I tried that, but I couldn't get $wgVersion to be declared at the top of the file. I'm trying to do a check like the if (!defined(MEDIAWIKI)) at the top of the file so the extension isn't loaded at all if it isn't needed. I'm not sure why $wgVersion was giving me problems outside a function, but it was.
Christensen, Courtney wrote:
-----Original Message----- From: mediawiki-l-bounces-RusutVdil2icGmH+5r0DM0B+6BGkLq7r@public.gmane.org [mailto:mediawiki-l-bounces-RusutVdil2icGmH+5r0DM0B+6BGkLq7r@public.gmane.org] On Behalf Of Platonides Sent: Thursday, July 10, 2008 6:19 PM To: mediawiki-l-RusutVdil2icGmH+5r0DM0B+6BGkLq7r@public.gmane.org Subject: Re: [Mediawiki-l] advice on telling wiki: Don't run extension if MWversion 1.13
Christensen, Courtney wrote:
What is a good way to not load the extension if the wiki version is high enough? Right now I am using
the
inaccurate if (function_exists( 'wfLoadExtensionMessages' )) { return true; }
P > What about checking the global variable $wgVersion ?
I tried that, but I couldn't get $wgVersion to be declared at the top of the file. I'm trying to do a check like the if (!defined(MEDIAWIKI)) at the top of the file so the extension isn't loaded at all if it isn't needed. I'm not sure why $wgVersion was giving me problems outside a function, but it was.
What's wrong with using an ExtensionFunction, that's what they are meant for?
$wgExtensionFunctions[] = 'efPAGESINCAT'; function efPAGESINCAT() { if( in_array(pagesincategory, MagicWord::$mVariableIDs) ) return; ...code here... }
I am using the hook AlternateEdit to provide an edit screen for uploading images. I provide some drop-down lists for the user to put in a description area of the image. I am using: $docLinkArticle = Revision::newFromTitle($m_pageObj->mTitle); $docLinkText = $docLinkArticle->getText(); to get the text. This works fine.
How do I now save the text after modifying it? Because this is uploaded images, things are not saved as usual.
Thank you,
Mary Beebe _______________________________________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
I got this to work, but when I go to the image file list (?title=Special:Imagelist) The Description does not change. It lists the first description. This is also true for the image summary.
-----Original Message----- From: mediawiki-l-bounces@lists.wikimedia.org [mailto:mediawiki-l-bounces@lists.wikimedia.org] On Behalf Of Beebe, Mary J Sent: Monday, July 14, 2008 1:32 PM To: MediaWiki announcements and site admin list Subject: [Mediawiki-l] Saving text with images.
I am using the hook AlternateEdit to provide an edit screen for uploading images. I provide some drop-down lists for the user to put in a description area of the image. I am using: $docLinkArticle = Revision::newFromTitle($m_pageObj->mTitle); $docLinkText = $docLinkArticle->getText(); to get the text. This works fine.
How do I now save the text after modifying it? Because this is uploaded images, things are not saved as usual.
Thank you,
Mary Beebe _______________________________________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
_______________________________________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
mediawiki-l@lists.wikimedia.org