Extension talk:MultiBoilerplate/Archive 1

Latest comment: 7 years ago by FreedomFighterSparrow in topic korean translation

Bugs:

  • 2.04.2008
  • on MediaWiki 1.12.0 I got this when hitting load:

I am in Catchable fatal error: Argument 1 passed to Article::__construct() must be an instance of Title, null given, called in /var/www/mediawiki-1.12.0/extensions/MultiBoilerplate/MultiBoilerplate.php on line 110 and defined in /var/www/mediawiki-1.12.0/includes/Article.php on line 44



When trying to load "MyBoilerplate in an article it returns to Editing Main Page. If I save the page the main page will be overwritten
I'm currently using:

  • MediaWiki 1.11.0 EN version

Aroekene

Thanks for noticing this - I added this extension then made a major change because there was a major flaw but failed to update this page. I've updated the page to the latest version of the extension. MinuteElectron 21:58, 7 January 2008 (UTC)

Needed to Change $things = wfMsg( 'MultiBoilerplate' );

On MediaWiki 1.12, I had to change:

$things = wfMsg( 'multiboilerplate' ) -> $things = wfMsg( 'MultiBoilerplate' )

... to get the fallback to the MediaWiki:MultiBoilerplate code to work

It is "MediaWiki:Multiboilerplate", not "MediaWiki:MultiBoilerplate". MinuteElectron 16:39, 23 March 2009 (UTC)

Automatically use boilerplate if page title matches regular expression

Would it be possible to alter the extension so that it did this? Thanks, Jonathan3 20:02, 13 December 2008 (UTC)

i wrote a patch, you may try it. https://bugzilla.wikimedia.org/show_bug.cgi?id=56871 Chaosconst (talk) 01:01, 11 November 2013 (UTC)

noinclude and includeonly don't work in 1.14

Unfortunately I found the tags noinclude resp includeonly are not working in 1.14. Instead the Multiboilerplate extension inserts the complete content of the template (including the part in between the noinclude tags as well as the tags noinclude and includeonly themselves) into the new page. Why is this? 144.85.162.123 22:07, 22 March 2009 (UTC)

did you ever get anywhere with this? i am seeing this in 1.15 as well. 67.97.209.36 19:27, 18 September 2009 (UTC)
Replace lines 122 & 123 in MultiBoilerplate.php with:
		$content = preg_replace( '/<noinclude>(\S|\s)+<\/noinclude>/', '', $content );
		$content = preg_replace( '/<includeonly>/', '', $content );
		$content = preg_replace( '/<\/includeonly>/', '', $content );
Things shall work better. — Alvinos 17:33, 5 March 2010 (UTC)

internationalization bug

Hi.

I found a bug in your internationalization part (MW 1.14).

The bug behaves so:

I create the MediaWiki:Multiboilerplate page with the boiler plates (using the english language as default). After that everything works properly for english translation, but if I use another language setting on any user, I do not get the boiler plates. Below is the fix for this.

The bug is on line 78 in MultiBoilerplate.php

Before:

$things = wfMsg( 'multiboilerplate' );

After:

$things = wfMsgForContent( 'multiboilerplate' );

Regards,

SG

213.176.148.242 13:40, 8 April 2009 (UTC)

Applied to trunk. Thanks! RobertL 16:38, 8 April 2009 (UTC)


FCKEditor Integration

Hi,

is there any possibility to get this very useful extension working together with the FCKEditor (WYSIWYG) extension? At present it loads the raw wiki code in the FCKEditor textarea. The PreLoader extension is working with FCKEditor (but not usefull in my case).

Also it could be usefull, if the existing wiki code will not be deleted if the boilerplate is loaded in an existing page. For example the boilerplate could be inserted at the end of the existing wiki code.

Thanks a lot! --Filburt 12:42, 5 May 2009 (UTC)



I made some changes, and it seems to be a partial success: If you change in MultiBoilerplate.php 'boilerplate' with the standard wiki command 'preload' in lines 75, 87 and 102 but not in 114 and 115 it works together with the FCKEditor. The problem is that there is no possibility anymore to replace existing text. If you change the commands in line 114 and 115 too, you have the same problem as before and the raw wiki text is included in FCKEditor.

Any solutions? --Filburt 20:37, 5 May 2009 (UTC)

Has there been any movement on the request to integrate MultiBoilerplate and FCKEditor? We would love this functionality at Appropedia. Thanks, --Lonny 05:02, 29 June 2009 (UTC)
The page http://grassrootswiki.org/index.php?title=Main_Page Has the 2 extensions working together.


I think loading order matters - at least my load order always worked ;-) (without code changes in the extension)

General rule of thumb: FCKeditor should always be the last extension you load in LocalSettings.php. --Cboltz 15:08, 19 February 2010 (UTC)

I can confirm that it is only a loading order matter (P.S. I'm working for the mentioned grassrootswiki.org - Page) --Filburt 08:58, 16 September 2010 (UTC)

I can also confirm that the loading order solve this problem

Problem with special page

I tried to use the special page, adding in Multiboilerplate.php the following: $wgMultiBoilerplateDiplaySpecialPage = true; But the page doesn´t appear! Any suggestion? --Tango granada 02:13, 9 October 2009 (UTC)

PROBLEM WITH DOWNLOADS

After a lot of looking, the problem is that if you download the version for 1.15.x, the downloaded archive es Moultiboilerplate 1.6, and NOT 1.8. Please, someone fix this problem. --Tango granada 02:40, 9 October 2009 (UTC)

PROBLEM WITH Mediawiki 1.15.1

This extension seems not work with wiki 1.15.1. I have tested each version 1.6 - 1.8.

  • MediaWiki 1.15.1
  • PHP 5.2.4-2ubuntu5.7 (apache2handler)
  • MySQL 5.0.51a-3ubuntu5.4-log

With mediawiki 1.13 extension works. Any Hints? Thx! DMA 14:46, 10 December 2009 (UTC)

SOLVED!  :-) DMA 09:41, 11 December 2009 (UTC)
Hint:
The templates in MediaWiki:Multiboilerplate must be defined in English
Example:
  • Vorlage für Benutzerseite (Neuanlage)|Template:Benutzerseite
and _NOT_ (!!!)
  • Vorlage für Benutzerseite (Neuanlage)|Vorlage:Benutzerseite
Extension works like a charm.

different templates per namespace?

Is it possible to setup different templates per namespace?

For example, article templates are not very useful when creating a new template or a help page, and offering templates for help pages in the article namespace also doesn't make much sense.

--Cboltz 15:04, 19 February 2010 (UTC)

I implemented this in the meantime. You can download my patch from MediaZilla Bug 22759. A short description how to use the changes is also included there.
Note: I have no feedback from the MultiBoilerplate developers yet, so the official implementation might differ. --Cboltz 17:03, 18 April 2010 (UTC)
Related to this - is it possible to have a two dimensional (or more) select e.g. first select type of boiler plate, then a sub-type, then (for > 2 dimensions) a sub- sub-type etc? --Robinson Weijman 10:33, 21 June 2010 (UTC)
Hi, I just came to this extension (Thanx!)- first thing i thought was, why not using different plate-lists in different namespaces. So I directly manipulated the extension for my wiki instead of looking here for a solution.... now i came here to share my alterations and found this topic. Well still here are my code alterations (note that i just implemented it for using an array in the $wgMultiBoilerplateOptions):
Alterations in MultiBoilerplate.php
        if( is_array( $wgMultiBoilerplateOptions ) ) {
            $options = '';

/* GM */    $sNS = $wgTitle->mNamespace;
/* GM */    $aNSMultiBoilerplateOptions = (isset($wgMultiBoilerplateOptions[$sNS]) && is_array($wgMultiBoilerplateOptions[$sNS])) ? $wgMultiBoilerplateOptions[$sNS] : array();

// ORIG:    foreach( $aMultiBoilerplateOptions as $name => $template ) {
/* GM */    foreach( $aNSMultiBoilerplateOptions as $name => $template ) {
                $selected = false;
                if( $wgRequest->getVal( 'boilerplate' ) == $template ) $selected = true;
                    $options .= Xml::option( $name, $template, $selected );
            }
        } else {

$wgMultiBoilerplateOptions now uses a two dimensional array where dimension one is the NamespaceID. Example:

$wgMultiBoilerplateOptions[NS_MAIN]['Serversystem Dokument'] = "Template:SomeDocumentType/Preload";

Feel free to use this. Although i have to admit i have not followed the link to your solution so it might be better ;-)

--RaZe (talk) 22:11, 30 September 2013 (UTC)


Now that there's a new major release (thanks!), can you please consider to include this feature? My patch is still available in https://phabricator.wikimedia.org/T24759 but I'm afraid it won't easily apply with the code changes in 2.0. --Cboltz (talk) 12:50, 19 March 2015 (UTC)

Hi Cboltz, I've noticed the patch and I hope to get to it soon! As in, this month :-)
Since the code for this extension is rather simple, I shouldn't have a real problem with rebasing your patch - but I want to first take a look and make sure the new configuration options will make sense. Otherwise, I think I'll be OK with breaking backward-compatibility (again!). regards, --FFS Talk 19:58, 4 April 2015 (UTC)

Why define boilerplates in two places?

Why are boilerplates defined in LocalSettings.php and in MediaWiki:Multiboilerplate? It is redundant. My preference would be only in MediaWiki:Multiboilerplate - easier to maintain. --Robinson Weijman 13:52, 20 March 2010 (UTC)

My mistake - I missed the words Alternative is:. So, apparently you can define it in either. --Robinson Weijman 11:46, 22 March 2010 (UTC)

Is there a way to insert boilerplate text WITHOUT over riding existing page content?

This would be really really handy. At the moment inserting a boilerplate deletes the existing page contents and inserts the boilerplate. But is there a way to append the boilerplate text? Or is there another extension that does this? or could it be added to this extension?

This would allow me to use it for shortcuts to insert of all sorts of handy templates...

219.89.59.111

I want to know this too. Can it be done?

That would be really handy to allow a bigger article to be built from many templates.

Hello all!

Here is some changes in MultiBoilerplate.php, that would save your article text and add boilerplate text at the bottom of article text. PriteX.

// If the Load button has been pushed replace the article text with the boilerplate.
	if( $wgRequest->getText( 'boilerplate', false ) ) {
		$plate = new Article( Title::newFromURL( $wgRequest->getVal( 'boilerplate' ) ) );
		$content = $plate->fetchContent();
		
		$article = Article::newFromId($wgTitle->getArticleID());
		
		/* Strip out noinclude tags and contained data, and strip includeonly
		 * tags (but retain contained data). If a function exists in the
		 * parser exists to do this it would be nice to replace this with it (I
		 * found one with a name as if it would do this, but it didn't seam to
		 * work).
		 */
		$content = preg_replace( '#<noinclude>(.*?)</noinclude>#', '', $content );
		$content = preg_replace( '#<includeonly>(.*?)</includeonly>#', '$1', $content );
		// TODO: Handle <onlyinclude> tags.
		$form->textbox1 = $article->getRawText()."\r\n\r\n".$content;
	}

188.168.34.194 13:48, 24 January 2012 (UTC)

Howdy. I tried using the above code, but got a server error (500) whenever trying to add boilerplate text to a brand new article. My exposure to PHP honestly goes no further than figuring this out, but I added an if statement that stopped it (I assume the error was from adding text to a brand new page)
// If the Load button has been pushed replace the article text with the boilerplate.
	if( $wgRequest->getText( 'boilerplate', false ) ) {
		$plate = new Article( Title::newFromURL( $wgRequest->getVal( 'boilerplate' ) ) );
		$content = $plate->fetchContent();
		
		$article = Article::newFromId($wgTitle->getArticleID());
		
		/* Strip out noinclude tags and contained data, and strip includeonly
		 * tags (but retain contained data). If a function exists in the
		 * parser exists to do this it would be nice to replace this with it (I
		 * found one with a name as if it would do this, but it didn't seam to
		 * work).
		 */
		$content = preg_replace( '#<noinclude>(.*?)</noinclude>#', '', $content );
		$content = preg_replace( '#<includeonly>(.*?)</includeonly>#', '$1', $content );
                // TODO: Handle <onlyinclude> tags.
		  //don't try to get text from article if article is null...
		  if(!is_null($article)) {
                	  $form->textbox1 = $article->getRawText()."\r\n\r\n".$content;
		  } else {
			  $form->textbox1 = $content;
		  }		
        }

Rabyl :3 16:04, 13 June 2012 (UTC)

Combination with ArticleToCategory2 extension

To prevent that MultiBoilerplate will kill existing categories, for example preloaded with Extension:ArticleToCategory2, you have to add $wgContLang to the globals declaration in line 58:

global $wgMultiBoilerplateOptions, $wgMultiBoilerplateOverwrite, $wgTitle, $wgRequest, $wgContLang;

Then add an additional hidden field to the form to pass the category name: after

  Xml::hidden( 'title', $wgRequest->getText( 'title' ) ) .

in line 108 insert

  Xml::hidden( 'category', $wgRequest->getText('category') ) .

Finally replace

  $form->textbox1 = $content;

with

  if ($wgRequest->getText('category', false))
     $catlink = "[[" . $wgContLang->getNsText( NS_CATEGORY ).':'.$wgRequest->getText('category') . "]]";
  else 
     $catlink = '';
  $form->textbox1 = $content . $catlink;


(This solution also works with FCKeditor)


--Filburt 09:10, 16 September 2010 (UTC)

noinclude included

Text inside of "noinclude" will be included if there is a line break, e.g.

<noinclude>some explanation</noinclude>

will work,

<noinclude>==headline==
some explanation
</noinclude>

will not. To fix this, one of us changed MultiBoilerplate.php like this:

    $content = preg_replace( '#<noinclude>(.*?)</noinclude>#ims', '', $content );
    $content = preg_replace( '#<includeonly>(.*?)</includeonly>#ims', '$1', $content );

Hope this helps.--93.131.250.134 10:55, 31 October 2010 (UTC)

It surely does! Now it actually works correctly. Thank you! --Dror Snir 10:23, 9 December 2010 (UTC)
Reported as Bug 32710 --Cboltz 17:54, 29 November 2011 (UTC)
... and commited to SVN trunk (aka what will become 1.19) r106972 by Mark --Cboltz 21:46, 21 December 2011 (UTC)

HTTP Error 500 (Internal Server Error) on Edit

I just upgraded to version MediaWiki 1.18.0 and I'm getting the error:

The website encountered an error while retrieving http://localhost:8080/mediawiki/index.php?title=testpage&action=edit&redlink=1. It may be down for maintenance or configured incorrectly.

HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfill the request.

My Apache error.log reads:

PHP Fatal error:  Call to undefined method Xml::hidden() in C:\\MoWeS\\www\\mediawiki\\extensions\\MultiBoilerplate\\MultiBoilerplate.php on line 128, referer: http://localhost:8080/mediawiki/index.php?title=Special%3ASearch&search=testpage&go=Go

Line 128 in MultiBoilerplate.php reads:

Xml::hidden( 'action', 'edit' ) .

Any ideas? Thank you.

--SLeepdepD 16:35, 29 November 2011 (UTC)

Update the MultiBoilerplate extension to the latest version. Johnduhart 16:57, 29 November 2011 (UTC)
Thanks, that worked. --SLeepdepD 17:03, 29 November 2011 (UTC)

Works with MW1.18

To save anyone needing to ask - this extension works with MW1.18 (though I did have to upgrade to the 1.18 extension version when upgrading MW from 1.16.5 to 1.18). Jonathan3 21:23, 11 December 2011 (UTC)


Missing Files

Please be advised: As of 20120709180902; the Special:ExtensionDistributor/MultiBoilerplate distribution files are missing from the GIT repository. No further instruction or notices are available and no offsite references are posted. This may be due to the repository transition process and is a temporary issue; no immediate confirmations have been established as to when the extension will be re-included in the main MediaWiki repository. Habatchii (talk) 13:49, 9 July 2012 (UTC)

The extension is still available in SVN (and got a translation update some days ago). I changed the download links back to SVN. --Cboltz (talk) 18:09, 9 July 2012 (UTC)

Problem with i18n messages

I am on MW 1.19.x. The i18n messages (for locale 'en') do not appear. Apparently they are not being correctly loaded from the i18n file. I see that in recent MW versions, the wfMsg functions have been deprecated in favor of wfMessage()->text() (or other similar variations). I edited my copy of the PHP files to make these changes, but that did not help. (talk)

I am no expert on i18n for extensions, but I wondered if anyone else has successfully solved this problem for this extension. It works correctly, it's just the i18n messages that are messed up.

Hi, see my corrections for the files here: MultiBoilerplate.php, SpecialBoilerplates_body.php. You can use the i18n file as is. What I did was mainly change wfMsg to wfMessage variants. This works fine for me on 1.21wmfX, hopefully for you as well. I really should ask this to be moved to git and submit a patch... --FreedomFighterSparrow (talk) 23:57, 3 March 2013 (UTC)
Thanks FreedomFighterSparrow. It turns out the changes I made were identical to the changes you made. Confirmation that they are probably correct. So ther change did not work. I could not figure out what was wrong. I tried lots of things. Finally, adding another extension after MultiBoilerplate in LocalSettings.php solved the problem, which points to something funny in the configuration of the MultiBoilerplate extension (which I still have not identified). It works now, so I am not going to worry about it. (talk)

onlyinclude

Just found "// TODO: Handle <onlyinclude> tags" in the code. I believe

    $content = preg_replace( '#.*<onlyinclude>(.*?)</onlyinclude>.*#ims', '$1', $content );

should do the trick.--Baumgeist (talk) 06:50, 27 March 2014 (UTC)

Does not work with MediaWiki 1.24

Title says it all.--Baumgeist (talk) 10:02, 21 December 2014 (UTC)

I'm upgrading my wiki to 1.24 right now, so if it doesn't work, I'll fix it and uplaod a new version this week. Regards, --FFS Talk 16:28, 10 January 2015 (UTC)
Thanks! I will test too and see if it works on 1.24. MikeDarling (talk) 20:01, 15 January 2015 (UTC)
Update. It is working for me. MW 1.24.1 on Ubuntu, MultiBoilerplate v1.8.0 (r115794) MikeDarling (talk) 20:25, 15 January 2015 (UTC)
Just upgraded wiki from 1.16 to 1.24 and refreshed the MultiBoilerplate v1.8.0 code, the tool is no longer visible when creating a new article, any advice? --Bawheeler (talk) 20:46, 2 February 2015 (UTC)
Hi guys, I uploaded a new version, 2.0alpha, to git:extensions/MultiBoilerplate. I would love your help testing it! It is targeted specifically at MW >= 1.24, trying to adhere to modern MW coding standards, and breaks compatiblity with previous versions. As a side bonus, it now also honors <onlyinclude> (however, it does so by using a standard core function, so more blank lines might creep in). Regards, --FFS Talk 23:45, 5 February 2015 (UTC)
Thanks for the opportunity to test something new. I just tried the new MultiBoilerplate.php on our 1.24.1 wiki and it generated a host of errors rendering the wiki unusable. So I have backed that out for now. Happy to try something else or snapshot what my screen looked like. --Bawheeler (talk) 00:25, 6 February 2015 (UTC)
Thanks for taking the time to test! I'm sorry to hear it didn't go well. I couldn't reproduce any errors on my end (MW 1.24, MW 1.25-master), so could you please supply me with that screenshot? It might also help to know what boilerplate settings you use, and what additional extensions you have installed. Thanks again! --FFS Talk 21:13, 6 February 2015 (UTC)

Here are the details of my error --Bawheeler (talk) 21:33, 6 February 2015 (UTC)

Config in LocalSettings

$wgMultiBoilerplateDiplaySpecialPage = true;

require_once( "$IP/extensions/MultiBoilerplate/MultiBoilerplate.php" );

Boilerplate list we previously had working under MW 1.16

http://www.cvillepedia.org/mediawiki/index.php/MediaWiki:Multiboilerplate

Sample boilerplate template

http://www.cvillepedia.org/mediawiki/index.php/Template:Person_article

Error screenshots with switch to MW 1.24.1 and MB 2.0.0alpha

https://dl.dropboxusercontent.com/u/45933355/MultiBoilerplate-Error1.jpg

https://dl.dropboxusercontent.com/u/45933355/MultiBoilerplate-Error2.jpg

If you need another piece of information, just let me know.

I think you got the files wrong from GitBlit. Go here and click a link for you preferred format (zip, bz2, etc.). --FFS Talk 22:39, 6 February 2015 (UTC)
Thanks for that link. Now the errors are gone, but the boilerplate drop down menu still does not appear upon article creation. Our special page confirms I have loaded MB 2.0.0alpha. Is there something simple I am missing that need to be in LocalSettings that wasn't previously required? --Bawheeler (talk) 23:14, 6 February 2015 (UTC)
I admit I'm stumped. Could you perhaps try to debug, and specifically enable $wgDebugLogFile? You just have to enable it, go to an edit page, and then disable it again - hopefully the generated log file will give us a hint. --FFS Talk 22:59, 9 February 2015 (UTC)
I just created a log file and tried creating a new article. Upon examining the log, there is no mention of the extension in the log file at the point I am creating article, or anywhere in log for that matter. So at this point we have MultiBoilerplate loading properly (it's listed on the version page and wiki is running fine) but it is not generating an error (I also have error reporting and display errors on). --Bawheeler (talk) 00:25, 10 February 2015 (UTC)

Can't Load Boilerplates

Hi, I'm using MultiBoilerplate 2.0.0a on MediaWiki 1.24.1, and everything seems to work fine until I try to load a boilerplate when making a new page. I get the following error:

Fatal error: Call to a member function getWikitextForTransclusion() on null in E:\XAMPP\htdocs\mywiki\extensions\MultiBoilerplate\MultiBoilerplate.hooks.php on line 117

Can anybody help me out? --Glameglumps33 (talk) 02:33, 19 February 2015 (UTC)

Are you sure the page you set as a boilerplate actually exists? It certainly seems like that would be the reason. Regardless, I will try to upload a new version that checks for that and notifies you of the error, soon. --FFS Talk 11:06, 24 February 2015 (UTC)
My bad, I recovered an old wiki from 2 years ago and have been trying to get all of my extensions back in order. Looks like I forgot that I had moved the pages and hadn't yet updated MediaWiki:Multiboilerplate.
But the weird thing is, when I use this extension on a brand new wiki, it doesn't even show the selection box (even though the pages do exist). However, I've just found that when I comment out $wgMultiBoilerplateOptions = false; and list the boilerplates in my LocalSettings.php file, it works. So it works normally on my old wiki, but works strangely on my new wiki that has almost no other extensions installed. But it's also having that same issue on another new wiki that's using the 1.8.0 version on MediaWiki 1.19.23, so that leads me to believe that maybe there's something else going on, because 1.8.0 used to work perfectly for me 2 years ago. --Glameglumps33 (talk) 22:18, 25 February 2015 (UTC)
That's good to hear. But I definitely need to test it again on a newly created wiki. This extension actually requires automated browser tests, but I don't know if I'll get to that. Anyway, a new version that notifies you if your try to load a non-existant boilerplate will be up soon. --FFS Talk 11:13, 26 February 2015 (UTC)

No Boilerplates Dropdown

Hi, I think I've installed/set up the extension correctly. I see it in my Special:Version page:

MultiBoilerplate 2.0.0 GPL-2.0+

I created a MediaWiki:Multiboilerplate page and added this:

* Project Main Page | Template:Project Main Page

then created the template page Template:Project_Main_Page and added some stuff to it. But, when I go to create a new page, there is no dropdown box located above the edit form. Did I miss a step? The only mention of the extension in the log is this:

Getting VCS info for extension MultiBoilerplate[gitinfo] Computed cacheFile= for /var/www/mediawiki-1.24.1/extensions/MultiBoilerplate
[gitinfo] Cache incomplete for /var/www/mediawiki-1.24.1/extensions/MultiBoilerplate

UPDATE If I update LocalSettings.php with the $wgMultiBoilerplateOptions, the dropdown box appears. So looks like it's just the MediaWiki:Multiboilerplate option that doesn't work.

Hi, it seems I need to do some more checks on new empty wikis. Thanks for supplying the name of your template - could you also add the exact content of MediaWiki:Multiboilerplate, so I can test with the same data? Also, what's the language of your wiki? Looking at the source code again, I see that the message name is written in lowercase everywhere, which is wrong, but I don't yet know if fatally so. --FFS Talk 20:03, 4 April 2015 (UTC)
Hi, same problem here, french mediawiki with a fresh install (MW 1.25). Nothing happens if I input the templates list in MediaWiki:Multiboilerplate . I even tried to use "Template:" or its french equivalent "Modèle:", but no luck. The extension works fine of I define the boilerplates in the LocalSettings.php file.
EDIT : tried on an english instance, doesn't work either.
Hi, could you try the latest master version? It should fix this issue. Let me know, so I either try harder or publish this as the new version. Thanks! --FFS Talk 23:06, 24 June 2015 (UTC)
I updated to the most recent version of MultiBoilerplate on July 16, 2015; I had to put the $wgMultiBoilerplateOptions array in LocalSettings.php for the extension to work. Henryhood (talk) 02:12, 16 July 2015 (UTC)

Bugfix (Hack?) for MultiBoilerplate 2.1.0 under MediaWiki 1.25.2

Since the code is not that complicated and the error seems to be a trivial one, I tried to fix the problem of not being able to define boilerplates via MediaWiki:Multiboilerplate despite not being a coder; the following might be a bad hack, but it works for me:
Replace

		if ( is_array( $wgMultiBoilerplateOptions ) ) {

with

		if ( !empty( $wgMultiBoilerplateOptions ) ) {

in both MultiBoilerplate.hooks.php and SpecialBoilerplates.php (since Special:Boilerplates does not work either if you define your boilerplates via MediaWiki:Multiboilerplate).
To make Special:Boilerplates work you also need to replace

			$things = explode( "\n", str_replace( "\r", "\n", str_replace(
				"\r\n", "\n", wfMessage( 'multiboilerplate' )
			) ) ); // Ensure line-endings are \n

with

			$things = wfMessage( 'multiboilerplate' )->inContentLanguage()->text();
			$things = explode( "\n", str_replace(
				"\r", "\n", str_replace( "\r\n", "\n", $things )
			) ); // Ensure line-endings are \n

in SpecialBoilerplates.php.--Baumgeist (talk) 15:02, 22 August 2015 (UTC)

korean translation

This is good korean translation but i don't know how to apply globally. Please help me if you can.

{
	"@metadata": {
		"authors": [
			"MinuteElectron <minuteelectron@googlemail.com>"
		]
	},
	"multiboilerplate": "상용 문구 목록",
	"multiboilerplate-desc": "문서 편집시 편집 폼 위에 상용 문구를 선택하는 드랍 다운 메뉴를 보여줍니다",
	"multiboilerplate-label": "",
	"multiboilerplate-legend": "상용 문구를 선택하십시오",
	"multiboilerplate-submit": "입력",
	"specialboilerplate-desc": "모든 상용 문구를 보여주는 특수 문서",
	"boilerplates": "상용 문구 목록",
	"multiboilerplate-special-pagetext": "이 틀은 문서 생성시에 사전 입력됩니다. (<span class=plainlinks>[{{fullurl:Project:상용 문구 예문|action=edit}} 예문 보기]</span>)",
	"multiboilerplate-special-define-in-LocalSettings": "상용 문구가 LocalSettings에 정의되었습니다.",
	"multiboilerplate-special-define-in-interface": "상용 문구가  [[MediaWiki:Multiboilerplate]]에 정의되었습니다.",
	"multiboilerplate-special-no-boilerplates": "어디에도 상용 문구가 정의되지 않았습니다.",
	"multiboilerplate-nonexistant-page": "상용 문구 문서가 존재하지 않습니다: \"$1\""
}
Hi Libattery, thank you for your translation! I'll commit it soon. You also made me realize that this extension wasn't registered in translatewiki, so I'll take care of that so anyone can help translate it. FFS Talk 05:52, 23 April 2017 (UTC)

Got it. Thank you.

Return to "MultiBoilerplate/Archive 1" page.