Extension talk:RandomInclude

From MediaWiki.org

Jump to: navigation, search

Contents

[edit] Feedback about version 1.0

[edit] Questions

[edit] Feature requests

  • The caching disabling should be page-specific, maybe part of the extension. --166.70.232.84 13:37, 21 December 2006 (UTC)
    Thank you for your feedback. It seems that version 1.0.2 can work without disabling the cache. --Fernando Correia 16:17, 21 December 2006 (UTC)
  • Ignore text between "noinclude" tags. This would allow to insert in the random text templates some text that would be shown to users viewing the template, but that would not be inserted as random text. --Fernando Correia 19:40, 21 December 2006 (UTC)
  • I realize that this might be out of date (good news, btw, it works on version 1.11.x!), but I was wondering if it would be possible to use it in a template. As of now, if you include {{#random:}} in a template, it spits out the entire list, not just the individual ones. Unless I'm doing something wrong. 66.168.102.87 21:15, 3 February 2008 (UTC)
  • I'm having the same issue with {{#random:}} spitting out the entire list. 207.154.82.33 05:21, 27 March 2008 (UTC)

[edit] Bugs

[edit] Eats white space (solved)

  • If using the "white space at begining of line" to show a box around the text, it seems that the white space is "eaten" by the RandomInclude just for the first line of each section. I mean, if I write this (note the blank at the begining):
Line 1
Line 2
Line 3
  • It is showed like this:

Line 1

Line 2
Line 3
  • As an alternative solution I have used the < pre > tag.
    Otherwise the extension works wonderfully. You can see it in use here.
    Pululante --52.159.64.103 10:43, 8 February 2007 (UTC)
Version 1.1.0 allows the use of spaces on the first line of an entry. But this doesn't seem to work on the first entry, because when the extension receives it, the first space has already been removed. To circumvent this create a blank entry before the first entry. Blank entries are now ignored. See example below. --Fernando Correia 17:19, 8 February 2007 (UTC)
----
 first entry, line 1
 first entry, line 2
 first entry, line 3
----
 second entry, line 1
 second entry, line 2
 second entry, line 3

[edit] Template Spits out Entire List (workaround exists)

This was previously listed as a requested feature, but I think it's a bug. When using the

{{#random:{{Tips}}}}

tag, we get the entire list wrapped with

<random></random>

instead of a single element. --Yoderj 23:07, 4 May 2008 (UTC) An alternative to the {{#random:{{Tips}}}} syntax is to use

{{#tag:random | {{Tips}}}}

. This worked with MW 1.12 for me. --98.223.150.194 01:15, 5 May 2008 (UTC)

This sounds like a bug in the new parser. I'll try to get time to look into it. Jeblad 00:27, 28 August 2008 (UTC)
It also doesn't work within raw HTML sections:
<div>
{{#tag:random | {{:Tips}} }}
</div>

[edit] Contributors

Source code contributors:

[edit] Version history

[edit] 1.0.0

Release date: 2006-12-21

  • Initial release.

[edit] 1.0.1

Release date: 2006-12-21

  • Hide section edit links.

[edit] 1.0.2

Release date: 2006-12-21

  • Disable parser cache for pages that use this extension.
  • Solve a bug with a title on the first line.

[edit] 1.1.0

Release date: 2007-02-08

  • Ignores blank entries.
  • Supports spaces on the first line of an entry. Note: this doesn't work on the very first entry.

[edit] 1.2.0

Release date: 2008-04-14

  • Additional keywords
    • pattern to use as boundary between items
    • separator rendered between items
    • count number of items
    • limit on runaway loop
    • period as minute, hour, day, week or seconds (integer)
    • mode is none or ordered depending on count
    • cache strategy, set to 'disable' to do no caching

[edit] 1.3.0

Release date: 2008-04-14

  • Additional keyword
    • format string to do dpl-style of formating

[edit] 1.3.1

Release date: 2008-04-14

  • Bugfix, missing format keyword in parser function

[edit] 1.3.2

Release date: 2008-04-22

  • Bugfix, int changed with intval
  • added seed keyword

[edit] 1.3.3

Release date: 2008-04-22

  • Bugfix, noeditsection interfers with the parser

[edit] 1.3.4

Release date: 2008-04-23

  • Bugfix, pattern was not consistently handled

[edit] 1.3.5

Release date: 2008-04-27

  • added hash keyword (avoid use of seed as it might interfer with other functions)

[edit] Formatstring as dpl

There should be an option to use a formatstring like the one used for DPL. 87.248.11.164 08:44, 14 April 2008 (UTC)

[edit] Better cache strategy

There should be a better cache strategy to avoid completly disabling the cache. Jeblad 10:11, 14 April 2008 (UTC)

[edit] Random seed

Use of random seed interfers with other use of the rand function. Also not every implementation respects setting the seed value. Jeblad 09:58, 26 April 2008 (UTC)

[edit] Not Working With MW 1.13

I just installed MW 1.13, and tried to use RandomInclude as I had before, But the include only adds the entire text of the RandomInclude.php file into my page instead of working as an extension, if that makes any sense at all. Anyone else experiencing this? Any Fix?

See [1] Jeblad 00:28, 28 August 2008 (UTC)

[edit] The "period" parameter

Hi everybody,

I'd like to put a random text every day, so I used the syntax : {{#tag:random | {{MyPage}} | period=day}}

But when I refresh, my text keeps changing during the day. Do you have an idea about how to fix this problem ?

Thank you for your help --Marineam 17:39, 19 March 2009 (UTC)

What kind of system is the host for the wiki? Is it a Unix system? If "time" does not return a unix epoch integer it may behave like you describe. Jeblad 16:41, 25 April 2009 (UTC)