Extension talk:SearchLog.php
From Organic Design wiki
Problem with UTF8 chars
The search log incorrectly displays UTF-8 characters (as black diamonds with question sign inside). Could you help to fix that?
- The UTF-8 is converted automatically when in the source code of an html page, to stop it rendering you need to escape wither the & or the # with its UTF-8 code e.g.
- To display ¼ as ¼
- you can use a regular expression to convert the # into # --Sven 11:32, 8 February 2008 (NZDT)
- At about line 95 if you change the for loop to;
that should now show the raw UTF-8 characters --Sven. If the regex converted the &'s then unicode like '→' would also be converted to → --Sven 11:39, 8 February 2008 (NZDT)
- Can you download the new version and see if it what you want, you can test it on this wiki at Special:SearchLog --Sven 12:11, 8 February 2008 (NZDT)
- That does not help. If yor need, I could send you my log - it is small. By the way, in the code you wrote
- what is correct? And Special:SearchLog does not work: I see no statistic. --Konstbel 06:17, 13 February 2008 (NZDT)
- the fix is in Extension:SearchLog.php (diff). The Special page lookslike it is useable only by the Sysops, it should be accessible to test now. I have found another issue with ^M's stuffing up the log file, so I will have to address that, probably with a regex m/\r//g; --Sven 08:46, 13 February 2008 (NZDT)
- Yes, I've downloaded it, but it does not help. The only difference I see is a replacement of "&", but "&" is absent in my log. I've downloaded my log to File:Wikilog.doc (its a plain text, not MSWord document), could you look? --Konstbel 22:59, 13 February 2008 (NZDT)
- That's fun: I see russian word in your Special:SearchLog, but new searches do not logged aren't they? --Konstbel 23:05, 13 February 2008 (NZDT)
- I have tested your log see;
- the fix is in Extension:SearchLog.php (diff). The Special page lookslike it is useable only by the Sysops, it should be accessible to test now. I have found another issue with ^M's stuffing up the log file, so I will have to address that, probably with a regex m/\r//g; --Sven 08:46, 13 February 2008 (NZDT)
- what is correct? And Special:SearchLog does not work: I see no statistic. --Konstbel 06:17, 13 February 2008 (NZDT)
These characters do not look right to me. Were your searches russian characters that were different to that? --Sven 06:25, 14 February 2008 (NZDT)
Searches containing ^M (\r) characters
The log file formatting seems to be getting stuffed up by ^M characters e.g.
20080212,08:06:16,195.225.177.39,go,pezos fimipufo gakma^M <a href="http://ka282141.ru7xdjv.net/sitemap23.html ">lota</a> http://ka282141.ru7xdjv.net/sitemap23.html [url=http://ka282141.ru7xdjv.net/sitemap23.html ]livi[/url] wosub 20080212,22:54:52,161.53.9.39,go,Only for you:^M <a href="http://volny.cz/topamax/">Topamax</a>^M <a href="http://condylox.hit.bg/">Condylox</a>^M <a href="http://enterprisecar.hit.bg/">Enterprise rent a car</a>^M <a href="http://cardealer.hit.bg/">Car dealer</a>^M ^M See you!
It probably needs a search and replace s/\r//g; --Sven 08:52, 13 February 2008 (NZDT)