Extension talk:Preloader/Archive

only preload without explicit preload?
it seems the extension overrides a given preload parameter - however I'd like the preloader to act only when there is no explicit preload parameter given - is there a possibility to query that parameter from within the extension? --NoLuck 22:26, 13 November 2007 (UTC)
 * Is that why it isn't mentioned as one of the extensions that use the built-in preloading technique? -79.179.111.10 13:26, 28 November 2007 (UTC)

Assign and Define $wgExtraNamespaces
Note that while MediaWiki will recognize content namespaces you create on the fly, if want to preload these, in addition to the instructions on the previous page, you need to assign and define them, probably in LocalSettings.php:

E.g., if you have a "Glossary:" namespace: $wgExtraNamespaces = array(         # ExtraNamespaces should begin above 100          #  ... they are usually for translating standard namespaces, e.g. into German:          # 100 => "Hilfe",          # 101 => "Hilfe_Diskussion",          130 => "Glossary"          );

define('NS_GLOSSARY', 130); Now you can set, e.g.

$wgPreloaderSource[ NS_GLOSSARY ] = 'Template:Preloadglossary';

- so there is no way to do this with older versions as 1.5 ?

Preloader for Image/Media Upload
I was just testing the Preloader and it worked fine for an article in the NS_MAIN namespace. For NS_IMAGE it does not work. Is a function like Preloader for Upload articles available? --HermannSchmitz 19:32, 14 May 2007 (UTC)

Boiler Plate per phrases in the Article Title instead of per Namespace
Would it be possible to modify this to load the text according to the Article Title? We have defined some text for titles which would then trigger the correct text. What is the variable which would hold the title name? THanks --Dtsig 21:07, 14 May 2007 (UTC)


 * Found Extension:PagesOnDemand. I had thought that i had reviewed all of the extensions but they keep coming. PagesOnDemand appear to do exactly what i was requesting .. thanks .. --Dtsig 21:20, 14 May 2007 (UTC)

Filter the specific words and
I had created a template page with the content like followed:  ~ ~ ~  Then, When I created a new page preloaded with the template without installing the preloader, the above would become   in the new page. If I had installed the Preloader, the result would become different. The texts  ~ ~ ~   in the template would become no any change when they were preloaded in a new page. Could it passable to have tags like followed: Only the texts plased here will be preloaded. or I can still use tags. Thanks! --Roc michael 01:28, 28 July 2007 (UTC)


 * not sure I got you quite right... however, I also stumbled across wanting the <[/]includeonly> tags to vanish... that's easy however - just change the  to filter them together with the sections as follows --NoLuck 22:12, 13 November 2007 (UTC)

function transform( $text ) { return trim( preg_replace( '/( .*<\/nopreload>)||(<\/includeonly>)/s', '', $text ) ); }

Not the entire namespace?
If I want to preload a template for a page which not yet exists (a part of a calendar which is dynamically created), can I use your extension? Now I use the text box extensions preload:

which gives:

See http://semeb.com/dpldemo/index.php?title=Template_talk:CalendarSingle

-- 85.27.110.249 14:43, 26 August 2007 (UTC)

Exclude subpages
For me it would be useful to be able to preload by namespace, as is done presently, but to have the option to exclude all subpages on the namespace from preloading.

E.g. if I make a page PreloadedNS:my_page, it would preload the page set for the PreloadedNS namespace, but if I then make PreloadedNS:my_page/subpage it would load blank.

Explaining
As it's not explained clearly in the article (and editing is forbidden), here's an easy way to explain : it's the extension's own version of. Well, except maybe it's not even shown when viewing the preloaded text directly (can somebody test it?). -79.179.111.10 13:26, 28 November 2007 (UTC)
 * If you create a user account you'll be able to edit. Smaug 21:11, 27 March 2008 (UTC)

How does it compare to the starting text hacks?
It seems much - much - easier to install. Well, after all it is an extension and not a hack. Still, are there any disadvantages to this extension compared to Starting text hack and Multiple starting text hack? -79.179.111.10 13:26, 28 November 2007 (UTC)


 * Oo.et.oO 16:02, 12 August 2008 (UTC): one advantage of this over the starting text hacks is the boilerplate/preload template selection for each namespace capability.

problem with utf8 page titles and MediaWiki 1.13
The page titles of my database could not be updated by the installation script of version 1.13, (upgrading from 1.12 whereas upgrade 1.11 to 1.12 was OK) and it resulted in wrongly encoded page titles on my non-english wiki. The page title update seem to have failed because of the Preloader plugin and some Boilerpage. Bug detection in progress, but international people, be aware of a possible issue. I'll let you know once I'll have figured out what it is. --Rmatt 22:26, 18 August 2008 (UTC)

Problem in User namespace
Hi, I'm trying to use this extension, but if I include it, the User pages aren't reacheble. New User page don't have any problem (I can create them and after that, I can still visit it). Can anyone help me with this problem? 145.94.74.23 12:15, 28 May 2010 (UTC)

A way to evaluate some of the template text?
Hi, I've set up the Preloader extension to try to link between my wiki and my bugzilla site. I have a link from bugzilla to my wiki site that looks like http://mywikisite.com/Bug:1. I have a Bug namespace which I use to preload a bug discussion boilerplate. That preload boilerplate looks like

Intro Paragraph

Section 1
etc

Where is a template which generates a link back to the bugzilla site.

I welcome help and suggestions -- perhaps it would be a hack in the preloader code -- on how to grab that 1 in the Bug:1 title and replace the 10000 in the boilerplate text with it; so, the bug template won't need to be hand-edited each new wiki bug page.

Regards, --Davious 23:33, 23 June 2011 (UTC)

there is no example wiki
An example wiki would be great. Igottheconch 15:40, 11 November 2011 (UTC)

Boilerplates with titles with special (international) character
I had a hard time trying to make Preloader work on a non-english (Brazilian Portuguese) wiki, and it seems to have something to do with special characters.

It turns out that the translation of "Template" to portuguese is "Predefinição", thus having not one, but two special characters in it: "ç" and "ã". Unfortunately the page that I wanted to use as a boilerplate also had a special character in it: "Modelo de página pessoal", namely, "á".

This configuration line DID NOT WORK:

$wgPreloaderSource[ NS_USER ] = 'Predefinição:Modelo de página pessoal';

I got Preloader to work by moving the page to the MAIN namespace and removing the accent from the title, so that my LocalSettings.php line was this:

$wgPreloaderSource[ NS_USER ] = 'Modelo de pagina pessoal';

Mediawiki generally allows replacing the portuguese namespace names with the original english ones, so both Predefinição:Modelo de pagina pessoal and Template:Modelo de pagina pessoal would work the same way in normal wiki usage.

So I tryed moving the page, now without the special character "á" back to the Template namespace and edited my Preloader configuration to:

$wgPreloaderSource[ NS_USER ] = 'Template:Modelo de pagina pessoal';

Gladly, it worked fine. Hope it helps.

Rbirmann (talk) 13:47, 28 February 2013 (UTC)

Preload Text Above the Editing Area?
Is it possible to preload custom text just above the editing toolbar instead of directly into the editing area?

Code License - MIT
I exchanged a short email with the author (Rob Church) asking for clarification on the license, as I wished to store my custom alterations in Github; Rob has replied it is under the MIT license retroactively. The email thread has been saved here next to the MIT license itself. troyengel (talk) 16:46, 3 January 2015 (UTC)

My fork of the extension
If anyone is interested, after clarifying the MIT license situation with Rob I've uploaded a personal fork of the extension here that I've been using for awhile. My fork deprecates the preload tag completely and uses the standard noinclude and includeonly tags, so I didn't want to just take over the main wiki page. troyengel (talk) 16:44, 3 January 2015 (UTC)