Extension talk:NumerAlpha

About this board

This is my first extension so I hope you'll find it useful as I do. --Kronoxt 15:11, 9 May 2009 (UTC)


How to make the number text as Superscript

1
Lotusccong (talkcontribs)

It is possible to customise using CSS or source code to make the number text as Supverscrit instead of normal text ?

Reply to "How to make the number text as Superscript"

how to suppress the "<br/>"

3
Summary by Revansx

solved with {{#counter:listcount}}

Revansx (talkcontribs)

The extension works great. Thank you. However, I am trying to discover how I can create "inline" auto-numbering and this extension would work well for this if I could find a way to supress the the <br/> suffix that shows up with every <in />. Thanks!

Revansx (talkcontribs)

solved with {{#counter:listcount}}

Lotusccong (talkcontribs)

Can we customise it with CSS to remove the <br/> instead of using {{#counter:listcount}} ?

Prefer to use inline tag without the <br/> afterwards.

Reply to "how to suppress the "<br/>""

Will this extension be a Parsoid fatality?

3
Summary by Kghbln
Kghbln (talkcontribs)
Kghbln (talkcontribs)
Rand(1,2022) (talkcontribs)

I almost can't imagine MediaWiki wouldn't have a solution for something so fundamental. It may be worth having a look at the Cite extension, which is another extension that needs to assign numbers sequentially, but has been rewritten to make it Parsoid-proof in the future.

Edit: I went ahead and created a task: https://phabricator.wikimedia.org/T337319

Reply to "Will this extension be a Parsoid fatality?"

Notice: Undefined index: "full level prefix"

4
Summary last edited by Seb35 20:52, 4 May 2023 11 months ago

Tracked with task T213083. Fixed from f792da2 (2023-05-04) and future REL1_41.

Revansx (talkcontribs)

anyone else seeing the following error:

Notice: Undefined index: full level prefix in /opt/htdocs/mediawiki/extensions/NumerAlpha/NumerAlpha.class.php on line 266

where line 266 of NumerAlpha.class.php is:

return htmlspecialchars( $list['full level prefix'] . $list[ 'prefix' ] . $counterValue . $list[ 'suffix' ] );

Imvuong (talkcontribs)

This works for me.

$fulL_level_prefix = (isset($list['full level prefix'])) ? $list['full level prefix'] : "";

$prefix = (isset($list['prefix'])) ? $list['prefix'] : "";

$suffix = (isset($list['suffix'])) ? $list['suffix'] : "";

return htmlspecialchars( $fulL_level_prefix . $prefix . $counterValue . $suffix);

Seb35 (talkcontribs)

I saw this warning also, and I +1 the fix for full level prefix defaulting to an empty string (it’s the default value defined in extractListOptions), but it’s not necessary to apply the same for prefix and suffix since the only calling functions are renderCounter and render(Numeral|Alpha|Roman)Tag and in both cases these other keys are provided.

Seb35 (talkcontribs)

I wrote a patch here, not exactly like proposed above, but similar: I defined the key 'full level prefix' when the functions are called.

Summary by Kghbln

Fixed in the meantime.

Kghbln (talkcontribs)

I get the following error message with the newest Mediawiki beta:

 Warning: Parameter 3 to ExtNumerAlpha::NumeralRender() expected to be a reference,
 value given in /var/www/mediawiki/includes/parser/Parser.php on line 3305

Changing

 function AlphaRender($text,$argv,&$parser){

to

 function AlphaRender($text,$argv,$parser){

and the other two alike solves this issue for me. Thanks for this extension!

This post was posted by Kghbln, but signed as Christoph Burgmer.

how to reset counter to 1 when using SRF

2
Summary by Revansx

solved using {{#expr:({{#counter:listcount}}-1)}} in the template called by SRF. It would be nice if the counter could truly be reset to 0 outside of the SRF calls.

Revansx (talkcontribs)

I have a simple semantic query such as

{{#ask:
[[Category:Foo]]
|?format=template
|?template=orderedtable
}}

where the template used the <in /> to enumerate the results.

Question is how does one "reset" the counter on the page so that the next inline query, say

{{#ask:
[[Category:Bar]]
|?format=template
|?template=orderedtable
}}

starts with "1". Thanks!

Revansx (talkcontribs)

by using

<span style="display:none;visibility:hidden;">{{#counter:listcount|type=numeral|set=0}}</span>
{{#ask:
[[Category:Bar]]
|?format=template
|?template=orderedtable
}}

and {{#counter:listcount}} in the template called by SRF, the best I can get is for each list in the page to start at "2".

There are no older topics