Extension talk:Preloader/Archive

From mediawiki.org
Latest comment: 5 years ago by Mainframe98 in topic My fork of the extension

only preload without explicit preload?[edit]

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)Reply

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)Reply

Assign and Define $wgExtraNamespaces[edit]

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[edit]

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)Reply

Boiler Plate per phrases in the Article Title instead of per Namespace[edit]

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)Reply

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)Reply

Filter the specific words <includeonly> and </includeonly>[edit]

I had created a template page with the content like followed:

~<includeonly>~</includeonly>~

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 ~<includeonly>~<includeonly>~ in the template would become no any change when they were preloaded in a new page. Could it passable to have tags like followed:

<preloadonly>Only the texts plased here will be preloaded.</preloadonly> 

or I can still use <includeonly></includeonly> tags. Thanks! --Roc michael 01:28, 28 July 2007 (UTC)Reply

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 function transform( $text ) to filter them together with the <nopreload> sections as follows --NoLuck 22:12, 13 November 2007 (UTC)Reply
function transform( $text ) {
    return trim( preg_replace( '/(<nopreload>.*<\/nopreload>)|(<includeonly>)|(<\/includeonly>)/s', '', $text ) );
}

Not the entire namespace?[edit]

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:

{{fullurl:Events:January_2007|action=edit&preload=Template:Monthly_calendar}}

which gives: //www.mediawiki.org/w/index.php?title=Events:January_2007&action=edit&preload=Template:Monthly_calendar

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

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

Exclude subpages[edit]

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 <preload>[edit]

As it's not explained clearly in the article (and editing is forbidden), here's an easy way to explain <preload>: it's the extension's own version of <noinclude>. 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)Reply

If you create a user account you'll be able to edit. Smaug 21:11, 27 March 2008 (UTC)Reply

How does it compare to the starting text hacks?[edit]

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)Reply

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.Reply

problem with utf8 page titles and MediaWiki 1.13[edit]

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)Reply

Problem in User namespace[edit]

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)Reply

A way to evaluate some of the template text?[edit]

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

{{bug|10000}}
== Section 1 ==
etc

Where {{bug|10000}} 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)Reply

there is no example wiki[edit]

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

Boilerplates with titles with special (international) character[edit]

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)Reply

Preload Text Above the Editing Area?[edit]

Is it possible to preload custom text just above the editing toolbar instead of directly into the editing area?

Code License - MIT[edit]

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 GitLab; 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)Reply

My fork of the extension[edit]

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)Reply

Update: The page has updated to point to your extension. The old extension is now archived, as detailed in Phab:T205957. ā€”Mainframe98 talk 08:59, 2 October 2018 (UTC)Reply