I've tested it with 1.6 (I added a necessary hook). It should work with anything higher; all the hooks necessary exist. I'm not sure if it will work with 1.5 though. You can probably add all the needed hooks.
If you use 1.6, I think you only need to add one hook (ParserBeforeInternalParse). I'd check to be sure though.
I've moved to 1.6.latest and installed everything, got the message on screen allowing me to set it as a stable version but then get an error when access special:stableversion, and various inconsistent bits
I'm wondering about you query over ParserBeforeInternalParse hook ?
How can I check if it's there and if not what do I need to add
Ta
John
I'm wondering about you query over ParserBeforeInternalParse hook ?
How can I check if it's there and if not what do I need to add
Check for the hook in Parser.php. If that string doesn't show up in the file, it doesn't exist. If it isn't there, go look in svn and copy the code snippet from svn into your file at the right location.
V/r,
Ryan Lane
OK the ParserBeforeInternalParse code seems to be there, and the system works to an extent I' getting:-
Warning: end(): Passed variable is not an array or object in <b>/home/users/web6411/html/3jays.me.uk/adults_policies/extensions/StableVersion.php</b> on line <b>349</b><br />
Warning: Invalid argument supplied for foreach() in <b>/home/users/web6411/html/3jays.me.uk/adults_policies/includes/Parser.php</b> on line <b>534</b><br />
when I click on the This is the stable version of this article. Click here http://3jays.me.uk/adults_policies/index.php?title=Special:StableVersion&id=1369&mode=reset&revision=1381&oldid=1381 to remove this as stable version! or You are looking at a draft version of this article; there is no stable version of this article yet. Click here http://3jays.me.uk/adults_policies/index.php?title=Special:StableVersion&id=1369&mode=set&revision=1381&oldid=1381 to set this as stable version!
And *Fatal error*: Call to a member function on a non-object in */home/users/web6411/html/3jays.me.uk/adults_policies/includes/SkinTemplate.php* on line *306
when I try to open the Special:StableVersion page
But it does seem to be working.
Is there anyway to suppress the
*'This is the stable version of this article. Click here http://3jays.me.uk/adults_policies/index.php?title=Special:StableVersion&id=1369&mode=reset&revision=1381&oldid=1381 to remove this as stable version!' messaage from appearing for no editor logins ?
Thanks
John
Lane, Ryan wrote:
I'm wondering about you query over ParserBeforeInternalParse hook ?
How can I check if it's there and if not what do I need to add
Check for the hook in Parser.php. If that string doesn't show up in the file, it doesn't exist. If it isn't there, go look in svn and copy the code snippet from svn into your file at the right location.
V/r,
Ryan Lane
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
[snip]
And *Fatal error*: Call to a member function on a non-object in */home/users/web6411/html/3jays.me.uk/adults_policies/includes /SkinTemplate.php* on line *306
when I try to open the Special:StableVersion page
I don't think you are supposed to actually go to this page directly... I don't know what that error is about though.
But it does seem to be working.
Is there anyway to suppress the
*'This is the stable version of this article. Click here http://3jays.me.uk/adults_policies/index.php?title=Special:St ableVersion&id=1369&mode=reset&revision=1381&oldid=1381 to remove this as stable version!' messaage from appearing for no editor logins ?
Oh, I completely forgot about this, but in wfStableVersionCanChange(), you need to comment out "return true; # Dummy, everyone can set stable versions". It is there by default for testing purposes.
V/r,
Ryan Lane
Thanks Ryan that solved the everyone bit and I've tweaked the messages, have you any thought on these messages that appear at the top of the screen when I set or unset the stable version ?
Warning: end(): Passed variable is not an array or object in <b>/home/users/web6411/html/3jays.me.uk/adults_policies/extensions/StableVersion.php</b> on line <b>349</b><br />
Code in line 349 is
for( $content = end( $array ); $content !== false; $content = prev( $array ) ) {
Warning: Invalid argument supplied for foreach() in <b>/home/users/web6411/html/3jays.me.uk/adults_policies/includes/Parser.php</b> on line <b>534</b><br />
Code for 534 is
foreach( $contentDict as $uniq => $content ) {
(Both are in pass nowiki content functions
Thanks
John
_______________________________________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Warning: end(): Passed variable is not an array or object in <b>/home/users/web6411/html/3jays.me.uk/adults_policies/extens ions/StableVersion.php</b> on line <b>349</b><br />
Code in line 349 is
for( $content = end( $array ); $content !== false; $content = prev( $array ) ) {
It looks like the StableVersion extension was updated to work with MediaWiki 1.9 last november. I'm using an older version, which is why I didn't notice that. You may want to consider using revision 15862 of StableVersion.php for MediaWiki 1.6, as higher revisions seem to be geared towards MediaWiki 1.9.
V/r,
Ryan Lane
Lane, Ryan wrote:
It looks like the StableVersion extension was updated to work with MediaWiki 1.9 last november. I'm using an older version, which is why I didn't notice that. You may want to consider using revision 15862 of StableVersion.php for MediaWiki 1.6, as higher revisions seem to be geared towards MediaWiki 1.9.
Thanks I've tried this but with no luck, I'm basically getting two problems, (the first being those error messages), the second is that system seems to be 'unreliable' in that the status message about the stability of the page is very intermittent is appearing and I can't find a consistent way to get it to show.
I uncommented the wfStableVersionCanChange() to see if this helped to get the message up all time but it didn't help.
Being very cheeky would it be possible for you, to have a look at the setting etc.
the site is currently visible at
http://3jays.me.uk/adults_policies/index.php/Adults_Policies,
If it is possible and your happy to look at it, I'll let you have ftp access details etc my work email is john dot moorhouse at powys dot gov dot uk
Thanks
John
Being very cheeky would it be possible for you, to have a look at the setting etc.
the site is currently visible at
http://3jays.me.uk/adults_policies/index.php/Adults_Policies,
If it is possible and your happy to look at it, I'll let you have ftp access details etc my work email is john dot moorhouse at powys dot gov dot uk
With a site name like that, I think I'll check this from home ;).
V/r,
Ryan Lane
Lane, Ryan wrote:
Being very cheeky would it be possible for you, to have a look at the setting etc.
the site is currently visible at
http://3jays.me.uk/adults_policies/index.php/Adults_Policies,
If it is possible and your happy to look at it, I'll let you have ftp access details etc my work email is john dot moorhouse at powys dot gov dot uk
With a site name like that, I think I'll check this from home ;).
To clarify I work for Powys County Council Social Services, the site is for Adult Social Care Policies.
Only moved an empty site external so you access its setup as the real one is behind our firewalls.
But I see what you mean !!!!!!!!! :-) :-) ;-)
V/r,
Ryan Lane
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
mediawiki-l@lists.wikimedia.org