Wednesday 23 December 2009 7:45:21 pm - 16 replies
Saturday 26 December 2009 1:42:16 pm
Thanks Łukasz and André for this article. This extension is really useful ! I now use it on all my projects (novenimagecropper has a dependency on it ).
JS/CSS Concatenation is great, but it could be interesting to be able to take into account modification time for the hashname generation, in order to get better support for browser cache issues and CDNs. What do you think ?
Friday 12 February 2010 5:32:06 pm
Is it possible to put an override for ezjscore.ini in a design extension, or in the main settings section?
Hi Paul !
Yes, it totally is, it is just a normal configuration file, meaning it complies with the general rules of INI overrides. I am not sure what you mean by "main settings section", but if this is <ezroot>/settings/override or <ezroot>/settings/siteaccess/<siteaccess_name>/ then it is just OK (but not directly in <ezroot>/settings/, where only default configuration files are to be stored, which i am sure you already know ).
Saturday 13 February 2010 4:08:13 am
That's good news!
I'm still a bit hazy about what happens when one is using a design extension though. Can you override settings for one extension in another?
Would any of these work?
Modified on Saturday 13 February 2010 4:08:43 am by paul bolger
Monday 15 February 2010 10:14:23 am
Would any of these work?
The first one above is correct, acting as a global override (like if the override file was located in <ezroot>/settings/override/).
The second one is incorrect: a configuration file, and by extension a 'settings' directory, can not be placed in a design directory.
Same answer for the 3rd option above.
Per your question : "Can you override settings for one extension in another?", you sure can. I'd recommend to have a look at this thread : http://share.ez.no/forums/setup-design/ini-settings-override-order , will shed the final light on your interrogations.
Saturday 20 February 2010 2:06:20 pm
Thanks for this article.
What i was looking for (and did not find yet): A simple example on how to call simple YUI / jquery functions like "show/hide a DIV" using one of the libraries.
I.e. : does somebody have some example for this using ezjscore somewhere?
I created this using scriptaculous/prototype earlier, but i assume, one of these "bundled" libraries also is able to do these "easy JS animation effects" ...
Wednesday 24 February 2010 6:28:31 am
It took me a while to work out how to tell if my settings override was working or not, but I have it working now. Note, for anyone else doing this, that the order of your extensions in your /site/override/site.ini.append.php file affects the priority or cascade of the ini files. Contrary to Łukasz's blog my extensions seem to work in reverse order, the higher in the list the higher priority.
Here's my extension settings block.
[ExtensionSettings] ActiveExtensions ActiveExtensions=ezwt ActiveExtensions=ezstarrating ActiveExtensions=ezgmaplocation ActiveExtensions=ezoe ActiveExtensions=ezodf ActiveExtensions=ezmultiupload ActiveExtensions=ezwebin_custom ActiveExtensions=ezwebin ActiveExtensions=ezjscore
Also, I've noticed that if you activate an extension in the admin interface, rather than by editing the site.ini directly, eZ Publish seems to get creative with the order - which can wreak havoc on your site.
Modified on Wednesday 17 March 2010 9:30:26 am by paul bolger
Saturday 27 February 2010 10:21:18 pm
As i can see, now all methods wich are mapped to AJAX calls are static. And we cant get a current instace ($this). But if you change some code in ezjscServerRouter::call() it will became possible:
return call_user_func_array( array( $this->className, $this->functionName ), array( $this->functionArguments, &$environmentArguments, $isPackeStage ) );
return call_user_func_array( array( new $this->className, $this->functionName ), array( $this->functionArguments, &$environmentArguments, $isPackeStage ) );
In this case we can put some usefull code in ezjscServerFunctions::__constructor wich will parse POST vars, for example (but to get them, all AJAX mapped methods shouldn`t be static )
Tuesday 02 March 2010 11:14:21 am
Tuesday 02 March 2010 6:04:55 pm
Great article, the only thing I think it's missing more of a real-world example. For instance, it would be great to see an example of how to use this to submit a Poll object from the embed view and get back the poll results without refreshing the entire page. Is that something you can do with ezjscore?
Modified on Monday 08 March 2010 11:13:39 pm by Jordan Hirsch
Tuesday 31 May 2011 11:54:01 pm
@thibaut: for ajax content you're completely spoiled nowadays:
You must be logged in to post messages in this topic!