Rickard wrote:Nice work. Looking forward to seeing this in action.
What do you mean by "reduces the static page sizes by several kb"?
Thank you for taking an interest.
I have created two files in the cache/ folder.
One is a simple array containing integer/timezone string tuples.
The other is the guts of the form used to select timezone in the profile.php, admin_options.php, etc...
Doing this saves having to make a 500 tuple query each time profile.php or any other template calling the timezone info.
Here's how I reduced the static page size in the profile.php and other timezone modifying templates:
<select name="form[timezone]">
<option value="<? echo $pun_user['timezone']; ?>" selected><? echo $pun_tzones[$pun_user['timezone']]; ?></option>
<? require "cache/pun_time_zone_options.php"; ?>
</select>
Over the course of several templates this reduces the static page size by about 4kb a form and eliminates what would be a 499 conditional if block when using the zoneinfo for each timezone selection form.
Nothing too dramatic. :-) I think the templates are pretty lean already.
I've had fun working with PunBB.
I'm almost done writing up the documentation where I'm using
"diff mytree/filename.php sourcetree/filename.php"
to note the changes. The timezone mod works and I'm testing it against an event system which enticed me to write the timezone mod to begin with. I finished the initial testing on that last night but I'm still tormenting it to see what breaks.