User talk:Pastakhov
Add topicThis page used the LiquidThreads extension to give structured discussions. It has since been converted to wikitext, so the content and history here are only an approximation of what was actually displayed at the time these comments were made. |
Sie erhalten einen Orden!
[edit]![]() |
Der Technikerorden |
Heiya Pavel, thank you so much for working on some quite popular extensions and making them fit for the future, e.g. MagicNoCache or NumberFormat. MPDF seems to be a cool one too though I have not tried so far. Cheers and kudos to you [[kgh]] (talk) 09:56, 30 November 2012 (UTC) |
TODO MultiMaps for nablawiki.ru
[edit]- на картах не хватает масштабной линейки (зато на карте Яндекса целых два скролла)
- на nominatim.openstreetmap.org сделана очень удобная штука — в углу показываются координаты курсора.
Маркеры в MultiMaps можно указывать только из вики-файлов?ДОБАВЛЕНО в 0.5.0что-то работает не такИСПРАВЛЕНО в 0.4.1, весь javascript код переписан в 0.4.2. нужно проверить Pastakhov (talk) 17:54, 23 May 2013 (UTC)
- 4. Проверено, принято, все замечательно ) Спасибо большое! Эксперимент с 1.20.5 уже неактуален? А то мне контент для отката на эту версию нужно через XML-дамп перезаливать, с копией текущей базы работать не захотела. StasR (talk) 17:46, 26 May 2013 (UTC)
- Нет, экспериментировать уже не нужно. Я нашел рекомендации по использованию ResourceLoader и сделал все как доктор прописал. Pastakhov (talk) 04:20, 27 May 2013 (UTC)
- По пункту 3. Предположил, что Вы задумались над концептуально правильным интерфейсом, и поэтому решил пока сделать по рабоче-крестьянски ;-)
- Методом тыка нашел подходящее место и поправил Marker.php:
- 1) в конструкторе добавил новое имя параметра:
$this->availableProperties = array_merge(
$this->availableProperties,
array( 'icon', 'econ' )
);
- 2) в public function setProperty($name, $value) добавил elseif:
elseif( strtolower($name) == 'econ' ) {
$name = 'icon';
}
- Соответственно, появилась возможность задавать у маркера параметр «
econ=полный-URL
». Первичные эксперименты прошли успешно. StasR (talk) 23:26, 7 January 2014 (UTC)- Извиняюсь, за столь долгое отсутствие активности по данному вопросу.
- Так как вы сделали, делать нельзя из-за проблем с безопасностью.
- Злоумышленник сможет получить доступ к вики с правами любого из участников.
- Я займусь этим сегодня. Pastakhov (talk) 03:30, 8 January 2014 (UTC)
- Спасибо ) Я за ночь уже понял дырявость конструкции и как раз думал над тем, как это закрыть без излишней громоздкости. StasR (talk) 07:33, 8 January 2014 (UTC)
- Обновил. Чтобы работало нужно в
LocalSettings.php
послеrequire_once "$IP/extensions/MultiMaps/MultiMaps.php";
указать$egMultiMaps_IconAllowFromDirectory=true;
- и указать путь к папке с изображениями в переменной
$egMultiMaps_IconPath
. По умолчанию это$egMultiMaps_IconPath = "$wgScriptPath/mapicons";
- Иконки можно указывать из этой папки и из папок вложенных в нее, имя в параметрах маркера должно начинаться с символа
/
пример здесь - Надеюсь все понятно :-)
- Там еще осталось дать возможность указать размер иконки и ее якорь + тень, но это уже не сегодня, думаю эти параметры должны будут перечисляться через двоеточие, типа:
icon=/mymarker.png:12,20:-6,-10:/shadow.png:14,22:-7,-11
. Так нормально? Pastakhov (talk) 09:38, 8 January 2014 (UTC)- Спасибо )
- Сейчас буду пробовать. StasR (talk) 10:04, 8 January 2014 (UTC)
- Погодь, оно тест на серваке не прошло, и не смержилось в репозиторий... Pastakhov (talk) 10:08, 8 January 2014 (UTC)
- Все, готово. Тест подправил. Pastakhov (talk) 10:16, 8 January 2014 (UTC)
- Поймал, вопрос отпал ) StasR (talk) 10:19, 8 January 2014 (UTC)
- Все, готово. Тест подправил. Pastakhov (talk) 10:16, 8 January 2014 (UTC)
- Погодь, оно тест на серваке не прошло, и не смержилось в репозиторий... Pastakhov (talk) 10:08, 8 January 2014 (UTC)
- А откуда брать-то? StasR (talk) 10:17, 8 January 2014 (UTC)
- Хороший вопрос, я обычно с git беру :-)
- Скачать можно по ссылке
Git master
это где Download snapshot (Git master) Pastakhov (talk) 10:22, 8 January 2014 (UTC)- Вопрос был задан, когда на сервере еще не было чаемого ) StasR (talk) 10:39, 8 January 2014 (UTC)
- Есть ощущение, что для OSM позиция «альтернативных» иконок вычисляется неправильно. Может быть такое?
- Вот тут под таблицей участков есть три ссылки, на все три сервиса. StasR (talk) 11:13, 8 January 2014 (UTC)
- А она не вычисляется совсем. Нужно будет указывать размер иконки и точку, которой она указывает на карту (якорь). Завтра постараюсь добавить возможность указывать это. Pastakhov (talk) 11:25, 8 January 2014 (UTC)
- Иконки для OSM размещены категорически не так, как у Яндекса и Гугла, они показывают на точку левым верхним углом. StasR (talk) 11:29, 8 January 2014 (UTC)
- Они везде не так размещены, просто у OSM этот нетак нетакее... Pastakhov (talk) 12:08, 8 January 2014 (UTC)
- Иконки для OSM размещены категорически не так, как у Яндекса и Гугла, они показывают на точку левым верхним углом. StasR (talk) 11:29, 8 January 2014 (UTC)
- А она не вычисляется совсем. Нужно будет указывать размер иконки и точку, которой она указывает на карту (якорь). Завтра постараюсь добавить возможность указывать это. Pastakhov (talk) 11:25, 8 January 2014 (UTC)
- Обновил. Чтобы работало нужно в
- Спасибо ) Я за ночь уже понял дырявость конструкции и как раз думал над тем, как это закрыть без излишней громоздкости. StasR (talk) 07:33, 8 January 2014 (UTC)
- Нет, экспериментировать уже не нужно. Я нашел рекомендации по использованию ResourceLoader и сделал все как доктор прописал. Pastakhov (talk) 04:20, 27 May 2013 (UTC)
- Скачайте версию 0.5.0
- Размер, якорь и тень можно задать сразу для всех маркеров.
- В вашем случае это должно быть как-то так
{{ {{#MultiMaps: ...
| icon = :39,30:11,30 }}
Pastakhov (talk) 13:52, 9 January 2014 (UTC)- Спасибо! Пошел пробовать. StasR (talk) 17:22, 9 January 2014 (UTC)
- Спросил в Набле, но уже было поздно, мы там тему закрыли. Вопрос такой. Ни в одном из режимов предварительного просмотра карты не грузятся (и на телефонах не грузятся вовсе, что особенно обидно). Это как-то исправляемо, или неотвратимое свойство используемой технологии? StasR (talk) 19:17, 15 January 2014 (UTC)
- Если имеется ввиду режим предварительного просмотра который написан на javascript в виде вкладки сверху, то там сделать не проблема. Я сам не пользуюсь и просто забыл про это.
- А что касается телефонов, то тут нужно рассматривать конкретные случаи. На моем Galaxy S3, S4 в хроме и firefox все работает. Мне нужно знать модель телефонов, браузеры и URL на которых не работают карты. Pastakhov (talk) 03:04, 16 January 2014 (UTC)
- С предварительным просмотром проблема серьезная. Эта вкладка не умеет подгружать необходимые скрипты и запускать их. В общем это ограничения самой вкладки предварительного просмотра. Может и умеет, но я не нашел никаких примеров и описания подобного. Если вы где-то видели подобное, дайте знать. Pastakhov (talk) 06:24, 16 January 2014 (UTC)
- Все, что связано с js, обычно как минимум в одном из двух предварительных просмотров работает плохо, и с этим, в конце концов, можно смириться. А вот это огорчает. Я плохо сформулировал, проблема не в телефоне как таковом, а в мобильном фронтенде. StasR (talk) 19:38, 17 January 2014 (UTC)
- Похоже эта проблема именно в мобильном фронтенде. Расширение maps тоже не грузится. Очень жаль, но похоже что я не могу как-то повлиять на это. Если будет что-то зависеть от меня, я обязательно исправлю это. Pastakhov (talk) 09:53, 18 January 2014 (UTC)
- Понял, спасибо. StasR (talk) 12:06, 18 January 2014 (UTC)
- Похоже эта проблема именно в мобильном фронтенде. Расширение maps тоже не грузится. Очень жаль, но похоже что я не могу как-то повлиять на это. Если будет что-то зависеть от меня, я обязательно исправлю это. Pastakhov (talk) 09:53, 18 January 2014 (UTC)
- Все, что связано с js, обычно как минимум в одном из двух предварительных просмотров работает плохо, и с этим, в конце концов, можно смириться. А вот это огорчает. Я плохо сформулировал, проблема не в телефоне как таковом, а в мобильном фронтенде. StasR (talk) 19:38, 17 January 2014 (UTC)
- С предварительным просмотром проблема серьезная. Эта вкладка не умеет подгружать необходимые скрипты и запускать их. В общем это ограничения самой вкладки предварительного просмотра. Может и умеет, но я не нашел никаких примеров и описания подобного. Если вы где-то видели подобное, дайте знать. Pastakhov (talk) 06:24, 16 January 2014 (UTC)
Marking extensions as security risks
[edit]Unless you've actually tested these extensions and have found vulnerabilities, don't arbitrarily mark them as vulnerable. I've reverted your edit to my extension (Extension:RegexFunctions) until you can email me proof that such a vulnerability actually exists and how to exploit it. I'm going to go through the code of the other two extensions you marked and see if they are vulnerable as well from a cursory glance, but I encourage you to contact their authors as well if you actually managed to find a way to exploit them. Skizzerz 15:39, 14 June 2013 (UTC)
- I mark them as vulnerable, because they have real security problem. I send sample to you by email. Pastakhov (talk) 17:18, 14 June 2013 (UTC)
- If you find security issues with extensions, Please file a appropriate bug in our bugzilla under "Security → General" Peachey88 (talk) 07:03, 15 June 2013 (UTC)
- I'm curious how did you put a null byte in a mediawiki article? Even if it's in the database it's transformed into \xFFFD (probably as part of some utf8 sanitizing)...
- And I see no way to generate null byte using regex parser function itself, either...
- So - HOW? :) VitaliyFilippov (talk) 12:05, 7 October 2013 (UTC)
- It is simply. {{#urldecode:%00}} Pastakhov (talk) 12:32, 7 October 2013 (UTC)
- :) easy as pie, thanks.
- FYI: I've fixed RegexParserFunctions nullbyte vulnerability in mediawiki4intranet github repo of that extension - https://github.com/mediawiki4intranet/RegexParserFunctions VitaliyFilippov (talk) 14:34, 7 October 2013 (UTC)
- It is simply. {{#urldecode:%00}} Pastakhov (talk) 12:32, 7 October 2013 (UTC)
MyVariables / current LOGGED user (wished feature)
[edit]Hello Pastakhov, I'm not experienced enough to take the risk to enrich by myself your MyVariable excellent extension, yet I'd need an extension we could call Template:CURRENTLOGGEDUSER that returns the same as Template:CURRENTUSER when the user is logged, but returns an empty string when the user is NOT logged, which info we can get from user.php line 2861 : 02861 public function isAnon() { 02862 return !$this->isLoggedIn(); 02863 } If it helps, I can try to write it on a private version I put on my own site, then share the files with you for you to review and publish. Please tell me what you think and if that sounds feasible. Best Regards Frederic (for site www.coetus.eu) 90.24.130.28 10:00, 23 November 2013 (UTC)
- Hello, Frederic. I'll do it next week Pastakhov (talk) 10:05, 26 November 2013 (UTC)
- I did it. Please, check version 3.1.3 Pastakhov (talk) 07:56, 29 November 2013 (UTC)
Yandex problem
[edit]Что-то в Яндексе поменялось и его карты перестало показывать. service=leaflet показывает, а service=yandex нет :-( StasR (talk) 06:56, 24 January 2014 (UTC)
- Почему-то они перестали выдавать тайлы по протоколу https. Я исправил это (версия 0.5.2), теперь используется протокол такой же, как и у вики. Это такой компромисс между тем как правильно и как работает.
- Кстати, wiki страницы кешируются и сразу может не заработать. Чтобы сбросить кеш, можно в адресной строке дописать ?action=purge. Pastakhov (talk) 08:26, 24 January 2014 (UTC)
- Спасибо, все заработало ) StasR (talk) 10:37, 24 January 2014 (UTC)
Hello, there's a question for you here. See also docs on gender etc.. Nemo 21:12, 13 July 2014 (UTC)
- Hello, thanks. This message is unused and I've removed it. gerrit:146434 Pastakhov (talk) 12:54, 15 July 2014 (UTC)
Some ideas regarding PhpTags
[edit]While I haven't yet used PhpTags beyond some quick testing, I've had a look at it and it seems quite interesting overall, because it seems like it could be relatively easily extended so that scripts can bring together functionality from several extensions.
I don't know what you plan for it, or how it is likely to develop from here on. Anyway, some ideas for uses of and possible extensions to PhpTags functionality came to mind in looking at it, and I'll mention them in case any of them may be interesting to you as well. It would be interesting to hear your thoughts about them:
- Automating sortkey generation for pages. This could currently be done using PhpTags Functions as follows: take the title of the calling page, use string functions to transform it, then use the returned result inside
{{DEFAULTSORT: }}
. The same can be done using Scribunto. But with PhpTags, it could easily be improved by adding a function to PhpTags Wiki so that the default sortkey can be set directly – with no need for returning something toDEFAULTSORT
any more. - Querying similar to DynamicPageList. I see that you've begun working on some query code, though while it's in Gerrit, it's not been merged yet. One comment in case it is helpful: Have you looked at Extension:DynamicPageListEngine? It is a modular, more well-written DPL implementation that only offers PHP and Lua APIs. Perhaps, for a number of querying features, its code may be a good reference to look at?
- Processing results from Semantic MediaWiki queries. Semantic Result Formats includes support for Extension:Arrays and Extension:HashTables, in both cases the results are efficiently stored in a PHP array. I think it would be quite simple to make a PhpTags extension to get and set arrays from the Arrays and HashTables extensions. Then a query can be made in the usual way, and afterwards PhpTags can be used to process the results in whatever way is desired.
- Semantic MediaWiki queries. An extension that allows SMW querying using PhpTags. This would take much more effort than the previous item, but would allow greater flexibility. PhpTags could be used to extend the functionality of Semantic MediaWiki inside a wiki – combining queries and processing of results however one wants, without having to write further extensions. I think the code of the Semantic Query Interface extension could be worth looking at for this.
If I decide to use PhpTags, then for my own needs I would need to extend it according to at least one of the last two options. That means one new, or possibly two new, MediaWiki extensions (which would be the first one(s) I'll ever write). Especially if attempting the second option, supporting SMW queries directly, that may take some time and effort. Anyway, I may give it a try, though no idea if and when it may be completed.
The other options in the list (the top two) are not as high priority for me. Maybe you'd be interested in the ideas, or maybe not. The first in the list may however be trivial enough for me to quickly add just to get more familiar with PhpTags, if you'd like the functionality. The second, I guess it may or may not fit what you have in mind with the querying functionality you have begun working on.
Finally, regarding performance: What I've seen mentioned ("10 times slower" than Lua for large scripts) sounds good enough for my purposes. However, that might improve even further simply by using HHVM, if it significantly speeds up PHP (and then in turn also PhpTags). It seems Wikimedia is now focusing on HHVM, and as of recently, MediaWiki-Vagrant also uses HHVM by default – you may already be aware of this, but I thought I'd mention it just in case, in case it would be useful for testing. JoelKP (talk) 16:53, 1 August 2014 (UTC)
- Hi, Joel, thanks for the message!
- You're the first person who showed interest in using this extension :-)
- You are right, this extension can to combine the functionality of other extensions and this is really simple, it needs to write just a few lines of code.
- The problem is that all of the available extensions are monolithic and I'm trying to make the constructor, where instead of the cubes are functions or classes, and anyone will be able to make of them what he needs.
- My plans are a very ambitious :-)
- The query code with which I've begun working is an alternative to {{#ASK: }} of SMW.
- At the first stage it will be similar the DynamicPageList and at the second stage I plan to develop a database similar to SMW.
- The peculiarity is that queries can be more flexible and automatically grouped to increase performance and reduce latency.
- Displaying query results will be using the PhpTags Widgets. There will be all sorts of user interface elements and such as fontawesome and foundation...
- I can't say exactly when this will be done and whether it is implemented at all. It's just what I wanna get. I have no deadline, I have a lot of fun :-)
- I started out using a magnificent SMW extension, but for me it was too confusing, large and unwieldy (most likely this is because I used it not on purpose).
- Now, regarding your needs.
- I'm going to do the first point anyway.
- I'm also not difficult to do for you 3 and 4 points, but I can't devote time to their further development and support.
- Also I can do the second point, but it seems it is not necessary to me nor to you.
- PhpTags also needs finishing improvement, such as cache for the compiler and category for pages with errors and probably other.
- Regarding performance: PhpTags is not designet for running PHP code like LUA in Scribunto, It is implementation Magic expressions therefore any comparison is incorrect. By pre-compiled to bytecode, it must run faster than Magic words with parameters. By easy initialization in general cases (when used properly) it is faster than Scribunto. Pastakhov (talk) 03:16, 4 August 2014 (UTC)
- If you make a PhpTags SMW extension, that's way more than I expected. :) I think I can then maintain it (and perhaps add further functionality, if needed) without problems. I'm keeping track of the development of the major extensions I use in any case, and then that would come to include both Semantic MediaWiki and PhpTags.
- Regarding being the only one (apart from you of course) showing interest in PhpTags, it seems to me that there is generally not much interest in scripting so far. That includes Scribunto as well, outside of the Wikipedia sites. This lack of interest is perhaps not so surprising, because as of yet, what has been made available does not add such great capabilities. When that changes, I think that's the time when interest in scripting extensions may increase in general.
- The plans you have sound very interesting, though I'd also expect that getting it all done, if that happens, will take quite some time. Though in the meantime, as PhpTags functionality is extended, it may sooner become the most powerful scripting extension thus far. Good luck, and I guess we'll see where it all goes. :)
- As for performance: I know that PhpTags doesn't directly run PHP code, but I was thinking that if PHP itself is speeded up, then the PhpTags bytecode interpreter would run the scripts faster. That may not be so important, though, since it performs well anyway. JoelKP (talk) 19:21, 6 August 2014 (UTC)
- Yes, I'm sure the users will be interested only after the widgets are implemented. But I was hoping to attract the attention of other developers to this solution but it's failed.
- All I have been told that the direct execution the code is not good, it is reinventing the wheel, it is slower than pure PHP while Lua is faster than PHP and then Scrubunto is the best choice.
- I tried to explain that this all wrong but I had been ignored. For me, it remains a mystery why this happened.
- May be the interest in scripting is not much, but it seems this is the only possible solution to resolve all problems at once. Prior to Scribunto have been other attempts to do this, for example: WikiScripts, StackFunctions, PHPTemplates, Winter and likely other.
- I strongly believe the best solution is upgrading Magic words. I removed the deficiencies and added new features in it and named this as Magic expressions. And I believe PhpTags has the best performance.
- Maybe I'm too chatty, just, I have been developing this solution for more than a year and you're first with whom I can discuss it. I sometimes think that all this nonsense and unnecessary. Thanks for the chat. I still know English not very well, but I hope you understand me perfectly. :-) Pastakhov (talk) 05:37, 7 August 2014 (UTC)
- Regarding communicating the ideas and not being understood by other developers, it seems to me that there's very different ideas about what scripting is to be used for. I think this may play a part, and that it is perhaps also related to which approach people take to wikis and the software they use. For example, Wikimedia is fairly conservative – the Wikipedias don't generally embrace new extensions that change how things are done, especially not how the content is structured and what is stored. (Some interface and workflow changes are exceptions.) So to them, scripting is not about combining the functionality of extensions – because they have fairly few things to combine. Instead, each "module" they write is like a little "extension" in itself, in the form of a script which uses more "standard" means. Together, the collection of such scripts forms a big codebase inside the wiki, used to accomplish tasks.
- At present, Scribunto is more suited to that kind of scripting. It requires sometimes large "modules" which depend on other modules – the modules build on one another to provide functionality.
- Then there are people who have a different approach to wiki software in general. You could say it is more "progressive" in the sense of a willingness to explore and experiment with new functionality and new ways of doing things. That includes advanced extensions that greatly change the "way" things are done on a wiki. Such people will notice both what is made possible by the software they use and/or develop, and the limitations. And then ideas such as PhpTags and "magic expressions" can more easily make sense: use scripts to combine all that advanced functionality you're interested in, removing the limitations and using it the way you'd like to. So I think such developers are the most likely to be interested.
- Finally, you will probably find that this question of "conservative vs. progressive" is a spectrum, a little bit like the political spectrum. In other words, you will also find a lot of people somewhere in the middle. Most of them (whether users and/or developers) are probably going to be more hesitant, waiting until they see something concrete done that they also find would work for them.
- Anyway, that's what I think regarding Scribunto vs. PhpTags: They are intended for two different problems – and which solution makes the most sense depends on which problem you think in terms of. JoelKP (talk) 07:29, 10 August 2014 (UTC)
- I have added property WPage::$DEFAULT_SORT_KEY.
- Example.
- I hope it is what you meant in the first point.
- Also I have requested space in Git for new extension PhpTagsSMW where I'll do 3 and 4 points for you. Pastakhov (talk) 06:04, 4 August 2014 (UTC)
- Yes, that's the feature I had in mind. :)
- And I see the repository is in place. Thanks a lot for doing this – as mentioned in the above reply, I can then maintain it in the future, and do any further development that comes to mind, if any. JoelKP (talk) 20:12, 6 August 2014 (UTC)
- I've added two objects (ExtArrays and ExtSQI) to repo.
- I was able to check the ExtArrays object, but I cannot check the ExtSQI object. it is in gerrit.
- As we've agreed, you yourselves will develop this extension, Chad has already added you to owners.
- For my part, I will provide all possible assistance and I will write documentation for developers.
- Feel free to ask me any questions :-) Pastakhov (talk) 16:26, 8 August 2014 (UTC)
- I've tested ExtArrays and will get to testing and finishing the ExtSQI addition next. Then we'll see how I continue, and I'll ask any questions that come up. :)
- For now, I ran into a problem/bug while testing ExtArrays, but I think it's unlikely the source of it is in the new code you added. See the message I added in gerrit for details. JoelKP (talk) 22:57, 8 August 2014 (UTC)
- Four eyes are better than two :-)
- There are still some code that has test covered is not enough. Thanks for the bug report.
- As you can see, I've made changes in PhpTags that are incompatible with older versions of extensions, so I had to update all PhpTags extensions. Pastakhov (talk) 09:56, 11 August 2014 (UTC)
- Regarding HHVM
- I installed MediaWiki-Vagrant at my computer and did test with 100100 loops. It took 2.062 sec therefore PhpTags in HHVM 5.5 times faster than in Zend PHP (11.462/2.062=5.56)
- Unfortunately, there are some compatibility issues bugzilla:69014. I'll test and fix it. Pastakhov (talk) 10:59, 13 August 2014 (UTC)
Some extension news that could perhaps be relevant to your goals for PhpTags
[edit]In case this might be helpful:
One of your goals was "a more flexible and fast alternative to semantic mediawiki". Some days ago, the developer Yaron Koren released the new extension Cargo, which is meant to be an alternative to SMW. (Announcement and discussion here.) I don't know how it compares to your vision, but it may be worth taking a look at. If it's a reasonably close match, I thought it might be useful to know about.
I've considered using it myself, but will wait for a while and see how it develops. But in short, the Cargo extension is:
- Much smaller and simpler than SMW, but capable of most of what SMW + several extensions are.
- Templates are simultaneously used for:
- Defining data tables. A wiki admin can perform a new action on such a page to generate the DB tables to be used for storage.
- Storing data into these tables by using the templates on pages.
- Querying works like "a thin wrapper around SQL", using the tables defined.
- Various interface elements are provided, based mostly on earlier extensions for SMW. That includes display formats for query results, as well as special pages for browsing data stored in a wiki.
It is also meant to be used with Semantic Forms, which no longer is dependent on SMW, and in the latest git version has additional support for Cargo data.
By the way, I've found Semantic Forms convenient to use together with PhpTags. Custom editing forms handle the use of templates on pages, and the templates can use PhpTags.
(As for CodeMirror, I currently don't use it, mainly because it doesn't work in Semantic Forms forms that use WikiEditor. This might simply be the known general problem for extensions that add things to WikiEditor. SF does not use #wpTextbox1
, but rather other identifiers. From a search, perhaps this could be useful if you are interested in adding support for SF in CM. However, one note regarding SF-related testing in MediaWiki-Vagrant, in case the following would also happen for you: I get strange JS errors with SF + WikiEditor that only happen on the MediaWiki-Vagrant setup.)
Also, an update on what I've been doing with PhpTags:
It is now in use on a wiki. The "Sortkey" PhpTags template automatically sets the sort key based on transforming a page title. Then there is one that stores an external link (with additional data: description, etc.) in a PHP array each time it is used. Another which is related is used once on a page to print the array contents as an "External links" section, if non-empty. (The point of this is to fill in the data when editing in Semantic Forms, and then show it on the page with standardized formatting.)
As for PhpTags SMW, I've gone slowly with it, working on and off to make something better for it to be a wrapper around than the old Semantic Query Interface extension. Ideas have recently developed and we'll see how it turns out as I work on it. JoelKP (talk) 15:31, 10 January 2015 (UTC)
- It sounds awesome and I will take a deep look into it.
- It is helpful information and it is very useful for me, thanks :-) Pastakhov (talk) 10:05, 12 January 2015 (UTC)
- Created task phab:T94872 Pastakhov (talk) 04:58, 3 April 2015 (UTC)
Starting conversion of LiquidThreads to Flow at mediawiki.org
[edit]Hello. I'm sending this to you, because you've been one of the top 50 users of LQT on mediawiki.org over the last 360 days,[1] and I wanted to make sure that you'd seen the announcement at Starting conversion of LiquidThreads to Flow at mediawiki.org. There are links in the topic-summary at the top, for other discussions (wikitech-l and Project:Current_issues), and a link to the planned process and timeline (scheduled to begin April 6, with smaller conversions at first). Please do test Flow out at Talk:Sandbox if you haven't tried it recently, and give any feedback/suggestions/requests at that main discussion location. Much thanks. Quiddity (WMF) (talk) 00:00, 28 March 2015 (UTC)
- I'm ready for this :-) Pastakhov (talk) 04:56, 3 April 2015 (UTC)
A barnstar for you!
[edit]![]() |
The Original Barnstar |
Multi Maps looks very good! [[User:Bmrberlin| Bernd M.]] (talk) 15:33, 12 August 2015 (UTC) |
Question Regarding PHP Tags
[edit]Hi Pastakhov
I download the MediaWiki PHP Tags Extension.
Created the Library in the 'Extensions Folder' and made the entry into the LocalSettings file.
When I attempt to launce MediaWiki I get an error and the Wiki does not load. If I take the entry out of the LocalSettings file, the Main Page comes up fine.
Any suggestions?
Thank You KurtWBennett (talk) 17:19, 6 November 2015 (UTC)
- Hi, it would be more helpful to have additional info.
- What error message you get?
- Also what version of MediaWiki and PHPTags extension you use? Pastakhov (talk) 13:51, 8 November 2015 (UTC)
Улучшение страниц Extension:PhpTags Functions
[edit]Павел, не будет ли возражений, если я добавлю к именам функций на подстраницах ссылки на php.net?
Я собираюсь сейчас делать достаточно объемную wiki с использованием PhpTags, и мне кажется удобным иметь возможность легко переходить к описаниям функций (ибо я совсем не php-программист, и одних названий функций мне недостаточно) StasR (talk) 09:56, 16 November 2015 (UTC)
- Я не против. Просто это будет работа, которую я собирался сделать автоматически, но руки не дошли.
- Вообще все эти функции, методы, классы и прочее включая документацию и ссылки на php.net по задумке должны были идти в комплекте с расширением CodeMirror и быть похожим на настоящий IDE. Вся эта информация уже есть в PhpTags осталось только допилить CodeMirror.
- И тут есть две новости, хорошая и плохая.
- Уже один проект хочет использовать PhpTags и помогать финансово, значит дело будет двигаться быстрее. А будет он это делать не ранее нового года и сейчас я занят тем, что помогаю ему запуститься и это не связано с PhpTags. В общем это все будет, но не прям сейчас. Pastakhov (talk) 15:35, 16 November 2015 (UTC)
- Понял, спасибо за информацию. С ошибками сейчас дергать, или пока у Вас реально на это времени нет? StasR (talk) 15:43, 16 November 2015 (UTC)
- С ошибками дергайте. Их не трудно исправить, просто это расширение большой хак в угоду производительности. И хоть я и сделал кучу проверочных тестов, все равно покрыть тестами все возможные варианты и сочетания использования очень трудно. Добавляю по мере нахождения ошибок.
- Например создание массива оптимизируется на сколько это возможно, и вот вы нашли ошибку в этом оптимизаторе которая проявляется при создании массива из значений другого массива. Pastakhov (talk) 15:53, 16 November 2015 (UTC)
Resolved
[edit]Genrydenry (talk) 15:01, 17 June 2016 (UTC)
Котёночек для вас!
[edit]
За труды!
Martynov Maxim (talk) 20:09, 5 July 2016 (UTC)
Martynov Maxim (talk) 20:09, 5 July 2016 (UTC)
mPDF - export only main part of wiki
[edit]Hi Pavel,
We use your mPDF extension in our mediawiki. But if I do export to pdf I got in the pdf file
whole content of the page. Including left menu, header and footer. Is there any way how to
export to pdf only main content (main window) of the mediawiki page ?
We use mediawiki 1.27 and mpdf 5.7.4.
Thank you
Luboš Lobokn (talk) 10:20, 29 September 2016 (UTC)
- Hi Luboš, it should export only main content, it depended of skin styles. Do you view left menu and footer on page preview (when you pressed print in your browser).
- And try latest mpdf version 0.6.0, maybe the problem already fixed there.
- I tested on my mediawiki 1.27 + mpdf 0.6.0, it exports the same as printable version (it should be exactly so) Pastakhov (talk) 09:53, 30 September 2016 (UTC)
- Hi,
- I tried 0.6.0 , but the result is the same. There is no left menu in printable version .
- I used monobook skin. Du you have any idea where can I manage what can bee
- seen in printable version in monobook skin ?
- Thanks
- Luboš Lobokn (talk) 12:33, 30 September 2016 (UTC)
- It works fine for me with mw 1.27 + mpdf 0.6.0 + monobook skin.
- You can see it there http://test.foxway.org/wiki/PhpTags?useskin=monobook&action=mpdf Pastakhov (talk) 06:03, 3 October 2016 (UTC)
- Hi,
- finally I got it working with one exception.
- In printable version I can see page, with page title, but if I export it to pdf there
- is no page title in content of pdf. Page title is only as name of the generated file.
- Do you have any suggestion, where can I take a look or what to set different way ?
- Thanks
- Luboš Lobokn (talk) 13:15, 4 October 2016 (UTC)
- Hi, mPDF exports printable version of page, you can see it if add parameter printable=yes to url of page.
- For example:
http://example.com/wiki/Main_page?printable=yes
- OR -
http://example.com/w/index.php?title=Main_page&printable=yes
- Also you can see html page which converted to pdf by mPDF library adding parameter format=html to url:
http://example.com/w/index.php?title=Main_Page&action=mpdf&format=html
Pastakhov (talk) 17:20, 4 October 2016 (UTC)
Maintainers of CodeMirror
[edit]Hello Pavel! I wanted to let you know I've added CodeMirror to Developers/Maintainers since it is a WMF deployed extension. I added Community Tech as the responsible team at WMF. There is also a column for "Maintainers". Did you want to add yourself? I think this means that if there is a "Unbreak now!" on Phabricator, you might get pinged. We will of course be there to reply to "Unbreak now" as well, but I wasn't sure if you were OK with me adding you. If not that is OK :)
Regards — MusikAnimal talk 02:53, 20 October 2017 (UTC)
- Hello MusikAnimal,it is ok :)
- I added myself to maintainers, thanks for the link. Pastakhov (talk) 05:22, 20 October 2017 (UTC)
PhpTagsFunctions
[edit]I would like to add a new function to your PhpTagsFunctions Extension. Could you please give me a few initial steps to help me with the implementation? Thanks and kind regards David goudie 2A02:120B:2C4C:40F0:C80E:70FB:BF72:874D (talk) 18:46, 29 March 2018 (UTC)
- Hi David, I'll provide the steps and examples Pastakhov (talk) 17:47, 30 March 2018 (UTC)
- Even a very simple example would be a create help. Thanks David 2A02:120B:2C4C:40F0:E1D1:FC74:628:2F3C (talk) 19:21, 14 May 2018 (UTC)
- Even a very simple example would be a greate help. Thanks David 2A02:120B:2C4C:40F0:E1D1:FC74:628:2F3C (talk) 19:23, 14 May 2018 (UTC)
- Sorry David, hard busy. there a lot of examples in PhpTagsFunctions, PhpTags Wiki, PhpTags Widgets.
- for example see commit https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/PhpTagsFunctions/+/799761d90228cbaf95f49a407ba0dde60f38d0ce%5E%21/#F0 I added uuid_create function there. Pastakhov (talk) 17:59, 15 May 2018 (UTC)
A beer for you!
[edit]<figure-inline>![]() |
I am so fortunate to get CodeMirror today! Thanks a lot! |
Zjnlive (talk) 10:28, 30 March 2018 (UTC)
Extension:NumberFormat
[edit]Hi Pastakhov, Sorry to bother you, I left a comment on Extension talk:NumberFormat. Thanks in advance for having a look on it. --Uncopy (talk) 21:20, 26 October 2018 (UTC)
Extension MagicNoCache
[edit]Sorry to bother you. Please see Extension talk:MagicNoCache Aloist (talk) 16:17, 14 December 2018 (UTC)
Extension MultiMaps: T210033
[edit]Hi Pavel, Is there any chance you could review https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/MultiMaps/+/494860/? FellTiger (talk) 23:59, 15 March 2019 (UTC)
- Oh, thank you for your contribution, I'll review it. Sorry, I'm hard busy and missed your patch, thanks for the message. Pastakhov (talk) 08:29, 17 March 2019 (UTC)
- Sorry, to bring this up again, but I am afraid that I will forget more and more why I implemented some things the way I did. Additionally, most of the changes are white space changes. I pushed all the files I edited through a style fixer, so that they comply with the coding conventions.
- In case you have lost interest in this extension, I can also offer to become the maintainer, but I would not prefer that because I do not have a lot of experience with MediaWiki coding and PHP in general.
- Please let me know what you think! FellTiger (talk) 16:49, 23 March 2019 (UTC)
- I'm interesting in the extension and I am grateful for your contribution, but I'm on a trip currently and can't review the patch, sorry. I will be available soon. thank you for your patience and bringing it up. Pastakhov (talk) 18:31, 25 March 2019 (UTC)
- Sorry for bringing this up again, but we would like to replace Extension:SlippyMap and openstreetmap:Simple image MediaWiki Extension in the OpenStreetMap wiki with this extension (related GitHub issue). Both of the old extensions are unmaintained and have issues currently [2].
- I would really appreciate if you could help us here! FellTiger (talk) 09:24, 23 April 2019 (UTC)
- Hi FellTiger, you are right, it goes beyond the limits of decency, my sorry for delay...
- I will help right now Pastakhov (talk) 18:58, 23 April 2019 (UTC)
- Thank you for starting the cherry-pick. Unfortunately, I could not add anything to it so I opened a separate change (https://gerrit.wikimedia.org/r/c/mediawiki/extensions/MultiMaps/+/521009) to fix the errors mentioned by Umherirrender. I would appreciate if you would merge them so we can check if Jenkins agrees. FellTiger (talk) 08:19, 16 July 2019 (UTC)
test.foxway.org no longer reply !
[edit]In https://www.mediawiki.org/wiki/Extension:PhpTags
Do you provide another address for test.foxway.org ? or do we remove the item (see/reply https://www.mediawiki.org/wiki/Project%3AVillage%20Pump/Flow/2019/04#h-Template_PhpTags_%3A_dead_links_to_http%3A//test.foxway.org-2019-04-23T20%3A55%3A00.000Z ) Christian 🇫🇷 FR 🚨 (talk) 10:26, 24 April 2019 (UTC)
- I'm restoring the server Pastakhov (talk) 10:34, 28 April 2019 (UTC)
Hello Pastakhov, I've been working on skinning and your page Skin:Empty regularly comes up as the #1 Google hit, but it seems to be an abandonded draft. I was wondering if you wanted to move the draft to userspace or if the page should maybe be deleted – I think it's the only page in the Skin namespace that doesn't describe a skin that exists. Þjarkur (talk) 00:40, 23 September 2019 (UTC)
- Hello @Þjarkur, I just have no time to finish the Empty skin, generally the skin works but I didn't created useful PhpTags widgets for the skin and mw core does not support less as a wiki page yet... but I still plan to finish it in a few months Pastakhov (talk) 07:37, 23 September 2019 (UTC)
Multimap extension - mapping Google API
[edit]Hi there Pastakhov, I've just recently tried setting up Multimap, and was hoping to use it with Google Maps, however now google maps require API. Was wondering if you had a solution to this or any new extensions that may accommodate embedded google maps on the wiki page.
Look forward to hearing from you.
Allan B1Bayon (talk) 07:31, 22 January 2021 (UTC)
When exporting a page, no images are inserted
[edit]On pages that contain Math formulas, an error is displayed when exporting to PDF
Product | Version |
---|---|
MediaWiki | 1.35.0 |
PHP | 7.4.14 (fpm-fcgi) |
MariaDB | 10.1.47-MariaDB-0ubuntu0.18.04.1 |
Lua | 5.1.5 |
Mpdf | 1.0 (8afd41e) 07:15, 25 February 2021 |
name : mpdf/mpdf
descrip. : A PHP class to generate PDF files from HTML with Unicode/UTF-8 and CJK support
keywords : pdf, php, utf-8
versions : * v6.1.3 Alechandrop (talk) 19:59, 10 March 2021 (UTC)
Varnish configuration for 5xx backend response
[edit]Hi,
at Manual:Varnish_caching you inserted a configuration snippet for Varnish to not cache 5xx backend responses. As far as I know Varnish doesn't cache this responses by default. Can you give my a hint why do you think it's important to insert this snippet anyhow? Thanks. 95.91.225.82 (talk) 13:36, 5 September 2021 (UTC)
- Hi, I added it because my Varnish cashed 5xx backend response, and it was not very nice. Pastakhov (talk) 17:21, 5 September 2021 (UTC)
- In a default configuration of Varnish 6.x (and also lower versions) it doesn't cache 5xx backend responses - have a look at the Varnish User Guide. I think this snippet doesn't change Varnish's behaviour in a default, untouched setup. 95.91.225.82 (talk) 19:00, 5 September 2021 (UTC)
- I have no idea what you call untouched setup, but my Varnish version 5.2.1 revision 67e562482 cached 5xx backend responses until I added the rule to not cache it. Also I faced this problem several times on others wiki. Especially when SMW is installed and after you ran maintenance script a lot of pages were cached with the message that MW in maintenance mode. I'm really glad if your Varnish does not cache 5xx backend responses. But my experience says me that this rule should be added. Pastakhov (talk) 19:20, 5 September 2021 (UTC)
Mpdf didn't show images on the header
[edit]Hi,
I use the extension Mpdf and I really like it. It only have on Problem. I would like to have an small Image in the header line.
I look on the site from mpdf.github.io as you written in you Plugin but I didn't get it to work.
The side show me nothing or the link as a string and I didn't know what I can do.
Can you help me.
Reagards
Martin Cieslik Mciesl01 (talk) 09:37, 11 October 2021 (UTC)
- Hi, can you send me a link to the page? Pastakhov (talk) 14:10, 7 July 2022 (UTC)
phptag cause internal error
[edit]Hello,
it could be famous if it runs. Have you an idea what can cause this error, my mediawiki is a new creation.
MediaWiki | 1.37.1 |
PHP | 8.1.0 (cgi-fcgi) |
MySQL | 8.0.28-0ubuntu0.20.04.3 |
ICU | 60.2 |
Thank you for your attention. Gadjodilofoo (talk) 13:07, 3 July 2022 (UTC)
- Perhaps modsecurity of my shared server?
- Something to do in .htaccess?
[Sun Jul 03 06:09:24.085414 2022] [:error] [pid 418783:tid 119193389135616] [client 78.202.190.23:55500] [client 78.202.190.23] ModSecurity: Access denied with code 418 (phase 2). Operator GE matched 7 at TX:anomaly_score. [file "/dh/apache2/template/etc/mod_sec3_CRS/REQUEST-949-BLOCKING-EVALUATION.conf"] [line "93"] [id "949110"] [msg "Inbound Anomaly Score Exceeded (Total Score: 10)"] [severity "CRITICAL"] [ver "OWASP_CRS/3.3.2"] [tag "application-multi"] [tag "language-multi"] [tag "platform-multi"] [tag "attack-generic"] [hostname "oceanscommuns.net"] [uri "/index.php"] [unique_id "YsGVBAp1huYUJfylLOzHgAAAABM"], referer: oceanscommuns.net/index.php?title=Oc%C3%A9ans_communs:Test&action=edit§ion=2
Gadjodilofoo (talk) 13:30, 3 July 2022 (UTC)- I m hosted at DREAMHOST, i can disable mod_security but not modify it through .htaccess.
- Thank you Gadjodilofoo (talk) 13:43, 3 July 2022 (UTC)
- Hi, I didn't test it with PHP 8, try to run it with PHP 7.4 Pastakhov (talk) 14:09, 7 July 2022 (UTC)
Mpdf crash on mediawiki docker
[edit]Hi!
Thank you for maintaining Mpdf extension! I use latest stable mediawiki docker image, which has php8.1 installed. Hovewer, in your Mpdf extension you use now incompatible version of mpdf github.com/wikimedia/mediawiki-extensions-Mpdf/blob/96d573c96eaf88d33c50ee38c1fa4fd421eece10/composer.json#L3 which crashes when you try to export wiki page to pdf with many kind of errors.
The correct version of Mpdf for php8.1 would be v8.0.13 as written in github.com/mpdf/mpdf
Could you please update mediwiki Mpdf version? Thank you! B8mhzmk (talk) 19:23, 29 June 2023 (UTC)
Myvariables and MagicNoCache
[edit]Hello, why aren't those 2 extensions installed?, if both were installed, there would be less problems, when inserting __NOCACHE__, just loading the page again would show the current date of the pages without having to purge (since to purge a page we must be not blocked, otherwise an error will appear) with the second extension, and with the first we could show some messages for unregistered users and show other messages for users who are registered using {{#ifeq: {{currentuser}} | {{currentloggeduser}} | (registered user) | (not registered user) }}, Maybe you want to start a request to install the 2 extensions on phabricator? thanks 185.169.64.46 (talk) 21:40, 7 February 2024 (UTC)
mpdf with PHP 8.2
[edit]Dear All,
is there any chance to use mpdf with PHP 8.2 for mediawiki. Or if not, can someone recommend me an alternative extension?
Thank you very much and greetings
Julian 134.97.2.1 (talk) 13:25, 2 April 2024 (UTC)