Hello, having date() would be very useful. Is there any plan to implement it in this extension?
Extension talk:Foxway
Never mind, i see it's on the To do list.
Yes, it will be done in the next release. For solving performance issues had to rewrite the code. There's still a lot of work, so I can not tell time.
The PhpTags extension is the successor of this extension and contains functions for working with dates in PhpTags Functions extension.
Interesting approach! I would be interested in performance comparison to Scribunto/LUA. Did you do any comparison so far?
I am also very interested in the performance compared to Lua :-) but I did not do comparisons...
I try to provide a high performance, but the main emphasis is on simplicity and versatility. I have a few ideas with the management of caching that can greatly improve performance, but I have not been thinking seriously about it.
Did you also think about implementing this as extension for Scribuntu? I did not really look into this much, but as I understand, it should be possible to implement support for other languages than LUA with Scribuntu. Could be an interesting approach.
For working this extension does not need framework like Scribunto. Also, such a union reduce the performance and limit the opportunities of this extension, so I do not see the point in the implementation of this.
The main idea of this extension is to use PHP syntax, instead parser functions and like. This is great for me and has a high performance.
But that's not all I want to do. :-)
In the future I plan to add objects that will work like extensions Semantic Forms, Semantic Result Formats, Maps, CategoryTree, etc.
How will it work? something like this:
$bar = new Query(); $bar->getPages(['Namespace'=>'Extension', 'limit'=>10, 'category'='Parser extensions', 'properties'=>'Lasteditor']); echo new Table($bar);
I tried to compare performance Scribunto/LUA vs Foxway. It's like comparing warm vs soft :-)
Lua takes a step faster than Foxway, but Foxway can make big steps. Maybe I'm wrong, but that's what I think about it.
Foxway allows the use of a large number of functions PHP, especially for arrays that run very fast. Next I want to add objects, such as HTMLTable. This will avoid bottlenecks, such as the use of cycles in Foxway. This will allow foxway make giant steps and if lua will not give the same opportunity, will never catch up Foxway.
In general, it all depends on the implementation. This makes it impossible to make a fair test.
I have done a comparative test m:Grants:IEG/Magic_expression#Compared_to_LUA_scripting
Hi so I was going to test this extension and was wondering what the optimal configuration parameters are? What do you have them set at? Thanks
Hi, don't use this extension. It's prototype only.
You can use the development version of extension PhpTags and PhpTags Functions.
PhpTags has better performance, but has no debug feature and some string functions yet. In others it is similar.
There is a detailed description of this solution.
Feel free to ask me and please let me know the test results. Thank you in advance.
There is no any special parameters.
Now, PhpTags has only two parameters:
- $wgPhpTagsMaxLoops
- limits the number of loops
- $wgPhpTagsNamespaces
- limits the namespaces where PhpTags can be used
I'm going to make the time limit and limit of function groups. I think this will be enough for convenient and safe use.
Where is this debug view? How do i reach it?
You need add debug
in foxway tag.
Example: <foxway debug>echo 2+2;</foxway>
Thanks
The lead needs grammatical editing, especially a boldfaced sentence in which the second clause is either a warning against our doing something or is a declaration that the extension doesn't do it and I can't tell which was intended. Since editing the grammar requires knowing the intent and I don't know the intent, I'm not qualified to edit the page. I didn't read the rest of the page. If anyone knows what is meant, please edit. Thanks.
Thank you for your comment. I tried to fix it.
Hey, I would love to as my local admin to install this extension. He'll never go for it though due to security concerns. Now, "if" this extension only allowed php in a certain namespace that was only accessible/editable by people with a special user group right, then I could talk him into it. Something like the way that Extension:Widget allows special code to be entered in the "Widget:" namespace and requires editwidgets to edit in that namespace..
Hi, thanks for the feedback!
Why are you concerned about the security with this extension? This extension does not allows run php code! It works the same way as other extensions like Extension:ParserFunctions, but instead of using wiki syntax, uses the syntax of PHP.
I try to make sure that the output of this extension was very similar to the output of PHP. I use own PHP interpreter and never use direct run custom code in PHP interpreter installed on your computer.
Extension:Widget allows the creation of raw HTML pages. Therefore, for safety reasons, are allowed to use this extension is just to name space with limited access. Foxway does not allow creation of raw HTML pages, because MediaWiki parser processes the foxway outputs like any other text.
In any case, I will add the ability to specify the namespaces, which enable the extension foxway.
You can test the safety of extension Foxway in this sandbox
Hi, here's an example for giving permission to use Foxway extension is just a special user group:
(Place it in LocalSettings.php)
// Define new Namespace define("NS_PHP", 1000); define("NS_PHP_TALK", 1001); $wgExtraNamespaces[NS_PHP] = "PHP"; $wgExtraNamespaces[NS_PHP_TALK] = "PHP_Talk"; // Protect this namespace $wgNamespaceProtection[NS_PHP] = array( 'php_editor' ); $wgGroupPermissions['sysop']['php_editor'] = true; // Allow Foxway only in this namespace // Placing it AFTER the inclusion of Foxway!!! $wgNamespacesWithFoxway = array( NS_PHP );