Extension talk:NumerAlpha

Jump to navigation Jump to search

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)


Notice: Undefined index: "full level prefix"

2
Summary by Kghbln

Tracked with task T213083.

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

Reply to "Notice: Undefined index: "full level prefix""

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

how to suppress the "<br/>"

2
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}}

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.

Reply to "Error"
There are no older topics