phpBB

Development Discussion Board

phpBB's testing ground of bleeding edge code
Advanced search

[RFC|Merged] Template tag to include JS files

These requests for comments 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.

Re: [RFC] Template tag to include JS files

Postby 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?
hanakin
Registered User
 
Posts: 173
Joined: Sat Dec 25, 2010 9:02 pm

Re: [RFC] Template tag to include JS files

Postby 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.
User avatar
Arty
Styles Team
Styles Team
 
Posts: 789
Joined: Wed Mar 06, 2002 2:36 pm
Location: Mars

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

Postby 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.
www.naderman.de
Move your forum to Forumatic - we'll take care of maintenance & spam
User avatar
naderman
Development Team Leader
Development Team Leader
 
Posts: 1649
Joined: Sun Jan 11, 2004 2:11 am
Location: Karlsruhe, Germany

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

Postby Arty » Mon Apr 02, 2012 7:38 am

Done. Updated wiki with all major style changes.
Formerly known as CyberAlien.
User avatar
Arty
Styles Team
Styles Team
 
Posts: 789
Joined: Wed Mar 06, 2002 2:36 pm
Location: Mars

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

Postby igorw » Sun Apr 08, 2012 9:01 pm

This does not work for assets though, 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

Postby 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)
brunoais
Registered User
 
Posts: 626
Joined: Fri Dec 18, 2009 3:55 pm

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

Postby igorw » Mon Apr 09, 2012 12:08 pm

Not as in not yet.
User avatar
igorw
Registered User
 
Posts: 500
Joined: Thu Jan 04, 2007 11:47 pm

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

Postby 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
Oleg
3.1 Release Manager
3.1 Release Manager
 
Posts: 1150
Joined: Tue Feb 23, 2010 2:38 am

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

Postby 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.
User avatar
Arty
Styles Team
Styles Team
 
Posts: 789
Joined: Wed Mar 06, 2002 2:36 pm
Location: Mars

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

Postby 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.
Oleg
3.1 Release Manager
3.1 Release Manager
 
Posts: 1150
Joined: Tue Feb 23, 2010 2:38 am

Previous

Return to [3.1/Ascraeus] Merged RFCs

Who is online

Users browsing this forum: No registered users and 8 guests