Manual talk:Creating pages with preloaded text

From MediaWiki.org
Jump to navigation Jump to search

Preloaded pages in Preview mode[edit]

Is there a way to put a new page with preloaded content in a preview mode (as if the user had just pushed the preview button) ?

--AkashicChacal 15:42, 5 May 2008 (UTC)

There is user option in Preferences «Show preview on first edit», and I even think its this way by default. Anyway, yes, you can force preview or no preview with preview=yes (or preview=no) URL parameter. —AlexSm 19:29, 5 May 2008 (UTC)

General How To regarding the Preload function[edit]

Maybe I'm utterly blind, but as of yet I fail to see how the inbuilt function Preload (included in the basic Mediawiki package, not via extension) would be set up to work. Basically, what I've expected to find is this: A user creates a new page (using any of the usual methods given) and sees the editor window opening with an already loaded Preload-page in it.

Yes, of course I've read how the index.php-parameter could be altered to force the preload to happen. Just that's not what I'd call a userfriendly preloading method. Users can type new page titles into their browsers address line, they can click the red link of a failed search result, they can create a new link on another page and click it... you get the drift, there are quite many methods to create a new page.

Simply put: Is there a method in the basic package to get a preloaded page on creation of a new page using any of the given page creation methods? And if yes, how would I go about to install it?

Thanks, --Carsten3m 16:16, 16 June 2008 (UTC)

I believe the answer is "No". preload is useless without extensions, except for expert users whom you can tell "Copy this URL to your browser's location field and modify its title param with the name you want for your new page. -- skierpage 01:39, 13 July 2009 (UTC)

Feature request: preloadtext="stuff this into edit box"[edit]

Hi. Preload is handy!

A dynamic (runtime) "preloadtext=#redirect:[[Target page title]]", say, would be cool, too.

Thanks. Saintrain 15:05, 15 September 2008 (UTC)

ULR parameters to index.php[edit]

The explanation says: "Preloading can be done with a preload parameter in a URL". But how can I produce such a link in an article? I cannot find how to add URL parameters to a link in double square brackets... —someone 12:14, 20 Nov 2008 (UTC)

One approach to adding URL parameters is with the "magic word" fullurl:
{{fullurl:My Page name|action=edit&preload=Some_template}}
produces //www.mediawiki.org/w/index.php?title=New_page_name&action=edit&preload=Some_template. You have the ugly URL with external link indicator, and you still have the problem of getting users to replace New page name with the actual page name of their new page. So if you can add extensions, <createbox> or <inputbox> is probably going to work better . -- skierpage 01:34, 13 July 2009 (UTC)

Passing arguments to preloaded templates[edit]

I'm able to preload a template just fine, and it's really handy. Is there some way to also pass values for arguments to the template when preloading?--140.247.59.121 16:00, 14 July 2009 (UTC)

I would also like to know whether this is possible. Thanks for any pointers. -- Daniel Mietchen 12:19, 7 August 2009 (UTC)

I found this and possible solution(s) in Bug 12853 --Goadeff (talk) 05:49, 16 June 2012 (UTC)

Preloading "Subject/headline" Text Field[edit]

Is there a way to preload the "Subject/headline" text field when adding new comments in the discussion pages? Example. —Sledged (talk) 18:28, 23 January 2008 (UTC)

There is a way now (was added some time ago): preloadtitle parameter, see Manual:Parameters to index.php. —AlexSm 19:29, 5 May 2008 (UTC)
Here is an actual example: http://en.wikipedia.org/w/index.php?title=User_talk:Mochi&action=edit&section=new&preloadtitle=CoroCoro+Comic+which+you+contributed+to%2C+is+currently+up+for+%5B%5BWikipedia%3AArticles_for_deletion%2FCoroCoro+Comic%7Cdeletion%5D%5D Ikip 03:35, 6 September 2009 (UTC)

Categories and documentation of preload-templates[edit]

If you have the Extension:ParserFunctions installed, it is possible to add categories and a documentation on the preload-page itself (and interlanguage links if you like). Consider a template:a, which is called on a template:a/preload like:

{{a
| param1 =
| param2 =
}}

You can add categories and the documentation to the template:a and make it show up if the pagename equals template:a/preload only:

{{#ifeq: {{FULLPAGENAME}} | template:a/preload | <categories for template:a/preload>   | <categories for template:a>   }}
{{#ifeq: {{FULLPAGENAME}} | template:a/preload | <documentation of template:a/preload> | <documentation of template:a> }}

Hope this is useful. --WiMu 17:09, 7 December 2009 (UTC)

Preloading article and discussion page template[edit]

Is it possible to preload an article template together with a template of it's discussion page? If yes, how? - Bojae72 14:07, 7 July 2011 (UTC)

Preloading from redlinks[edit]

Is it possible to define (preferably on a link-by-link basis) that if a given link is a redlink, clicking it should do a defined preload? 10:55, 14 February 2012 (EST)

I'd like to do this as well. My usecase: When refactoring recurring code as templates I often write the call to the not-yet-existing template and then create the template from the redlink. I'd like to preload the new template with some predefined text for the template documentation (e.g. purpose, usage, styling, etc.). Nakohdo (talk) 11:46, 7 September 2018 (UTC)
This is functionality I've been looking for the past few days. My usecase is to preload some sections to new pages being created for organizational consistency across my wiki. 19:57, 5 December 2018 (CST)

Redirection[edit]

If a redirect page is designated as the preloaded page, its target page is actually preloaded.

For example,

  • A page named "Foo" redirects to "Bar" (#redirect [[Bar]]).
  • If an URL designates "Foo" as a preloaded page (http://domain/w/index.php?...&action=edit&preload=Foo),
  • "Bar" will be preloaded in the text box.

I checked this out, but the current manual does not describe it. Somebody add it, please. --Yes0song (talk) 11:34, 8 June 2012 (UTC)

FYI: Use redlink=1 with preload to change action modes if the page exists[edit]

I found a way to get a link with a preload to change actions depending on whether or not the page exists.

In my project, we're trying to automate the process of creating new pages with the right names, branch locations and--ideally--some common boilerplate text. Preloading seemed the best way to do this. For this to work, users click on the same link in a parent page to either create/preload the new page (if it doesn't exist) or view the page (if it does exist). We're using an older version of wikimedia (1.15?) and I don't have control over it, so a lot of the extensions aren't available to me. I also don't know if it's some unique situation with the way our corporate namespace is set up.

Using preload as described on this page worked great to frontload some content when creating a new page. The only problem was that, once the page was created, it continued to open in edit mode. That was a non-starter. I needed it to open in view mode. I played around with the parameters and found a combination that seems to work right:

https://<corp domain>/index.php?title=<the new page title>&action=edit&redlink=1&preload=<name of preloading source page>

Hope this helps someone besides me!--SellaR 02:51, 4 December 2013 (UTC)

Indeed, this just helped me ;) Od1n (talk) 10:18, 4 February 2018 (UTC)
thank you. I wish i woud have found this earlier :P. Cheers Tabat666

Passing parameters through an inputbox[edit]

I want to use a parameter. I figured out how to specify that in the URL, but what I need now is to be able to specify that parameter in the Extension:Inputbox (which makes a button). Does anyone know if that's possible? Whatamidoing (WMF) (talk) 19:17, 10 November 2014 (UTC)

@Whatamidoing (WMF): As soon as someone merges gerrit:158906, you'll be able to do it. Jackmcbarn (talk) 04:57, 11 November 2014 (UTC)
Cool! @Whatamidoing (WMF): It will be great if you could document this at the InputBox extension's page as soon as this was merged. --[[kgh]] (talk) 14:38, 12 November 2014 (UTC)
Thanks! I'm looking forward to this. In the meantime, I think I'll come up with a backup plan, because I want to use this now, and even if it gets merged this minute, it will be a while before it percolates through the system. And, yes, if it works, there will be documentation, because I don't want to have to figure out how to do this more than once! Whatamidoing (WMF) (talk) 21:13, 12 November 2014 (UTC)
Great, that's the spirit! Cheers --[[kgh]] (talk) 21:17, 12 November 2014 (UTC)

Create pages with preloaded text without editing them first[edit]

Hi,

is there a way to create a page with a preloaded templated and see the page already created without going through the editing area?

Basically I am using the InputBox extension to let the user create a subpage on Special:MyPage/ and I want that the he can see the new page without saving it first. I saw there is a preview parameter that can be triggered but I would really like to know if this can be avoided and the subpage can be saved and visualized with the preloaded text in just a single step.

Please provide a worked example for Wikimedia projects[edit]

Hi

I'm really struggling to make this work, I'm going to ask for specific help elsewhere but it would be very very useful to have a worked example.

Thanks

--John Cummings (talk) 11:45, 23 May 2018 (UTC)