To enable template inheritance for it. Until RFC for T_STYLE_PATH (inheritance for all components) will be implemented, INCLUDEJS is the only way to allow inheritance for javascript files.callumacrae wrote:EDIT: Ignore that, you're using INCLDEJS. Why are you using INCLUDEJS? XD
[RFC|Merged] Template tag to include JS files
Re: [RFC] Template tag to include JS files
Formerly known as CyberAlien.
Free phpBB styles | Premium responsive XenForo styles | Iconify - modern open source replacement for glyph fonts
Free phpBB styles | Premium responsive XenForo styles | Iconify - modern open source replacement for glyph fonts
- callumacrae
- Former Team Member
- Posts: 1046
- Joined: Tue Apr 27, 2010 9:37 am
- Location: England
- Contact:
Re: [RFC] Template tag to include JS files
Aha, I see. Fair enough.
- Dragosvr92
- Registered User
- Posts: 624
- Joined: Tue May 31, 2011 12:08 pm
- Location: Romania
- Contact:
Re: [RFC] Template tag to include JS files
Will phpbb variables be parsed if in javascript files?
Like, will {T_STYLE_PATH} be parsed in a js file same as it gets parsed into a html file?
I needed to do this on the Lightbox MOD and it didnt work.
Like, will {T_STYLE_PATH} be parsed in a js file same as it gets parsed into a html file?
I needed to do this on the Lightbox MOD and it didnt work.
Previous user: TheKiller
Avatar on Memberlist 1.0.3
Avatar on Memberlist 1.0.3
- callumacrae
- Former Team Member
- Posts: 1046
- Joined: Tue Apr 27, 2010 9:37 am
- Location: England
- Contact:
Re: [RFC] Template tag to include JS files
No.TheKiller wrote:Will phpbb variables be parsed if in javascript files?
Like, will {T_STYLE_PATH} be parsed in a js file same as it gets parsed into a html file?
I needed to do this on the Lightbox MOD and it didnt work.
Re: [RFC] Template tag to include JS files
Wiki article that includes this change: http://wiki.phpbb.com/New_Template_Commands_in_3.1
Formerly known as CyberAlien.
Free phpBB styles | Premium responsive XenForo styles | Iconify - modern open source replacement for glyph fonts
Free phpBB styles | Premium responsive XenForo styles | Iconify - modern open source replacement for glyph fonts
Re: [RFC] Template tag to include JS files
Please confirm:Arty wrote:Wiki article that includes this change: http://wiki.phpbb.com/New_Template_Commands_in_3.1
Does it keep the order of the INCLUDEJS tags? If it does that's something important to specify in the wiki.
An example would also be nice. Because I still don't know >90% how it works, it's better for you to write that example.
Anyway:
Great feature, dude!
- callumacrae
- Former Team Member
- Posts: 1046
- Joined: Tue Apr 27, 2010 9:37 am
- Location: England
- Contact:
Re: [RFC] Template tag to include JS files
Yes, it will keep the order.brunoais wrote:Please confirm:Arty wrote:Wiki article that includes this change: http://wiki.phpbb.com/New_Template_Commands_in_3.1
Does it keep the order of the INCLUDEJS tags? If it does that's something important to specify in the wiki.
An example would also be nice. Because I still don't know >90% how it works, it's better for you to write that example.
Anyway:
Great feature, dude!
What don't you get about the example on the wiki article? You call the INCLUDEJS function, it inserts the script after the jQuery tag…
Re: [RFC] Template tag to include JS files
I've added example to wiki to make things clearer.
Formerly known as CyberAlien.
Free phpBB styles | Premium responsive XenForo styles | Iconify - modern open source replacement for glyph fonts
Free phpBB styles | Premium responsive XenForo styles | Iconify - modern open source replacement for glyph fonts
Re: [RFC] Template tag to include JS files
Your changes do not answer my question.
You state that all script tags are placed after jQuery's script tag. That's ok and was already there.
Another thing you do not tell in the wiki:
Do tag order maintains?
In the code:
Can it become?
Does the tag order in the files persist? You do not specify that anywhere in that wiki article.
You state that all script tags are placed after jQuery's script tag. That's ok and was already there.
Another thing you do not tell in the wiki:
Do tag order maintains?
In the code:
Code: Select all
<!-- overall_header.html -->
header stuff here
<!-- end of overall_header.html -->
<!-- custom template -->
<!-- INCLUDEJS template/custom1.js -->
Some content
<!-- INCLUDEJS template/custom2.js -->
<!-- end of custom template -->
<!-- overall_footer.html -->
<!-- INCLUDEJS template/custom3.js -->
footer code here
jQuery is included here
</body>
</html>
<!-- end of overall_footer.html -->
Code: Select all
header stuff here
some content
footer code here
jQuery is included here
<script src="./styles/prosilver/template/custom3.js"></script>
<script src="./styles/prosilver/template/custom1.js"></script>
<script src="./styles/prosilver/template/custom2.js"></script>
</body>
</html>
Re: [RFC] Template tag to include JS files
Yes, that's exactly what it will become
Formerly known as CyberAlien.
Free phpBB styles | Premium responsive XenForo styles | Iconify - modern open source replacement for glyph fonts
Free phpBB styles | Premium responsive XenForo styles | Iconify - modern open source replacement for glyph fonts