#2 Feb 25, 2018 18:00
- Yes scripts can be separate files, b2evo uses lots of [***.js]
- It shouldn't matter where they are as long a s a) the calling script has the correct path and b) any call made by the script knows where to pick up data etc.
1: Simply letting them be in my post MARKUP
This has not worked for me so far, and I dont think it was meant to be there in B2E (I only read it's possible to cheat/disable the filter)
2: Putting it in the designated box, under the collections advanced settings.
This has also not worked for me so far. (I allowed admins group css and java, and set security to basic.)
3: Keeping external files.
This seems to be working by including my scripts (in the MARKUP) with, for example:
(I have confirmed that the execution of the script begins)
However I am having problems, the scripts are not working as they do outside B2E
But perhaps lets take the location first, is it fine to have the scripts as separate files ?
(I put the dir shown above, that may not be the best place)
Thanks for all the help :-)
I think it depends on what it is used for. Remember that some scripts may cause conflicts while others will work if they are called in the correct order. Ideally scripts for skins should be called through the skin and those for plugins through the plugins.
Essentially it doesn't matter which of your above mentioned options you use, provided that you point to them correctly and they do not cause conflicts. Also ensure your script is well formed, because if a script somewhere breaks, it could stop all following scripts to fire also.
To allow us to advise better, perhaps share what your scripts are for, what functions they are required to perform and which libraries they use.
Think I got the basic functionality going now:
2 scripts picking 3 random cards and turning them along with a text.
It seems when moving scripts outside the html file, a few things are different.
I had to put single quotes.
And I think my variable names went from non-case-sensitive to case-sensitive (Not absolutely sure about this)
Heres a link
Thanks for the input
SWEET, thought it would be much harder :-D
Good to know you've merged your ideas into one site, and are having fun doing it. But look on the bright side, there will probably be harder things to do when you least expect it :)
Yeah you're right, wonderful things to turn the head inside out. :-D
I'll be back soon