I'd like to see a list of all the accounts that have been created on my wiki. Is this possible?
On Sat, 29 Jan 2005 17:19:42 +0000 (UTC), Rusty Shackleford rs@natchie.mine.nu wrote:
I'd like to see a list of all the accounts that have been created on my wiki. Is this possible?
[[Special:Listusers]]
When I use a wiki extension to pass "Grätz" to this function:
function convertSpecialCharsForSearchStr( $input ) { $output = $input; $output = ereg_replace("ä","%", $output); } The special character doesn't match anything in a reg ex, or a comparison operation (eg "if $input == "Grätz" fails the comparison, even though $input contains the string "Grätz").
I get this:
'Grätz' , instead of this:'Gr%tz'
However, if I assign the $input variable the same value as a literal (as a debug test), or do the "artificial manipulation" described below, it works, replacing the " ä " successfully.
I've had to do this artificial manipulation to get it to work:
if (ereg("Gr.+tz", $input)) { $theKreis = 'Grätz'; } else { $theKreis = $input; }
I have the same problem when using the value passed from the wiki extension in an SQL query. I have to use the above manipulation, or else the "WHERE" phrase that uses the value won't work properly.
If I display the un-manipulated value (as a debug), it displays correctly.
Why can't I use the value as passed from the wiki expression? Is there a simpler way to fix this, some sort of conversion function? For the data that I'm working with for the next several months, there is only one Kreis that uses special characters, but that could change later.
James Birkholz admin, Posen-L mailing list and website http://www.Posen-L.com
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
=James Birkholz= wrote: | When I use a wiki extension to pass "Grätz" to this function: | | function convertSpecialCharsForSearchStr( $input ) | { | $output = $input; | $output = ereg_replace("ä","%", $output); | } | The special character doesn't match anything in a reg ex, or a | comparison operation (eg "if $input == "Grätz" fails the comparison, | even though $input contains the string "Grätz").
Most likely, your wiki is in UTF-8 and you're editing your source files in some 8-bit encoding.
- -- brion vibber (brion @ pobox.com)
Are there other encoding choices for the wiki? Or should I just leave this solution as it is?
At 04:40 PM 1/30/05, you wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
=James Birkholz= wrote: | When I use a wiki extension to pass "Grätz" to this function: | | function convertSpecialCharsForSearchStr( $input ) | { | $output = $input; | $output = ereg_replace("ä","%", $output); | } | The special character doesn't match anything in a reg ex, or a | comparison operation (eg "if $input == "Grätz" fails the comparison, | even though $input contains the string "Grätz").
Most likely, your wiki is in UTF-8 and you're editing your source files in some 8-bit encoding.
- -- brion vibber (brion @ pobox.com)
mediawiki-l@lists.wikimedia.org