[BETA] Speedy Templates 0.1.6

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
User avatar
Dog Cow
Registered User
Posts: 2499
Joined: Fri Jan 28, 2005 12:14 am
Contact:

Re: [BETA] Speedy Templates 0.1.5

Post by Dog Cow »

I have yet to download .1.5. I just read the changes... good job on prettier cache filenames- I hate it when people use MD5 for anything and everything, makes it hard to find a file that you want.

Are you going to have a file size limit? I saw that 0.1.4 was roughly 7,000 bytes. You should make it a persnoal goal to not go over a certain amount of bytes. Maybe strip out that mile long comment(s) you have at the start.
Moof!
Mac GUI Vault: Retro Apple II & Macintosh computing archive.
Inside Allerton bookMac GUIMac 512K Blog
User avatar
drathbun
Former Team Member
Posts: 12204
Joined: Thu Jun 06, 2002 3:51 pm
Location: TOPICS_TABLE
Contact:

Re: [BETA] Speedy Templates 0.1.5

Post by drathbun »

php comments should not matter if you have php caching going on, right? products like eAccellerator or phpA should get around that.

I haven't checked this out yet, but I'm already excited to hear that the filenames are better. That was one of the things I was going to change myself. :-P
I blog about phpBB: phpBBDoctor blog
Still using phpbb2? So am I! Click below for details
Image
ckwalsh
Former Team Member
Posts: 1837
Joined: Wed Mar 15, 2006 1:50 am
Location: Seattle, USA
Name: Cullen Walsh
Contact:

Re: [BETA] Speedy Templates 0.1.5

Post by ckwalsh »

When submitting this to the MODDB I was planning on removing that comments and the version check. However, those are nice to have for testing so I know what I am working on.

I'm glad people like the better filenames. MD5 was a lazy way for me to generate filenames early in development and I finally got tired of trying to figure out which file was which.
Where to post what | Forum Rules | The Dos and Don'ts of General Discussion
In Seattle and want to meet, chat, or have a coffee? Drop me a PM.
User avatar
drathbun
Former Team Member
Posts: 12204
Joined: Thu Jun 06, 2002 3:51 pm
Location: TOPICS_TABLE
Contact:

Re: [BETA] Speedy Templates 0.1.5

Post by drathbun »

Preliminary indications are all good. I have made the changes required for the attachment MOD and have implemented 0.1.5 on my beta board. I can post. :)

I don't see any template gotchas with this version like I saw with some prior versions.

I like how you have the "IN_PHPBB" check at the top of the file. That will keep someone from running the template file directly if they know (or guess) the URL, that's a great touch.

Is there an easy and efficient way to collapse empty spaces? For example, for ease of reading most html files will include tabs or spaces to indent the code. But they don't really need to be there for the final rendering. If tabs are used the gain would be minimal, but if spaces are used then the template file sizes could shrink some. I took one of the template files and removed tabs, extra spaces, and line feeds (it resulted in one long html/php data stream :lol: ) and the file size went down between three and four percent. Maybe a str_replace() to remove tab and newlines and collapse two or more spaces down to one would be fairly quick, and another way to squeeze a few microseconds out of this?

Let me know when you want me to run another round of benchmarks. I am going to sit on my other statistics until you think that Speedy is fairly stable and then redo them.
I blog about phpBB: phpBBDoctor blog
Still using phpbb2? So am I! Click below for details
Image
ckwalsh
Former Team Member
Posts: 1837
Joined: Wed Mar 15, 2006 1:50 am
Location: Seattle, USA
Name: Cullen Walsh
Contact:

Re: [BETA] Speedy Templates 0.1.5

Post by ckwalsh »

drathbun wrote:Preliminary indications are all good. I have made the changes required for the attachment MOD and have implemented 0.1.5 on my beta board. I can post. :)

I don't see any template gotchas with this version like I saw with some prior versions.
Glad posting works. I'm not sure why you were so worried about it though. It's not like it's an important feature or anything ;)
drathbun wrote:I like how you have the "IN_PHPBB" check at the top of the file. That will keep someone from running the template file directly if they know (or guess) the URL, that's a great touch.
Thanks. I wasn't too worried about the generated code having issues, as it shouldn't have anything significant executing, but more about custom phpBB code. I can see a php newbie (since I've done it many-a-time before) doing something to make themselves vulnerable.
drathbun wrote:Is there an easy and efficient way to collapse empty spaces? For example, for ease of reading most html files will include tabs or spaces to indent the code. But they don't really need to be there for the final rendering. If tabs are used the gain would be minimal, but if spaces are used then the template file sizes could shrink some. I took one of the template files and removed tabs, extra spaces, and line feeds (it resulted in one long html/php data stream :lol: ) and the file size went down between three and four percent. Maybe a str_replace() to remove tab and newlines and collapse two or more spaces down to one would be fairly quick, and another way to squeeze a few microseconds out of this?
I was thinking about removing spaces, but I was worried about people who used spaces for layout purposes (Yes, it's stupid, but not everyone using this will know better). There is also the problem if people want to use the pre tag.

I guess it shouldn't be an issue for most people and could be dealt with on a case by case basis. It should be an easy fix in commenting out a line.

See it in 0.1.6
drathbun wrote:Let me know when you want me to run another round of benchmarks. I am going to sit on my other statistics until you think that Speedy is fairly stable and then redo them.
I'm hoping 0.1.6 will be the last development version before sending it to the MODDB, so could you run them after that?
Where to post what | Forum Rules | The Dos and Don'ts of General Discussion
In Seattle and want to meet, chat, or have a coffee? Drop me a PM.
User avatar
drathbun
Former Team Member
Posts: 12204
Joined: Thu Jun 06, 2002 3:51 pm
Location: TOPICS_TABLE
Contact:

Re: [BETA] Speedy Templates 0.1.5

Post by drathbun »

Well, I would not expect a "pre" tag to be in the layout. It might be in the data (via the code bbcode) but not in a standard template file. But you're right, it could be there.

I will plan to run a final benchmark after 0.1.6.
I blog about phpBB: phpBBDoctor blog
Still using phpbb2? So am I! Click below for details
Image
User avatar
drathbun
Former Team Member
Posts: 12204
Joined: Thu Jun 06, 2002 3:51 pm
Location: TOPICS_TABLE
Contact:

Re: [BETA] Speedy Templates 0.1.5

Post by drathbun »

Well, I have a bug to report. I think it has to do with the language string handling your doing.

Here's a shot from when I am logged out of my board:
Logged Out
Logged Out
logged_out.png (8.7 KiB) Viewed 632 times
Here is a shot from when I am logged in:
Logged In
Logged In
logged_in.png (9.04 KiB) Viewed 633 times
If you notice, the "login" menu option is still saying "Login" even after I have logged in. That's because the language string (I think) has been cached. The menu option is populated with this code:

Code: Select all

if ( $userdata['session_logged_in'] )
{
        $u_login_logout = 'login.'.$phpEx.'?logout=true';
        $l_login_logout = $lang['Logout'] . ' [ ' . $userdata['username'] . ' ]';
}
else
{
        $u_login_logout = 'login.'.$phpEx;
        $l_login_logout = $lang['Login'];
        $admin_link = '';
}
I don't use private messages on this board, but this might also be an issue with "You have 2 New Messages" and that sort of thing that can change from one refresh to the next.
I blog about phpBB: phpBBDoctor blog
Still using phpbb2? So am I! Click below for details
Image
ckwalsh
Former Team Member
Posts: 1837
Joined: Wed Mar 15, 2006 1:50 am
Location: Seattle, USA
Name: Cullen Walsh
Contact:

Re: [BETA] Speedy Templates 0.1.5

Post by ckwalsh »

Hmmm... I assumed all template variables prefixed with "L_" were static with no substitutions.

Guess not.
Where to post what | Forum Rules | The Dos and Don'ts of General Discussion
In Seattle and want to meet, chat, or have a coffee? Drop me a PM.
User avatar
drathbun
Former Team Member
Posts: 12204
Joined: Thu Jun 06, 2002 3:51 pm
Location: TOPICS_TABLE
Contact:

Re: [BETA] Speedy Templates 0.1.5

Post by drathbun »

Actually, there are quite a few that are not static. :) There are X users logged in. You have Y private messages. Click "here" to return to the topic. And so on.
I blog about phpBB: phpBBDoctor blog
Still using phpbb2? So am I! Click below for details
Image
User avatar
Dog Cow
Registered User
Posts: 2499
Joined: Fri Jan 28, 2005 12:14 am
Contact:

Re: [BETA] Speedy Templates 0.1.5

Post by Dog Cow »

Basically, anything that uses sprintf() or has a %s or %d. I imagine that a regex could check for these cases and not make the variable static.
Moof!
Mac GUI Vault: Retro Apple II & Macintosh computing archive.
Inside Allerton bookMac GUIMac 512K Blog
ckwalsh
Former Team Member
Posts: 1837
Joined: Wed Mar 15, 2006 1:50 am
Location: Seattle, USA
Name: Cullen Walsh
Contact:

Re: [BETA] Speedy Templates 0.1.5

Post by ckwalsh »

I found (and I think fixed) the sprintf's, but there are also some strings that are dependent on conditionals. Those are a bit harder to find.
Where to post what | Forum Rules | The Dos and Don'ts of General Discussion
In Seattle and want to meet, chat, or have a coffee? Drop me a PM.
ckwalsh
Former Team Member
Posts: 1837
Joined: Wed Mar 15, 2006 1:50 am
Location: Seattle, USA
Name: Cullen Walsh
Contact:

Re: [BETA] Speedy Templates 0.1.6

Post by ckwalsh »

0.1.6 is out, and hopefully the last version before submitting to the MODDB.
Where to post what | Forum Rules | The Dos and Don'ts of General Discussion
In Seattle and want to meet, chat, or have a coffee? Drop me a PM.
User avatar
Dogs and things
Registered User
Posts: 2114
Joined: Fri Sep 01, 2006 9:04 am
Location: Spain
Contact:

Re: [BETA] Speedy Templates 0.1.6

Post by Dogs and things »

I´ve been following this development with interest. ;)

I just tried the latest version on my local copy of my live board.

I applied the Att. MOD fix but what happens when I open a topic with an attachment posted is that nothing between header and footer shows. Nothing means nothing at all.

Also, I found that the DHTML Slide Menu for ACP stops working with your MOD installed.

I´m running on Xammp using PHP4.

Thought you´d be interested in hearing this, in spite of it not being exactly positive feedback.
For phpBB2 support visit phpBB2refugees.
ckwalsh
Former Team Member
Posts: 1837
Joined: Wed Mar 15, 2006 1:50 am
Location: Seattle, USA
Name: Cullen Walsh
Contact:

Re: [BETA] Speedy Templates 0.1.6

Post by ckwalsh »

For the attachment MOD problem, mind posting the t_0_1_6_subSilver_viewtopic_body.tpl.english.php file from your cache folder?

As for the Slide menu, it is probably a problem with the whitespace being stripped. I'll try installing it and investigate.
Where to post what | Forum Rules | The Dos and Don'ts of General Discussion
In Seattle and want to meet, chat, or have a coffee? Drop me a PM.
User avatar
Dogs and things
Registered User
Posts: 2114
Joined: Fri Sep 01, 2006 9:04 am
Location: Spain
Contact:

Re: [BETA] Speedy Templates 0.1.6

Post by Dogs and things »

I wouldn't mind at all, ;)

But there´s not a single file in that folder. I´m using my own modified template and the /cache/ folder is in my forum root. I´m using Xampp on XP Home.
For phpBB2 support visit phpBB2refugees.
Post Reply

Return to “[2.0.x] MODs in Development”