[RFC|Merged] Template tag to include JS files

These requests for comments/change have lead to an implemented feature that has been successfully merged into the 3.1/Ascraeus branch. Everything listed in this forum will be available in phpBB 3.1.
User avatar
hanakin
Infrastructure Team
Infrastructure Team
Posts: 788
Joined: Sat Dec 25, 2010 9:02 pm
Contact:

Re: [RFC] Template tag to include JS files

Post by hanakin » Mon Mar 05, 2012 8:59 am

I would think that is kind of a no brainer as HTML loads top down why would it change the order?

User avatar
Arty
Registered User
Posts: 970
Joined: Wed Mar 06, 2002 2:36 pm
Location: Mars
Contact:

Re: [RFC] Template tag to include JS files

Post by Arty » Sun Apr 01, 2012 8:18 am

Ticket: http://tracker.phpbb.com/browse/PHPBB3-10665
Patch: https://github.com/cyberalien/phpbb3/tree/ticket/10665

Patch is not available as pull request yet because it is based on another pull request.

Also moved to 3.1 forum.
Formerly known as CyberAlien.

Free phpBB styles | Premium responsive XenForo styles

User avatar
naderman
Product Manager
Product Manager
Posts: 1727
Joined: Sun Jan 11, 2004 2:11 am
Location: Karlsruhe, Germany
Contact:

Re: [RFC|Merged] Template tag to include JS files

Post by naderman » Mon Apr 02, 2012 12:14 am

When you create wiki articles for transitioning to 3.1 please make sure they are linked to from http://wiki.phpbb.com/phpBB3.1 so they are easy to find.

User avatar
Arty
Registered User
Posts: 970
Joined: Wed Mar 06, 2002 2:36 pm
Location: Mars
Contact:

Re: [RFC|Merged] Template tag to include JS files

Post by Arty » Mon Apr 02, 2012 7:38 am

Done. Updated wiki with all major style changes.
Formerly known as CyberAlien.

Free phpBB styles | Premium responsive XenForo styles

User avatar
igorw
Registered User
Posts: 500
Joined: Thu Jan 04, 2007 11:47 pm

Re: [RFC|Merged] Template tag to include JS files

Post by igorw » Sun Apr 08, 2012 9:01 pm

This does not work for assets though, right?

User avatar
brunoais
Registered User
Posts: 958
Joined: Fri Dec 18, 2009 3:55 pm

Re: [RFC|Merged] Template tag to include JS files

Post by brunoais » Sun Apr 08, 2012 9:16 pm

igorw wrote:This does not work for assets though, right?
How come?
It makes no real sense if it was made in such way that it doesn't... (I hope I understood it right)

User avatar
igorw
Registered User
Posts: 500
Joined: Thu Jan 04, 2007 11:47 pm

Re: [RFC|Merged] Template tag to include JS files

Post by igorw » Mon Apr 09, 2012 12:08 pm

Not as in not yet.

Oleg
Posts: 1150
Joined: Tue Feb 23, 2010 2:38 am
Contact:

Re: [RFC|Merged] Template tag to include JS files

Post by Oleg » Fri Apr 13, 2012 4:26 am

The test has this code:

Code: Select all

		// Prepare correct result
		$dir = dirname(__FILE__);
		$scripts = array(
			'<script src="' . $dir . '/templates/parent_and_child.html?assets_version=1"></script>',
			'<script src="' . $dir . '/parent_templates/parent_only.html?assets_version=1"></script>',
			'<script src="' . $dir . '/templates/child_only.html?assets_version=1"></script>'
		);

		// Run test
		$cache_file = $this->template->cachepath . 'includejs.html.php';
		$this->run_template('includejs.html', array('PARENT' => 'parent_only.html'), array(), array(), implode('', $scripts), $cache_file);
Why are filesystem paths ending up in script tags?

Also please note the following additional tickets filed:

http://tracker.phpbb.com/browse/PHPBB3-10800
http://tracker.phpbb.com/browse/PHPBB3-10799

User avatar
Arty
Registered User
Posts: 970
Joined: Wed Mar 06, 2002 2:36 pm
Location: Mars
Contact:

Re: [RFC|Merged] Template tag to include JS files

Post by Arty » Sat Apr 14, 2012 9:07 am

Oleg wrote:Why are filesystem paths ending up in script tags?
Because of this: https://github.com/phpbb/phpbb3/blob/de ... se.php#L66
and this: https://github.com/phpbb/phpbb3/blob/de ... ee.php#L21
Formerly known as CyberAlien.

Free phpBB styles | Premium responsive XenForo styles

Oleg
Posts: 1150
Joined: Tue Feb 23, 2010 2:38 am
Contact:

Re: [RFC|Merged] Template tag to include JS files

Post by Oleg » Sat Apr 14, 2012 11:25 am

That needs to be changed/fixed then? Is there a ticket filed to fix it? Was this discussed anywhere?

I stopped blaming that code when I got to https://github.com/phpbb/phpbb3/commit/ ... c89a53d0c5.

Post Reply