You can add other scripts adding a design.ini.append.php file in the settings directory of your extension.
like this :
[JavaScriptSettings]
JavaScriptList[]=mynew.js
André R.
Friday 03 December 2010 4:07:29 am
If you want to do dynamic CDN vs local loading based on settings, then you can look at how Damien did it for jqueryUI in admin2pp project (this is similar to how ezjscore does it for yui2/3 and jquery, look at ezjscore.ini in admin2pp).
Also, if you use the setting from reply above, notice that in 4.3 two new settings was introduced so you have to specify if lib should be loaded in frontend or backend, the setting above worked in both front and back before, but you'll have to use BackendJavaScriptList[] in 4.3 and up to get it to load in admin2 design (backend). And can similary use FrontendJavaScriptList[] for frontend.
Thanks for the reply.
I have the following problem, I have a search function but I get the following error message when I call.
EzjscServerRouter Not a valid argument: "socialnetwork:: search"
-------------------------------------------------- -----------------------------------
Invocation from the template:
jQuery.ez ("socialnetwork:: search ', {arg1:' hi!"}, function (data) {
if (data.error_text)
alert (data.error_text)
else
alert (data.content)
});
-------------------------------------------------- -----------------------------------
-------------------------------------------------- -----------------------------------
"Ezjscore.ini.append.php"
[EzjscServer]
FunctionList [] = socialnetwork
[EzjscServer_socialnetwork]
Class = LGKServerFunctions
Functions [] = socialnetwork
# PermissionPrFunction = disabled
File = extension / socialnetwork / classes / LGKServerFunctions.php
-------------------------------------------------- -----------------------------------
-------------------------------------------------- -----------------------------------
"LGKServerFunctions.php"
class LGKServerFunctions extends ezjscServerFunctions{
public static function search ($ args) {
if (isset ($ args [0])) {
return 'Hello World, you sat me parameter:'. $ Args [0];
Else {}
$ Http = eZHTTPTool:: instance ();
if ($ http-> hasPostVariable ('arg1')) {
return 'Hello World, you sat me post'. $ Http-> postVariable ('arg1');
}
}
return "Request to server completed, But You Did not send Any post / function parameters!"
}
}
-------------------------------------------------- -----------------------------------
The strange thing is that under the invocation of the template I have another
jQuery.ez ('ezjsc:: time', {postData: "hi!"}, function (data) {alert (data.content)}); and it works.
Christian Rößler
Friday 03 December 2010 7:19:10 am
As the errormessage states: Not a valid argument: "socialnetwork:: search"
There is a space-character between :: and search. Or isn't it?
The following call to ezjsc::time is not being called, as the javascript was failing above?!?