program.callPlugin from skin script... ?

The forum for designers and developers.
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
User avatar
Weasel
Posts: 5
Joined: 13. Sep 07, 21:25
Location: Denmark
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

program.callPlugin from skin script... ?

Postby Weasel » 13. Sep 07, 21:57


User avatar
Service-Team
Posts: 2448
Joined: 7. Dec 04, 04:48
Location: Germany
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: program.callPlugin from skin script... ?

Postby Service-Team » 14. Sep 07, 01:02

Hello Erik,

callPlugin() can only be used from within scripts started by the plugin (the DLL) itself. That's what the means with "If the running script is executed from within a Plugin, you can callback the native part of the plugin using this function."

So callPlugin() is a sort of a bridge that allows the scripting part (ECMAScript or JavaScript) to pass parameters to the native part (eg. C++ part) or to start a function there. For the other way round, the native part will use .

However, to your problem: What you want to do, is a communication between two different scripts (your plugin and the skin). For this purpose, you have to export a function in the first script, which can then be called from the second script.

Please use the functions and for this purpose.

The export is needed, as different scripts run completely independent by default.

Hopefully, our explanation is not too confusing so that you can get the idea now ;-)

Best regards,
Your Silverjuke Team

PS: Weasel and Erik: Welcome aboard!

User avatar
Weasel
Posts: 5
Joined: 13. Sep 07, 21:25
Location: Denmark
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: program.callPlugin from skin script... ?

Postby Weasel » 14. Sep 07, 23:30

Got it... :)
Seems to work nicely.

Thank you very much.
~Erik

User avatar
Service-Team
Posts: 2448
Joined: 7. Dec 04, 04:48
Location: Germany
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: program.callPlugin from skin script... ?

Postby Service-Team » 15. Sep 07, 11:09

You're welcome.

Good to hear that it works now.

Best regards,
Your Silverjuke Team


[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Return to “Developer Network”